From 762a2d671d8d9e323d8542ecce587745c2f8a32a Mon Sep 17 00:00:00 2001
From: support
Date: Tue, 15 Nov 2022 11:07:14 +0000
Subject: [PATCH] Built motion from commit 3a4d83e9.|2.6.19
---
apidoc/api_project.js | 4 +-
apidoc/api_project.json | 4 +-
npm-shrinkwrap.json | 2 +-
package.json | 2 +-
server/api/action/action.attributes.js | 2 +-
server/api/action/action.controller.js | 2 +-
server/api/action/action.model.js | 2 +-
server/api/action/action.rpc.js | 2 +-
server/api/action/index.js | 2 +-
.../analyticCustomReport.attributes.js | 2 +-
.../analyticCustomReport.controller.js | 2 +-
.../analyticCustomReport.model.js | 2 +-
.../analyticCustomReport.rpc.js | 2 +-
server/api/analyticCustomReport/index.js | 2 +-
.../analyticDefaultReport.attributes.js | 2 +-
.../analyticDefaultReport.controller.js | 2 +-
.../analyticDefaultReport.model.js | 2 +-
.../analyticDefaultReport.rpc.js | 2 +-
server/api/analyticDefaultReport/index.js | 2 +-
.../analyticExtractedReport.attributes.js | 2 +-
.../analyticExtractedReport.controller.js | 2 +-
.../analyticExtractedReport.model.js | 2 +-
.../analyticExtractedReport.rpc.js | 2 +-
server/api/analyticExtractedReport/index.js | 2 +-
.../analyticFieldReport.attributes.js | 2 +-
.../analyticFieldReport.controller.js | 2 +-
.../analyticFieldReport.model.js | 2 +-
.../analyticFieldReport/analyticFieldReport.rpc.js | 2 +-
server/api/analyticFieldReport/index.js | 2 +-
.../analyticMetric/analyticMetric.attributes.js | 2 +-
.../analyticMetric/analyticMetric.controller.js | 2 +-
server/api/analyticMetric/analyticMetric.model.js | 2 +-
server/api/analyticMetric/analyticMetric.rpc.js | 2 +-
server/api/analyticMetric/index.js | 2 +-
.../analyticTreeReport.attributes.js | 2 +-
.../analyticTreeReport.controller.js | 2 +-
.../analyticTreeReport/analyticTreeReport.model.js | 2 +-
.../analyticTreeReport/analyticTreeReport.rpc.js | 2 +-
server/api/analyticTreeReport/index.js | 2 +-
server/api/attachment/attachment.attributes.js | 2 +-
server/api/attachment/attachment.controller.js | 2 +-
server/api/attachment/attachment.model.js | 2 +-
server/api/attachment/attachment.rpc.js | 2 +-
server/api/attachment/index.js | 2 +-
.../authActiveDirectory.controller.js | 2 +-
server/api/authActiveDirectory/index.js | 2 +-
server/api/authGoogle/authGoogle.controller.js | 2 +-
server/api/authGoogle/index.js | 2 +-
server/api/authLocal/authLocal.controller.js | 2 +-
server/api/authLocal/index.js | 2 +-
server/api/automation/automation.attributes.js | 2 +-
server/api/automation/automation.controller.js | 2 +-
server/api/automation/automation.model.js | 2 +-
server/api/automation/automation.rpc.js | 2 +-
server/api/automation/index.js | 2 +-
server/api/campaign/campaign.attributes.js | 2 +-
server/api/campaign/campaign.controller.js | 2 +-
server/api/campaign/campaign.model.js | 2 +-
server/api/campaign/campaign.rpc.js | 2 +-
server/api/campaign/index.js | 2 +-
server/api/cannedAnswer/cannedAnswer.attributes.js | 2 +-
server/api/cannedAnswer/cannedAnswer.controller.js | 2 +-
server/api/cannedAnswer/cannedAnswer.model.js | 2 +-
server/api/cannedAnswer/cannedAnswer.rpc.js | 2 +-
server/api/cannedAnswer/index.js | 2 +-
server/api/cdr/cdr.attributes.js | 2 +-
server/api/cdr/cdr.controller.js | 2 +-
server/api/cdr/cdr.model.js | 2 +-
server/api/cdr/cdr.rpc.js | 2 +-
server/api/cdr/index.js | 2 +-
.../chatApplication/chatApplication.attributes.js | 2 +-
.../chatApplication/chatApplication.controller.js | 2 +-
.../api/chatApplication/chatApplication.model.js | 2 +-
server/api/chatApplication/chatApplication.rpc.js | 2 +-
server/api/chatApplication/index.js | 2 +-
server/api/chatGroup/chatGroup.attributes.js | 2 +-
server/api/chatGroup/chatGroup.controller.js | 2 +-
server/api/chatGroup/chatGroup.events.js | 2 +-
server/api/chatGroup/chatGroup.model.js | 2 +-
server/api/chatGroup/chatGroup.rpc.js | 2 +-
server/api/chatGroup/chatGroup.socket.js | 2 +-
server/api/chatGroup/index.js | 2 +-
.../chatInteraction/chatInteraction.attributes.js | 2 +-
.../chatInteraction/chatInteraction.controller.js | 2 +-
.../api/chatInteraction/chatInteraction.events.js | 2 +-
.../api/chatInteraction/chatInteraction.model.js | 2 +-
server/api/chatInteraction/chatInteraction.rpc.js | 2 +-
.../api/chatInteraction/chatInteraction.socket.js | 2 +-
server/api/chatInteraction/index.js | 2 +-
.../chatInternalMessage.attributes.js | 2 +-
.../chatInternalMessage.controller.js | 2 +-
.../chatInternalMessage.events.js | 2 +-
.../chatInternalMessage.model.js | 2 +-
.../chatInternalMessage/chatInternalMessage.rpc.js | 2 +-
.../chatInternalMessage.socket.js | 2 +-
server/api/chatInternalMessage/index.js | 2 +-
server/api/chatMessage/chatMessage.attributes.js | 2 +-
server/api/chatMessage/chatMessage.controller.js | 2 +-
server/api/chatMessage/chatMessage.events.js | 2 +-
server/api/chatMessage/chatMessage.model.js | 2 +-
server/api/chatMessage/chatMessage.rpc.js | 2 +-
server/api/chatMessage/chatMessage.socket.js | 2 +-
server/api/chatMessage/index.js | 2 +-
.../chatOfflineMessage.attributes.js | 2 +-
.../chatOfflineMessage.controller.js | 2 +-
.../chatOfflineMessage.events.js | 2 +-
.../chatOfflineMessage/chatOfflineMessage.model.js | 2 +-
.../chatOfflineMessage/chatOfflineMessage.rpc.js | 2 +-
server/api/chatOfflineMessage/index.js | 2 +-
.../chatProactiveAction.attributes.js | 2 +-
.../chatProactiveAction.controller.js | 2 +-
.../chatProactiveAction.model.js | 2 +-
.../chatProactiveAction/chatProactiveAction.rpc.js | 2 +-
server/api/chatProactiveAction/index.js | 2 +-
server/api/chatQueue/chatQueue.attributes.js | 2 +-
server/api/chatQueue/chatQueue.controller.js | 2 +-
server/api/chatQueue/chatQueue.events.js | 2 +-
server/api/chatQueue/chatQueue.model.js | 2 +-
server/api/chatQueue/chatQueue.rpc.js | 2 +-
server/api/chatQueue/chatQueue.socket.js | 2 +-
server/api/chatQueue/index.js | 2 +-
.../chatQueueReport/chatQueueReport.attributes.js | 2 +-
.../chatQueueReport/chatQueueReport.controller.js | 2 +-
.../api/chatQueueReport/chatQueueReport.model.js | 2 +-
server/api/chatQueueReport/chatQueueReport.rpc.js | 2 +-
server/api/chatQueueReport/index.js | 2 +-
.../chatTransferReport.attributes.js | 2 +-
.../chatTransferReport.controller.js | 2 +-
.../chatTransferReport/chatTransferReport.model.js | 2 +-
.../chatTransferReport/chatTransferReport.rpc.js | 2 +-
server/api/chatTransferReport/index.js | 2 +-
server/api/chatWebsite/chatWebsite.attributes.js | 2 +-
server/api/chatWebsite/chatWebsite.controller.js | 2 +-
server/api/chatWebsite/chatWebsite.events.js | 2 +-
server/api/chatWebsite/chatWebsite.model.js | 2 +-
server/api/chatWebsite/chatWebsite.rpc.js | 2 +-
server/api/chatWebsite/chatWebsite.socket.js | 2 +-
server/api/chatWebsite/index.js | 2 +-
server/api/client-side-logs.js | 2 +-
.../api/cloudProvider/cloudProvider.attributes.js | 2 +-
.../api/cloudProvider/cloudProvider.controller.js | 2 +-
server/api/cloudProvider/cloudProvider.model.js | 2 +-
server/api/cloudProvider/cloudProvider.oauth.js | 2 +-
server/api/cloudProvider/cloudProvider.rpc.js | 2 +-
server/api/cloudProvider/index.js | 2 +-
server/api/cmCompany/cmCompany.attributes.js | 2 +-
server/api/cmCompany/cmCompany.controller.js | 2 +-
server/api/cmCompany/cmCompany.model.js | 2 +-
server/api/cmCompany/cmCompany.rpc.js | 2 +-
server/api/cmCompany/index.js | 2 +-
server/api/cmContact/cmContact.attributes.js | 2 +-
server/api/cmContact/cmContact.controller.js | 2 +-
server/api/cmContact/cmContact.events.js | 2 +-
server/api/cmContact/cmContact.model.js | 2 +-
server/api/cmContact/cmContact.rpc.js | 2 +-
server/api/cmContact/cmContact.socket.js | 2 +-
server/api/cmContact/index.js | 2 +-
.../cmContactHasItem.attributes.js | 2 +-
.../cmContactHasItem.controller.js | 2 +-
.../api/cmContactHasItem/cmContactHasItem.model.js | 2 +-
.../api/cmContactHasItem/cmContactHasItem.rpc.js | 2 +-
server/api/cmContactHasItem/index.js | 2 +-
.../api/cmCustomField/cmCustomField.attributes.js | 2 +-
.../api/cmCustomField/cmCustomField.controller.js | 2 +-
server/api/cmCustomField/cmCustomField.model.js | 2 +-
server/api/cmCustomField/cmCustomField.rpc.js | 2 +-
server/api/cmCustomField/index.js | 2 +-
server/api/cmHopper/cmHopper.attributes.js | 2 +-
server/api/cmHopper/cmHopper.controller.js | 2 +-
server/api/cmHopper/cmHopper.model.js | 2 +-
server/api/cmHopper/cmHopper.rpc.js | 2 +-
server/api/cmHopper/index.js | 2 +-
.../cmHopperAdditionalPhone.attributes.js | 2 +-
.../cmHopperAdditionalPhone.controller.js | 2 +-
.../cmHopperAdditionalPhone.model.js | 2 +-
.../cmHopperAdditionalPhone.rpc.js | 2 +-
server/api/cmHopperAdditionalPhone/index.js | 2 +-
.../api/cmHopperBlack/cmHopperBlack.attributes.js | 2 +-
.../api/cmHopperBlack/cmHopperBlack.controller.js | 2 +-
server/api/cmHopperBlack/cmHopperBlack.model.js | 2 +-
server/api/cmHopperBlack/cmHopperBlack.rpc.js | 2 +-
server/api/cmHopperBlack/index.js | 2 +-
.../api/cmHopperFinal/cmHopperFinal.attributes.js | 2 +-
.../api/cmHopperFinal/cmHopperFinal.controller.js | 2 +-
server/api/cmHopperFinal/cmHopperFinal.model.js | 2 +-
server/api/cmHopperFinal/cmHopperFinal.rpc.js | 2 +-
server/api/cmHopperFinal/index.js | 2 +-
.../cmHopperHistory/cmHopperHistory.attributes.js | 2 +-
.../cmHopperHistory/cmHopperHistory.controller.js | 2 +-
.../api/cmHopperHistory/cmHopperHistory.model.js | 2 +-
server/api/cmHopperHistory/cmHopperHistory.rpc.js | 2 +-
server/api/cmHopperHistory/index.js | 2 +-
server/api/cmList/cmList.attributes.js | 2 +-
server/api/cmList/cmList.controller.js | 2 +-
server/api/cmList/cmList.events.js | 2 +-
server/api/cmList/cmList.model.js | 2 +-
server/api/cmList/cmList.rpc.js | 2 +-
server/api/cmList/cmList.socket.js | 2 +-
server/api/cmList/index.js | 2 +-
server/api/condition/condition.attributes.js | 2 +-
server/api/condition/condition.controller.js | 2 +-
server/api/condition/condition.model.js | 2 +-
server/api/condition/condition.rpc.js | 2 +-
server/api/condition/index.js | 2 +-
.../contactItemType/contactItemType.attributes.js | 2 +-
.../contactItemType/contactItemType.controller.js | 2 +-
.../api/contactItemType/contactItemType.model.js | 2 +-
server/api/contactItemType/contactItemType.rpc.js | 2 +-
server/api/contactItemType/index.js | 2 +-
server/api/dashboard/dashboard.attributes.js | 2 +-
server/api/dashboard/dashboard.controller.js | 2 +-
server/api/dashboard/dashboard.events.js | 2 +-
server/api/dashboard/dashboard.model.js | 2 +-
server/api/dashboard/dashboard.rpc.js | 2 +-
server/api/dashboard/dashboard.socket.js | 2 +-
server/api/dashboard/index.js | 2 +-
.../api/dashboardItem/dashboardItem.attributes.js | 2 +-
.../api/dashboardItem/dashboardItem.controller.js | 2 +-
server/api/dashboardItem/dashboardItem.events.js | 2 +-
server/api/dashboardItem/dashboardItem.model.js | 2 +-
server/api/dashboardItem/dashboardItem.rpc.js | 2 +-
server/api/dashboardItem/dashboardItem.socket.js | 2 +-
server/api/dashboardItem/index.js | 2 +-
server/api/disposition/disposition.attributes.js | 2 +-
server/api/disposition/disposition.controller.js | 2 +-
server/api/disposition/disposition.model.js | 2 +-
server/api/disposition/disposition.rpc.js | 2 +-
server/api/disposition/index.js | 2 +-
server/api/faxAccount/faxAccount.attributes.js | 2 +-
server/api/faxAccount/faxAccount.controller.js | 2 +-
server/api/faxAccount/faxAccount.events.js | 2 +-
server/api/faxAccount/faxAccount.model.js | 2 +-
server/api/faxAccount/faxAccount.rpc.js | 2 +-
server/api/faxAccount/faxAccount.socket.js | 2 +-
server/api/faxAccount/index.js | 2 +-
.../faxApplication/faxApplication.attributes.js | 2 +-
.../faxApplication/faxApplication.controller.js | 2 +-
server/api/faxApplication/faxApplication.model.js | 2 +-
server/api/faxApplication/faxApplication.rpc.js | 2 +-
server/api/faxApplication/index.js | 2 +-
.../faxInteraction/faxInteraction.attributes.js | 2 +-
.../faxInteraction/faxInteraction.controller.js | 2 +-
server/api/faxInteraction/faxInteraction.events.js | 2 +-
server/api/faxInteraction/faxInteraction.model.js | 2 +-
server/api/faxInteraction/faxInteraction.rpc.js | 2 +-
server/api/faxInteraction/faxInteraction.socket.js | 2 +-
server/api/faxInteraction/index.js | 2 +-
server/api/faxMessage/faxMessage.attributes.js | 2 +-
server/api/faxMessage/faxMessage.controller.js | 2 +-
server/api/faxMessage/faxMessage.events.js | 2 +-
server/api/faxMessage/faxMessage.model.js | 2 +-
server/api/faxMessage/faxMessage.rpc.js | 2 +-
server/api/faxMessage/faxMessage.socket.js | 2 +-
server/api/faxMessage/index.js | 2 +-
server/api/faxQueue/faxQueue.attributes.js | 2 +-
server/api/faxQueue/faxQueue.controller.js | 2 +-
server/api/faxQueue/faxQueue.events.js | 2 +-
server/api/faxQueue/faxQueue.model.js | 2 +-
server/api/faxQueue/faxQueue.rpc.js | 2 +-
server/api/faxQueue/faxQueue.socket.js | 2 +-
server/api/faxQueue/index.js | 2 +-
.../faxQueueReport/faxQueueReport.attributes.js | 2 +-
.../faxQueueReport/faxQueueReport.controller.js | 2 +-
server/api/faxQueueReport/faxQueueReport.model.js | 2 +-
server/api/faxQueueReport/faxQueueReport.rpc.js | 2 +-
server/api/faxQueueReport/index.js | 2 +-
.../faxTransferReport.attributes.js | 2 +-
.../faxTransferReport.controller.js | 2 +-
.../faxTransferReport/faxTransferReport.model.js | 2 +-
.../api/faxTransferReport/faxTransferReport.rpc.js | 2 +-
server/api/faxTransferReport/index.js | 2 +-
server/api/intDeskAccount/index.js | 2 +-
.../intDeskAccount/intDeskAccount.attributes.js | 2 +-
.../intDeskAccount/intDeskAccount.controller.js | 2 +-
server/api/intDeskAccount/intDeskAccount.model.js | 2 +-
server/api/intDeskAccount/intDeskAccount.rpc.js | 2 +-
server/api/intDeskConfiguration/index.js | 2 +-
.../intDeskConfiguration.attributes.js | 2 +-
.../intDeskConfiguration.controller.js | 2 +-
.../intDeskConfiguration.model.js | 2 +-
.../intDeskConfiguration.rpc.js | 2 +-
server/api/intDeskField/index.js | 2 +-
server/api/intDeskField/intDeskField.attributes.js | 2 +-
server/api/intDeskField/intDeskField.controller.js | 2 +-
server/api/intDeskField/intDeskField.model.js | 2 +-
server/api/intDeskField/intDeskField.rpc.js | 2 +-
server/api/intDynamics365Account/index.js | 2 +-
.../intDynamics365Account.attributes.js | 2 +-
.../intDynamics365Account.controller.js | 2 +-
.../intDynamics365Account.model.js | 2 +-
.../intDynamics365Account.rpc.js | 2 +-
server/api/intDynamics365Configuration/index.js | 2 +-
.../intDynamics365Configuration.attributes.js | 2 +-
.../intDynamics365Configuration.controller.js | 2 +-
.../intDynamics365Configuration.model.js | 2 +-
.../intDynamics365Configuration.rpc.js | 2 +-
server/api/intDynamics365Field/index.js | 2 +-
.../intDynamics365Field.attributes.js | 2 +-
.../intDynamics365Field.controller.js | 2 +-
.../intDynamics365Field.model.js | 2 +-
.../intDynamics365Field/intDynamics365Field.rpc.js | 2 +-
server/api/intFreshdeskAccount/index.js | 2 +-
.../intFreshdeskAccount.attributes.js | 2 +-
.../intFreshdeskAccount.controller.js | 2 +-
.../intFreshdeskAccount.model.js | 2 +-
.../intFreshdeskAccount/intFreshdeskAccount.rpc.js | 2 +-
server/api/intFreshdeskConfiguration/index.js | 2 +-
.../intFreshdeskConfiguration.attributes.js | 2 +-
.../intFreshdeskConfiguration.controller.js | 2 +-
.../intFreshdeskConfiguration.model.js | 2 +-
.../intFreshdeskConfiguration.rpc.js | 2 +-
server/api/intFreshdeskField/index.js | 2 +-
.../intFreshdeskField.attributes.js | 2 +-
.../intFreshdeskField.controller.js | 2 +-
.../intFreshdeskField/intFreshdeskField.model.js | 2 +-
.../api/intFreshdeskField/intFreshdeskField.rpc.js | 2 +-
server/api/intFreshsalesAccount/index.js | 2 +-
.../intFreshsalesAccount.attributes.js | 2 +-
.../intFreshsalesAccount.controller.js | 2 +-
.../intFreshsalesAccount.model.js | 2 +-
.../intFreshsalesAccount.rpc.js | 2 +-
server/api/intFreshsalesConfiguration/index.js | 2 +-
.../intFreshsalesConfiguration.attributes.js | 2 +-
.../intFreshsalesConfiguration.controller.js | 2 +-
.../intFreshsalesConfiguration.model.js | 2 +-
.../intFreshsalesConfiguration.rpc.js | 2 +-
server/api/intFreshsalesField/index.js | 2 +-
.../intFreshsalesField.attributes.js | 2 +-
.../intFreshsalesField.controller.js | 2 +-
.../intFreshsalesField/intFreshsalesField.model.js | 2 +-
.../intFreshsalesField/intFreshsalesField.rpc.js | 2 +-
server/api/intSalesforceAccount/index.js | 2 +-
.../intSalesforceAccount.attributes.js | 2 +-
.../intSalesforceAccount.controller.js | 2 +-
.../intSalesforceAccount.model.js | 2 +-
.../intSalesforceAccount.rpc.js | 2 +-
server/api/intSalesforceConfiguration/index.js | 2 +-
.../intSalesforceConfiguration.attributes.js | 2 +-
.../intSalesforceConfiguration.controller.js | 2 +-
.../intSalesforceConfiguration.model.js | 2 +-
.../intSalesforceConfiguration.rpc.js | 2 +-
server/api/intSalesforceField/index.js | 2 +-
.../intSalesforceField.attributes.js | 2 +-
.../intSalesforceField.controller.js | 2 +-
.../intSalesforceField/intSalesforceField.model.js | 2 +-
.../intSalesforceField/intSalesforceField.rpc.js | 2 +-
server/api/intServicenowAccount/index.js | 2 +-
.../intServicenowAccount.attributes.js | 2 +-
.../intServicenowAccount.controller.js | 2 +-
.../intServicenowAccount.model.js | 2 +-
.../intServicenowAccount.rpc.js | 2 +-
server/api/intServicenowConfiguration/index.js | 2 +-
.../intServicenowConfiguration.attributes.js | 2 +-
.../intServicenowConfiguration.controller.js | 2 +-
.../intServicenowConfiguration.model.js | 2 +-
.../intServicenowConfiguration.rpc.js | 2 +-
server/api/intServicenowField/index.js | 2 +-
.../intServicenowField.attributes.js | 2 +-
.../intServicenowField.controller.js | 2 +-
.../intServicenowField/intServicenowField.model.js | 2 +-
.../intServicenowField/intServicenowField.rpc.js | 2 +-
server/api/intSugarcrmAccount/index.js | 2 +-
.../intSugarcrmAccount.attributes.js | 2 +-
.../intSugarcrmAccount.controller.js | 2 +-
.../intSugarcrmAccount/intSugarcrmAccount.model.js | 2 +-
.../intSugarcrmAccount/intSugarcrmAccount.rpc.js | 2 +-
server/api/intSugarcrmConfiguration/index.js | 2 +-
.../intSugarcrmConfiguration.attributes.js | 2 +-
.../intSugarcrmConfiguration.controller.js | 2 +-
.../intSugarcrmConfiguration.model.js | 2 +-
.../intSugarcrmConfiguration.rpc.js | 2 +-
server/api/intSugarcrmField/index.js | 2 +-
.../intSugarcrmField.attributes.js | 2 +-
.../intSugarcrmField.controller.js | 2 +-
.../api/intSugarcrmField/intSugarcrmField.model.js | 2 +-
.../api/intSugarcrmField/intSugarcrmField.rpc.js | 2 +-
server/api/intVtigerAccount/index.js | 2 +-
.../intVtigerAccount.attributes.js | 2 +-
.../intVtigerAccount.controller.js | 2 +-
.../api/intVtigerAccount/intVtigerAccount.model.js | 2 +-
.../api/intVtigerAccount/intVtigerAccount.rpc.js | 2 +-
server/api/intVtigerConfiguration/index.js | 2 +-
.../intVtigerConfiguration.attributes.js | 2 +-
.../intVtigerConfiguration.controller.js | 2 +-
.../intVtigerConfiguration.model.js | 2 +-
.../intVtigerConfiguration.rpc.js | 2 +-
server/api/intVtigerField/index.js | 2 +-
.../intVtigerField/intVtigerField.attributes.js | 2 +-
.../intVtigerField/intVtigerField.controller.js | 2 +-
server/api/intVtigerField/intVtigerField.model.js | 2 +-
server/api/intVtigerField/intVtigerField.rpc.js | 2 +-
server/api/intZendeskAccount/index.js | 2 +-
.../intZendeskAccount.attributes.js | 2 +-
.../intZendeskAccount.controller.js | 2 +-
.../intZendeskAccount/intZendeskAccount.model.js | 2 +-
.../api/intZendeskAccount/intZendeskAccount.rpc.js | 2 +-
server/api/intZendeskConfiguration/index.js | 2 +-
.../intZendeskConfiguration.attributes.js | 2 +-
.../intZendeskConfiguration.controller.js | 2 +-
.../intZendeskConfiguration.model.js | 2 +-
.../intZendeskConfiguration.rpc.js | 2 +-
server/api/intZendeskField/index.js | 2 +-
.../intZendeskField/intZendeskField.attributes.js | 2 +-
.../intZendeskField/intZendeskField.controller.js | 2 +-
.../api/intZendeskField/intZendeskField.model.js | 2 +-
server/api/intZendeskField/intZendeskField.rpc.js | 2 +-
server/api/intZohoAccount/index.js | 2 +-
.../intZohoAccount/intZohoAccount.attributes.js | 2 +-
.../intZohoAccount/intZohoAccount.controller.js | 2 +-
server/api/intZohoAccount/intZohoAccount.model.js | 2 +-
server/api/intZohoAccount/intZohoAccount.rpc.js | 2 +-
server/api/intZohoConfiguration/index.js | 2 +-
.../intZohoConfiguration.attributes.js | 2 +-
.../intZohoConfiguration.controller.js | 2 +-
.../intZohoConfiguration.model.js | 2 +-
.../intZohoConfiguration.rpc.js | 2 +-
server/api/intZohoField/index.js | 2 +-
server/api/intZohoField/intZohoField.attributes.js | 2 +-
server/api/intZohoField/intZohoField.controller.js | 2 +-
server/api/intZohoField/intZohoField.model.js | 2 +-
server/api/intZohoField/intZohoField.rpc.js | 2 +-
server/api/integration/index.js | 2 +-
server/api/integration/integration.attributes.js | 2 +-
server/api/integration/integration.controller.js | 2 +-
server/api/integration/integration.model.js | 2 +-
server/api/integration/integration.rpc.js | 2 +-
server/api/integrationReport/index.js | 2 +-
.../integrationReport.attributes.js | 2 +-
.../integrationReport.controller.js | 2 +-
.../integrationReport/integrationReport.model.js | 2 +-
.../api/integrationReport/integrationReport.rpc.js | 2 +-
server/api/interval/index.js | 2 +-
server/api/interval/interval.attributes.js | 2 +-
server/api/interval/interval.controller.js | 2 +-
server/api/interval/interval.model.js | 2 +-
server/api/interval/interval.rpc.js | 2 +-
server/api/jira/index.js | 2 +-
server/api/jira/jira.controller.js | 2 +-
server/api/jscriptyAnswerReport/index.js | 2 +-
.../jscriptyAnswerReport.attributes.js | 2 +-
.../jscriptyAnswerReport.controller.js | 2 +-
.../jscriptyAnswerReport.model.js | 2 +-
.../jscriptyAnswerReport.rpc.js | 2 +-
server/api/jscriptyProject/index.js | 2 +-
.../jscriptyProject/jscriptyProject.attributes.js | 2 +-
.../jscriptyProject/jscriptyProject.controller.js | 2 +-
.../api/jscriptyProject/jscriptyProject.model.js | 2 +-
server/api/jscriptyProject/jscriptyProject.rpc.js | 2 +-
server/api/jscriptyQuestionReport/index.js | 2 +-
.../jscriptyQuestionReport.attributes.js | 2 +-
.../jscriptyQuestionReport.controller.js | 2 +-
.../jscriptyQuestionReport.model.js | 2 +-
.../jscriptyQuestionReport.rpc.js | 2 +-
server/api/jscriptySessionReport/index.js | 2 +-
.../jscriptySessionReport.attributes.js | 2 +-
.../jscriptySessionReport.controller.js | 2 +-
.../jscriptySessionReport.model.js | 2 +-
.../jscriptySessionReport.rpc.js | 2 +-
server/api/license/index.js | 2 +-
server/api/license/license.attributes.js | 2 +-
server/api/license/license.controller.js | 2 +-
server/api/license/license.model.js | 2 +-
server/api/license/license.rpc.js | 2 +-
server/api/mailAccount/index.js | 2 +-
server/api/mailAccount/mailAccount.attributes.js | 2 +-
server/api/mailAccount/mailAccount.controller.js | 2 +-
server/api/mailAccount/mailAccount.events.js | 2 +-
server/api/mailAccount/mailAccount.model.js | 2 +-
server/api/mailAccount/mailAccount.rpc.js | 2 +-
server/api/mailAccount/mailAccount.socket.js | 2 +-
server/api/mailApplication/index.js | 2 +-
.../mailApplication/mailApplication.attributes.js | 2 +-
.../mailApplication/mailApplication.controller.js | 2 +-
.../api/mailApplication/mailApplication.model.js | 2 +-
server/api/mailApplication/mailApplication.rpc.js | 2 +-
server/api/mailInteraction/index.js | 2 +-
.../mailInteraction/mailInteraction.attributes.js | 2 +-
.../mailInteraction/mailInteraction.controller.js | 2 +-
.../api/mailInteraction/mailInteraction.events.js | 2 +-
.../api/mailInteraction/mailInteraction.model.js | 2 +-
server/api/mailInteraction/mailInteraction.rpc.js | 2 +-
.../api/mailInteraction/mailInteraction.socket.js | 2 +-
server/api/mailMessage/index.js | 2 +-
server/api/mailMessage/mailMessage.attributes.js | 2 +-
server/api/mailMessage/mailMessage.controller.js | 2 +-
server/api/mailMessage/mailMessage.events.js | 2 +-
server/api/mailMessage/mailMessage.model.js | 2 +-
server/api/mailMessage/mailMessage.rpc.js | 2 +-
server/api/mailMessage/mailMessage.socket.js | 2 +-
server/api/mailQueue/index.js | 2 +-
server/api/mailQueue/mailQueue.attributes.js | 2 +-
server/api/mailQueue/mailQueue.controller.js | 2 +-
server/api/mailQueue/mailQueue.events.js | 2 +-
server/api/mailQueue/mailQueue.model.js | 2 +-
server/api/mailQueue/mailQueue.rpc.js | 2 +-
server/api/mailQueue/mailQueue.socket.js | 2 +-
server/api/mailQueueReport/index.js | 2 +-
.../mailQueueReport/mailQueueReport.attributes.js | 2 +-
.../mailQueueReport/mailQueueReport.controller.js | 2 +-
.../api/mailQueueReport/mailQueueReport.model.js | 2 +-
server/api/mailQueueReport/mailQueueReport.rpc.js | 2 +-
server/api/mailServerIn/index.js | 2 +-
server/api/mailServerIn/mailServerIn.attributes.js | 2 +-
server/api/mailServerIn/mailServerIn.model.js | 2 +-
server/api/mailServerIn/mailServerIn.rpc.js | 2 +-
server/api/mailServerOut/index.js | 2 +-
.../api/mailServerOut/mailServerOut.attributes.js | 2 +-
.../api/mailServerOut/mailServerOut.controller.js | 2 +-
server/api/mailServerOut/mailServerOut.model.js | 2 +-
server/api/mailServerOut/mailServerOut.rpc.js | 2 +-
server/api/mailSubstatus/index.js | 2 +-
.../api/mailSubstatus/mailSubstatus.attributes.js | 2 +-
.../api/mailSubstatus/mailSubstatus.controller.js | 2 +-
server/api/mailSubstatus/mailSubstatus.events.js | 2 +-
server/api/mailSubstatus/mailSubstatus.model.js | 2 +-
server/api/mailSubstatus/mailSubstatus.rpc.js | 2 +-
server/api/mailTransferReport/index.js | 2 +-
.../mailTransferReport.attributes.js | 2 +-
.../mailTransferReport.controller.js | 2 +-
.../mailTransferReport/mailTransferReport.model.js | 2 +-
.../mailTransferReport/mailTransferReport.rpc.js | 2 +-
server/api/memberReport/index.js | 2 +-
server/api/memberReport/memberReport.attributes.js | 2 +-
server/api/memberReport/memberReport.controller.js | 2 +-
server/api/memberReport/memberReport.model.js | 2 +-
server/api/memberReport/memberReport.rpc.js | 2 +-
server/api/migration/index.js | 2 +-
server/api/migration/migration.attributes.js | 2 +-
server/api/migration/migration.controller.js | 2 +-
server/api/migration/migration.model.js | 2 +-
server/api/migration/migration.rpc.js | 2 +-
server/api/network/index.js | 2 +-
server/api/network/network.attributes.js | 2 +-
server/api/network/network.controller.js | 2 +-
server/api/network/network.model.js | 2 +-
server/api/network/network.rpc.js | 2 +-
server/api/openchannelAccount/index.js | 2 +-
.../openchannelAccount.attributes.js | 2 +-
.../openchannelAccount.controller.js | 2 +-
.../openchannelAccount.events.js | 2 +-
.../openchannelAccount/openchannelAccount.model.js | 2 +-
.../openchannelAccount/openchannelAccount.rpc.js | 2 +-
.../openchannelAccount.socket.js | 2 +-
server/api/openchannelApplication/index.js | 2 +-
.../openchannelApplication.attributes.js | 2 +-
.../openchannelApplication.controller.js | 2 +-
.../openchannelApplication.model.js | 2 +-
.../openchannelApplication.rpc.js | 2 +-
server/api/openchannelInteraction/index.js | 2 +-
.../openchannelInteraction.attributes.js | 2 +-
.../openchannelInteraction.controller.js | 2 +-
.../openchannelInteraction.events.js | 2 +-
.../openchannelInteraction.model.js | 2 +-
.../openchannelInteraction.rpc.js | 2 +-
.../openchannelInteraction.socket.js | 2 +-
server/api/openchannelMessage/index.js | 2 +-
.../openchannelMessage.attributes.js | 2 +-
.../openchannelMessage.controller.js | 2 +-
.../openchannelMessage.events.js | 2 +-
.../openchannelMessage/openchannelMessage.model.js | 2 +-
.../openchannelMessage/openchannelMessage.rpc.js | 2 +-
.../openchannelMessage.socket.js | 2 +-
server/api/openchannelQueue/index.js | 2 +-
.../openchannelQueue.attributes.js | 2 +-
.../openchannelQueue.controller.js | 2 +-
.../openchannelQueue/openchannelQueue.events.js | 2 +-
.../api/openchannelQueue/openchannelQueue.model.js | 2 +-
.../api/openchannelQueue/openchannelQueue.rpc.js | 2 +-
.../openchannelQueue/openchannelQueue.socket.js | 2 +-
server/api/openchannelQueueReport/index.js | 2 +-
.../openchannelQueueReport.attributes.js | 2 +-
.../openchannelQueueReport.controller.js | 2 +-
.../openchannelQueueReport.model.js | 2 +-
.../openchannelQueueReport.rpc.js | 2 +-
server/api/openchannelTransferReport/index.js | 2 +-
.../openchannelTransferReport.attributes.js | 2 +-
.../openchannelTransferReport.controller.js | 2 +-
.../openchannelTransferReport.model.js | 2 +-
.../openchannelTransferReport.rpc.js | 2 +-
server/api/pause/index.js | 2 +-
server/api/pause/pause.attributes.js | 2 +-
server/api/pause/pause.controller.js | 2 +-
server/api/pause/pause.model.js | 2 +-
server/api/pause/pause.rpc.js | 2 +-
server/api/plugin/index.js | 2 +-
server/api/plugin/plugin.attributes.js | 2 +-
server/api/plugin/plugin.controller.js | 2 +-
server/api/plugin/plugin.events.js | 2 +-
server/api/plugin/plugin.model.js | 2 +-
server/api/plugin/plugin.rpc.js | 2 +-
server/api/plugin/plugin.socket.js | 2 +-
server/api/pm2/index.js | 2 +-
server/api/pm2/pm2.controller.js | 2 +-
server/api/realtime/index.js | 2 +-
server/api/realtime/realtime.controller.js | 2 +-
server/api/reportAgentPreview/index.js | 2 +-
.../reportAgentPreview.attributes.js | 2 +-
.../reportAgentPreview/reportAgentPreview.model.js | 2 +-
.../reportAgentPreview/reportAgentPreview.rpc.js | 2 +-
server/api/rpc/index.js | 2 +-
server/api/rpc/rpc.controller.js | 2 +-
server/api/schedule/index.js | 2 +-
server/api/schedule/schedule.attributes.js | 2 +-
server/api/schedule/schedule.controller.js | 2 +-
server/api/schedule/schedule.model.js | 2 +-
server/api/schedule/schedule.rpc.js | 2 +-
server/api/screenRecording/index.js | 2 +-
.../screenRecording/screenRecording.attributes.js | 2 +-
.../screenRecording/screenRecording.controller.js | 2 +-
.../api/screenRecording/screenRecording.model.js | 2 +-
server/api/screenRecording/screenRecording.rpc.js | 2 +-
server/api/setting/index.js | 2 +-
server/api/setting/setting.attributes.js | 2 +-
server/api/setting/setting.controller.js | 2 +-
server/api/setting/setting.model.js | 2 +-
server/api/setting/setting.rpc.js | 2 +-
server/api/smsAccount/index.js | 2 +-
server/api/smsAccount/smsAccount.attributes.js | 2 +-
server/api/smsAccount/smsAccount.controller.js | 2 +-
server/api/smsAccount/smsAccount.events.js | 2 +-
server/api/smsAccount/smsAccount.model.js | 2 +-
server/api/smsAccount/smsAccount.rpc.js | 2 +-
server/api/smsAccount/smsAccount.socket.js | 2 +-
server/api/smsApplication/index.js | 2 +-
.../smsApplication/smsApplication.attributes.js | 2 +-
.../smsApplication/smsApplication.controller.js | 2 +-
server/api/smsApplication/smsApplication.model.js | 2 +-
server/api/smsApplication/smsApplication.rpc.js | 2 +-
server/api/smsInteraction/index.js | 2 +-
.../smsInteraction/smsInteraction.attributes.js | 2 +-
.../smsInteraction/smsInteraction.controller.js | 2 +-
server/api/smsInteraction/smsInteraction.events.js | 2 +-
server/api/smsInteraction/smsInteraction.model.js | 2 +-
server/api/smsInteraction/smsInteraction.rpc.js | 2 +-
server/api/smsInteraction/smsInteraction.socket.js | 2 +-
server/api/smsMessage/index.js | 2 +-
server/api/smsMessage/smsMessage.attributes.js | 2 +-
server/api/smsMessage/smsMessage.controller.js | 2 +-
server/api/smsMessage/smsMessage.events.js | 2 +-
server/api/smsMessage/smsMessage.model.js | 2 +-
server/api/smsMessage/smsMessage.rpc.js | 2 +-
server/api/smsMessage/smsMessage.socket.js | 2 +-
server/api/smsQueue/index.js | 2 +-
server/api/smsQueue/smsQueue.attributes.js | 2 +-
server/api/smsQueue/smsQueue.controller.js | 2 +-
server/api/smsQueue/smsQueue.events.js | 2 +-
server/api/smsQueue/smsQueue.model.js | 2 +-
server/api/smsQueue/smsQueue.rpc.js | 2 +-
server/api/smsQueue/smsQueue.socket.js | 2 +-
server/api/smsQueueReport/index.js | 2 +-
.../smsQueueReport/smsQueueReport.attributes.js | 2 +-
.../smsQueueReport/smsQueueReport.controller.js | 2 +-
server/api/smsQueueReport/smsQueueReport.model.js | 2 +-
server/api/smsQueueReport/smsQueueReport.rpc.js | 2 +-
server/api/smsTransferReport/index.js | 2 +-
.../smsTransferReport.attributes.js | 2 +-
.../smsTransferReport.controller.js | 2 +-
.../smsTransferReport/smsTransferReport.model.js | 2 +-
.../api/smsTransferReport/smsTransferReport.rpc.js | 2 +-
server/api/sound/index.js | 2 +-
server/api/sound/sound.attributes.js | 2 +-
server/api/sound/sound.controller.js | 2 +-
server/api/sound/sound.model.js | 2 +-
server/api/sound/sound.rpc.js | 2 +-
server/api/squareMessage/index.js | 2 +-
.../api/squareMessage/squareMessage.attributes.js | 2 +-
.../api/squareMessage/squareMessage.controller.js | 2 +-
server/api/squareMessage/squareMessage.model.js | 2 +-
server/api/squareMessage/squareMessage.rpc.js | 2 +-
server/api/squareOdbc/index.js | 2 +-
server/api/squareOdbc/squareOdbc.attributes.js | 2 +-
server/api/squareOdbc/squareOdbc.controller.js | 2 +-
server/api/squareOdbc/squareOdbc.model.js | 2 +-
server/api/squareOdbc/squareOdbc.rpc.js | 2 +-
server/api/squareProject/index.js | 2 +-
.../api/squareProject/squareProject.attributes.js | 2 +-
.../api/squareProject/squareProject.controller.js | 2 +-
server/api/squareProject/squareProject.events.js | 2 +-
server/api/squareProject/squareProject.model.js | 2 +-
server/api/squareProject/squareProject.rpc.js | 2 +-
server/api/squareProject/squareProject.socket.js | 2 +-
server/api/squareRecording/index.js | 2 +-
.../squareRecording/squareRecording.attributes.js | 2 +-
.../squareRecording/squareRecording.controller.js | 2 +-
.../api/squareRecording/squareRecording.model.js | 2 +-
server/api/squareRecording/squareRecording.rpc.js | 2 +-
server/api/squareReport/index.js | 2 +-
server/api/squareReport/squareReport.attributes.js | 2 +-
server/api/squareReport/squareReport.controller.js | 2 +-
server/api/squareReport/squareReport.model.js | 2 +-
server/api/squareReport/squareReport.rpc.js | 2 +-
server/api/squareReportDetail/index.js | 2 +-
.../squareReportDetail.attributes.js | 2 +-
.../squareReportDetail.controller.js | 2 +-
.../squareReportDetail/squareReportDetail.model.js | 2 +-
.../squareReportDetail/squareReportDetail.rpc.js | 2 +-
server/api/system/index.js | 2 +-
server/api/system/system.controller.js | 2 +-
server/api/tag/index.js | 2 +-
server/api/tag/tag.attributes.js | 2 +-
server/api/tag/tag.controller.js | 2 +-
server/api/tag/tag.model.js | 2 +-
server/api/tag/tag.rpc.js | 2 +-
server/api/team/index.js | 2 +-
server/api/team/team.attributes.js | 2 +-
server/api/team/team.controller.js | 2 +-
server/api/team/team.events.js | 2 +-
server/api/team/team.model.js | 2 +-
server/api/team/team.rpc.js | 2 +-
server/api/team/team.socket.js | 2 +-
.../teamVoicePrefix/teamVoicePrefix.attributes.js | 2 +-
.../api/teamVoicePrefix/teamVoicePrefix.model.js | 2 +-
server/api/teamVoiceQueue/index.js | 2 +-
.../teamVoiceQueue/teamVoiceQueue.attributes.js | 2 +-
server/api/teamVoiceQueue/teamVoiceQueue.model.js | 2 +-
server/api/teamVoiceQueue/teamVoiceQueue.rpc.js | 2 +-
server/api/template/index.js | 2 +-
server/api/template/template.attributes.js | 2 +-
server/api/template/template.controller.js | 2 +-
server/api/template/template.model.js | 2 +-
server/api/template/template.rpc.js | 2 +-
server/api/trigger/index.js | 2 +-
server/api/trigger/trigger.attributes.js | 2 +-
server/api/trigger/trigger.controller.js | 2 +-
server/api/trigger/trigger.model.js | 2 +-
server/api/trigger/trigger.rpc.js | 2 +-
server/api/trunk/index.js | 2 +-
server/api/trunk/trunk.attributes.js | 2 +-
server/api/trunk/trunk.controller.js | 2 +-
server/api/trunk/trunk.model.js | 2 +-
server/api/trunk/trunk.rpc.js | 2 +-
server/api/user-setting/index.js | 2 +-
server/api/user-setting/user-setting.attributes.js | 2 +-
server/api/user-setting/user-setting.controller.js | 2 +-
server/api/user-setting/user-setting.events.js | 2 +-
server/api/user-setting/user-setting.model.js | 2 +-
server/api/user-setting/user-setting.socket.js | 2 +-
server/api/user/index.js | 2 +-
server/api/user/user.attributes.js | 2 +-
server/api/user/user.controller.js | 2 +-
server/api/user/user.events.js | 2 +-
server/api/user/user.model.js | 2 +-
server/api/user/user.rpc.js | 2 +-
server/api/user/user.socket.js | 2 +-
server/api/userChatQueue/index.js | 2 +-
.../api/userChatQueue/userChatQueue.attributes.js | 2 +-
server/api/userChatQueue/userChatQueue.model.js | 2 +-
server/api/userChatQueue/userChatQueue.rpc.js | 2 +-
server/api/userFaxQueue/index.js | 2 +-
server/api/userFaxQueue/userFaxQueue.attributes.js | 2 +-
server/api/userFaxQueue/userFaxQueue.model.js | 2 +-
server/api/userFaxQueue/userFaxQueue.rpc.js | 2 +-
server/api/userMailQueue/index.js | 2 +-
.../api/userMailQueue/userMailQueue.attributes.js | 2 +-
server/api/userMailQueue/userMailQueue.model.js | 2 +-
server/api/userMailQueue/userMailQueue.rpc.js | 2 +-
server/api/userNotification/index.js | 2 +-
.../userNotification.attributes.js | 2 +-
.../userNotification.controller.js | 2 +-
.../userNotification/userNotification.events.js | 2 +-
.../api/userNotification/userNotification.model.js | 2 +-
.../api/userNotification/userNotification.rpc.js | 2 +-
.../userNotification/userNotification.socket.js | 2 +-
server/api/userOpenchannelQueue/index.js | 2 +-
.../userOpenchannelQueue.attributes.js | 2 +-
.../userOpenchannelQueue.model.js | 2 +-
.../userOpenchannelQueue.rpc.js | 2 +-
server/api/userProfile/index.js | 2 +-
server/api/userProfile/userProfile.attributes.js | 2 +-
server/api/userProfile/userProfile.controller.js | 2 +-
server/api/userProfile/userProfile.events.js | 2 +-
server/api/userProfile/userProfile.model.js | 2 +-
server/api/userProfile/userProfile.rpc.js | 2 +-
server/api/userProfile/userProfile.socket.js | 2 +-
server/api/userProfileResource/index.js | 2 +-
.../userProfileResource.attributes.js | 2 +-
.../userProfileResource.controller.js | 2 +-
.../userProfileResource.model.js | 2 +-
.../userProfileResource/userProfileResource.rpc.js | 2 +-
server/api/userProfileSection/index.js | 2 +-
.../userProfileSection.attributes.js | 2 +-
.../userProfileSection.controller.js | 2 +-
.../userProfileSection/userProfileSection.model.js | 2 +-
.../userProfileSection/userProfileSection.rpc.js | 2 +-
server/api/userSmsQueue/index.js | 2 +-
server/api/userSmsQueue/userSmsQueue.attributes.js | 2 +-
server/api/userSmsQueue/userSmsQueue.model.js | 2 +-
server/api/userSmsQueue/userSmsQueue.rpc.js | 2 +-
.../userVoicePrefix/userVoicePrefix.attributes.js | 2 +-
.../api/userVoicePrefix/userVoicePrefix.model.js | 2 +-
server/api/userVoiceQueue/index.js | 2 +-
.../userVoiceQueue/userVoiceQueue.attributes.js | 2 +-
server/api/userVoiceQueue/userVoiceQueue.model.js | 2 +-
server/api/userVoiceQueue/userVoiceQueue.rpc.js | 2 +-
server/api/userVoiceQueueRt/index.js | 2 +-
.../userVoiceQueueRt.attributes.js | 2 +-
.../userVoiceQueueRt/userVoiceQueueRt.events.js | 2 +-
.../api/userVoiceQueueRt/userVoiceQueueRt.model.js | 2 +-
.../api/userVoiceQueueRt/userVoiceQueueRt.rpc.js | 2 +-
.../userVoiceQueueRt/userVoiceQueueRt.socket.js | 2 +-
server/api/userWhatsappQueue/index.js | 2 +-
.../userWhatsappQueue.attributes.js | 2 +-
.../userWhatsappQueue/userWhatsappQueue.model.js | 2 +-
.../api/userWhatsappQueue/userWhatsappQueue.rpc.js | 2 +-
server/api/variable/index.js | 2 +-
server/api/variable/variable.attributes.js | 2 +-
server/api/variable/variable.controller.js | 2 +-
server/api/variable/variable.model.js | 2 +-
server/api/variable/variable.rpc.js | 2 +-
server/api/version/index.js | 2 +-
server/api/version/version.controller.js | 2 +-
server/api/voiceAgentReport/index.js | 2 +-
.../voiceAgentReport.attributes.js | 2 +-
.../voiceAgentReport.controller.js | 2 +-
.../api/voiceAgentReport/voiceAgentReport.model.js | 2 +-
.../api/voiceAgentReport/voiceAgentReport.rpc.js | 2 +-
server/api/voiceCallReport/index.js | 2 +-
.../voiceCallReport/voiceCallReport.attributes.js | 2 +-
.../voiceCallReport/voiceCallReport.controller.js | 2 +-
.../api/voiceCallReport/voiceCallReport.model.js | 2 +-
server/api/voiceCallReport/voiceCallReport.rpc.js | 2 +-
server/api/voiceChanSpy/index.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.attributes.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.controller.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.model.js | 2 +-
server/api/voiceChanSpy/voiceChanSpy.rpc.js | 2 +-
server/api/voiceContext/index.js | 2 +-
server/api/voiceContext/voiceContext.attributes.js | 2 +-
server/api/voiceContext/voiceContext.controller.js | 2 +-
server/api/voiceContext/voiceContext.model.js | 2 +-
server/api/voiceContext/voiceContext.rpc.js | 2 +-
server/api/voiceDialReport/index.js | 2 +-
.../voiceDialReport/voiceDialReport.attributes.js | 2 +-
.../voiceDialReport/voiceDialReport.controller.js | 2 +-
.../api/voiceDialReport/voiceDialReport.model.js | 2 +-
server/api/voiceDialReport/voiceDialReport.rpc.js | 2 +-
server/api/voiceExtension/index.js | 2 +-
.../voiceExtension/voiceExtension.attributes.js | 2 +-
.../voiceExtension/voiceExtension.controller.js | 2 +-
server/api/voiceExtension/voiceExtension.events.js | 2 +-
server/api/voiceExtension/voiceExtension.model.js | 2 +-
server/api/voiceExtension/voiceExtension.rpc.js | 2 +-
server/api/voiceExtension/voiceExtension.socket.js | 2 +-
server/api/voiceMail/index.js | 2 +-
server/api/voiceMail/voiceMail.attributes.js | 2 +-
server/api/voiceMail/voiceMail.controller.js | 2 +-
server/api/voiceMail/voiceMail.model.js | 2 +-
server/api/voiceMail/voiceMail.rpc.js | 2 +-
server/api/voiceMailMessage/index.js | 2 +-
.../voiceMailMessage.attributes.js | 2 +-
.../voiceMailMessage.controller.js | 2 +-
.../api/voiceMailMessage/voiceMailMessage.model.js | 2 +-
.../api/voiceMailMessage/voiceMailMessage.rpc.js | 2 +-
server/api/voiceMusicOnHold/index.js | 2 +-
.../voiceMusicOnHold.attributes.js | 2 +-
.../voiceMusicOnHold.controller.js | 2 +-
.../api/voiceMusicOnHold/voiceMusicOnHold.model.js | 2 +-
.../api/voiceMusicOnHold/voiceMusicOnHold.rpc.js | 2 +-
server/api/voicePrefix/index.js | 2 +-
server/api/voicePrefix/voicePrefix.attributes.js | 2 +-
server/api/voicePrefix/voicePrefix.controller.js | 2 +-
server/api/voicePrefix/voicePrefix.events.js | 2 +-
server/api/voicePrefix/voicePrefix.model.js | 2 +-
server/api/voicePrefix/voicePrefix.rpc.js | 2 +-
server/api/voicePrefix/voicePrefix.socket.js | 2 +-
server/api/voiceQueue/index.js | 2 +-
server/api/voiceQueue/voiceQueue.attributes.js | 2 +-
server/api/voiceQueue/voiceQueue.controller.js | 2 +-
server/api/voiceQueue/voiceQueue.events.js | 2 +-
server/api/voiceQueue/voiceQueue.model.js | 2 +-
server/api/voiceQueue/voiceQueue.rpc.js | 2 +-
server/api/voiceQueue/voiceQueue.socket.js | 2 +-
server/api/voiceQueueReport/index.js | 2 +-
.../voiceQueueReport.attributes.js | 2 +-
.../voiceQueueReport.controller.js | 2 +-
.../voiceQueueReport/voiceQueueReport.events.js | 2 +-
.../api/voiceQueueReport/voiceQueueReport.model.js | 2 +-
.../api/voiceQueueReport/voiceQueueReport.rpc.js | 2 +-
.../voiceQueueReport/voiceQueueReport.socket.js | 2 +-
server/api/voiceQueuesLog/index.js | 2 +-
.../voiceQueuesLog/voiceQueuesLog.attributes.js | 2 +-
.../voiceQueuesLog/voiceQueuesLog.controller.js | 2 +-
server/api/voiceQueuesLog/voiceQueuesLog.model.js | 2 +-
server/api/voiceQueuesLog/voiceQueuesLog.rpc.js | 2 +-
server/api/voiceRecording/index.js | 2 +-
.../voiceRecording/voiceRecording.attributes.js | 2 +-
.../voiceRecording/voiceRecording.controller.js | 2 +-
server/api/voiceRecording/voiceRecording.model.js | 2 +-
server/api/voiceRecording/voiceRecording.rpc.js | 2 +-
server/api/voiceTransferReport/index.js | 2 +-
.../voiceTransferReport.attributes.js | 2 +-
.../voiceTransferReport.controller.js | 2 +-
.../voiceTransferReport.model.js | 2 +-
.../voiceTransferReport/voiceTransferReport.rpc.js | 2 +-
server/api/webbar/index.js | 2 +-
server/api/webbar/webbar.controller.js | 2 +-
server/api/whatsappAccount/index.js | 2 +-
.../whatsappAccount/whatsappAccount.attributes.js | 2 +-
.../whatsappAccount/whatsappAccount.controller.js | 2 +-
.../api/whatsappAccount/whatsappAccount.events.js | 2 +-
.../api/whatsappAccount/whatsappAccount.model.js | 2 +-
server/api/whatsappAccount/whatsappAccount.rpc.js | 2 +-
.../api/whatsappAccount/whatsappAccount.socket.js | 2 +-
server/api/whatsappApplication/index.js | 2 +-
.../whatsappApplication.attributes.js | 2 +-
.../whatsappApplication.controller.js | 2 +-
.../whatsappApplication.model.js | 2 +-
.../whatsappApplication/whatsappApplication.rpc.js | 2 +-
server/api/whatsappInteraction/index.js | 2 +-
.../whatsappInteraction.attributes.js | 2 +-
.../whatsappInteraction.controller.js | 2 +-
.../whatsappInteraction.events.js | 2 +-
.../whatsappInteraction.model.js | 2 +-
.../whatsappInteraction/whatsappInteraction.rpc.js | 2 +-
.../whatsappInteraction.socket.js | 2 +-
server/api/whatsappMessage/index.js | 2 +-
.../whatsappMessage/whatsappMessage.attributes.js | 2 +-
.../whatsappMessage/whatsappMessage.controller.js | 2 +-
.../api/whatsappMessage/whatsappMessage.events.js | 2 +-
.../api/whatsappMessage/whatsappMessage.model.js | 2 +-
server/api/whatsappMessage/whatsappMessage.rpc.js | 2 +-
.../api/whatsappMessage/whatsappMessage.socket.js | 2 +-
server/api/whatsappQueue/index.js | 2 +-
.../api/whatsappQueue/whatsappQueue.attributes.js | 2 +-
.../api/whatsappQueue/whatsappQueue.controller.js | 2 +-
server/api/whatsappQueue/whatsappQueue.events.js | 2 +-
server/api/whatsappQueue/whatsappQueue.model.js | 2 +-
server/api/whatsappQueue/whatsappQueue.rpc.js | 2 +-
server/api/whatsappQueue/whatsappQueue.socket.js | 2 +-
server/api/whatsappQueueReport/index.js | 2 +-
.../whatsappQueueReport.attributes.js | 2 +-
.../whatsappQueueReport.controller.js | 2 +-
.../whatsappQueueReport.model.js | 2 +-
.../whatsappQueueReport/whatsappQueueReport.rpc.js | 2 +-
server/api/whatsappTransferReport/index.js | 2 +-
.../whatsappTransferReport.attributes.js | 2 +-
.../whatsappTransferReport.controller.js | 2 +-
.../whatsappTransferReport.model.js | 2 +-
.../whatsappTransferReport.rpc.js | 2 +-
server/app.js | 2 +-
server/components/auth/service.js | 2 +-
server/components/contacts/index.js | 2 +-
server/components/contacts/sql-utils.js | 2 +-
server/components/encryptor/index.js | 2 +-
server/components/export/csv.js | 2 +-
server/components/export/pdf.js | 2 +-
server/components/export/xlsx.js | 2 +-
server/components/extensions/rewrite.js | 2 +-
server/components/import/cm/csv.js | 2 +-
server/components/import/cm/csv2.js | 2 +-
server/components/import/cm/csvUpdates.js | 2 +-
server/components/integrations/configuration.js | 2 +-
server/components/interaction/service.js | 2 +-
server/components/interaction/sql-utils.js | 2 +-
.../components/interaction/update-interaction.js | 2 +-
server/components/interaction/utils.js | 2 +-
server/components/license/service.js | 2 +-
server/components/parsers/advancedSearch.js | 2 +-
server/components/parsers/qs.js | 2 +-
server/components/realtime/agents.js | 2 +-
server/components/realtime/queues.js | 2 +-
server/config/express.js | 2 +-
server/config/license/hardware.js | 2 +-
server/config/license/index.js | 2 +-
server/config/license/util.js | 2 +-
server/config/local.env.js | 2 +-
server/config/logger.js | 2 +-
server/config/pm2/config.js | 2 +-
server/config/pm2/index.js | 2 +-
server/config/schedule/chat.js | 2 +-
server/config/schedule/cloud-provider.js | 2 +-
server/config/schedule/index.js | 2 +-
server/config/schedule/transcribe.js | 2 +-
server/config/schedule/whatsapp.js | 2 +-
server/config/seedContact.js | 2 +-
server/config/seedUsers.js | 2 +-
server/config/socketio.js | 2 +-
server/config/triggers/index.js | 2 +-
server/config/utils.js | 2 +-
server/errors/api.js | 2 +-
server/errors/index.js | 2 +-
server/migrations/2.6.19.js | 5 +
server/mysqldb/index.js | 2 +-
server/routes.js | 2 +-
server/rpc/index.js | 2 +-
server/services/agi/channel.js | 2 +-
server/services/agi/error.js | 2 +-
server/services/agi/events.js | 2 +-
server/services/agi/graph/index.js | 2 +-
server/services/agi/index.js | 2 +-
server/services/agi/mailRpc/index.js | 2 +-
server/services/agi/project.js | 2 +-
server/services/agi/reply.js | 2 +-
server/services/agi/rpc/index.js | 2 +-
server/services/agi/scripts/aws/index.js | 2 +-
server/services/agi/scripts/aws/lex/index.js | 2 +-
server/services/agi/scripts/aws/lex/lib/api.js | 2 +-
server/services/agi/scripts/aws/polly/index.js | 2 +-
server/services/agi/scripts/aws/polly/lib/api.js | 2 +-
server/services/agi/scripts/google/asr/index.js | 2 +-
server/services/agi/scripts/google/asr/lib/api.js | 2 +-
server/services/agi/scripts/index.js | 2 +-
server/services/agi/scripts/sestek/index.js | 2 +-
server/services/agi/scripts/sestek/nda/index.js | 2 +-
server/services/agi/scripts/tilde/asr/index.js | 2 +-
server/services/agi/scripts/tilde/asr/lib/api.js | 2 +-
server/services/agi/scripts/tilde/index.js | 2 +-
server/services/agi/server.js | 2 +-
server/services/agi/vertices.js | 2 +-
server/services/ami/acw/index.js | 2 +-
server/services/ami/ami.js | 2 +-
server/services/ami/client.js | 2 +-
server/services/ami/dialer/index.js | 2 +-
server/services/ami/dialer/models/action.js | 2 +-
server/services/ami/dialer/models/agentComplete.js | 2 +-
server/services/ami/dialer/models/final.js | 2 +-
server/services/ami/dialer/models/hangup.js | 2 +-
server/services/ami/dialer/models/history.js | 2 +-
.../ami/dialer/models/queueCallerAbandon.js | 2 +-
server/services/ami/dialer/utils/hopper.js | 2 +-
server/services/ami/dialer/utils/index.js | 2 +-
server/services/ami/fax/action.js | 2 +-
server/services/ami/fax/index.js | 2 +-
server/services/ami/fax/rpcDb.js | 2 +-
server/services/ami/fax/util/gs.js | 2 +-
server/services/ami/fax/util/util.js | 2 +-
server/services/ami/index.js | 2 +-
server/services/ami/model/agent.js | 2 +-
server/services/ami/model/campaign.js | 2 +-
server/services/ami/model/channel.js | 2 +-
server/services/ami/model/deskAccount.js | 2 +-
server/services/ami/model/dynamics365Account.js | 2 +-
server/services/ami/model/faxAccount.js | 2 +-
server/services/ami/model/freshdeskAccount.js | 2 +-
server/services/ami/model/freshsalesAccount.js | 2 +-
server/services/ami/model/queueReport.js | 2 +-
server/services/ami/model/salesforceAccount.js | 2 +-
server/services/ami/model/servicenowAccount.js | 2 +-
server/services/ami/model/sugarcrmAccount.js | 2 +-
server/services/ami/model/telephone.js | 2 +-
server/services/ami/model/template.js | 2 +-
server/services/ami/model/trigger.js | 2 +-
server/services/ami/model/trunk.js | 2 +-
server/services/ami/model/voiceExtension.js | 2 +-
server/services/ami/model/voiceQueue.js | 2 +-
server/services/ami/model/voiceQueueSummary.js | 2 +-
server/services/ami/model/vtigerAccount.js | 2 +-
server/services/ami/model/zendeskAccount.js | 2 +-
server/services/ami/model/zohoAccount.js | 2 +-
server/services/ami/preview/action.js | 2 +-
server/services/ami/preview/index.js | 2 +-
server/services/ami/preview/rpcDb.js | 2 +-
server/services/ami/preview/util/util.js | 2 +-
server/services/ami/properties.js | 2 +-
server/services/ami/realtime/index.js | 2 +-
server/services/ami/realtime/utils.js | 2 +-
server/services/ami/report/index.js | 2 +-
server/services/ami/report/userReport.js | 2 +-
server/services/ami/report/voiceAgentReport.js | 2 +-
server/services/ami/report/voiceCallReport.js | 2 +-
server/services/ami/report/voiceDialReport.js | 2 +-
server/services/ami/report/voiceQueueReport.js | 2 +-
server/services/ami/rpc/agentReportPreview.js | 2 +-
server/services/ami/rpc/attachment.js | 2 +-
server/services/ami/rpc/campaign.js | 2 +-
server/services/ami/rpc/cmContact.js | 2 +-
server/services/ami/rpc/cmHopper.js | 2 +-
server/services/ami/rpc/cmHopperAdditionalPhone.js | 2 +-
server/services/ami/rpc/cmHopperBlack.js | 2 +-
server/services/ami/rpc/cmHopperFinal.js | 2 +-
server/services/ami/rpc/cmHopperHistory.js | 2 +-
server/services/ami/rpc/faxAccount.js | 2 +-
server/services/ami/rpc/faxMessage.js | 2 +-
server/services/ami/rpc/integrations/desk.js | 2 +-
.../services/ami/rpc/integrations/dynamics365.js | 2 +-
server/services/ami/rpc/integrations/freshdesk.js | 2 +-
server/services/ami/rpc/integrations/freshsales.js | 2 +-
server/services/ami/rpc/integrations/salesforce.js | 2 +-
server/services/ami/rpc/integrations/servicenow.js | 2 +-
server/services/ami/rpc/integrations/sugarcrm.js | 2 +-
server/services/ami/rpc/integrations/vtiger.js | 2 +-
server/services/ami/rpc/integrations/zendesk.js | 2 +-
server/services/ami/rpc/integrations/zoho.js | 2 +-
server/services/ami/rpc/interval.js | 2 +-
server/services/ami/rpc/memberReport.js | 2 +-
server/services/ami/rpc/setting.js | 2 +-
server/services/ami/rpc/template.js | 2 +-
server/services/ami/rpc/trigger.js | 2 +-
server/services/ami/rpc/trunk.js | 2 +-
server/services/ami/rpc/user.js | 2 +-
server/services/ami/rpc/voiceAgentReport.js | 2 +-
server/services/ami/rpc/voiceCallReport.js | 2 +-
server/services/ami/rpc/voiceDialReport.js | 2 +-
server/services/ami/rpc/voiceExtension.js | 2 +-
server/services/ami/rpc/voiceQueue.js | 2 +-
server/services/ami/rpc/voiceQueueReport.js | 2 +-
server/services/ami/rpc/voiceQueueRt.js | 2 +-
server/services/ami/rpc/voiceRecording.js | 2 +-
server/services/ami/rpc/voiceTransferReport.js | 2 +-
server/services/ami/server/index.js | 2 +-
server/services/ami/trigger/cmContact/index.js | 2 +-
server/services/ami/trigger/index.js | 2 +-
server/services/ami/trigger/integration/desk.js | 2 +-
.../ami/trigger/integration/dynamics365.js | 2 +-
.../services/ami/trigger/integration/freshdesk.js | 2 +-
.../services/ami/trigger/integration/freshsales.js | 2 +-
server/services/ami/trigger/integration/index.js | 2 +-
.../services/ami/trigger/integration/salesforce.js | 2 +-
.../services/ami/trigger/integration/servicenow.js | 2 +-
.../services/ami/trigger/integration/sugarcrm.js | 2 +-
server/services/ami/trigger/integration/util.js | 2 +-
server/services/ami/trigger/integration/vtiger.js | 2 +-
server/services/ami/trigger/integration/zendesk.js | 2 +-
server/services/ami/trigger/integration/zoho.js | 2 +-
server/services/ami/trigger/script/index.js | 2 +-
server/services/ami/trigger/urlforward/index.js | 2 +-
server/services/email/client.js | 2 +-
server/services/email/index.js | 2 +-
server/services/email/lib/email.js | 2 +-
server/services/email/lib/imap.js | 2 +-
server/services/email/lib/smtp.js | 2 +-
server/services/email/lib/utils.js | 2 +-
server/services/email/model/mailAccount.js | 2 +-
server/services/email/realtime/index.js | 2 +-
server/services/email/rpc/mailAccount.js | 2 +-
server/services/email/rpc/setting.js | 2 +-
server/services/email/server/index.js | 2 +-
server/services/express/index.js | 2 +-
server/services/routing/client.js | 2 +-
server/services/routing/index.js | 2 +-
server/services/routing/lib/rule-engine.js | 2 +-
server/services/routing/mailRpc/index.js | 2 +-
server/services/routing/model/agent.js | 2 +-
server/services/routing/model/chatQueue.js | 2 +-
server/services/routing/model/faxQueue.js | 2 +-
server/services/routing/model/interval.js | 2 +-
server/services/routing/model/mailQueue.js | 2 +-
server/services/routing/model/openchannelQueue.js | 2 +-
server/services/routing/model/smsQueue.js | 2 +-
server/services/routing/model/whatsappQueue.js | 2 +-
server/services/routing/realtime/index.js | 2 +-
server/services/routing/rpc/chatInteraction.js | 2 +-
server/services/routing/rpc/chatMessage.js | 2 +-
server/services/routing/rpc/chatQueue.js | 2 +-
server/services/routing/rpc/chatQueueReport.js | 2 +-
server/services/routing/rpc/faxInteraction.js | 2 +-
server/services/routing/rpc/faxMessage.js | 2 +-
server/services/routing/rpc/faxQueue.js | 2 +-
server/services/routing/rpc/faxQueueReport.js | 2 +-
server/services/routing/rpc/interval.js | 2 +-
server/services/routing/rpc/mailInteraction.js | 2 +-
server/services/routing/rpc/mailMessage.js | 2 +-
server/services/routing/rpc/mailQueue.js | 2 +-
server/services/routing/rpc/mailQueueReport.js | 2 +-
.../services/routing/rpc/openchannelInteraction.js | 2 +-
server/services/routing/rpc/openchannelMessage.js | 2 +-
server/services/routing/rpc/openchannelQueue.js | 2 +-
.../services/routing/rpc/openchannelQueueReport.js | 2 +-
server/services/routing/rpc/smsInteraction.js | 2 +-
server/services/routing/rpc/smsMessage.js | 2 +-
server/services/routing/rpc/smsQueue.js | 2 +-
server/services/routing/rpc/smsQueueReport.js | 2 +-
server/services/routing/rpc/user.js | 2 +-
server/services/routing/rpc/whatsappInteraction.js | 2 +-
server/services/routing/rpc/whatsappMessage.js | 2 +-
server/services/routing/rpc/whatsappQueue.js | 2 +-
server/services/routing/rpc/whatsappQueueReport.js | 2 +-
.../services/routing/server/applications/agent.js | 2 +-
.../routing/server/applications/amazonlex.js | 2 +-
.../routing/server/applications/autoreply.js | 2 +-
.../services/routing/server/applications/close.js | 2 +-
.../routing/server/applications/dialogflow.js | 2 +-
.../routing/server/applications/dialogflowV2.js | 2 +-
.../services/routing/server/applications/gotoif.js | 2 +-
.../services/routing/server/applications/gotop.js | 2 +-
.../routing/server/applications/message.js | 2 +-
.../services/routing/server/applications/noop.js | 2 +-
.../services/routing/server/applications/queue.js | 2 +-
.../routing/server/applications/strategy/agent.js | 2 +-
.../server/applications/strategy/beepall.js | 2 +-
.../routing/server/applications/strategy/index.js | 2 +-
.../server/applications/strategy/rrmemory.js | 2 +-
.../routing/server/applications/strategy/util.js | 2 +-
.../services/routing/server/applications/system.js | 2 +-
server/services/routing/server/applications/tag.js | 2 +-
.../services/routing/server/applications/tvox.js | 2 +-
.../services/routing/server/applications/utils.js | 2 +-
server/services/routing/server/index.js | 2 +-
server/services/routing/server/interval.js | 2 +-
server/services/xdr/agents.controller.js | 2 +-
server/services/xdr/calls.controller.js | 2 +-
server/services/xdr/core.controller.js | 2 +-
server/services/xdr/dials.controller.js | 2 +-
server/services/xdr/index.js | 2 +-
server/services/xdr/members.controller.js | 2 +-
server/services/xdr/queues.controller.js | 2 +-
server/services/xdr/recordings.controller.js | 2 +-
server/services/xdr/transfers.controller.js | 2 +-
server/services/xdr/utils.js | 2 +-
server/utils/client-side-logger.js | 2 +-
server/utils/iftime.js | 2 +-
server/utils/loggers.js | 2 +-
server/utils/mask-sensitive-data.js | 2 +-
server/utils/safe-template.js | 2 +-
server/utils/update-app-config.js | 2 +-
.../3.5.0/assets/fonts/74bd8541f6152e9aa0cb.ttf | Bin 0 -> 322456 bytes
.../3.5.0/assets/fonts/8a4db4218c8e3ba96535.woff | Bin 0 -> 13080 bytes
.../3.5.0/assets/fonts/c90b9e812971d29ad6eb.eot | Bin 0 -> 322676 bytes
.../3.5.0/assets/fonts/db15fb94f19c4e36b451.woff | Bin 0 -> 158576 bytes
.../3.5.0/assets/fonts/dc116c4c8ce73229b683.ttf | Bin 0 -> 13004 bytes
.../3.5.0/assets/fonts/f2fc8fdab7e77dd45cca.eot | Bin 0 -> 13168 bytes
.../3.5.0/assets/fonts/ffef7f48a358edc53224.woff2 | Bin 0 -> 119340 bytes
.../3.5.0/assets/images/00fe515d7113c2841e5d.svg | 44 +
.../3.5.0/assets/images/369ccd33e5368870b112.png | Bin 0 -> 2366542 bytes
.../3.5.0/assets/images/3b24a6b94b2631f4d565.svg | 17 +
.../3.5.0/assets/images/b45cb1fa106a1150f12e.png | Bin 0 -> 792641 bytes
.../3.5.0/assets/images/c9f502ad417b1b987198.svg | 6741 ++++++++++++++++++++
snippet/3.5.0/index.html | 29 +
snippet/3.5.0/scripts/app.js | 2 +
snippet/3.5.0/scripts/app.js.LICENSE.txt | 19 +
snippet/3.5.0/scripts/chat.js | 3 +
snippet/3.5.0/scripts/chat.js.LICENSE.txt | 7 +
snippet/3.5.0/scripts/chat.js.map | 1 +
snippet/3.5.0/scripts/mobile.js | 1 +
snippet/3.5.0/scripts/runtime.js | 2 +
snippet/3.5.0/scripts/runtime.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-58d021f3.js | 2 +
.../3.5.0/scripts/vendor-angular-58d021f3.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-76f2ed34.js | 3 +
.../scripts/vendor-angular-76f2ed34.js.LICENSE.txt | 5 +
.../3.5.0/scripts/vendor-angular-76f2ed34.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-animate.js | 3 +
.../scripts/vendor-angular-animate.js.LICENSE.txt | 5 +
.../3.5.0/scripts/vendor-angular-animate.js.map | 1 +
.../3.5.0/scripts/vendor-angular-local-storage.js | 3 +
.../vendor-angular-local-storage.js.LICENSE.txt | 7 +
.../scripts/vendor-angular-local-storage.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-material.js | 3 +
.../scripts/vendor-angular-material.js.LICENSE.txt | 6 +
.../3.5.0/scripts/vendor-angular-material.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-messages.js | 3 +
.../scripts/vendor-angular-messages.js.LICENSE.txt | 5 +
.../3.5.0/scripts/vendor-angular-messages.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-resource.js | 3 +
.../scripts/vendor-angular-resource.js.LICENSE.txt | 5 +
.../3.5.0/scripts/vendor-angular-resource.js.map | 1 +
snippet/3.5.0/scripts/vendor-angular-sanitize.js | 3 +
.../scripts/vendor-angular-sanitize.js.LICENSE.txt | 5 +
.../3.5.0/scripts/vendor-angular-sanitize.js.map | 1 +
snippet/3.5.0/scripts/vendor-emojione.js | 2 +
snippet/3.5.0/scripts/vendor-emojione.js.map | 1 +
snippet/3.5.0/scripts/vendor-emojionearea.js | 3 +
.../scripts/vendor-emojionearea.js.LICENSE.txt | 7 +
snippet/3.5.0/scripts/vendor-emojionearea.js.map | 1 +
snippet/3.5.0/scripts/vendor-flow.js | 3 +
snippet/3.5.0/scripts/vendor-flow.js.LICENSE.txt | 3 +
snippet/3.5.0/scripts/vendor-flow.js.map | 1 +
snippet/3.5.0/scripts/vendor-index.js | 2 +
snippet/3.5.0/scripts/vendor-index.js.map | 1 +
snippet/3.5.0/scripts/vendor-jquery.js | 3 +
snippet/3.5.0/scripts/vendor-jquery.js.LICENSE.txt | 24 +
snippet/3.5.0/scripts/vendor-jquery.js.map | 1 +
.../3.5.0/scripts/vendor-jquery.textcomplete.js | 3 +
.../vendor-jquery.textcomplete.js.LICENSE.txt | 7 +
.../scripts/vendor-jquery.textcomplete.js.map | 1 +
snippet/3.5.0/scripts/vendor-moment.js | 3 +
snippet/3.5.0/scripts/vendor-moment.js.LICENSE.txt | 1 +
snippet/3.5.0/scripts/vendor-moment.js.map | 1 +
snippet/3.5.0/scripts/vendor-ng-embed.js | 2 +
snippet/3.5.0/scripts/vendor-ng-embed.js.map | 1 +
snippet/3.5.0/scripts/vendor-stateDirectives.js | 2 +
.../3.5.0/scripts/vendor-stateDirectives.js.map | 1 +
snippet/3.5.0/scripts/vendor-stateService.js | 2 +
snippet/3.5.0/scripts/vendor-stateService.js.map | 1 +
snippet/3.5.0/scripts/vendor-transition.js | 2 +
snippet/3.5.0/scripts/vendor-transition.js.map | 1 +
snippet/3.5.0/scripts/vendor-urlMatcher.js | 2 +
snippet/3.5.0/scripts/vendor-urlMatcher.js.map | 1 +
snippet/3.5.0/styles/app.css | 28 +
snippet/3.5.0/styles/app.css.map | 1 +
snippet/3.5.0/styles/mobile.css | 3 +
snippet/3.5.0/styles/mobile.css.map | 1 +
snippet/3.5.0/styles/vendor.css | 4463 +++++++++++++
snippet/3.5.0/styles/vendor.css.map | 1 +
snippet/3.5.0/templates/00860aee362cdeeb1080.html | 161 +
snippet/3.5.0/templates/3f18dac5f545add792db.html | 82 +
snippet/3.5.0/templates/6043a16afdb829ba5934.html | 33 +
snippet/3.5.0/templates/9962474df74f9405ac72.html | 262 +
snippet/3.5.0/templates/caf0e553108b226443aa.html | 202 +
snippet/3.5.0/templates/dc49a9ba939f8c099868.html | 145 +
.../3.6.0/assets/fonts/74bd8541f6152e9aa0cb.ttf | Bin 322456 -> 0 bytes
.../3.6.0/assets/fonts/8a4db4218c8e3ba96535.woff | Bin 13080 -> 0 bytes
.../3.6.0/assets/fonts/c90b9e812971d29ad6eb.eot | Bin 322676 -> 0 bytes
.../3.6.0/assets/fonts/db15fb94f19c4e36b451.woff | Bin 158576 -> 0 bytes
.../3.6.0/assets/fonts/dc116c4c8ce73229b683.ttf | Bin 13004 -> 0 bytes
.../3.6.0/assets/fonts/f2fc8fdab7e77dd45cca.eot | Bin 13168 -> 0 bytes
.../3.6.0/assets/fonts/ffef7f48a358edc53224.woff2 | Bin 119340 -> 0 bytes
.../3.6.0/assets/images/00fe515d7113c2841e5d.svg | 44 -
.../3.6.0/assets/images/369ccd33e5368870b112.png | Bin 2366542 -> 0 bytes
.../3.6.0/assets/images/3b24a6b94b2631f4d565.svg | 17 -
.../3.6.0/assets/images/b45cb1fa106a1150f12e.png | Bin 792641 -> 0 bytes
.../3.6.0/assets/images/c9f502ad417b1b987198.svg | 6741 --------------------
snippet/3.6.0/index.html | 29 -
snippet/3.6.0/scripts/app.js | 2 -
snippet/3.6.0/scripts/app.js.LICENSE.txt | 19 -
snippet/3.6.0/scripts/chat.js | 3 -
snippet/3.6.0/scripts/chat.js.LICENSE.txt | 7 -
snippet/3.6.0/scripts/chat.js.map | 1 -
snippet/3.6.0/scripts/mobile.js | 1 -
snippet/3.6.0/scripts/runtime.js | 2 -
snippet/3.6.0/scripts/runtime.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-58d021f3.js | 2 -
.../3.6.0/scripts/vendor-angular-58d021f3.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-76f2ed34.js | 3 -
.../scripts/vendor-angular-76f2ed34.js.LICENSE.txt | 5 -
.../3.6.0/scripts/vendor-angular-76f2ed34.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-animate.js | 3 -
.../scripts/vendor-angular-animate.js.LICENSE.txt | 5 -
.../3.6.0/scripts/vendor-angular-animate.js.map | 1 -
.../3.6.0/scripts/vendor-angular-local-storage.js | 3 -
.../vendor-angular-local-storage.js.LICENSE.txt | 7 -
.../scripts/vendor-angular-local-storage.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-material.js | 3 -
.../scripts/vendor-angular-material.js.LICENSE.txt | 6 -
.../3.6.0/scripts/vendor-angular-material.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-messages.js | 3 -
.../scripts/vendor-angular-messages.js.LICENSE.txt | 5 -
.../3.6.0/scripts/vendor-angular-messages.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-resource.js | 3 -
.../scripts/vendor-angular-resource.js.LICENSE.txt | 5 -
.../3.6.0/scripts/vendor-angular-resource.js.map | 1 -
snippet/3.6.0/scripts/vendor-angular-sanitize.js | 3 -
.../scripts/vendor-angular-sanitize.js.LICENSE.txt | 5 -
.../3.6.0/scripts/vendor-angular-sanitize.js.map | 1 -
snippet/3.6.0/scripts/vendor-emojione.js | 2 -
snippet/3.6.0/scripts/vendor-emojione.js.map | 1 -
snippet/3.6.0/scripts/vendor-emojionearea.js | 3 -
.../scripts/vendor-emojionearea.js.LICENSE.txt | 7 -
snippet/3.6.0/scripts/vendor-emojionearea.js.map | 1 -
snippet/3.6.0/scripts/vendor-flow.js | 3 -
snippet/3.6.0/scripts/vendor-flow.js.LICENSE.txt | 3 -
snippet/3.6.0/scripts/vendor-flow.js.map | 1 -
snippet/3.6.0/scripts/vendor-index.js | 2 -
snippet/3.6.0/scripts/vendor-index.js.map | 1 -
snippet/3.6.0/scripts/vendor-jquery.js | 3 -
snippet/3.6.0/scripts/vendor-jquery.js.LICENSE.txt | 24 -
snippet/3.6.0/scripts/vendor-jquery.js.map | 1 -
.../3.6.0/scripts/vendor-jquery.textcomplete.js | 3 -
.../vendor-jquery.textcomplete.js.LICENSE.txt | 7 -
.../scripts/vendor-jquery.textcomplete.js.map | 1 -
snippet/3.6.0/scripts/vendor-moment.js | 3 -
snippet/3.6.0/scripts/vendor-moment.js.LICENSE.txt | 1 -
snippet/3.6.0/scripts/vendor-moment.js.map | 1 -
snippet/3.6.0/scripts/vendor-ng-embed.js | 2 -
snippet/3.6.0/scripts/vendor-ng-embed.js.map | 1 -
snippet/3.6.0/scripts/vendor-stateDirectives.js | 2 -
.../3.6.0/scripts/vendor-stateDirectives.js.map | 1 -
snippet/3.6.0/scripts/vendor-stateService.js | 2 -
snippet/3.6.0/scripts/vendor-stateService.js.map | 1 -
snippet/3.6.0/scripts/vendor-transition.js | 2 -
snippet/3.6.0/scripts/vendor-transition.js.map | 1 -
snippet/3.6.0/scripts/vendor-urlMatcher.js | 2 -
snippet/3.6.0/scripts/vendor-urlMatcher.js.map | 1 -
snippet/3.6.0/styles/app.css | 28 -
snippet/3.6.0/styles/app.css.map | 1 -
snippet/3.6.0/styles/mobile.css | 3 -
snippet/3.6.0/styles/mobile.css.map | 1 -
snippet/3.6.0/styles/vendor.css | 4463 -------------
snippet/3.6.0/styles/vendor.css.map | 1 -
snippet/3.6.0/templates/00860aee362cdeeb1080.html | 161 -
snippet/3.6.0/templates/3f18dac5f545add792db.html | 82 -
snippet/3.6.0/templates/6043a16afdb829ba5934.html | 33 -
snippet/3.6.0/templates/9962474df74f9405ac72.html | 262 -
snippet/3.6.0/templates/caf0e553108b226443aa.html | 202 -
snippet/3.6.0/templates/dc49a9ba939f8c099868.html | 145 -
1375 files changed, 13612 insertions(+), 13607 deletions(-)
create mode 100644 snippet/3.5.0/assets/fonts/74bd8541f6152e9aa0cb.ttf
create mode 100644 snippet/3.5.0/assets/fonts/8a4db4218c8e3ba96535.woff
create mode 100644 snippet/3.5.0/assets/fonts/c90b9e812971d29ad6eb.eot
create mode 100644 snippet/3.5.0/assets/fonts/db15fb94f19c4e36b451.woff
create mode 100644 snippet/3.5.0/assets/fonts/dc116c4c8ce73229b683.ttf
create mode 100644 snippet/3.5.0/assets/fonts/f2fc8fdab7e77dd45cca.eot
create mode 100644 snippet/3.5.0/assets/fonts/ffef7f48a358edc53224.woff2
create mode 100644 snippet/3.5.0/assets/images/00fe515d7113c2841e5d.svg
create mode 100644 snippet/3.5.0/assets/images/369ccd33e5368870b112.png
create mode 100644 snippet/3.5.0/assets/images/3b24a6b94b2631f4d565.svg
create mode 100644 snippet/3.5.0/assets/images/b45cb1fa106a1150f12e.png
create mode 100644 snippet/3.5.0/assets/images/c9f502ad417b1b987198.svg
create mode 100644 snippet/3.5.0/index.html
create mode 100644 snippet/3.5.0/scripts/app.js
create mode 100644 snippet/3.5.0/scripts/app.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/chat.js
create mode 100644 snippet/3.5.0/scripts/chat.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/chat.js.map
create mode 100644 snippet/3.5.0/scripts/mobile.js
create mode 100644 snippet/3.5.0/scripts/runtime.js
create mode 100644 snippet/3.5.0/scripts/runtime.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-58d021f3.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-58d021f3.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-76f2ed34.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-76f2ed34.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-76f2ed34.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-animate.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-animate.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-animate.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-local-storage.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-local-storage.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-local-storage.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-material.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-material.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-material.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-messages.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-messages.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-messages.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-resource.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-resource.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-resource.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-angular-sanitize.js
create mode 100644 snippet/3.5.0/scripts/vendor-angular-sanitize.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-angular-sanitize.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-emojione.js
create mode 100644 snippet/3.5.0/scripts/vendor-emojione.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-emojionearea.js
create mode 100644 snippet/3.5.0/scripts/vendor-emojionearea.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-emojionearea.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-flow.js
create mode 100644 snippet/3.5.0/scripts/vendor-flow.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-flow.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-index.js
create mode 100644 snippet/3.5.0/scripts/vendor-index.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-jquery.js
create mode 100644 snippet/3.5.0/scripts/vendor-jquery.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-jquery.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-jquery.textcomplete.js
create mode 100644 snippet/3.5.0/scripts/vendor-jquery.textcomplete.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-jquery.textcomplete.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-moment.js
create mode 100644 snippet/3.5.0/scripts/vendor-moment.js.LICENSE.txt
create mode 100644 snippet/3.5.0/scripts/vendor-moment.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-ng-embed.js
create mode 100644 snippet/3.5.0/scripts/vendor-ng-embed.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-stateDirectives.js
create mode 100644 snippet/3.5.0/scripts/vendor-stateDirectives.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-stateService.js
create mode 100644 snippet/3.5.0/scripts/vendor-stateService.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-transition.js
create mode 100644 snippet/3.5.0/scripts/vendor-transition.js.map
create mode 100644 snippet/3.5.0/scripts/vendor-urlMatcher.js
create mode 100644 snippet/3.5.0/scripts/vendor-urlMatcher.js.map
create mode 100644 snippet/3.5.0/styles/app.css
create mode 100644 snippet/3.5.0/styles/app.css.map
create mode 100644 snippet/3.5.0/styles/mobile.css
create mode 100644 snippet/3.5.0/styles/mobile.css.map
create mode 100644 snippet/3.5.0/styles/vendor.css
create mode 100644 snippet/3.5.0/styles/vendor.css.map
create mode 100644 snippet/3.5.0/templates/00860aee362cdeeb1080.html
create mode 100644 snippet/3.5.0/templates/3f18dac5f545add792db.html
create mode 100644 snippet/3.5.0/templates/6043a16afdb829ba5934.html
create mode 100644 snippet/3.5.0/templates/9962474df74f9405ac72.html
create mode 100644 snippet/3.5.0/templates/caf0e553108b226443aa.html
create mode 100644 snippet/3.5.0/templates/dc49a9ba939f8c099868.html
delete mode 100644 snippet/3.6.0/assets/fonts/74bd8541f6152e9aa0cb.ttf
delete mode 100644 snippet/3.6.0/assets/fonts/8a4db4218c8e3ba96535.woff
delete mode 100644 snippet/3.6.0/assets/fonts/c90b9e812971d29ad6eb.eot
delete mode 100644 snippet/3.6.0/assets/fonts/db15fb94f19c4e36b451.woff
delete mode 100644 snippet/3.6.0/assets/fonts/dc116c4c8ce73229b683.ttf
delete mode 100644 snippet/3.6.0/assets/fonts/f2fc8fdab7e77dd45cca.eot
delete mode 100644 snippet/3.6.0/assets/fonts/ffef7f48a358edc53224.woff2
delete mode 100644 snippet/3.6.0/assets/images/00fe515d7113c2841e5d.svg
delete mode 100644 snippet/3.6.0/assets/images/369ccd33e5368870b112.png
delete mode 100644 snippet/3.6.0/assets/images/3b24a6b94b2631f4d565.svg
delete mode 100644 snippet/3.6.0/assets/images/b45cb1fa106a1150f12e.png
delete mode 100644 snippet/3.6.0/assets/images/c9f502ad417b1b987198.svg
delete mode 100644 snippet/3.6.0/index.html
delete mode 100644 snippet/3.6.0/scripts/app.js
delete mode 100644 snippet/3.6.0/scripts/app.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/chat.js
delete mode 100644 snippet/3.6.0/scripts/chat.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/chat.js.map
delete mode 100644 snippet/3.6.0/scripts/mobile.js
delete mode 100644 snippet/3.6.0/scripts/runtime.js
delete mode 100644 snippet/3.6.0/scripts/runtime.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-58d021f3.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-58d021f3.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-76f2ed34.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-76f2ed34.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-76f2ed34.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-animate.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-animate.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-animate.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-local-storage.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-local-storage.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-local-storage.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-material.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-material.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-material.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-messages.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-messages.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-messages.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-resource.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-resource.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-resource.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-sanitize.js
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-sanitize.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-angular-sanitize.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-emojione.js
delete mode 100644 snippet/3.6.0/scripts/vendor-emojione.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-emojionearea.js
delete mode 100644 snippet/3.6.0/scripts/vendor-emojionearea.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-emojionearea.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-flow.js
delete mode 100644 snippet/3.6.0/scripts/vendor-flow.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-flow.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-index.js
delete mode 100644 snippet/3.6.0/scripts/vendor-index.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-jquery.js
delete mode 100644 snippet/3.6.0/scripts/vendor-jquery.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-jquery.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-jquery.textcomplete.js
delete mode 100644 snippet/3.6.0/scripts/vendor-jquery.textcomplete.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-jquery.textcomplete.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-moment.js
delete mode 100644 snippet/3.6.0/scripts/vendor-moment.js.LICENSE.txt
delete mode 100644 snippet/3.6.0/scripts/vendor-moment.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-ng-embed.js
delete mode 100644 snippet/3.6.0/scripts/vendor-ng-embed.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-stateDirectives.js
delete mode 100644 snippet/3.6.0/scripts/vendor-stateDirectives.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-stateService.js
delete mode 100644 snippet/3.6.0/scripts/vendor-stateService.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-transition.js
delete mode 100644 snippet/3.6.0/scripts/vendor-transition.js.map
delete mode 100644 snippet/3.6.0/scripts/vendor-urlMatcher.js
delete mode 100644 snippet/3.6.0/scripts/vendor-urlMatcher.js.map
delete mode 100644 snippet/3.6.0/styles/app.css
delete mode 100644 snippet/3.6.0/styles/app.css.map
delete mode 100644 snippet/3.6.0/styles/mobile.css
delete mode 100644 snippet/3.6.0/styles/mobile.css.map
delete mode 100644 snippet/3.6.0/styles/vendor.css
delete mode 100644 snippet/3.6.0/styles/vendor.css.map
delete mode 100644 snippet/3.6.0/templates/00860aee362cdeeb1080.html
delete mode 100644 snippet/3.6.0/templates/3f18dac5f545add792db.html
delete mode 100644 snippet/3.6.0/templates/6043a16afdb829ba5934.html
delete mode 100644 snippet/3.6.0/templates/9962474df74f9405ac72.html
delete mode 100644 snippet/3.6.0/templates/caf0e553108b226443aa.html
delete mode 100644 snippet/3.6.0/templates/dc49a9ba939f8c099868.html
diff --git a/apidoc/api_project.js b/apidoc/api_project.js
index e49d24b..20fc131 100644
--- a/apidoc/api_project.js
+++ b/apidoc/api_project.js
@@ -1,6 +1,6 @@
define({
"name": "xCALLY Motion API",
- "version": "2.6.20",
+ "version": "2.6.19",
"description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
"title": "xCALLY MOTION API",
"header": {
@@ -17,7 +17,7 @@ define({
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2022-11-15T09:33:27.365Z",
+ "time": "2022-11-15T10:58:15.231Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/apidoc/api_project.json b/apidoc/api_project.json
index 75bfca4..5ac933c 100644
--- a/apidoc/api_project.json
+++ b/apidoc/api_project.json
@@ -1,6 +1,6 @@
{
"name": "xCALLY Motion API",
- "version": "2.6.20",
+ "version": "2.6.19",
"description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
"title": "xCALLY MOTION API",
"header": {
@@ -17,7 +17,7 @@
"apidoc": "0.3.0",
"generator": {
"name": "apidoc",
- "time": "2022-11-15T09:33:27.365Z",
+ "time": "2022-11-15T10:58:15.231Z",
"url": "http://apidocjs.com",
"version": "0.24.0"
}
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 1ceedbc..0549b25 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -1,6 +1,6 @@
{
"name": "motion",
- "version": "2.6.20",
+ "version": "2.6.19",
"dependencies": {
"@babel/code-frame": {
"version": "7.18.6",
diff --git a/package.json b/package.json
index 79e37a8..f66562f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "motion",
- "version": "2.6.20",
+ "version": "2.6.19",
"description": "xCALLY Motion is the new Realtime asynchronous solution for your multichannel contact center over Asterisk.",
"main": "server/app.js",
"engines": {
diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js
index 8f57521..d642741 100644
--- a/server/api/action/action.attributes.js
+++ b/server/api/action/action.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x71cb=['urlForward','browser','bot','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','STRING','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','urlForward[body]','sequelize','exports','VIRTUAL','getDataValue','action','integration','motionbar','jscripty'];(function(_0xe51964,_0x433b90){var _0x2c2366=function(_0x1bc95c){while(--_0x1bc95c){_0xe51964['push'](_0xe51964['shift']());}};_0x2c2366(++_0x433b90);}(_0x71cb,0x1ad));var _0xb71c=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0x71cb[_0x2f3848];return _0x102668;};'use strict';var Sequelize=require(_0xb71c('0x0'));module[_0xb71c('0x1')]={'name':{'type':Sequelize[_0xb71c('0x2')],'get':function(_0x5f0230){return this[_0xb71c('0x3')](_0xb71c('0x4'));}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[['contactManager',_0xb71c('0x5'),_0xb71c('0x6'),_0xb71c('0x7'),_0xb71c('0x8'),_0xb71c('0x9'),_0xb71c('0xa'),'script']],'msg':_0xb71c('0xb')}},'comment':_0xb71c('0xb')},'data1':{'type':Sequelize[_0xb71c('0xc')](0x1000),'comment':_0xb71c('0xd')},'data2':{'type':Sequelize['STRING'](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize['STRING'](0x1000),'comment':_0xb71c('0xe')},'data4':{'type':Sequelize[_0xb71c('0xc')](0x1000),'comments':_0xb71c('0xf')},'data5':{'type':Sequelize['STRING'](0x1000),'comments':_0xb71c('0x10')},'data6':{'type':Sequelize[_0xb71c('0xc')],'comments':_0xb71c('0x11')},'data7':{'type':Sequelize['TEXT'],'comments':_0xb71c('0x12')}};
\ No newline at end of file
+var _0xc765=['browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','TEXT','urlForward[body]','sequelize','exports','VIRTUAL','getDataValue','action','STRING','contactManager','motionbar','jscripty','urlForward','browser','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]'];(function(_0x3b59d5,_0x1e23f2){var _0x30cc91=function(_0x54815d){while(--_0x54815d){_0x3b59d5['push'](_0x3b59d5['shift']());}};_0x30cc91(++_0x1e23f2);}(_0xc765,0xf5));var _0x5c76=function(_0x831b25,_0x2284dd){_0x831b25=_0x831b25-0x0;var _0x1c1fd2=_0xc765[_0x831b25];return _0x1c1fd2;};'use strict';var Sequelize=require(_0x5c76('0x0'));module[_0x5c76('0x1')]={'name':{'type':Sequelize[_0x5c76('0x2')],'get':function(_0x35da53){return this[_0x5c76('0x3')](_0x5c76('0x4'));}},'action':{'type':Sequelize[_0x5c76('0x5')],'allowNull':![],'validate':{'isIn':{'args':[[_0x5c76('0x6'),'integration',_0x5c76('0x7'),_0x5c76('0x8'),_0x5c76('0x9'),_0x5c76('0xa'),_0x5c76('0xb'),_0x5c76('0xc')]],'msg':_0x5c76('0xd')}},'comment':_0x5c76('0xd')},'data1':{'type':Sequelize['STRING'](0x1000),'comment':_0x5c76('0xe')},'data2':{'type':Sequelize[_0x5c76('0x5')](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize['STRING'](0x1000),'comment':'contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]'},'data4':{'type':Sequelize['STRING'](0x1000),'comments':_0x5c76('0xf')},'data5':{'type':Sequelize['STRING'](0x1000),'comments':_0x5c76('0x10')},'data6':{'type':Sequelize[_0x5c76('0x5')],'comments':_0x5c76('0x11')},'data7':{'type':Sequelize[_0x5c76('0x12')],'comments':_0x5c76('0x13')}};
\ No newline at end of file
diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js
index e9c8ead..8429971 100644
--- a/server/api/action/action.controller.js
+++ b/server/api/action/action.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa55b=['reject','save','update','destroy','then','end','sendStatus','name','send','body','Action','find','catch','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','path','sox','to-csv','fs-extra','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply'];(function(_0x36d1af,_0xd5b07f){var _0x4db072=function(_0x12cbe7){while(--_0x12cbe7){_0x36d1af['push'](_0x36d1af['shift']());}};_0x4db072(++_0xd5b07f);}(_0xa55b,0x12d));var _0xba55=function(_0x10b20e,_0x3749a3){_0x10b20e=_0x10b20e-0x0;var _0x316ab3=_0xa55b[_0x10b20e];return _0x316ab3;};'use strict';var emlformat=require(_0xba55('0x0'));var rimraf=require(_0xba55('0x1'));var zipdir=require(_0xba55('0x2'));var jsonpatch=require(_0xba55('0x3'));var rp=require('request-promise');var moment=require(_0xba55('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xba55('0x5'));var util=require('util');var path=require(_0xba55('0x6'));var sox=require(_0xba55('0x7'));var csv=require(_0xba55('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xba55('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xba55('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xba55('0x8'));var querystring=require(_0xba55('0xb'));var Papa=require(_0xba55('0xc'));var Redis=require(_0xba55('0xd'));var authService=require('../../components/auth/service');var qs=require(_0xba55('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xba55('0xf'))(_0xba55('0x10'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xba55('0x11'))['db'];function respondWithStatusCode(_0x3eda7a,_0x548826){_0x548826=_0x548826||0xcc;return function(_0x1ed503){if(_0x1ed503){return _0x3eda7a['sendStatus'](_0x548826);}return _0x3eda7a[_0xba55('0x12')](_0x548826)['end']();};}function respondWithResult(_0x2eea84,_0x2366ad){_0x2366ad=_0x2366ad||0xc8;return function(_0x1ef7c6){if(_0x1ef7c6){return _0x2eea84[_0xba55('0x12')](_0x2366ad)[_0xba55('0x13')](_0x1ef7c6);}};}function respondWithFilteredResult(_0x3c7206,_0x4b3dd4){return function(_0x293674){if(_0x293674){var _0x3c72e8=typeof _0x4b3dd4[_0xba55('0x14')]===_0xba55('0x15')&&typeof _0x4b3dd4[_0xba55('0x16')]===_0xba55('0x15');var _0x367744=_0x293674[_0xba55('0x17')];var _0x38a3b2=_0x3c72e8?0x0:_0x4b3dd4['offset'];var _0x4e283a=_0x3c72e8?_0x293674[_0xba55('0x17')]:_0x4b3dd4[_0xba55('0x14')]+_0x4b3dd4[_0xba55('0x16')];var _0x12ef9b;if(_0x4e283a>=_0x367744){_0x4e283a=_0x367744;_0x12ef9b=0xc8;}else{_0x12ef9b=0xce;}_0x3c7206['status'](_0x12ef9b);return _0x3c7206[_0xba55('0x18')](_0xba55('0x19'),_0x38a3b2+'-'+_0x4e283a+'/'+_0x367744)['json'](_0x293674);}return null;};}function patchUpdates(_0xde57b2){return function(_0x292f06){try{jsonpatch[_0xba55('0x1a')](_0x292f06,_0xde57b2,!![]);}catch(_0x1faea0){return BPromise[_0xba55('0x1b')](_0x1faea0);}return _0x292f06[_0xba55('0x1c')]();};}function saveUpdates(_0x20e6f3,_0x4370e9){return function(_0x47a340){if(_0x47a340){return _0x47a340[_0xba55('0x1d')](_0x20e6f3)['then'](function(_0x1f7db3){return _0x1f7db3;});}return null;};}function removeEntity(_0x514c77,_0x43f311){return function(_0x330018){if(_0x330018){return _0x330018[_0xba55('0x1e')]()[_0xba55('0x1f')](function(){_0x514c77['status'](0xcc)[_0xba55('0x20')]();});}};}function handleEntityNotFound(_0x40e4a4,_0x440ddc){return function(_0x5d88f6){if(!_0x5d88f6){_0x40e4a4[_0xba55('0x21')](0x194);}return _0x5d88f6;};}function handleError(_0x1361bb,_0x303a30){_0x303a30=_0x303a30||0x1f4;return function(_0x5cfa8b){logger['error'](_0x5cfa8b['stack']);if(_0x5cfa8b[_0xba55('0x22')]){delete _0x5cfa8b['name'];}_0x1361bb[_0xba55('0x12')](_0x303a30)[_0xba55('0x23')](_0x5cfa8b);};}exports[_0xba55('0x1d')]=function(_0x1daa5a,_0x199ce4){if(_0x1daa5a[_0xba55('0x24')]['id']){delete _0x1daa5a[_0xba55('0x24')]['id'];}return db[_0xba55('0x25')][_0xba55('0x26')]({'where':{'id':_0x1daa5a['params']['id']}})['then'](handleEntityNotFound(_0x199ce4,null))[_0xba55('0x1f')](saveUpdates(_0x1daa5a['body'],null))[_0xba55('0x1f')](respondWithResult(_0x199ce4,null))[_0xba55('0x27')](handleError(_0x199ce4,null));};exports[_0xba55('0x1e')]=function(_0x3d0c68,_0x4c1265){return db['Action'][_0xba55('0x26')]({'where':{'id':_0x3d0c68[_0xba55('0x28')]['id']}})[_0xba55('0x1f')](handleEntityNotFound(_0x4c1265,null))[_0xba55('0x1f')](removeEntity(_0x4c1265,null))[_0xba55('0x27')](handleError(_0x4c1265,null));};
\ No newline at end of file
+var _0xa4d8=['../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','then','destroy','error','stack','name','send','body','find','params','catch','Action','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x26391b,_0x400fd2){var _0x125b20=function(_0x56b9f5){while(--_0x56b9f5){_0x26391b['push'](_0x26391b['shift']());}};_0x125b20(++_0x400fd2);}(_0xa4d8,0x113));var _0x8a4d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa4d8[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x8a4d('0x0'));var rimraf=require(_0x8a4d('0x1'));var zipdir=require(_0x8a4d('0x2'));var jsonpatch=require(_0x8a4d('0x3'));var rp=require(_0x8a4d('0x4'));var moment=require(_0x8a4d('0x5'));var BPromise=require(_0x8a4d('0x6'));var Mustache=require(_0x8a4d('0x7'));var util=require(_0x8a4d('0x8'));var path=require(_0x8a4d('0x9'));var sox=require('sox');var csv=require(_0x8a4d('0xa'));var ejs=require(_0x8a4d('0xb'));var fs=require('fs');var fs_extra=require(_0x8a4d('0xc'));var _=require('lodash');var squel=require(_0x8a4d('0xd'));var crypto=require(_0x8a4d('0xe'));var jsforce=require(_0x8a4d('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x8a4d('0xa'));var querystring=require(_0x8a4d('0x10'));var Papa=require('papaparse');var Redis=require(_0x8a4d('0x11'));var authService=require(_0x8a4d('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x8a4d('0x13'));var hardwareService=require(_0x8a4d('0x14'));var logger=require('../../config/logger')(_0x8a4d('0x15'));var utils=require(_0x8a4d('0x16'));var config=require(_0x8a4d('0x17'));var licenseUtil=require(_0x8a4d('0x18'));var db=require(_0x8a4d('0x19'))['db'];function respondWithStatusCode(_0x3918c7,_0x285421){_0x285421=_0x285421||0xcc;return function(_0x424122){if(_0x424122){return _0x3918c7[_0x8a4d('0x1a')](_0x285421);}return _0x3918c7[_0x8a4d('0x1b')](_0x285421)[_0x8a4d('0x1c')]();};}function respondWithResult(_0x5d92dd,_0x4f2b28){_0x4f2b28=_0x4f2b28||0xc8;return function(_0x3cf6dc){if(_0x3cf6dc){return _0x5d92dd[_0x8a4d('0x1b')](_0x4f2b28)['json'](_0x3cf6dc);}};}function respondWithFilteredResult(_0x1a9c7e,_0x5c32f3){return function(_0x397c83){if(_0x397c83){var _0x5dd069=typeof _0x5c32f3[_0x8a4d('0x1d')]===_0x8a4d('0x1e')&&typeof _0x5c32f3[_0x8a4d('0x1f')]===_0x8a4d('0x1e');var _0x3f7293=_0x397c83[_0x8a4d('0x20')];var _0xb280b4=_0x5dd069?0x0:_0x5c32f3[_0x8a4d('0x1d')];var _0x2f7d4c=_0x5dd069?_0x397c83[_0x8a4d('0x20')]:_0x5c32f3[_0x8a4d('0x1d')]+_0x5c32f3[_0x8a4d('0x1f')];var _0x152009;if(_0x2f7d4c>=_0x3f7293){_0x2f7d4c=_0x3f7293;_0x152009=0xc8;}else{_0x152009=0xce;}_0x1a9c7e[_0x8a4d('0x1b')](_0x152009);return _0x1a9c7e[_0x8a4d('0x21')](_0x8a4d('0x22'),_0xb280b4+'-'+_0x2f7d4c+'/'+_0x3f7293)[_0x8a4d('0x23')](_0x397c83);}return null;};}function patchUpdates(_0x598033){return function(_0x401852){try{jsonpatch[_0x8a4d('0x24')](_0x401852,_0x598033,!![]);}catch(_0x4bc9fa){return BPromise[_0x8a4d('0x25')](_0x4bc9fa);}return _0x401852[_0x8a4d('0x26')]();};}function saveUpdates(_0x455bcc,_0xba2eb0){return function(_0x34f6f9){if(_0x34f6f9){return _0x34f6f9['update'](_0x455bcc)[_0x8a4d('0x27')](function(_0x5d6825){return _0x5d6825;});}return null;};}function removeEntity(_0x30c844,_0x29940a){return function(_0x1c8899){if(_0x1c8899){return _0x1c8899[_0x8a4d('0x28')]()[_0x8a4d('0x27')](function(){_0x30c844[_0x8a4d('0x1b')](0xcc)[_0x8a4d('0x1c')]();});}};}function handleEntityNotFound(_0x423fdc,_0x1ada48){return function(_0x139b6a){if(!_0x139b6a){_0x423fdc['sendStatus'](0x194);}return _0x139b6a;};}function handleError(_0xe0ce89,_0x20f47a){_0x20f47a=_0x20f47a||0x1f4;return function(_0x3a3b1b){logger[_0x8a4d('0x29')](_0x3a3b1b[_0x8a4d('0x2a')]);if(_0x3a3b1b[_0x8a4d('0x2b')]){delete _0x3a3b1b['name'];}_0xe0ce89[_0x8a4d('0x1b')](_0x20f47a)[_0x8a4d('0x2c')](_0x3a3b1b);};}exports['update']=function(_0x2dbf25,_0x37f5e4){if(_0x2dbf25[_0x8a4d('0x2d')]['id']){delete _0x2dbf25[_0x8a4d('0x2d')]['id'];}return db['Action'][_0x8a4d('0x2e')]({'where':{'id':_0x2dbf25[_0x8a4d('0x2f')]['id']}})[_0x8a4d('0x27')](handleEntityNotFound(_0x37f5e4,null))[_0x8a4d('0x27')](saveUpdates(_0x2dbf25[_0x8a4d('0x2d')],null))[_0x8a4d('0x27')](respondWithResult(_0x37f5e4,null))[_0x8a4d('0x30')](handleError(_0x37f5e4,null));};exports[_0x8a4d('0x28')]=function(_0x12be2c,_0x22f5b8){return db[_0x8a4d('0x31')]['find']({'where':{'id':_0x12be2c[_0x8a4d('0x2f')]['id']}})[_0x8a4d('0x27')](handleEntityNotFound(_0x22f5b8,null))[_0x8a4d('0x27')](removeEntity(_0x22f5b8,null))[_0x8a4d('0x30')](handleError(_0x22f5b8,null));};
\ No newline at end of file
diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js
index 3ecaf47..2c8110a 100644
--- a/server/api/action/action.model.js
+++ b/server/api/action/action.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0706=['tools_actions','lodash','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./action.attributes','define','Action'];(function(_0x50d4b5,_0x183b95){var _0x29f3a2=function(_0x3298d6){while(--_0x3298d6){_0x50d4b5['push'](_0x50d4b5['shift']());}};_0x29f3a2(++_0x183b95);}(_0x0706,0x91));var _0x6070=function(_0x240c42,_0x33f5c1){_0x240c42=_0x240c42-0x0;var _0x53d6e2=_0x0706[_0x240c42];return _0x53d6e2;};'use strict';var _=require(_0x6070('0x0'));var util=require('util');var logger=require(_0x6070('0x1'))(_0x6070('0x2'));var moment=require(_0x6070('0x3'));var BPromise=require('bluebird');var rp=require(_0x6070('0x4'));var fs=require('fs');var path=require(_0x6070('0x5'));var rimraf=require(_0x6070('0x6'));var config=require(_0x6070('0x7'));var attributes=require(_0x6070('0x8'));module['exports']=function(_0x57f651,_0x35b3b2){return _0x57f651[_0x6070('0x9')](_0x6070('0xa'),attributes,{'tableName':_0x6070('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc92f=['util','api','moment','bluebird','request-promise','../../config/environment','define','Action'];(function(_0x319f6a,_0x275780){var _0x5b6a99=function(_0x415f3e){while(--_0x415f3e){_0x319f6a['push'](_0x319f6a['shift']());}};_0x5b6a99(++_0x275780);}(_0xc92f,0x140));var _0xfc92=function(_0x20197d,_0x309583){_0x20197d=_0x20197d-0x0;var _0x27a6de=_0xc92f[_0x20197d];return _0x27a6de;};'use strict';var _=require('lodash');var util=require(_0xfc92('0x0'));var logger=require('../../config/logger')(_0xfc92('0x1'));var moment=require(_0xfc92('0x2'));var BPromise=require(_0xfc92('0x3'));var rp=require(_0xfc92('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xfc92('0x5'));var attributes=require('./action.attributes');module['exports']=function(_0x4a23ca,_0xe54672){return _0x4a23ca[_0xfc92('0x6')](_0xfc92('0x7'),attributes,{'tableName':'tools_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/action/action.rpc.js b/server/api/action/action.rpc.js
index 383964a..392e935 100644
--- a/server/api/action/action.rpc.js
+++ b/server/api/action/action.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1cb9=['error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','stringify'];(function(_0xaa0309,_0x1c8008){var _0x5de7ce=function(_0x3aa6ae){while(--_0x3aa6ae){_0xaa0309['push'](_0xaa0309['shift']());}};_0x5de7ce(++_0x1c8008);}(_0x1cb9,0x14e));var _0x91cb=function(_0x1c7537,_0x430bef){_0x1c7537=_0x1c7537-0x0;var _0x3ec507=_0x1cb9[_0x1c7537];return _0x3ec507;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var moment=require(_0x91cb('0x1'));var BPromise=require(_0x91cb('0x2'));var rs=require(_0x91cb('0x3'));var fs=require('fs');var Redis=require(_0x91cb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x91cb('0x5'));var logger=require(_0x91cb('0x6'))('rpc');var config=require(_0x91cb('0x7'));var jayson=require(_0x91cb('0x8'));var client=jayson[_0x91cb('0x9')][_0x91cb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3b9d98,_0x8f8a3b,_0x4c1f56){return new BPromise(function(_0x15c517,_0x5bda2f){return client[_0x91cb('0xb')](_0x3b9d98,_0x4c1f56)['then'](function(_0xa43e7a){logger[_0x91cb('0xc')](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));logger[_0x91cb('0xf')](_0x91cb('0x10'),_0x8f8a3b,_0x91cb('0xe'),JSON[_0x91cb('0x11')](_0xa43e7a));if(_0xa43e7a[_0x91cb('0x12')]){if(_0xa43e7a[_0x91cb('0x12')]['code']===0x1f4){logger[_0x91cb('0x12')](_0x91cb('0xd'),_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x5bda2f(_0xa43e7a[_0x91cb('0x12')][_0x91cb('0x13')]);}logger[_0x91cb('0x12')]('Action,\x20%s,\x20%s',_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x15c517(_0xa43e7a[_0x91cb('0x12')]['message']);}else{logger['info'](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));_0x15c517(_0xa43e7a[_0x91cb('0x14')]['message']);}})[_0x91cb('0x15')](function(_0x135890){logger['error'](_0x91cb('0xd'),_0x8f8a3b,_0x135890);_0x5bda2f(_0x135890);});});}
\ No newline at end of file
+var _0xabce=['util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','then','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash'];(function(_0x1b9030,_0x46f431){var _0x1bae3d=function(_0x5dfbd4){while(--_0x5dfbd4){_0x1b9030['push'](_0x1b9030['shift']());}};_0x1bae3d(++_0x46f431);}(_0xabce,0x103));var _0xeabc=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xabce[_0x6131cd];return _0x47e916;};'use strict';var _=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var moment=require(_0xeabc('0x2'));var BPromise=require(_0xeabc('0x3'));var rs=require(_0xeabc('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xeabc('0x5'));var logger=require(_0xeabc('0x6'))(_0xeabc('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xeabc('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x229ba4,_0x52ede8,_0x3bdc29){return new BPromise(function(_0x9417af,_0x8434c5){return client['request'](_0x229ba4,_0x3bdc29)[_0xeabc('0x9')](function(_0x341f16){logger[_0xeabc('0xa')](_0xeabc('0xb'),_0x52ede8,_0xeabc('0xc'));logger[_0xeabc('0xd')](_0xeabc('0xe'),_0x52ede8,_0xeabc('0xc'),JSON[_0xeabc('0xf')](_0x341f16));if(_0x341f16[_0xeabc('0x10')]){if(_0x341f16[_0xeabc('0x10')][_0xeabc('0x11')]===0x1f4){logger[_0xeabc('0x10')](_0xeabc('0xb'),_0x52ede8,_0x341f16[_0xeabc('0x10')][_0xeabc('0x12')]);return _0x8434c5(_0x341f16['error'][_0xeabc('0x12')]);}logger[_0xeabc('0x10')](_0xeabc('0xb'),_0x52ede8,_0x341f16['error']['message']);return _0x9417af(_0x341f16[_0xeabc('0x10')][_0xeabc('0x12')]);}else{logger[_0xeabc('0xa')]('Action,\x20%s,\x20%s',_0x52ede8,_0xeabc('0xc'));_0x9417af(_0x341f16[_0xeabc('0x13')]['message']);}})['catch'](function(_0x10fa8e){logger['error'](_0xeabc('0xb'),_0x52ede8,_0x10fa8e);_0x8434c5(_0x10fa8e);});});}
\ No newline at end of file
diff --git a/server/api/action/index.js b/server/api/action/index.js
index b92a3af..5663f00 100644
--- a/server/api/action/index.js
+++ b/server/api/action/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbe9f=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./action.controller','/:id','delete','isAuthenticated','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x4640f3,_0x2637a4){var _0x4e1a6c=function(_0x42e872){while(--_0x42e872){_0x4640f3['push'](_0x4640f3['shift']());}};_0x4e1a6c(++_0x2637a4);}(_0xbe9f,0x8a));var _0xfbe9=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xbe9f[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0xfbe9('0x0'));var util=require(_0xfbe9('0x1'));var path=require(_0xfbe9('0x2'));var timeout=require(_0xfbe9('0x3'));var express=require(_0xfbe9('0x4'));var router=express[_0xfbe9('0x5')]();var fs_extra=require(_0xfbe9('0x6'));var auth=require(_0xfbe9('0x7'));var interaction=require(_0xfbe9('0x8'));var config=require(_0xfbe9('0x9'));var controller=require(_0xfbe9('0xa'));router['put'](_0xfbe9('0xb'),auth['isAuthenticated'](),controller['update']);router[_0xfbe9('0xc')](_0xfbe9('0xb'),auth[_0xfbe9('0xd')](),controller[_0xfbe9('0xe')]);module[_0xfbe9('0xf')]=router;
\ No newline at end of file
+var _0x2cf0=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./action.controller','put','/:id','isAuthenticated','update','delete','destroy','exports','path'];(function(_0x4c8527,_0x5ca4f6){var _0x45e35b=function(_0x312754){while(--_0x312754){_0x4c8527['push'](_0x4c8527['shift']());}};_0x45e35b(++_0x5ca4f6);}(_0x2cf0,0x1b2));var _0x02cf=function(_0xcb3048,_0x2546d5){_0xcb3048=_0xcb3048-0x0;var _0x3fee9c=_0x2cf0[_0xcb3048];return _0x3fee9c;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x02cf('0x0'));var timeout=require(_0x02cf('0x1'));var express=require(_0x02cf('0x2'));var router=express[_0x02cf('0x3')]();var fs_extra=require(_0x02cf('0x4'));var auth=require(_0x02cf('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x02cf('0x6'));var controller=require(_0x02cf('0x7'));router[_0x02cf('0x8')](_0x02cf('0x9'),auth[_0x02cf('0xa')](),controller[_0x02cf('0xb')]);router[_0x02cf('0xc')](_0x02cf('0x9'),auth[_0x02cf('0xa')](),controller[_0x02cf('0xd')]);module[_0x02cf('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
index c3def4a..d8bbfd5 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.attributes.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xee14=['STRING','TEXT'];(function(_0x2c732c,_0x3ad39a){var _0x2ccda3=function(_0x33ffb2){while(--_0x33ffb2){_0x2c732c['push'](_0x2c732c['shift']());}};_0x2ccda3(++_0x3ad39a);}(_0xee14,0x13a));var _0x4ee1=function(_0x44f657,_0x48083a){_0x44f657=_0x44f657-0x0;var _0x222d57=_0xee14[_0x44f657];return _0x222d57;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x4ee1('0x0')],'allowNull':![]},'description':{'type':Sequelize[_0x4ee1('0x0')]},'parent':{'type':Sequelize[_0x4ee1('0x0')]},'table':{'type':Sequelize[_0x4ee1('0x0')]},'conditions':{'type':Sequelize[_0x4ee1('0x1')]},'joins':{'type':Sequelize[_0x4ee1('0x1')]}};
\ No newline at end of file
+var _0xbd51=['sequelize','STRING'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0xbd51,0x1a8));var _0x1bd5=function(_0x381d60,_0x371669){_0x381d60=_0x381d60-0x0;var _0x37dd97=_0xbd51[_0x381d60];return _0x37dd97;};'use strict';var Sequelize=require(_0x1bd5('0x0'));module['exports']={'name':{'type':Sequelize[_0x1bd5('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x1bd5('0x1')]},'parent':{'type':Sequelize[_0x1bd5('0x1')]},'table':{'type':Sequelize[_0x1bd5('0x1')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js
index c53f702..38f2a07 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.controller.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x62ba=['limit','count','status','set','Content-Range','update','then','destroy','get','UserProfileResource','sendStatus','error','name','send','index','map','AnalyticCustomReport','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','length','nolimit','order','sort','pick','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','fields','catch','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','Reports','UserProfileSection','userProfileId','autoAssociation','CustomReports','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','find','params','join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','group','field','condition','value','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','select','from','table','MetricId','metric','function','format','replace','groupBy','orderBy','joins','includes','parentKey','foreignKey','foreignTable','parse','clone','debug','sequelize','toString','QueryTypes','MIN(%s)','AVG(%s)','IS\x20NOT\x20EMPTY','operator','AnalyticMetric','DESC','alias','%s.%s\x20=\x20%s.%s','conditions','web','%s-%s.%s','randomstring','output','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','fork','../../components/export/','../../files/reports','countTable','COUNT(*)','SELECT','run','runReport','left_join','ROUND(%s)','keyBy','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','json','offset','undefined'];(function(_0x5eb593,_0x43c687){var _0x237928=function(_0x2816fc){while(--_0x2816fc){_0x5eb593['push'](_0x5eb593['shift']());}};_0x237928(++_0x43c687);}(_0x62ba,0x1cd));var _0xa62b=function(_0x4767b2,_0x58d23f){_0x4767b2=_0x4767b2-0x0;var _0x485ba0=_0x62ba[_0x4767b2];return _0x485ba0;};'use strict';var emlformat=require(_0xa62b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa62b('0x1'));var jsonpatch=require(_0xa62b('0x2'));var rp=require(_0xa62b('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xa62b('0x4'));var util=require(_0xa62b('0x5'));var path=require('path');var sox=require(_0xa62b('0x6'));var csv=require(_0xa62b('0x7'));var ejs=require(_0xa62b('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xa62b('0x9'));var squel=require(_0xa62b('0xa'));var crypto=require(_0xa62b('0xb'));var jsforce=require(_0xa62b('0xc'));var deskjs=require(_0xa62b('0xd'));var toCsv=require(_0xa62b('0x7'));var querystring=require(_0xa62b('0xe'));var Papa=require('papaparse');var Redis=require(_0xa62b('0xf'));var authService=require(_0xa62b('0x10'));var qs=require(_0xa62b('0x11'));var as=require(_0xa62b('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa62b('0x13'))('api');var utils=require(_0xa62b('0x14'));var config=require(_0xa62b('0x15'));var licenseUtil=require(_0xa62b('0x16'));var db=require('../../mysqldb')['db'];var dbH=require(_0xa62b('0x17'))['dbH'];function respondWithStatusCode(_0x16b16f,_0x5efe6c){_0x5efe6c=_0x5efe6c||0xcc;return function(_0x1e0f3a){if(_0x1e0f3a){return _0x16b16f['sendStatus'](_0x5efe6c);}return _0x16b16f['status'](_0x5efe6c)[_0xa62b('0x18')]();};}function respondWithResult(_0x580c87,_0x57ea7f){_0x57ea7f=_0x57ea7f||0xc8;return function(_0x3c61b5){if(_0x3c61b5){return _0x580c87['status'](_0x57ea7f)[_0xa62b('0x19')](_0x3c61b5);}};}function respondWithFilteredResult(_0x50e164,_0x5e2c98){return function(_0x40adcf){if(_0x40adcf){var _0x529405=typeof _0x5e2c98[_0xa62b('0x1a')]===_0xa62b('0x1b')&&typeof _0x5e2c98[_0xa62b('0x1c')]==='undefined';var _0xe01f06=_0x40adcf[_0xa62b('0x1d')];var _0x30a267=_0x529405?0x0:_0x5e2c98[_0xa62b('0x1a')];var _0x18b769=_0x529405?_0x40adcf[_0xa62b('0x1d')]:_0x5e2c98[_0xa62b('0x1a')]+_0x5e2c98[_0xa62b('0x1c')];var _0x5cc198;if(_0x18b769>=_0xe01f06){_0x18b769=_0xe01f06;_0x5cc198=0xc8;}else{_0x5cc198=0xce;}_0x50e164[_0xa62b('0x1e')](_0x5cc198);return _0x50e164[_0xa62b('0x1f')](_0xa62b('0x20'),_0x30a267+'-'+_0x18b769+'/'+_0xe01f06)['json'](_0x40adcf);}return null;};}function patchUpdates(_0x1c4e1f){return function(_0x5c47c9){try{jsonpatch['apply'](_0x5c47c9,_0x1c4e1f,!![]);}catch(_0x37dc69){return BPromise['reject'](_0x37dc69);}return _0x5c47c9['save']();};}function saveUpdates(_0x327851,_0x169ca3){return function(_0x238487){if(_0x238487){return _0x238487[_0xa62b('0x21')](_0x327851)[_0xa62b('0x22')](function(_0xb48827){return _0xb48827;});}return null;};}function removeEntity(_0x6aa24a,_0x42a4b4){return function(_0x3e263b){if(_0x3e263b){return _0x3e263b[_0xa62b('0x23')]()['then'](function(){var _0x4d57a5=_0x3e263b[_0xa62b('0x24')]({'plain':!![]});var _0x20a323='CustomReports';return db[_0xa62b('0x25')]['destroy']({'where':{'type':_0x20a323,'resourceId':_0x4d57a5['id']}})[_0xa62b('0x22')](function(){return _0x3e263b;});})[_0xa62b('0x22')](function(){_0x6aa24a[_0xa62b('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d86a0,_0x25f2f5){return function(_0x133857){if(!_0x133857){_0x3d86a0[_0xa62b('0x26')](0x194);}return _0x133857;};}function handleError(_0x5c6b2c,_0x571304){_0x571304=_0x571304||0x1f4;return function(_0x2c1915){logger[_0xa62b('0x27')](_0x2c1915['stack']);if(_0x2c1915[_0xa62b('0x28')]){delete _0x2c1915[_0xa62b('0x28')];}_0x5c6b2c[_0xa62b('0x1e')](_0x571304)[_0xa62b('0x29')](_0x2c1915);};}exports[_0xa62b('0x2a')]=function(_0x1622de,_0x1b5753){var _0x5dfc33={},_0x14de0e={},_0x1a14d3={'count':0x0,'rows':[]};var _0x4f01cf=_[_0xa62b('0x2b')](db[_0xa62b('0x2c')][_0xa62b('0x2d')],function(_0x39ee64){return{'name':_0x39ee64[_0xa62b('0x2e')],'type':_0x39ee64[_0xa62b('0x2f')][_0xa62b('0x30')]};});_0x14de0e[_0xa62b('0x31')]=_[_0xa62b('0x2b')](_0x4f01cf,'name');_0x14de0e['query']=_[_0xa62b('0x32')](_0x1622de['query']);_0x14de0e[_0xa62b('0x33')]=_[_0xa62b('0x34')](_0x14de0e[_0xa62b('0x31')],_0x14de0e[_0xa62b('0x35')]);_0x5dfc33[_0xa62b('0x36')]=_[_0xa62b('0x34')](_0x14de0e[_0xa62b('0x31')],qs['fields'](_0x1622de[_0xa62b('0x35')]['fields']));_0x5dfc33[_0xa62b('0x36')]=_0x5dfc33['attributes'][_0xa62b('0x37')]?_0x5dfc33[_0xa62b('0x36')]:_0x14de0e[_0xa62b('0x31')];if(!_0x1622de[_0xa62b('0x35')]['hasOwnProperty'](_0xa62b('0x38'))){_0x5dfc33['limit']=qs[_0xa62b('0x1c')](_0x1622de[_0xa62b('0x35')]['limit']);_0x5dfc33[_0xa62b('0x1a')]=qs[_0xa62b('0x1a')](_0x1622de[_0xa62b('0x35')][_0xa62b('0x1a')]);}_0x5dfc33[_0xa62b('0x39')]=qs[_0xa62b('0x3a')](_0x1622de[_0xa62b('0x35')]['sort']);_0x5dfc33['where']=qs[_0xa62b('0x33')](_[_0xa62b('0x3b')](_0x1622de[_0xa62b('0x35')],_0x14de0e[_0xa62b('0x33')]),_0x4f01cf);if(_0x1622de[_0xa62b('0x35')]['filter']){_0x5dfc33[_0xa62b('0x3c')]=_[_0xa62b('0x3d')](_0x5dfc33[_0xa62b('0x3c')],{'$or':_[_0xa62b('0x2b')](_0x4f01cf,function(_0x5d3af9){if(_0x5d3af9[_0xa62b('0x2f')]!==_0xa62b('0x3e')){var _0x181120={};_0x181120[_0x5d3af9[_0xa62b('0x28')]]={'$like':'%'+_0x1622de[_0xa62b('0x35')][_0xa62b('0x3f')]+'%'};return _0x181120;}})});}_0x5dfc33=_[_0xa62b('0x3d')]({},_0x5dfc33,_0x1622de[_0xa62b('0x40')]);var _0x23b99f={'where':_0x5dfc33[_0xa62b('0x3c')]};return db['AnalyticCustomReport'][_0xa62b('0x1d')](_0x23b99f)[_0xa62b('0x22')](function(_0x1b7ce1){_0x1a14d3['count']=_0x1b7ce1;if(_0x1622de[_0xa62b('0x35')][_0xa62b('0x41')]){_0x5dfc33[_0xa62b('0x42')]=[{'all':!![]}];}return db[_0xa62b('0x2c')][_0xa62b('0x43')](_0x5dfc33);})[_0xa62b('0x22')](function(_0x45ddc2){_0x1a14d3[_0xa62b('0x44')]=_0x45ddc2;return _0x1a14d3;})[_0xa62b('0x22')](respondWithFilteredResult(_0x1b5753,_0x5dfc33))['catch'](handleError(_0x1b5753,null));};exports['show']=function(_0x28b95d,_0x32ddd6){var _0x2fdac2={'raw':![],'where':{'id':_0x28b95d['params']['id']}},_0x21d184={};_0x21d184[_0xa62b('0x31')]=_[_0xa62b('0x32')](db[_0xa62b('0x2c')][_0xa62b('0x2d')]);_0x21d184['query']=_[_0xa62b('0x32')](_0x28b95d[_0xa62b('0x35')]);_0x21d184[_0xa62b('0x33')]=_[_0xa62b('0x34')](_0x21d184[_0xa62b('0x31')],_0x21d184['query']);_0x2fdac2[_0xa62b('0x36')]=_[_0xa62b('0x34')](_0x21d184['model'],qs[_0xa62b('0x45')](_0x28b95d[_0xa62b('0x35')][_0xa62b('0x45')]));_0x2fdac2[_0xa62b('0x36')]=_0x2fdac2[_0xa62b('0x36')]['length']?_0x2fdac2[_0xa62b('0x36')]:_0x21d184['model'];if(_0x28b95d[_0xa62b('0x35')]['includeAll']){_0x2fdac2[_0xa62b('0x42')]=[{'all':!![]}];}_0x2fdac2=_['merge']({},_0x2fdac2,_0x28b95d[_0xa62b('0x40')]);return db[_0xa62b('0x2c')]['find'](_0x2fdac2)['then'](handleEntityNotFound(_0x32ddd6,null))['then'](respondWithResult(_0x32ddd6,null))[_0xa62b('0x46')](handleError(_0x32ddd6,null));};exports[_0xa62b('0x47')]=function(_0x1f8ad1,_0x20f05f){return db[_0xa62b('0x2c')][_0xa62b('0x47')](_0x1f8ad1['body'],{})[_0xa62b('0x22')](function(_0x27e8e0){var _0xfe364f=_0x1f8ad1['user'][_0xa62b('0x24')]({'plain':!![]});if(!_0xfe364f)throw new Error(_0xa62b('0x48'));if(_0xfe364f['role']===_0xa62b('0x49')){var _0x40942e=_0x27e8e0[_0xa62b('0x24')]({'plain':!![]});var _0x1d1481=_0xa62b('0x4a');return db[_0xa62b('0x4b')]['find']({'where':{'name':_0x1d1481,'userProfileId':_0xfe364f[_0xa62b('0x4c')]},'raw':!![]})[_0xa62b('0x22')](function(_0x3084be){if(_0x3084be&&_0x3084be[_0xa62b('0x4d')]===0x0){return db[_0xa62b('0x25')][_0xa62b('0x47')]({'name':_0x40942e[_0xa62b('0x28')],'resourceId':_0x40942e['id'],'type':_0xa62b('0x4e'),'sectionId':_0x3084be['id']},{})[_0xa62b('0x22')](function(){return _0x27e8e0;});}else{return _0x27e8e0;}})[_0xa62b('0x46')](function(_0x2e4bd5){logger['error'](_0xa62b('0x4f'),_0x2e4bd5);throw _0x2e4bd5;});}return _0x27e8e0;})[_0xa62b('0x22')](respondWithResult(_0x20f05f,0xc9))[_0xa62b('0x46')](handleError(_0x20f05f,null));};exports['update']=function(_0x547916,_0x521e86){if(_0x547916[_0xa62b('0x50')]['id']){delete _0x547916[_0xa62b('0x50')]['id'];}return db[_0xa62b('0x2c')][_0xa62b('0x51')]({'where':{'id':_0x547916[_0xa62b('0x52')]['id']}})[_0xa62b('0x22')](handleEntityNotFound(_0x521e86,null))['then'](saveUpdates(_0x547916[_0xa62b('0x50')],null))[_0xa62b('0x22')](respondWithResult(_0x521e86,null))[_0xa62b('0x46')](handleError(_0x521e86,null));};exports[_0xa62b('0x23')]=function(_0x2f993b,_0x3df75c){return db[_0xa62b('0x2c')][_0xa62b('0x51')]({'where':{'id':_0x2f993b['params']['id']}})[_0xa62b('0x22')](handleEntityNotFound(_0x3df75c,null))[_0xa62b('0x22')](removeEntity(_0x3df75c,null))[_0xa62b('0x46')](handleError(_0x3df75c,null));};exports['preview']=function(_0x2be91f,_0x40407c){var _0x38545d=0xa;var _0x58fd69=[_0xa62b('0x53'),'left_join',_0xa62b('0x54'),_0xa62b('0x55')];var _0x38dbda={'SUM':_0xa62b('0x56'),'COUNT':_0xa62b('0x57'),'COUNT DISTINCT':_0xa62b('0x58'),'MAX':_0xa62b('0x59'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0xa62b('0x5a'),'GROUP_CONCAT ASC':_0xa62b('0x5b'),'GROUP_CONCAT DESC':_0xa62b('0x5c')};var _0xf1531c={'SEC_TO_TIME':_0xa62b('0x5d'),'DATE':_0xa62b('0x5e'),'HOUR':_0xa62b('0x5f'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0xa62b('0x60')};var _0xa347ea=function(_0x33a181){return!_['includes']([_0xa62b('0x61'),_0xa62b('0x62'),_0xa62b('0x63'),'IS\x20NOT\x20EMPTY'],_0x33a181);};var _0x142f86=function(_0x5c401e){if(!_0x5c401e||!_0x5c401e['rules'][_0xa62b('0x37')]){return'';}for(var _0x31f14c='(',_0x4c1658=0x0;_0x4c1658<_0x5c401e[_0xa62b('0x64')][_0xa62b('0x37')];_0x4c1658+=0x1){_0x4c1658>0x0&&(_0x31f14c+='\x20'+_0x5c401e['operator']+'\x20');_0x31f14c+=_0x5c401e[_0xa62b('0x64')][_0x4c1658][_0xa62b('0x65')]?_0x142f86(_0x5c401e[_0xa62b('0x64')][_0x4c1658]['group']):_0x5c401e[_0xa62b('0x64')][_0x4c1658][_0xa62b('0x66')]+'\x20'+_0x5c401e[_0xa62b('0x64')][_0x4c1658][_0xa62b('0x67')]+(_0xa347ea(_0x5c401e[_0xa62b('0x64')][_0x4c1658][_0xa62b('0x67')])?'\x20'+_0x5c401e[_0xa62b('0x64')][_0x4c1658][_0xa62b('0x68')]:'');}return _0x31f14c+')';};var _0x13fc8b={'where':{'id':_0x2be91f[_0xa62b('0x52')]['id']}},_0x59555d,_0x1cc9fe,_0x558717,_0x43a1ae,_0x208037;_0x13fc8b=_[_0xa62b('0x3d')]({},_0x13fc8b,_0x2be91f[_0xa62b('0x40')]);return db['AnalyticCustomReport'][_0xa62b('0x51')](_0x13fc8b)[_0xa62b('0x22')](function(_0x3e02dd){if(_0x3e02dd){_0x59555d=_0x3e02dd;return _0x3e02dd[_0xa62b('0x69')]();}return null;})[_0xa62b('0x22')](function(_0x357fc2){if(_0x357fc2){if(!_0x357fc2['length']){throw new db[(_0xa62b('0x6a'))][(_0xa62b('0x6b'))](_0xa62b('0x6c'),0x193);}_0x1cc9fe=_0x357fc2;return db['AnalyticMetric'][_0xa62b('0x43')]({'raw':!![]});}return null;})[_0xa62b('0x22')](function(_0x282934){if(_0x282934){_0x558717=_['keyBy'](_0x282934,'id');var _0x266c79;var _0x4f360d=squel[_0xa62b('0x6d')]();_0x4f360d[_0xa62b('0x6e')](_0x59555d[_0xa62b('0x6f')]);for(var _0x2c60af=0x0;_0x2c60af<_0x1cc9fe[_0xa62b('0x37')];_0x2c60af+=0x1){_0x266c79=_0x1cc9fe[_0x2c60af]['MetricId']?_0x558717[_0x1cc9fe[_0x2c60af][_0xa62b('0x70')]][_0xa62b('0x71')]:_0x1cc9fe[_0x2c60af]['field'];_0x266c79=_0x1cc9fe[_0x2c60af]['function']?_['replace'](_0x38dbda[_0x1cc9fe[_0x2c60af][_0xa62b('0x72')]],'%s',_0x266c79):_0x266c79;_0x266c79=_0x1cc9fe[_0x2c60af][_0xa62b('0x73')]?_[_0xa62b('0x74')](_0xf1531c[_0x1cc9fe[_0x2c60af]['format']],'%s',_0x266c79):_0x266c79;if(_0x1cc9fe[_0x2c60af][_0xa62b('0x75')]){_0x4f360d[_0xa62b('0x65')](_0x266c79);}_0x1cc9fe[_0x2c60af][_0xa62b('0x76')]&&_0x4f360d[_0xa62b('0x39')](_0x266c79,_0x1cc9fe[_0x2c60af][_0xa62b('0x76')]==='DESC'?![]:!![]);_0x4f360d[_0xa62b('0x66')](_0x266c79,_0x1cc9fe[_0x2c60af]['alias']||_0x266c79);}if(_0x59555d['joins']){_0x59555d[_0xa62b('0x77')]=JSON['parse'](_0x59555d['joins']);for(var _0x43d1db=0x0;_0x43d1db<_0x59555d[_0xa62b('0x77')][_0xa62b('0x37')];_0x43d1db+=0x1){if(_0x59555d[_0xa62b('0x77')][_0x43d1db]['type']&&_[_0xa62b('0x78')](_0x58fd69,_0x59555d['joins'][_0x43d1db]['type'])&&_0x59555d[_0xa62b('0x77')][_0x43d1db][_0xa62b('0x79')]&&_0x59555d[_0xa62b('0x77')][_0x43d1db]['foreignTable']&&_0x59555d[_0xa62b('0x77')][_0x43d1db][_0xa62b('0x7a')]){_0x4f360d[_0x59555d[_0xa62b('0x77')][_0x43d1db][_0xa62b('0x2f')]](_0x59555d[_0xa62b('0x77')][_0x43d1db][_0xa62b('0x7b')],null,util[_0xa62b('0x73')]('%s.%s\x20=\x20%s.%s',_0x59555d[_0xa62b('0x6f')],_0x59555d[_0xa62b('0x77')][_0x43d1db][_0xa62b('0x79')],_0x59555d[_0xa62b('0x77')][_0x43d1db]['foreignTable'],_0x59555d[_0xa62b('0x77')][_0x43d1db]['foreignKey']));}}}if(_0x59555d['conditions']){_0x59555d['conditions']=JSON[_0xa62b('0x7c')](_0x59555d['conditions']);_0x4f360d[_0xa62b('0x3c')](_0x142f86(_0x59555d['conditions'][_0xa62b('0x65')]));}_0x208037=_0x4f360d[_0xa62b('0x7d')]();_0x4f360d['limit'](_0x38545d);_0x4f360d['offset'](0x0);logger[_0xa62b('0x7e')]('Limited\x20Query:',_0x4f360d['toString']());return dbH[_0xa62b('0x7f')][_0xa62b('0x35')](_0x4f360d[_0xa62b('0x80')](),{'type':dbH[_0xa62b('0x7f')][_0xa62b('0x81')]['SELECT']});}})['then'](respondWithResult(_0x40407c,null))[_0xa62b('0x46')](handleError(_0x40407c,null));};function runReport(_0x53f0a8,_0xc2cc45,_0x4ba1dd){var _0x26435b=_0xc2cc45[_0xa62b('0x28')];var _0x4765fa=0xa;var _0x56eb1b=[_0xa62b('0x53'),'left_join',_0xa62b('0x54'),'cross_join'];var _0x4764f5={'SUM':'SUM(%s)','COUNT':_0xa62b('0x57'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xa62b('0x59'),'MIN':_0xa62b('0x82'),'AVG':_0xa62b('0x83'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xa62b('0x5c')};var _0x162d31={'SEC_TO_TIME':_0xa62b('0x5d'),'DATE':_0xa62b('0x5e'),'HOUR':_0xa62b('0x5f'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x51fef1=function(_0x501a3e){return!_[_0xa62b('0x78')]([_0xa62b('0x61'),_0xa62b('0x62'),'IS\x20EMPTY',_0xa62b('0x84')],_0x501a3e);};var _0x4c78ac=function(_0x57ede7){if(!_0x57ede7||!_0x57ede7[_0xa62b('0x64')][_0xa62b('0x37')]){return'';}for(var _0xb3855f='(',_0x4b9e0e=0x0;_0x4b9e0e<_0x57ede7[_0xa62b('0x64')][_0xa62b('0x37')];_0x4b9e0e+=0x1){_0x4b9e0e>0x0&&(_0xb3855f+='\x20'+_0x57ede7[_0xa62b('0x85')]+'\x20');_0xb3855f+=_0x57ede7[_0xa62b('0x64')][_0x4b9e0e][_0xa62b('0x65')]?_0x4c78ac(_0x57ede7['rules'][_0x4b9e0e][_0xa62b('0x65')]):_0x57ede7[_0xa62b('0x64')][_0x4b9e0e]['field']+'\x20'+_0x57ede7[_0xa62b('0x64')][_0x4b9e0e]['condition']+(_0x51fef1(_0x57ede7[_0xa62b('0x64')][_0x4b9e0e][_0xa62b('0x67')])?'\x20'+_0x57ede7['rules'][_0x4b9e0e][_0xa62b('0x68')]:'');}return _0xb3855f+')';};var _0x3fc3f7={'where':{'id':_0x53f0a8['id']}},_0x31e997,_0x265ab2,_0x57a229,_0x17a620,_0x125fca;_0x3fc3f7=_[_0xa62b('0x3d')]({},_0x3fc3f7,_0x4ba1dd);return db[_0xa62b('0x2c')][_0xa62b('0x51')](_0x3fc3f7)[_0xa62b('0x22')](function(_0x5e1fac){if(_0x5e1fac){_0x31e997=_0x5e1fac;return _0x5e1fac[_0xa62b('0x69')]();}return null;})[_0xa62b('0x22')](function(_0x570291){if(_0x570291){if(!_0x570291['length']){throw new db[(_0xa62b('0x6a'))][(_0xa62b('0x6b'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x265ab2=_0x570291;return db[_0xa62b('0x86')][_0xa62b('0x43')]({'raw':!![]});}return null;})['then'](function(_0x61f3ee){if(_0x61f3ee){_0x57a229=_['keyBy'](_0x61f3ee,'id');var _0x28cb75;var _0x5650b0=squel[_0xa62b('0x6d')]();_0x5650b0[_0xa62b('0x6e')](_0x31e997[_0xa62b('0x6f')]);for(var _0x2db5f5=0x0;_0x2db5f5<_0x265ab2[_0xa62b('0x37')];_0x2db5f5+=0x1){_0x28cb75=_0x265ab2[_0x2db5f5][_0xa62b('0x70')]?_0x57a229[_0x265ab2[_0x2db5f5][_0xa62b('0x70')]][_0xa62b('0x71')]:_0x265ab2[_0x2db5f5]['field'];_0x28cb75=_0x265ab2[_0x2db5f5][_0xa62b('0x72')]?_[_0xa62b('0x74')](_0x4764f5[_0x265ab2[_0x2db5f5]['function']],'%s',_0x28cb75):_0x28cb75;_0x28cb75=_0x265ab2[_0x2db5f5][_0xa62b('0x73')]?_[_0xa62b('0x74')](_0x162d31[_0x265ab2[_0x2db5f5][_0xa62b('0x73')]],'%s',_0x28cb75):_0x28cb75;if(_0x265ab2[_0x2db5f5][_0xa62b('0x75')]){_0x5650b0[_0xa62b('0x65')](_0x28cb75);}_0x265ab2[_0x2db5f5][_0xa62b('0x76')]&&_0x5650b0[_0xa62b('0x39')](_0x28cb75,_0x265ab2[_0x2db5f5][_0xa62b('0x76')]===_0xa62b('0x87')?![]:!![]);_0x5650b0[_0xa62b('0x66')](_0x28cb75,_0x265ab2[_0x2db5f5][_0xa62b('0x88')]||_0x28cb75);}if(_0x31e997['joins']){_0x31e997[_0xa62b('0x77')]=JSON['parse'](_0x31e997[_0xa62b('0x77')]);for(var _0x1e46d0=0x0;_0x1e46d0<_0x31e997[_0xa62b('0x77')][_0xa62b('0x37')];_0x1e46d0+=0x1){if(_0x31e997['joins'][_0x1e46d0][_0xa62b('0x2f')]&&_[_0xa62b('0x78')](_0x56eb1b,_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x2f')])&&_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x79')]&&_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x7b')]&&_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x7a')]){_0x5650b0[_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x2f')]](_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x7b')],null,util['format'](_0xa62b('0x89'),_0x31e997[_0xa62b('0x6f')],_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x79')],_0x31e997[_0xa62b('0x77')][_0x1e46d0][_0xa62b('0x7b')],_0x31e997['joins'][_0x1e46d0][_0xa62b('0x7a')]));}}}if(_0x31e997[_0xa62b('0x8a')]){_0x31e997[_0xa62b('0x8a')]=JSON[_0xa62b('0x7c')](_0x31e997[_0xa62b('0x8a')]);_0x5650b0[_0xa62b('0x3c')](_0x4c78ac(_0x31e997[_0xa62b('0x8a')][_0xa62b('0x65')]));}_0x125fca=_0x5650b0[_0xa62b('0x7d')]();_0x5650b0[_0xa62b('0x1c')](_0x4765fa);_0x5650b0['offset'](0x0);return;}})['then'](function(){if(_0xc2cc45['output']===_0xa62b('0x8b')){return null;}var _0x4e4d88=_[_0xa62b('0x3d')](_0xc2cc45,{'name':_0xc2cc45['fullPath']||_0xc2cc45[_0xa62b('0x28')]||_0x31e997[_0xa62b('0x28')],'basename':_0x26435b,'savename':util['format'](_0xa62b('0x8c'),_0xc2cc45[_0xa62b('0x28')]||_0x31e997[_0xa62b('0x28')],require(_0xa62b('0x8d'))['generate'](0x4),_0xc2cc45[_0xa62b('0x8e')]||_0xa62b('0x8f')),'reportId':_0x31e997['id'],'reportType':'custom'});return db[_0xa62b('0x90')]['create'](_0x4e4d88,{'raw':!![]});})[_0xa62b('0x22')](function(_0x586acc){if(_0x31e997[_0xa62b('0x6f')]===_0xa62b('0x91')){_0x125fca[_0xa62b('0x3c')](_0x31e997[_0xa62b('0x6f')]+_0xa62b('0x92'),_0xc2cc45[_0xa62b('0x93')],_0xc2cc45[_0xa62b('0x94')]);}else{_0x125fca[_0xa62b('0x3c')](_0x31e997[_0xa62b('0x6f')]+_0xa62b('0x95'),_0xc2cc45[_0xa62b('0x93')],_0xc2cc45[_0xa62b('0x94')]);}if(_0x586acc){logger[_0xa62b('0x96')](_0xa62b('0x97'),_0x125fca['toString']());require('child_process')[_0xa62b('0x98')](path[_0xa62b('0x53')](__dirname,_0xa62b('0x99'),_0x586acc[_0xa62b('0x8e')]),[_0x586acc['id'],_0x125fca[_0xa62b('0x80')](),path['join'](__dirname,_0xa62b('0x9a'),_0x586acc['savename']),_0x26435b]);return _0x586acc;}else{var _0x2cd77b=squel['select']();_0x2cd77b['from']('('+_0x125fca[_0xa62b('0x80')]()+')',_0xa62b('0x9b'));_0x2cd77b[_0xa62b('0x66')](_0xa62b('0x9c'),_0xa62b('0x1d'));_0x125fca[_0xa62b('0x1c')](_0xc2cc45[_0xa62b('0x1c')]||_0x4765fa);_0x125fca['offset'](_0xc2cc45[_0xa62b('0x1a')]||0x0);return dbH[_0xa62b('0x7f')][_0xa62b('0x35')](_0x2cd77b[_0xa62b('0x80')](),{'type':dbH[_0xa62b('0x7f')]['QueryTypes']['SELECT']})['then'](function(_0x354bd2){if(!_0x354bd2[_0xa62b('0x37')]){_0x17a620=0x0;}else{_0x17a620=_0x354bd2[0x0][_0xa62b('0x1d')]||0x0;}return dbH['sequelize']['query'](_0x125fca[_0xa62b('0x80')](),{'type':dbH[_0xa62b('0x7f')][_0xa62b('0x81')][_0xa62b('0x9d')]});})[_0xa62b('0x22')](function(_0x148d95){return{'rows':_0x148d95||[],'count':_0x17a620};});}});}exports[_0xa62b('0x9e')]=function(_0x117647,_0x42af89){return runReport(_0x117647[_0xa62b('0x52')],_0x117647['query'],_0x117647['options'])[_0xa62b('0x22')](respondWithResult(_0x42af89,null))['catch'](handleError(_0x42af89,null));};exports[_0xa62b('0x9f')]=runReport;exports[_0xa62b('0x35')]=function(_0x2e01d7,_0x22feb4){var _0x247045=0xa;var _0x32d9ac=[_0xa62b('0x53'),_0xa62b('0xa0'),_0xa62b('0x54'),_0xa62b('0x55')];var _0x35d1d0={'SUM':_0xa62b('0x56'),'COUNT':_0xa62b('0x57'),'COUNT DISTINCT':_0xa62b('0x58'),'MAX':_0xa62b('0x59'),'MIN':_0xa62b('0x82'),'AVG':_0xa62b('0x83'),'GROUP_CONCAT':_0xa62b('0x5a'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xa62b('0x5c')};var _0x226c56={'SEC_TO_TIME':_0xa62b('0x5d'),'DATE':_0xa62b('0x5e'),'HOUR':_0xa62b('0x5f'),'ROUND':_0xa62b('0xa1'),'UNIX_TIMESTAMP':_0xa62b('0x60')};var _0x54cfc2=function(_0x17f834){return!_['includes']([_0xa62b('0x61'),_0xa62b('0x62'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x17f834);};var _0x12385b=function(_0x4037e5){if(!_0x4037e5||!_0x4037e5[_0xa62b('0x64')][_0xa62b('0x37')]){return'';}for(var _0x5680d6='(',_0x4f7c61=0x0;_0x4f7c61<_0x4037e5[_0xa62b('0x64')][_0xa62b('0x37')];_0x4f7c61+=0x1){_0x4f7c61>0x0&&(_0x5680d6+='\x20'+_0x4037e5['operator']+'\x20');_0x5680d6+=_0x4037e5['rules'][_0x4f7c61][_0xa62b('0x65')]?_0x12385b(_0x4037e5[_0xa62b('0x64')][_0x4f7c61][_0xa62b('0x65')]):_0x4037e5[_0xa62b('0x64')][_0x4f7c61][_0xa62b('0x66')]+'\x20'+_0x4037e5[_0xa62b('0x64')][_0x4f7c61]['condition']+(_0x54cfc2(_0x4037e5[_0xa62b('0x64')][_0x4f7c61][_0xa62b('0x67')])?'\x20'+_0x4037e5[_0xa62b('0x64')][_0x4f7c61]['value']:'');}return _0x5680d6+')';};var _0x4b3294={'where':{'id':_0x2e01d7[_0xa62b('0x52')]['id']}},_0x580779,_0x4d2911,_0x145443,_0xc5abea,_0x3db3b3;_0x4b3294=_['merge']({},_0x4b3294,_0x2e01d7['options']);return db[_0xa62b('0x2c')][_0xa62b('0x51')](_0x4b3294)[_0xa62b('0x22')](function(_0x4a9118){if(_0x4a9118){_0x580779=_0x4a9118;return _0x4a9118[_0xa62b('0x69')]();}return null;})['then'](function(_0x12fae){if(_0x12fae){if(!_0x12fae[_0xa62b('0x37')]){throw new db[(_0xa62b('0x6a'))]['ValidationErrorItem'](_0xa62b('0x6c'),0x193);}_0x4d2911=_0x12fae;return db[_0xa62b('0x86')][_0xa62b('0x43')]({'raw':!![]});}return null;})['then'](function(_0x126859){if(_0x126859){_0x145443=_[_0xa62b('0xa2')](_0x126859,'id');var _0x12873d;var _0xb4f985=squel[_0xa62b('0x6d')]();_0xb4f985[_0xa62b('0x6e')](_0x580779[_0xa62b('0x6f')]);for(var _0x28e0dd=0x0;_0x28e0dd<_0x4d2911[_0xa62b('0x37')];_0x28e0dd+=0x1){_0x12873d=_0x4d2911[_0x28e0dd][_0xa62b('0x70')]?_0x145443[_0x4d2911[_0x28e0dd][_0xa62b('0x70')]][_0xa62b('0x71')]:_0x4d2911[_0x28e0dd][_0xa62b('0x66')];_0x12873d=_0x4d2911[_0x28e0dd][_0xa62b('0x72')]?_[_0xa62b('0x74')](_0x35d1d0[_0x4d2911[_0x28e0dd][_0xa62b('0x72')]],'%s',_0x12873d):_0x12873d;_0x12873d=_0x4d2911[_0x28e0dd][_0xa62b('0x73')]?_[_0xa62b('0x74')](_0x226c56[_0x4d2911[_0x28e0dd][_0xa62b('0x73')]],'%s',_0x12873d):_0x12873d;if(_0x4d2911[_0x28e0dd][_0xa62b('0x75')]){_0xb4f985[_0xa62b('0x65')](_0x12873d);}_0x4d2911[_0x28e0dd][_0xa62b('0x76')]&&_0xb4f985[_0xa62b('0x39')](_0x12873d,_0x4d2911[_0x28e0dd]['orderBy']===_0xa62b('0x87')?![]:!![]);_0xb4f985[_0xa62b('0x66')](_0x12873d,_0x4d2911[_0x28e0dd][_0xa62b('0x88')]||_0x12873d);}if(_0x580779['joins']){_0x580779['joins']=JSON[_0xa62b('0x7c')](_0x580779[_0xa62b('0x77')]);for(var _0x4b87b3=0x0;_0x4b87b3<_0x580779['joins'][_0xa62b('0x37')];_0x4b87b3+=0x1){if(_0x580779[_0xa62b('0x77')][_0x4b87b3]['type']&&_['includes'](_0x32d9ac,_0x580779[_0xa62b('0x77')][_0x4b87b3][_0xa62b('0x2f')])&&_0x580779['joins'][_0x4b87b3]['parentKey']&&_0x580779['joins'][_0x4b87b3][_0xa62b('0x7b')]&&_0x580779['joins'][_0x4b87b3][_0xa62b('0x7a')]){_0xb4f985[_0x580779['joins'][_0x4b87b3][_0xa62b('0x2f')]](_0x580779[_0xa62b('0x77')][_0x4b87b3][_0xa62b('0x7b')],null,util[_0xa62b('0x73')](_0xa62b('0x89'),_0x580779[_0xa62b('0x6f')],_0x580779['joins'][_0x4b87b3][_0xa62b('0x79')],_0x580779[_0xa62b('0x77')][_0x4b87b3]['foreignTable'],_0x580779['joins'][_0x4b87b3][_0xa62b('0x7a')]));}}}if(_0x580779['conditions']){_0x580779['conditions']=JSON[_0xa62b('0x7c')](_0x580779[_0xa62b('0x8a')]);_0xb4f985['where'](_0x12385b(_0x580779[_0xa62b('0x8a')][_0xa62b('0x65')]));}_0x3db3b3=_0xb4f985[_0xa62b('0x7d')]();_0xb4f985['limit'](_0x247045);_0xb4f985[_0xa62b('0x1a')](0x0);logger[_0xa62b('0x7e')]('Limited\x20Query:',_0xb4f985[_0xa62b('0x80')]());return dbH[_0xa62b('0x7f')][_0xa62b('0x35')](_0xb4f985['toString'](),{'type':dbH[_0xa62b('0x7f')][_0xa62b('0x81')][_0xa62b('0x9d')]});}})[_0xa62b('0x22')](function(){return{'sql':_0x3db3b3['toString']()};})[_0xa62b('0x22')](respondWithResult(_0x22feb4,null))[_0xa62b('0x46')](handleError(_0x22feb4,null));};
\ No newline at end of file
+var _0xfe4e=['request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','dbH','sendStatus','end','status','json','offset','limit','count','set','Content-Range','reject','update','then','get','CustomReports','UserProfileResource','destroy','error','stack','name','send','index','map','AnalyticCustomReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','sort','where','filter','VIRTUAL','merge','options','includeAll','findAll','rows','show','params','fields','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','right_join','cross_join','COUNT(%s)','GROUP_CONCAT(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','operator','group','condition','value','ValidationErrorItem','AnalyticMetric','keyBy','select','from','table','metric','field','function','replace','format','groupBy','orderBy','alias','joins','parse','parentKey','foreignKey','%s.%s\x20=\x20%s.%s','foreignTable','conditions','clone','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','SUM(%s)','MAX(%s)','MIN(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','UNIX_TIMESTAMP(%s)','IS\x20NULL','IS\x20NOT\x20EMPTY','getFields','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','MetricId','order','DESC','output','fullPath','%s-%s.%s','randomstring','generate','csv','custom','AnalyticExtractedReport','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','runReport','left_join','AVG(%s)','includes','debug','eml-format','rimraf','fast-json-patch'];(function(_0x949a7,_0x50a353){var _0x280aef=function(_0x1ef528){while(--_0x1ef528){_0x949a7['push'](_0x949a7['shift']());}};_0x280aef(++_0x50a353);}(_0xfe4e,0x1f2));var _0xefe4=function(_0x28a9e0,_0x15c16b){_0x28a9e0=_0x28a9e0-0x0;var _0x28b3df=_0xfe4e[_0x28a9e0];return _0x28b3df;};'use strict';var emlformat=require(_0xefe4('0x0'));var rimraf=require(_0xefe4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xefe4('0x2'));var rp=require(_0xefe4('0x3'));var moment=require(_0xefe4('0x4'));var BPromise=require(_0xefe4('0x5'));var Mustache=require(_0xefe4('0x6'));var util=require(_0xefe4('0x7'));var path=require(_0xefe4('0x8'));var sox=require(_0xefe4('0x9'));var csv=require(_0xefe4('0xa'));var ejs=require(_0xefe4('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xefe4('0xc'));var squel=require(_0xefe4('0xd'));var crypto=require(_0xefe4('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xefe4('0xf'));var toCsv=require(_0xefe4('0xa'));var querystring=require(_0xefe4('0x10'));var Papa=require('papaparse');var Redis=require(_0xefe4('0x11'));var authService=require(_0xefe4('0x12'));var qs=require(_0xefe4('0x13'));var as=require(_0xefe4('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xefe4('0x15'))(_0xefe4('0x16'));var utils=require('../../config/utils');var config=require(_0xefe4('0x17'));var licenseUtil=require(_0xefe4('0x18'));var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')[_0xefe4('0x19')];function respondWithStatusCode(_0x587765,_0x2c35d6){_0x2c35d6=_0x2c35d6||0xcc;return function(_0x54b49a){if(_0x54b49a){return _0x587765[_0xefe4('0x1a')](_0x2c35d6);}return _0x587765['status'](_0x2c35d6)[_0xefe4('0x1b')]();};}function respondWithResult(_0x3aee37,_0x4f3133){_0x4f3133=_0x4f3133||0xc8;return function(_0x493a9f){if(_0x493a9f){return _0x3aee37[_0xefe4('0x1c')](_0x4f3133)[_0xefe4('0x1d')](_0x493a9f);}};}function respondWithFilteredResult(_0x28192e,_0x2c7bc2){return function(_0x2f4100){if(_0x2f4100){var _0x5c3ec4=typeof _0x2c7bc2[_0xefe4('0x1e')]==='undefined'&&typeof _0x2c7bc2[_0xefe4('0x1f')]==='undefined';var _0x376d77=_0x2f4100[_0xefe4('0x20')];var _0x37f995=_0x5c3ec4?0x0:_0x2c7bc2[_0xefe4('0x1e')];var _0x2bab5d=_0x5c3ec4?_0x2f4100[_0xefe4('0x20')]:_0x2c7bc2['offset']+_0x2c7bc2[_0xefe4('0x1f')];var _0x3e01a7;if(_0x2bab5d>=_0x376d77){_0x2bab5d=_0x376d77;_0x3e01a7=0xc8;}else{_0x3e01a7=0xce;}_0x28192e['status'](_0x3e01a7);return _0x28192e[_0xefe4('0x21')](_0xefe4('0x22'),_0x37f995+'-'+_0x2bab5d+'/'+_0x376d77)[_0xefe4('0x1d')](_0x2f4100);}return null;};}function patchUpdates(_0x8e0c5d){return function(_0x3ae67f){try{jsonpatch['apply'](_0x3ae67f,_0x8e0c5d,!![]);}catch(_0x1f37c5){return BPromise[_0xefe4('0x23')](_0x1f37c5);}return _0x3ae67f['save']();};}function saveUpdates(_0x26ff73,_0x53003d){return function(_0x31906d){if(_0x31906d){return _0x31906d[_0xefe4('0x24')](_0x26ff73)[_0xefe4('0x25')](function(_0x303e5b){return _0x303e5b;});}return null;};}function removeEntity(_0x27eb0a,_0x56be9d){return function(_0x4adcf9){if(_0x4adcf9){return _0x4adcf9['destroy']()[_0xefe4('0x25')](function(){var _0x495ea6=_0x4adcf9[_0xefe4('0x26')]({'plain':!![]});var _0x59c647=_0xefe4('0x27');return db[_0xefe4('0x28')][_0xefe4('0x29')]({'where':{'type':_0x59c647,'resourceId':_0x495ea6['id']}})['then'](function(){return _0x4adcf9;});})[_0xefe4('0x25')](function(){_0x27eb0a['status'](0xcc)[_0xefe4('0x1b')]();});}};}function handleEntityNotFound(_0x4cff69,_0x2ba85b){return function(_0x2d2a77){if(!_0x2d2a77){_0x4cff69[_0xefe4('0x1a')](0x194);}return _0x2d2a77;};}function handleError(_0x3e3e19,_0x4bef74){_0x4bef74=_0x4bef74||0x1f4;return function(_0x307449){logger[_0xefe4('0x2a')](_0x307449[_0xefe4('0x2b')]);if(_0x307449[_0xefe4('0x2c')]){delete _0x307449[_0xefe4('0x2c')];}_0x3e3e19[_0xefe4('0x1c')](_0x4bef74)[_0xefe4('0x2d')](_0x307449);};}exports[_0xefe4('0x2e')]=function(_0x5c7610,_0x4162a5){var _0x2b5545={},_0x33376c={},_0x1d1937={'count':0x0,'rows':[]};var _0x12c71b=_[_0xefe4('0x2f')](db[_0xefe4('0x30')][_0xefe4('0x31')],function(_0x4dfd3b){return{'name':_0x4dfd3b[_0xefe4('0x32')],'type':_0x4dfd3b[_0xefe4('0x33')][_0xefe4('0x34')]};});_0x33376c[_0xefe4('0x35')]=_['map'](_0x12c71b,_0xefe4('0x2c'));_0x33376c[_0xefe4('0x36')]=_[_0xefe4('0x37')](_0x5c7610[_0xefe4('0x36')]);_0x33376c[_0xefe4('0x38')]=_[_0xefe4('0x39')](_0x33376c[_0xefe4('0x35')],_0x33376c['query']);_0x2b5545[_0xefe4('0x3a')]=_[_0xefe4('0x39')](_0x33376c[_0xefe4('0x35')],qs['fields'](_0x5c7610['query']['fields']));_0x2b5545['attributes']=_0x2b5545['attributes'][_0xefe4('0x3b')]?_0x2b5545[_0xefe4('0x3a')]:_0x33376c[_0xefe4('0x35')];if(!_0x5c7610[_0xefe4('0x36')][_0xefe4('0x3c')]('nolimit')){_0x2b5545['limit']=qs[_0xefe4('0x1f')](_0x5c7610[_0xefe4('0x36')][_0xefe4('0x1f')]);_0x2b5545[_0xefe4('0x1e')]=qs[_0xefe4('0x1e')](_0x5c7610[_0xefe4('0x36')]['offset']);}_0x2b5545['order']=qs[_0xefe4('0x3d')](_0x5c7610[_0xefe4('0x36')]['sort']);_0x2b5545[_0xefe4('0x3e')]=qs[_0xefe4('0x38')](_['pick'](_0x5c7610[_0xefe4('0x36')],_0x33376c['filters']),_0x12c71b);if(_0x5c7610[_0xefe4('0x36')][_0xefe4('0x3f')]){_0x2b5545[_0xefe4('0x3e')]=_['merge'](_0x2b5545[_0xefe4('0x3e')],{'$or':_[_0xefe4('0x2f')](_0x12c71b,function(_0x1eca0a){if(_0x1eca0a[_0xefe4('0x33')]!==_0xefe4('0x40')){var _0x5cfd91={};_0x5cfd91[_0x1eca0a[_0xefe4('0x2c')]]={'$like':'%'+_0x5c7610[_0xefe4('0x36')]['filter']+'%'};return _0x5cfd91;}})});}_0x2b5545=_[_0xefe4('0x41')]({},_0x2b5545,_0x5c7610[_0xefe4('0x42')]);var _0x971906={'where':_0x2b5545[_0xefe4('0x3e')]};return db['AnalyticCustomReport']['count'](_0x971906)[_0xefe4('0x25')](function(_0x11752f){_0x1d1937[_0xefe4('0x20')]=_0x11752f;if(_0x5c7610[_0xefe4('0x36')][_0xefe4('0x43')]){_0x2b5545['include']=[{'all':!![]}];}return db[_0xefe4('0x30')][_0xefe4('0x44')](_0x2b5545);})[_0xefe4('0x25')](function(_0x24c41c){_0x1d1937[_0xefe4('0x45')]=_0x24c41c;return _0x1d1937;})[_0xefe4('0x25')](respondWithFilteredResult(_0x4162a5,_0x2b5545))['catch'](handleError(_0x4162a5,null));};exports[_0xefe4('0x46')]=function(_0x181653,_0xeafcff){var _0x1a3b45={'raw':![],'where':{'id':_0x181653[_0xefe4('0x47')]['id']}},_0x367278={};_0x367278[_0xefe4('0x35')]=_['keys'](db[_0xefe4('0x30')][_0xefe4('0x31')]);_0x367278['query']=_['keys'](_0x181653[_0xefe4('0x36')]);_0x367278[_0xefe4('0x38')]=_[_0xefe4('0x39')](_0x367278[_0xefe4('0x35')],_0x367278['query']);_0x1a3b45['attributes']=_[_0xefe4('0x39')](_0x367278[_0xefe4('0x35')],qs['fields'](_0x181653['query'][_0xefe4('0x48')]));_0x1a3b45[_0xefe4('0x3a')]=_0x1a3b45[_0xefe4('0x3a')][_0xefe4('0x3b')]?_0x1a3b45[_0xefe4('0x3a')]:_0x367278[_0xefe4('0x35')];if(_0x181653[_0xefe4('0x36')][_0xefe4('0x43')]){_0x1a3b45['include']=[{'all':!![]}];}_0x1a3b45=_['merge']({},_0x1a3b45,_0x181653[_0xefe4('0x42')]);return db['AnalyticCustomReport'][_0xefe4('0x49')](_0x1a3b45)[_0xefe4('0x25')](handleEntityNotFound(_0xeafcff,null))[_0xefe4('0x25')](respondWithResult(_0xeafcff,null))[_0xefe4('0x4a')](handleError(_0xeafcff,null));};exports[_0xefe4('0x4b')]=function(_0x19b428,_0x43da44){return db[_0xefe4('0x30')][_0xefe4('0x4b')](_0x19b428[_0xefe4('0x4c')],{})[_0xefe4('0x25')](function(_0x5b2e28){var _0x48abd1=_0x19b428[_0xefe4('0x4d')]['get']({'plain':!![]});if(!_0x48abd1)throw new Error(_0xefe4('0x4e'));if(_0x48abd1[_0xefe4('0x4f')]==='user'){var _0x36beb5=_0x5b2e28[_0xefe4('0x26')]({'plain':!![]});var _0x437926=_0xefe4('0x50');return db[_0xefe4('0x51')][_0xefe4('0x49')]({'where':{'name':_0x437926,'userProfileId':_0x48abd1[_0xefe4('0x52')]},'raw':!![]})['then'](function(_0x376c30){if(_0x376c30&&_0x376c30['autoAssociation']===0x0){return db['UserProfileResource'][_0xefe4('0x4b')]({'name':_0x36beb5[_0xefe4('0x2c')],'resourceId':_0x36beb5['id'],'type':_0xefe4('0x27'),'sectionId':_0x376c30['id']},{})[_0xefe4('0x25')](function(){return _0x5b2e28;});}else{return _0x5b2e28;}})[_0xefe4('0x4a')](function(_0x412a34){logger[_0xefe4('0x2a')](_0xefe4('0x53'),_0x412a34);throw _0x412a34;});}return _0x5b2e28;})[_0xefe4('0x25')](respondWithResult(_0x43da44,0xc9))[_0xefe4('0x4a')](handleError(_0x43da44,null));};exports[_0xefe4('0x24')]=function(_0x555c30,_0x5730d1){if(_0x555c30[_0xefe4('0x4c')]['id']){delete _0x555c30[_0xefe4('0x4c')]['id'];}return db[_0xefe4('0x30')]['find']({'where':{'id':_0x555c30[_0xefe4('0x47')]['id']}})[_0xefe4('0x25')](handleEntityNotFound(_0x5730d1,null))['then'](saveUpdates(_0x555c30[_0xefe4('0x4c')],null))[_0xefe4('0x25')](respondWithResult(_0x5730d1,null))[_0xefe4('0x4a')](handleError(_0x5730d1,null));};exports[_0xefe4('0x29')]=function(_0x3b768b,_0x122ecd){return db['AnalyticCustomReport']['find']({'where':{'id':_0x3b768b[_0xefe4('0x47')]['id']}})[_0xefe4('0x25')](handleEntityNotFound(_0x122ecd,null))[_0xefe4('0x25')](removeEntity(_0x122ecd,null))['catch'](handleError(_0x122ecd,null));};exports[_0xefe4('0x54')]=function(_0x1941e0,_0x1d74bc){var _0x59cc53=0xa;var _0x2fa745=[_0xefe4('0x55'),'left_join',_0xefe4('0x56'),_0xefe4('0x57')];var _0x491f4b={'SUM':'SUM(%s)','COUNT':_0xefe4('0x58'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0xefe4('0x59'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x1a03d0={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xefe4('0x5a'),'HOUR':_0xefe4('0x5b'),'ROUND':_0xefe4('0x5c'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x111300=function(_0x2db20c){return!_['includes'](['IS\x20NULL',_0xefe4('0x5d'),_0xefe4('0x5e'),'IS\x20NOT\x20EMPTY'],_0x2db20c);};var _0x5c8b79=function(_0x4f0a8e){if(!_0x4f0a8e||!_0x4f0a8e[_0xefe4('0x5f')][_0xefe4('0x3b')]){return'';}for(var _0x5f027f='(',_0x300954=0x0;_0x300954<_0x4f0a8e[_0xefe4('0x5f')]['length'];_0x300954+=0x1){_0x300954>0x0&&(_0x5f027f+='\x20'+_0x4f0a8e[_0xefe4('0x60')]+'\x20');_0x5f027f+=_0x4f0a8e['rules'][_0x300954]['group']?_0x5c8b79(_0x4f0a8e[_0xefe4('0x5f')][_0x300954][_0xefe4('0x61')]):_0x4f0a8e[_0xefe4('0x5f')][_0x300954]['field']+'\x20'+_0x4f0a8e[_0xefe4('0x5f')][_0x300954][_0xefe4('0x62')]+(_0x111300(_0x4f0a8e[_0xefe4('0x5f')][_0x300954]['condition'])?'\x20'+_0x4f0a8e[_0xefe4('0x5f')][_0x300954][_0xefe4('0x63')]:'');}return _0x5f027f+')';};var _0x5e159c={'where':{'id':_0x1941e0[_0xefe4('0x47')]['id']}},_0x953fea,_0x49cf8c,_0x5a6347,_0x213b80,_0x1f19fc;_0x5e159c=_[_0xefe4('0x41')]({},_0x5e159c,_0x1941e0[_0xefe4('0x42')]);return db[_0xefe4('0x30')][_0xefe4('0x49')](_0x5e159c)[_0xefe4('0x25')](function(_0x12f235){if(_0x12f235){_0x953fea=_0x12f235;return _0x12f235['getFields']();}return null;})['then'](function(_0x324184){if(_0x324184){if(!_0x324184[_0xefe4('0x3b')]){throw new db['Sequelize'][(_0xefe4('0x64'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x49cf8c=_0x324184;return db[_0xefe4('0x65')][_0xefe4('0x44')]({'raw':!![]});}return null;})[_0xefe4('0x25')](function(_0x37d5be){if(_0x37d5be){_0x5a6347=_[_0xefe4('0x66')](_0x37d5be,'id');var _0x371d36;var _0xfae1b8=squel[_0xefe4('0x67')]();_0xfae1b8[_0xefe4('0x68')](_0x953fea[_0xefe4('0x69')]);for(var _0x4a403c=0x0;_0x4a403c<_0x49cf8c[_0xefe4('0x3b')];_0x4a403c+=0x1){_0x371d36=_0x49cf8c[_0x4a403c]['MetricId']?_0x5a6347[_0x49cf8c[_0x4a403c]['MetricId']][_0xefe4('0x6a')]:_0x49cf8c[_0x4a403c][_0xefe4('0x6b')];_0x371d36=_0x49cf8c[_0x4a403c][_0xefe4('0x6c')]?_[_0xefe4('0x6d')](_0x491f4b[_0x49cf8c[_0x4a403c]['function']],'%s',_0x371d36):_0x371d36;_0x371d36=_0x49cf8c[_0x4a403c][_0xefe4('0x6e')]?_[_0xefe4('0x6d')](_0x1a03d0[_0x49cf8c[_0x4a403c][_0xefe4('0x6e')]],'%s',_0x371d36):_0x371d36;if(_0x49cf8c[_0x4a403c][_0xefe4('0x6f')]){_0xfae1b8[_0xefe4('0x61')](_0x371d36);}_0x49cf8c[_0x4a403c][_0xefe4('0x70')]&&_0xfae1b8['order'](_0x371d36,_0x49cf8c[_0x4a403c]['orderBy']==='DESC'?![]:!![]);_0xfae1b8['field'](_0x371d36,_0x49cf8c[_0x4a403c][_0xefe4('0x71')]||_0x371d36);}if(_0x953fea[_0xefe4('0x72')]){_0x953fea[_0xefe4('0x72')]=JSON[_0xefe4('0x73')](_0x953fea[_0xefe4('0x72')]);for(var _0x5de4fa=0x0;_0x5de4fa<_0x953fea[_0xefe4('0x72')][_0xefe4('0x3b')];_0x5de4fa+=0x1){if(_0x953fea[_0xefe4('0x72')][_0x5de4fa]['type']&&_['includes'](_0x2fa745,_0x953fea[_0xefe4('0x72')][_0x5de4fa][_0xefe4('0x33')])&&_0x953fea[_0xefe4('0x72')][_0x5de4fa][_0xefe4('0x74')]&&_0x953fea[_0xefe4('0x72')][_0x5de4fa]['foreignTable']&&_0x953fea['joins'][_0x5de4fa][_0xefe4('0x75')]){_0xfae1b8[_0x953fea[_0xefe4('0x72')][_0x5de4fa]['type']](_0x953fea[_0xefe4('0x72')][_0x5de4fa]['foreignTable'],null,util[_0xefe4('0x6e')](_0xefe4('0x76'),_0x953fea[_0xefe4('0x69')],_0x953fea[_0xefe4('0x72')][_0x5de4fa][_0xefe4('0x74')],_0x953fea[_0xefe4('0x72')][_0x5de4fa][_0xefe4('0x77')],_0x953fea[_0xefe4('0x72')][_0x5de4fa][_0xefe4('0x75')]));}}}if(_0x953fea[_0xefe4('0x78')]){_0x953fea[_0xefe4('0x78')]=JSON[_0xefe4('0x73')](_0x953fea[_0xefe4('0x78')]);_0xfae1b8[_0xefe4('0x3e')](_0x5c8b79(_0x953fea[_0xefe4('0x78')][_0xefe4('0x61')]));}_0x1f19fc=_0xfae1b8[_0xefe4('0x79')]();_0xfae1b8[_0xefe4('0x1f')](_0x59cc53);_0xfae1b8['offset'](0x0);logger['debug'](_0xefe4('0x7a'),_0xfae1b8[_0xefe4('0x7b')]());return dbH[_0xefe4('0x7c')]['query'](_0xfae1b8[_0xefe4('0x7b')](),{'type':dbH[_0xefe4('0x7c')][_0xefe4('0x7d')][_0xefe4('0x7e')]});}})[_0xefe4('0x25')](respondWithResult(_0x1d74bc,null))[_0xefe4('0x4a')](handleError(_0x1d74bc,null));};function runReport(_0x5174a2,_0x3c8e48,_0x15ec72){var _0x2abed7=_0x3c8e48[_0xefe4('0x2c')];var _0x4f1c00=0xa;var _0x461355=[_0xefe4('0x55'),'left_join',_0xefe4('0x56'),_0xefe4('0x57')];var _0x3ba76a={'SUM':_0xefe4('0x7f'),'COUNT':_0xefe4('0x58'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xefe4('0x80'),'MIN':_0xefe4('0x81'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xefe4('0x59'),'GROUP_CONCAT ASC':_0xefe4('0x82'),'GROUP_CONCAT DESC':_0xefe4('0x83')};var _0x4e7542={'SEC_TO_TIME':_0xefe4('0x84'),'DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0xefe4('0x5c'),'UNIX_TIMESTAMP':_0xefe4('0x85')};var _0x1c8e63=function(_0x7b2388){return!_['includes']([_0xefe4('0x86'),'IS\x20NOT\x20NULL',_0xefe4('0x5e'),_0xefe4('0x87')],_0x7b2388);};var _0x14c3ac=function(_0x140d5c){if(!_0x140d5c||!_0x140d5c[_0xefe4('0x5f')][_0xefe4('0x3b')]){return'';}for(var _0x48efe9='(',_0x1931a3=0x0;_0x1931a3<_0x140d5c[_0xefe4('0x5f')]['length'];_0x1931a3+=0x1){_0x1931a3>0x0&&(_0x48efe9+='\x20'+_0x140d5c[_0xefe4('0x60')]+'\x20');_0x48efe9+=_0x140d5c[_0xefe4('0x5f')][_0x1931a3][_0xefe4('0x61')]?_0x14c3ac(_0x140d5c[_0xefe4('0x5f')][_0x1931a3][_0xefe4('0x61')]):_0x140d5c[_0xefe4('0x5f')][_0x1931a3][_0xefe4('0x6b')]+'\x20'+_0x140d5c[_0xefe4('0x5f')][_0x1931a3][_0xefe4('0x62')]+(_0x1c8e63(_0x140d5c['rules'][_0x1931a3][_0xefe4('0x62')])?'\x20'+_0x140d5c['rules'][_0x1931a3]['value']:'');}return _0x48efe9+')';};var _0xe4bb77={'where':{'id':_0x5174a2['id']}},_0x1f0fa8,_0x5e3b1f,_0x3b28d7,_0x5f0c43,_0x35b139;_0xe4bb77=_['merge']({},_0xe4bb77,_0x15ec72);return db[_0xefe4('0x30')]['find'](_0xe4bb77)[_0xefe4('0x25')](function(_0x56004d){if(_0x56004d){_0x1f0fa8=_0x56004d;return _0x56004d[_0xefe4('0x88')]();}return null;})['then'](function(_0x203a94){if(_0x203a94){if(!_0x203a94[_0xefe4('0x3b')]){throw new db[(_0xefe4('0x89'))][(_0xefe4('0x64'))](_0xefe4('0x8a'),0x193);}_0x5e3b1f=_0x203a94;return db[_0xefe4('0x65')][_0xefe4('0x44')]({'raw':!![]});}return null;})[_0xefe4('0x25')](function(_0x36ca56){if(_0x36ca56){_0x3b28d7=_[_0xefe4('0x66')](_0x36ca56,'id');var _0x166c8e;var _0xc1f7ab=squel[_0xefe4('0x67')]();_0xc1f7ab[_0xefe4('0x68')](_0x1f0fa8[_0xefe4('0x69')]);for(var _0xcda1f8=0x0;_0xcda1f8<_0x5e3b1f['length'];_0xcda1f8+=0x1){_0x166c8e=_0x5e3b1f[_0xcda1f8][_0xefe4('0x8b')]?_0x3b28d7[_0x5e3b1f[_0xcda1f8]['MetricId']][_0xefe4('0x6a')]:_0x5e3b1f[_0xcda1f8]['field'];_0x166c8e=_0x5e3b1f[_0xcda1f8][_0xefe4('0x6c')]?_[_0xefe4('0x6d')](_0x3ba76a[_0x5e3b1f[_0xcda1f8][_0xefe4('0x6c')]],'%s',_0x166c8e):_0x166c8e;_0x166c8e=_0x5e3b1f[_0xcda1f8][_0xefe4('0x6e')]?_[_0xefe4('0x6d')](_0x4e7542[_0x5e3b1f[_0xcda1f8][_0xefe4('0x6e')]],'%s',_0x166c8e):_0x166c8e;if(_0x5e3b1f[_0xcda1f8][_0xefe4('0x6f')]){_0xc1f7ab[_0xefe4('0x61')](_0x166c8e);}_0x5e3b1f[_0xcda1f8][_0xefe4('0x70')]&&_0xc1f7ab[_0xefe4('0x8c')](_0x166c8e,_0x5e3b1f[_0xcda1f8][_0xefe4('0x70')]===_0xefe4('0x8d')?![]:!![]);_0xc1f7ab['field'](_0x166c8e,_0x5e3b1f[_0xcda1f8][_0xefe4('0x71')]||_0x166c8e);}if(_0x1f0fa8[_0xefe4('0x72')]){_0x1f0fa8[_0xefe4('0x72')]=JSON[_0xefe4('0x73')](_0x1f0fa8[_0xefe4('0x72')]);for(var _0x2565d6=0x0;_0x2565d6<_0x1f0fa8[_0xefe4('0x72')][_0xefe4('0x3b')];_0x2565d6+=0x1){if(_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x33')]&&_['includes'](_0x461355,_0x1f0fa8[_0xefe4('0x72')][_0x2565d6]['type'])&&_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x74')]&&_0x1f0fa8['joins'][_0x2565d6]['foreignTable']&&_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x75')]){_0xc1f7ab[_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x33')]](_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x77')],null,util['format'](_0xefe4('0x76'),_0x1f0fa8['table'],_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x74')],_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x77')],_0x1f0fa8[_0xefe4('0x72')][_0x2565d6][_0xefe4('0x75')]));}}}if(_0x1f0fa8[_0xefe4('0x78')]){_0x1f0fa8[_0xefe4('0x78')]=JSON[_0xefe4('0x73')](_0x1f0fa8[_0xefe4('0x78')]);_0xc1f7ab[_0xefe4('0x3e')](_0x14c3ac(_0x1f0fa8['conditions'][_0xefe4('0x61')]));}_0x35b139=_0xc1f7ab[_0xefe4('0x79')]();_0xc1f7ab['limit'](_0x4f1c00);_0xc1f7ab[_0xefe4('0x1e')](0x0);return;}})[_0xefe4('0x25')](function(){if(_0x3c8e48[_0xefe4('0x8e')]==='web'){return null;}var _0x1392ab=_[_0xefe4('0x41')](_0x3c8e48,{'name':_0x3c8e48[_0xefe4('0x8f')]||_0x3c8e48[_0xefe4('0x2c')]||_0x1f0fa8['name'],'basename':_0x2abed7,'savename':util[_0xefe4('0x6e')](_0xefe4('0x90'),_0x3c8e48[_0xefe4('0x2c')]||_0x1f0fa8['name'],require(_0xefe4('0x91'))[_0xefe4('0x92')](0x4),_0x3c8e48['output']||_0xefe4('0x93')),'reportId':_0x1f0fa8['id'],'reportType':_0xefe4('0x94')});return db[_0xefe4('0x95')]['create'](_0x1392ab,{'raw':!![]});})['then'](function(_0x4c3b50){if(_0x1f0fa8['table']==='cdr'){_0x35b139[_0xefe4('0x3e')](_0x1f0fa8[_0xefe4('0x69')]+_0xefe4('0x96'),_0x3c8e48[_0xefe4('0x97')],_0x3c8e48['endDate']);}else{_0x35b139[_0xefe4('0x3e')](_0x1f0fa8[_0xefe4('0x69')]+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x3c8e48['startDate'],_0x3c8e48[_0xefe4('0x98')]);}if(_0x4c3b50){logger[_0xefe4('0x99')](_0xefe4('0x9a'),_0x35b139[_0xefe4('0x7b')]());require(_0xefe4('0x9b'))[_0xefe4('0x9c')](path['join'](__dirname,_0xefe4('0x9d'),_0x4c3b50[_0xefe4('0x8e')]),[_0x4c3b50['id'],_0x35b139[_0xefe4('0x7b')](),path['join'](__dirname,_0xefe4('0x9e'),_0x4c3b50[_0xefe4('0x9f')]),_0x2abed7]);return _0x4c3b50;}else{var _0x49c2ac=squel[_0xefe4('0x67')]();_0x49c2ac[_0xefe4('0x68')]('('+_0x35b139[_0xefe4('0x7b')]()+')',_0xefe4('0xa0'));_0x49c2ac[_0xefe4('0x6b')](_0xefe4('0xa1'),_0xefe4('0x20'));_0x35b139[_0xefe4('0x1f')](_0x3c8e48['limit']||_0x4f1c00);_0x35b139[_0xefe4('0x1e')](_0x3c8e48[_0xefe4('0x1e')]||0x0);return dbH['sequelize'][_0xefe4('0x36')](_0x49c2ac['toString'](),{'type':dbH[_0xefe4('0x7c')][_0xefe4('0x7d')][_0xefe4('0x7e')]})[_0xefe4('0x25')](function(_0x13437c){if(!_0x13437c[_0xefe4('0x3b')]){_0x5f0c43=0x0;}else{_0x5f0c43=_0x13437c[0x0][_0xefe4('0x20')]||0x0;}return dbH['sequelize'][_0xefe4('0x36')](_0x35b139['toString'](),{'type':dbH['sequelize'][_0xefe4('0x7d')]['SELECT']});})[_0xefe4('0x25')](function(_0x68db61){return{'rows':_0x68db61||[],'count':_0x5f0c43};});}});}exports['run']=function(_0x37d2c8,_0x268f55){return runReport(_0x37d2c8['params'],_0x37d2c8[_0xefe4('0x36')],_0x37d2c8[_0xefe4('0x42')])[_0xefe4('0x25')](respondWithResult(_0x268f55,null))[_0xefe4('0x4a')](handleError(_0x268f55,null));};exports[_0xefe4('0xa2')]=runReport;exports[_0xefe4('0x36')]=function(_0x5bad89,_0x280c6e){var _0x3ab79e=0xa;var _0x5024a1=[_0xefe4('0x55'),_0xefe4('0xa3'),_0xefe4('0x56'),'cross_join'];var _0x21f828={'SUM':_0xefe4('0x7f'),'COUNT':_0xefe4('0x58'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xefe4('0x80'),'MIN':'MIN(%s)','AVG':_0xefe4('0xa4'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0xefe4('0x82'),'GROUP_CONCAT DESC':_0xefe4('0x83')};var _0x48b6f5={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xefe4('0x5a'),'HOUR':_0xefe4('0x5b'),'ROUND':_0xefe4('0x5c'),'UNIX_TIMESTAMP':_0xefe4('0x85')};var _0x2c93b6=function(_0x3579a7){return!_[_0xefe4('0xa5')]([_0xefe4('0x86'),_0xefe4('0x5d'),_0xefe4('0x5e'),_0xefe4('0x87')],_0x3579a7);};var _0x870c50=function(_0x284f27){if(!_0x284f27||!_0x284f27[_0xefe4('0x5f')][_0xefe4('0x3b')]){return'';}for(var _0x5910e4='(',_0xd0afad=0x0;_0xd0afad<_0x284f27['rules'][_0xefe4('0x3b')];_0xd0afad+=0x1){_0xd0afad>0x0&&(_0x5910e4+='\x20'+_0x284f27['operator']+'\x20');_0x5910e4+=_0x284f27['rules'][_0xd0afad][_0xefe4('0x61')]?_0x870c50(_0x284f27[_0xefe4('0x5f')][_0xd0afad][_0xefe4('0x61')]):_0x284f27[_0xefe4('0x5f')][_0xd0afad]['field']+'\x20'+_0x284f27[_0xefe4('0x5f')][_0xd0afad][_0xefe4('0x62')]+(_0x2c93b6(_0x284f27[_0xefe4('0x5f')][_0xd0afad][_0xefe4('0x62')])?'\x20'+_0x284f27[_0xefe4('0x5f')][_0xd0afad][_0xefe4('0x63')]:'');}return _0x5910e4+')';};var _0x731489={'where':{'id':_0x5bad89[_0xefe4('0x47')]['id']}},_0x187d8a,_0x1211c5,_0x55ebd1,_0x37841d,_0x2c7cc7;_0x731489=_['merge']({},_0x731489,_0x5bad89[_0xefe4('0x42')]);return db[_0xefe4('0x30')][_0xefe4('0x49')](_0x731489)['then'](function(_0xdfbea4){if(_0xdfbea4){_0x187d8a=_0xdfbea4;return _0xdfbea4[_0xefe4('0x88')]();}return null;})[_0xefe4('0x25')](function(_0x16d730){if(_0x16d730){if(!_0x16d730[_0xefe4('0x3b')]){throw new db['Sequelize'][(_0xefe4('0x64'))](_0xefe4('0x8a'),0x193);}_0x1211c5=_0x16d730;return db[_0xefe4('0x65')][_0xefe4('0x44')]({'raw':!![]});}return null;})['then'](function(_0x35dc0c){if(_0x35dc0c){_0x55ebd1=_[_0xefe4('0x66')](_0x35dc0c,'id');var _0x83a893;var _0x5b0ad7=squel[_0xefe4('0x67')]();_0x5b0ad7[_0xefe4('0x68')](_0x187d8a[_0xefe4('0x69')]);for(var _0x3e03c6=0x0;_0x3e03c6<_0x1211c5[_0xefe4('0x3b')];_0x3e03c6+=0x1){_0x83a893=_0x1211c5[_0x3e03c6][_0xefe4('0x8b')]?_0x55ebd1[_0x1211c5[_0x3e03c6][_0xefe4('0x8b')]][_0xefe4('0x6a')]:_0x1211c5[_0x3e03c6][_0xefe4('0x6b')];_0x83a893=_0x1211c5[_0x3e03c6][_0xefe4('0x6c')]?_['replace'](_0x21f828[_0x1211c5[_0x3e03c6][_0xefe4('0x6c')]],'%s',_0x83a893):_0x83a893;_0x83a893=_0x1211c5[_0x3e03c6][_0xefe4('0x6e')]?_[_0xefe4('0x6d')](_0x48b6f5[_0x1211c5[_0x3e03c6][_0xefe4('0x6e')]],'%s',_0x83a893):_0x83a893;if(_0x1211c5[_0x3e03c6][_0xefe4('0x6f')]){_0x5b0ad7['group'](_0x83a893);}_0x1211c5[_0x3e03c6][_0xefe4('0x70')]&&_0x5b0ad7[_0xefe4('0x8c')](_0x83a893,_0x1211c5[_0x3e03c6][_0xefe4('0x70')]==='DESC'?![]:!![]);_0x5b0ad7['field'](_0x83a893,_0x1211c5[_0x3e03c6]['alias']||_0x83a893);}if(_0x187d8a[_0xefe4('0x72')]){_0x187d8a['joins']=JSON[_0xefe4('0x73')](_0x187d8a[_0xefe4('0x72')]);for(var _0x2b7fa4=0x0;_0x2b7fa4<_0x187d8a[_0xefe4('0x72')][_0xefe4('0x3b')];_0x2b7fa4+=0x1){if(_0x187d8a[_0xefe4('0x72')][_0x2b7fa4]['type']&&_[_0xefe4('0xa5')](_0x5024a1,_0x187d8a[_0xefe4('0x72')][_0x2b7fa4][_0xefe4('0x33')])&&_0x187d8a['joins'][_0x2b7fa4][_0xefe4('0x74')]&&_0x187d8a[_0xefe4('0x72')][_0x2b7fa4]['foreignTable']&&_0x187d8a[_0xefe4('0x72')][_0x2b7fa4]['foreignKey']){_0x5b0ad7[_0x187d8a[_0xefe4('0x72')][_0x2b7fa4][_0xefe4('0x33')]](_0x187d8a['joins'][_0x2b7fa4][_0xefe4('0x77')],null,util[_0xefe4('0x6e')](_0xefe4('0x76'),_0x187d8a[_0xefe4('0x69')],_0x187d8a['joins'][_0x2b7fa4]['parentKey'],_0x187d8a[_0xefe4('0x72')][_0x2b7fa4][_0xefe4('0x77')],_0x187d8a['joins'][_0x2b7fa4][_0xefe4('0x75')]));}}}if(_0x187d8a[_0xefe4('0x78')]){_0x187d8a[_0xefe4('0x78')]=JSON['parse'](_0x187d8a['conditions']);_0x5b0ad7[_0xefe4('0x3e')](_0x870c50(_0x187d8a[_0xefe4('0x78')][_0xefe4('0x61')]));}_0x2c7cc7=_0x5b0ad7[_0xefe4('0x79')]();_0x5b0ad7[_0xefe4('0x1f')](_0x3ab79e);_0x5b0ad7[_0xefe4('0x1e')](0x0);logger[_0xefe4('0xa6')](_0xefe4('0x7a'),_0x5b0ad7[_0xefe4('0x7b')]());return dbH[_0xefe4('0x7c')]['query'](_0x5b0ad7[_0xefe4('0x7b')](),{'type':dbH[_0xefe4('0x7c')][_0xefe4('0x7d')][_0xefe4('0x7e')]});}})[_0xefe4('0x25')](function(){return{'sql':_0x2c7cc7[_0xefe4('0x7b')]()};})[_0xefe4('0x25')](respondWithResult(_0x280c6e,null))[_0xefe4('0x4a')](handleError(_0x280c6e,null));};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js
index 93c1bb9..93f1187 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.model.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3029=['path','rimraf','./analyticCustomReport.attributes','define','AnalyticCustomReport','lodash','util','../../config/logger','api','moment'];(function(_0x5431b1,_0x2ab234){var _0x5c1570=function(_0x1d6962){while(--_0x1d6962){_0x5431b1['push'](_0x5431b1['shift']());}};_0x5c1570(++_0x2ab234);}(_0x3029,0x13b));var _0x9302=function(_0x5dfee3,_0x5e3bbe){_0x5dfee3=_0x5dfee3-0x0;var _0x1e1785=_0x3029[_0x5dfee3];return _0x1e1785;};'use strict';var _=require(_0x9302('0x0'));var util=require(_0x9302('0x1'));var logger=require(_0x9302('0x2'))(_0x9302('0x3'));var moment=require(_0x9302('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x9302('0x5'));var rimraf=require(_0x9302('0x6'));var config=require('../../config/environment');var attributes=require(_0x9302('0x7'));module['exports']=function(_0x4b6726,_0x347f2b){return _0x4b6726[_0x9302('0x8')](_0x9302('0x9'),attributes,{'tableName':'analytics_custom_reports','paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4193=['bluebird','request-promise','path','rimraf','exports','define','lodash','util','../../config/logger','moment'];(function(_0x135046,_0x376150){var _0x53c4fd=function(_0x336d91){while(--_0x336d91){_0x135046['push'](_0x135046['shift']());}};_0x53c4fd(++_0x376150);}(_0x4193,0xce));var _0x3419=function(_0x20af66,_0x4c93c5){_0x20af66=_0x20af66-0x0;var _0x3b21dd=_0x4193[_0x20af66];return _0x3b21dd;};'use strict';var _=require(_0x3419('0x0'));var util=require(_0x3419('0x1'));var logger=require(_0x3419('0x2'))('api');var moment=require(_0x3419('0x3'));var BPromise=require(_0x3419('0x4'));var rp=require(_0x3419('0x5'));var fs=require('fs');var path=require(_0x3419('0x6'));var rimraf=require(_0x3419('0x7'));var config=require('../../config/environment');var attributes=require('./analyticCustomReport.attributes');module[_0x3419('0x8')]=function(_0x102645,_0x52f4d6){return _0x102645[_0x3419('0x9')]('AnalyticCustomReport',attributes,{'tableName':'analytics_custom_reports','paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/analyticCustomReport.rpc.js b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
index 4003f9d..94b72b9 100644
--- a/server/api/analyticCustomReport/analyticCustomReport.rpc.js
+++ b/server/api/analyticCustomReport/analyticCustomReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9526=['AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','request','then','info'];(function(_0x343609,_0x452635){var _0x1c5221=function(_0x4fb227){while(--_0x4fb227){_0x343609['push'](_0x343609['shift']());}};_0x1c5221(++_0x452635);}(_0x9526,0x127));var _0x6952=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9526[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x6952('0x0'));var util=require(_0x6952('0x1'));var moment=require(_0x6952('0x2'));var BPromise=require('bluebird');var rs=require(_0x6952('0x3'));var fs=require('fs');var Redis=require(_0x6952('0x4'));var db=require(_0x6952('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x6952('0x6'))(_0x6952('0x7'));var config=require(_0x6952('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x6952('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x503551,_0x44fc27,_0x4327c7){return new BPromise(function(_0x4f4719,_0x58eb2a){return client[_0x6952('0xa')](_0x503551,_0x4327c7)[_0x6952('0xb')](function(_0xc0cdc8){logger[_0x6952('0xc')](_0x6952('0xd'),_0x44fc27,_0x6952('0xe'));logger[_0x6952('0xf')](_0x6952('0x10'),_0x44fc27,'request\x20sent',JSON[_0x6952('0x11')](_0xc0cdc8));if(_0xc0cdc8[_0x6952('0x12')]){if(_0xc0cdc8[_0x6952('0x12')][_0x6952('0x13')]===0x1f4){logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0x44fc27,_0xc0cdc8[_0x6952('0x12')][_0x6952('0x14')]);return _0x58eb2a(_0xc0cdc8[_0x6952('0x12')][_0x6952('0x14')]);}logger[_0x6952('0x12')](_0x6952('0xd'),_0x44fc27,_0xc0cdc8['error']['message']);return _0x4f4719(_0xc0cdc8[_0x6952('0x12')][_0x6952('0x14')]);}else{logger[_0x6952('0xc')](_0x6952('0xd'),_0x44fc27,_0x6952('0xe'));_0x4f4719(_0xc0cdc8[_0x6952('0x15')]['message']);}})['catch'](function(_0x564bdd){logger[_0x6952('0x12')](_0x6952('0xd'),_0x44fc27,_0x564bdd);_0x58eb2a(_0x564bdd);});});}
\ No newline at end of file
+var _0x5120=['error','code','message','result','catch','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x58bbf2,_0x19a009){var _0xb7bf79=function(_0x4ac6a8){while(--_0x4ac6a8){_0x58bbf2['push'](_0x58bbf2['shift']());}};_0xb7bf79(++_0x19a009);}(_0x5120,0xbd));var _0x0512=function(_0x594821,_0x153b6c){_0x594821=_0x594821-0x0;var _0x139112=_0x5120[_0x594821];return _0x139112;};'use strict';var _=require('lodash');var util=require(_0x0512('0x0'));var moment=require('moment');var BPromise=require(_0x0512('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0512('0x2'));var db=require(_0x0512('0x3'))['db'];var utils=require(_0x0512('0x4'));var logger=require('../../config/logger')(_0x0512('0x5'));var config=require(_0x0512('0x6'));var jayson=require(_0x0512('0x7'));var client=jayson[_0x0512('0x8')][_0x0512('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c72f3,_0xeebe5e,_0x30d6ae){return new BPromise(function(_0x3e3c2c,_0x3f0b5e){return client[_0x0512('0xa')](_0x2c72f3,_0x30d6ae)[_0x0512('0xb')](function(_0x3c82ed){logger[_0x0512('0xc')](_0x0512('0xd'),_0xeebe5e,_0x0512('0xe'));logger[_0x0512('0xf')](_0x0512('0x10'),_0xeebe5e,_0x0512('0xe'),JSON[_0x0512('0x11')](_0x3c82ed));if(_0x3c82ed[_0x0512('0x12')]){if(_0x3c82ed[_0x0512('0x12')][_0x0512('0x13')]===0x1f4){logger[_0x0512('0x12')](_0x0512('0xd'),_0xeebe5e,_0x3c82ed['error'][_0x0512('0x14')]);return _0x3f0b5e(_0x3c82ed[_0x0512('0x12')][_0x0512('0x14')]);}logger[_0x0512('0x12')]('AnalyticCustomReport,\x20%s,\x20%s',_0xeebe5e,_0x3c82ed[_0x0512('0x12')][_0x0512('0x14')]);return _0x3e3c2c(_0x3c82ed[_0x0512('0x12')]['message']);}else{logger[_0x0512('0xc')](_0x0512('0xd'),_0xeebe5e,_0x0512('0xe'));_0x3e3c2c(_0x3c82ed[_0x0512('0x15')][_0x0512('0x14')]);}})[_0x0512('0x16')](function(_0x347b4d){logger[_0x0512('0x12')]('AnalyticCustomReport,\x20%s,\x20%s',_0xeebe5e,_0x347b4d);_0x3f0b5e(_0x347b4d);});});}
\ No newline at end of file
diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js
index 440a8c5..1c0585f 100644
--- a/server/api/analyticCustomReport/index.js
+++ b/server/api/analyticCustomReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x29ec=['../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','isAuthenticated','show','/:id/preview','preview','/:id/run','run','/:id/query','query','post','create','put','/:id','update','delete','exports','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x2ab48e,_0x5154f5){var _0x57db24=function(_0x454100){while(--_0x454100){_0x2ab48e['push'](_0x2ab48e['shift']());}};_0x57db24(++_0x5154f5);}(_0x29ec,0x1b4));var _0xc29e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x29ec[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0xc29e('0x0'));var path=require(_0xc29e('0x1'));var timeout=require(_0xc29e('0x2'));var express=require(_0xc29e('0x3'));var router=express[_0xc29e('0x4')]();var fs_extra=require(_0xc29e('0x5'));var auth=require(_0xc29e('0x6'));var interaction=require(_0xc29e('0x7'));var config=require(_0xc29e('0x8'));var controller=require(_0xc29e('0x9'));router[_0xc29e('0xa')]('/',auth[_0xc29e('0xb')](),controller['index']);router[_0xc29e('0xa')]('/:id',auth[_0xc29e('0xb')](),controller[_0xc29e('0xc')]);router['get'](_0xc29e('0xd'),auth[_0xc29e('0xb')](),controller[_0xc29e('0xe')]);router['get'](_0xc29e('0xf'),auth[_0xc29e('0xb')](),controller[_0xc29e('0x10')]);router['get'](_0xc29e('0x11'),auth[_0xc29e('0xb')](),controller[_0xc29e('0x12')]);router[_0xc29e('0x13')]('/',auth[_0xc29e('0xb')](),controller[_0xc29e('0x14')]);router[_0xc29e('0x15')](_0xc29e('0x16'),auth[_0xc29e('0xb')](),controller[_0xc29e('0x17')]);router[_0xc29e('0x18')](_0xc29e('0x16'),auth[_0xc29e('0xb')](),controller['destroy']);module[_0xc29e('0x19')]=router;
\ No newline at end of file
+var _0x0e40=['update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','/:id','isAuthenticated','show','/:id/preview','preview','/:id/run','run','/:id/query','post','create','put'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0e40,0x123));var _0x00e4=function(_0xa0b89,_0x4b172d){_0xa0b89=_0xa0b89-0x0;var _0x4177a8=_0x0e40[_0xa0b89];return _0x4177a8;};'use strict';var multer=require('multer');var util=require(_0x00e4('0x0'));var path=require(_0x00e4('0x1'));var timeout=require(_0x00e4('0x2'));var express=require(_0x00e4('0x3'));var router=express[_0x00e4('0x4')]();var fs_extra=require(_0x00e4('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x00e4('0x6'));var config=require(_0x00e4('0x7'));var controller=require(_0x00e4('0x8'));router[_0x00e4('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x00e4('0x9')](_0x00e4('0xa'),auth[_0x00e4('0xb')](),controller[_0x00e4('0xc')]);router['get'](_0x00e4('0xd'),auth['isAuthenticated'](),controller[_0x00e4('0xe')]);router[_0x00e4('0x9')](_0x00e4('0xf'),auth['isAuthenticated'](),controller[_0x00e4('0x10')]);router[_0x00e4('0x9')](_0x00e4('0x11'),auth[_0x00e4('0xb')](),controller['query']);router[_0x00e4('0x12')]('/',auth['isAuthenticated'](),controller[_0x00e4('0x13')]);router[_0x00e4('0x14')](_0x00e4('0xa'),auth[_0x00e4('0xb')](),controller[_0x00e4('0x15')]);router[_0x00e4('0x16')](_0x00e4('0xa'),auth[_0x00e4('0xb')](),controller['destroy']);module[_0x00e4('0x17')]=router;
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
index 7ca0142..2385df9 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2eb2=['TEXT','exports','STRING'];(function(_0x4186fa,_0x26a01c){var _0x136990=function(_0x13324f){while(--_0x13324f){_0x4186fa['push'](_0x4186fa['shift']());}};_0x136990(++_0x26a01c);}(_0x2eb2,0x19f));var _0x22eb=function(_0x5b78e8,_0x55096b){_0x5b78e8=_0x5b78e8-0x0;var _0xf2c321=_0x2eb2[_0x5b78e8];return _0xf2c321;};'use strict';var Sequelize=require('sequelize');module[_0x22eb('0x0')]={'name':{'type':Sequelize[_0x22eb('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x22eb('0x1')]},'parent':{'type':Sequelize[_0x22eb('0x1')]},'table':{'type':Sequelize[_0x22eb('0x1')]},'conditions':{'type':Sequelize[_0x22eb('0x2')]},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0xdbf5=['exports','STRING','TEXT'];(function(_0x59c7ba,_0x552bf0){var _0x12b94e=function(_0x8ab80a){while(--_0x8ab80a){_0x59c7ba['push'](_0x59c7ba['shift']());}};_0x12b94e(++_0x552bf0);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x1fc831,_0x2074cd){_0x1fc831=_0x1fc831-0x0;var _0x40a770=_0xdbf5[_0x1fc831];return _0x40a770;};'use strict';var Sequelize=require('sequelize');module[_0x5dbf('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x5dbf('0x1')]},'table':{'type':Sequelize[_0x5dbf('0x1')]},'conditions':{'type':Sequelize[_0x5dbf('0x2')]},'joins':{'type':Sequelize[_0x5dbf('0x2')]}};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
index dce2d97..8641b94 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf494=['name','send','index','map','AnalyticDefaultReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','includeAll','find','create','body','user','Reports','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','join','left_join','cross_join','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','group','field','value','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','replace','format','orderBy','DESC','alias','joins','parse','foreignTable','%s.%s\x20=\x20%s.%s','parentKey','foreignKey','conditions','debug','Limited\x20Query:','sequelize','toString','QueryTypes','right_join','SUM(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','ROUND(%s)','IS\x20NULL','operator','condition','getFields','groupBy','clone','output','fullPath','%s-%s.%s','generate','csv','default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','info','child_process','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','SELECT','run','runReport','IS\x20NOT\x20EMPTY','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','then','destroy','get','DefaultReports','error','stack'];(function(_0x3db2db,_0x577bc0){var _0x5905a4=function(_0x4a7385){while(--_0x4a7385){_0x3db2db['push'](_0x3db2db['shift']());}};_0x5905a4(++_0x577bc0);}(_0xf494,0x1c6));var _0x4f49=function(_0x50388b,_0x276225){_0x50388b=_0x50388b-0x0;var _0x6037b=_0xf494[_0x50388b];return _0x6037b;};'use strict';var emlformat=require(_0x4f49('0x0'));var rimraf=require(_0x4f49('0x1'));var zipdir=require(_0x4f49('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4f49('0x3'));var moment=require(_0x4f49('0x4'));var BPromise=require(_0x4f49('0x5'));var Mustache=require(_0x4f49('0x6'));var util=require(_0x4f49('0x7'));var path=require(_0x4f49('0x8'));var sox=require(_0x4f49('0x9'));var csv=require(_0x4f49('0xa'));var ejs=require(_0x4f49('0xb'));var fs=require('fs');var fs_extra=require(_0x4f49('0xc'));var _=require(_0x4f49('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x4f49('0xe'));var deskjs=require(_0x4f49('0xf'));var toCsv=require(_0x4f49('0xa'));var querystring=require(_0x4f49('0x10'));var Papa=require(_0x4f49('0x11'));var Redis=require(_0x4f49('0x12'));var authService=require(_0x4f49('0x13'));var qs=require(_0x4f49('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4f49('0x15'));var logger=require(_0x4f49('0x16'))('api');var utils=require(_0x4f49('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x4f49('0x18'))['db'];var dbH=require(_0x4f49('0x18'))['dbH'];function respondWithStatusCode(_0x1e1c37,_0x111a8b){_0x111a8b=_0x111a8b||0xcc;return function(_0x1b9145){if(_0x1b9145){return _0x1e1c37[_0x4f49('0x19')](_0x111a8b);}return _0x1e1c37[_0x4f49('0x1a')](_0x111a8b)[_0x4f49('0x1b')]();};}function respondWithResult(_0xfdb477,_0x5c373e){_0x5c373e=_0x5c373e||0xc8;return function(_0x515ace){if(_0x515ace){return _0xfdb477[_0x4f49('0x1a')](_0x5c373e)[_0x4f49('0x1c')](_0x515ace);}};}function respondWithFilteredResult(_0x5878f4,_0x5bdfaf){return function(_0x2f0a0d){if(_0x2f0a0d){var _0x2ecaaa=typeof _0x5bdfaf[_0x4f49('0x1d')]==='undefined'&&typeof _0x5bdfaf[_0x4f49('0x1e')]===_0x4f49('0x1f');var _0x4e85df=_0x2f0a0d['count'];var _0x5bb23b=_0x2ecaaa?0x0:_0x5bdfaf['offset'];var _0x47f1e8=_0x2ecaaa?_0x2f0a0d[_0x4f49('0x20')]:_0x5bdfaf[_0x4f49('0x1d')]+_0x5bdfaf[_0x4f49('0x1e')];var _0x407042;if(_0x47f1e8>=_0x4e85df){_0x47f1e8=_0x4e85df;_0x407042=0xc8;}else{_0x407042=0xce;}_0x5878f4['status'](_0x407042);return _0x5878f4[_0x4f49('0x21')](_0x4f49('0x22'),_0x5bb23b+'-'+_0x47f1e8+'/'+_0x4e85df)[_0x4f49('0x1c')](_0x2f0a0d);}return null;};}function patchUpdates(_0xaab5e7){return function(_0xea82f8){try{jsonpatch['apply'](_0xea82f8,_0xaab5e7,!![]);}catch(_0x3e7e28){return BPromise[_0x4f49('0x23')](_0x3e7e28);}return _0xea82f8[_0x4f49('0x24')]();};}function saveUpdates(_0x53b57d,_0x40755e){return function(_0x1d70a7){if(_0x1d70a7){return _0x1d70a7[_0x4f49('0x25')](_0x53b57d)[_0x4f49('0x26')](function(_0x9d30aa){return _0x9d30aa;});}return null;};}function removeEntity(_0x36187b,_0x559d98){return function(_0x4e9041){if(_0x4e9041){return _0x4e9041[_0x4f49('0x27')]()[_0x4f49('0x26')](function(){var _0x4fedbb=_0x4e9041[_0x4f49('0x28')]({'plain':!![]});var _0x2c1519=_0x4f49('0x29');return db['UserProfileResource'][_0x4f49('0x27')]({'where':{'type':_0x2c1519,'resourceId':_0x4fedbb['id']}})[_0x4f49('0x26')](function(){return _0x4e9041;});})[_0x4f49('0x26')](function(){_0x36187b[_0x4f49('0x1a')](0xcc)[_0x4f49('0x1b')]();});}};}function handleEntityNotFound(_0x122404,_0x4915af){return function(_0x50c571){if(!_0x50c571){_0x122404[_0x4f49('0x19')](0x194);}return _0x50c571;};}function handleError(_0x2c00ee,_0x605c91){_0x605c91=_0x605c91||0x1f4;return function(_0x560050){logger[_0x4f49('0x2a')](_0x560050[_0x4f49('0x2b')]);if(_0x560050[_0x4f49('0x2c')]){delete _0x560050['name'];}_0x2c00ee['status'](_0x605c91)[_0x4f49('0x2d')](_0x560050);};}exports[_0x4f49('0x2e')]=function(_0x7a6ea0,_0x5e7076){var _0x1eaac6={},_0x35aa33={},_0x173657={'count':0x0,'rows':[]};var _0x2ceda4=_[_0x4f49('0x2f')](db[_0x4f49('0x30')][_0x4f49('0x31')],function(_0x45ae19){return{'name':_0x45ae19[_0x4f49('0x32')],'type':_0x45ae19[_0x4f49('0x33')][_0x4f49('0x34')]};});_0x35aa33[_0x4f49('0x35')]=_[_0x4f49('0x2f')](_0x2ceda4,_0x4f49('0x2c'));_0x35aa33[_0x4f49('0x36')]=_[_0x4f49('0x37')](_0x7a6ea0[_0x4f49('0x36')]);_0x35aa33[_0x4f49('0x38')]=_[_0x4f49('0x39')](_0x35aa33['model'],_0x35aa33[_0x4f49('0x36')]);_0x1eaac6[_0x4f49('0x3a')]=_[_0x4f49('0x39')](_0x35aa33[_0x4f49('0x35')],qs[_0x4f49('0x3b')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x3b')]));_0x1eaac6[_0x4f49('0x3a')]=_0x1eaac6[_0x4f49('0x3a')][_0x4f49('0x3c')]?_0x1eaac6[_0x4f49('0x3a')]:_0x35aa33[_0x4f49('0x35')];if(!_0x7a6ea0[_0x4f49('0x36')]['hasOwnProperty'](_0x4f49('0x3d'))){_0x1eaac6[_0x4f49('0x1e')]=qs[_0x4f49('0x1e')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x1e')]);_0x1eaac6[_0x4f49('0x1d')]=qs[_0x4f49('0x1d')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x1d')]);}_0x1eaac6[_0x4f49('0x3e')]=qs[_0x4f49('0x3f')](_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x3f')]);_0x1eaac6[_0x4f49('0x40')]=qs['filters'](_[_0x4f49('0x41')](_0x7a6ea0[_0x4f49('0x36')],_0x35aa33['filters']),_0x2ceda4);if(_0x7a6ea0[_0x4f49('0x36')][_0x4f49('0x42')]){_0x1eaac6['where']=_[_0x4f49('0x43')](_0x1eaac6[_0x4f49('0x40')],{'$or':_[_0x4f49('0x2f')](_0x2ceda4,function(_0x200b1d){if(_0x200b1d[_0x4f49('0x33')]!==_0x4f49('0x44')){var _0x29e910={};_0x29e910[_0x200b1d['name']]={'$like':'%'+_0x7a6ea0['query']['filter']+'%'};return _0x29e910;}})});}_0x1eaac6=_[_0x4f49('0x43')]({},_0x1eaac6,_0x7a6ea0[_0x4f49('0x45')]);var _0x2e4355={'where':_0x1eaac6[_0x4f49('0x40')]};return db[_0x4f49('0x30')][_0x4f49('0x20')](_0x2e4355)[_0x4f49('0x26')](function(_0x23720a){_0x173657[_0x4f49('0x20')]=_0x23720a;if(_0x7a6ea0['query']['includeAll']){_0x1eaac6[_0x4f49('0x46')]=[{'all':!![]}];}return db[_0x4f49('0x30')][_0x4f49('0x47')](_0x1eaac6);})['then'](function(_0x2d6b56){_0x173657['rows']=_0x2d6b56;return _0x173657;})['then'](respondWithFilteredResult(_0x5e7076,_0x1eaac6))[_0x4f49('0x48')](handleError(_0x5e7076,null));};exports[_0x4f49('0x49')]=function(_0x40eadc,_0x497cb8){var _0x287781={'raw':!![],'where':{'id':_0x40eadc['params']['id']}},_0x11b4df={};_0x11b4df[_0x4f49('0x35')]=_['keys'](db[_0x4f49('0x30')][_0x4f49('0x31')]);_0x11b4df[_0x4f49('0x36')]=_['keys'](_0x40eadc[_0x4f49('0x36')]);_0x11b4df[_0x4f49('0x38')]=_[_0x4f49('0x39')](_0x11b4df[_0x4f49('0x35')],_0x11b4df[_0x4f49('0x36')]);_0x287781[_0x4f49('0x3a')]=_[_0x4f49('0x39')](_0x11b4df[_0x4f49('0x35')],qs[_0x4f49('0x3b')](_0x40eadc[_0x4f49('0x36')]['fields']));_0x287781[_0x4f49('0x3a')]=_0x287781[_0x4f49('0x3a')]['length']?_0x287781[_0x4f49('0x3a')]:_0x11b4df['model'];if(_0x40eadc[_0x4f49('0x36')][_0x4f49('0x4a')]){_0x287781[_0x4f49('0x46')]=[{'all':!![]}];}_0x287781=_[_0x4f49('0x43')]({},_0x287781,_0x40eadc['options']);return db[_0x4f49('0x30')][_0x4f49('0x4b')](_0x287781)[_0x4f49('0x26')](handleEntityNotFound(_0x497cb8,null))[_0x4f49('0x26')](respondWithResult(_0x497cb8,null))[_0x4f49('0x48')](handleError(_0x497cb8,null));};exports[_0x4f49('0x4c')]=function(_0x37fdb7,_0xd282c){return db[_0x4f49('0x30')][_0x4f49('0x4c')](_0x37fdb7[_0x4f49('0x4d')],{})[_0x4f49('0x26')](function(_0x148031){var _0x2104d0=_0x37fdb7[_0x4f49('0x4e')][_0x4f49('0x28')]({'plain':!![]});if(!_0x2104d0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2104d0['role']===_0x4f49('0x4e')){var _0x197670=_0x148031[_0x4f49('0x28')]({'plain':!![]});var _0xe46c90=_0x4f49('0x4f');return db[_0x4f49('0x50')][_0x4f49('0x4b')]({'where':{'name':_0xe46c90,'userProfileId':_0x2104d0['userProfileId']},'raw':!![]})[_0x4f49('0x26')](function(_0x4ff0a2){if(_0x4ff0a2&&_0x4ff0a2[_0x4f49('0x51')]===0x0){return db[_0x4f49('0x52')][_0x4f49('0x4c')]({'name':_0x197670[_0x4f49('0x2c')],'resourceId':_0x197670['id'],'type':'DefaultReports','sectionId':_0x4ff0a2['id']},{})[_0x4f49('0x26')](function(){return _0x148031;});}else{return _0x148031;}})['catch'](function(_0x52d18c){logger[_0x4f49('0x2a')](_0x4f49('0x53'),_0x52d18c);throw _0x52d18c;});}return _0x148031;})[_0x4f49('0x26')](respondWithResult(_0xd282c,0xc9))[_0x4f49('0x48')](handleError(_0xd282c,null));};exports['update']=function(_0x599c51,_0xd7f47b){if(_0x599c51[_0x4f49('0x4d')]['id']){delete _0x599c51['body']['id'];}return db[_0x4f49('0x30')]['find']({'where':{'id':_0x599c51['params']['id']}})[_0x4f49('0x26')](handleEntityNotFound(_0xd7f47b,null))['then'](saveUpdates(_0x599c51[_0x4f49('0x4d')],null))['then'](respondWithResult(_0xd7f47b,null))[_0x4f49('0x48')](handleError(_0xd7f47b,null));};exports[_0x4f49('0x27')]=function(_0x2472c9,_0x883408){return db[_0x4f49('0x30')][_0x4f49('0x4b')]({'where':{'id':_0x2472c9[_0x4f49('0x54')]['id']}})[_0x4f49('0x26')](handleEntityNotFound(_0x883408,null))['then'](removeEntity(_0x883408,null))[_0x4f49('0x48')](handleError(_0x883408,null));};exports['preview']=function(_0x213608,_0x1f640d){var _0xc4fc6b=0xa;var _0x467f12=[_0x4f49('0x55'),_0x4f49('0x56'),'right_join',_0x4f49('0x57')];var _0xd3689c={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x4f49('0x58'),'MAX':_0x4f49('0x59'),'MIN':_0x4f49('0x5a'),'AVG':_0x4f49('0x5b'),'GROUP_CONCAT':_0x4f49('0x5c'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x4f49('0x5d')};var _0x564bf5={'SEC_TO_TIME':_0x4f49('0x5e'),'DATE':_0x4f49('0x5f'),'HOUR':_0x4f49('0x60'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x4f49('0x61')};var _0x21807e=function(_0x265988){return!_[_0x4f49('0x62')](['IS\x20NULL',_0x4f49('0x63'),_0x4f49('0x64'),'IS\x20NOT\x20EMPTY'],_0x265988);};var _0x293839=function(_0x17b15){if(!_0x17b15||!_0x17b15[_0x4f49('0x65')][_0x4f49('0x3c')]){return'';}for(var _0x28ea73='(',_0x1b80f2=0x0;_0x1b80f2<_0x17b15[_0x4f49('0x65')][_0x4f49('0x3c')];_0x1b80f2+=0x1){_0x1b80f2>0x0&&(_0x28ea73+='\x20'+_0x17b15['operator']+'\x20');_0x28ea73+=_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x66')]?_0x293839(_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x66')]):_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x67')]+'\x20'+_0x17b15[_0x4f49('0x65')][_0x1b80f2]['condition']+(_0x21807e(_0x17b15[_0x4f49('0x65')][_0x1b80f2]['condition'])?'\x20'+_0x17b15[_0x4f49('0x65')][_0x1b80f2][_0x4f49('0x68')]:'');}return _0x28ea73+')';};var _0x4714c7={'where':{'id':_0x213608[_0x4f49('0x54')]['id']}},_0xf29378,_0xc7743e,_0x3f2f3f,_0x61a565,_0x297698;_0x4714c7=_[_0x4f49('0x43')]({},_0x4714c7,_0x213608['options']);return db[_0x4f49('0x30')][_0x4f49('0x4b')](_0x4714c7)[_0x4f49('0x26')](function(_0x2cdaa4){if(_0x2cdaa4){_0xf29378=_0x2cdaa4;return _0x2cdaa4['getFields']();}return null;})['then'](function(_0x28e8ae){if(_0x28e8ae){if(!_0x28e8ae['length']){throw new db[(_0x4f49('0x69'))][(_0x4f49('0x6a'))](_0x4f49('0x6b'),0x193);}_0xc7743e=_0x28e8ae;return db[_0x4f49('0x6c')][_0x4f49('0x47')]({'raw':!![]});}return null;})[_0x4f49('0x26')](function(_0x179431){if(_0x179431){_0x3f2f3f=_[_0x4f49('0x6d')](_0x179431,'id');var _0x3823f0;var _0x3e9b47=squel[_0x4f49('0x6e')]();_0x3e9b47[_0x4f49('0x6f')](_0xf29378[_0x4f49('0x70')]);for(var _0xd53de8=0x0;_0xd53de8<_0xc7743e[_0x4f49('0x3c')];_0xd53de8+=0x1){_0x3823f0=_0xc7743e[_0xd53de8][_0x4f49('0x71')]?_0x3f2f3f[_0xc7743e[_0xd53de8][_0x4f49('0x71')]][_0x4f49('0x72')]:_0xc7743e[_0xd53de8][_0x4f49('0x67')];_0x3823f0=_0xc7743e[_0xd53de8][_0x4f49('0x73')]?_[_0x4f49('0x74')](_0xd3689c[_0xc7743e[_0xd53de8][_0x4f49('0x73')]],'%s',_0x3823f0):_0x3823f0;_0x3823f0=_0xc7743e[_0xd53de8][_0x4f49('0x75')]?_[_0x4f49('0x74')](_0x564bf5[_0xc7743e[_0xd53de8][_0x4f49('0x75')]],'%s',_0x3823f0):_0x3823f0;if(_0xc7743e[_0xd53de8]['groupBy']){_0x3e9b47[_0x4f49('0x66')](_0x3823f0);}_0xc7743e[_0xd53de8]['orderBy']&&_0x3e9b47[_0x4f49('0x3e')](_0x3823f0,_0xc7743e[_0xd53de8][_0x4f49('0x76')]===_0x4f49('0x77')?![]:!![]);_0x3e9b47[_0x4f49('0x67')](_0x3823f0,_0xc7743e[_0xd53de8][_0x4f49('0x78')]||_0x3823f0);}if(_0xf29378[_0x4f49('0x79')]){_0xf29378[_0x4f49('0x79')]=JSON[_0x4f49('0x7a')](_0xf29378[_0x4f49('0x79')]);for(var _0x541ac6=0x0;_0x541ac6<_0xf29378['joins'][_0x4f49('0x3c')];_0x541ac6+=0x1){if(_0xf29378['joins'][_0x541ac6][_0x4f49('0x33')]&&_[_0x4f49('0x62')](_0x467f12,_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x33')])&&_0xf29378[_0x4f49('0x79')][_0x541ac6]['parentKey']&&_0xf29378['joins'][_0x541ac6][_0x4f49('0x7b')]&&_0xf29378[_0x4f49('0x79')][_0x541ac6]['foreignKey']){_0x3e9b47[_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x33')]](_0xf29378['joins'][_0x541ac6][_0x4f49('0x7b')],null,util['format'](_0x4f49('0x7c'),_0xf29378[_0x4f49('0x70')],_0xf29378['joins'][_0x541ac6][_0x4f49('0x7d')],_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x7b')],_0xf29378[_0x4f49('0x79')][_0x541ac6][_0x4f49('0x7e')]));}}}if(_0xf29378[_0x4f49('0x7f')]){_0xf29378['conditions']=JSON[_0x4f49('0x7a')](_0xf29378['conditions']);_0x3e9b47[_0x4f49('0x40')](_0x293839(_0xf29378['conditions'][_0x4f49('0x66')]));}_0x297698=_0x3e9b47['clone']();_0x3e9b47[_0x4f49('0x1e')](_0xc4fc6b);_0x3e9b47[_0x4f49('0x1d')](0x0);logger[_0x4f49('0x80')](_0x4f49('0x81'),_0x3e9b47['toString']());return dbH[_0x4f49('0x82')]['query'](_0x3e9b47[_0x4f49('0x83')](),{'type':dbH['sequelize'][_0x4f49('0x84')]['SELECT']});}})['then'](respondWithResult(_0x1f640d,null))[_0x4f49('0x48')](handleError(_0x1f640d,null));};function runReport(_0x20b2be,_0x16cb4d,_0x4c0e7a){var _0x289810=_0x16cb4d[_0x4f49('0x2c')];var _0x5c33c9=0xa;var _0x5d52ae=['join',_0x4f49('0x56'),_0x4f49('0x85'),_0x4f49('0x57')];var _0x87439={'SUM':_0x4f49('0x86'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x4f49('0x58'),'MAX':_0x4f49('0x59'),'MIN':_0x4f49('0x5a'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x4f49('0x5c'),'GROUP_CONCAT ASC':_0x4f49('0x87'),'GROUP_CONCAT DESC':_0x4f49('0x5d')};var _0x2902a1={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x4f49('0x5f'),'HOUR':_0x4f49('0x60'),'ROUND':_0x4f49('0x88'),'UNIX_TIMESTAMP':_0x4f49('0x61')};var _0x389679=function(_0x5304c3){return!_[_0x4f49('0x62')]([_0x4f49('0x89'),'IS\x20NOT\x20NULL',_0x4f49('0x64'),'IS\x20NOT\x20EMPTY'],_0x5304c3);};var _0x351a33=function(_0x4d72a0){if(!_0x4d72a0||!_0x4d72a0[_0x4f49('0x65')][_0x4f49('0x3c')]){return'';}for(var _0x2ef19e='(',_0x6ad599=0x0;_0x6ad599<_0x4d72a0[_0x4f49('0x65')]['length'];_0x6ad599+=0x1){_0x6ad599>0x0&&(_0x2ef19e+='\x20'+_0x4d72a0[_0x4f49('0x8a')]+'\x20');_0x2ef19e+=_0x4d72a0[_0x4f49('0x65')][_0x6ad599][_0x4f49('0x66')]?_0x351a33(_0x4d72a0[_0x4f49('0x65')][_0x6ad599]['group']):_0x4d72a0[_0x4f49('0x65')][_0x6ad599]['field']+'\x20'+_0x4d72a0[_0x4f49('0x65')][_0x6ad599]['condition']+(_0x389679(_0x4d72a0[_0x4f49('0x65')][_0x6ad599][_0x4f49('0x8b')])?'\x20'+_0x4d72a0[_0x4f49('0x65')][_0x6ad599][_0x4f49('0x68')]:'');}return _0x2ef19e+')';};var _0x111e90={'where':{'id':_0x20b2be['id']}},_0xd253ed,_0x323a3a,_0xe0adc3,_0x3a26ff,_0x64f0ee;_0x111e90=_['merge']({},_0x111e90,_0x4c0e7a);return db[_0x4f49('0x30')][_0x4f49('0x4b')](_0x111e90)[_0x4f49('0x26')](function(_0x299849){if(_0x299849){_0xd253ed=_0x299849;return _0x299849[_0x4f49('0x8c')]();}return null;})[_0x4f49('0x26')](function(_0x55b28b){if(_0x55b28b){if(!_0x55b28b[_0x4f49('0x3c')]){throw new db[(_0x4f49('0x69'))][(_0x4f49('0x6a'))](_0x4f49('0x6b'),0x193);}_0x323a3a=_0x55b28b;return db['AnalyticMetric'][_0x4f49('0x47')]({'raw':!![]});}return null;})['then'](function(_0x3c4e88){if(_0x3c4e88){_0xe0adc3=_[_0x4f49('0x6d')](_0x3c4e88,'id');var _0x5c5d2;var _0xa880a2=squel['select']();_0xa880a2[_0x4f49('0x6f')](_0xd253ed[_0x4f49('0x70')]);for(var _0x11c0a0=0x0;_0x11c0a0<_0x323a3a[_0x4f49('0x3c')];_0x11c0a0+=0x1){_0x5c5d2=_0x323a3a[_0x11c0a0][_0x4f49('0x71')]?_0xe0adc3[_0x323a3a[_0x11c0a0][_0x4f49('0x71')]][_0x4f49('0x72')]:_0x323a3a[_0x11c0a0][_0x4f49('0x67')];_0x5c5d2=_0x323a3a[_0x11c0a0][_0x4f49('0x73')]?_[_0x4f49('0x74')](_0x87439[_0x323a3a[_0x11c0a0][_0x4f49('0x73')]],'%s',_0x5c5d2):_0x5c5d2;_0x5c5d2=_0x323a3a[_0x11c0a0][_0x4f49('0x75')]?_[_0x4f49('0x74')](_0x2902a1[_0x323a3a[_0x11c0a0][_0x4f49('0x75')]],'%s',_0x5c5d2):_0x5c5d2;if(_0x323a3a[_0x11c0a0][_0x4f49('0x8d')]){_0xa880a2[_0x4f49('0x66')](_0x5c5d2);}_0x323a3a[_0x11c0a0][_0x4f49('0x76')]&&_0xa880a2[_0x4f49('0x3e')](_0x5c5d2,_0x323a3a[_0x11c0a0]['orderBy']===_0x4f49('0x77')?![]:!![]);_0xa880a2[_0x4f49('0x67')](_0x5c5d2,_0x323a3a[_0x11c0a0][_0x4f49('0x78')]||_0x5c5d2);}if(_0xd253ed[_0x4f49('0x79')]){_0xd253ed['joins']=JSON[_0x4f49('0x7a')](_0xd253ed[_0x4f49('0x79')]);for(var _0x594460=0x0;_0x594460<_0xd253ed[_0x4f49('0x79')]['length'];_0x594460+=0x1){if(_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x33')]&&_[_0x4f49('0x62')](_0x5d52ae,_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x33')])&&_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x7d')]&&_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x7b')]&&_0xd253ed[_0x4f49('0x79')][_0x594460]['foreignKey']){_0xa880a2[_0xd253ed['joins'][_0x594460][_0x4f49('0x33')]](_0xd253ed['joins'][_0x594460][_0x4f49('0x7b')],null,util[_0x4f49('0x75')]('%s.%s\x20=\x20%s.%s',_0xd253ed['table'],_0xd253ed[_0x4f49('0x79')][_0x594460]['parentKey'],_0xd253ed[_0x4f49('0x79')][_0x594460][_0x4f49('0x7b')],_0xd253ed[_0x4f49('0x79')][_0x594460]['foreignKey']));}}}if(_0xd253ed[_0x4f49('0x7f')]){_0xd253ed['conditions']=JSON[_0x4f49('0x7a')](_0xd253ed[_0x4f49('0x7f')]);_0xa880a2[_0x4f49('0x40')](_0x351a33(_0xd253ed['conditions'][_0x4f49('0x66')]));}_0x64f0ee=_0xa880a2[_0x4f49('0x8e')]();_0xa880a2[_0x4f49('0x1e')](_0x5c33c9);_0xa880a2['offset'](0x0);return;}})['then'](function(){if(_0x16cb4d[_0x4f49('0x8f')]==='web'){return null;}var _0x2bc9df=_[_0x4f49('0x43')](_0x16cb4d,{'name':_0x16cb4d[_0x4f49('0x90')]||_0x16cb4d['name']||_0xd253ed[_0x4f49('0x2c')],'basename':_0x289810,'savename':util['format'](_0x4f49('0x91'),_0x16cb4d[_0x4f49('0x2c')]||_0xd253ed[_0x4f49('0x2c')],require('randomstring')[_0x4f49('0x92')](0x4),_0x16cb4d[_0x4f49('0x8f')]||_0x4f49('0x93')),'reportId':_0xd253ed['id'],'reportType':_0x4f49('0x94')});return db[_0x4f49('0x95')][_0x4f49('0x4c')](_0x2bc9df,{'raw':!![]});})['then'](function(_0x5b6ac7){if(_0xd253ed[_0x4f49('0x70')]===_0x4f49('0x96')){_0x64f0ee[_0x4f49('0x40')](_0xd253ed[_0x4f49('0x70')]+_0x4f49('0x97'),_0x16cb4d[_0x4f49('0x98')],_0x16cb4d[_0x4f49('0x99')]);}else{_0x64f0ee[_0x4f49('0x40')](_0xd253ed[_0x4f49('0x70')]+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x16cb4d[_0x4f49('0x98')],_0x16cb4d[_0x4f49('0x99')]);}if(_0x5b6ac7){logger[_0x4f49('0x9a')]('Run\x20Query:',_0x64f0ee[_0x4f49('0x83')]());require(_0x4f49('0x9b'))[_0x4f49('0x9c')](path['join'](__dirname,_0x4f49('0x9d'),_0x5b6ac7[_0x4f49('0x8f')]),[_0x5b6ac7['id'],_0x64f0ee[_0x4f49('0x83')](),path['join'](__dirname,_0x4f49('0x9e'),_0x5b6ac7[_0x4f49('0x9f')]),_0x289810]);return _0x5b6ac7;}else{var _0x5efb11=squel['select']();_0x5efb11[_0x4f49('0x6f')]('('+_0x64f0ee[_0x4f49('0x83')]()+')',_0x4f49('0xa0'));_0x5efb11[_0x4f49('0x67')](_0x4f49('0xa1'),_0x4f49('0x20'));_0x64f0ee['limit'](_0x16cb4d['limit']||_0x5c33c9);_0x64f0ee['offset'](_0x16cb4d[_0x4f49('0x1d')]||0x0);return dbH[_0x4f49('0x82')]['query'](_0x5efb11[_0x4f49('0x83')](),{'type':dbH[_0x4f49('0x82')][_0x4f49('0x84')]['SELECT']})['then'](function(_0x3633b5){if(!_0x3633b5['length']){_0x3a26ff=0x0;}else{_0x3a26ff=_0x3633b5[0x0][_0x4f49('0x20')]||0x0;}return dbH[_0x4f49('0x82')][_0x4f49('0x36')](_0x64f0ee[_0x4f49('0x83')](),{'type':dbH[_0x4f49('0x82')]['QueryTypes'][_0x4f49('0xa2')]});})[_0x4f49('0x26')](function(_0x45c938){return{'rows':_0x45c938||[],'count':_0x3a26ff};});}});}exports[_0x4f49('0xa3')]=function(_0x4a4d75,_0x93e85d){return runReport(_0x4a4d75[_0x4f49('0x54')],_0x4a4d75['query'],_0x4a4d75[_0x4f49('0x45')])[_0x4f49('0x26')](respondWithResult(_0x93e85d,null))[_0x4f49('0x48')](handleError(_0x93e85d,null));};exports[_0x4f49('0xa4')]=runReport;exports[_0x4f49('0x36')]=function(_0x40991b,_0x56290f){var _0x4994b6=0xa;var _0x1c7d87=[_0x4f49('0x55'),_0x4f49('0x56'),_0x4f49('0x85'),_0x4f49('0x57')];var _0x5cd00a={'SUM':_0x4f49('0x86'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x4f49('0x58'),'MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':_0x4f49('0x5b'),'GROUP_CONCAT':_0x4f49('0x5c'),'GROUP_CONCAT ASC':_0x4f49('0x87'),'GROUP_CONCAT DESC':_0x4f49('0x5d')};var _0xd876f1={'SEC_TO_TIME':_0x4f49('0x5e'),'DATE':_0x4f49('0x5f'),'HOUR':'HOUR(%s)','ROUND':_0x4f49('0x88'),'UNIX_TIMESTAMP':_0x4f49('0x61')};var _0x1ae2c9=function(_0x566634){return!_[_0x4f49('0x62')]([_0x4f49('0x89'),_0x4f49('0x63'),'IS\x20EMPTY',_0x4f49('0xa5')],_0x566634);};var _0x541dc2=function(_0x4061bf){if(!_0x4061bf||!_0x4061bf[_0x4f49('0x65')][_0x4f49('0x3c')]){return'';}for(var _0x1bc18d='(',_0x5e6103=0x0;_0x5e6103<_0x4061bf[_0x4f49('0x65')][_0x4f49('0x3c')];_0x5e6103+=0x1){_0x5e6103>0x0&&(_0x1bc18d+='\x20'+_0x4061bf[_0x4f49('0x8a')]+'\x20');_0x1bc18d+=_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x66')]?_0x541dc2(_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x66')]):_0x4061bf[_0x4f49('0x65')][_0x5e6103]['field']+'\x20'+_0x4061bf['rules'][_0x5e6103][_0x4f49('0x8b')]+(_0x1ae2c9(_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x8b')])?'\x20'+_0x4061bf[_0x4f49('0x65')][_0x5e6103][_0x4f49('0x68')]:'');}return _0x1bc18d+')';};var _0x29dbab={'where':{'id':_0x40991b[_0x4f49('0x54')]['id']}},_0x5f459b,_0x1d090f,_0x37d2f4,_0x5bcb36,_0x3f04fa;_0x29dbab=_[_0x4f49('0x43')]({},_0x29dbab,_0x40991b['options']);return db['AnalyticDefaultReport'][_0x4f49('0x4b')](_0x29dbab)[_0x4f49('0x26')](function(_0x200848){if(_0x200848){_0x5f459b=_0x200848;return _0x200848['getFields']();}return null;})[_0x4f49('0x26')](function(_0x48f4bc){if(_0x48f4bc){if(!_0x48f4bc[_0x4f49('0x3c')]){throw new db['Sequelize'][(_0x4f49('0x6a'))](_0x4f49('0x6b'),0x193);}_0x1d090f=_0x48f4bc;return db['AnalyticMetric'][_0x4f49('0x47')]({'raw':!![]});}return null;})[_0x4f49('0x26')](function(_0x513bc9){if(_0x513bc9){_0x37d2f4=_[_0x4f49('0x6d')](_0x513bc9,'id');var _0x47567c;var _0x5f1538=squel[_0x4f49('0x6e')]();_0x5f1538[_0x4f49('0x6f')](_0x5f459b[_0x4f49('0x70')]);for(var _0xd91e48=0x0;_0xd91e48<_0x1d090f[_0x4f49('0x3c')];_0xd91e48+=0x1){_0x47567c=_0x1d090f[_0xd91e48][_0x4f49('0x71')]?_0x37d2f4[_0x1d090f[_0xd91e48]['MetricId']][_0x4f49('0x72')]:_0x1d090f[_0xd91e48][_0x4f49('0x67')];_0x47567c=_0x1d090f[_0xd91e48][_0x4f49('0x73')]?_['replace'](_0x5cd00a[_0x1d090f[_0xd91e48][_0x4f49('0x73')]],'%s',_0x47567c):_0x47567c;_0x47567c=_0x1d090f[_0xd91e48][_0x4f49('0x75')]?_[_0x4f49('0x74')](_0xd876f1[_0x1d090f[_0xd91e48][_0x4f49('0x75')]],'%s',_0x47567c):_0x47567c;if(_0x1d090f[_0xd91e48][_0x4f49('0x8d')]){_0x5f1538[_0x4f49('0x66')](_0x47567c);}_0x1d090f[_0xd91e48][_0x4f49('0x76')]&&_0x5f1538['order'](_0x47567c,_0x1d090f[_0xd91e48][_0x4f49('0x76')]==='DESC'?![]:!![]);_0x5f1538['field'](_0x47567c,_0x1d090f[_0xd91e48][_0x4f49('0x78')]||_0x47567c);}if(_0x5f459b['joins']){_0x5f459b[_0x4f49('0x79')]=JSON[_0x4f49('0x7a')](_0x5f459b[_0x4f49('0x79')]);for(var _0x85eb3f=0x0;_0x85eb3f<_0x5f459b[_0x4f49('0x79')][_0x4f49('0x3c')];_0x85eb3f+=0x1){if(_0x5f459b['joins'][_0x85eb3f][_0x4f49('0x33')]&&_[_0x4f49('0x62')](_0x1c7d87,_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x33')])&&_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7d')]&&_0x5f459b[_0x4f49('0x79')][_0x85eb3f]['foreignTable']&&_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7e')]){_0x5f1538[_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x33')]](_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7b')],null,util[_0x4f49('0x75')](_0x4f49('0x7c'),_0x5f459b[_0x4f49('0x70')],_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7d')],_0x5f459b[_0x4f49('0x79')][_0x85eb3f]['foreignTable'],_0x5f459b[_0x4f49('0x79')][_0x85eb3f][_0x4f49('0x7e')]));}}}if(_0x5f459b['conditions']){_0x5f459b[_0x4f49('0x7f')]=JSON[_0x4f49('0x7a')](_0x5f459b[_0x4f49('0x7f')]);_0x5f1538[_0x4f49('0x40')](_0x541dc2(_0x5f459b[_0x4f49('0x7f')][_0x4f49('0x66')]));}_0x3f04fa=_0x5f1538['clone']();_0x5f1538['limit'](_0x4994b6);_0x5f1538['offset'](0x0);logger['debug'](_0x4f49('0x81'),_0x5f1538['toString']());return dbH[_0x4f49('0x82')][_0x4f49('0x36')](_0x5f1538[_0x4f49('0x83')](),{'type':dbH[_0x4f49('0x82')][_0x4f49('0x84')][_0x4f49('0xa2')]});}})['then'](function(){return{'sql':_0x3f04fa[_0x4f49('0x83')]()};})['then'](respondWithResult(_0x56290f,null))[_0x4f49('0x48')](handleError(_0x56290f,null));};
\ No newline at end of file
+var _0x0295=['default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','fork','../../files/reports','COUNT(*)','SELECT','run','runReport','MAX(%s)','eml-format','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','save','update','then','get','UserProfileResource','destroy','error','name','send','index','map','AnalyticDefaultReport','rawAttributes','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','rows','catch','show','params','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','Reports','UserProfileSection','autoAssociation','DefaultReports','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20NOT\x20EMPTY','rules','field','condition','value','Sequelize','ValidationErrorItem','AnalyticMetric','keyBy','from','table','MetricId','metric','function','format','groupBy','orderBy','DESC','alias','joins','parse','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','conditions','group','clone','debug','Limited\x20Query:','sequelize','toString','QueryTypes','COUNT(DISTINCT\x20%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','IS\x20EMPTY','operator','getFields','findAll','select','replace','output','web','%s-%s.%s','randomstring','generate','csv'];(function(_0x1bd914,_0x2daeb1){var _0x3ce697=function(_0x563f0e){while(--_0x563f0e){_0x1bd914['push'](_0x1bd914['shift']());}};_0x3ce697(++_0x2daeb1);}(_0x0295,0x1f0));var _0x5029=function(_0x5213d3,_0x457833){_0x5213d3=_0x5213d3-0x0;var _0x3eb033=_0x0295[_0x5213d3];return _0x3eb033;};'use strict';var emlformat=require(_0x5029('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x5029('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x5029('0x2'));var Mustache=require(_0x5029('0x3'));var util=require(_0x5029('0x4'));var path=require(_0x5029('0x5'));var sox=require(_0x5029('0x6'));var csv=require(_0x5029('0x7'));var ejs=require(_0x5029('0x8'));var fs=require('fs');var fs_extra=require(_0x5029('0x9'));var _=require(_0x5029('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5029('0xb'));var toCsv=require('to-csv');var querystring=require(_0x5029('0xc'));var Papa=require('papaparse');var Redis=require(_0x5029('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x5029('0xe'));var as=require(_0x5029('0xf'));var hardwareService=require(_0x5029('0x10'));var logger=require('../../config/logger')(_0x5029('0x11'));var utils=require(_0x5029('0x12'));var config=require(_0x5029('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x5029('0x14'))['db'];var dbH=require(_0x5029('0x14'))['dbH'];function respondWithStatusCode(_0x4fa22d,_0x49f836){_0x49f836=_0x49f836||0xcc;return function(_0x4aebb6){if(_0x4aebb6){return _0x4fa22d[_0x5029('0x15')](_0x49f836);}return _0x4fa22d[_0x5029('0x16')](_0x49f836)[_0x5029('0x17')]();};}function respondWithResult(_0x434630,_0x2c0b33){_0x2c0b33=_0x2c0b33||0xc8;return function(_0x11c24b){if(_0x11c24b){return _0x434630[_0x5029('0x16')](_0x2c0b33)[_0x5029('0x18')](_0x11c24b);}};}function respondWithFilteredResult(_0x10bf55,_0x326923){return function(_0x457c73){if(_0x457c73){var _0x353cba=typeof _0x326923[_0x5029('0x19')]===_0x5029('0x1a')&&typeof _0x326923[_0x5029('0x1b')]==='undefined';var _0x1ed567=_0x457c73[_0x5029('0x1c')];var _0x35de81=_0x353cba?0x0:_0x326923[_0x5029('0x19')];var _0x8cea01=_0x353cba?_0x457c73[_0x5029('0x1c')]:_0x326923[_0x5029('0x19')]+_0x326923['limit'];var _0x226a5c;if(_0x8cea01>=_0x1ed567){_0x8cea01=_0x1ed567;_0x226a5c=0xc8;}else{_0x226a5c=0xce;}_0x10bf55['status'](_0x226a5c);return _0x10bf55[_0x5029('0x1d')](_0x5029('0x1e'),_0x35de81+'-'+_0x8cea01+'/'+_0x1ed567)[_0x5029('0x18')](_0x457c73);}return null;};}function patchUpdates(_0x3cf0fb){return function(_0x4b5854){try{jsonpatch['apply'](_0x4b5854,_0x3cf0fb,!![]);}catch(_0x4c9184){return BPromise['reject'](_0x4c9184);}return _0x4b5854[_0x5029('0x1f')]();};}function saveUpdates(_0x853a34,_0x1eb228){return function(_0x2bbbcb){if(_0x2bbbcb){return _0x2bbbcb[_0x5029('0x20')](_0x853a34)[_0x5029('0x21')](function(_0x125c26){return _0x125c26;});}return null;};}function removeEntity(_0x356dac,_0x3e857d){return function(_0x4ceaae){if(_0x4ceaae){return _0x4ceaae['destroy']()['then'](function(){var _0x588d90=_0x4ceaae[_0x5029('0x22')]({'plain':!![]});var _0x51093c='DefaultReports';return db[_0x5029('0x23')][_0x5029('0x24')]({'where':{'type':_0x51093c,'resourceId':_0x588d90['id']}})[_0x5029('0x21')](function(){return _0x4ceaae;});})['then'](function(){_0x356dac[_0x5029('0x16')](0xcc)[_0x5029('0x17')]();});}};}function handleEntityNotFound(_0x5e45c4,_0x2b6d99){return function(_0x31f0a0){if(!_0x31f0a0){_0x5e45c4[_0x5029('0x15')](0x194);}return _0x31f0a0;};}function handleError(_0x4a24b9,_0x32da06){_0x32da06=_0x32da06||0x1f4;return function(_0x251f99){logger[_0x5029('0x25')](_0x251f99['stack']);if(_0x251f99[_0x5029('0x26')]){delete _0x251f99[_0x5029('0x26')];}_0x4a24b9['status'](_0x32da06)[_0x5029('0x27')](_0x251f99);};}exports[_0x5029('0x28')]=function(_0x4434ff,_0x1c3dd9){var _0x196830={},_0x2a1ed6={},_0x44255a={'count':0x0,'rows':[]};var _0x465153=_[_0x5029('0x29')](db[_0x5029('0x2a')][_0x5029('0x2b')],function(_0x4519c8){return{'name':_0x4519c8['fieldName'],'type':_0x4519c8[_0x5029('0x2c')]['key']};});_0x2a1ed6[_0x5029('0x2d')]=_['map'](_0x465153,'name');_0x2a1ed6[_0x5029('0x2e')]=_[_0x5029('0x2f')](_0x4434ff[_0x5029('0x2e')]);_0x2a1ed6['filters']=_[_0x5029('0x30')](_0x2a1ed6[_0x5029('0x2d')],_0x2a1ed6[_0x5029('0x2e')]);_0x196830[_0x5029('0x31')]=_[_0x5029('0x30')](_0x2a1ed6[_0x5029('0x2d')],qs[_0x5029('0x32')](_0x4434ff[_0x5029('0x2e')][_0x5029('0x32')]));_0x196830['attributes']=_0x196830[_0x5029('0x31')][_0x5029('0x33')]?_0x196830[_0x5029('0x31')]:_0x2a1ed6[_0x5029('0x2d')];if(!_0x4434ff['query'][_0x5029('0x34')](_0x5029('0x35'))){_0x196830[_0x5029('0x1b')]=qs['limit'](_0x4434ff['query'][_0x5029('0x1b')]);_0x196830[_0x5029('0x19')]=qs['offset'](_0x4434ff['query'][_0x5029('0x19')]);}_0x196830[_0x5029('0x36')]=qs[_0x5029('0x37')](_0x4434ff[_0x5029('0x2e')][_0x5029('0x37')]);_0x196830[_0x5029('0x38')]=qs[_0x5029('0x39')](_[_0x5029('0x3a')](_0x4434ff[_0x5029('0x2e')],_0x2a1ed6[_0x5029('0x39')]),_0x465153);if(_0x4434ff[_0x5029('0x2e')][_0x5029('0x3b')]){_0x196830[_0x5029('0x38')]=_[_0x5029('0x3c')](_0x196830['where'],{'$or':_['map'](_0x465153,function(_0x73797c){if(_0x73797c[_0x5029('0x2c')]!==_0x5029('0x3d')){var _0x48c9eb={};_0x48c9eb[_0x73797c[_0x5029('0x26')]]={'$like':'%'+_0x4434ff[_0x5029('0x2e')]['filter']+'%'};return _0x48c9eb;}})});}_0x196830=_[_0x5029('0x3c')]({},_0x196830,_0x4434ff['options']);var _0x506f0d={'where':_0x196830['where']};return db[_0x5029('0x2a')][_0x5029('0x1c')](_0x506f0d)[_0x5029('0x21')](function(_0x78768){_0x44255a[_0x5029('0x1c')]=_0x78768;if(_0x4434ff[_0x5029('0x2e')][_0x5029('0x3e')]){_0x196830[_0x5029('0x3f')]=[{'all':!![]}];}return db[_0x5029('0x2a')]['findAll'](_0x196830);})[_0x5029('0x21')](function(_0x236455){_0x44255a[_0x5029('0x40')]=_0x236455;return _0x44255a;})[_0x5029('0x21')](respondWithFilteredResult(_0x1c3dd9,_0x196830))[_0x5029('0x41')](handleError(_0x1c3dd9,null));};exports[_0x5029('0x42')]=function(_0x5658a7,_0x259db8){var _0xa1580a={'raw':!![],'where':{'id':_0x5658a7[_0x5029('0x43')]['id']}},_0x9434ed={};_0x9434ed[_0x5029('0x2d')]=_['keys'](db[_0x5029('0x2a')][_0x5029('0x2b')]);_0x9434ed[_0x5029('0x2e')]=_[_0x5029('0x2f')](_0x5658a7[_0x5029('0x2e')]);_0x9434ed[_0x5029('0x39')]=_[_0x5029('0x30')](_0x9434ed[_0x5029('0x2d')],_0x9434ed[_0x5029('0x2e')]);_0xa1580a['attributes']=_[_0x5029('0x30')](_0x9434ed[_0x5029('0x2d')],qs[_0x5029('0x32')](_0x5658a7[_0x5029('0x2e')]['fields']));_0xa1580a['attributes']=_0xa1580a[_0x5029('0x31')][_0x5029('0x33')]?_0xa1580a[_0x5029('0x31')]:_0x9434ed[_0x5029('0x2d')];if(_0x5658a7[_0x5029('0x2e')][_0x5029('0x3e')]){_0xa1580a[_0x5029('0x3f')]=[{'all':!![]}];}_0xa1580a=_[_0x5029('0x3c')]({},_0xa1580a,_0x5658a7[_0x5029('0x44')]);return db[_0x5029('0x2a')][_0x5029('0x45')](_0xa1580a)[_0x5029('0x21')](handleEntityNotFound(_0x259db8,null))[_0x5029('0x21')](respondWithResult(_0x259db8,null))[_0x5029('0x41')](handleError(_0x259db8,null));};exports[_0x5029('0x46')]=function(_0x175cc0,_0x10fc07){return db[_0x5029('0x2a')][_0x5029('0x46')](_0x175cc0[_0x5029('0x47')],{})[_0x5029('0x21')](function(_0x489457){var _0x1069c4=_0x175cc0['user'][_0x5029('0x22')]({'plain':!![]});if(!_0x1069c4)throw new Error(_0x5029('0x48'));if(_0x1069c4['role']==='user'){var _0x319bff=_0x489457['get']({'plain':!![]});var _0x4aaa43=_0x5029('0x49');return db[_0x5029('0x4a')][_0x5029('0x45')]({'where':{'name':_0x4aaa43,'userProfileId':_0x1069c4['userProfileId']},'raw':!![]})['then'](function(_0x1510bb){if(_0x1510bb&&_0x1510bb[_0x5029('0x4b')]===0x0){return db['UserProfileResource'][_0x5029('0x46')]({'name':_0x319bff['name'],'resourceId':_0x319bff['id'],'type':_0x5029('0x4c'),'sectionId':_0x1510bb['id']},{})['then'](function(){return _0x489457;});}else{return _0x489457;}})[_0x5029('0x41')](function(_0x27e1c0){logger[_0x5029('0x25')](_0x5029('0x4d'),_0x27e1c0);throw _0x27e1c0;});}return _0x489457;})[_0x5029('0x21')](respondWithResult(_0x10fc07,0xc9))[_0x5029('0x41')](handleError(_0x10fc07,null));};exports[_0x5029('0x20')]=function(_0xa25013,_0x586936){if(_0xa25013[_0x5029('0x47')]['id']){delete _0xa25013['body']['id'];}return db[_0x5029('0x2a')][_0x5029('0x45')]({'where':{'id':_0xa25013['params']['id']}})[_0x5029('0x21')](handleEntityNotFound(_0x586936,null))['then'](saveUpdates(_0xa25013['body'],null))['then'](respondWithResult(_0x586936,null))[_0x5029('0x41')](handleError(_0x586936,null));};exports['destroy']=function(_0x49d1db,_0x353ae4){return db[_0x5029('0x2a')]['find']({'where':{'id':_0x49d1db[_0x5029('0x43')]['id']}})['then'](handleEntityNotFound(_0x353ae4,null))['then'](removeEntity(_0x353ae4,null))[_0x5029('0x41')](handleError(_0x353ae4,null));};exports[_0x5029('0x4e')]=function(_0x81e39c,_0x448273){var _0x164179=0xa;var _0x4e8d9f=[_0x5029('0x4f'),_0x5029('0x50'),_0x5029('0x51'),_0x5029('0x52')];var _0x4dca54={'SUM':_0x5029('0x53'),'COUNT':_0x5029('0x54'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0x5029('0x55'),'AVG':_0x5029('0x56'),'GROUP_CONCAT':_0x5029('0x57'),'GROUP_CONCAT ASC':_0x5029('0x58'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x4208ab={'SEC_TO_TIME':_0x5029('0x59'),'DATE':_0x5029('0x5a'),'HOUR':_0x5029('0x5b'),'ROUND':_0x5029('0x5c'),'UNIX_TIMESTAMP':_0x5029('0x5d')};var _0x59a718=function(_0x560324){return!_[_0x5029('0x5e')]([_0x5029('0x5f'),_0x5029('0x60'),'IS\x20EMPTY',_0x5029('0x61')],_0x560324);};var _0x2d439a=function(_0x105638){if(!_0x105638||!_0x105638[_0x5029('0x62')][_0x5029('0x33')]){return'';}for(var _0x5264c6='(',_0x2ec5d0=0x0;_0x2ec5d0<_0x105638[_0x5029('0x62')][_0x5029('0x33')];_0x2ec5d0+=0x1){_0x2ec5d0>0x0&&(_0x5264c6+='\x20'+_0x105638['operator']+'\x20');_0x5264c6+=_0x105638[_0x5029('0x62')][_0x2ec5d0]['group']?_0x2d439a(_0x105638[_0x5029('0x62')][_0x2ec5d0]['group']):_0x105638[_0x5029('0x62')][_0x2ec5d0][_0x5029('0x63')]+'\x20'+_0x105638[_0x5029('0x62')][_0x2ec5d0][_0x5029('0x64')]+(_0x59a718(_0x105638[_0x5029('0x62')][_0x2ec5d0][_0x5029('0x64')])?'\x20'+_0x105638['rules'][_0x2ec5d0][_0x5029('0x65')]:'');}return _0x5264c6+')';};var _0x19220d={'where':{'id':_0x81e39c['params']['id']}},_0x1ff8df,_0x151562,_0x389700,_0x506f74,_0x13ca47;_0x19220d=_[_0x5029('0x3c')]({},_0x19220d,_0x81e39c['options']);return db[_0x5029('0x2a')]['find'](_0x19220d)[_0x5029('0x21')](function(_0x54daf9){if(_0x54daf9){_0x1ff8df=_0x54daf9;return _0x54daf9['getFields']();}return null;})[_0x5029('0x21')](function(_0x575f09){if(_0x575f09){if(!_0x575f09[_0x5029('0x33')]){throw new db[(_0x5029('0x66'))][(_0x5029('0x67'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x151562=_0x575f09;return db[_0x5029('0x68')]['findAll']({'raw':!![]});}return null;})[_0x5029('0x21')](function(_0x255dfb){if(_0x255dfb){_0x389700=_[_0x5029('0x69')](_0x255dfb,'id');var _0x1cca02;var _0x1deed7=squel['select']();_0x1deed7[_0x5029('0x6a')](_0x1ff8df[_0x5029('0x6b')]);for(var _0x5890ac=0x0;_0x5890ac<_0x151562[_0x5029('0x33')];_0x5890ac+=0x1){_0x1cca02=_0x151562[_0x5890ac][_0x5029('0x6c')]?_0x389700[_0x151562[_0x5890ac][_0x5029('0x6c')]][_0x5029('0x6d')]:_0x151562[_0x5890ac][_0x5029('0x63')];_0x1cca02=_0x151562[_0x5890ac][_0x5029('0x6e')]?_['replace'](_0x4dca54[_0x151562[_0x5890ac]['function']],'%s',_0x1cca02):_0x1cca02;_0x1cca02=_0x151562[_0x5890ac][_0x5029('0x6f')]?_['replace'](_0x4208ab[_0x151562[_0x5890ac][_0x5029('0x6f')]],'%s',_0x1cca02):_0x1cca02;if(_0x151562[_0x5890ac][_0x5029('0x70')]){_0x1deed7['group'](_0x1cca02);}_0x151562[_0x5890ac][_0x5029('0x71')]&&_0x1deed7['order'](_0x1cca02,_0x151562[_0x5890ac]['orderBy']===_0x5029('0x72')?![]:!![]);_0x1deed7[_0x5029('0x63')](_0x1cca02,_0x151562[_0x5890ac][_0x5029('0x73')]||_0x1cca02);}if(_0x1ff8df[_0x5029('0x74')]){_0x1ff8df['joins']=JSON[_0x5029('0x75')](_0x1ff8df[_0x5029('0x74')]);for(var _0x4a2ce8=0x0;_0x4a2ce8<_0x1ff8df[_0x5029('0x74')][_0x5029('0x33')];_0x4a2ce8+=0x1){if(_0x1ff8df['joins'][_0x4a2ce8]['type']&&_['includes'](_0x4e8d9f,_0x1ff8df[_0x5029('0x74')][_0x4a2ce8][_0x5029('0x2c')])&&_0x1ff8df[_0x5029('0x74')][_0x4a2ce8][_0x5029('0x76')]&&_0x1ff8df[_0x5029('0x74')][_0x4a2ce8][_0x5029('0x77')]&&_0x1ff8df[_0x5029('0x74')][_0x4a2ce8][_0x5029('0x78')]){_0x1deed7[_0x1ff8df[_0x5029('0x74')][_0x4a2ce8]['type']](_0x1ff8df['joins'][_0x4a2ce8][_0x5029('0x77')],null,util[_0x5029('0x6f')](_0x5029('0x79'),_0x1ff8df[_0x5029('0x6b')],_0x1ff8df[_0x5029('0x74')][_0x4a2ce8][_0x5029('0x76')],_0x1ff8df[_0x5029('0x74')][_0x4a2ce8]['foreignTable'],_0x1ff8df[_0x5029('0x74')][_0x4a2ce8][_0x5029('0x78')]));}}}if(_0x1ff8df[_0x5029('0x7a')]){_0x1ff8df['conditions']=JSON[_0x5029('0x75')](_0x1ff8df[_0x5029('0x7a')]);_0x1deed7[_0x5029('0x38')](_0x2d439a(_0x1ff8df['conditions'][_0x5029('0x7b')]));}_0x13ca47=_0x1deed7[_0x5029('0x7c')]();_0x1deed7[_0x5029('0x1b')](_0x164179);_0x1deed7['offset'](0x0);logger[_0x5029('0x7d')](_0x5029('0x7e'),_0x1deed7['toString']());return dbH[_0x5029('0x7f')][_0x5029('0x2e')](_0x1deed7[_0x5029('0x80')](),{'type':dbH[_0x5029('0x7f')][_0x5029('0x81')]['SELECT']});}})[_0x5029('0x21')](respondWithResult(_0x448273,null))[_0x5029('0x41')](handleError(_0x448273,null));};function runReport(_0x426d70,_0xe6ac28,_0x153cdc){var _0x5e7f50=_0xe6ac28[_0x5029('0x26')];var _0x202c51=0xa;var _0x344203=['join',_0x5029('0x50'),_0x5029('0x51'),_0x5029('0x52')];var _0x3e47bd={'SUM':_0x5029('0x53'),'COUNT':_0x5029('0x54'),'COUNT DISTINCT':_0x5029('0x82'),'MAX':'MAX(%s)','MIN':_0x5029('0x55'),'AVG':_0x5029('0x56'),'GROUP_CONCAT':_0x5029('0x57'),'GROUP_CONCAT ASC':_0x5029('0x58'),'GROUP_CONCAT DESC':_0x5029('0x83')};var _0x4c40d1={'SEC_TO_TIME':_0x5029('0x59'),'DATE':_0x5029('0x5a'),'HOUR':_0x5029('0x5b'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x5029('0x5d')};var _0x41e2d8=function(_0x51098a){return!_['includes'](['IS\x20NULL',_0x5029('0x60'),_0x5029('0x84'),_0x5029('0x61')],_0x51098a);};var _0x4007c8=function(_0x3dc05a){if(!_0x3dc05a||!_0x3dc05a['rules'][_0x5029('0x33')]){return'';}for(var _0x2e4782='(',_0x2c0540=0x0;_0x2c0540<_0x3dc05a['rules']['length'];_0x2c0540+=0x1){_0x2c0540>0x0&&(_0x2e4782+='\x20'+_0x3dc05a[_0x5029('0x85')]+'\x20');_0x2e4782+=_0x3dc05a[_0x5029('0x62')][_0x2c0540][_0x5029('0x7b')]?_0x4007c8(_0x3dc05a[_0x5029('0x62')][_0x2c0540]['group']):_0x3dc05a[_0x5029('0x62')][_0x2c0540][_0x5029('0x63')]+'\x20'+_0x3dc05a[_0x5029('0x62')][_0x2c0540][_0x5029('0x64')]+(_0x41e2d8(_0x3dc05a[_0x5029('0x62')][_0x2c0540][_0x5029('0x64')])?'\x20'+_0x3dc05a[_0x5029('0x62')][_0x2c0540][_0x5029('0x65')]:'');}return _0x2e4782+')';};var _0x5aecc2={'where':{'id':_0x426d70['id']}},_0x159450,_0x556c7a,_0x48bbe2,_0x3e3150,_0x533ee2;_0x5aecc2=_[_0x5029('0x3c')]({},_0x5aecc2,_0x153cdc);return db[_0x5029('0x2a')][_0x5029('0x45')](_0x5aecc2)[_0x5029('0x21')](function(_0x1b6f4c){if(_0x1b6f4c){_0x159450=_0x1b6f4c;return _0x1b6f4c[_0x5029('0x86')]();}return null;})[_0x5029('0x21')](function(_0x1d6092){if(_0x1d6092){if(!_0x1d6092['length']){throw new db['Sequelize'][(_0x5029('0x67'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x556c7a=_0x1d6092;return db['AnalyticMetric'][_0x5029('0x87')]({'raw':!![]});}return null;})['then'](function(_0x4b25ed){if(_0x4b25ed){_0x48bbe2=_[_0x5029('0x69')](_0x4b25ed,'id');var _0xb8da0b;var _0x13e07e=squel[_0x5029('0x88')]();_0x13e07e[_0x5029('0x6a')](_0x159450['table']);for(var _0x38c02a=0x0;_0x38c02a<_0x556c7a[_0x5029('0x33')];_0x38c02a+=0x1){_0xb8da0b=_0x556c7a[_0x38c02a][_0x5029('0x6c')]?_0x48bbe2[_0x556c7a[_0x38c02a]['MetricId']][_0x5029('0x6d')]:_0x556c7a[_0x38c02a][_0x5029('0x63')];_0xb8da0b=_0x556c7a[_0x38c02a][_0x5029('0x6e')]?_[_0x5029('0x89')](_0x3e47bd[_0x556c7a[_0x38c02a][_0x5029('0x6e')]],'%s',_0xb8da0b):_0xb8da0b;_0xb8da0b=_0x556c7a[_0x38c02a]['format']?_['replace'](_0x4c40d1[_0x556c7a[_0x38c02a][_0x5029('0x6f')]],'%s',_0xb8da0b):_0xb8da0b;if(_0x556c7a[_0x38c02a][_0x5029('0x70')]){_0x13e07e['group'](_0xb8da0b);}_0x556c7a[_0x38c02a][_0x5029('0x71')]&&_0x13e07e[_0x5029('0x36')](_0xb8da0b,_0x556c7a[_0x38c02a][_0x5029('0x71')]===_0x5029('0x72')?![]:!![]);_0x13e07e[_0x5029('0x63')](_0xb8da0b,_0x556c7a[_0x38c02a][_0x5029('0x73')]||_0xb8da0b);}if(_0x159450[_0x5029('0x74')]){_0x159450[_0x5029('0x74')]=JSON['parse'](_0x159450['joins']);for(var _0x4243c3=0x0;_0x4243c3<_0x159450['joins'][_0x5029('0x33')];_0x4243c3+=0x1){if(_0x159450['joins'][_0x4243c3][_0x5029('0x2c')]&&_[_0x5029('0x5e')](_0x344203,_0x159450[_0x5029('0x74')][_0x4243c3]['type'])&&_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x76')]&&_0x159450[_0x5029('0x74')][_0x4243c3]['foreignTable']&&_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x78')]){_0x13e07e[_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x2c')]](_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x77')],null,util[_0x5029('0x6f')](_0x5029('0x79'),_0x159450[_0x5029('0x6b')],_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x76')],_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x77')],_0x159450[_0x5029('0x74')][_0x4243c3][_0x5029('0x78')]));}}}if(_0x159450[_0x5029('0x7a')]){_0x159450[_0x5029('0x7a')]=JSON[_0x5029('0x75')](_0x159450['conditions']);_0x13e07e[_0x5029('0x38')](_0x4007c8(_0x159450[_0x5029('0x7a')][_0x5029('0x7b')]));}_0x533ee2=_0x13e07e[_0x5029('0x7c')]();_0x13e07e[_0x5029('0x1b')](_0x202c51);_0x13e07e['offset'](0x0);return;}})[_0x5029('0x21')](function(){if(_0xe6ac28[_0x5029('0x8a')]===_0x5029('0x8b')){return null;}var _0xf7729c=_[_0x5029('0x3c')](_0xe6ac28,{'name':_0xe6ac28['fullPath']||_0xe6ac28[_0x5029('0x26')]||_0x159450[_0x5029('0x26')],'basename':_0x5e7f50,'savename':util[_0x5029('0x6f')](_0x5029('0x8c'),_0xe6ac28[_0x5029('0x26')]||_0x159450['name'],require(_0x5029('0x8d'))[_0x5029('0x8e')](0x4),_0xe6ac28[_0x5029('0x8a')]||_0x5029('0x8f')),'reportId':_0x159450['id'],'reportType':_0x5029('0x90')});return db[_0x5029('0x91')][_0x5029('0x46')](_0xf7729c,{'raw':!![]});})[_0x5029('0x21')](function(_0x4a7535){if(_0x159450['table']===_0x5029('0x92')){_0x533ee2[_0x5029('0x38')](_0x159450[_0x5029('0x6b')]+_0x5029('0x93'),_0xe6ac28[_0x5029('0x94')],_0xe6ac28['endDate']);}else{_0x533ee2[_0x5029('0x38')](_0x159450['table']+_0x5029('0x95'),_0xe6ac28[_0x5029('0x94')],_0xe6ac28[_0x5029('0x96')]);}if(_0x4a7535){logger[_0x5029('0x97')](_0x5029('0x98'),_0x533ee2[_0x5029('0x80')]());require('child_process')[_0x5029('0x99')](path[_0x5029('0x4f')](__dirname,'../../components/export/',_0x4a7535[_0x5029('0x8a')]),[_0x4a7535['id'],_0x533ee2[_0x5029('0x80')](),path['join'](__dirname,_0x5029('0x9a'),_0x4a7535['savename']),_0x5e7f50]);return _0x4a7535;}else{var _0x54c0f3=squel['select']();_0x54c0f3['from']('('+_0x533ee2[_0x5029('0x80')]()+')','countTable');_0x54c0f3[_0x5029('0x63')](_0x5029('0x9b'),'count');_0x533ee2[_0x5029('0x1b')](_0xe6ac28[_0x5029('0x1b')]||_0x202c51);_0x533ee2['offset'](_0xe6ac28[_0x5029('0x19')]||0x0);return dbH[_0x5029('0x7f')]['query'](_0x54c0f3[_0x5029('0x80')](),{'type':dbH[_0x5029('0x7f')]['QueryTypes'][_0x5029('0x9c')]})[_0x5029('0x21')](function(_0x17c755){if(!_0x17c755[_0x5029('0x33')]){_0x3e3150=0x0;}else{_0x3e3150=_0x17c755[0x0][_0x5029('0x1c')]||0x0;}return dbH[_0x5029('0x7f')]['query'](_0x533ee2[_0x5029('0x80')](),{'type':dbH['sequelize'][_0x5029('0x81')][_0x5029('0x9c')]});})[_0x5029('0x21')](function(_0x3ebe00){return{'rows':_0x3ebe00||[],'count':_0x3e3150};});}});}exports[_0x5029('0x9d')]=function(_0x2138cc,_0x331af8){return runReport(_0x2138cc[_0x5029('0x43')],_0x2138cc[_0x5029('0x2e')],_0x2138cc[_0x5029('0x44')])[_0x5029('0x21')](respondWithResult(_0x331af8,null))[_0x5029('0x41')](handleError(_0x331af8,null));};exports[_0x5029('0x9e')]=runReport;exports[_0x5029('0x2e')]=function(_0x9de076,_0x2ac88e){var _0x55ee4f=0xa;var _0x1fa9eb=[_0x5029('0x4f'),_0x5029('0x50'),_0x5029('0x51'),_0x5029('0x52')];var _0x405d47={'SUM':'SUM(%s)','COUNT':_0x5029('0x54'),'COUNT DISTINCT':_0x5029('0x82'),'MAX':_0x5029('0x9f'),'MIN':_0x5029('0x55'),'AVG':_0x5029('0x56'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x5029('0x58'),'GROUP_CONCAT DESC':_0x5029('0x83')};var _0x29c3a2={'SEC_TO_TIME':_0x5029('0x59'),'DATE':_0x5029('0x5a'),'HOUR':_0x5029('0x5b'),'ROUND':_0x5029('0x5c'),'UNIX_TIMESTAMP':_0x5029('0x5d')};var _0xb39e9d=function(_0x124c5e){return!_['includes']([_0x5029('0x5f'),'IS\x20NOT\x20NULL',_0x5029('0x84'),_0x5029('0x61')],_0x124c5e);};var _0x120acc=function(_0x21bb22){if(!_0x21bb22||!_0x21bb22['rules'][_0x5029('0x33')]){return'';}for(var _0x339112='(',_0x5d7c1a=0x0;_0x5d7c1a<_0x21bb22[_0x5029('0x62')][_0x5029('0x33')];_0x5d7c1a+=0x1){_0x5d7c1a>0x0&&(_0x339112+='\x20'+_0x21bb22['operator']+'\x20');_0x339112+=_0x21bb22[_0x5029('0x62')][_0x5d7c1a][_0x5029('0x7b')]?_0x120acc(_0x21bb22['rules'][_0x5d7c1a]['group']):_0x21bb22[_0x5029('0x62')][_0x5d7c1a]['field']+'\x20'+_0x21bb22['rules'][_0x5d7c1a][_0x5029('0x64')]+(_0xb39e9d(_0x21bb22['rules'][_0x5d7c1a][_0x5029('0x64')])?'\x20'+_0x21bb22[_0x5029('0x62')][_0x5d7c1a]['value']:'');}return _0x339112+')';};var _0x327299={'where':{'id':_0x9de076['params']['id']}},_0x3463cc,_0x590cc2,_0x3ac39a,_0x37c47b,_0x62e4af;_0x327299=_[_0x5029('0x3c')]({},_0x327299,_0x9de076['options']);return db[_0x5029('0x2a')][_0x5029('0x45')](_0x327299)[_0x5029('0x21')](function(_0x5e7ec8){if(_0x5e7ec8){_0x3463cc=_0x5e7ec8;return _0x5e7ec8[_0x5029('0x86')]();}return null;})[_0x5029('0x21')](function(_0x5aa480){if(_0x5aa480){if(!_0x5aa480[_0x5029('0x33')]){throw new db[(_0x5029('0x66'))]['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x590cc2=_0x5aa480;return db[_0x5029('0x68')][_0x5029('0x87')]({'raw':!![]});}return null;})['then'](function(_0x5842a5){if(_0x5842a5){_0x3ac39a=_['keyBy'](_0x5842a5,'id');var _0x313bdb;var _0x1d38e0=squel[_0x5029('0x88')]();_0x1d38e0['from'](_0x3463cc[_0x5029('0x6b')]);for(var _0x581237=0x0;_0x581237<_0x590cc2[_0x5029('0x33')];_0x581237+=0x1){_0x313bdb=_0x590cc2[_0x581237]['MetricId']?_0x3ac39a[_0x590cc2[_0x581237]['MetricId']]['metric']:_0x590cc2[_0x581237]['field'];_0x313bdb=_0x590cc2[_0x581237][_0x5029('0x6e')]?_[_0x5029('0x89')](_0x405d47[_0x590cc2[_0x581237][_0x5029('0x6e')]],'%s',_0x313bdb):_0x313bdb;_0x313bdb=_0x590cc2[_0x581237][_0x5029('0x6f')]?_[_0x5029('0x89')](_0x29c3a2[_0x590cc2[_0x581237]['format']],'%s',_0x313bdb):_0x313bdb;if(_0x590cc2[_0x581237][_0x5029('0x70')]){_0x1d38e0[_0x5029('0x7b')](_0x313bdb);}_0x590cc2[_0x581237][_0x5029('0x71')]&&_0x1d38e0[_0x5029('0x36')](_0x313bdb,_0x590cc2[_0x581237][_0x5029('0x71')]===_0x5029('0x72')?![]:!![]);_0x1d38e0['field'](_0x313bdb,_0x590cc2[_0x581237][_0x5029('0x73')]||_0x313bdb);}if(_0x3463cc[_0x5029('0x74')]){_0x3463cc[_0x5029('0x74')]=JSON['parse'](_0x3463cc['joins']);for(var _0xd05bc9=0x0;_0xd05bc9<_0x3463cc[_0x5029('0x74')][_0x5029('0x33')];_0xd05bc9+=0x1){if(_0x3463cc[_0x5029('0x74')][_0xd05bc9][_0x5029('0x2c')]&&_[_0x5029('0x5e')](_0x1fa9eb,_0x3463cc[_0x5029('0x74')][_0xd05bc9][_0x5029('0x2c')])&&_0x3463cc['joins'][_0xd05bc9][_0x5029('0x76')]&&_0x3463cc[_0x5029('0x74')][_0xd05bc9][_0x5029('0x77')]&&_0x3463cc['joins'][_0xd05bc9][_0x5029('0x78')]){_0x1d38e0[_0x3463cc['joins'][_0xd05bc9][_0x5029('0x2c')]](_0x3463cc[_0x5029('0x74')][_0xd05bc9][_0x5029('0x77')],null,util[_0x5029('0x6f')](_0x5029('0x79'),_0x3463cc[_0x5029('0x6b')],_0x3463cc[_0x5029('0x74')][_0xd05bc9][_0x5029('0x76')],_0x3463cc['joins'][_0xd05bc9]['foreignTable'],_0x3463cc['joins'][_0xd05bc9][_0x5029('0x78')]));}}}if(_0x3463cc[_0x5029('0x7a')]){_0x3463cc[_0x5029('0x7a')]=JSON[_0x5029('0x75')](_0x3463cc[_0x5029('0x7a')]);_0x1d38e0['where'](_0x120acc(_0x3463cc[_0x5029('0x7a')][_0x5029('0x7b')]));}_0x62e4af=_0x1d38e0[_0x5029('0x7c')]();_0x1d38e0[_0x5029('0x1b')](_0x55ee4f);_0x1d38e0[_0x5029('0x19')](0x0);logger['debug'](_0x5029('0x7e'),_0x1d38e0[_0x5029('0x80')]());return dbH[_0x5029('0x7f')][_0x5029('0x2e')](_0x1d38e0[_0x5029('0x80')](),{'type':dbH[_0x5029('0x7f')][_0x5029('0x81')][_0x5029('0x9c')]});}})[_0x5029('0x21')](function(){return{'sql':_0x62e4af[_0x5029('0x80')]()};})[_0x5029('0x21')](respondWithResult(_0x2ac88e,null))[_0x5029('0x41')](handleError(_0x2ac88e,null));};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
index 90cd398..4f4a8cc 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.model.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4e39=['request-promise','path','rimraf','../../config/environment','define','AnalyticDefaultReport','analytics_default_reports','util','api','moment','bluebird'];(function(_0x236d24,_0x29e80a){var _0x1574cf=function(_0x5d1dad){while(--_0x5d1dad){_0x236d24['push'](_0x236d24['shift']());}};_0x1574cf(++_0x29e80a);}(_0x4e39,0xf9));var _0x94e3=function(_0x5b3b9b,_0x1c71b0){_0x5b3b9b=_0x5b3b9b-0x0;var _0x47c1d7=_0x4e39[_0x5b3b9b];return _0x47c1d7;};'use strict';var _=require('lodash');var util=require(_0x94e3('0x0'));var logger=require('../../config/logger')(_0x94e3('0x1'));var moment=require(_0x94e3('0x2'));var BPromise=require(_0x94e3('0x3'));var rp=require(_0x94e3('0x4'));var fs=require('fs');var path=require(_0x94e3('0x5'));var rimraf=require(_0x94e3('0x6'));var config=require(_0x94e3('0x7'));var attributes=require('./analyticDefaultReport.attributes');module['exports']=function(_0x5e7da8,_0x2a7bf1){return _0x5e7da8[_0x94e3('0x8')](_0x94e3('0x9'),attributes,{'tableName':_0x94e3('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x006d=['rimraf','../../config/environment','./analyticDefaultReport.attributes','define','AnalyticDefaultReport','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x839ba5,_0x1c4d54){var _0x5babda=function(_0x271a69){while(--_0x271a69){_0x839ba5['push'](_0x839ba5['shift']());}};_0x5babda(++_0x1c4d54);}(_0x006d,0xf5));var _0xd006=function(_0x3388ca,_0x1393a7){_0x3388ca=_0x3388ca-0x0;var _0x55d665=_0x006d[_0x3388ca];return _0x55d665;};'use strict';var _=require('lodash');var util=require(_0xd006('0x0'));var logger=require(_0xd006('0x1'))(_0xd006('0x2'));var moment=require(_0xd006('0x3'));var BPromise=require(_0xd006('0x4'));var rp=require(_0xd006('0x5'));var fs=require('fs');var path=require(_0xd006('0x6'));var rimraf=require(_0xd006('0x7'));var config=require(_0xd006('0x8'));var attributes=require(_0xd006('0x9'));module['exports']=function(_0x129d74,_0x2bc59e){return _0x129d74[_0xd006('0xa')](_0xd006('0xb'),attributes,{'tableName':'analytics_default_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
index f311d52..d3ba53a 100644
--- a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
+++ b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1733=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','lodash','util','moment'];(function(_0x256c8c,_0xe780c7){var _0x5f3bb=function(_0x170d04){while(--_0x170d04){_0x256c8c['push'](_0x256c8c['shift']());}};_0x5f3bb(++_0xe780c7);}(_0x1733,0x110));var _0x3173=function(_0x3b2534,_0x4d55a5){_0x3b2534=_0x3b2534-0x0;var _0x3cbe9a=_0x1733[_0x3b2534];return _0x3cbe9a;};'use strict';var _=require(_0x3173('0x0'));var util=require(_0x3173('0x1'));var moment=require(_0x3173('0x2'));var BPromise=require(_0x3173('0x3'));var rs=require(_0x3173('0x4'));var fs=require('fs');var Redis=require(_0x3173('0x5'));var db=require(_0x3173('0x6'))['db'];var utils=require(_0x3173('0x7'));var logger=require(_0x3173('0x8'))(_0x3173('0x9'));var config=require(_0x3173('0xa'));var jayson=require(_0x3173('0xb'));var client=jayson[_0x3173('0xc')][_0x3173('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x542be6,_0x2c6aa1,_0x4b6033){return new BPromise(function(_0x5e2bba,_0x16465e){return client[_0x3173('0xe')](_0x542be6,_0x4b6033)[_0x3173('0xf')](function(_0x36b279){logger['info'](_0x3173('0x10'),_0x2c6aa1,_0x3173('0x11'));logger[_0x3173('0x12')](_0x3173('0x13'),_0x2c6aa1,_0x3173('0x11'),JSON[_0x3173('0x14')](_0x36b279));if(_0x36b279[_0x3173('0x15')]){if(_0x36b279['error'][_0x3173('0x16')]===0x1f4){logger['error']('AnalyticDefaultReport,\x20%s,\x20%s',_0x2c6aa1,_0x36b279[_0x3173('0x15')][_0x3173('0x17')]);return _0x16465e(_0x36b279[_0x3173('0x15')][_0x3173('0x17')]);}logger[_0x3173('0x15')](_0x3173('0x10'),_0x2c6aa1,_0x36b279['error'][_0x3173('0x17')]);return _0x5e2bba(_0x36b279[_0x3173('0x15')][_0x3173('0x17')]);}else{logger[_0x3173('0x18')](_0x3173('0x10'),_0x2c6aa1,'request\x20sent');_0x5e2bba(_0x36b279['result'][_0x3173('0x17')]);}})['catch'](function(_0x2e5920){logger[_0x3173('0x15')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x2c6aa1,_0x2e5920);_0x16465e(_0x2e5920);});});}
\ No newline at end of file
+var _0x6691=['debug','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info','AnalyticDefaultReport,\x20%s,\x20%s'];(function(_0x53ad58,_0x3fb489){var _0x554b03=function(_0x5769ba){while(--_0x5769ba){_0x53ad58['push'](_0x53ad58['shift']());}};_0x554b03(++_0x3fb489);}(_0x6691,0x1ea));var _0x1669=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x6691[_0x2d7f0e];return _0x110b07;};'use strict';var _=require(_0x1669('0x0'));var util=require(_0x1669('0x1'));var moment=require(_0x1669('0x2'));var BPromise=require(_0x1669('0x3'));var rs=require(_0x1669('0x4'));var fs=require('fs');var Redis=require(_0x1669('0x5'));var db=require(_0x1669('0x6'))['db'];var utils=require(_0x1669('0x7'));var logger=require(_0x1669('0x8'))(_0x1669('0x9'));var config=require(_0x1669('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x1669('0xb')][_0x1669('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1bebef,_0x74e734,_0x3e58ff){return new BPromise(function(_0x130fe7,_0x4a80b4){return client['request'](_0x1bebef,_0x3e58ff)[_0x1669('0xd')](function(_0x188a4a){logger[_0x1669('0xe')](_0x1669('0xf'),_0x74e734,'request\x20sent');logger[_0x1669('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x74e734,_0x1669('0x11'),JSON[_0x1669('0x12')](_0x188a4a));if(_0x188a4a[_0x1669('0x13')]){if(_0x188a4a['error']['code']===0x1f4){logger[_0x1669('0x13')](_0x1669('0xf'),_0x74e734,_0x188a4a[_0x1669('0x13')][_0x1669('0x14')]);return _0x4a80b4(_0x188a4a['error']['message']);}logger['error']('AnalyticDefaultReport,\x20%s,\x20%s',_0x74e734,_0x188a4a[_0x1669('0x13')]['message']);return _0x130fe7(_0x188a4a[_0x1669('0x13')][_0x1669('0x14')]);}else{logger[_0x1669('0xe')](_0x1669('0xf'),_0x74e734,'request\x20sent');_0x130fe7(_0x188a4a[_0x1669('0x15')][_0x1669('0x14')]);}})[_0x1669('0x16')](function(_0x534c0a){logger['error'](_0x1669('0xf'),_0x74e734,_0x534c0a);_0x4a80b4(_0x534c0a);});});}
\ No newline at end of file
diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js
index e11a02b..80100e5 100644
--- a/server/api/analyticDefaultReport/index.js
+++ b/server/api/analyticDefaultReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf59d=['preview','/:id/run','isAuthenticated','/:id/query','query','post','create','put','update','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','/:id','/:id/preview'];(function(_0x212bf5,_0x165cbd){var _0xfcad21=function(_0x4a4e6e){while(--_0x4a4e6e){_0x212bf5['push'](_0x212bf5['shift']());}};_0xfcad21(++_0x165cbd);}(_0xf59d,0x13f));var _0xdf59=function(_0x5a69ab,_0x610049){_0x5a69ab=_0x5a69ab-0x0;var _0x27f2f7=_0xf59d[_0x5a69ab];return _0x27f2f7;};'use strict';var multer=require(_0xdf59('0x0'));var util=require('util');var path=require(_0xdf59('0x1'));var timeout=require(_0xdf59('0x2'));var express=require(_0xdf59('0x3'));var router=express[_0xdf59('0x4')]();var fs_extra=require(_0xdf59('0x5'));var auth=require(_0xdf59('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xdf59('0x7'));var controller=require('./analyticDefaultReport.controller');router[_0xdf59('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xdf59('0x8')](_0xdf59('0x9'),auth['isAuthenticated'](),controller['show']);router[_0xdf59('0x8')](_0xdf59('0xa'),auth['isAuthenticated'](),controller[_0xdf59('0xb')]);router[_0xdf59('0x8')](_0xdf59('0xc'),auth[_0xdf59('0xd')](),controller['run']);router['get'](_0xdf59('0xe'),auth['isAuthenticated'](),controller[_0xdf59('0xf')]);router[_0xdf59('0x10')]('/',auth[_0xdf59('0xd')](),controller[_0xdf59('0x11')]);router[_0xdf59('0x12')](_0xdf59('0x9'),auth['isAuthenticated'](),controller[_0xdf59('0x13')]);router[_0xdf59('0x14')](_0xdf59('0x9'),auth[_0xdf59('0xd')](),controller['destroy']);module[_0xdf59('0x15')]=router;
\ No newline at end of file
+var _0x50c1=['delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','get','isAuthenticated','index','/:id','show','/:id/preview','preview','/:id/run','run','/:id/query','query','post','put','update'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x50c1,0x162));var _0x150c=function(_0x5b3866,_0x2db455){_0x5b3866=_0x5b3866-0x0;var _0x149d79=_0x50c1[_0x5b3866];return _0x149d79;};'use strict';var multer=require('multer');var util=require(_0x150c('0x0'));var path=require(_0x150c('0x1'));var timeout=require(_0x150c('0x2'));var express=require(_0x150c('0x3'));var router=express[_0x150c('0x4')]();var fs_extra=require(_0x150c('0x5'));var auth=require(_0x150c('0x6'));var interaction=require(_0x150c('0x7'));var config=require(_0x150c('0x8'));var controller=require(_0x150c('0x9'));router[_0x150c('0xa')]('/',auth[_0x150c('0xb')](),controller[_0x150c('0xc')]);router[_0x150c('0xa')](_0x150c('0xd'),auth[_0x150c('0xb')](),controller[_0x150c('0xe')]);router[_0x150c('0xa')](_0x150c('0xf'),auth['isAuthenticated'](),controller[_0x150c('0x10')]);router[_0x150c('0xa')](_0x150c('0x11'),auth[_0x150c('0xb')](),controller[_0x150c('0x12')]);router['get'](_0x150c('0x13'),auth['isAuthenticated'](),controller[_0x150c('0x14')]);router[_0x150c('0x15')]('/',auth[_0x150c('0xb')](),controller['create']);router[_0x150c('0x16')](_0x150c('0xd'),auth[_0x150c('0xb')](),controller[_0x150c('0x17')]);router[_0x150c('0x18')]('/:id',auth[_0x150c('0xb')](),controller[_0x150c('0x19')]);module[_0x150c('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
index 65f7e48..74aa9d3 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb4b9=['manual','scheduled','INTEGER','exports','ENUM','csv','xlsx','STRING'];(function(_0x5a6881,_0x2ee48b){var _0x530c8c=function(_0x102b10){while(--_0x102b10){_0x5a6881['push'](_0x5a6881['shift']());}};_0x530c8c(++_0x2ee48b);}(_0xb4b9,0xe3));var _0x9b4b=function(_0x2f0444,_0x591d1c){_0x2f0444=_0x2f0444-0x0;var _0x2f2bc5=_0xb4b9[_0x2f0444];return _0x2f2bc5;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module[_0x9b4b('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize['STRING'],'allowNull':![]},'output':{'type':Sequelize[_0x9b4b('0x1')](_0x9b4b('0x2'),'pdf',_0x9b4b('0x3')),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0x9b4b('0x4')],'allowNull':![]},'startDate':{'type':Sequelize['DATE']},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize[_0x9b4b('0x4')],'defaultValue':'Loading'},'type':{'type':Sequelize[_0x9b4b('0x1')](_0x9b4b('0x5'),_0x9b4b('0x6')),'allowNull':![],'defaultValue':_0x9b4b('0x5')},'reportId':{'type':Sequelize[_0x9b4b('0x7')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0x9b4b('0x4')]}};
\ No newline at end of file
+var _0x34f4=['UNSIGNED','sequelize','STRING','csv','pdf','DATE','Loading','ENUM','manual','INTEGER'];(function(_0x5976f8,_0x1265b7){var _0x179715=function(_0x2b2c4b){while(--_0x2b2c4b){_0x5976f8['push'](_0x5976f8['shift']());}};_0x179715(++_0x1265b7);}(_0x34f4,0x105));var _0x434f=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x34f4[_0xb0f7c3];return _0x28ea68;};'use strict';var Sequelize=require(_0x434f('0x0'));var moment=require('moment');module['exports']={'name':{'type':Sequelize[_0x434f('0x1')],'allowNull':![]},'basename':{'type':Sequelize[_0x434f('0x1')],'allowNull':![]},'output':{'type':Sequelize['ENUM'](_0x434f('0x2'),_0x434f('0x3'),'xlsx'),'allowNull':![],'defaultValue':_0x434f('0x2')},'savename':{'type':Sequelize[_0x434f('0x1')],'allowNull':![]},'startDate':{'type':Sequelize[_0x434f('0x4')]},'endDate':{'type':Sequelize[_0x434f('0x4')]},'status':{'type':Sequelize[_0x434f('0x1')],'defaultValue':_0x434f('0x5')},'type':{'type':Sequelize[_0x434f('0x6')](_0x434f('0x7'),'scheduled'),'allowNull':![],'defaultValue':_0x434f('0x7')},'reportId':{'type':Sequelize[_0x434f('0x8')](0xb)[_0x434f('0x9')]},'reportType':{'type':Sequelize['STRING']}};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
index 8fc7ddf..250f360 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbb24=['to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','get','ExtractedReports','UserProfileResource','end','sendStatus','error','stack','name','send','index','map','AnalyticExtractedReport','rawAttributes','fieldName','type','key','model','keys','filters','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','download','output','existsSync','join','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','savename','format','%s.%s','toLowerCase','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox'];(function(_0x5c84a5,_0x50392b){var _0xf8b167=function(_0x4328b6){while(--_0x4328b6){_0x5c84a5['push'](_0x5c84a5['shift']());}};_0xf8b167(++_0x50392b);}(_0xbb24,0xc3));var _0x4bb2=function(_0x33318f,_0xbead0){_0x33318f=_0x33318f-0x0;var _0x4348d0=_0xbb24[_0x33318f];return _0x4348d0;};'use strict';var emlformat=require(_0x4bb2('0x0'));var rimraf=require(_0x4bb2('0x1'));var zipdir=require(_0x4bb2('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4bb2('0x3'));var moment=require(_0x4bb2('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x4bb2('0x5'));var util=require(_0x4bb2('0x6'));var path=require(_0x4bb2('0x7'));var sox=require(_0x4bb2('0x8'));var csv=require(_0x4bb2('0x9'));var ejs=require(_0x4bb2('0xa'));var fs=require('fs');var fs_extra=require(_0x4bb2('0xb'));var _=require(_0x4bb2('0xc'));var squel=require(_0x4bb2('0xd'));var crypto=require(_0x4bb2('0xe'));var jsforce=require(_0x4bb2('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x4bb2('0x10'));var Papa=require(_0x4bb2('0x11'));var Redis=require(_0x4bb2('0x12'));var authService=require(_0x4bb2('0x13'));var qs=require(_0x4bb2('0x14'));var as=require(_0x4bb2('0x15'));var hardwareService=require(_0x4bb2('0x16'));var logger=require('../../config/logger')(_0x4bb2('0x17'));var utils=require(_0x4bb2('0x18'));var config=require(_0x4bb2('0x19'));var licenseUtil=require(_0x4bb2('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x514d89,_0x19ca0a){_0x19ca0a=_0x19ca0a||0xcc;return function(_0x879038){if(_0x879038){return _0x514d89['sendStatus'](_0x19ca0a);}return _0x514d89[_0x4bb2('0x1b')](_0x19ca0a)['end']();};}function respondWithResult(_0x467a97,_0x54f67b){_0x54f67b=_0x54f67b||0xc8;return function(_0x4e3ac4){if(_0x4e3ac4){return _0x467a97[_0x4bb2('0x1b')](_0x54f67b)[_0x4bb2('0x1c')](_0x4e3ac4);}};}function respondWithFilteredResult(_0x371f5e,_0xee36a5){return function(_0x2d472e){if(_0x2d472e){var _0x1d825e=typeof _0xee36a5[_0x4bb2('0x1d')]===_0x4bb2('0x1e')&&typeof _0xee36a5[_0x4bb2('0x1f')]==='undefined';var _0x154ed3=_0x2d472e[_0x4bb2('0x20')];var _0x5b6f3b=_0x1d825e?0x0:_0xee36a5['offset'];var _0x1153f0=_0x1d825e?_0x2d472e[_0x4bb2('0x20')]:_0xee36a5[_0x4bb2('0x1d')]+_0xee36a5[_0x4bb2('0x1f')];var _0xf96f13;if(_0x1153f0>=_0x154ed3){_0x1153f0=_0x154ed3;_0xf96f13=0xc8;}else{_0xf96f13=0xce;}_0x371f5e['status'](_0xf96f13);return _0x371f5e[_0x4bb2('0x21')](_0x4bb2('0x22'),_0x5b6f3b+'-'+_0x1153f0+'/'+_0x154ed3)[_0x4bb2('0x1c')](_0x2d472e);}return null;};}function patchUpdates(_0x44e173){return function(_0x5b8548){try{jsonpatch[_0x4bb2('0x23')](_0x5b8548,_0x44e173,!![]);}catch(_0x45c918){return BPromise[_0x4bb2('0x24')](_0x45c918);}return _0x5b8548[_0x4bb2('0x25')]();};}function saveUpdates(_0x1c440f,_0x1cd421){return function(_0x5ce308){if(_0x5ce308){return _0x5ce308[_0x4bb2('0x26')](_0x1c440f)[_0x4bb2('0x27')](function(_0x1fe082){return _0x1fe082;});}return null;};}function removeEntity(_0x54697e,_0x2a5150){return function(_0x3b0a2d){if(_0x3b0a2d){return _0x3b0a2d[_0x4bb2('0x28')]()['then'](function(){var _0x13cff9=_0x3b0a2d[_0x4bb2('0x29')]({'plain':!![]});var _0x4225fc=_0x4bb2('0x2a');return db[_0x4bb2('0x2b')][_0x4bb2('0x28')]({'where':{'type':_0x4225fc,'resourceId':_0x13cff9['id']}})[_0x4bb2('0x27')](function(){return _0x3b0a2d;});})[_0x4bb2('0x27')](function(){_0x54697e[_0x4bb2('0x1b')](0xcc)[_0x4bb2('0x2c')]();});}};}function handleEntityNotFound(_0x1c5133,_0x36bc6e){return function(_0xad2ea7){if(!_0xad2ea7){_0x1c5133[_0x4bb2('0x2d')](0x194);}return _0xad2ea7;};}function handleError(_0x3aceca,_0x5cb612){_0x5cb612=_0x5cb612||0x1f4;return function(_0x3cb75b){logger[_0x4bb2('0x2e')](_0x3cb75b[_0x4bb2('0x2f')]);if(_0x3cb75b[_0x4bb2('0x30')]){delete _0x3cb75b['name'];}_0x3aceca[_0x4bb2('0x1b')](_0x5cb612)[_0x4bb2('0x31')](_0x3cb75b);};}exports[_0x4bb2('0x32')]=function(_0x23bfd1,_0x2780ef){var _0x440c84={},_0x560219={},_0x4f9943={'count':0x0,'rows':[]};var _0x4c1f9a=_[_0x4bb2('0x33')](db[_0x4bb2('0x34')][_0x4bb2('0x35')],function(_0x377d2c){return{'name':_0x377d2c[_0x4bb2('0x36')],'type':_0x377d2c[_0x4bb2('0x37')][_0x4bb2('0x38')]};});_0x560219[_0x4bb2('0x39')]=_[_0x4bb2('0x33')](_0x4c1f9a,'name');_0x560219['query']=_[_0x4bb2('0x3a')](_0x23bfd1['query']);_0x560219[_0x4bb2('0x3b')]=_['intersection'](_0x560219[_0x4bb2('0x39')],_0x560219[_0x4bb2('0x3c')]);_0x440c84[_0x4bb2('0x3d')]=_[_0x4bb2('0x3e')](_0x560219[_0x4bb2('0x39')],qs[_0x4bb2('0x3f')](_0x23bfd1[_0x4bb2('0x3c')][_0x4bb2('0x3f')]));_0x440c84[_0x4bb2('0x3d')]=_0x440c84[_0x4bb2('0x3d')][_0x4bb2('0x40')]?_0x440c84[_0x4bb2('0x3d')]:_0x560219['model'];if(!_0x23bfd1['query'][_0x4bb2('0x41')](_0x4bb2('0x42'))){_0x440c84[_0x4bb2('0x1f')]=qs[_0x4bb2('0x1f')](_0x23bfd1[_0x4bb2('0x3c')][_0x4bb2('0x1f')]);_0x440c84[_0x4bb2('0x1d')]=qs[_0x4bb2('0x1d')](_0x23bfd1[_0x4bb2('0x3c')][_0x4bb2('0x1d')]);}_0x440c84['order']=qs[_0x4bb2('0x43')](_0x23bfd1[_0x4bb2('0x3c')][_0x4bb2('0x43')]);_0x440c84[_0x4bb2('0x44')]=qs[_0x4bb2('0x3b')](_[_0x4bb2('0x45')](_0x23bfd1[_0x4bb2('0x3c')],_0x560219[_0x4bb2('0x3b')]),_0x4c1f9a);if(_0x23bfd1[_0x4bb2('0x3c')][_0x4bb2('0x46')]){_0x440c84[_0x4bb2('0x44')]=_[_0x4bb2('0x47')](_0x440c84[_0x4bb2('0x44')],{'$or':_[_0x4bb2('0x33')](_0x4c1f9a,function(_0x664866){if(_0x664866[_0x4bb2('0x37')]!==_0x4bb2('0x48')){var _0x12a4d1={};_0x12a4d1[_0x664866[_0x4bb2('0x30')]]={'$like':'%'+_0x23bfd1[_0x4bb2('0x3c')][_0x4bb2('0x46')]+'%'};return _0x12a4d1;}})});}_0x440c84=_['merge']({},_0x440c84,_0x23bfd1[_0x4bb2('0x49')]);var _0x494fb8={'where':_0x440c84[_0x4bb2('0x44')]};return db[_0x4bb2('0x34')]['count'](_0x494fb8)['then'](function(_0x594d01){_0x4f9943[_0x4bb2('0x20')]=_0x594d01;if(_0x23bfd1['query']['includeAll']){_0x440c84[_0x4bb2('0x4a')]=[{'all':!![]}];}return db[_0x4bb2('0x34')][_0x4bb2('0x4b')](_0x440c84);})[_0x4bb2('0x27')](function(_0x28cef3){_0x4f9943[_0x4bb2('0x4c')]=_0x28cef3;return _0x4f9943;})[_0x4bb2('0x27')](respondWithFilteredResult(_0x2780ef,_0x440c84))[_0x4bb2('0x4d')](handleError(_0x2780ef,null));};exports[_0x4bb2('0x4e')]=function(_0x53ad20,_0x160dc8){var _0x387e08={'raw':!![],'where':{'id':_0x53ad20[_0x4bb2('0x4f')]['id']}},_0x13baf6={};_0x13baf6[_0x4bb2('0x39')]=_[_0x4bb2('0x3a')](db[_0x4bb2('0x34')][_0x4bb2('0x35')]);_0x13baf6[_0x4bb2('0x3c')]=_[_0x4bb2('0x3a')](_0x53ad20['query']);_0x13baf6['filters']=_['intersection'](_0x13baf6[_0x4bb2('0x39')],_0x13baf6[_0x4bb2('0x3c')]);_0x387e08[_0x4bb2('0x3d')]=_['intersection'](_0x13baf6[_0x4bb2('0x39')],qs['fields'](_0x53ad20[_0x4bb2('0x3c')][_0x4bb2('0x3f')]));_0x387e08[_0x4bb2('0x3d')]=_0x387e08['attributes'][_0x4bb2('0x40')]?_0x387e08[_0x4bb2('0x3d')]:_0x13baf6[_0x4bb2('0x39')];if(_0x53ad20['query'][_0x4bb2('0x50')]){_0x387e08[_0x4bb2('0x4a')]=[{'all':!![]}];}_0x387e08=_['merge']({},_0x387e08,_0x53ad20[_0x4bb2('0x49')]);return db[_0x4bb2('0x34')][_0x4bb2('0x51')](_0x387e08)[_0x4bb2('0x27')](handleEntityNotFound(_0x160dc8,null))[_0x4bb2('0x27')](respondWithResult(_0x160dc8,null))['catch'](handleError(_0x160dc8,null));};exports[_0x4bb2('0x52')]=function(_0x1461bc,_0x2a2ba2){return db[_0x4bb2('0x34')][_0x4bb2('0x52')](_0x1461bc[_0x4bb2('0x53')],{})[_0x4bb2('0x27')](function(_0xc93ba1){var _0x447179=_0x1461bc['user'][_0x4bb2('0x29')]({'plain':!![]});if(!_0x447179)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x447179[_0x4bb2('0x54')]===_0x4bb2('0x55')){var _0x597511=_0xc93ba1[_0x4bb2('0x29')]({'plain':!![]});var _0xf55cc9=_0x4bb2('0x2a');return db[_0x4bb2('0x56')]['find']({'where':{'name':_0xf55cc9,'userProfileId':_0x447179['userProfileId']},'raw':!![]})[_0x4bb2('0x27')](function(_0x2bd24b){if(_0x2bd24b&&_0x2bd24b[_0x4bb2('0x57')]===0x0){return db[_0x4bb2('0x2b')]['create']({'name':_0x597511['name'],'resourceId':_0x597511['id'],'type':_0x2bd24b[_0x4bb2('0x30')],'sectionId':_0x2bd24b['id']},{})[_0x4bb2('0x27')](function(){return _0xc93ba1;});}else{return _0xc93ba1;}})[_0x4bb2('0x4d')](function(_0x5577c4){logger[_0x4bb2('0x2e')](_0x4bb2('0x58'),_0x5577c4);throw _0x5577c4;});}return _0xc93ba1;})[_0x4bb2('0x27')](respondWithResult(_0x2a2ba2,0xc9))[_0x4bb2('0x4d')](handleError(_0x2a2ba2,null));};exports[_0x4bb2('0x26')]=function(_0x37b7d9,_0x4adc1c){if(_0x37b7d9[_0x4bb2('0x53')]['id']){delete _0x37b7d9[_0x4bb2('0x53')]['id'];}return db[_0x4bb2('0x34')][_0x4bb2('0x51')]({'where':{'id':_0x37b7d9[_0x4bb2('0x4f')]['id']}})[_0x4bb2('0x27')](handleEntityNotFound(_0x4adc1c,null))[_0x4bb2('0x27')](saveUpdates(_0x37b7d9[_0x4bb2('0x53')],null))['then'](respondWithResult(_0x4adc1c,null))[_0x4bb2('0x4d')](handleError(_0x4adc1c,null));};exports[_0x4bb2('0x28')]=function(_0x535f8d,_0x5475cd){return db[_0x4bb2('0x34')]['find']({'where':{'id':_0x535f8d[_0x4bb2('0x4f')]['id']}})[_0x4bb2('0x27')](handleEntityNotFound(_0x5475cd,null))[_0x4bb2('0x27')](removeEntity(_0x5475cd,null))['catch'](handleError(_0x5475cd,null));};exports[_0x4bb2('0x59')]=function(_0x2155eb,_0x4d94fe,_0x157433){return db[_0x4bb2('0x34')]['find']({'where':{'id':_0x2155eb[_0x4bb2('0x4f')]['id']},'attributes':['name','basename','savename',_0x4bb2('0x5a')],'raw':!![]})[_0x4bb2('0x27')](handleEntityNotFound(_0x4d94fe,null))['then'](function(_0x390ddf){if(_0x390ddf){if(!fs[_0x4bb2('0x5b')](path[_0x4bb2('0x5c')](config['root'],_0x4bb2('0x5d'),_0x390ddf['savename']))){throw new db[(_0x4bb2('0x5e'))][(_0x4bb2('0x5f'))](_0x4bb2('0x60'));}if(_0x2155eb[_0x4bb2('0x3c')][_0x4bb2('0x61')]){return _0x4d94fe['sendStatus'](0xc8);}return _0x4d94fe[_0x4bb2('0x59')](path[_0x4bb2('0x5c')](config['root'],_0x4bb2('0x5d'),_0x390ddf[_0x4bb2('0x62')]),util[_0x4bb2('0x63')](_0x4bb2('0x64'),_0x390ddf['basename']||_0x390ddf[_0x4bb2('0x30')],_0x390ddf['output'][_0x4bb2('0x65')]()));}})[_0x4bb2('0x4d')](handleError(_0x4d94fe,null));};
\ No newline at end of file
+var _0x06eb=['desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','offset','undefined','count','set','Content-Range','apply','save','update','then','destroy','get','ExtractedReports','UserProfileResource','end','error','stack','name','map','AnalyticExtractedReport','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','nolimit','limit','order','sort','filters','pick','where','merge','filter','options','includeAll','include','findAll','catch','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','output','join','root','server/files/reports','savename','Sequelize','ValidationError','exists','download','format','%s.%s','basename','toLowerCase','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','lodash','jsforce'];(function(_0x34c464,_0xdda791){var _0x20dea7=function(_0x9d5f85){while(--_0x9d5f85){_0x34c464['push'](_0x34c464['shift']());}};_0x20dea7(++_0xdda791);}(_0x06eb,0x10f));var _0xb06e=function(_0x49bfd2,_0x763666){_0x49bfd2=_0x49bfd2-0x0;var _0x114e15=_0x06eb[_0x49bfd2];return _0x114e15;};'use strict';var emlformat=require(_0xb06e('0x0'));var rimraf=require(_0xb06e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb06e('0x2'));var rp=require(_0xb06e('0x3'));var moment=require(_0xb06e('0x4'));var BPromise=require(_0xb06e('0x5'));var Mustache=require('mustache');var util=require(_0xb06e('0x6'));var path=require(_0xb06e('0x7'));var sox=require('sox');var csv=require(_0xb06e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb06e('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb06e('0xa'));var deskjs=require(_0xb06e('0xb'));var toCsv=require('to-csv');var querystring=require(_0xb06e('0xc'));var Papa=require(_0xb06e('0xd'));var Redis=require(_0xb06e('0xe'));var authService=require(_0xb06e('0xf'));var qs=require(_0xb06e('0x10'));var as=require(_0xb06e('0x11'));var hardwareService=require(_0xb06e('0x12'));var logger=require(_0xb06e('0x13'))(_0xb06e('0x14'));var utils=require(_0xb06e('0x15'));var config=require(_0xb06e('0x16'));var licenseUtil=require(_0xb06e('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3aee00,_0x15cf13){_0x15cf13=_0x15cf13||0xcc;return function(_0x1b093b){if(_0x1b093b){return _0x3aee00[_0xb06e('0x18')](_0x15cf13);}return _0x3aee00[_0xb06e('0x19')](_0x15cf13)['end']();};}function respondWithResult(_0x39d2d4,_0x4b5ddd){_0x4b5ddd=_0x4b5ddd||0xc8;return function(_0x3272d1){if(_0x3272d1){return _0x39d2d4['status'](_0x4b5ddd)['json'](_0x3272d1);}};}function respondWithFilteredResult(_0xb5beb,_0x43a1e6){return function(_0x15a351){if(_0x15a351){var _0x225edb=typeof _0x43a1e6[_0xb06e('0x1a')]===_0xb06e('0x1b')&&typeof _0x43a1e6['limit']==='undefined';var _0x41109b=_0x15a351[_0xb06e('0x1c')];var _0x2f601c=_0x225edb?0x0:_0x43a1e6[_0xb06e('0x1a')];var _0x2269f8=_0x225edb?_0x15a351[_0xb06e('0x1c')]:_0x43a1e6[_0xb06e('0x1a')]+_0x43a1e6['limit'];var _0x4040fa;if(_0x2269f8>=_0x41109b){_0x2269f8=_0x41109b;_0x4040fa=0xc8;}else{_0x4040fa=0xce;}_0xb5beb[_0xb06e('0x19')](_0x4040fa);return _0xb5beb[_0xb06e('0x1d')](_0xb06e('0x1e'),_0x2f601c+'-'+_0x2269f8+'/'+_0x41109b)['json'](_0x15a351);}return null;};}function patchUpdates(_0x56b1f3){return function(_0xcb0a78){try{jsonpatch[_0xb06e('0x1f')](_0xcb0a78,_0x56b1f3,!![]);}catch(_0x52daf5){return BPromise['reject'](_0x52daf5);}return _0xcb0a78[_0xb06e('0x20')]();};}function saveUpdates(_0x5cc3a7,_0x581eb6){return function(_0x89f991){if(_0x89f991){return _0x89f991[_0xb06e('0x21')](_0x5cc3a7)[_0xb06e('0x22')](function(_0x29b9a8){return _0x29b9a8;});}return null;};}function removeEntity(_0x16aae5,_0x4812a7){return function(_0x4bd97b){if(_0x4bd97b){return _0x4bd97b[_0xb06e('0x23')]()['then'](function(){var _0x1c822d=_0x4bd97b[_0xb06e('0x24')]({'plain':!![]});var _0x5d6f2c=_0xb06e('0x25');return db[_0xb06e('0x26')]['destroy']({'where':{'type':_0x5d6f2c,'resourceId':_0x1c822d['id']}})[_0xb06e('0x22')](function(){return _0x4bd97b;});})[_0xb06e('0x22')](function(){_0x16aae5[_0xb06e('0x19')](0xcc)[_0xb06e('0x27')]();});}};}function handleEntityNotFound(_0xbdf162,_0x30dc9c){return function(_0x44f8ec){if(!_0x44f8ec){_0xbdf162[_0xb06e('0x18')](0x194);}return _0x44f8ec;};}function handleError(_0x299c8f,_0x317489){_0x317489=_0x317489||0x1f4;return function(_0xc90d4){logger[_0xb06e('0x28')](_0xc90d4[_0xb06e('0x29')]);if(_0xc90d4[_0xb06e('0x2a')]){delete _0xc90d4[_0xb06e('0x2a')];}_0x299c8f[_0xb06e('0x19')](_0x317489)['send'](_0xc90d4);};}exports['index']=function(_0x3ebc17,_0x5bd1a2){var _0x320c41={},_0x7ac400={},_0x313b2e={'count':0x0,'rows':[]};var _0x167b53=_[_0xb06e('0x2b')](db[_0xb06e('0x2c')][_0xb06e('0x2d')],function(_0x5613ff){return{'name':_0x5613ff[_0xb06e('0x2e')],'type':_0x5613ff[_0xb06e('0x2f')][_0xb06e('0x30')]};});_0x7ac400[_0xb06e('0x31')]=_[_0xb06e('0x2b')](_0x167b53,_0xb06e('0x2a'));_0x7ac400['query']=_[_0xb06e('0x32')](_0x3ebc17[_0xb06e('0x33')]);_0x7ac400['filters']=_[_0xb06e('0x34')](_0x7ac400[_0xb06e('0x31')],_0x7ac400[_0xb06e('0x33')]);_0x320c41[_0xb06e('0x35')]=_[_0xb06e('0x34')](_0x7ac400[_0xb06e('0x31')],qs[_0xb06e('0x36')](_0x3ebc17[_0xb06e('0x33')][_0xb06e('0x36')]));_0x320c41[_0xb06e('0x35')]=_0x320c41['attributes'][_0xb06e('0x37')]?_0x320c41[_0xb06e('0x35')]:_0x7ac400[_0xb06e('0x31')];if(!_0x3ebc17[_0xb06e('0x33')]['hasOwnProperty'](_0xb06e('0x38'))){_0x320c41[_0xb06e('0x39')]=qs['limit'](_0x3ebc17[_0xb06e('0x33')][_0xb06e('0x39')]);_0x320c41[_0xb06e('0x1a')]=qs['offset'](_0x3ebc17[_0xb06e('0x33')][_0xb06e('0x1a')]);}_0x320c41[_0xb06e('0x3a')]=qs[_0xb06e('0x3b')](_0x3ebc17['query'][_0xb06e('0x3b')]);_0x320c41['where']=qs[_0xb06e('0x3c')](_[_0xb06e('0x3d')](_0x3ebc17[_0xb06e('0x33')],_0x7ac400[_0xb06e('0x3c')]),_0x167b53);if(_0x3ebc17[_0xb06e('0x33')]['filter']){_0x320c41[_0xb06e('0x3e')]=_[_0xb06e('0x3f')](_0x320c41[_0xb06e('0x3e')],{'$or':_[_0xb06e('0x2b')](_0x167b53,function(_0x36c9a4){if(_0x36c9a4[_0xb06e('0x2f')]!=='VIRTUAL'){var _0xa99931={};_0xa99931[_0x36c9a4['name']]={'$like':'%'+_0x3ebc17[_0xb06e('0x33')][_0xb06e('0x40')]+'%'};return _0xa99931;}})});}_0x320c41=_[_0xb06e('0x3f')]({},_0x320c41,_0x3ebc17[_0xb06e('0x41')]);var _0x3b644a={'where':_0x320c41['where']};return db[_0xb06e('0x2c')][_0xb06e('0x1c')](_0x3b644a)[_0xb06e('0x22')](function(_0x4b181b){_0x313b2e[_0xb06e('0x1c')]=_0x4b181b;if(_0x3ebc17['query'][_0xb06e('0x42')]){_0x320c41[_0xb06e('0x43')]=[{'all':!![]}];}return db[_0xb06e('0x2c')][_0xb06e('0x44')](_0x320c41);})['then'](function(_0x3a99ad){_0x313b2e['rows']=_0x3a99ad;return _0x313b2e;})[_0xb06e('0x22')](respondWithFilteredResult(_0x5bd1a2,_0x320c41))[_0xb06e('0x45')](handleError(_0x5bd1a2,null));};exports[_0xb06e('0x46')]=function(_0x176398,_0x16c7d5){var _0x241c5c={'raw':!![],'where':{'id':_0x176398[_0xb06e('0x47')]['id']}},_0x1a57f9={};_0x1a57f9[_0xb06e('0x31')]=_[_0xb06e('0x32')](db['AnalyticExtractedReport'][_0xb06e('0x2d')]);_0x1a57f9[_0xb06e('0x33')]=_[_0xb06e('0x32')](_0x176398[_0xb06e('0x33')]);_0x1a57f9['filters']=_[_0xb06e('0x34')](_0x1a57f9[_0xb06e('0x31')],_0x1a57f9[_0xb06e('0x33')]);_0x241c5c[_0xb06e('0x35')]=_[_0xb06e('0x34')](_0x1a57f9[_0xb06e('0x31')],qs['fields'](_0x176398['query'][_0xb06e('0x36')]));_0x241c5c[_0xb06e('0x35')]=_0x241c5c[_0xb06e('0x35')][_0xb06e('0x37')]?_0x241c5c[_0xb06e('0x35')]:_0x1a57f9[_0xb06e('0x31')];if(_0x176398[_0xb06e('0x33')]['includeAll']){_0x241c5c[_0xb06e('0x43')]=[{'all':!![]}];}_0x241c5c=_[_0xb06e('0x3f')]({},_0x241c5c,_0x176398['options']);return db[_0xb06e('0x2c')][_0xb06e('0x48')](_0x241c5c)[_0xb06e('0x22')](handleEntityNotFound(_0x16c7d5,null))['then'](respondWithResult(_0x16c7d5,null))[_0xb06e('0x45')](handleError(_0x16c7d5,null));};exports['create']=function(_0x373a51,_0x49ae94){return db[_0xb06e('0x2c')][_0xb06e('0x49')](_0x373a51[_0xb06e('0x4a')],{})[_0xb06e('0x22')](function(_0x1c643c){var _0x44ee10=_0x373a51[_0xb06e('0x4b')][_0xb06e('0x24')]({'plain':!![]});if(!_0x44ee10)throw new Error(_0xb06e('0x4c'));if(_0x44ee10[_0xb06e('0x4d')]===_0xb06e('0x4b')){var _0x3107af=_0x1c643c[_0xb06e('0x24')]({'plain':!![]});var _0x3eb7ee=_0xb06e('0x25');return db[_0xb06e('0x4e')]['find']({'where':{'name':_0x3eb7ee,'userProfileId':_0x44ee10[_0xb06e('0x4f')]},'raw':!![]})['then'](function(_0x45c79f){if(_0x45c79f&&_0x45c79f['autoAssociation']===0x0){return db[_0xb06e('0x26')][_0xb06e('0x49')]({'name':_0x3107af[_0xb06e('0x2a')],'resourceId':_0x3107af['id'],'type':_0x45c79f['name'],'sectionId':_0x45c79f['id']},{})[_0xb06e('0x22')](function(){return _0x1c643c;});}else{return _0x1c643c;}})[_0xb06e('0x45')](function(_0x324adf){logger[_0xb06e('0x28')](_0xb06e('0x50'),_0x324adf);throw _0x324adf;});}return _0x1c643c;})[_0xb06e('0x22')](respondWithResult(_0x49ae94,0xc9))[_0xb06e('0x45')](handleError(_0x49ae94,null));};exports[_0xb06e('0x21')]=function(_0x842e33,_0x5a6b12){if(_0x842e33[_0xb06e('0x4a')]['id']){delete _0x842e33['body']['id'];}return db['AnalyticExtractedReport'][_0xb06e('0x48')]({'where':{'id':_0x842e33[_0xb06e('0x47')]['id']}})[_0xb06e('0x22')](handleEntityNotFound(_0x5a6b12,null))[_0xb06e('0x22')](saveUpdates(_0x842e33[_0xb06e('0x4a')],null))[_0xb06e('0x22')](respondWithResult(_0x5a6b12,null))['catch'](handleError(_0x5a6b12,null));};exports['destroy']=function(_0x5da5fc,_0x2a5c37){return db[_0xb06e('0x2c')][_0xb06e('0x48')]({'where':{'id':_0x5da5fc[_0xb06e('0x47')]['id']}})[_0xb06e('0x22')](handleEntityNotFound(_0x2a5c37,null))[_0xb06e('0x22')](removeEntity(_0x2a5c37,null))[_0xb06e('0x45')](handleError(_0x2a5c37,null));};exports['download']=function(_0x38bb87,_0x1ae821,_0x4b9b29){return db['AnalyticExtractedReport']['find']({'where':{'id':_0x38bb87['params']['id']},'attributes':[_0xb06e('0x2a'),'basename','savename',_0xb06e('0x51')],'raw':!![]})[_0xb06e('0x22')](handleEntityNotFound(_0x1ae821,null))['then'](function(_0x5475be){if(_0x5475be){if(!fs['existsSync'](path[_0xb06e('0x52')](config[_0xb06e('0x53')],_0xb06e('0x54'),_0x5475be[_0xb06e('0x55')]))){throw new db[(_0xb06e('0x56'))][(_0xb06e('0x57'))]('Report\x20not\x20found\x20or\x20empty');}if(_0x38bb87[_0xb06e('0x33')][_0xb06e('0x58')]){return _0x1ae821['sendStatus'](0xc8);}return _0x1ae821[_0xb06e('0x59')](path['join'](config[_0xb06e('0x53')],_0xb06e('0x54'),_0x5475be[_0xb06e('0x55')]),util[_0xb06e('0x5a')](_0xb06e('0x5b'),_0x5475be[_0xb06e('0x5c')]||_0x5475be[_0xb06e('0x2a')],_0x5475be[_0xb06e('0x51')][_0xb06e('0x5d')]()));}})[_0xb06e('0x45')](handleError(_0x1ae821,null));};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
index d2dfd27..a7b6c54 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.model.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xad06=['api','moment','bluebird','path','rimraf','./analyticExtractedReport.attributes','AnalyticExtractedReport','analytics_extracted_reports','../../config/logger'];(function(_0x362046,_0x5cf93f){var _0x419ffe=function(_0x18cb42){while(--_0x18cb42){_0x362046['push'](_0x362046['shift']());}};_0x419ffe(++_0x5cf93f);}(_0xad06,0x155));var _0x6ad0=function(_0x42b72f,_0x326cc9){_0x42b72f=_0x42b72f-0x0;var _0x2fd490=_0xad06[_0x42b72f];return _0x2fd490;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x6ad0('0x0'))(_0x6ad0('0x1'));var moment=require(_0x6ad0('0x2'));var BPromise=require(_0x6ad0('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6ad0('0x4'));var rimraf=require(_0x6ad0('0x5'));var config=require('../../config/environment');var attributes=require(_0x6ad0('0x6'));module['exports']=function(_0x22fb63,_0x2144b8){return _0x22fb63['define'](_0x6ad0('0x7'),attributes,{'tableName':_0x6ad0('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x540f=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./analyticExtractedReport.attributes','exports','analytics_extracted_reports','lodash'];(function(_0x363ef8,_0x4ecb1a){var _0x148822=function(_0x232634){while(--_0x232634){_0x363ef8['push'](_0x363ef8['shift']());}};_0x148822(++_0x4ecb1a);}(_0x540f,0xaf));var _0xf540=function(_0x2f32c4,_0x531dc6){_0x2f32c4=_0x2f32c4-0x0;var _0x3f3018=_0x540f[_0x2f32c4];return _0x3f3018;};'use strict';var _=require(_0xf540('0x0'));var util=require('util');var logger=require(_0xf540('0x1'))(_0xf540('0x2'));var moment=require(_0xf540('0x3'));var BPromise=require(_0xf540('0x4'));var rp=require(_0xf540('0x5'));var fs=require('fs');var path=require(_0xf540('0x6'));var rimraf=require(_0xf540('0x7'));var config=require('../../config/environment');var attributes=require(_0xf540('0x8'));module[_0xf540('0x9')]=function(_0x433422,_0x4722bc){return _0x433422['define']('AnalyticExtractedReport',attributes,{'tableName':_0xf540('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
index fffefeb..b4b29df 100644
--- a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
+++ b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0ac0=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','randomstring'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x0ac0,0x130));var _0x00ac=function(_0x650e11,_0x284f86){_0x650e11=_0x650e11-0x0;var _0x1a9b47=_0x0ac0[_0x650e11];return _0x1a9b47;};'use strict';var _=require(_0x00ac('0x0'));var util=require(_0x00ac('0x1'));var moment=require(_0x00ac('0x2'));var BPromise=require('bluebird');var rs=require(_0x00ac('0x3'));var fs=require('fs');var Redis=require(_0x00ac('0x4'));var db=require(_0x00ac('0x5'))['db'];var utils=require(_0x00ac('0x6'));var logger=require(_0x00ac('0x7'))(_0x00ac('0x8'));var config=require(_0x00ac('0x9'));var jayson=require(_0x00ac('0xa'));var client=jayson['client'][_0x00ac('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xa2a17e,_0x3546f0,_0x282faa){return new BPromise(function(_0x4427de,_0x121a9e){return client[_0x00ac('0xc')](_0xa2a17e,_0x282faa)['then'](function(_0x48c47e){logger[_0x00ac('0xd')](_0x00ac('0xe'),_0x3546f0,_0x00ac('0xf'));logger[_0x00ac('0x10')](_0x00ac('0x11'),_0x3546f0,'request\x20sent',JSON[_0x00ac('0x12')](_0x48c47e));if(_0x48c47e['error']){if(_0x48c47e[_0x00ac('0x13')]['code']===0x1f4){logger[_0x00ac('0x13')](_0x00ac('0xe'),_0x3546f0,_0x48c47e[_0x00ac('0x13')][_0x00ac('0x14')]);return _0x121a9e(_0x48c47e['error']['message']);}logger[_0x00ac('0x13')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x3546f0,_0x48c47e['error'][_0x00ac('0x14')]);return _0x4427de(_0x48c47e[_0x00ac('0x13')]['message']);}else{logger[_0x00ac('0xd')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x3546f0,'request\x20sent');_0x4427de(_0x48c47e[_0x00ac('0x15')][_0x00ac('0x14')]);}})['catch'](function(_0x66e4ba){logger[_0x00ac('0x13')](_0x00ac('0xe'),_0x3546f0,_0x66e4ba);_0x121a9e(_0x66e4ba);});});}
\ No newline at end of file
+var _0x6f70=['error','code','AnalyticExtractedReport,\x20%s,\x20%s','message','info','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s'];(function(_0x2a572d,_0x31d991){var _0x32de2d=function(_0x3eb4d0){while(--_0x3eb4d0){_0x2a572d['push'](_0x2a572d['shift']());}};_0x32de2d(++_0x31d991);}(_0x6f70,0x110));var _0x06f7=function(_0x4a771d,_0x1ff56c){_0x4a771d=_0x4a771d-0x0;var _0xc788fa=_0x6f70[_0x4a771d];return _0xc788fa;};'use strict';var _=require(_0x06f7('0x0'));var util=require(_0x06f7('0x1'));var moment=require('moment');var BPromise=require(_0x06f7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x06f7('0x3'));var db=require(_0x06f7('0x4'))['db'];var utils=require(_0x06f7('0x5'));var logger=require(_0x06f7('0x6'))('rpc');var config=require(_0x06f7('0x7'));var jayson=require(_0x06f7('0x8'));var client=jayson[_0x06f7('0x9')][_0x06f7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x277926,_0x320a7f,_0x3fa1bb){return new BPromise(function(_0x227858,_0x531077){return client['request'](_0x277926,_0x3fa1bb)['then'](function(_0x35160b){logger['info']('AnalyticExtractedReport,\x20%s,\x20%s',_0x320a7f,'request\x20sent');logger[_0x06f7('0xb')](_0x06f7('0xc'),_0x320a7f,'request\x20sent',JSON['stringify'](_0x35160b));if(_0x35160b[_0x06f7('0xd')]){if(_0x35160b['error'][_0x06f7('0xe')]===0x1f4){logger['error'](_0x06f7('0xf'),_0x320a7f,_0x35160b[_0x06f7('0xd')][_0x06f7('0x10')]);return _0x531077(_0x35160b[_0x06f7('0xd')][_0x06f7('0x10')]);}logger[_0x06f7('0xd')](_0x06f7('0xf'),_0x320a7f,_0x35160b['error'][_0x06f7('0x10')]);return _0x227858(_0x35160b[_0x06f7('0xd')][_0x06f7('0x10')]);}else{logger[_0x06f7('0x11')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x320a7f,'request\x20sent');_0x227858(_0x35160b['result'][_0x06f7('0x10')]);}})[_0x06f7('0x12')](function(_0x1a1c9d){logger[_0x06f7('0xd')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x320a7f,_0x1a1c9d);_0x531077(_0x1a1c9d);});});}
\ No newline at end of file
diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js
index 06e931e..062436e 100644
--- a/server/api/analyticExtractedReport/index.js
+++ b/server/api/analyticExtractedReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9959=['put','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./analyticExtractedReport.controller','get','isAuthenticated','index','/:id','/:id/download','download','post'];(function(_0x5a14f3,_0x303051){var _0x57de5d=function(_0xfcb8c5){while(--_0xfcb8c5){_0x5a14f3['push'](_0x5a14f3['shift']());}};_0x57de5d(++_0x303051);}(_0x9959,0x108));var _0x9995=function(_0x1a2603,_0x43182e){_0x1a2603=_0x1a2603-0x0;var _0x10f23a=_0x9959[_0x1a2603];return _0x10f23a;};'use strict';var multer=require(_0x9995('0x0'));var util=require(_0x9995('0x1'));var path=require(_0x9995('0x2'));var timeout=require(_0x9995('0x3'));var express=require(_0x9995('0x4'));var router=express[_0x9995('0x5')]();var fs_extra=require(_0x9995('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x9995('0x7'));var config=require('../../config/environment');var controller=require(_0x9995('0x8'));router[_0x9995('0x9')]('/',auth[_0x9995('0xa')](),controller[_0x9995('0xb')]);router[_0x9995('0x9')](_0x9995('0xc'),auth[_0x9995('0xa')](),controller['show']);router['get'](_0x9995('0xd'),auth[_0x9995('0xa')](),controller[_0x9995('0xe')]);router[_0x9995('0xf')]('/',auth[_0x9995('0xa')](),controller['create']);router[_0x9995('0x10')](_0x9995('0xc'),auth[_0x9995('0xa')](),controller[_0x9995('0x11')]);router[_0x9995('0x12')](_0x9995('0xc'),auth[_0x9995('0xa')](),controller['destroy']);module[_0x9995('0x13')]=router;
\ No newline at end of file
+var _0xe813=['create','put','update','delete','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','get','index','/:id','isAuthenticated','show','/:id/download','post'];(function(_0x48e71d,_0x5b108a){var _0x539223=function(_0x3acee1){while(--_0x3acee1){_0x48e71d['push'](_0x48e71d['shift']());}};_0x539223(++_0x5b108a);}(_0xe813,0x139));var _0x3e81=function(_0x45ee03,_0x2f5319){_0x45ee03=_0x45ee03-0x0;var _0x13d535=_0xe813[_0x45ee03];return _0x13d535;};'use strict';var multer=require('multer');var util=require(_0x3e81('0x0'));var path=require(_0x3e81('0x1'));var timeout=require(_0x3e81('0x2'));var express=require(_0x3e81('0x3'));var router=express[_0x3e81('0x4')]();var fs_extra=require(_0x3e81('0x5'));var auth=require(_0x3e81('0x6'));var interaction=require(_0x3e81('0x7'));var config=require(_0x3e81('0x8'));var controller=require(_0x3e81('0x9'));router[_0x3e81('0xa')]('/',auth['isAuthenticated'](),controller[_0x3e81('0xb')]);router['get'](_0x3e81('0xc'),auth[_0x3e81('0xd')](),controller[_0x3e81('0xe')]);router[_0x3e81('0xa')](_0x3e81('0xf'),auth[_0x3e81('0xd')](),controller['download']);router[_0x3e81('0x10')]('/',auth['isAuthenticated'](),controller[_0x3e81('0x11')]);router[_0x3e81('0x12')](_0x3e81('0xc'),auth[_0x3e81('0xd')](),controller[_0x3e81('0x13')]);router[_0x3e81('0x14')](_0x3e81('0xc'),auth[_0x3e81('0xd')](),controller[_0x3e81('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
index 0884119..052a948 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.attributes.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa3cf=['TEXT','STRING','BOOLEAN'];(function(_0x3978e9,_0x202fbf){var _0x4c6581=function(_0x5016d1){while(--_0x5016d1){_0x3978e9['push'](_0x3978e9['shift']());}};_0x4c6581(++_0x202fbf);}(_0xa3cf,0xab));var _0xfa3c=function(_0x412163,_0x26445b){_0x412163=_0x412163-0x0;var _0x25cee9=_0xa3cf[_0x412163];return _0x25cee9;};'use strict';var Sequelize=require('sequelize');module['exports']={'field':{'type':Sequelize[_0xfa3c('0x0')]},'alias':{'type':Sequelize[_0xfa3c('0x1')]},'function':{'type':Sequelize[_0xfa3c('0x1')]},'format':{'type':Sequelize[_0xfa3c('0x1')]},'groupBy':{'type':Sequelize[_0xfa3c('0x2')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0xfa3c('0x1')]},'custom':{'type':Sequelize[_0xfa3c('0x2')],'defaultValue':![]}};
\ No newline at end of file
+var _0x34b1=['STRING','BOOLEAN','exports','TEXT'];(function(_0x355c79,_0x338495){var _0x397660=function(_0x44cd32){while(--_0x44cd32){_0x355c79['push'](_0x355c79['shift']());}};_0x397660(++_0x338495);}(_0x34b1,0x14e));var _0x134b=function(_0x32e94b,_0x38c7a7){_0x32e94b=_0x32e94b-0x0;var _0x3b1567=_0x34b1[_0x32e94b];return _0x3b1567;};'use strict';var Sequelize=require('sequelize');module[_0x134b('0x0')]={'field':{'type':Sequelize[_0x134b('0x1')]},'alias':{'type':Sequelize[_0x134b('0x2')]},'function':{'type':Sequelize[_0x134b('0x2')]},'format':{'type':Sequelize[_0x134b('0x2')]},'groupBy':{'type':Sequelize[_0x134b('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x134b('0x2')]},'custom':{'type':Sequelize[_0x134b('0x3')],'defaultValue':![]}};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js
index 743c875..b9185f7 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.controller.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x577d=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','reject','then','error','stack','name','send','index','map','AnalyticFieldReport','rawAttributes','fieldName','type','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','bulkCreate','update','bulkDestroy','destroy','AnalyticCustomReport','findOne','sequelize','transaction','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis'];(function(_0x485201,_0x3c533a){var _0x9ca98a=function(_0x418ef0){while(--_0x418ef0){_0x485201['push'](_0x485201['shift']());}};_0x9ca98a(++_0x3c533a);}(_0x577d,0xe1));var _0xd577=function(_0x3c7f07,_0x1e7d35){_0x3c7f07=_0x3c7f07-0x0;var _0x3788dc=_0x577d[_0x3c7f07];return _0x3788dc;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd577('0x0'));var zipdir=require(_0xd577('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd577('0x2'));var moment=require(_0xd577('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xd577('0x4'));var util=require(_0xd577('0x5'));var path=require(_0xd577('0x6'));var sox=require(_0xd577('0x7'));var csv=require(_0xd577('0x8'));var ejs=require(_0xd577('0x9'));var fs=require('fs');var fs_extra=require(_0xd577('0xa'));var _=require(_0xd577('0xb'));var squel=require(_0xd577('0xc'));var crypto=require('crypto');var jsforce=require(_0xd577('0xd'));var deskjs=require(_0xd577('0xe'));var toCsv=require(_0xd577('0x8'));var querystring=require(_0xd577('0xf'));var Papa=require(_0xd577('0x10'));var Redis=require(_0xd577('0x11'));var authService=require(_0xd577('0x12'));var qs=require(_0xd577('0x13'));var as=require(_0xd577('0x14'));var hardwareService=require(_0xd577('0x15'));var logger=require('../../config/logger')(_0xd577('0x16'));var utils=require(_0xd577('0x17'));var config=require(_0xd577('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xd577('0x19'))['db'];function respondWithStatusCode(_0x5972a8,_0x5c602b){_0x5c602b=_0x5c602b||0xcc;return function(_0x46466){if(_0x46466){return _0x5972a8[_0xd577('0x1a')](_0x5c602b);}return _0x5972a8['status'](_0x5c602b)[_0xd577('0x1b')]();};}function respondWithResult(_0x4d6920,_0x16bbbe){_0x16bbbe=_0x16bbbe||0xc8;return function(_0x27812b){if(_0x27812b){return _0x4d6920[_0xd577('0x1c')](_0x16bbbe)[_0xd577('0x1d')](_0x27812b);}};}function respondWithFilteredResult(_0x117a45,_0x5c3175){return function(_0x514246){if(_0x514246){var _0x432210=typeof _0x5c3175[_0xd577('0x1e')]===_0xd577('0x1f')&&typeof _0x5c3175[_0xd577('0x20')]==='undefined';var _0x3d6b12=_0x514246['count'];var _0x3f588c=_0x432210?0x0:_0x5c3175[_0xd577('0x1e')];var _0x4ce98f=_0x432210?_0x514246[_0xd577('0x21')]:_0x5c3175['offset']+_0x5c3175[_0xd577('0x20')];var _0x43e37f;if(_0x4ce98f>=_0x3d6b12){_0x4ce98f=_0x3d6b12;_0x43e37f=0xc8;}else{_0x43e37f=0xce;}_0x117a45[_0xd577('0x1c')](_0x43e37f);return _0x117a45['set']('Content-Range',_0x3f588c+'-'+_0x4ce98f+'/'+_0x3d6b12)[_0xd577('0x1d')](_0x514246);}return null;};}function patchUpdates(_0x3b1595){return function(_0x4c329a){try{jsonpatch['apply'](_0x4c329a,_0x3b1595,!![]);}catch(_0x2a16c2){return BPromise[_0xd577('0x22')](_0x2a16c2);}return _0x4c329a['save']();};}function saveUpdates(_0x38fb31,_0x1c86b2){return function(_0x2bad8e){if(_0x2bad8e){return _0x2bad8e['update'](_0x38fb31)[_0xd577('0x23')](function(_0x309b68){return _0x309b68;});}return null;};}function removeEntity(_0x52bc84,_0x3a5a90){return function(_0x344455){if(_0x344455){return _0x344455['destroy']()[_0xd577('0x23')](function(){_0x52bc84['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3f92a2,_0xe87406){return function(_0xddbb){if(!_0xddbb){_0x3f92a2['sendStatus'](0x194);}return _0xddbb;};}function handleError(_0x2c7a75,_0x4539f1){_0x4539f1=_0x4539f1||0x1f4;return function(_0x1e2cad){logger[_0xd577('0x24')](_0x1e2cad[_0xd577('0x25')]);if(_0x1e2cad[_0xd577('0x26')]){delete _0x1e2cad[_0xd577('0x26')];}_0x2c7a75[_0xd577('0x1c')](_0x4539f1)[_0xd577('0x27')](_0x1e2cad);};}exports[_0xd577('0x28')]=function(_0x23cc73,_0x2be5c7){var _0x1f67c4={},_0x5c972c={},_0x3cd0d5={'count':0x0,'rows':[]};var _0x330d27=_[_0xd577('0x29')](db[_0xd577('0x2a')][_0xd577('0x2b')],function(_0xfe5635){return{'name':_0xfe5635[_0xd577('0x2c')],'type':_0xfe5635[_0xd577('0x2d')]['key']};});_0x5c972c['model']=_['map'](_0x330d27,_0xd577('0x26'));_0x5c972c[_0xd577('0x2e')]=_[_0xd577('0x2f')](_0x23cc73[_0xd577('0x2e')]);_0x5c972c[_0xd577('0x30')]=_[_0xd577('0x31')](_0x5c972c['model'],_0x5c972c[_0xd577('0x2e')]);_0x1f67c4[_0xd577('0x32')]=_['intersection'](_0x5c972c[_0xd577('0x33')],qs[_0xd577('0x34')](_0x23cc73['query'][_0xd577('0x34')]));_0x1f67c4[_0xd577('0x32')]=_0x1f67c4[_0xd577('0x32')][_0xd577('0x35')]?_0x1f67c4[_0xd577('0x32')]:_0x5c972c[_0xd577('0x33')];if(!_0x23cc73[_0xd577('0x2e')][_0xd577('0x36')](_0xd577('0x37'))){_0x1f67c4[_0xd577('0x20')]=qs['limit'](_0x23cc73['query']['limit']);_0x1f67c4[_0xd577('0x1e')]=qs[_0xd577('0x1e')](_0x23cc73[_0xd577('0x2e')][_0xd577('0x1e')]);}_0x1f67c4[_0xd577('0x38')]=qs['sort'](_0x23cc73[_0xd577('0x2e')][_0xd577('0x39')]);_0x1f67c4[_0xd577('0x3a')]=qs[_0xd577('0x30')](_['pick'](_0x23cc73[_0xd577('0x2e')],_0x5c972c['filters']),_0x330d27);if(_0x23cc73[_0xd577('0x2e')]['filter']){_0x1f67c4[_0xd577('0x3a')]=_[_0xd577('0x3b')](_0x1f67c4[_0xd577('0x3a')],{'$or':_[_0xd577('0x29')](_0x330d27,function(_0x20e44f){if(_0x20e44f['type']!==_0xd577('0x3c')){var _0x5a46ab={};_0x5a46ab[_0x20e44f['name']]={'$like':'%'+_0x23cc73[_0xd577('0x2e')][_0xd577('0x3d')]+'%'};return _0x5a46ab;}})});}_0x1f67c4=_['merge']({},_0x1f67c4,_0x23cc73[_0xd577('0x3e')]);var _0x75a60a={'where':_0x1f67c4[_0xd577('0x3a')]};return db[_0xd577('0x2a')]['count'](_0x75a60a)[_0xd577('0x23')](function(_0x30b979){_0x3cd0d5[_0xd577('0x21')]=_0x30b979;if(_0x23cc73[_0xd577('0x2e')][_0xd577('0x3f')]){_0x1f67c4[_0xd577('0x40')]=[{'all':!![]}];}return db[_0xd577('0x2a')][_0xd577('0x41')](_0x1f67c4);})['then'](function(_0x5f1bdc){_0x3cd0d5[_0xd577('0x42')]=_0x5f1bdc;return _0x3cd0d5;})[_0xd577('0x23')](respondWithFilteredResult(_0x2be5c7,_0x1f67c4))[_0xd577('0x43')](handleError(_0x2be5c7,null));};exports[_0xd577('0x44')]=function(_0x4e8839,_0x490ed4){var _0x3cbda2={'raw':![],'where':{'id':_0x4e8839[_0xd577('0x45')]['id']}},_0x22ea7d={};_0x22ea7d[_0xd577('0x33')]=_[_0xd577('0x2f')](db[_0xd577('0x2a')]['rawAttributes']);_0x22ea7d[_0xd577('0x2e')]=_[_0xd577('0x2f')](_0x4e8839[_0xd577('0x2e')]);_0x22ea7d[_0xd577('0x30')]=_['intersection'](_0x22ea7d[_0xd577('0x33')],_0x22ea7d[_0xd577('0x2e')]);_0x3cbda2[_0xd577('0x32')]=_['intersection'](_0x22ea7d[_0xd577('0x33')],qs[_0xd577('0x34')](_0x4e8839[_0xd577('0x2e')]['fields']));_0x3cbda2['attributes']=_0x3cbda2[_0xd577('0x32')][_0xd577('0x35')]?_0x3cbda2[_0xd577('0x32')]:_0x22ea7d[_0xd577('0x33')];if(_0x4e8839['query']['includeAll']){_0x3cbda2[_0xd577('0x40')]=[{'all':!![]}];}_0x3cbda2=_['merge']({},_0x3cbda2,_0x4e8839[_0xd577('0x3e')]);return db[_0xd577('0x2a')][_0xd577('0x46')](_0x3cbda2)[_0xd577('0x23')](handleEntityNotFound(_0x490ed4,null))['then'](respondWithResult(_0x490ed4,null))['catch'](handleError(_0x490ed4,null));};exports[_0xd577('0x47')]=function(_0x21d6ba,_0x2c17dd){return db['AnalyticFieldReport']['create'](_0x21d6ba[_0xd577('0x48')],{})['then'](respondWithResult(_0x2c17dd,0xc9))['catch'](handleError(_0x2c17dd,null));};exports[_0xd577('0x49')]=function(_0x5bf5f7,_0x467aa4){return db[_0xd577('0x2a')][_0xd577('0x49')](_0x5bf5f7[_0xd577('0x48')],{'raw':![],'individualHooks':!![]})[_0xd577('0x23')](respondWithResult(_0x467aa4,0xc9))[_0xd577('0x43')](handleError(_0x467aa4,null));};exports[_0xd577('0x4a')]=function(_0x4d0689,_0x3b4ed2){if(_0x4d0689[_0xd577('0x48')]['id']){delete _0x4d0689['body']['id'];}return db[_0xd577('0x2a')][_0xd577('0x46')]({'where':{'id':_0x4d0689[_0xd577('0x45')]['id']}})[_0xd577('0x23')](handleEntityNotFound(_0x3b4ed2,null))[_0xd577('0x23')](saveUpdates(_0x4d0689['body'],null))['then'](respondWithResult(_0x3b4ed2,null))[_0xd577('0x43')](handleError(_0x3b4ed2,null));};exports['destroy']=function(_0x2ec923,_0x12e7fd){return db['AnalyticFieldReport']['find']({'where':{'id':_0x2ec923[_0xd577('0x45')]['id']}})[_0xd577('0x23')](handleEntityNotFound(_0x12e7fd,null))[_0xd577('0x23')](removeEntity(_0x12e7fd,null))[_0xd577('0x43')](handleError(_0x12e7fd,null));};exports[_0xd577('0x4b')]=function(_0x2d8ba1,_0x577bf1){return db['AnalyticFieldReport'][_0xd577('0x4c')]({'where':{'id':_0x2d8ba1['query']['ids']||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x577bf1,0xcc))[_0xd577('0x43')](handleError(_0x577bf1,null));};exports['addFields']=function(_0x5e1475,_0x878715,_0x41dec2){return db[_0xd577('0x4d')][_0xd577('0x4e')]({'where':{'id':_0x5e1475[_0xd577('0x45')]['id']}})['then'](handleEntityNotFound(_0x878715,null))['then'](function(_0x403324){if(_0x403324){return db[_0xd577('0x4f')][_0xd577('0x50')](function(_0x42fe39){return db[_0xd577('0x2a')]['destroy']({'where':{'CustomReportId':_0x5e1475['params']['id']},'transaction':_0x42fe39})[_0xd577('0x23')](function(_0x42d3db){var _0x23baa1=_['map'](_0x5e1475[_0xd577('0x48')],function(_0x8f0d3e){delete _0x8f0d3e['id'];_0x8f0d3e['CustomReportId']=_0x5e1475[_0xd577('0x45')]['id'];return _0x8f0d3e;});return db[_0xd577('0x2a')][_0xd577('0x49')](_0x23baa1,{'transaction':_0x42fe39});});})[_0xd577('0x23')](function(){return db[_0xd577('0x2a')][_0xd577('0x41')]({'where':{'CustomReportId':_0x5e1475[_0xd577('0x45')]['id']}});});}})['then'](respondWithResult(_0x878715,null))['catch'](handleError(_0x878715,null));};
\ No newline at end of file
+var _0xcba7=['stack','send','map','rawAttributes','fieldName','type','key','model','name','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','AnalyticFieldReport','includeAll','findAll','rows','catch','params','keys','fields','find','create','body','bulkCreate','bulkDestroy','ids','addFields','AnalyticCustomReport','sequelize','transaction','CustomReportId','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy'];(function(_0x4ff443,_0x5e1148){var _0x12832a=function(_0x40f7b2){while(--_0x40f7b2){_0x4ff443['push'](_0x4ff443['shift']());}};_0x12832a(++_0x5e1148);}(_0xcba7,0xcd));var _0x7cba=function(_0x262736,_0x1c6067){_0x262736=_0x262736-0x0;var _0x5e018a=_0xcba7[_0x262736];return _0x5e018a;};'use strict';var emlformat=require(_0x7cba('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7cba('0x1'));var jsonpatch=require(_0x7cba('0x2'));var rp=require(_0x7cba('0x3'));var moment=require(_0x7cba('0x4'));var BPromise=require(_0x7cba('0x5'));var Mustache=require(_0x7cba('0x6'));var util=require(_0x7cba('0x7'));var path=require(_0x7cba('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x7cba('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7cba('0xa'));var squel=require('squel');var crypto=require(_0x7cba('0xb'));var jsforce=require(_0x7cba('0xc'));var deskjs=require(_0x7cba('0xd'));var toCsv=require(_0x7cba('0xe'));var querystring=require('querystring');var Papa=require(_0x7cba('0xf'));var Redis=require('ioredis');var authService=require(_0x7cba('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x7cba('0x11'));var hardwareService=require(_0x7cba('0x12'));var logger=require('../../config/logger')(_0x7cba('0x13'));var utils=require('../../config/utils');var config=require(_0x7cba('0x14'));var licenseUtil=require(_0x7cba('0x15'));var db=require(_0x7cba('0x16'))['db'];function respondWithStatusCode(_0x286292,_0x51c59d){_0x51c59d=_0x51c59d||0xcc;return function(_0x1b10af){if(_0x1b10af){return _0x286292[_0x7cba('0x17')](_0x51c59d);}return _0x286292[_0x7cba('0x18')](_0x51c59d)[_0x7cba('0x19')]();};}function respondWithResult(_0x17cd82,_0x177341){_0x177341=_0x177341||0xc8;return function(_0x314300){if(_0x314300){return _0x17cd82[_0x7cba('0x18')](_0x177341)[_0x7cba('0x1a')](_0x314300);}};}function respondWithFilteredResult(_0x526911,_0x1ed951){return function(_0x399ceb){if(_0x399ceb){var _0x1c89f9=typeof _0x1ed951[_0x7cba('0x1b')]===_0x7cba('0x1c')&&typeof _0x1ed951[_0x7cba('0x1d')]===_0x7cba('0x1c');var _0x2dc9f1=_0x399ceb[_0x7cba('0x1e')];var _0x4c6c7d=_0x1c89f9?0x0:_0x1ed951['offset'];var _0xf13155=_0x1c89f9?_0x399ceb['count']:_0x1ed951[_0x7cba('0x1b')]+_0x1ed951[_0x7cba('0x1d')];var _0x1bb573;if(_0xf13155>=_0x2dc9f1){_0xf13155=_0x2dc9f1;_0x1bb573=0xc8;}else{_0x1bb573=0xce;}_0x526911['status'](_0x1bb573);return _0x526911[_0x7cba('0x1f')]('Content-Range',_0x4c6c7d+'-'+_0xf13155+'/'+_0x2dc9f1)[_0x7cba('0x1a')](_0x399ceb);}return null;};}function patchUpdates(_0x578886){return function(_0x46d8e9){try{jsonpatch[_0x7cba('0x20')](_0x46d8e9,_0x578886,!![]);}catch(_0x5712ae){return BPromise[_0x7cba('0x21')](_0x5712ae);}return _0x46d8e9[_0x7cba('0x22')]();};}function saveUpdates(_0x3eb369,_0x2b6f3a){return function(_0x57db48){if(_0x57db48){return _0x57db48[_0x7cba('0x23')](_0x3eb369)[_0x7cba('0x24')](function(_0x51bf41){return _0x51bf41;});}return null;};}function removeEntity(_0x12d9f9,_0xfc6c2){return function(_0x202dcc){if(_0x202dcc){return _0x202dcc[_0x7cba('0x25')]()[_0x7cba('0x24')](function(){_0x12d9f9[_0x7cba('0x18')](0xcc)[_0x7cba('0x19')]();});}};}function handleEntityNotFound(_0x1b38a4,_0x2211cf){return function(_0x491b25){if(!_0x491b25){_0x1b38a4[_0x7cba('0x17')](0x194);}return _0x491b25;};}function handleError(_0x27e625,_0x26328b){_0x26328b=_0x26328b||0x1f4;return function(_0x4ef8b5){logger['error'](_0x4ef8b5[_0x7cba('0x26')]);if(_0x4ef8b5['name']){delete _0x4ef8b5['name'];}_0x27e625['status'](_0x26328b)[_0x7cba('0x27')](_0x4ef8b5);};}exports['index']=function(_0x192cf3,_0x191b38){var _0x41155c={},_0x73a6f1={},_0x33338b={'count':0x0,'rows':[]};var _0xc9d38d=_[_0x7cba('0x28')](db['AnalyticFieldReport'][_0x7cba('0x29')],function(_0x308572){return{'name':_0x308572[_0x7cba('0x2a')],'type':_0x308572[_0x7cba('0x2b')][_0x7cba('0x2c')]};});_0x73a6f1[_0x7cba('0x2d')]=_[_0x7cba('0x28')](_0xc9d38d,_0x7cba('0x2e'));_0x73a6f1[_0x7cba('0x2f')]=_['keys'](_0x192cf3[_0x7cba('0x2f')]);_0x73a6f1[_0x7cba('0x30')]=_[_0x7cba('0x31')](_0x73a6f1['model'],_0x73a6f1[_0x7cba('0x2f')]);_0x41155c[_0x7cba('0x32')]=_[_0x7cba('0x31')](_0x73a6f1[_0x7cba('0x2d')],qs['fields'](_0x192cf3['query']['fields']));_0x41155c['attributes']=_0x41155c[_0x7cba('0x32')][_0x7cba('0x33')]?_0x41155c['attributes']:_0x73a6f1[_0x7cba('0x2d')];if(!_0x192cf3[_0x7cba('0x2f')][_0x7cba('0x34')](_0x7cba('0x35'))){_0x41155c[_0x7cba('0x1d')]=qs[_0x7cba('0x1d')](_0x192cf3[_0x7cba('0x2f')][_0x7cba('0x1d')]);_0x41155c[_0x7cba('0x1b')]=qs[_0x7cba('0x1b')](_0x192cf3[_0x7cba('0x2f')][_0x7cba('0x1b')]);}_0x41155c[_0x7cba('0x36')]=qs[_0x7cba('0x37')](_0x192cf3[_0x7cba('0x2f')][_0x7cba('0x37')]);_0x41155c[_0x7cba('0x38')]=qs['filters'](_[_0x7cba('0x39')](_0x192cf3['query'],_0x73a6f1['filters']),_0xc9d38d);if(_0x192cf3[_0x7cba('0x2f')][_0x7cba('0x3a')]){_0x41155c[_0x7cba('0x38')]=_[_0x7cba('0x3b')](_0x41155c['where'],{'$or':_[_0x7cba('0x28')](_0xc9d38d,function(_0x262e29){if(_0x262e29[_0x7cba('0x2b')]!==_0x7cba('0x3c')){var _0x303463={};_0x303463[_0x262e29['name']]={'$like':'%'+_0x192cf3[_0x7cba('0x2f')][_0x7cba('0x3a')]+'%'};return _0x303463;}})});}_0x41155c=_['merge']({},_0x41155c,_0x192cf3[_0x7cba('0x3d')]);var _0x4a5906={'where':_0x41155c[_0x7cba('0x38')]};return db[_0x7cba('0x3e')][_0x7cba('0x1e')](_0x4a5906)[_0x7cba('0x24')](function(_0x390094){_0x33338b[_0x7cba('0x1e')]=_0x390094;if(_0x192cf3['query'][_0x7cba('0x3f')]){_0x41155c['include']=[{'all':!![]}];}return db['AnalyticFieldReport'][_0x7cba('0x40')](_0x41155c);})[_0x7cba('0x24')](function(_0xb9280c){_0x33338b[_0x7cba('0x41')]=_0xb9280c;return _0x33338b;})[_0x7cba('0x24')](respondWithFilteredResult(_0x191b38,_0x41155c))[_0x7cba('0x42')](handleError(_0x191b38,null));};exports['show']=function(_0x154d53,_0x96f207){var _0x40e521={'raw':![],'where':{'id':_0x154d53[_0x7cba('0x43')]['id']}},_0x3d24a8={};_0x3d24a8[_0x7cba('0x2d')]=_[_0x7cba('0x44')](db[_0x7cba('0x3e')][_0x7cba('0x29')]);_0x3d24a8[_0x7cba('0x2f')]=_['keys'](_0x154d53['query']);_0x3d24a8['filters']=_['intersection'](_0x3d24a8[_0x7cba('0x2d')],_0x3d24a8['query']);_0x40e521[_0x7cba('0x32')]=_[_0x7cba('0x31')](_0x3d24a8[_0x7cba('0x2d')],qs[_0x7cba('0x45')](_0x154d53['query'][_0x7cba('0x45')]));_0x40e521[_0x7cba('0x32')]=_0x40e521[_0x7cba('0x32')]['length']?_0x40e521[_0x7cba('0x32')]:_0x3d24a8[_0x7cba('0x2d')];if(_0x154d53[_0x7cba('0x2f')][_0x7cba('0x3f')]){_0x40e521['include']=[{'all':!![]}];}_0x40e521=_[_0x7cba('0x3b')]({},_0x40e521,_0x154d53['options']);return db[_0x7cba('0x3e')][_0x7cba('0x46')](_0x40e521)[_0x7cba('0x24')](handleEntityNotFound(_0x96f207,null))[_0x7cba('0x24')](respondWithResult(_0x96f207,null))['catch'](handleError(_0x96f207,null));};exports[_0x7cba('0x47')]=function(_0x467381,_0x1dd519){return db[_0x7cba('0x3e')][_0x7cba('0x47')](_0x467381[_0x7cba('0x48')],{})[_0x7cba('0x24')](respondWithResult(_0x1dd519,0xc9))['catch'](handleError(_0x1dd519,null));};exports['bulkCreate']=function(_0x101d58,_0x135576){return db['AnalyticFieldReport'][_0x7cba('0x49')](_0x101d58[_0x7cba('0x48')],{'raw':![],'individualHooks':!![]})[_0x7cba('0x24')](respondWithResult(_0x135576,0xc9))[_0x7cba('0x42')](handleError(_0x135576,null));};exports['update']=function(_0x5256f4,_0x4b94f6){if(_0x5256f4['body']['id']){delete _0x5256f4[_0x7cba('0x48')]['id'];}return db[_0x7cba('0x3e')]['find']({'where':{'id':_0x5256f4[_0x7cba('0x43')]['id']}})[_0x7cba('0x24')](handleEntityNotFound(_0x4b94f6,null))[_0x7cba('0x24')](saveUpdates(_0x5256f4[_0x7cba('0x48')],null))[_0x7cba('0x24')](respondWithResult(_0x4b94f6,null))[_0x7cba('0x42')](handleError(_0x4b94f6,null));};exports[_0x7cba('0x25')]=function(_0xe610de,_0x38e212){return db['AnalyticFieldReport'][_0x7cba('0x46')]({'where':{'id':_0xe610de[_0x7cba('0x43')]['id']}})[_0x7cba('0x24')](handleEntityNotFound(_0x38e212,null))[_0x7cba('0x24')](removeEntity(_0x38e212,null))[_0x7cba('0x42')](handleError(_0x38e212,null));};exports[_0x7cba('0x4a')]=function(_0x59ea8d,_0x2cfe4f){return db[_0x7cba('0x3e')][_0x7cba('0x25')]({'where':{'id':_0x59ea8d['query'][_0x7cba('0x4b')]||[]},'raw':![],'individualHooks':!![]})[_0x7cba('0x24')](respondWithResult(_0x2cfe4f,0xcc))[_0x7cba('0x42')](handleError(_0x2cfe4f,null));};exports[_0x7cba('0x4c')]=function(_0x3d3251,_0x5cf676,_0x4d04db){return db[_0x7cba('0x4d')]['findOne']({'where':{'id':_0x3d3251[_0x7cba('0x43')]['id']}})['then'](handleEntityNotFound(_0x5cf676,null))[_0x7cba('0x24')](function(_0x560d60){if(_0x560d60){return db[_0x7cba('0x4e')][_0x7cba('0x4f')](function(_0x2bda3f){return db[_0x7cba('0x3e')][_0x7cba('0x25')]({'where':{'CustomReportId':_0x3d3251[_0x7cba('0x43')]['id']},'transaction':_0x2bda3f})[_0x7cba('0x24')](function(_0x2d2fa3){var _0x428335=_['map'](_0x3d3251[_0x7cba('0x48')],function(_0x2a1261){delete _0x2a1261['id'];_0x2a1261[_0x7cba('0x50')]=_0x3d3251[_0x7cba('0x43')]['id'];return _0x2a1261;});return db[_0x7cba('0x3e')][_0x7cba('0x49')](_0x428335,{'transaction':_0x2bda3f});});})[_0x7cba('0x24')](function(){return db[_0x7cba('0x3e')][_0x7cba('0x40')]({'where':{'CustomReportId':_0x3d3251['params']['id']}});});}})[_0x7cba('0x24')](respondWithResult(_0x5cf676,null))[_0x7cba('0x42')](handleError(_0x5cf676,null));};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js
index dbd0bab..cac76ff 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.model.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7835=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticFieldReport.attributes','define','lodash','util','../../config/logger','api'];(function(_0x3d4518,_0x34ecbc){var _0x199aaf=function(_0x7e4f73){while(--_0x7e4f73){_0x3d4518['push'](_0x3d4518['shift']());}};_0x199aaf(++_0x34ecbc);}(_0x7835,0x128));var _0x5783=function(_0x4bf140,_0x254476){_0x4bf140=_0x4bf140-0x0;var _0x3ce70c=_0x7835[_0x4bf140];return _0x3ce70c;};'use strict';var _=require(_0x5783('0x0'));var util=require(_0x5783('0x1'));var logger=require(_0x5783('0x2'))(_0x5783('0x3'));var moment=require(_0x5783('0x4'));var BPromise=require(_0x5783('0x5'));var rp=require(_0x5783('0x6'));var fs=require('fs');var path=require(_0x5783('0x7'));var rimraf=require(_0x5783('0x8'));var config=require(_0x5783('0x9'));var attributes=require(_0x5783('0xa'));module['exports']=function(_0x1685e9,_0x2cd0e3){return _0x1685e9[_0x5783('0xb')]('AnalyticFieldReport',attributes,{'tableName':'analytics_report_fields','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x15e7=['path','rimraf','../../config/environment','./analyticFieldReport.attributes','exports','AnalyticFieldReport','lodash','util','../../config/logger','api','bluebird','request-promise'];(function(_0x33eb4f,_0x4f6e7c){var _0x56899c=function(_0x29908f){while(--_0x29908f){_0x33eb4f['push'](_0x33eb4f['shift']());}};_0x56899c(++_0x4f6e7c);}(_0x15e7,0x11a));var _0x715e=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x15e7[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0x715e('0x0'));var util=require(_0x715e('0x1'));var logger=require(_0x715e('0x2'))(_0x715e('0x3'));var moment=require('moment');var BPromise=require(_0x715e('0x4'));var rp=require(_0x715e('0x5'));var fs=require('fs');var path=require(_0x715e('0x6'));var rimraf=require(_0x715e('0x7'));var config=require(_0x715e('0x8'));var attributes=require(_0x715e('0x9'));module[_0x715e('0xa')]=function(_0x5746a2,_0x3098b5){return _0x5746a2['define'](_0x715e('0xb'),attributes,{'tableName':'analytics_report_fields','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/analyticFieldReport.rpc.js b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
index 69894b8..98dbc4c 100644
--- a/server/api/analyticFieldReport/analyticFieldReport.rpc.js
+++ b/server/api/analyticFieldReport/analyticFieldReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8139=['then','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request'];(function(_0xac8470,_0x3e40e6){var _0x41696d=function(_0x435645){while(--_0x435645){_0xac8470['push'](_0xac8470['shift']());}};_0x41696d(++_0x3e40e6);}(_0x8139,0x113));var _0x9813=function(_0x12b8fc,_0x4deb28){_0x12b8fc=_0x12b8fc-0x0;var _0xa6c4c4=_0x8139[_0x12b8fc];return _0xa6c4c4;};'use strict';var _=require(_0x9813('0x0'));var util=require(_0x9813('0x1'));var moment=require(_0x9813('0x2'));var BPromise=require(_0x9813('0x3'));var rs=require(_0x9813('0x4'));var fs=require('fs');var Redis=require(_0x9813('0x5'));var db=require(_0x9813('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x9813('0x7'))(_0x9813('0x8'));var config=require(_0x9813('0x9'));var jayson=require(_0x9813('0xa'));var client=jayson['client'][_0x9813('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x122c32,_0x36bb3d,_0x57747f){return new BPromise(function(_0x37481b,_0x445bd7){return client[_0x9813('0xc')](_0x122c32,_0x57747f)[_0x9813('0xd')](function(_0x7c23e3){logger['info'](_0x9813('0xe'),_0x36bb3d,_0x9813('0xf'));logger['debug'](_0x9813('0x10'),_0x36bb3d,_0x9813('0xf'),JSON[_0x9813('0x11')](_0x7c23e3));if(_0x7c23e3[_0x9813('0x12')]){if(_0x7c23e3[_0x9813('0x12')][_0x9813('0x13')]===0x1f4){logger[_0x9813('0x12')](_0x9813('0xe'),_0x36bb3d,_0x7c23e3[_0x9813('0x12')]['message']);return _0x445bd7(_0x7c23e3[_0x9813('0x12')]['message']);}logger[_0x9813('0x12')](_0x9813('0xe'),_0x36bb3d,_0x7c23e3[_0x9813('0x12')][_0x9813('0x14')]);return _0x37481b(_0x7c23e3[_0x9813('0x12')][_0x9813('0x14')]);}else{logger[_0x9813('0x15')](_0x9813('0xe'),_0x36bb3d,_0x9813('0xf'));_0x37481b(_0x7c23e3[_0x9813('0x16')][_0x9813('0x14')]);}})[_0x9813('0x17')](function(_0x189c39){logger['error'](_0x9813('0xe'),_0x36bb3d,_0x189c39);_0x445bd7(_0x189c39);});});}
\ No newline at end of file
+var _0xb7a5=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','moment','randomstring'];(function(_0x2e964c,_0x3fea12){var _0x4063b7=function(_0x59f0c8){while(--_0x59f0c8){_0x2e964c['push'](_0x2e964c['shift']());}};_0x4063b7(++_0x3fea12);}(_0xb7a5,0x1cc));var _0x5b7a=function(_0x222e05,_0x20df79){_0x222e05=_0x222e05-0x0;var _0x52fda0=_0xb7a5[_0x222e05];return _0x52fda0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x5b7a('0x0'));var BPromise=require('bluebird');var rs=require(_0x5b7a('0x1'));var fs=require('fs');var Redis=require(_0x5b7a('0x2'));var db=require(_0x5b7a('0x3'))['db'];var utils=require(_0x5b7a('0x4'));var logger=require(_0x5b7a('0x5'))(_0x5b7a('0x6'));var config=require(_0x5b7a('0x7'));var jayson=require(_0x5b7a('0x8'));var client=jayson[_0x5b7a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2f1551,_0x1ed2e6,_0x5e18cf){return new BPromise(function(_0x55f419,_0x12c425){return client[_0x5b7a('0xa')](_0x2f1551,_0x5e18cf)[_0x5b7a('0xb')](function(_0x5cd82e){logger[_0x5b7a('0xc')](_0x5b7a('0xd'),_0x1ed2e6,_0x5b7a('0xe'));logger[_0x5b7a('0xf')](_0x5b7a('0x10'),_0x1ed2e6,_0x5b7a('0xe'),JSON[_0x5b7a('0x11')](_0x5cd82e));if(_0x5cd82e[_0x5b7a('0x12')]){if(_0x5cd82e['error']['code']===0x1f4){logger[_0x5b7a('0x12')](_0x5b7a('0xd'),_0x1ed2e6,_0x5cd82e[_0x5b7a('0x12')][_0x5b7a('0x13')]);return _0x12c425(_0x5cd82e[_0x5b7a('0x12')][_0x5b7a('0x13')]);}logger[_0x5b7a('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x1ed2e6,_0x5cd82e['error'][_0x5b7a('0x13')]);return _0x55f419(_0x5cd82e[_0x5b7a('0x12')][_0x5b7a('0x13')]);}else{logger['info']('AnalyticFieldReport,\x20%s,\x20%s',_0x1ed2e6,_0x5b7a('0xe'));_0x55f419(_0x5cd82e['result'][_0x5b7a('0x13')]);}})[_0x5b7a('0x14')](function(_0x41abe3){logger[_0x5b7a('0x12')]('AnalyticFieldReport,\x20%s,\x20%s',_0x1ed2e6,_0x41abe3);_0x12c425(_0x41abe3);});});}
\ No newline at end of file
diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js
index 9b91dcd..ea55ee2 100644
--- a/server/api/analyticFieldReport/index.js
+++ b/server/api/analyticFieldReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x2918fb,_0x1ac725){var _0xef01f8=function(_0xd97c6){while(--_0xd97c6){_0x2918fb['push'](_0x2918fb['shift']());}};_0xef01f8(++_0x1ac725);}(_0xa9e0,0x123));var _0x0a9e=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa9e0[_0x102e37];return _0x35a07c;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router;
\ No newline at end of file
+var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x2bbd26,_0x2bb677){var _0x3e6cb3=function(_0x3910bd){while(--_0x3910bd){_0x2bbd26['push'](_0x2bbd26['shift']());}};_0x3e6cb3(++_0x2bb677);}(_0xa9e0,0x123));var _0x0a9e=function(_0x25bea7,_0x49ab45){_0x25bea7=_0x25bea7-0x0;var _0x175952=_0xa9e0[_0x25bea7];return _0x175952;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.attributes.js b/server/api/analyticMetric/analyticMetric.attributes.js
index 4093ed9..aa803d9 100644
--- a/server/api/analyticMetric/analyticMetric.attributes.js
+++ b/server/api/analyticMetric/analyticMetric.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd624=['name','sequelize','exports'];(function(_0x48f79a,_0x3d329c){var _0x45bbd4=function(_0x25091e){while(--_0x25091e){_0x48f79a['push'](_0x48f79a['shift']());}};_0x45bbd4(++_0x3d329c);}(_0xd624,0x124));var _0x4d62=function(_0x127e58,_0x535a4d){_0x127e58=_0x127e58-0x0;var _0x5bd654=_0xd624[_0x127e58];return _0x5bd654;};'use strict';var Sequelize=require(_0x4d62('0x0'));module[_0x4d62('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x4d62('0x2')},'table':{'type':Sequelize['STRING']},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xd8b0=['STRING','sequelize','exports','TEXT'];(function(_0x2db12b,_0x30ab1d){var _0x20990b=function(_0x589477){while(--_0x589477){_0x2db12b['push'](_0x2db12b['shift']());}};_0x20990b(++_0x30ab1d);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'table':{'type':Sequelize['STRING']},'metric':{'type':Sequelize[_0x0d8b('0x2')]},'description':{'type':Sequelize[_0x0d8b('0x3')]}};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js
index 0dd3126..0b4773c 100644
--- a/server/api/analyticMetric/analyticMetric.controller.js
+++ b/server/api/analyticMetric/analyticMetric.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x008c=['path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','save','update','then','destroy','get','stack','name','index','map','AnalyticMetric','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','filter','where','merge','VIRTUAL','options','include','findAll','catch','show','params','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util'];(function(_0x9cda45,_0xb96ab0){var _0x45a8e5=function(_0x20e621){while(--_0x20e621){_0x9cda45['push'](_0x9cda45['shift']());}};_0x45a8e5(++_0xb96ab0);}(_0x008c,0x188));var _0xc008=function(_0x4d7f3f,_0x4d2803){_0x4d7f3f=_0x4d7f3f-0x0;var _0x5d67cc=_0x008c[_0x4d7f3f];return _0x5d67cc;};'use strict';var emlformat=require(_0xc008('0x0'));var rimraf=require(_0xc008('0x1'));var zipdir=require(_0xc008('0x2'));var jsonpatch=require(_0xc008('0x3'));var rp=require(_0xc008('0x4'));var moment=require('moment');var BPromise=require(_0xc008('0x5'));var Mustache=require(_0xc008('0x6'));var util=require(_0xc008('0x7'));var path=require(_0xc008('0x8'));var sox=require(_0xc008('0x9'));var csv=require(_0xc008('0xa'));var ejs=require(_0xc008('0xb'));var fs=require('fs');var fs_extra=require(_0xc008('0xc'));var _=require(_0xc008('0xd'));var squel=require('squel');var crypto=require(_0xc008('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xc008('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xc008('0x10'));var Redis=require(_0xc008('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc008('0x12'));var logger=require(_0xc008('0x13'))('api');var utils=require(_0xc008('0x14'));var config=require(_0xc008('0x15'));var licenseUtil=require(_0xc008('0x16'));var db=require(_0xc008('0x17'))['db'];function respondWithStatusCode(_0x9ffa93,_0x1819c6){_0x1819c6=_0x1819c6||0xcc;return function(_0x69726e){if(_0x69726e){return _0x9ffa93['sendStatus'](_0x1819c6);}return _0x9ffa93['status'](_0x1819c6)[_0xc008('0x18')]();};}function respondWithResult(_0x50c1ab,_0x25e13f){_0x25e13f=_0x25e13f||0xc8;return function(_0x4584e1){if(_0x4584e1){return _0x50c1ab[_0xc008('0x19')](_0x25e13f)[_0xc008('0x1a')](_0x4584e1);}};}function respondWithFilteredResult(_0x3f0ecf,_0x5ee00b){return function(_0x5e894e){if(_0x5e894e){var _0x4bd0f4=typeof _0x5ee00b[_0xc008('0x1b')]===_0xc008('0x1c')&&typeof _0x5ee00b[_0xc008('0x1d')]===_0xc008('0x1c');var _0x4fe771=_0x5e894e['count'];var _0x540e45=_0x4bd0f4?0x0:_0x5ee00b['offset'];var _0x46042b=_0x4bd0f4?_0x5e894e[_0xc008('0x1e')]:_0x5ee00b['offset']+_0x5ee00b[_0xc008('0x1d')];var _0x5906e6;if(_0x46042b>=_0x4fe771){_0x46042b=_0x4fe771;_0x5906e6=0xc8;}else{_0x5906e6=0xce;}_0x3f0ecf['status'](_0x5906e6);return _0x3f0ecf['set']('Content-Range',_0x540e45+'-'+_0x46042b+'/'+_0x4fe771)[_0xc008('0x1a')](_0x5e894e);}return null;};}function patchUpdates(_0x4b9726){return function(_0x5560b1){try{jsonpatch['apply'](_0x5560b1,_0x4b9726,!![]);}catch(_0x4a582d){return BPromise['reject'](_0x4a582d);}return _0x5560b1[_0xc008('0x1f')]();};}function saveUpdates(_0x4777a6,_0x251db2){return function(_0x415af3){if(_0x415af3){return _0x415af3[_0xc008('0x20')](_0x4777a6)[_0xc008('0x21')](function(_0x4f43e2){return _0x4f43e2;});}return null;};}function removeEntity(_0x459fd9,_0x5c85f2){return function(_0x58a6ea){if(_0x58a6ea){return _0x58a6ea[_0xc008('0x22')]()[_0xc008('0x21')](function(){var _0x2e3cfb=_0x58a6ea[_0xc008('0x23')]({'plain':!![]});var _0x5410f5='Metrics';return db['UserProfileResource'][_0xc008('0x22')]({'where':{'type':_0x5410f5,'resourceId':_0x2e3cfb['id']}})[_0xc008('0x21')](function(){return _0x58a6ea;});})[_0xc008('0x21')](function(){_0x459fd9[_0xc008('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5e2aca,_0x4fce9c){return function(_0x4adbab){if(!_0x4adbab){_0x5e2aca['sendStatus'](0x194);}return _0x4adbab;};}function handleError(_0x3865c0,_0x29ba43){_0x29ba43=_0x29ba43||0x1f4;return function(_0x25eae4){logger['error'](_0x25eae4[_0xc008('0x24')]);if(_0x25eae4[_0xc008('0x25')]){delete _0x25eae4[_0xc008('0x25')];}_0x3865c0[_0xc008('0x19')](_0x29ba43)['send'](_0x25eae4);};}exports[_0xc008('0x26')]=function(_0x2e0b4e,_0x53ed35){var _0x58db82={},_0x539766={},_0x1032b2={'count':0x0,'rows':[]};var _0x267abd=_[_0xc008('0x27')](db[_0xc008('0x28')][_0xc008('0x29')],function(_0xceebc3){return{'name':_0xceebc3[_0xc008('0x2a')],'type':_0xceebc3[_0xc008('0x2b')][_0xc008('0x2c')]};});_0x539766[_0xc008('0x2d')]=_[_0xc008('0x27')](_0x267abd,_0xc008('0x25'));_0x539766['query']=_[_0xc008('0x2e')](_0x2e0b4e[_0xc008('0x2f')]);_0x539766['filters']=_[_0xc008('0x30')](_0x539766[_0xc008('0x2d')],_0x539766[_0xc008('0x2f')]);_0x58db82[_0xc008('0x31')]=_[_0xc008('0x30')](_0x539766[_0xc008('0x2d')],qs[_0xc008('0x32')](_0x2e0b4e[_0xc008('0x2f')][_0xc008('0x32')]));_0x58db82['attributes']=_0x58db82[_0xc008('0x31')][_0xc008('0x33')]?_0x58db82[_0xc008('0x31')]:_0x539766[_0xc008('0x2d')];if(!_0x2e0b4e[_0xc008('0x2f')][_0xc008('0x34')](_0xc008('0x35'))){_0x58db82['limit']=qs[_0xc008('0x1d')](_0x2e0b4e[_0xc008('0x2f')]['limit']);_0x58db82[_0xc008('0x1b')]=qs[_0xc008('0x1b')](_0x2e0b4e['query'][_0xc008('0x1b')]);}_0x58db82[_0xc008('0x36')]=qs[_0xc008('0x37')](_0x2e0b4e['query']['sort']);_0x58db82['where']=qs[_0xc008('0x38')](_['pick'](_0x2e0b4e[_0xc008('0x2f')],_0x539766[_0xc008('0x38')]),_0x267abd);if(_0x2e0b4e[_0xc008('0x2f')][_0xc008('0x39')]){_0x58db82[_0xc008('0x3a')]=_[_0xc008('0x3b')](_0x58db82[_0xc008('0x3a')],{'$or':_[_0xc008('0x27')](_0x267abd,function(_0xffd2b3){if(_0xffd2b3[_0xc008('0x2b')]!==_0xc008('0x3c')){var _0xdfca2e={};_0xdfca2e[_0xffd2b3[_0xc008('0x25')]]={'$like':'%'+_0x2e0b4e[_0xc008('0x2f')]['filter']+'%'};return _0xdfca2e;}})});}_0x58db82=_[_0xc008('0x3b')]({},_0x58db82,_0x2e0b4e[_0xc008('0x3d')]);var _0x30b7df={'where':_0x58db82[_0xc008('0x3a')]};return db['AnalyticMetric'][_0xc008('0x1e')](_0x30b7df)[_0xc008('0x21')](function(_0xc8cb91){_0x1032b2[_0xc008('0x1e')]=_0xc8cb91;if(_0x2e0b4e[_0xc008('0x2f')]['includeAll']){_0x58db82[_0xc008('0x3e')]=[{'all':!![]}];}return db[_0xc008('0x28')][_0xc008('0x3f')](_0x58db82);})[_0xc008('0x21')](function(_0x7279e8){_0x1032b2['rows']=_0x7279e8;return _0x1032b2;})[_0xc008('0x21')](respondWithFilteredResult(_0x53ed35,_0x58db82))[_0xc008('0x40')](handleError(_0x53ed35,null));};exports[_0xc008('0x41')]=function(_0x408192,_0x4b80f3){var _0x26cd05={'raw':!![],'where':{'id':_0x408192[_0xc008('0x42')]['id']}},_0xe37446={};_0xe37446['model']=_[_0xc008('0x2e')](db['AnalyticMetric'][_0xc008('0x29')]);_0xe37446['query']=_[_0xc008('0x2e')](_0x408192[_0xc008('0x2f')]);_0xe37446['filters']=_[_0xc008('0x30')](_0xe37446[_0xc008('0x2d')],_0xe37446[_0xc008('0x2f')]);_0x26cd05['attributes']=_[_0xc008('0x30')](_0xe37446[_0xc008('0x2d')],qs[_0xc008('0x32')](_0x408192[_0xc008('0x2f')][_0xc008('0x32')]));_0x26cd05[_0xc008('0x31')]=_0x26cd05['attributes']['length']?_0x26cd05['attributes']:_0xe37446[_0xc008('0x2d')];if(_0x408192[_0xc008('0x2f')][_0xc008('0x43')]){_0x26cd05[_0xc008('0x3e')]=[{'all':!![]}];}_0x26cd05=_[_0xc008('0x3b')]({},_0x26cd05,_0x408192[_0xc008('0x3d')]);return db[_0xc008('0x28')][_0xc008('0x44')](_0x26cd05)['then'](handleEntityNotFound(_0x4b80f3,null))['then'](respondWithResult(_0x4b80f3,null))['catch'](handleError(_0x4b80f3,null));};exports[_0xc008('0x45')]=function(_0x2651cf,_0x158eae){return db['AnalyticMetric'][_0xc008('0x45')](_0x2651cf[_0xc008('0x46')],{})[_0xc008('0x21')](function(_0x1c2c50){var _0x4981b4=_0x2651cf[_0xc008('0x47')][_0xc008('0x23')]({'plain':!![]});if(!_0x4981b4)throw new Error(_0xc008('0x48'));if(_0x4981b4[_0xc008('0x49')]===_0xc008('0x47')){var _0x52c444=_0x1c2c50['get']({'plain':!![]});var _0x223056='Metrics';return db[_0xc008('0x4a')][_0xc008('0x44')]({'where':{'name':_0x223056,'userProfileId':_0x4981b4[_0xc008('0x4b')]},'raw':!![]})['then'](function(_0x144ab2){if(_0x144ab2&&_0x144ab2[_0xc008('0x4c')]===0x0){return db[_0xc008('0x4d')][_0xc008('0x45')]({'name':_0x52c444[_0xc008('0x25')],'resourceId':_0x52c444['id'],'type':_0x144ab2['name'],'sectionId':_0x144ab2['id']},{})[_0xc008('0x21')](function(){return _0x1c2c50;});}else{return _0x1c2c50;}})[_0xc008('0x40')](function(_0x4b4c6d){logger[_0xc008('0x4e')](_0xc008('0x4f'),_0x4b4c6d);throw _0x4b4c6d;});}return _0x1c2c50;})['then'](respondWithResult(_0x158eae,0xc9))['catch'](handleError(_0x158eae,null));};exports[_0xc008('0x20')]=function(_0xd47b74,_0x20947b){if(_0xd47b74[_0xc008('0x46')]['id']){delete _0xd47b74[_0xc008('0x46')]['id'];}return db['AnalyticMetric']['find']({'where':{'id':_0xd47b74[_0xc008('0x42')]['id']}})['then'](handleEntityNotFound(_0x20947b,null))[_0xc008('0x21')](saveUpdates(_0xd47b74[_0xc008('0x46')],null))[_0xc008('0x21')](respondWithResult(_0x20947b,null))[_0xc008('0x40')](handleError(_0x20947b,null));};exports[_0xc008('0x22')]=function(_0x27a167,_0x49d8b0){return db[_0xc008('0x28')][_0xc008('0x44')]({'where':{'id':_0x27a167[_0xc008('0x42')]['id']}})[_0xc008('0x21')](handleEntityNotFound(_0x49d8b0,null))[_0xc008('0x21')](removeEntity(_0x49d8b0,null))['catch'](handleError(_0x49d8b0,null));};
\ No newline at end of file
+var _0x5fc3=['user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','Content-Range','json','apply','reject','save','update','then','destroy','get','Metrics','error','stack','name','send','index','map','AnalyticMetric','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','sort','pick','filter','where','VIRTUAL','options','includeAll','include','findAll','catch','show','params','merge','create','body'];(function(_0x1af1c0,_0x2990d8){var _0x5daa21=function(_0x2d6995){while(--_0x2d6995){_0x1af1c0['push'](_0x1af1c0['shift']());}};_0x5daa21(++_0x2990d8);}(_0x5fc3,0xa8));var _0x35fc=function(_0x57fa7e,_0xd0b5ce){_0x57fa7e=_0x57fa7e-0x0;var _0x320671=_0x5fc3[_0x57fa7e];return _0x320671;};'use strict';var emlformat=require(_0x35fc('0x0'));var rimraf=require(_0x35fc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x35fc('0x2'));var rp=require(_0x35fc('0x3'));var moment=require(_0x35fc('0x4'));var BPromise=require(_0x35fc('0x5'));var Mustache=require(_0x35fc('0x6'));var util=require('util');var path=require(_0x35fc('0x7'));var sox=require(_0x35fc('0x8'));var csv=require(_0x35fc('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x35fc('0xa'));var squel=require('squel');var crypto=require(_0x35fc('0xb'));var jsforce=require(_0x35fc('0xc'));var deskjs=require(_0x35fc('0xd'));var toCsv=require(_0x35fc('0x9'));var querystring=require(_0x35fc('0xe'));var Papa=require(_0x35fc('0xf'));var Redis=require(_0x35fc('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x35fc('0x11'));var as=require(_0x35fc('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x35fc('0x13'))(_0x35fc('0x14'));var utils=require('../../config/utils');var config=require(_0x35fc('0x15'));var licenseUtil=require(_0x35fc('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4cbe74,_0x409357){_0x409357=_0x409357||0xcc;return function(_0x5d462a){if(_0x5d462a){return _0x4cbe74[_0x35fc('0x17')](_0x409357);}return _0x4cbe74[_0x35fc('0x18')](_0x409357)[_0x35fc('0x19')]();};}function respondWithResult(_0x29730f,_0x38d9f2){_0x38d9f2=_0x38d9f2||0xc8;return function(_0x5cfe94){if(_0x5cfe94){return _0x29730f['status'](_0x38d9f2)['json'](_0x5cfe94);}};}function respondWithFilteredResult(_0x558364,_0x398b67){return function(_0x229d56){if(_0x229d56){var _0x53b898=typeof _0x398b67[_0x35fc('0x1a')]===_0x35fc('0x1b')&&typeof _0x398b67[_0x35fc('0x1c')]==='undefined';var _0x26ba54=_0x229d56[_0x35fc('0x1d')];var _0x553677=_0x53b898?0x0:_0x398b67[_0x35fc('0x1a')];var _0x363e47=_0x53b898?_0x229d56[_0x35fc('0x1d')]:_0x398b67['offset']+_0x398b67[_0x35fc('0x1c')];var _0x3c58ea;if(_0x363e47>=_0x26ba54){_0x363e47=_0x26ba54;_0x3c58ea=0xc8;}else{_0x3c58ea=0xce;}_0x558364[_0x35fc('0x18')](_0x3c58ea);return _0x558364['set'](_0x35fc('0x1e'),_0x553677+'-'+_0x363e47+'/'+_0x26ba54)[_0x35fc('0x1f')](_0x229d56);}return null;};}function patchUpdates(_0x3229d1){return function(_0x251a1f){try{jsonpatch[_0x35fc('0x20')](_0x251a1f,_0x3229d1,!![]);}catch(_0x21f1a9){return BPromise[_0x35fc('0x21')](_0x21f1a9);}return _0x251a1f[_0x35fc('0x22')]();};}function saveUpdates(_0x2405e8,_0x427eae){return function(_0x5bd2b8){if(_0x5bd2b8){return _0x5bd2b8[_0x35fc('0x23')](_0x2405e8)[_0x35fc('0x24')](function(_0x257719){return _0x257719;});}return null;};}function removeEntity(_0x2d8183,_0x3b4743){return function(_0x55e9e7){if(_0x55e9e7){return _0x55e9e7[_0x35fc('0x25')]()[_0x35fc('0x24')](function(){var _0x561bf8=_0x55e9e7[_0x35fc('0x26')]({'plain':!![]});var _0x5a93df=_0x35fc('0x27');return db['UserProfileResource'][_0x35fc('0x25')]({'where':{'type':_0x5a93df,'resourceId':_0x561bf8['id']}})['then'](function(){return _0x55e9e7;});})[_0x35fc('0x24')](function(){_0x2d8183[_0x35fc('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x519264,_0x47774c){return function(_0x58edb6){if(!_0x58edb6){_0x519264[_0x35fc('0x17')](0x194);}return _0x58edb6;};}function handleError(_0x1a5d92,_0x57001c){_0x57001c=_0x57001c||0x1f4;return function(_0x26b7cb){logger[_0x35fc('0x28')](_0x26b7cb[_0x35fc('0x29')]);if(_0x26b7cb[_0x35fc('0x2a')]){delete _0x26b7cb[_0x35fc('0x2a')];}_0x1a5d92[_0x35fc('0x18')](_0x57001c)[_0x35fc('0x2b')](_0x26b7cb);};}exports[_0x35fc('0x2c')]=function(_0x54aedc,_0x1cd1ae){var _0x220931={},_0x22af18={},_0x52acc5={'count':0x0,'rows':[]};var _0xe79f52=_[_0x35fc('0x2d')](db[_0x35fc('0x2e')][_0x35fc('0x2f')],function(_0xd8a4ca){return{'name':_0xd8a4ca[_0x35fc('0x30')],'type':_0xd8a4ca[_0x35fc('0x31')][_0x35fc('0x32')]};});_0x22af18[_0x35fc('0x33')]=_[_0x35fc('0x2d')](_0xe79f52,'name');_0x22af18['query']=_[_0x35fc('0x34')](_0x54aedc['query']);_0x22af18[_0x35fc('0x35')]=_[_0x35fc('0x36')](_0x22af18[_0x35fc('0x33')],_0x22af18[_0x35fc('0x37')]);_0x220931[_0x35fc('0x38')]=_[_0x35fc('0x36')](_0x22af18['model'],qs[_0x35fc('0x39')](_0x54aedc[_0x35fc('0x37')][_0x35fc('0x39')]));_0x220931[_0x35fc('0x38')]=_0x220931[_0x35fc('0x38')][_0x35fc('0x3a')]?_0x220931['attributes']:_0x22af18[_0x35fc('0x33')];if(!_0x54aedc[_0x35fc('0x37')][_0x35fc('0x3b')]('nolimit')){_0x220931[_0x35fc('0x1c')]=qs['limit'](_0x54aedc[_0x35fc('0x37')][_0x35fc('0x1c')]);_0x220931[_0x35fc('0x1a')]=qs[_0x35fc('0x1a')](_0x54aedc['query']['offset']);}_0x220931['order']=qs[_0x35fc('0x3c')](_0x54aedc['query'][_0x35fc('0x3c')]);_0x220931['where']=qs[_0x35fc('0x35')](_[_0x35fc('0x3d')](_0x54aedc[_0x35fc('0x37')],_0x22af18[_0x35fc('0x35')]),_0xe79f52);if(_0x54aedc[_0x35fc('0x37')][_0x35fc('0x3e')]){_0x220931[_0x35fc('0x3f')]=_['merge'](_0x220931[_0x35fc('0x3f')],{'$or':_[_0x35fc('0x2d')](_0xe79f52,function(_0x4e0ce3){if(_0x4e0ce3[_0x35fc('0x31')]!==_0x35fc('0x40')){var _0x1aac67={};_0x1aac67[_0x4e0ce3[_0x35fc('0x2a')]]={'$like':'%'+_0x54aedc[_0x35fc('0x37')][_0x35fc('0x3e')]+'%'};return _0x1aac67;}})});}_0x220931=_['merge']({},_0x220931,_0x54aedc[_0x35fc('0x41')]);var _0x267858={'where':_0x220931[_0x35fc('0x3f')]};return db['AnalyticMetric'][_0x35fc('0x1d')](_0x267858)[_0x35fc('0x24')](function(_0x596919){_0x52acc5[_0x35fc('0x1d')]=_0x596919;if(_0x54aedc[_0x35fc('0x37')][_0x35fc('0x42')]){_0x220931[_0x35fc('0x43')]=[{'all':!![]}];}return db[_0x35fc('0x2e')][_0x35fc('0x44')](_0x220931);})[_0x35fc('0x24')](function(_0x3ec51f){_0x52acc5['rows']=_0x3ec51f;return _0x52acc5;})['then'](respondWithFilteredResult(_0x1cd1ae,_0x220931))[_0x35fc('0x45')](handleError(_0x1cd1ae,null));};exports[_0x35fc('0x46')]=function(_0x4fdc6d,_0x5c2e5c){var _0x4ff202={'raw':!![],'where':{'id':_0x4fdc6d[_0x35fc('0x47')]['id']}},_0x79677d={};_0x79677d['model']=_[_0x35fc('0x34')](db[_0x35fc('0x2e')][_0x35fc('0x2f')]);_0x79677d[_0x35fc('0x37')]=_['keys'](_0x4fdc6d['query']);_0x79677d['filters']=_['intersection'](_0x79677d['model'],_0x79677d[_0x35fc('0x37')]);_0x4ff202[_0x35fc('0x38')]=_['intersection'](_0x79677d[_0x35fc('0x33')],qs['fields'](_0x4fdc6d[_0x35fc('0x37')][_0x35fc('0x39')]));_0x4ff202[_0x35fc('0x38')]=_0x4ff202[_0x35fc('0x38')][_0x35fc('0x3a')]?_0x4ff202['attributes']:_0x79677d[_0x35fc('0x33')];if(_0x4fdc6d[_0x35fc('0x37')]['includeAll']){_0x4ff202[_0x35fc('0x43')]=[{'all':!![]}];}_0x4ff202=_[_0x35fc('0x48')]({},_0x4ff202,_0x4fdc6d[_0x35fc('0x41')]);return db[_0x35fc('0x2e')]['find'](_0x4ff202)[_0x35fc('0x24')](handleEntityNotFound(_0x5c2e5c,null))['then'](respondWithResult(_0x5c2e5c,null))['catch'](handleError(_0x5c2e5c,null));};exports[_0x35fc('0x49')]=function(_0x9db7e8,_0x18dc78){return db[_0x35fc('0x2e')][_0x35fc('0x49')](_0x9db7e8[_0x35fc('0x4a')],{})[_0x35fc('0x24')](function(_0x16afa6){var _0x4f555f=_0x9db7e8[_0x35fc('0x4b')][_0x35fc('0x26')]({'plain':!![]});if(!_0x4f555f)throw new Error(_0x35fc('0x4c'));if(_0x4f555f[_0x35fc('0x4d')]===_0x35fc('0x4b')){var _0x1e3221=_0x16afa6[_0x35fc('0x26')]({'plain':!![]});var _0x347a4a=_0x35fc('0x27');return db[_0x35fc('0x4e')][_0x35fc('0x4f')]({'where':{'name':_0x347a4a,'userProfileId':_0x4f555f[_0x35fc('0x50')]},'raw':!![]})[_0x35fc('0x24')](function(_0x3146e2){if(_0x3146e2&&_0x3146e2['autoAssociation']===0x0){return db['UserProfileResource'][_0x35fc('0x49')]({'name':_0x1e3221[_0x35fc('0x2a')],'resourceId':_0x1e3221['id'],'type':_0x3146e2[_0x35fc('0x2a')],'sectionId':_0x3146e2['id']},{})[_0x35fc('0x24')](function(){return _0x16afa6;});}else{return _0x16afa6;}})[_0x35fc('0x45')](function(_0x3e6494){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3e6494);throw _0x3e6494;});}return _0x16afa6;})[_0x35fc('0x24')](respondWithResult(_0x18dc78,0xc9))[_0x35fc('0x45')](handleError(_0x18dc78,null));};exports[_0x35fc('0x23')]=function(_0x38bc78,_0x5b2595){if(_0x38bc78[_0x35fc('0x4a')]['id']){delete _0x38bc78[_0x35fc('0x4a')]['id'];}return db['AnalyticMetric'][_0x35fc('0x4f')]({'where':{'id':_0x38bc78[_0x35fc('0x47')]['id']}})['then'](handleEntityNotFound(_0x5b2595,null))[_0x35fc('0x24')](saveUpdates(_0x38bc78[_0x35fc('0x4a')],null))[_0x35fc('0x24')](respondWithResult(_0x5b2595,null))[_0x35fc('0x45')](handleError(_0x5b2595,null));};exports['destroy']=function(_0x4de34b,_0x502a15){return db[_0x35fc('0x2e')][_0x35fc('0x4f')]({'where':{'id':_0x4de34b['params']['id']}})[_0x35fc('0x24')](handleEntityNotFound(_0x502a15,null))[_0x35fc('0x24')](removeEntity(_0x502a15,null))[_0x35fc('0x45')](handleError(_0x502a15,null));};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js
index a069d56..d486dfc 100644
--- a/server/api/analyticMetric/analyticMetric.model.js
+++ b/server/api/analyticMetric/analyticMetric.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3eea=['exports','AnalyticMetric','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticMetric.attributes'];(function(_0x3cb722,_0x186d29){var _0xd7b020=function(_0xc87738){while(--_0xc87738){_0x3cb722['push'](_0x3cb722['shift']());}};_0xd7b020(++_0x186d29);}(_0x3eea,0x1ca));var _0xa3ee=function(_0x302130,_0x16db6b){_0x302130=_0x302130-0x0;var _0x2a1bd2=_0x3eea[_0x302130];return _0x2a1bd2;};'use strict';var _=require(_0xa3ee('0x0'));var util=require('util');var logger=require(_0xa3ee('0x1'))(_0xa3ee('0x2'));var moment=require(_0xa3ee('0x3'));var BPromise=require(_0xa3ee('0x4'));var rp=require(_0xa3ee('0x5'));var fs=require('fs');var path=require(_0xa3ee('0x6'));var rimraf=require(_0xa3ee('0x7'));var config=require(_0xa3ee('0x8'));var attributes=require(_0xa3ee('0x9'));module[_0xa3ee('0xa')]=function(_0xb93cdb,_0x5776bb){return _0xb93cdb['define'](_0xa3ee('0xb'),attributes,{'tableName':'analytics_metrics','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xba18=['moment','bluebird','request-promise','path','../../config/environment','./analyticMetric.attributes','exports','define','analytics_metrics','lodash','util','../../config/logger','api'];(function(_0x39b9d7,_0x54c982){var _0x2c60d3=function(_0x2a64e0){while(--_0x2a64e0){_0x39b9d7['push'](_0x39b9d7['shift']());}};_0x2c60d3(++_0x54c982);}(_0xba18,0x1ea));var _0x8ba1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xba18[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x8ba1('0x0'));var util=require(_0x8ba1('0x1'));var logger=require(_0x8ba1('0x2'))(_0x8ba1('0x3'));var moment=require(_0x8ba1('0x4'));var BPromise=require(_0x8ba1('0x5'));var rp=require(_0x8ba1('0x6'));var fs=require('fs');var path=require(_0x8ba1('0x7'));var rimraf=require('rimraf');var config=require(_0x8ba1('0x8'));var attributes=require(_0x8ba1('0x9'));module[_0x8ba1('0xa')]=function(_0x2a9dab,_0x3b107c){return _0x2a9dab[_0x8ba1('0xb')]('AnalyticMetric',attributes,{'tableName':_0x8ba1('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticMetric/analyticMetric.rpc.js b/server/api/analyticMetric/analyticMetric.rpc.js
index c237584..0e0c56b 100644
--- a/server/api/analyticMetric/analyticMetric.rpc.js
+++ b/server/api/analyticMetric/analyticMetric.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x589e=['message','info','result','catch','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x181e4e,_0x3f7d88){var _0x1bfc24=function(_0x52e430){while(--_0x52e430){_0x181e4e['push'](_0x181e4e['shift']());}};_0x1bfc24(++_0x3f7d88);}(_0x589e,0x10c));var _0xe589=function(_0x416875,_0x1e3125){_0x416875=_0x416875-0x0;var _0x360d6b=_0x589e[_0x416875];return _0x360d6b;};'use strict';var _=require(_0xe589('0x0'));var util=require(_0xe589('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe589('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe589('0x3'))['db'];var utils=require(_0xe589('0x4'));var logger=require(_0xe589('0x5'))(_0xe589('0x6'));var config=require('../../config/environment');var jayson=require(_0xe589('0x7'));var client=jayson[_0xe589('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x230f44,_0x2d5759,_0x26e18a){return new BPromise(function(_0x42992c,_0xafbd58){return client[_0xe589('0x9')](_0x230f44,_0x26e18a)[_0xe589('0xa')](function(_0x5bb373){logger['info'](_0xe589('0xb'),_0x2d5759,_0xe589('0xc'));logger[_0xe589('0xd')](_0xe589('0xe'),_0x2d5759,_0xe589('0xc'),JSON[_0xe589('0xf')](_0x5bb373));if(_0x5bb373[_0xe589('0x10')]){if(_0x5bb373[_0xe589('0x10')][_0xe589('0x11')]===0x1f4){logger[_0xe589('0x10')](_0xe589('0xb'),_0x2d5759,_0x5bb373[_0xe589('0x10')][_0xe589('0x12')]);return _0xafbd58(_0x5bb373[_0xe589('0x10')]['message']);}logger['error'](_0xe589('0xb'),_0x2d5759,_0x5bb373['error'][_0xe589('0x12')]);return _0x42992c(_0x5bb373['error']['message']);}else{logger[_0xe589('0x13')]('AnalyticMetric,\x20%s,\x20%s',_0x2d5759,_0xe589('0xc'));_0x42992c(_0x5bb373[_0xe589('0x14')][_0xe589('0x12')]);}})[_0xe589('0x15')](function(_0x54fd5){logger[_0xe589('0x10')](_0xe589('0xb'),_0x2d5759,_0x54fd5);_0xafbd58(_0x54fd5);});});}
\ No newline at end of file
+var _0x4af7=['then','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','bluebird','../../config/utils','jayson/promise','http'];(function(_0x408460,_0x566d68){var _0x3c8865=function(_0x48a286){while(--_0x48a286){_0x408460['push'](_0x408460['shift']());}};_0x3c8865(++_0x566d68);}(_0x4af7,0x180));var _0x74af=function(_0x503950,_0x5022eb){_0x503950=_0x503950-0x0;var _0x1657a9=_0x4af7[_0x503950];return _0x1657a9;};'use strict';var _=require(_0x74af('0x0'));var util=require(_0x74af('0x1'));var moment=require(_0x74af('0x2'));var BPromise=require(_0x74af('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x74af('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x74af('0x5'));var client=jayson['client'][_0x74af('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x2af283,_0x52cfb5,_0x26df4f){return new BPromise(function(_0x5740df,_0xff389d){return client['request'](_0x2af283,_0x26df4f)[_0x74af('0x7')](function(_0x52af2b){logger[_0x74af('0x8')](_0x74af('0x9'),_0x52cfb5,_0x74af('0xa'));logger[_0x74af('0xb')](_0x74af('0xc'),_0x52cfb5,_0x74af('0xa'),JSON['stringify'](_0x52af2b));if(_0x52af2b['error']){if(_0x52af2b['error']['code']===0x1f4){logger[_0x74af('0xd')](_0x74af('0x9'),_0x52cfb5,_0x52af2b[_0x74af('0xd')][_0x74af('0xe')]);return _0xff389d(_0x52af2b[_0x74af('0xd')][_0x74af('0xe')]);}logger[_0x74af('0xd')](_0x74af('0x9'),_0x52cfb5,_0x52af2b[_0x74af('0xd')][_0x74af('0xe')]);return _0x5740df(_0x52af2b[_0x74af('0xd')]['message']);}else{logger[_0x74af('0x8')](_0x74af('0x9'),_0x52cfb5,_0x74af('0xa'));_0x5740df(_0x52af2b[_0x74af('0xf')][_0x74af('0xe')]);}})[_0x74af('0x10')](function(_0x293328){logger['error'](_0x74af('0x9'),_0x52cfb5,_0x293328);_0xff389d(_0x293328);});});}
\ No newline at end of file
diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js
index 3970d17..74e93c4 100644
--- a/server/api/analyticMetric/index.js
+++ b/server/api/analyticMetric/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x00e0=['put','update','delete','multer','util','path','express','fs-extra','get','isAuthenticated','/:id','show'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x00e0,0x1e3));var _0x000e=function(_0x4ce36d,_0x477757){_0x4ce36d=_0x4ce36d-0x0;var _0x46c13b=_0x00e0[_0x4ce36d];return _0x46c13b;};'use strict';var multer=require(_0x000e('0x0'));var util=require(_0x000e('0x1'));var path=require(_0x000e('0x2'));var timeout=require('connect-timeout');var express=require(_0x000e('0x3'));var router=express['Router']();var fs_extra=require(_0x000e('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./analyticMetric.controller');router[_0x000e('0x5')]('/',auth[_0x000e('0x6')](),controller['index']);router[_0x000e('0x5')](_0x000e('0x7'),auth[_0x000e('0x6')](),controller[_0x000e('0x8')]);router['post']('/',auth[_0x000e('0x6')](),controller['create']);router[_0x000e('0x9')](_0x000e('0x7'),auth[_0x000e('0x6')](),controller[_0x000e('0xa')]);router[_0x000e('0xb')](_0x000e('0x7'),auth[_0x000e('0x6')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x5334=['express','fs-extra','../../components/interaction/service','../../config/environment','index','show','post','isAuthenticated','create','put','/:id','delete','destroy','multer','util','path','connect-timeout'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x5334,0x84));var _0x4533=function(_0x2a5217,_0x4d2636){_0x2a5217=_0x2a5217-0x0;var _0x55c5a3=_0x5334[_0x2a5217];return _0x55c5a3;};'use strict';var multer=require(_0x4533('0x0'));var util=require(_0x4533('0x1'));var path=require(_0x4533('0x2'));var timeout=require(_0x4533('0x3'));var express=require(_0x4533('0x4'));var router=express['Router']();var fs_extra=require(_0x4533('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x4533('0x6'));var config=require(_0x4533('0x7'));var controller=require('./analyticMetric.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x4533('0x8')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x4533('0x9')]);router[_0x4533('0xa')]('/',auth[_0x4533('0xb')](),controller[_0x4533('0xc')]);router[_0x4533('0xd')](_0x4533('0xe'),auth[_0x4533('0xb')](),controller['update']);router[_0x4533('0xf')](_0x4533('0xe'),auth[_0x4533('0xb')](),controller[_0x4533('0x10')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
index fbf1569..3ff2f35 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.attributes.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf25a=['sequelize','exports','TEXT'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf25a,0x195));var _0xaf25=function(_0x15a828,_0x447b10){_0x15a828=_0x15a828-0x0;var _0x1b009b=_0xf25a[_0x15a828];return _0x1b009b;};'use strict';var Sequelize=require(_0xaf25('0x0'));module[_0xaf25('0x1')]={'tree':{'type':Sequelize[_0xaf25('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x5ad7=['exports','TEXT'];(function(_0x445738,_0x1b1bbe){var _0xcf0f95=function(_0x1ada8b){while(--_0x1ada8b){_0x445738['push'](_0x445738['shift']());}};_0xcf0f95(++_0x1b1bbe);}(_0x5ad7,0x184));var _0x75ad=function(_0x4311da,_0x156aa2){_0x4311da=_0x4311da-0x0;var _0x1531e8=_0x5ad7[_0x4311da];return _0x1531e8;};'use strict';var Sequelize=require('sequelize');module[_0x75ad('0x0')]={'tree':{'type':Sequelize[_0x75ad('0x1')],'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js
index 9ecdf93..a87da3b 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.controller.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x73aa=['sort','where','pick','filters','filter','includeAll','include','findAll','merge','find','catch','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','order'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x73aa,0xf2));var _0xa73a=function(_0x291f8b,_0x3b5591){_0x291f8b=_0x291f8b-0x0;var _0x275171=_0x73aa[_0x291f8b];return _0x275171;};'use strict';var emlformat=require(_0xa73a('0x0'));var rimraf=require(_0xa73a('0x1'));var zipdir=require(_0xa73a('0x2'));var jsonpatch=require(_0xa73a('0x3'));var rp=require('request-promise');var moment=require(_0xa73a('0x4'));var BPromise=require(_0xa73a('0x5'));var Mustache=require(_0xa73a('0x6'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xa73a('0x7'));var fs=require('fs');var fs_extra=require(_0xa73a('0x8'));var _=require(_0xa73a('0x9'));var squel=require(_0xa73a('0xa'));var crypto=require(_0xa73a('0xb'));var jsforce=require(_0xa73a('0xc'));var deskjs=require(_0xa73a('0xd'));var toCsv=require(_0xa73a('0xe'));var querystring=require(_0xa73a('0xf'));var Papa=require(_0xa73a('0x10'));var Redis=require(_0xa73a('0x11'));var authService=require(_0xa73a('0x12'));var qs=require(_0xa73a('0x13'));var as=require(_0xa73a('0x14'));var hardwareService=require(_0xa73a('0x15'));var logger=require(_0xa73a('0x16'))('api');var utils=require(_0xa73a('0x17'));var config=require(_0xa73a('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xa73a('0x19'))['db'];function respondWithStatusCode(_0x24aada,_0xa00ca4){_0xa00ca4=_0xa00ca4||0xcc;return function(_0x3b46a6){if(_0x3b46a6){return _0x24aada[_0xa73a('0x1a')](_0xa00ca4);}return _0x24aada[_0xa73a('0x1b')](_0xa00ca4)[_0xa73a('0x1c')]();};}function respondWithResult(_0x56f211,_0x33e342){_0x33e342=_0x33e342||0xc8;return function(_0x3d7083){if(_0x3d7083){return _0x56f211[_0xa73a('0x1b')](_0x33e342)['json'](_0x3d7083);}};}function respondWithFilteredResult(_0x30e772,_0x392b9f){return function(_0x49b59d){if(_0x49b59d){var _0x3701af=typeof _0x392b9f[_0xa73a('0x1d')]===_0xa73a('0x1e')&&typeof _0x392b9f[_0xa73a('0x1f')]===_0xa73a('0x1e');var _0x431e96=_0x49b59d['count'];var _0x1a1166=_0x3701af?0x0:_0x392b9f[_0xa73a('0x1d')];var _0x793f4b=_0x3701af?_0x49b59d[_0xa73a('0x20')]:_0x392b9f[_0xa73a('0x1d')]+_0x392b9f[_0xa73a('0x1f')];var _0x48cacd;if(_0x793f4b>=_0x431e96){_0x793f4b=_0x431e96;_0x48cacd=0xc8;}else{_0x48cacd=0xce;}_0x30e772['status'](_0x48cacd);return _0x30e772[_0xa73a('0x21')](_0xa73a('0x22'),_0x1a1166+'-'+_0x793f4b+'/'+_0x431e96)[_0xa73a('0x23')](_0x49b59d);}return null;};}function patchUpdates(_0x35a38d){return function(_0x117310){try{jsonpatch[_0xa73a('0x24')](_0x117310,_0x35a38d,!![]);}catch(_0x1a34f3){return BPromise[_0xa73a('0x25')](_0x1a34f3);}return _0x117310[_0xa73a('0x26')]();};}function saveUpdates(_0x13cb3f,_0x48bc8c){return function(_0xc6cc68){if(_0xc6cc68){return _0xc6cc68[_0xa73a('0x27')](_0x13cb3f)[_0xa73a('0x28')](function(_0x51edbb){return _0x51edbb;});}return null;};}function removeEntity(_0x1208df,_0x5b14d2){return function(_0x13af7e){if(_0x13af7e){return _0x13af7e[_0xa73a('0x29')]()[_0xa73a('0x28')](function(){_0x1208df[_0xa73a('0x1b')](0xcc)[_0xa73a('0x1c')]();});}};}function handleEntityNotFound(_0x4c7718,_0x57f935){return function(_0x3e0b99){if(!_0x3e0b99){_0x4c7718[_0xa73a('0x1a')](0x194);}return _0x3e0b99;};}function handleError(_0x38c755,_0x4141ac){_0x4141ac=_0x4141ac||0x1f4;return function(_0x3a9723){logger[_0xa73a('0x2a')](_0x3a9723[_0xa73a('0x2b')]);if(_0x3a9723[_0xa73a('0x2c')]){delete _0x3a9723['name'];}_0x38c755[_0xa73a('0x1b')](_0x4141ac)[_0xa73a('0x2d')](_0x3a9723);};}exports[_0xa73a('0x2e')]=function(_0x18bb8f,_0x1fde4a){var _0x524d16={},_0x5c0f6e={},_0x504825={'count':0x0,'rows':[]};var _0x40a266=_[_0xa73a('0x2f')](db[_0xa73a('0x30')][_0xa73a('0x31')],function(_0x46e3b5){return{'name':_0x46e3b5[_0xa73a('0x32')],'type':_0x46e3b5[_0xa73a('0x33')][_0xa73a('0x34')]};});_0x5c0f6e[_0xa73a('0x35')]=_[_0xa73a('0x2f')](_0x40a266,_0xa73a('0x2c'));_0x5c0f6e[_0xa73a('0x36')]=_[_0xa73a('0x37')](_0x18bb8f[_0xa73a('0x36')]);_0x5c0f6e['filters']=_['intersection'](_0x5c0f6e[_0xa73a('0x35')],_0x5c0f6e[_0xa73a('0x36')]);_0x524d16[_0xa73a('0x38')]=_[_0xa73a('0x39')](_0x5c0f6e[_0xa73a('0x35')],qs['fields'](_0x18bb8f[_0xa73a('0x36')][_0xa73a('0x3a')]));_0x524d16[_0xa73a('0x38')]=_0x524d16[_0xa73a('0x38')][_0xa73a('0x3b')]?_0x524d16['attributes']:_0x5c0f6e[_0xa73a('0x35')];if(!_0x18bb8f[_0xa73a('0x36')][_0xa73a('0x3c')]('nolimit')){_0x524d16[_0xa73a('0x1f')]=qs['limit'](_0x18bb8f[_0xa73a('0x36')][_0xa73a('0x1f')]);_0x524d16['offset']=qs[_0xa73a('0x1d')](_0x18bb8f['query']['offset']);}_0x524d16[_0xa73a('0x3d')]=qs['sort'](_0x18bb8f['query'][_0xa73a('0x3e')]);_0x524d16[_0xa73a('0x3f')]=qs['filters'](_[_0xa73a('0x40')](_0x18bb8f['query'],_0x5c0f6e[_0xa73a('0x41')]),_0x40a266);if(_0x18bb8f[_0xa73a('0x36')][_0xa73a('0x42')]){_0x524d16[_0xa73a('0x3f')]=_['merge'](_0x524d16[_0xa73a('0x3f')],{'$or':_[_0xa73a('0x2f')](_0x40a266,function(_0x3c9c2a){if(_0x3c9c2a[_0xa73a('0x33')]!=='VIRTUAL'){var _0x2818b9={};_0x2818b9[_0x3c9c2a[_0xa73a('0x2c')]]={'$like':'%'+_0x18bb8f[_0xa73a('0x36')][_0xa73a('0x42')]+'%'};return _0x2818b9;}})});}_0x524d16=_['merge']({},_0x524d16,_0x18bb8f['options']);var _0x43f655={'where':_0x524d16['where']};return db[_0xa73a('0x30')][_0xa73a('0x20')](_0x43f655)[_0xa73a('0x28')](function(_0x1d453b){_0x504825[_0xa73a('0x20')]=_0x1d453b;if(_0x18bb8f[_0xa73a('0x36')][_0xa73a('0x43')]){_0x524d16[_0xa73a('0x44')]=[{'all':!![]}];}return db[_0xa73a('0x30')][_0xa73a('0x45')](_0x524d16);})['then'](function(_0x38b0bd){_0x504825['rows']=_0x38b0bd;return _0x504825;})[_0xa73a('0x28')](respondWithFilteredResult(_0x1fde4a,_0x524d16))['catch'](handleError(_0x1fde4a,null));};exports['show']=function(_0x7bade1,_0x4e6fa6){var _0x375039={'raw':!![],'where':{'id':_0x7bade1['params']['id']}},_0x557323={};_0x557323[_0xa73a('0x35')]=_[_0xa73a('0x37')](db['AnalyticTreeReport'][_0xa73a('0x31')]);_0x557323[_0xa73a('0x36')]=_['keys'](_0x7bade1['query']);_0x557323[_0xa73a('0x41')]=_['intersection'](_0x557323[_0xa73a('0x35')],_0x557323[_0xa73a('0x36')]);_0x375039[_0xa73a('0x38')]=_[_0xa73a('0x39')](_0x557323['model'],qs[_0xa73a('0x3a')](_0x7bade1['query']['fields']));_0x375039[_0xa73a('0x38')]=_0x375039['attributes'][_0xa73a('0x3b')]?_0x375039[_0xa73a('0x38')]:_0x557323[_0xa73a('0x35')];if(_0x7bade1[_0xa73a('0x36')][_0xa73a('0x43')]){_0x375039[_0xa73a('0x44')]=[{'all':!![]}];}_0x375039=_[_0xa73a('0x46')]({},_0x375039,_0x7bade1['options']);return db['AnalyticTreeReport'][_0xa73a('0x47')](_0x375039)[_0xa73a('0x28')](handleEntityNotFound(_0x4e6fa6,null))[_0xa73a('0x28')](respondWithResult(_0x4e6fa6,null))[_0xa73a('0x48')](handleError(_0x4e6fa6,null));};exports[_0xa73a('0x49')]=function(_0x339adc,_0x30754d){return db[_0xa73a('0x30')][_0xa73a('0x49')](_0x339adc[_0xa73a('0x4a')],{})[_0xa73a('0x28')](respondWithResult(_0x30754d,0xc9))['catch'](handleError(_0x30754d,null));};exports[_0xa73a('0x27')]=function(_0xc2584,_0x4989c9){if(_0xc2584['body']['id']){delete _0xc2584[_0xa73a('0x4a')]['id'];}return db[_0xa73a('0x30')]['find']({'where':{'id':_0xc2584[_0xa73a('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4989c9,null))[_0xa73a('0x28')](saveUpdates(_0xc2584[_0xa73a('0x4a')],null))[_0xa73a('0x28')](respondWithResult(_0x4989c9,null))[_0xa73a('0x48')](handleError(_0x4989c9,null));};exports[_0xa73a('0x29')]=function(_0x48033e,_0x17ce82){return db[_0xa73a('0x30')][_0xa73a('0x47')]({'where':{'id':_0x48033e[_0xa73a('0x4b')]['id']}})[_0xa73a('0x28')](handleEntityNotFound(_0x17ce82,null))['then'](removeEntity(_0x17ce82,null))[_0xa73a('0x48')](handleError(_0x17ce82,null));};
\ No newline at end of file
+var _0x5ef4=['bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','set','Content-Range','apply','reject','then','destroy','end','stack','name','send','index','type','model','map','keys','query','intersection','fields','attributes','length','hasOwnProperty','limit','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','includeAll','include','AnalyticTreeReport','findAll','catch','show','params','rawAttributes','find','create','body','update','eml-format','rimraf','fast-json-patch','request-promise','moment'];(function(_0xc7896,_0x25f888){var _0x7dcb9e=function(_0x4c7159){while(--_0x4c7159){_0xc7896['push'](_0xc7896['shift']());}};_0x7dcb9e(++_0x25f888);}(_0x5ef4,0x127));var _0x45ef=function(_0x5a4540,_0x1f14c5){_0x5a4540=_0x5a4540-0x0;var _0x5c2d7f=_0x5ef4[_0x5a4540];return _0x5c2d7f;};'use strict';var emlformat=require(_0x45ef('0x0'));var rimraf=require(_0x45ef('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x45ef('0x2'));var rp=require(_0x45ef('0x3'));var moment=require(_0x45ef('0x4'));var BPromise=require(_0x45ef('0x5'));var Mustache=require('mustache');var util=require(_0x45ef('0x6'));var path=require(_0x45ef('0x7'));var sox=require(_0x45ef('0x8'));var csv=require(_0x45ef('0x9'));var ejs=require(_0x45ef('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x45ef('0xb'));var squel=require('squel');var crypto=require(_0x45ef('0xc'));var jsforce=require(_0x45ef('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x45ef('0x9'));var querystring=require(_0x45ef('0xe'));var Papa=require(_0x45ef('0xf'));var Redis=require(_0x45ef('0x10'));var authService=require(_0x45ef('0x11'));var qs=require(_0x45ef('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x45ef('0x13'));var logger=require(_0x45ef('0x14'))(_0x45ef('0x15'));var utils=require(_0x45ef('0x16'));var config=require(_0x45ef('0x17'));var licenseUtil=require(_0x45ef('0x18'));var db=require(_0x45ef('0x19'))['db'];function respondWithStatusCode(_0x3968e8,_0x4eab07){_0x4eab07=_0x4eab07||0xcc;return function(_0x14aaba){if(_0x14aaba){return _0x3968e8[_0x45ef('0x1a')](_0x4eab07);}return _0x3968e8[_0x45ef('0x1b')](_0x4eab07)['end']();};}function respondWithResult(_0x5c6395,_0x5080b4){_0x5080b4=_0x5080b4||0xc8;return function(_0x3c21d5){if(_0x3c21d5){return _0x5c6395[_0x45ef('0x1b')](_0x5080b4)[_0x45ef('0x1c')](_0x3c21d5);}};}function respondWithFilteredResult(_0x5dd28a,_0x14cd1c){return function(_0x1ddd58){if(_0x1ddd58){var _0x54d142=typeof _0x14cd1c[_0x45ef('0x1d')]===_0x45ef('0x1e')&&typeof _0x14cd1c['limit']==='undefined';var _0xe48102=_0x1ddd58[_0x45ef('0x1f')];var _0x2f7ca7=_0x54d142?0x0:_0x14cd1c['offset'];var _0x2ac476=_0x54d142?_0x1ddd58[_0x45ef('0x1f')]:_0x14cd1c['offset']+_0x14cd1c['limit'];var _0x188aa5;if(_0x2ac476>=_0xe48102){_0x2ac476=_0xe48102;_0x188aa5=0xc8;}else{_0x188aa5=0xce;}_0x5dd28a[_0x45ef('0x1b')](_0x188aa5);return _0x5dd28a[_0x45ef('0x20')](_0x45ef('0x21'),_0x2f7ca7+'-'+_0x2ac476+'/'+_0xe48102)[_0x45ef('0x1c')](_0x1ddd58);}return null;};}function patchUpdates(_0x7a6fdc){return function(_0x2fea08){try{jsonpatch[_0x45ef('0x22')](_0x2fea08,_0x7a6fdc,!![]);}catch(_0x4d0f0b){return BPromise[_0x45ef('0x23')](_0x4d0f0b);}return _0x2fea08['save']();};}function saveUpdates(_0x5f1e2a,_0x20d7b9){return function(_0x39403c){if(_0x39403c){return _0x39403c['update'](_0x5f1e2a)[_0x45ef('0x24')](function(_0x37fe67){return _0x37fe67;});}return null;};}function removeEntity(_0x6ffda0,_0x212cef){return function(_0xd63c52){if(_0xd63c52){return _0xd63c52[_0x45ef('0x25')]()[_0x45ef('0x24')](function(){_0x6ffda0[_0x45ef('0x1b')](0xcc)[_0x45ef('0x26')]();});}};}function handleEntityNotFound(_0x245b5c,_0x47cdad){return function(_0x1dcb97){if(!_0x1dcb97){_0x245b5c[_0x45ef('0x1a')](0x194);}return _0x1dcb97;};}function handleError(_0x28303c,_0x59b406){_0x59b406=_0x59b406||0x1f4;return function(_0x1e6113){logger['error'](_0x1e6113[_0x45ef('0x27')]);if(_0x1e6113[_0x45ef('0x28')]){delete _0x1e6113[_0x45ef('0x28')];}_0x28303c['status'](_0x59b406)[_0x45ef('0x29')](_0x1e6113);};}exports[_0x45ef('0x2a')]=function(_0x2d8494,_0x2d0788){var _0x5c435c={},_0xe7b26e={},_0x2f4c7e={'count':0x0,'rows':[]};var _0x4d7112=_['map'](db['AnalyticTreeReport']['rawAttributes'],function(_0x35cc03){return{'name':_0x35cc03['fieldName'],'type':_0x35cc03[_0x45ef('0x2b')]['key']};});_0xe7b26e[_0x45ef('0x2c')]=_[_0x45ef('0x2d')](_0x4d7112,_0x45ef('0x28'));_0xe7b26e['query']=_[_0x45ef('0x2e')](_0x2d8494[_0x45ef('0x2f')]);_0xe7b26e['filters']=_[_0x45ef('0x30')](_0xe7b26e[_0x45ef('0x2c')],_0xe7b26e[_0x45ef('0x2f')]);_0x5c435c['attributes']=_[_0x45ef('0x30')](_0xe7b26e[_0x45ef('0x2c')],qs[_0x45ef('0x31')](_0x2d8494[_0x45ef('0x2f')][_0x45ef('0x31')]));_0x5c435c[_0x45ef('0x32')]=_0x5c435c[_0x45ef('0x32')][_0x45ef('0x33')]?_0x5c435c[_0x45ef('0x32')]:_0xe7b26e['model'];if(!_0x2d8494[_0x45ef('0x2f')][_0x45ef('0x34')]('nolimit')){_0x5c435c[_0x45ef('0x35')]=qs[_0x45ef('0x35')](_0x2d8494[_0x45ef('0x2f')][_0x45ef('0x35')]);_0x5c435c['offset']=qs[_0x45ef('0x1d')](_0x2d8494['query'][_0x45ef('0x1d')]);}_0x5c435c[_0x45ef('0x36')]=qs[_0x45ef('0x37')](_0x2d8494[_0x45ef('0x2f')]['sort']);_0x5c435c[_0x45ef('0x38')]=qs[_0x45ef('0x39')](_[_0x45ef('0x3a')](_0x2d8494[_0x45ef('0x2f')],_0xe7b26e[_0x45ef('0x39')]),_0x4d7112);if(_0x2d8494[_0x45ef('0x2f')]['filter']){_0x5c435c[_0x45ef('0x38')]=_[_0x45ef('0x3b')](_0x5c435c[_0x45ef('0x38')],{'$or':_[_0x45ef('0x2d')](_0x4d7112,function(_0x3c1abd){if(_0x3c1abd[_0x45ef('0x2b')]!==_0x45ef('0x3c')){var _0x30b2b6={};_0x30b2b6[_0x3c1abd[_0x45ef('0x28')]]={'$like':'%'+_0x2d8494['query'][_0x45ef('0x3d')]+'%'};return _0x30b2b6;}})});}_0x5c435c=_[_0x45ef('0x3b')]({},_0x5c435c,_0x2d8494[_0x45ef('0x3e')]);var _0x275b5b={'where':_0x5c435c[_0x45ef('0x38')]};return db['AnalyticTreeReport']['count'](_0x275b5b)['then'](function(_0x21a6e2){_0x2f4c7e['count']=_0x21a6e2;if(_0x2d8494[_0x45ef('0x2f')][_0x45ef('0x3f')]){_0x5c435c[_0x45ef('0x40')]=[{'all':!![]}];}return db[_0x45ef('0x41')][_0x45ef('0x42')](_0x5c435c);})[_0x45ef('0x24')](function(_0x503d3d){_0x2f4c7e['rows']=_0x503d3d;return _0x2f4c7e;})[_0x45ef('0x24')](respondWithFilteredResult(_0x2d0788,_0x5c435c))[_0x45ef('0x43')](handleError(_0x2d0788,null));};exports[_0x45ef('0x44')]=function(_0x43985f,_0x16eeb3){var _0x21a842={'raw':!![],'where':{'id':_0x43985f[_0x45ef('0x45')]['id']}},_0x198039={};_0x198039[_0x45ef('0x2c')]=_[_0x45ef('0x2e')](db[_0x45ef('0x41')][_0x45ef('0x46')]);_0x198039['query']=_[_0x45ef('0x2e')](_0x43985f[_0x45ef('0x2f')]);_0x198039[_0x45ef('0x39')]=_[_0x45ef('0x30')](_0x198039[_0x45ef('0x2c')],_0x198039[_0x45ef('0x2f')]);_0x21a842['attributes']=_[_0x45ef('0x30')](_0x198039[_0x45ef('0x2c')],qs['fields'](_0x43985f[_0x45ef('0x2f')][_0x45ef('0x31')]));_0x21a842[_0x45ef('0x32')]=_0x21a842['attributes'][_0x45ef('0x33')]?_0x21a842['attributes']:_0x198039[_0x45ef('0x2c')];if(_0x43985f[_0x45ef('0x2f')]['includeAll']){_0x21a842['include']=[{'all':!![]}];}_0x21a842=_[_0x45ef('0x3b')]({},_0x21a842,_0x43985f[_0x45ef('0x3e')]);return db[_0x45ef('0x41')][_0x45ef('0x47')](_0x21a842)['then'](handleEntityNotFound(_0x16eeb3,null))[_0x45ef('0x24')](respondWithResult(_0x16eeb3,null))[_0x45ef('0x43')](handleError(_0x16eeb3,null));};exports[_0x45ef('0x48')]=function(_0x4c7445,_0x5a2a50){return db[_0x45ef('0x41')][_0x45ef('0x48')](_0x4c7445[_0x45ef('0x49')],{})[_0x45ef('0x24')](respondWithResult(_0x5a2a50,0xc9))[_0x45ef('0x43')](handleError(_0x5a2a50,null));};exports[_0x45ef('0x4a')]=function(_0x359bdc,_0x1f47a9){if(_0x359bdc[_0x45ef('0x49')]['id']){delete _0x359bdc[_0x45ef('0x49')]['id'];}return db['AnalyticTreeReport'][_0x45ef('0x47')]({'where':{'id':_0x359bdc[_0x45ef('0x45')]['id']}})[_0x45ef('0x24')](handleEntityNotFound(_0x1f47a9,null))[_0x45ef('0x24')](saveUpdates(_0x359bdc[_0x45ef('0x49')],null))[_0x45ef('0x24')](respondWithResult(_0x1f47a9,null))['catch'](handleError(_0x1f47a9,null));};exports[_0x45ef('0x25')]=function(_0x278375,_0x4c1920){return db[_0x45ef('0x41')][_0x45ef('0x47')]({'where':{'id':_0x278375['params']['id']}})['then'](handleEntityNotFound(_0x4c1920,null))[_0x45ef('0x24')](removeEntity(_0x4c1920,null))[_0x45ef('0x43')](handleError(_0x4c1920,null));};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js
index f9c8ae0..1a54385 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.model.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe3a3=['api','moment','bluebird','request-promise','path','rimraf','exports','define','AnalyticTreeReport','../../config/logger'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe3a3,0xe5));var _0x3e3a=function(_0x183ef6,_0x402099){_0x183ef6=_0x183ef6-0x0;var _0x26a7fb=_0xe3a3[_0x183ef6];return _0x26a7fb;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3e3a('0x0'))(_0x3e3a('0x1'));var moment=require(_0x3e3a('0x2'));var BPromise=require(_0x3e3a('0x3'));var rp=require(_0x3e3a('0x4'));var fs=require('fs');var path=require(_0x3e3a('0x5'));var rimraf=require(_0x3e3a('0x6'));var config=require('../../config/environment');var attributes=require('./analyticTreeReport.attributes');module[_0x3e3a('0x7')]=function(_0x43d1be,_0x1e23b5){return _0x43d1be[_0x3e3a('0x8')](_0x3e3a('0x9'),attributes,{'tableName':'analytics_report_trees','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7fbd=['analytics_report_trees','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./analyticTreeReport.attributes','define','AnalyticTreeReport'];(function(_0x51ac09,_0x383098){var _0x3f827d=function(_0x2d8d0f){while(--_0x2d8d0f){_0x51ac09['push'](_0x51ac09['shift']());}};_0x3f827d(++_0x383098);}(_0x7fbd,0x79));var _0xd7fb=function(_0x17f891,_0x34c577){_0x17f891=_0x17f891-0x0;var _0x5bf2d4=_0x7fbd[_0x17f891];return _0x5bf2d4;};'use strict';var _=require(_0xd7fb('0x0'));var util=require(_0xd7fb('0x1'));var logger=require(_0xd7fb('0x2'))('api');var moment=require(_0xd7fb('0x3'));var BPromise=require(_0xd7fb('0x4'));var rp=require(_0xd7fb('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd7fb('0x6'));var config=require(_0xd7fb('0x7'));var attributes=require(_0xd7fb('0x8'));module['exports']=function(_0x29d59,_0x5d3411){return _0x29d59[_0xd7fb('0x9')](_0xd7fb('0xa'),attributes,{'tableName':_0xd7fb('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/analyticTreeReport.rpc.js b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
index 38c2f66..3f34336 100644
--- a/server/api/analyticTreeReport/analyticTreeReport.rpc.js
+++ b/server/api/analyticTreeReport/analyticTreeReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['info','AnalyticTreeReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x7a54,0x106));var _0x47a5=function(_0x3ff8a7,_0x1f3d77){_0x3ff8a7=_0x3ff8a7-0x0;var _0x112ef5=_0x7a54[_0x3ff8a7];return _0x112ef5;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}
\ No newline at end of file
+var _0xdb28=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','lodash','util'];(function(_0x10d396,_0x162280){var _0x2692fd=function(_0x20742c){while(--_0x20742c){_0x10d396['push'](_0x10d396['shift']());}};_0x2692fd(++_0x162280);}(_0xdb28,0x106));var _0x8db2=function(_0x60e73b,_0xde60e){_0x60e73b=_0x60e73b-0x0;var _0x1ec44a=_0xdb28[_0x60e73b];return _0x1ec44a;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});}
\ No newline at end of file
diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js
index dc8253e..cbf03b5 100644
--- a/server/api/analyticTreeReport/index.js
+++ b/server/api/analyticTreeReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xab63=['connect-timeout','express','Router','fs-extra','../../components/auth/service','get','index','isAuthenticated','show','post','create','put','update','/:id','destroy','exports','multer','util','path'];(function(_0x23302f,_0x132d22){var _0x2e61a7=function(_0x42a952){while(--_0x42a952){_0x23302f['push'](_0x23302f['shift']());}};_0x2e61a7(++_0x132d22);}(_0xab63,0x95));var _0x3ab6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xab63[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x3ab6('0x0'));var util=require(_0x3ab6('0x1'));var path=require(_0x3ab6('0x2'));var timeout=require(_0x3ab6('0x3'));var express=require(_0x3ab6('0x4'));var router=express[_0x3ab6('0x5')]();var fs_extra=require(_0x3ab6('0x6'));var auth=require(_0x3ab6('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./analyticTreeReport.controller');router[_0x3ab6('0x8')]('/',auth['isAuthenticated'](),controller[_0x3ab6('0x9')]);router[_0x3ab6('0x8')]('/:id',auth[_0x3ab6('0xa')](),controller[_0x3ab6('0xb')]);router[_0x3ab6('0xc')]('/',auth[_0x3ab6('0xa')](),controller[_0x3ab6('0xd')]);router[_0x3ab6('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x3ab6('0xf')]);router['delete'](_0x3ab6('0x10'),auth['isAuthenticated'](),controller[_0x3ab6('0x11')]);module[_0x3ab6('0x12')]=router;
\ No newline at end of file
+var _0x54ce=['multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./analyticTreeReport.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','exports'];(function(_0x10e3b0,_0x2e1c82){var _0x2bf362=function(_0x474be3){while(--_0x474be3){_0x10e3b0['push'](_0x10e3b0['shift']());}};_0x2bf362(++_0x2e1c82);}(_0x54ce,0x104));var _0xe54c=function(_0x1749bf,_0x371457){_0x1749bf=_0x1749bf-0x0;var _0x1dd578=_0x54ce[_0x1749bf];return _0x1dd578;};'use strict';var multer=require(_0xe54c('0x0'));var util=require(_0xe54c('0x1'));var path=require(_0xe54c('0x2'));var timeout=require(_0xe54c('0x3'));var express=require('express');var router=express[_0xe54c('0x4')]();var fs_extra=require(_0xe54c('0x5'));var auth=require(_0xe54c('0x6'));var interaction=require(_0xe54c('0x7'));var config=require('../../config/environment');var controller=require(_0xe54c('0x8'));router[_0xe54c('0x9')]('/',auth[_0xe54c('0xa')](),controller[_0xe54c('0xb')]);router[_0xe54c('0x9')](_0xe54c('0xc'),auth[_0xe54c('0xa')](),controller[_0xe54c('0xd')]);router[_0xe54c('0xe')]('/',auth[_0xe54c('0xa')](),controller[_0xe54c('0xf')]);router[_0xe54c('0x10')](_0xe54c('0xc'),auth[_0xe54c('0xa')](),controller[_0xe54c('0x11')]);router[_0xe54c('0x12')](_0xe54c('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0xe54c('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js
index 1ebe295..169980a 100644
--- a/server/api/attachment/attachment.attributes.js
+++ b/server/api/attachment/attachment.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4ab0=['STRING','exports'];(function(_0x2c0be1,_0x1e88f2){var _0x3d4bd2=function(_0x2b5497){while(--_0x2b5497){_0x2c0be1['push'](_0x2c0be1['shift']());}};_0x3d4bd2(++_0x1e88f2);}(_0x4ab0,0xd5));var _0x04ab=function(_0xc3f462,_0x4fdbee){_0xc3f462=_0xc3f462-0x0;var _0x3470fc=_0x4ab0[_0xc3f462];return _0x3470fc;};'use strict';var Sequelize=require('sequelize');module[_0x04ab('0x0')]={'name':{'type':Sequelize[_0x04ab('0x1')]},'basename':{'type':Sequelize[_0x04ab('0x1')]},'type':{'type':Sequelize[_0x04ab('0x1')]}};
\ No newline at end of file
+var _0xff96=['exports','STRING','sequelize'];(function(_0x11b4cd,_0x178af0){var _0x280506=function(_0x182e8d){while(--_0x182e8d){_0x11b4cd['push'](_0x11b4cd['shift']());}};_0x280506(++_0x178af0);}(_0xff96,0x179));var _0x6ff9=function(_0x10d575,_0x6edf30){_0x10d575=_0x10d575-0x0;var _0x21ce4a=_0xff96[_0x10d575];return _0x21ce4a;};'use strict';var Sequelize=require(_0x6ff9('0x0'));module[_0x6ff9('0x1')]={'name':{'type':Sequelize[_0x6ff9('0x2')]},'basename':{'type':Sequelize[_0x6ff9('0x2')]},'type':{'type':Sequelize[_0x6ff9('0x2')]}};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js
index 4ad20fe..f914138 100644
--- a/server/api/attachment/attachment.controller.js
+++ b/server/api/attachment/attachment.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0c5e=['Attachment','includeAll','include','findAll','show','params','rawAttributes','intersection','find','catch','clone','merge','get','omit','createdAt','updatedAt','body','create','file','originalname','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','download','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','map','fieldName','type','key','model','keys','query','filters','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','options'];(function(_0x34752d,_0x3e18e1){var _0x3d5b99=function(_0x452ab6){while(--_0x452ab6){_0x34752d['push'](_0x34752d['shift']());}};_0x3d5b99(++_0x3e18e1);}(_0x0c5e,0x1f0));var _0xe0c5=function(_0x1c66f1,_0x53c85c){_0x1c66f1=_0x1c66f1-0x0;var _0x682d89=_0x0c5e[_0x1c66f1];return _0x682d89;};'use strict';var emlformat=require(_0xe0c5('0x0'));var rimraf=require(_0xe0c5('0x1'));var zipdir=require(_0xe0c5('0x2'));var jsonpatch=require(_0xe0c5('0x3'));var rp=require('request-promise');var moment=require(_0xe0c5('0x4'));var BPromise=require(_0xe0c5('0x5'));var Mustache=require(_0xe0c5('0x6'));var util=require(_0xe0c5('0x7'));var path=require(_0xe0c5('0x8'));var sox=require(_0xe0c5('0x9'));var csv=require(_0xe0c5('0xa'));var ejs=require(_0xe0c5('0xb'));var fs=require('fs');var fs_extra=require(_0xe0c5('0xc'));var _=require(_0xe0c5('0xd'));var squel=require('squel');var crypto=require(_0xe0c5('0xe'));var jsforce=require(_0xe0c5('0xf'));var deskjs=require(_0xe0c5('0x10'));var toCsv=require('to-csv');var querystring=require(_0xe0c5('0x11'));var Papa=require(_0xe0c5('0x12'));var Redis=require(_0xe0c5('0x13'));var authService=require(_0xe0c5('0x14'));var qs=require(_0xe0c5('0x15'));var as=require(_0xe0c5('0x16'));var hardwareService=require(_0xe0c5('0x17'));var logger=require(_0xe0c5('0x18'))(_0xe0c5('0x19'));var utils=require(_0xe0c5('0x1a'));var config=require(_0xe0c5('0x1b'));var licenseUtil=require('../../config/license/util');var db=require(_0xe0c5('0x1c'))['db'];function respondWithStatusCode(_0x372423,_0x1a591d){_0x1a591d=_0x1a591d||0xcc;return function(_0x47a361){if(_0x47a361){return _0x372423[_0xe0c5('0x1d')](_0x1a591d);}return _0x372423[_0xe0c5('0x1e')](_0x1a591d)[_0xe0c5('0x1f')]();};}function respondWithResult(_0x52a896,_0xa69806){_0xa69806=_0xa69806||0xc8;return function(_0x2fc07f){if(_0x2fc07f){return _0x52a896[_0xe0c5('0x1e')](_0xa69806)[_0xe0c5('0x20')](_0x2fc07f);}};}function respondWithFilteredResult(_0xb68d5f,_0x5e9ab0){return function(_0x278f07){if(_0x278f07){var _0x13347f=typeof _0x5e9ab0[_0xe0c5('0x21')]==='undefined'&&typeof _0x5e9ab0['limit']===_0xe0c5('0x22');var _0x4cf76b=_0x278f07[_0xe0c5('0x23')];var _0x5b5b7d=_0x13347f?0x0:_0x5e9ab0[_0xe0c5('0x21')];var _0x18bf26=_0x13347f?_0x278f07['count']:_0x5e9ab0[_0xe0c5('0x21')]+_0x5e9ab0['limit'];var _0x2cd058;if(_0x18bf26>=_0x4cf76b){_0x18bf26=_0x4cf76b;_0x2cd058=0xc8;}else{_0x2cd058=0xce;}_0xb68d5f[_0xe0c5('0x1e')](_0x2cd058);return _0xb68d5f[_0xe0c5('0x24')](_0xe0c5('0x25'),_0x5b5b7d+'-'+_0x18bf26+'/'+_0x4cf76b)[_0xe0c5('0x20')](_0x278f07);}return null;};}function patchUpdates(_0x4803cc){return function(_0x5470d0){try{jsonpatch[_0xe0c5('0x26')](_0x5470d0,_0x4803cc,!![]);}catch(_0xf574ac){return BPromise[_0xe0c5('0x27')](_0xf574ac);}return _0x5470d0[_0xe0c5('0x28')]();};}function saveUpdates(_0x4d5f2c,_0x17bdfb){return function(_0x22e999){if(_0x22e999){return _0x22e999[_0xe0c5('0x29')](_0x4d5f2c)[_0xe0c5('0x2a')](function(_0x25d129){return _0x25d129;});}return null;};}function removeEntity(_0x4fe8bf,_0x145663){return function(_0x3b1d2e){if(_0x3b1d2e){return _0x3b1d2e[_0xe0c5('0x2b')]()[_0xe0c5('0x2a')](function(){_0x4fe8bf[_0xe0c5('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d9845,_0x3f2259){return function(_0x4bc390){if(!_0x4bc390){_0x3d9845[_0xe0c5('0x1d')](0x194);}return _0x4bc390;};}function handleError(_0x16bd3b,_0x1298ca){_0x1298ca=_0x1298ca||0x1f4;return function(_0x3bf03b){logger[_0xe0c5('0x2c')](_0x3bf03b[_0xe0c5('0x2d')]);if(_0x3bf03b[_0xe0c5('0x2e')]){delete _0x3bf03b[_0xe0c5('0x2e')];}_0x16bd3b[_0xe0c5('0x1e')](_0x1298ca)[_0xe0c5('0x2f')](_0x3bf03b);};}exports['index']=function(_0x4a8bbc,_0x12453f){var _0x5c7f41={},_0x18883e={},_0x1b6df8={'count':0x0,'rows':[]};var _0x4bdbba=_[_0xe0c5('0x30')](db['Attachment']['rawAttributes'],function(_0x1c77b2){return{'name':_0x1c77b2[_0xe0c5('0x31')],'type':_0x1c77b2[_0xe0c5('0x32')][_0xe0c5('0x33')]};});_0x18883e[_0xe0c5('0x34')]=_[_0xe0c5('0x30')](_0x4bdbba,'name');_0x18883e['query']=_[_0xe0c5('0x35')](_0x4a8bbc[_0xe0c5('0x36')]);_0x18883e[_0xe0c5('0x37')]=_['intersection'](_0x18883e['model'],_0x18883e[_0xe0c5('0x36')]);_0x5c7f41[_0xe0c5('0x38')]=_['intersection'](_0x18883e['model'],qs[_0xe0c5('0x39')](_0x4a8bbc[_0xe0c5('0x36')]['fields']));_0x5c7f41['attributes']=_0x5c7f41[_0xe0c5('0x38')][_0xe0c5('0x3a')]?_0x5c7f41[_0xe0c5('0x38')]:_0x18883e[_0xe0c5('0x34')];if(!_0x4a8bbc['query'][_0xe0c5('0x3b')](_0xe0c5('0x3c'))){_0x5c7f41[_0xe0c5('0x3d')]=qs[_0xe0c5('0x3d')](_0x4a8bbc[_0xe0c5('0x36')][_0xe0c5('0x3d')]);_0x5c7f41[_0xe0c5('0x21')]=qs[_0xe0c5('0x21')](_0x4a8bbc[_0xe0c5('0x36')][_0xe0c5('0x21')]);}_0x5c7f41[_0xe0c5('0x3e')]=qs[_0xe0c5('0x3f')](_0x4a8bbc['query'][_0xe0c5('0x3f')]);_0x5c7f41[_0xe0c5('0x40')]=qs[_0xe0c5('0x37')](_[_0xe0c5('0x41')](_0x4a8bbc[_0xe0c5('0x36')],_0x18883e[_0xe0c5('0x37')]),_0x4bdbba);if(_0x4a8bbc[_0xe0c5('0x36')][_0xe0c5('0x42')]){_0x5c7f41[_0xe0c5('0x40')]=_['merge'](_0x5c7f41[_0xe0c5('0x40')],{'$or':_[_0xe0c5('0x30')](_0x4bdbba,function(_0x4771dc){if(_0x4771dc[_0xe0c5('0x32')]!=='VIRTUAL'){var _0x540fb9={};_0x540fb9[_0x4771dc[_0xe0c5('0x2e')]]={'$like':'%'+_0x4a8bbc['query'][_0xe0c5('0x42')]+'%'};return _0x540fb9;}})});}_0x5c7f41=_['merge']({},_0x5c7f41,_0x4a8bbc[_0xe0c5('0x43')]);var _0x2c3219={'where':_0x5c7f41[_0xe0c5('0x40')]};return db[_0xe0c5('0x44')][_0xe0c5('0x23')](_0x2c3219)[_0xe0c5('0x2a')](function(_0x542d22){_0x1b6df8[_0xe0c5('0x23')]=_0x542d22;if(_0x4a8bbc['query'][_0xe0c5('0x45')]){_0x5c7f41[_0xe0c5('0x46')]=[{'all':!![]}];}return db[_0xe0c5('0x44')][_0xe0c5('0x47')](_0x5c7f41);})['then'](function(_0x4e9636){_0x1b6df8['rows']=_0x4e9636;return _0x1b6df8;})['then'](respondWithFilteredResult(_0x12453f,_0x5c7f41))['catch'](handleError(_0x12453f,null));};exports[_0xe0c5('0x48')]=function(_0x4920ab,_0x5c7166){var _0x5610e9={'raw':!![],'where':{'id':_0x4920ab[_0xe0c5('0x49')]['id']}},_0x2adb08={};_0x2adb08[_0xe0c5('0x34')]=_[_0xe0c5('0x35')](db[_0xe0c5('0x44')][_0xe0c5('0x4a')]);_0x2adb08[_0xe0c5('0x36')]=_[_0xe0c5('0x35')](_0x4920ab[_0xe0c5('0x36')]);_0x2adb08[_0xe0c5('0x37')]=_[_0xe0c5('0x4b')](_0x2adb08[_0xe0c5('0x34')],_0x2adb08[_0xe0c5('0x36')]);_0x5610e9['attributes']=_[_0xe0c5('0x4b')](_0x2adb08[_0xe0c5('0x34')],qs[_0xe0c5('0x39')](_0x4920ab['query'][_0xe0c5('0x39')]));_0x5610e9['attributes']=_0x5610e9[_0xe0c5('0x38')][_0xe0c5('0x3a')]?_0x5610e9[_0xe0c5('0x38')]:_0x2adb08[_0xe0c5('0x34')];if(_0x4920ab[_0xe0c5('0x36')][_0xe0c5('0x45')]){_0x5610e9['include']=[{'all':!![]}];}_0x5610e9=_['merge']({},_0x5610e9,_0x4920ab['options']);return db[_0xe0c5('0x44')][_0xe0c5('0x4c')](_0x5610e9)[_0xe0c5('0x2a')](handleEntityNotFound(_0x5c7166,null))[_0xe0c5('0x2a')](respondWithResult(_0x5c7166,null))[_0xe0c5('0x4d')](handleError(_0x5c7166,null));};exports[_0xe0c5('0x4e')]=function(_0x57e433,_0x5aa38e){var _0x3228bd={'where':{'id':_0x57e433[_0xe0c5('0x49')]['id']}},_0x17af23={};_0x17af23[_0xe0c5('0x34')]=_['keys'](db[_0xe0c5('0x44')][_0xe0c5('0x4a')]);_0x3228bd[_0xe0c5('0x38')]=_[_0xe0c5('0x4b')](_0x17af23['model'],qs[_0xe0c5('0x39')](_0x57e433[_0xe0c5('0x36')][_0xe0c5('0x39')]));_0x3228bd[_0xe0c5('0x38')]=_0x3228bd[_0xe0c5('0x38')]['length']?_0x3228bd[_0xe0c5('0x38')]:_0x17af23[_0xe0c5('0x34')];if(_0x57e433[_0xe0c5('0x36')][_0xe0c5('0x45')]){_0x3228bd[_0xe0c5('0x46')]=[{'all':!![]}];}_0x3228bd=_[_0xe0c5('0x4f')]({},_0x3228bd,_0x57e433[_0xe0c5('0x43')]);return db[_0xe0c5('0x44')][_0xe0c5('0x4c')](_0x3228bd)[_0xe0c5('0x2a')](handleEntityNotFound(_0x5aa38e,null))[_0xe0c5('0x2a')](function(_0x1e42fe){if(_0x1e42fe){var _0xcc2c62=_0x1e42fe[_0xe0c5('0x50')]({'plain':!![]});_0xcc2c62=qs[_0xe0c5('0x51')](_0xcc2c62,['id',_0xe0c5('0x52'),_0xe0c5('0x53')]);_0x57e433['body']=_[_0xe0c5('0x51')](_0x57e433[_0xe0c5('0x54')],['id',_0xe0c5('0x52'),'updatedAt']);return db[_0xe0c5('0x44')][_0xe0c5('0x55')](_['merge'](_0xcc2c62,_0x57e433[_0xe0c5('0x54')]),{'include':_0x57e433[_0xe0c5('0x36')][_0xe0c5('0x45')]?[{'all':!![]}]:undefined});}})[_0xe0c5('0x2a')](respondWithResult(_0x5aa38e,0xc9))[_0xe0c5('0x4d')](handleError(_0x5aa38e,null));};exports[_0xe0c5('0x29')]=function(_0x1cfeff,_0x510f0d){if(_0x1cfeff['body']['id']){delete _0x1cfeff[_0xe0c5('0x54')]['id'];}return db[_0xe0c5('0x44')][_0xe0c5('0x4c')]({'where':{'id':_0x1cfeff[_0xe0c5('0x49')]['id']}})[_0xe0c5('0x2a')](handleEntityNotFound(_0x510f0d,null))[_0xe0c5('0x2a')](saveUpdates(_0x1cfeff[_0xe0c5('0x54')],null))[_0xe0c5('0x2a')](respondWithResult(_0x510f0d,null))[_0xe0c5('0x4d')](handleError(_0x510f0d,null));};exports['destroy']=function(_0xde88ba,_0x4f1387){return db['Attachment']['find']({'where':{'id':_0xde88ba[_0xe0c5('0x49')]['id']}})[_0xe0c5('0x2a')](handleEntityNotFound(_0x4f1387,null))[_0xe0c5('0x2a')](removeEntity(_0x4f1387,null))[_0xe0c5('0x4d')](handleError(_0x4f1387,null));};exports[_0xe0c5('0x55')]=function(_0x1ae708,_0x38b504,_0x2bf540){_0x1ae708[_0xe0c5('0x54')][_0xe0c5('0x2e')]=_0x1ae708[_0xe0c5('0x56')][_0xe0c5('0x57')];_0x1ae708[_0xe0c5('0x54')]['basename']=_0x1ae708[_0xe0c5('0x56')]['filename'];_0x1ae708[_0xe0c5('0x54')][_0xe0c5('0x32')]=_0x1ae708['file']['mimetype'];return db[_0xe0c5('0x44')][_0xe0c5('0x55')](_0x1ae708[_0xe0c5('0x54')])[_0xe0c5('0x2a')](respondWithResult(_0x38b504,0xc9))['catch'](handleError(_0x38b504,null));};exports['download']=function(_0x74c4db,_0x4925cb,_0x3be766){return db[_0xe0c5('0x44')]['findOne']({'where':{'id':_0x74c4db[_0xe0c5('0x49')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x4925cb,null))['then'](function(_0x4f4045){if(_0x4f4045){var _0x4b9147=_0x4f4045[_0xe0c5('0x58')]!==null;var _0x859515=path[_0xe0c5('0x59')](config[_0xe0c5('0x5a')],_0xe0c5('0x5b'));if(_0x4b9147){_0x859515=path[_0xe0c5('0x59')](_0x859515,_0xe0c5('0x5c'));}var _0x40e6b1=path[_0xe0c5('0x59')](_0x859515,_0x4f4045['basename']);return _0x4925cb[_0xe0c5('0x5d')](_0x40e6b1);}})[_0xe0c5('0x4d')](handleError(_0x4925cb,null));};
\ No newline at end of file
+var _0x7f42=['../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','set','reject','save','update','then','error','stack','name','index','map','Attachment','rawAttributes','fieldName','type','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','merge','count','includeAll','include','findAll','rows','catch','show','params','length','options','find','get','omit','createdAt','updatedAt','body','create','destroy','file','originalname','mimetype','download','findOne','root','server/files/attachments/','join','offline-chat/','basename','eml-format','rimraf','request-promise','moment','util','path','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis'];(function(_0x3f2a90,_0x50baf1){var _0xb46279=function(_0x5e47b5){while(--_0x5e47b5){_0x3f2a90['push'](_0x3f2a90['shift']());}};_0xb46279(++_0x50baf1);}(_0x7f42,0x9f));var _0x27f4=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x7f42[_0x57b54c];return _0x59cc19;};'use strict';var emlformat=require(_0x27f4('0x0'));var rimraf=require(_0x27f4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x27f4('0x2'));var moment=require(_0x27f4('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x27f4('0x4'));var path=require(_0x27f4('0x5'));var sox=require('sox');var csv=require(_0x27f4('0x6'));var ejs=require(_0x27f4('0x7'));var fs=require('fs');var fs_extra=require(_0x27f4('0x8'));var _=require('lodash');var squel=require(_0x27f4('0x9'));var crypto=require('crypto');var jsforce=require(_0x27f4('0xa'));var deskjs=require(_0x27f4('0xb'));var toCsv=require(_0x27f4('0x6'));var querystring=require(_0x27f4('0xc'));var Papa=require(_0x27f4('0xd'));var Redis=require(_0x27f4('0xe'));var authService=require(_0x27f4('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x27f4('0x10'));var hardwareService=require(_0x27f4('0x11'));var logger=require(_0x27f4('0x12'))(_0x27f4('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x27f4('0x14'))['db'];function respondWithStatusCode(_0x84dc4c,_0x46c14f){_0x46c14f=_0x46c14f||0xcc;return function(_0x1a3664){if(_0x1a3664){return _0x84dc4c[_0x27f4('0x15')](_0x46c14f);}return _0x84dc4c['status'](_0x46c14f)[_0x27f4('0x16')]();};}function respondWithResult(_0x59d2d4,_0x3aae8e){_0x3aae8e=_0x3aae8e||0xc8;return function(_0x4d099b){if(_0x4d099b){return _0x59d2d4[_0x27f4('0x17')](_0x3aae8e)[_0x27f4('0x18')](_0x4d099b);}};}function respondWithFilteredResult(_0x825c31,_0x2031c4){return function(_0x551356){if(_0x551356){var _0x8b4180=typeof _0x2031c4[_0x27f4('0x19')]===_0x27f4('0x1a')&&typeof _0x2031c4['limit']===_0x27f4('0x1a');var _0x578fab=_0x551356['count'];var _0xffcc3a=_0x8b4180?0x0:_0x2031c4['offset'];var _0x462a8f=_0x8b4180?_0x551356['count']:_0x2031c4['offset']+_0x2031c4[_0x27f4('0x1b')];var _0x34ccbd;if(_0x462a8f>=_0x578fab){_0x462a8f=_0x578fab;_0x34ccbd=0xc8;}else{_0x34ccbd=0xce;}_0x825c31[_0x27f4('0x17')](_0x34ccbd);return _0x825c31[_0x27f4('0x1c')]('Content-Range',_0xffcc3a+'-'+_0x462a8f+'/'+_0x578fab)['json'](_0x551356);}return null;};}function patchUpdates(_0x4834b3){return function(_0x31db2d){try{jsonpatch['apply'](_0x31db2d,_0x4834b3,!![]);}catch(_0x2369ad){return BPromise[_0x27f4('0x1d')](_0x2369ad);}return _0x31db2d[_0x27f4('0x1e')]();};}function saveUpdates(_0x16fcab,_0xfbae2e){return function(_0x194bce){if(_0x194bce){return _0x194bce[_0x27f4('0x1f')](_0x16fcab)[_0x27f4('0x20')](function(_0x2240f7){return _0x2240f7;});}return null;};}function removeEntity(_0x44ac2f,_0x948919){return function(_0x7df3a2){if(_0x7df3a2){return _0x7df3a2['destroy']()['then'](function(){_0x44ac2f[_0x27f4('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x31d1a3,_0x528441){return function(_0x5cd9cc){if(!_0x5cd9cc){_0x31d1a3[_0x27f4('0x15')](0x194);}return _0x5cd9cc;};}function handleError(_0x5d7f85,_0x1dd61f){_0x1dd61f=_0x1dd61f||0x1f4;return function(_0x3f3953){logger[_0x27f4('0x21')](_0x3f3953[_0x27f4('0x22')]);if(_0x3f3953[_0x27f4('0x23')]){delete _0x3f3953[_0x27f4('0x23')];}_0x5d7f85[_0x27f4('0x17')](_0x1dd61f)['send'](_0x3f3953);};}exports[_0x27f4('0x24')]=function(_0x38f663,_0x2e9671){var _0x40e92d={},_0x24da6d={},_0x1caf3c={'count':0x0,'rows':[]};var _0x59d1b1=_[_0x27f4('0x25')](db[_0x27f4('0x26')][_0x27f4('0x27')],function(_0x3527f6){return{'name':_0x3527f6[_0x27f4('0x28')],'type':_0x3527f6[_0x27f4('0x29')][_0x27f4('0x2a')]};});_0x24da6d[_0x27f4('0x2b')]=_[_0x27f4('0x25')](_0x59d1b1,'name');_0x24da6d[_0x27f4('0x2c')]=_[_0x27f4('0x2d')](_0x38f663[_0x27f4('0x2c')]);_0x24da6d['filters']=_['intersection'](_0x24da6d['model'],_0x24da6d[_0x27f4('0x2c')]);_0x40e92d[_0x27f4('0x2e')]=_[_0x27f4('0x2f')](_0x24da6d[_0x27f4('0x2b')],qs[_0x27f4('0x30')](_0x38f663[_0x27f4('0x2c')][_0x27f4('0x30')]));_0x40e92d[_0x27f4('0x2e')]=_0x40e92d[_0x27f4('0x2e')]['length']?_0x40e92d[_0x27f4('0x2e')]:_0x24da6d['model'];if(!_0x38f663[_0x27f4('0x2c')][_0x27f4('0x31')](_0x27f4('0x32'))){_0x40e92d[_0x27f4('0x1b')]=qs[_0x27f4('0x1b')](_0x38f663['query'][_0x27f4('0x1b')]);_0x40e92d[_0x27f4('0x19')]=qs[_0x27f4('0x19')](_0x38f663[_0x27f4('0x2c')]['offset']);}_0x40e92d[_0x27f4('0x33')]=qs[_0x27f4('0x34')](_0x38f663[_0x27f4('0x2c')][_0x27f4('0x34')]);_0x40e92d['where']=qs[_0x27f4('0x35')](_[_0x27f4('0x36')](_0x38f663[_0x27f4('0x2c')],_0x24da6d['filters']),_0x59d1b1);if(_0x38f663['query'][_0x27f4('0x37')]){_0x40e92d['where']=_['merge'](_0x40e92d[_0x27f4('0x38')],{'$or':_[_0x27f4('0x25')](_0x59d1b1,function(_0x3d1b75){if(_0x3d1b75[_0x27f4('0x29')]!==_0x27f4('0x39')){var _0x500fb3={};_0x500fb3[_0x3d1b75[_0x27f4('0x23')]]={'$like':'%'+_0x38f663[_0x27f4('0x2c')]['filter']+'%'};return _0x500fb3;}})});}_0x40e92d=_[_0x27f4('0x3a')]({},_0x40e92d,_0x38f663['options']);var _0x42a126={'where':_0x40e92d[_0x27f4('0x38')]};return db['Attachment']['count'](_0x42a126)[_0x27f4('0x20')](function(_0x17d97f){_0x1caf3c[_0x27f4('0x3b')]=_0x17d97f;if(_0x38f663[_0x27f4('0x2c')][_0x27f4('0x3c')]){_0x40e92d[_0x27f4('0x3d')]=[{'all':!![]}];}return db[_0x27f4('0x26')][_0x27f4('0x3e')](_0x40e92d);})[_0x27f4('0x20')](function(_0x3a8295){_0x1caf3c[_0x27f4('0x3f')]=_0x3a8295;return _0x1caf3c;})[_0x27f4('0x20')](respondWithFilteredResult(_0x2e9671,_0x40e92d))[_0x27f4('0x40')](handleError(_0x2e9671,null));};exports[_0x27f4('0x41')]=function(_0x2b20d2,_0x177a14){var _0x57ee5f={'raw':!![],'where':{'id':_0x2b20d2[_0x27f4('0x42')]['id']}},_0x3a8070={};_0x3a8070[_0x27f4('0x2b')]=_[_0x27f4('0x2d')](db[_0x27f4('0x26')][_0x27f4('0x27')]);_0x3a8070['query']=_[_0x27f4('0x2d')](_0x2b20d2[_0x27f4('0x2c')]);_0x3a8070[_0x27f4('0x35')]=_['intersection'](_0x3a8070[_0x27f4('0x2b')],_0x3a8070[_0x27f4('0x2c')]);_0x57ee5f[_0x27f4('0x2e')]=_['intersection'](_0x3a8070[_0x27f4('0x2b')],qs[_0x27f4('0x30')](_0x2b20d2[_0x27f4('0x2c')][_0x27f4('0x30')]));_0x57ee5f[_0x27f4('0x2e')]=_0x57ee5f['attributes'][_0x27f4('0x43')]?_0x57ee5f[_0x27f4('0x2e')]:_0x3a8070['model'];if(_0x2b20d2[_0x27f4('0x2c')]['includeAll']){_0x57ee5f[_0x27f4('0x3d')]=[{'all':!![]}];}_0x57ee5f=_[_0x27f4('0x3a')]({},_0x57ee5f,_0x2b20d2[_0x27f4('0x44')]);return db[_0x27f4('0x26')]['find'](_0x57ee5f)[_0x27f4('0x20')](handleEntityNotFound(_0x177a14,null))[_0x27f4('0x20')](respondWithResult(_0x177a14,null))[_0x27f4('0x40')](handleError(_0x177a14,null));};exports['clone']=function(_0x3c7c14,_0x487de9){var _0x36611a={'where':{'id':_0x3c7c14[_0x27f4('0x42')]['id']}},_0x431b07={};_0x431b07[_0x27f4('0x2b')]=_['keys'](db['Attachment'][_0x27f4('0x27')]);_0x36611a[_0x27f4('0x2e')]=_[_0x27f4('0x2f')](_0x431b07['model'],qs[_0x27f4('0x30')](_0x3c7c14['query'][_0x27f4('0x30')]));_0x36611a[_0x27f4('0x2e')]=_0x36611a[_0x27f4('0x2e')][_0x27f4('0x43')]?_0x36611a[_0x27f4('0x2e')]:_0x431b07[_0x27f4('0x2b')];if(_0x3c7c14[_0x27f4('0x2c')]['includeAll']){_0x36611a[_0x27f4('0x3d')]=[{'all':!![]}];}_0x36611a=_['merge']({},_0x36611a,_0x3c7c14[_0x27f4('0x44')]);return db[_0x27f4('0x26')][_0x27f4('0x45')](_0x36611a)[_0x27f4('0x20')](handleEntityNotFound(_0x487de9,null))['then'](function(_0x561f56){if(_0x561f56){var _0xac8d90=_0x561f56[_0x27f4('0x46')]({'plain':!![]});_0xac8d90=qs[_0x27f4('0x47')](_0xac8d90,['id',_0x27f4('0x48'),_0x27f4('0x49')]);_0x3c7c14['body']=_[_0x27f4('0x47')](_0x3c7c14[_0x27f4('0x4a')],['id',_0x27f4('0x48'),_0x27f4('0x49')]);return db['Attachment'][_0x27f4('0x4b')](_[_0x27f4('0x3a')](_0xac8d90,_0x3c7c14['body']),{'include':_0x3c7c14[_0x27f4('0x2c')][_0x27f4('0x3c')]?[{'all':!![]}]:undefined});}})[_0x27f4('0x20')](respondWithResult(_0x487de9,0xc9))[_0x27f4('0x40')](handleError(_0x487de9,null));};exports[_0x27f4('0x1f')]=function(_0x5a4e55,_0x16731f){if(_0x5a4e55[_0x27f4('0x4a')]['id']){delete _0x5a4e55[_0x27f4('0x4a')]['id'];}return db[_0x27f4('0x26')][_0x27f4('0x45')]({'where':{'id':_0x5a4e55[_0x27f4('0x42')]['id']}})[_0x27f4('0x20')](handleEntityNotFound(_0x16731f,null))[_0x27f4('0x20')](saveUpdates(_0x5a4e55[_0x27f4('0x4a')],null))['then'](respondWithResult(_0x16731f,null))[_0x27f4('0x40')](handleError(_0x16731f,null));};exports[_0x27f4('0x4c')]=function(_0x53edc5,_0x345ed1){return db[_0x27f4('0x26')][_0x27f4('0x45')]({'where':{'id':_0x53edc5['params']['id']}})[_0x27f4('0x20')](handleEntityNotFound(_0x345ed1,null))[_0x27f4('0x20')](removeEntity(_0x345ed1,null))[_0x27f4('0x40')](handleError(_0x345ed1,null));};exports['create']=function(_0x3f461f,_0x62e1cc,_0x2f36aa){_0x3f461f[_0x27f4('0x4a')][_0x27f4('0x23')]=_0x3f461f[_0x27f4('0x4d')][_0x27f4('0x4e')];_0x3f461f[_0x27f4('0x4a')]['basename']=_0x3f461f[_0x27f4('0x4d')]['filename'];_0x3f461f[_0x27f4('0x4a')][_0x27f4('0x29')]=_0x3f461f[_0x27f4('0x4d')][_0x27f4('0x4f')];return db['Attachment'][_0x27f4('0x4b')](_0x3f461f['body'])['then'](respondWithResult(_0x62e1cc,0xc9))['catch'](handleError(_0x62e1cc,null));};exports[_0x27f4('0x50')]=function(_0x31d5d7,_0x428c34,_0x4bf708){return db[_0x27f4('0x26')][_0x27f4('0x51')]({'where':{'id':_0x31d5d7[_0x27f4('0x42')]['id']},'raw':!![]})[_0x27f4('0x20')](handleEntityNotFound(_0x428c34,null))[_0x27f4('0x20')](function(_0x216197){if(_0x216197){var _0x4a13bd=_0x216197['ChatOfflineMessageId']!==null;var _0x38e4b2=path['join'](config[_0x27f4('0x52')],_0x27f4('0x53'));if(_0x4a13bd){_0x38e4b2=path[_0x27f4('0x54')](_0x38e4b2,_0x27f4('0x55'));}var _0x19d189=path[_0x27f4('0x54')](_0x38e4b2,_0x216197[_0x27f4('0x56')]);return _0x428c34[_0x27f4('0x50')](_0x19d189);}})[_0x27f4('0x40')](handleError(_0x428c34,null));};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js
index e23dd2a..e3ff697 100644
--- a/server/api/attachment/attachment.model.js
+++ b/server/api/attachment/attachment.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7169=['lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./attachment.attributes','exports','Attachment'];(function(_0x1b0fc9,_0x1282b9){var _0x314cc3=function(_0x4f5c4c){while(--_0x4f5c4c){_0x1b0fc9['push'](_0x1b0fc9['shift']());}};_0x314cc3(++_0x1282b9);}(_0x7169,0x197));var _0x9716=function(_0x58afd5,_0x534a48){_0x58afd5=_0x58afd5-0x0;var _0x3e503b=_0x7169[_0x58afd5];return _0x3e503b;};'use strict';var _=require(_0x9716('0x0'));var util=require(_0x9716('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x9716('0x2'));var BPromise=require(_0x9716('0x3'));var rp=require(_0x9716('0x4'));var fs=require('fs');var path=require(_0x9716('0x5'));var rimraf=require(_0x9716('0x6'));var config=require(_0x9716('0x7'));var attributes=require(_0x9716('0x8'));module[_0x9716('0x9')]=function(_0x33ae38,_0x2e83df){return _0x33ae38['define'](_0x9716('0xa'),attributes,{'tableName':'attachments','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x38a8=['attachments','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./attachment.attributes','exports','define'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0x38a8,0xc1));var _0x838a=function(_0x2f8530,_0x5cbd67){_0x2f8530=_0x2f8530-0x0;var _0x5e814e=_0x38a8[_0x2f8530];return _0x5e814e;};'use strict';var _=require(_0x838a('0x0'));var util=require(_0x838a('0x1'));var logger=require(_0x838a('0x2'))(_0x838a('0x3'));var moment=require('moment');var BPromise=require(_0x838a('0x4'));var rp=require(_0x838a('0x5'));var fs=require('fs');var path=require(_0x838a('0x6'));var rimraf=require(_0x838a('0x7'));var config=require('../../config/environment');var attributes=require(_0x838a('0x8'));module[_0x838a('0x9')]=function(_0x991729,_0x5cba27){return _0x991729[_0x838a('0xa')]('Attachment',attributes,{'tableName':_0x838a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/attachment/attachment.rpc.js b/server/api/attachment/attachment.rpc.js
index f62b775..8065237 100644
--- a/server/api/attachment/attachment.rpc.js
+++ b/server/api/attachment/attachment.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9221=['jayson/promise','client','http','request','info','Attachment,\x20%s,\x20%s','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','Attachment','options','raw','then','CreateAttachment','catch','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x1ae663,_0x17c8d2){var _0x2e576b=function(_0x4ec93a){while(--_0x4ec93a){_0x1ae663['push'](_0x1ae663['shift']());}};_0x2e576b(++_0x17c8d2);}(_0x9221,0x64));var _0x1922=function(_0x9fce47,_0x38c3e6){_0x9fce47=_0x9fce47-0x0;var _0x29e671=_0x9221[_0x9fce47];return _0x29e671;};'use strict';var _=require('lodash');var util=require(_0x1922('0x0'));var moment=require(_0x1922('0x1'));var BPromise=require('bluebird');var rs=require(_0x1922('0x2'));var fs=require('fs');var Redis=require(_0x1922('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x1922('0x4'));var logger=require(_0x1922('0x5'))(_0x1922('0x6'));var config=require(_0x1922('0x7'));var jayson=require(_0x1922('0x8'));var client=jayson[_0x1922('0x9')][_0x1922('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5aa05c,_0x116227,_0x3cfd98){return new BPromise(function(_0x195fa4,_0x47c225){return client[_0x1922('0xb')](_0x5aa05c,_0x3cfd98)['then'](function(_0x2b6c51){logger[_0x1922('0xc')](_0x1922('0xd'),_0x116227,'request\x20sent');logger[_0x1922('0xe')](_0x1922('0xf'),_0x116227,'request\x20sent',JSON[_0x1922('0x10')](_0x2b6c51));if(_0x2b6c51['error']){if(_0x2b6c51[_0x1922('0x11')]['code']===0x1f4){logger[_0x1922('0x11')](_0x1922('0xd'),_0x116227,_0x2b6c51[_0x1922('0x11')]['message']);return _0x47c225(_0x2b6c51['error'][_0x1922('0x12')]);}logger[_0x1922('0x11')](_0x1922('0xd'),_0x116227,_0x2b6c51[_0x1922('0x11')][_0x1922('0x12')]);return _0x195fa4(_0x2b6c51['error'][_0x1922('0x12')]);}else{logger['info'](_0x1922('0xd'),_0x116227,_0x1922('0x13'));_0x195fa4(_0x2b6c51[_0x1922('0x14')][_0x1922('0x12')]);}})['catch'](function(_0x459511){logger[_0x1922('0x11')](_0x1922('0xd'),_0x116227,_0x459511);_0x47c225(_0x459511);});});}exports['CreateAttachment']=function(_0x482f68){var _0x372875=this;return new Promise(function(_0x51acda,_0x3c6f9a){return db[_0x1922('0x15')]['create'](_0x482f68['body'],{'raw':_0x482f68[_0x1922('0x16')]?_0x482f68['options'][_0x1922('0x17')]===undefined?!![]:![]:!![]})[_0x1922('0x18')](function(_0x1fb6a4){logger[_0x1922('0xc')]('CreateAttachment',_0x482f68);logger[_0x1922('0xe')](_0x1922('0x19'),_0x482f68,JSON[_0x1922('0x10')](_0x1fb6a4));_0x51acda(_0x1fb6a4);})[_0x1922('0x1a')](function(_0x554f8b){logger[_0x1922('0x11')](_0x1922('0x19'),_0x554f8b[_0x1922('0x12')],_0x482f68);_0x3c6f9a(_0x372875['error'](0x1f4,_0x554f8b[_0x1922('0x12')]));});});};
\ No newline at end of file
+var _0xd4b6=['jayson/promise','client','request','then','info','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','Attachment,\x20%s,\x20%s','message','result','catch','CreateAttachment','Attachment','create','body','options','lodash','util','bluebird','randomstring','../../mysqldb','../../config/environment'];(function(_0x43359a,_0x10c09d){var _0x40df84=function(_0x754aa3){while(--_0x754aa3){_0x43359a['push'](_0x43359a['shift']());}};_0x40df84(++_0x10c09d);}(_0xd4b6,0x13f));var _0x6d4b=function(_0xa30671,_0x33c0f7){_0xa30671=_0xa30671-0x0;var _0x41c556=_0xd4b6[_0xa30671];return _0x41c556;};'use strict';var _=require(_0x6d4b('0x0'));var util=require(_0x6d4b('0x1'));var moment=require('moment');var BPromise=require(_0x6d4b('0x2'));var rs=require(_0x6d4b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6d4b('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x6d4b('0x5'));var jayson=require(_0x6d4b('0x6'));var client=jayson[_0x6d4b('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x20f52a,_0x42a52a,_0x424690){return new BPromise(function(_0x262eed,_0x4dcf3d){return client[_0x6d4b('0x8')](_0x20f52a,_0x424690)[_0x6d4b('0x9')](function(_0xb2567b){logger[_0x6d4b('0xa')]('Attachment,\x20%s,\x20%s',_0x42a52a,_0x6d4b('0xb'));logger[_0x6d4b('0xc')](_0x6d4b('0xd'),_0x42a52a,_0x6d4b('0xb'),JSON[_0x6d4b('0xe')](_0xb2567b));if(_0xb2567b[_0x6d4b('0xf')]){if(_0xb2567b[_0x6d4b('0xf')]['code']===0x1f4){logger[_0x6d4b('0xf')](_0x6d4b('0x10'),_0x42a52a,_0xb2567b[_0x6d4b('0xf')]['message']);return _0x4dcf3d(_0xb2567b[_0x6d4b('0xf')][_0x6d4b('0x11')]);}logger[_0x6d4b('0xf')](_0x6d4b('0x10'),_0x42a52a,_0xb2567b[_0x6d4b('0xf')][_0x6d4b('0x11')]);return _0x262eed(_0xb2567b[_0x6d4b('0xf')][_0x6d4b('0x11')]);}else{logger[_0x6d4b('0xa')](_0x6d4b('0x10'),_0x42a52a,'request\x20sent');_0x262eed(_0xb2567b[_0x6d4b('0x12')]['message']);}})[_0x6d4b('0x13')](function(_0x428b75){logger['error']('Attachment,\x20%s,\x20%s',_0x42a52a,_0x428b75);_0x4dcf3d(_0x428b75);});});}exports[_0x6d4b('0x14')]=function(_0x3a30b2){var _0x318b0f=this;return new Promise(function(_0x2694ba,_0xa2f130){return db[_0x6d4b('0x15')][_0x6d4b('0x16')](_0x3a30b2[_0x6d4b('0x17')],{'raw':_0x3a30b2[_0x6d4b('0x18')]?_0x3a30b2[_0x6d4b('0x18')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x25a1fa){logger[_0x6d4b('0xa')](_0x6d4b('0x14'),_0x3a30b2);logger['debug'](_0x6d4b('0x14'),_0x3a30b2,JSON[_0x6d4b('0xe')](_0x25a1fa));_0x2694ba(_0x25a1fa);})[_0x6d4b('0x13')](function(_0x26b72d){logger['error'](_0x6d4b('0x14'),_0x26b72d[_0x6d4b('0x11')],_0x3a30b2);_0xa2f130(_0x318b0f[_0x6d4b('0xf')](0x1f4,_0x26b72d[_0x6d4b('0x11')]));});});};
\ No newline at end of file
diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js
index 3c9c686..7e1e8b6 100644
--- a/server/api/attachment/index.js
+++ b/server/api/attachment/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f66=['fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','/:id/clone','clone','diskStorage','root','format','%s-%s','now','originalname','replace','post','single','file','create','delete','destroy','exports','util','connect-timeout','express','Router'];(function(_0x376db5,_0x2b8874){var _0x304c17=function(_0x2dd9ba){while(--_0x2dd9ba){_0x376db5['push'](_0x376db5['shift']());}};_0x304c17(++_0x2b8874);}(_0x5f66,0x1a0));var _0x65f6=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x5f66[_0x4243a3];return _0x1b2a33;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./attachment.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['download']);router['post'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);var upload=multer({'storage':multer[_0x65f6('0xe')]({'destination':function(_0x50d26d,_0x41a7fd,_0x571436){_0x571436(null,path['join'](config[_0x65f6('0xf')],'server/files/attachments/'));},'filename':function(_0x419819,_0x4862a5,_0x2f964a){_0x2f964a(null,util[_0x65f6('0x10')](_0x65f6('0x11'),Date[_0x65f6('0x12')](),_0x4862a5[_0x65f6('0x13')][_0x65f6('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x65f6('0x15')]('/',upload[_0x65f6('0x16')](_0x65f6('0x17')),controller[_0x65f6('0x18')]);router['put'](_0x65f6('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x65f6('0x19')](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x1a')]);module[_0x65f6('0x1b')]=router;
\ No newline at end of file
+var _0x5f66=['fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','/:id/clone','clone','diskStorage','root','format','%s-%s','now','originalname','replace','post','single','file','create','delete','destroy','exports','util','connect-timeout','express','Router'];(function(_0x3d4876,_0x366386){var _0x58ca9d=function(_0x5bd045){while(--_0x5bd045){_0x3d4876['push'](_0x3d4876['shift']());}};_0x58ca9d(++_0x366386);}(_0x5f66,0x1a0));var _0x65f6=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x5f66[_0x4243a3];return _0x1b2a33;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./attachment.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['download']);router['post'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);var upload=multer({'storage':multer[_0x65f6('0xe')]({'destination':function(_0x50d26d,_0x41a7fd,_0x571436){_0x571436(null,path['join'](config[_0x65f6('0xf')],'server/files/attachments/'));},'filename':function(_0x419819,_0x4862a5,_0x2f964a){_0x2f964a(null,util[_0x65f6('0x10')](_0x65f6('0x11'),Date[_0x65f6('0x12')](),_0x4862a5[_0x65f6('0x13')][_0x65f6('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x65f6('0x15')]('/',upload[_0x65f6('0x16')](_0x65f6('0x17')),controller[_0x65f6('0x18')]);router['put'](_0x65f6('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x65f6('0x19')](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x1a')]);module[_0x65f6('0x1b')]=router;
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/authActiveDirectory.controller.js b/server/api/authActiveDirectory/authActiveDirectory.controller.js
index 5c47f7a..cadf036 100644
--- a/server/api/authActiveDirectory/authActiveDirectory.controller.js
+++ b/server/api/authActiveDirectory/authActiveDirectory.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa391=['bluebird','../../mysqldb','../../components/auth/service','../../config/utils','activedirectory','baseDN','url','domain','error','Error\x20authenticate\x20%s:\x20%s','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','Setting','adSsoEnabled','blockDuration','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','findOne','password','salt','disabled','blocked','blockedAt','online','admin','user','agent','name','add','minutes','clearBlockUser','getLicense','catch','status','login','authenticate','Something\x20went\x20wrong,\x20please\x20try\x20again.','role','json','ad-login','User','passport-local','moment','activedirectory2'];(function(_0x5d6046,_0x12e649){var _0x5de9d5=function(_0x1a6045){while(--_0x1a6045){_0x5d6046['push'](_0x5d6046['shift']());}};_0x5de9d5(++_0x12e649);}(_0xa391,0x138));var _0x1a39=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0xa391[_0x1d1779];return _0x2377e9;};'use strict';var passport=require('passport');var LocalStrategy=require(_0x1a39('0x0'))['Strategy'];var moment=require(_0x1a39('0x1'));var ActiveDirectory=require(_0x1a39('0x2'));var BPromise=require(_0x1a39('0x3'));var util=require('util');var db=require(_0x1a39('0x4'))['db'];var authService=require(_0x1a39('0x5'));var utils=require(_0x1a39('0x6'));var config=require('../../config/environment');var logger=require('../../config/logger')('api');function isActiveDirectoryConfigured(_0x177375){var _0x4240ce=![];if(typeof _0x177375[_0x1a39('0x7')]!=='undefined'){_0x4240ce=_0x177375[_0x1a39('0x7')][_0x1a39('0x8')]&&_0x177375[_0x1a39('0x7')][_0x1a39('0x9')]&&_0x177375[_0x1a39('0x7')][_0x1a39('0xa')];}return _0x4240ce;}function adAuthenticate(_0x1cb66f,_0x30d2d5,_0x411e36){return new BPromise(function(_0x301673,_0xedd5fe){try{var _0x4d8b99=new ActiveDirectory(_0x1cb66f);_0x4d8b99['authenticate'](_0x30d2d5,_0x411e36,function(_0xf8a776,_0x3910b2){if(_0xf8a776){logger[_0x1a39('0xb')](_0x1a39('0xc'),_0x30d2d5,util['inspect'](_0xf8a776,{'showHidden':![],'depth':null}));_0xedd5fe('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(!_0x3910b2){logger[_0x1a39('0xb')](_0x1a39('0xd'),_0x30d2d5);_0xedd5fe(_0x1a39('0xe'));}else{_0x301673(_0x3910b2);}});}catch(_0x4abc8c){_0xedd5fe(_0x4abc8c);}});}function ActiveDirectoryAuthenticate(_0x15e573,_0x1f7641,_0x5a7858,_0x4c33e2){var _0x37c323,_0x538343;if(!isActiveDirectoryConfigured(config)){logger[_0x1a39('0xb')](_0x1a39('0xf'),_0x1f7641);return _0x4c33e2(null,![],{'message':_0x1a39('0xe')});}return db[_0x1a39('0x10')]['findOne']({'where':{'id':0x1},'attributes':[_0x1a39('0x11'),_0x1a39('0x12')],'raw':!![]})[_0x1a39('0x13')](function(_0x16703c){_0x37c323=_0x16703c;if(!_0x37c323[_0x1a39('0x11')]){logger[_0x1a39('0xb')](_0x1a39('0x14'),_0x1f7641);throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return _0x15e573[_0x1a39('0x15')]({'attributes':['id','name',_0x1a39('0x16'),_0x1a39('0x17'),'role',_0x1a39('0x18'),_0x1a39('0x19'),_0x1a39('0x1a'),_0x1a39('0x1b')],'where':{'name':_0x1f7641,'role':{'$or':[_0x1a39('0x1c'),_0x1a39('0x1d'),_0x1a39('0x1e')]},'adSsoEnabled':!![]}});})[_0x1a39('0x13')](function(_0x3a0d9b){if(!_0x3a0d9b||_0x3a0d9b&&_0x3a0d9b[_0x1a39('0x1f')]!==_0x1f7641){throw new Error(_0x1a39('0xe'));}_0x538343=_0x3a0d9b;var _0x54802d=_0x538343[_0x1a39('0x1f')]+'@'+config[_0x1a39('0x7')][_0x1a39('0xa')];return adAuthenticate(config[_0x1a39('0x7')],_0x54802d,_0x5a7858);})[_0x1a39('0x13')](function(_0x49d5f7){if(_0x538343['disabled']){throw new Error(_0x1a39('0xe'));}if(_0x37c323[_0x1a39('0x12')]>0x0){if(_0x538343[_0x1a39('0x19')]){if(moment(_0x538343[_0x1a39('0x1a')])[_0x1a39('0x20')](_0x37c323[_0x1a39('0x12')],_0x1a39('0x21'))>moment()){throw new Error(_0x1a39('0xe'));}return utils[_0x1a39('0x22')](_0x538343,0x0,![],null)[_0x1a39('0x13')](function(){return utils[_0x1a39('0x23')](_0x538343);})[_0x1a39('0x13')](function(){return _0x4c33e2(null,_0x538343);});}else{return utils[_0x1a39('0x23')](_0x538343)[_0x1a39('0x13')](function(){return _0x4c33e2(null,_0x538343);});}}else{return utils[_0x1a39('0x23')](_0x538343)[_0x1a39('0x13')](function(){return _0x4c33e2(null,_0x538343);});}})[_0x1a39('0x24')](function(_0x4c7ec7){return _0x4c33e2(null,![],_0x4c7ec7);});}function handleError(_0x3ef016,_0xc05151,_0x23fed5){return _0x3ef016[_0x1a39('0x25')](_0xc05151||0x1f4)['send']({'message':_0x23fed5?_0x23fed5['message']||_0x23fed5:''});}exports[_0x1a39('0x26')]=function(_0x5f549c,_0x5ddc8d,_0x34b345){passport[_0x1a39('0x27')]('ad-login',function(_0x134b36,_0xc0bee5,_0x2f67ec){var _0x423fd7=_0x134b36||_0x2f67ec;if(_0x423fd7){return handleError(_0x5ddc8d,0x191,_0x423fd7);}if(!_0xc0bee5){return handleError(_0x5ddc8d,0x194,{'message':_0x1a39('0x28')});}else{var _0x5c909a={'payload':{'id':_0xc0bee5['id'],'role':_0xc0bee5[_0x1a39('0x29')]},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x5c909a)[_0x1a39('0x13')](function(_0x100947){_0x5ddc8d[_0x1a39('0x2a')]({'id':_0xc0bee5['id'],'token':_0x100947,'statusCall':'','isAlreadyLogged':_0xc0bee5[_0x1a39('0x1b')]});});}})(_0x5f549c,_0x5ddc8d,_0x34b345);};passport['use'](_0x1a39('0x2b'),new LocalStrategy({'usernameField':_0x1a39('0x1f'),'passwordField':_0x1a39('0x16')},function(_0x167245,_0x5dc0ea,_0x1fafe4){return ActiveDirectoryAuthenticate(db[_0x1a39('0x2c')],_0x167245,_0x5dc0ea,_0x1fafe4);}));
\ No newline at end of file
+var _0x090a=['blockDuration','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','role','disabled','online','agent','then','blocked','blockedAt','add','minutes','clearBlockUser','getLicense','status','send','message','login','ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','User','passport','passport-local','moment','activedirectory2','../../mysqldb','../../config/utils','../../config/environment','../../config/logger','api','activedirectory','undefined','baseDN','url','domain','authenticate','error','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Setting','findOne','adSsoEnabled'];(function(_0x132a14,_0x5a972f){var _0x3e992d=function(_0x25eefc){while(--_0x25eefc){_0x132a14['push'](_0x132a14['shift']());}};_0x3e992d(++_0x5a972f);}(_0x090a,0x133));var _0xa090=function(_0x3b5d32,_0x40f648){_0x3b5d32=_0x3b5d32-0x0;var _0x25c168=_0x090a[_0x3b5d32];return _0x25c168;};'use strict';var passport=require(_0xa090('0x0'));var LocalStrategy=require(_0xa090('0x1'))['Strategy'];var moment=require(_0xa090('0x2'));var ActiveDirectory=require(_0xa090('0x3'));var BPromise=require('bluebird');var util=require('util');var db=require(_0xa090('0x4'))['db'];var authService=require('../../components/auth/service');var utils=require(_0xa090('0x5'));var config=require(_0xa090('0x6'));var logger=require(_0xa090('0x7'))(_0xa090('0x8'));function isActiveDirectoryConfigured(_0x13af30){var _0x184924=![];if(typeof _0x13af30[_0xa090('0x9')]!==_0xa090('0xa')){_0x184924=_0x13af30[_0xa090('0x9')][_0xa090('0xb')]&&_0x13af30[_0xa090('0x9')][_0xa090('0xc')]&&_0x13af30[_0xa090('0x9')][_0xa090('0xd')];}return _0x184924;}function adAuthenticate(_0x4359a9,_0x2f2315,_0x591b4c){return new BPromise(function(_0x2a9856,_0x497a0f){try{var _0x23f5cf=new ActiveDirectory(_0x4359a9);_0x23f5cf[_0xa090('0xe')](_0x2f2315,_0x591b4c,function(_0x5c1b0b,_0x345176){if(_0x5c1b0b){logger[_0xa090('0xf')](_0xa090('0x10'),_0x2f2315,util[_0xa090('0x11')](_0x5c1b0b,{'showHidden':![],'depth':null}));_0x497a0f(_0xa090('0x12'));}else if(!_0x345176){logger[_0xa090('0xf')]('Error\x20authenticate\x20%s:\x20Wrong\x20credentials',_0x2f2315);_0x497a0f(_0xa090('0x12'));}else{_0x2a9856(_0x345176);}});}catch(_0x26d9c7){_0x497a0f(_0x26d9c7);}});}function ActiveDirectoryAuthenticate(_0x1407d3,_0x25601e,_0x41f33e,_0x373680){var _0xe1f5c9,_0x297e21;if(!isActiveDirectoryConfigured(config)){logger[_0xa090('0xf')]('Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured',_0x25601e);return _0x373680(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}return db[_0xa090('0x13')][_0xa090('0x14')]({'where':{'id':0x1},'attributes':[_0xa090('0x15'),_0xa090('0x16')],'raw':!![]})['then'](function(_0x2ad993){_0xe1f5c9=_0x2ad993;if(!_0xe1f5c9[_0xa090('0x15')]){logger[_0xa090('0xf')](_0xa090('0x17'),_0x25601e);throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return _0x1407d3['findOne']({'attributes':['id',_0xa090('0x18'),_0xa090('0x19'),_0xa090('0x1a'),_0xa090('0x1b'),_0xa090('0x1c'),'blocked','blockedAt',_0xa090('0x1d')],'where':{'name':_0x25601e,'role':{'$or':['admin','user',_0xa090('0x1e')]},'adSsoEnabled':!![]}});})[_0xa090('0x1f')](function(_0x2f68c6){if(!_0x2f68c6||_0x2f68c6&&_0x2f68c6[_0xa090('0x18')]!==_0x25601e){throw new Error(_0xa090('0x12'));}_0x297e21=_0x2f68c6;var _0x21b430=_0x297e21[_0xa090('0x18')]+'@'+config[_0xa090('0x9')][_0xa090('0xd')];return adAuthenticate(config[_0xa090('0x9')],_0x21b430,_0x41f33e);})[_0xa090('0x1f')](function(_0x1381e8){if(_0x297e21[_0xa090('0x1c')]){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}if(_0xe1f5c9['blockDuration']>0x0){if(_0x297e21[_0xa090('0x20')]){if(moment(_0x297e21[_0xa090('0x21')])[_0xa090('0x22')](_0xe1f5c9[_0xa090('0x16')],_0xa090('0x23'))>moment()){throw new Error(_0xa090('0x12'));}return utils[_0xa090('0x24')](_0x297e21,0x0,![],null)[_0xa090('0x1f')](function(){return utils[_0xa090('0x25')](_0x297e21);})[_0xa090('0x1f')](function(){return _0x373680(null,_0x297e21);});}else{return utils[_0xa090('0x25')](_0x297e21)[_0xa090('0x1f')](function(){return _0x373680(null,_0x297e21);});}}else{return utils[_0xa090('0x25')](_0x297e21)[_0xa090('0x1f')](function(){return _0x373680(null,_0x297e21);});}})['catch'](function(_0xae6cc1){return _0x373680(null,![],_0xae6cc1);});}function handleError(_0x3e69f8,_0x23286f,_0x2e18d6){return _0x3e69f8[_0xa090('0x26')](_0x23286f||0x1f4)[_0xa090('0x27')]({'message':_0x2e18d6?_0x2e18d6[_0xa090('0x28')]||_0x2e18d6:''});}exports[_0xa090('0x29')]=function(_0x284640,_0x2861bb,_0x53201a){passport['authenticate'](_0xa090('0x2a'),function(_0x130274,_0x2bfcd9,_0x439314){var _0x32768=_0x130274||_0x439314;if(_0x32768){return handleError(_0x2861bb,0x191,_0x32768);}if(!_0x2bfcd9){return handleError(_0x2861bb,0x194,{'message':_0xa090('0x2b')});}else{var _0x322f75={'payload':{'id':_0x2bfcd9['id'],'role':_0x2bfcd9[_0xa090('0x1b')]},'options':{'expiresIn':0x15180}};return authService[_0xa090('0x2c')](_0x322f75)[_0xa090('0x1f')](function(_0x11f1a2){_0x2861bb[_0xa090('0x2d')]({'id':_0x2bfcd9['id'],'token':_0x11f1a2,'statusCall':'','isAlreadyLogged':_0x2bfcd9[_0xa090('0x1d')]});});}})(_0x284640,_0x2861bb,_0x53201a);};passport['use'](_0xa090('0x2a'),new LocalStrategy({'usernameField':'name','passwordField':_0xa090('0x19')},function(_0x2d69be,_0x42836a,_0x50ed38){return ActiveDirectoryAuthenticate(db[_0xa090('0x2e')],_0x2d69be,_0x42836a,_0x50ed38);}));
\ No newline at end of file
diff --git a/server/api/authActiveDirectory/index.js b/server/api/authActiveDirectory/index.js
index 6dad782..e4d8931 100644
--- a/server/api/authActiveDirectory/index.js
+++ b/server/api/authActiveDirectory/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x38c3=['Router','./authActiveDirectory.controller','post','exports'];(function(_0x53dbbb,_0x302838){var _0x6c293c=function(_0x37e675){while(--_0x37e675){_0x53dbbb['push'](_0x53dbbb['shift']());}};_0x6c293c(++_0x302838);}(_0x38c3,0x94));var _0x338c=function(_0x39d518,_0x32b600){_0x39d518=_0x39d518-0x0;var _0x2feade=_0x38c3[_0x39d518];return _0x2feade;};'use strict';var express=require('express');var router=express[_0x338c('0x0')]();var controller=require(_0x338c('0x1'));router[_0x338c('0x2')]('/',controller['login']);module[_0x338c('0x3')]=router;
\ No newline at end of file
+var _0x4d44=['express','post','login'];(function(_0x2d17dc,_0x3102c1){var _0x234bba=function(_0x214a62){while(--_0x214a62){_0x2d17dc['push'](_0x2d17dc['shift']());}};_0x234bba(++_0x3102c1);}(_0x4d44,0x162));var _0x44d4=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x4d44[_0x40a045];return _0x1a687c;};'use strict';var express=require(_0x44d4('0x0'));var router=express['Router']();var controller=require('./authActiveDirectory.controller');router[_0x44d4('0x1')]('/',controller[_0x44d4('0x2')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js
index 4c1cc06..efabe06 100644
--- a/server/api/authGoogle/authGoogle.controller.js
+++ b/server/api/authGoogle/authGoogle.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['blockedAt','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','moment','../../mysqldb','../../config/utils','login','authenticate','google','/login','email','use','secret','callbackURL','findOne','allowedLoginAttempts','blockDuration','then','User','find','map','value','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'];(function(_0x36eaaa,_0x326732){var _0x461349=function(_0x4e4180){while(--_0x4e4180){_0x36eaaa['push'](_0x36eaaa['shift']());}};_0x461349(++_0x326732);}(_0x7a54,0x106));var _0x47a5=function(_0x3f5cc6,_0x499845){_0x3f5cc6=_0x3f5cc6-0x0;var _0x4a2052=_0x7a54[_0x3f5cc6];return _0x4a2052;};'use strict';var _=require(_0x47a5('0x0'));var passport=require(_0x47a5('0x1'));var GoogleStrategy=require(_0x47a5('0x2'))['Strategy'];var moment=require(_0x47a5('0x3'));var db=require(_0x47a5('0x4'))['db'];var config=require('../../config/environment');var utils=require(_0x47a5('0x5'));exports[_0x47a5('0x6')]=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':_0x47a5('0x9'),'scope':['profile',_0x47a5('0xa')],'session':![]});exports['callback']=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':'/login','session':![]});passport[_0x47a5('0xb')](new GoogleStrategy({'clientID':config['google']?config['google']['clientID']:'id','clientSecret':config[_0x47a5('0x8')]?config[_0x47a5('0x8')]['clientSecret']:_0x47a5('0xc'),'callbackURL':config['google']?config['google'][_0x47a5('0xd')]:''},function(_0x69e4d4,_0x2f399b,_0x250fad,_0xd612dd){var _0xd308b8,_0x1eae59;return db['Setting'][_0x47a5('0xe')]({'where':{'id':0x1},'attributes':[_0x47a5('0xf'),_0x47a5('0x10')],'raw':!![]})[_0x47a5('0x11')](function(_0x139f25){_0xd308b8=_0x139f25;return db[_0x47a5('0x12')][_0x47a5('0x13')]({'where':{'email':_[_0x47a5('0x14')](_0x250fad['emails'],_0x47a5('0x15')),'role':{'$or':[_0x47a5('0x16'),_0x47a5('0x17'),_0x47a5('0x18')]}}});})[_0x47a5('0x11')](function(_0x574af6){_0x1eae59=_0x574af6;if(_0x1eae59){if(_0x1eae59['disabled']){return _0xd612dd(_0x47a5('0x19'));}else if(_0xd308b8['blockDuration']>0x0){if(_0x1eae59['blocked']){if(moment(_0x1eae59[_0x47a5('0x1a')])[_0x47a5('0x1b')](_0xd308b8[_0x47a5('0x10')],_0x47a5('0x1c'))>moment()){return _0xd612dd(_0x47a5('0x19'));}else{return utils[_0x47a5('0x1d')](_0x1eae59,0x0,![],null)[_0x47a5('0x11')](function(){return utils[_0x47a5('0x1e')](_0x1eae59);})[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils['getLicense'](_0x1eae59)[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils[_0x47a5('0x1e')](_0x1eae59)['then'](function(){return _0xd612dd(null,_0x1eae59);});}}return _0xd612dd(_0x47a5('0x19'));})[_0x47a5('0x1f')](function(_0x36874d){_0xd612dd(_0x36874d);});}));
\ No newline at end of file
+var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x5f2368,_0x29c539){var _0x11d9a3=function(_0x2c5363){while(--_0x2c5363){_0x5f2368['push'](_0x5f2368['shift']());}};_0x11d9a3(++_0x29c539);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});}));
\ No newline at end of file
diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js
index bbdfd63..5d1f9df 100644
--- a/server/api/authGoogle/index.js
+++ b/server/api/authGoogle/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x96b7=['../../components/auth/service','login','get','callback','exports','express','passport','Router','./authGoogle.controller'];(function(_0x166e96,_0x55191d){var _0x553d73=function(_0x586142){while(--_0x586142){_0x166e96['push'](_0x166e96['shift']());}};_0x553d73(++_0x55191d);}(_0x96b7,0x149));var _0x796b=function(_0x3984a6,_0x4adaba){_0x3984a6=_0x3984a6-0x0;var _0x2cc75f=_0x96b7[_0x3984a6];return _0x2cc75f;};'use strict';var express=require(_0x796b('0x0'));var passport=require(_0x796b('0x1'));var router=express[_0x796b('0x2')]();var controller=require(_0x796b('0x3'));var userController=require('../user/user.controller.js');var authService=require(_0x796b('0x4'));router['get']('/',controller[_0x796b('0x5')]);router[_0x796b('0x6')]('/callback',controller[_0x796b('0x7')],authService['isMiddleware'],userController['login'],authService['setTokenCookie']);module[_0x796b('0x8')]=router;
\ No newline at end of file
+var _0x34ab=['exports','express','passport','Router','./authGoogle.controller','get','/callback','callback','login','setTokenCookie'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x34ab,0xf1));var _0xb34a=function(_0xe1b5f6,_0x210c09){_0xe1b5f6=_0xe1b5f6-0x0;var _0x44636e=_0x34ab[_0xe1b5f6];return _0x44636e;};'use strict';var express=require(_0xb34a('0x0'));var passport=require(_0xb34a('0x1'));var router=express[_0xb34a('0x2')]();var controller=require(_0xb34a('0x3'));var userController=require('../user/user.controller.js');var authService=require('../../components/auth/service');router[_0xb34a('0x4')]('/',controller['login']);router[_0xb34a('0x4')](_0xb34a('0x5'),controller[_0xb34a('0x6')],authService['isMiddleware'],userController[_0xb34a('0x7')],authService[_0xb34a('0x8')]);module[_0xb34a('0x9')]=router;
\ No newline at end of file
diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js
index 5ee4e20..01c40e3 100644
--- a/server/api/authLocal/authLocal.controller.js
+++ b/server/api/authLocal/authLocal.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xffc2=['MailAccount','find','MailServerOut','Smtp','CloudProvider','getSmtpOptions','merge','format','email','user','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','error','message','stringify','send','login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','forgot','body','Email\x20parameter\x20is\x20missing','trim','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','https://','headers','host','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','status','Reset\x20Email\x20sent!','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','enforcePasswordHistory','passwordHistoryLimit','securePassword','previousPasswords','validatePasswordHistory','Password\x20reset!','util','passport','passport-local','Strategy','jayson/promise','lodash','moment','../../mysqldb','../../config/utils','http','Setting','findOne','blockDuration','then','name','password','salt','role','disabled','blocked','blockedAt','admin','agent','authenticate','loginAttempts','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','allowedLoginAttempts','add','minutes','clearBlockUser','getLicense','catch'];(function(_0x27bcf5,_0x236765){var _0x4ce4cf=function(_0x4864ea){while(--_0x4864ea){_0x27bcf5['push'](_0x27bcf5['shift']());}};_0x4ce4cf(++_0x236765);}(_0xffc2,0x7e));var _0x2ffc=function(_0xc9cd47,_0x35a546){_0xc9cd47=_0xc9cd47-0x0;var _0x26827e=_0xffc2[_0xc9cd47];return _0x26827e;};'use strict';var util=require(_0x2ffc('0x0'));var passport=require(_0x2ffc('0x1'));var LocalStrategy=require(_0x2ffc('0x2'))[_0x2ffc('0x3')];var jayson=require(_0x2ffc('0x4'));var _=require(_0x2ffc('0x5'));var rs=require('randomstring');var moment=require(_0x2ffc('0x6'));var db=require(_0x2ffc('0x7'))['db'];var authService=require('../../components/auth/service');var utils=require(_0x2ffc('0x8'));var client=jayson['client'][_0x2ffc('0x9')]({'port':0x232b});function localAuthenticate(_0x5c5117,_0x397b9f,_0x3bce48,_0x4c9028){var _0x4939d5,_0xde2b5f;return db[_0x2ffc('0xa')][_0x2ffc('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x2ffc('0xc')],'raw':!![]})[_0x2ffc('0xd')](function(_0x465458){_0x4939d5=_0x465458;return _0x5c5117[_0x2ffc('0xb')]({'attributes':['id',_0x2ffc('0xe'),_0x2ffc('0xf'),_0x2ffc('0x10'),_0x2ffc('0x11'),_0x2ffc('0x12'),_0x2ffc('0x13'),_0x2ffc('0x14'),'loginAttempts'],'where':{'name':_0x397b9f,'role':{'$or':[_0x2ffc('0x15'),'user',_0x2ffc('0x16')]}}});})['then'](function(_0xefa6a3){if(!_0xefa6a3||_0xefa6a3&&_0xefa6a3[_0x2ffc('0xe')]!==_0x397b9f){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0xde2b5f=_0xefa6a3;return _0xde2b5f;}})['then'](function(){_0xde2b5f[_0x2ffc('0x17')](_0x3bce48,function(_0x3f65da,_0x447f5d){var _0x3bce4c=_0xde2b5f[_0x2ffc('0x18')]+0x1;if(_0x3f65da){return _0x4c9028(_0x3f65da);}else if(!_0x447f5d){if(_0xde2b5f[_0x2ffc('0x12')]){return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});}else if(_0x4939d5[_0x2ffc('0x1a')]>0x0){if(_0xde2b5f[_0x2ffc('0x13')]){if(_0x4939d5[_0x2ffc('0xc')]>0x0){if(moment(_0xde2b5f[_0x2ffc('0x14')])[_0x2ffc('0x1b')](_0x4939d5['blockDuration'],_0x2ffc('0x1c'))>moment()){return _0x4c9028(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x2ffc('0x1d')](_0xde2b5f,_0x3bce4c,![],null)[_0x2ffc('0xd')](function(){return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});});}}else{return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});}}else{if(_0x3bce4c>=_0x4939d5[_0x2ffc('0x1a')]){return utils[_0x2ffc('0x1d')](_0xde2b5f,0x0,!![],moment())[_0x2ffc('0xd')](function(){return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});});}else{return utils[_0x2ffc('0x1d')](_0xde2b5f,_0x3bce4c,![],null)[_0x2ffc('0xd')](function(){return _0x4c9028(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});}}else{if(_0xde2b5f['disabled']){return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});}else if(_0x4939d5[_0x2ffc('0x1a')]>0x0){if(_0xde2b5f[_0x2ffc('0x13')]){if(_0x4939d5['blockDuration']>0x0){if(moment(_0xde2b5f[_0x2ffc('0x14')])['add'](_0x4939d5[_0x2ffc('0xc')],_0x2ffc('0x1c'))>moment()){return _0x4c9028(null,![],{'message':_0x2ffc('0x19')});}else{return utils[_0x2ffc('0x1d')](_0xde2b5f,0x0,![],null)[_0x2ffc('0xd')](function(){return utils[_0x2ffc('0x1e')](_0xde2b5f);})['then'](function(){return _0x4c9028(null,_0xde2b5f);});}}else{return _0x4c9028(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils['clearBlockUser'](_0xde2b5f,0x0,![],null)[_0x2ffc('0xd')](function(){return utils[_0x2ffc('0x1e')](_0xde2b5f);})[_0x2ffc('0xd')](function(){return _0x4c9028(null,_0xde2b5f);})[_0x2ffc('0x1f')](function(_0x2ee724){return _0x4c9028(null,![],_0x2ee724);});}}else{if(_0xde2b5f[_0x2ffc('0x13')]){return _0x4c9028(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x2ffc('0x1e')](_0xde2b5f)[_0x2ffc('0xd')](function(){return _0x4c9028(null,_0xde2b5f);});}}}});})[_0x2ffc('0x1f')](function(_0x92c1ee){return _0x4c9028(null,![],_0x92c1ee);});}function sendServiceMail(_0x580a3f){return db[_0x2ffc('0x20')][_0x2ffc('0x21')]({'where':{'service':!![]},'attributes':['id','name','email'],'include':[{'model':db[_0x2ffc('0x22')],'as':_0x2ffc('0x23'),'include':[{'model':db[_0x2ffc('0x24')],'as':'CloudProvider'}]}]})['then'](function(_0x56652e){if(!_0x56652e){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x556abb=_0x56652e[_0x2ffc('0x25')]();var _0x56da0c={'account':_0x556abb,'message':_[_0x2ffc('0x26')]({'from':util[_0x2ffc('0x27')]('\x22%s\x22\x20<%s>',_0x56652e[_0x2ffc('0xe')],_0x56652e[_0x2ffc('0x28')]||_0x56652e['Smtp'][_0x2ffc('0x29')])},_0x580a3f)};return client['request']('SendMail',_0x56da0c);})['then'](function(_0x17b49a){if(_0x17b49a['error']){throw new Error(util[_0x2ffc('0x27')](_0x2ffc('0x2a'),_0x17b49a[_0x2ffc('0x2b')][_0x2ffc('0x2c')]||JSON[_0x2ffc('0x2d')](_0x17b49a[_0x2ffc('0x2b')])));}return!![];});}function handleError(_0x4824ba,_0x57c74d,_0x11f591){return _0x4824ba['status'](_0x57c74d||0x1f4)[_0x2ffc('0x2e')]({'message':_0x11f591?_0x11f591[_0x2ffc('0x2c')]||_0x11f591:''});}exports[_0x2ffc('0x2f')]=function(_0x1f7c09,_0x4659cd,_0x1df542){passport[_0x2ffc('0x17')]('local-login',function(_0x4d89a0,_0x5f56a6,_0x138bf7){var _0x45fa59=_0x4d89a0||_0x138bf7;if(_0x45fa59){return handleError(_0x4659cd,0x191,_0x45fa59);}if(!_0x5f56a6){return handleError(_0x4659cd,0x194,{'message':_0x2ffc('0x30')});}else{var _0x16ed3f={'payload':{'id':_0x5f56a6['id'],'role':_0x5f56a6[_0x2ffc('0x11')]},'options':{'expiresIn':0x15180}};return authService[_0x2ffc('0x31')](_0x16ed3f)[_0x2ffc('0xd')](function(_0x4e48b7){_0x4659cd['json']({'id':_0x5f56a6['id'],'token':_0x4e48b7,'statusCall':'','isAlreadyLogged':_0x5f56a6['online']});});}})(_0x1f7c09,_0x4659cd,_0x1df542);};exports[_0x2ffc('0x32')]=function(_0x438b9c,_0x4b861a){if(!_0x438b9c[_0x2ffc('0x33')]['email']){return handleError(_0x4b861a,0x1f4,{'message':_0x2ffc('0x34')});}var _0x2fcc0e=rs['generate']();_0x438b9c[_0x2ffc('0x33')][_0x2ffc('0x28')]=_0x438b9c[_0x2ffc('0x33')][_0x2ffc('0x28')][_0x2ffc('0x35')]()[_0x2ffc('0x36')]();var _0x32a03e;return db[_0x2ffc('0xa')]['findOne']({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x2ffc('0xc')],'raw':!![]})[_0x2ffc('0xd')](function(_0x59daf4){_0x32a03e=_0x59daf4;return db[_0x2ffc('0x37')][_0x2ffc('0x21')]({'where':{'email':_0x438b9c['body'][_0x2ffc('0x28')]}});})['then'](function(_0x43907c){if(!_0x43907c){throw new Error(_0x2ffc('0x38'));}if(_0x43907c['disabled']){throw new Error(_0x2ffc('0x39'));}if(_0x43907c['blocked']){if(moment(_0x43907c[_0x2ffc('0x14')])[_0x2ffc('0x1b')](_0x32a03e[_0x2ffc('0xc')],_0x2ffc('0x1c'))>moment()){throw new Error(_0x2ffc('0x3a'));}else{_0x43907c[_0x2ffc('0x13')]=![];_0x43907c[_0x2ffc('0x14')]=null;}}_0x43907c[_0x2ffc('0x3b')]=_0x2fcc0e;_0x43907c[_0x2ffc('0x3c')]=Date[_0x2ffc('0x3d')]()+0x36ee80;return _0x43907c[_0x2ffc('0x3e')]();})[_0x2ffc('0xd')](function(){return sendServiceMail({'to':_0x438b9c[_0x2ffc('0x33')][_0x2ffc('0x28')],'subject':_0x2ffc('0x3f'),'text':_0x2ffc('0x40')+'Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a'+_0x2ffc('0x41')+_0x438b9c[_0x2ffc('0x42')][_0x2ffc('0x43')]+'/reset/'+_0x2fcc0e+'\x0a\x0a'+_0x2ffc('0x44')});})['then'](function(){_0x4b861a[_0x2ffc('0x45')](0xc8)[_0x2ffc('0x2e')]({'message':_0x2ffc('0x46')});})['catch'](function(_0x83f082){return handleError(_0x4b861a,0x1f4,_0x83f082);});};exports['reset']=function(_0x11c3c6,_0x30eb01){return db[_0x2ffc('0x37')][_0x2ffc('0x21')]({'where':{'resetPasswordToken':_0x11c3c6['params'][_0x2ffc('0x47')],'resetPasswordExpires':{'$gt':Date['now']()}}})['then'](function(_0x31c55b){if(!_0x31c55b){throw new Error(_0x2ffc('0x48'));}return db[_0x2ffc('0xa')][_0x2ffc('0xb')]({'attributes':['id','securePassword',_0x2ffc('0x49'),_0x2ffc('0x4a')]})[_0x2ffc('0xd')](function(_0x101f13){if(_0x101f13[_0x2ffc('0x4b')])authService['validatePasswordPattern'](_0x11c3c6[_0x2ffc('0x33')][_0x2ffc('0xf')]);if(!_0x101f13['enforcePasswordHistory']||!_0x31c55b[_0x2ffc('0x4c')])return _0x31c55b;authService[_0x2ffc('0x4d')](_0x11c3c6['body']['password'],_0x31c55b[_0x2ffc('0x4c')],_0x101f13[_0x2ffc('0x4a')]);return _0x31c55b;})[_0x2ffc('0xd')](function(){_0x31c55b[_0x2ffc('0xf')]=_0x11c3c6[_0x2ffc('0x33')][_0x2ffc('0xf')];_0x31c55b[_0x2ffc('0x3b')]=null;_0x31c55b[_0x2ffc('0x3c')]=null;return _0x31c55b[_0x2ffc('0x3e')]();});})['then'](function(){_0x30eb01[_0x2ffc('0x45')](0xc8)[_0x2ffc('0x2e')]({'message':_0x2ffc('0x4e')});})[_0x2ffc('0x1f')](function(_0xa3bff3){return handleError(_0x30eb01,0x1f4,_0xa3bff3);});};passport['use']('local-login',new LocalStrategy({'usernameField':_0x2ffc('0xe'),'passwordField':_0x2ffc('0xf')},function(_0x4bca2f,_0x1991e6,_0x3c8743){return localAuthenticate(db[_0x2ffc('0x37')],_0x4bca2f,_0x1991e6,_0x3c8743);}));
\ No newline at end of file
+var _0xbd3f=['validatePasswordPattern','previousPasswords','validatePasswordHistory','save','Password\x20reset!','use','util','passport','passport-local','Strategy','jayson/promise','randomstring','moment','../../components/auth/service','client','http','Setting','findOne','blockDuration','then','name','password','salt','role','disabled','blocked','blockedAt','loginAttempts','admin','user','agent','allowedLoginAttempts','add','minutes','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','clearBlockUser','getLicense','catch','MailAccount','find','MailServerOut','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','merge','format','\x22%s\x22\x20<%s>','email','request','SendMail','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','status','send','login','authenticate','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','body','generate','trim','User','resetPasswordToken','resetPasswordExpires','now','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','host','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','reset','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','enforcePasswordHistory','passwordHistoryLimit'];(function(_0x4b964f,_0x688bee){var _0x4a8f98=function(_0x911a0d){while(--_0x911a0d){_0x4b964f['push'](_0x4b964f['shift']());}};_0x4a8f98(++_0x688bee);}(_0xbd3f,0x1ec));var _0xfbd3=function(_0x2c34ff,_0x1e8bee){_0x2c34ff=_0x2c34ff-0x0;var _0x476508=_0xbd3f[_0x2c34ff];return _0x476508;};'use strict';var util=require(_0xfbd3('0x0'));var passport=require(_0xfbd3('0x1'));var LocalStrategy=require(_0xfbd3('0x2'))[_0xfbd3('0x3')];var jayson=require(_0xfbd3('0x4'));var _=require('lodash');var rs=require(_0xfbd3('0x5'));var moment=require(_0xfbd3('0x6'));var db=require('../../mysqldb')['db'];var authService=require(_0xfbd3('0x7'));var utils=require('../../config/utils');var client=jayson[_0xfbd3('0x8')][_0xfbd3('0x9')]({'port':0x232b});function localAuthenticate(_0x1d3dfb,_0x4454ee,_0x47dbd2,_0x1a0d53){var _0x552251,_0x4ef72d;return db[_0xfbd3('0xa')][_0xfbd3('0xb')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0xfbd3('0xc')],'raw':!![]})[_0xfbd3('0xd')](function(_0x4099e7){_0x552251=_0x4099e7;return _0x1d3dfb[_0xfbd3('0xb')]({'attributes':['id',_0xfbd3('0xe'),_0xfbd3('0xf'),_0xfbd3('0x10'),_0xfbd3('0x11'),_0xfbd3('0x12'),_0xfbd3('0x13'),_0xfbd3('0x14'),_0xfbd3('0x15')],'where':{'name':_0x4454ee,'role':{'$or':[_0xfbd3('0x16'),_0xfbd3('0x17'),_0xfbd3('0x18')]}}});})['then'](function(_0x444feb){if(!_0x444feb||_0x444feb&&_0x444feb[_0xfbd3('0xe')]!==_0x4454ee){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x4ef72d=_0x444feb;return _0x4ef72d;}})[_0xfbd3('0xd')](function(){_0x4ef72d['authenticate'](_0x47dbd2,function(_0x2c8788,_0x5d31b7){var _0x960aea=_0x4ef72d[_0xfbd3('0x15')]+0x1;if(_0x2c8788){return _0x1a0d53(_0x2c8788);}else if(!_0x5d31b7){if(_0x4ef72d[_0xfbd3('0x12')]){return _0x1a0d53(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x552251[_0xfbd3('0x19')]>0x0){if(_0x4ef72d[_0xfbd3('0x13')]){if(_0x552251[_0xfbd3('0xc')]>0x0){if(moment(_0x4ef72d[_0xfbd3('0x14')])[_0xfbd3('0x1a')](_0x552251[_0xfbd3('0xc')],_0xfbd3('0x1b'))>moment()){return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});}else{return utils[_0xfbd3('0x1d')](_0x4ef72d,_0x960aea,![],null)['then'](function(){return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});});}}else{return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});}}else{if(_0x960aea>=_0x552251[_0xfbd3('0x19')]){return utils['clearBlockUser'](_0x4ef72d,0x0,!![],moment())[_0xfbd3('0xd')](function(){return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});});}else{return utils[_0xfbd3('0x1d')](_0x4ef72d,_0x960aea,![],null)[_0xfbd3('0xd')](function(){return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});});}}}else{return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});}}else{if(_0x4ef72d[_0xfbd3('0x12')]){return _0x1a0d53(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x552251[_0xfbd3('0x19')]>0x0){if(_0x4ef72d[_0xfbd3('0x13')]){if(_0x552251[_0xfbd3('0xc')]>0x0){if(moment(_0x4ef72d[_0xfbd3('0x14')])[_0xfbd3('0x1a')](_0x552251[_0xfbd3('0xc')],_0xfbd3('0x1b'))>moment()){return _0x1a0d53(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils['clearBlockUser'](_0x4ef72d,0x0,![],null)[_0xfbd3('0xd')](function(){return utils[_0xfbd3('0x1e')](_0x4ef72d);})[_0xfbd3('0xd')](function(){return _0x1a0d53(null,_0x4ef72d);});}}else{return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});}}else{return utils[_0xfbd3('0x1d')](_0x4ef72d,0x0,![],null)['then'](function(){return utils[_0xfbd3('0x1e')](_0x4ef72d);})[_0xfbd3('0xd')](function(){return _0x1a0d53(null,_0x4ef72d);})[_0xfbd3('0x1f')](function(_0x16a1fe){return _0x1a0d53(null,![],_0x16a1fe);});}}else{if(_0x4ef72d[_0xfbd3('0x13')]){return _0x1a0d53(null,![],{'message':_0xfbd3('0x1c')});}else{return utils[_0xfbd3('0x1e')](_0x4ef72d)['then'](function(){return _0x1a0d53(null,_0x4ef72d);});}}}});})[_0xfbd3('0x1f')](function(_0x4a8499){return _0x1a0d53(null,![],_0x4a8499);});}function sendServiceMail(_0x42b1d4){return db[_0xfbd3('0x20')][_0xfbd3('0x21')]({'where':{'service':!![]},'attributes':['id',_0xfbd3('0xe'),'email'],'include':[{'model':db[_0xfbd3('0x22')],'as':'Smtp','include':[{'model':db[_0xfbd3('0x23')],'as':_0xfbd3('0x23')}]}]})[_0xfbd3('0xd')](function(_0x8ebdee){if(!_0x8ebdee){throw new Error(_0xfbd3('0x24'));}var _0x202365=_0x8ebdee[_0xfbd3('0x25')]();var _0x37b33c={'account':_0x202365,'message':_[_0xfbd3('0x26')]({'from':util[_0xfbd3('0x27')](_0xfbd3('0x28'),_0x8ebdee['name'],_0x8ebdee[_0xfbd3('0x29')]||_0x8ebdee['Smtp'][_0xfbd3('0x17')])},_0x42b1d4)};return client[_0xfbd3('0x2a')](_0xfbd3('0x2b'),_0x37b33c);})[_0xfbd3('0xd')](function(_0x324628){if(_0x324628[_0xfbd3('0x2c')]){throw new Error(util['format'](_0xfbd3('0x2d'),_0x324628[_0xfbd3('0x2c')][_0xfbd3('0x2e')]||JSON[_0xfbd3('0x2f')](_0x324628[_0xfbd3('0x2c')])));}return!![];});}function handleError(_0x1691b8,_0x39acca,_0x37472a){return _0x1691b8[_0xfbd3('0x30')](_0x39acca||0x1f4)[_0xfbd3('0x31')]({'message':_0x37472a?_0x37472a[_0xfbd3('0x2e')]||_0x37472a:''});}exports[_0xfbd3('0x32')]=function(_0x2d6222,_0x339606,_0x10df62){passport[_0xfbd3('0x33')](_0xfbd3('0x34'),function(_0x3fe4ae,_0x47fc68,_0x5c44ee){var _0x1b0dbd=_0x3fe4ae||_0x5c44ee;if(_0x1b0dbd){return handleError(_0x339606,0x191,_0x1b0dbd);}if(!_0x47fc68){return handleError(_0x339606,0x194,{'message':_0xfbd3('0x35')});}else{var _0xe5c927={'payload':{'id':_0x47fc68['id'],'role':_0x47fc68[_0xfbd3('0x11')]},'options':{'expiresIn':0x15180}};return authService[_0xfbd3('0x36')](_0xe5c927)[_0xfbd3('0xd')](function(_0x14bac2){_0x339606['json']({'id':_0x47fc68['id'],'token':_0x14bac2,'statusCall':'','isAlreadyLogged':_0x47fc68['online']});});}})(_0x2d6222,_0x339606,_0x10df62);};exports['forgot']=function(_0x165d9b,_0x2e534e){if(!_0x165d9b[_0xfbd3('0x37')]['email']){return handleError(_0x2e534e,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x3650bb=rs[_0xfbd3('0x38')]();_0x165d9b[_0xfbd3('0x37')][_0xfbd3('0x29')]=_0x165d9b[_0xfbd3('0x37')]['email'][_0xfbd3('0x39')]()['toLowerCase']();var _0x53a027;return db[_0xfbd3('0xa')][_0xfbd3('0xb')]({'where':{'id':0x1},'attributes':[_0xfbd3('0x19'),_0xfbd3('0xc')],'raw':!![]})[_0xfbd3('0xd')](function(_0xf8216){_0x53a027=_0xf8216;return db[_0xfbd3('0x3a')]['find']({'where':{'email':_0x165d9b[_0xfbd3('0x37')][_0xfbd3('0x29')]}});})[_0xfbd3('0xd')](function(_0x25d6ad){if(!_0x25d6ad){throw new Error('This\x20email\x20is\x20not\x20registered.');}if(_0x25d6ad[_0xfbd3('0x12')]){throw new Error('The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.');}if(_0x25d6ad[_0xfbd3('0x13')]){if(moment(_0x25d6ad['blockedAt'])[_0xfbd3('0x1a')](_0x53a027[_0xfbd3('0xc')],_0xfbd3('0x1b'))>moment()){throw new Error('The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.');}else{_0x25d6ad[_0xfbd3('0x13')]=![];_0x25d6ad[_0xfbd3('0x14')]=null;}}_0x25d6ad[_0xfbd3('0x3b')]=_0x3650bb;_0x25d6ad[_0xfbd3('0x3c')]=Date[_0xfbd3('0x3d')]()+0x36ee80;return _0x25d6ad['save']();})['then'](function(){return sendServiceMail({'to':_0x165d9b[_0xfbd3('0x37')][_0xfbd3('0x29')],'subject':_0xfbd3('0x3e'),'text':_0xfbd3('0x3f')+_0xfbd3('0x40')+'https://'+_0x165d9b['headers'][_0xfbd3('0x41')]+_0xfbd3('0x42')+_0x3650bb+'\x0a\x0a'+_0xfbd3('0x43')});})[_0xfbd3('0xd')](function(){_0x2e534e[_0xfbd3('0x30')](0xc8)[_0xfbd3('0x31')]({'message':'Reset\x20Email\x20sent!'});})['catch'](function(_0x9c8e6c){return handleError(_0x2e534e,0x1f4,_0x9c8e6c);});};exports[_0xfbd3('0x44')]=function(_0x4b4e84,_0x1c0510){return db[_0xfbd3('0x3a')][_0xfbd3('0x21')]({'where':{'resetPasswordToken':_0x4b4e84[_0xfbd3('0x45')][_0xfbd3('0x46')],'resetPasswordExpires':{'$gt':Date[_0xfbd3('0x3d')]()}}})[_0xfbd3('0xd')](function(_0x1a94da){if(!_0x1a94da){throw new Error(_0xfbd3('0x47'));}return db[_0xfbd3('0xa')]['findOne']({'attributes':['id',_0xfbd3('0x48'),_0xfbd3('0x49'),_0xfbd3('0x4a')]})[_0xfbd3('0xd')](function(_0x1fca7b){if(_0x1fca7b[_0xfbd3('0x48')])authService[_0xfbd3('0x4b')](_0x4b4e84[_0xfbd3('0x37')][_0xfbd3('0xf')]);if(!_0x1fca7b['enforcePasswordHistory']||!_0x1a94da[_0xfbd3('0x4c')])return _0x1a94da;authService[_0xfbd3('0x4d')](_0x4b4e84[_0xfbd3('0x37')][_0xfbd3('0xf')],_0x1a94da[_0xfbd3('0x4c')],_0x1fca7b[_0xfbd3('0x4a')]);return _0x1a94da;})[_0xfbd3('0xd')](function(){_0x1a94da[_0xfbd3('0xf')]=_0x4b4e84[_0xfbd3('0x37')][_0xfbd3('0xf')];_0x1a94da['resetPasswordToken']=null;_0x1a94da['resetPasswordExpires']=null;return _0x1a94da[_0xfbd3('0x4e')]();});})[_0xfbd3('0xd')](function(){_0x1c0510[_0xfbd3('0x30')](0xc8)[_0xfbd3('0x31')]({'message':_0xfbd3('0x4f')});})['catch'](function(_0x1c8d54){return handleError(_0x1c0510,0x1f4,_0x1c8d54);});};passport[_0xfbd3('0x50')](_0xfbd3('0x34'),new LocalStrategy({'usernameField':_0xfbd3('0xe'),'passwordField':'password'},function(_0x197412,_0x2361cb,_0x481c84){return localAuthenticate(db[_0xfbd3('0x3a')],_0x197412,_0x2361cb,_0x481c84);}));
\ No newline at end of file
diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js
index 3624618..38223e5 100644
--- a/server/api/authLocal/index.js
+++ b/server/api/authLocal/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf398=['Router','./authLocal.controller','login','post','/forgot','/reset/:token','reset','exports','express'];(function(_0x543c51,_0xff0084){var _0x360555=function(_0x2a0801){while(--_0x2a0801){_0x543c51['push'](_0x543c51['shift']());}};_0x360555(++_0xff0084);}(_0xf398,0x170));var _0x8f39=function(_0x56e6f3,_0x21a3c3){_0x56e6f3=_0x56e6f3-0x0;var _0x551fca=_0xf398[_0x56e6f3];return _0x551fca;};'use strict';var express=require(_0x8f39('0x0'));var router=express[_0x8f39('0x1')]();var controller=require(_0x8f39('0x2'));router['post']('/',controller[_0x8f39('0x3')]);router[_0x8f39('0x4')](_0x8f39('0x5'),controller['forgot']);router['post'](_0x8f39('0x6'),controller[_0x8f39('0x7')]);module[_0x8f39('0x8')]=router;
\ No newline at end of file
+var _0xd12e=['/reset/:token','exports','express','./authLocal.controller','post'];(function(_0x354e00,_0xe5e440){var _0x35f342=function(_0x11d5cc){while(--_0x11d5cc){_0x354e00['push'](_0x354e00['shift']());}};_0x35f342(++_0xe5e440);}(_0xd12e,0x179));var _0xed12=function(_0x57c069,_0x1247d2){_0x57c069=_0x57c069-0x0;var _0x290562=_0xd12e[_0x57c069];return _0x290562;};'use strict';var express=require(_0xed12('0x0'));var router=express['Router']();var controller=require(_0xed12('0x1'));router[_0xed12('0x2')]('/',controller['login']);router[_0xed12('0x2')]('/forgot',controller['forgot']);router['post'](_0xed12('0x3'),controller['reset']);module[_0xed12('0x4')]=router;
\ No newline at end of file
diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js
index 9bf1b41..9f14834 100644
--- a/server/api/automation/automation.attributes.js
+++ b/server/api/automation/automation.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x37bf=['STRING','BOOLEAN','INTEGER','exports'];(function(_0x3281b3,_0x52a344){var _0x3adae8=function(_0x3de81b){while(--_0x3de81b){_0x3281b3['push'](_0x3281b3['shift']());}};_0x3adae8(++_0x52a344);}(_0x37bf,0x1c7));var _0xf37b=function(_0x293c3d,_0x201198){_0x293c3d=_0x293c3d-0x0;var _0x1a1ffd=_0x37bf[_0x293c3d];return _0x1a1ffd;};'use strict';var Sequelize=require('sequelize');module[_0xf37b('0x0')]={'name':{'type':Sequelize[_0xf37b('0x1')],'allowNull':![]},'channel':{'type':Sequelize[_0xf37b('0x1')]},'description':{'type':Sequelize['STRING']},'status':{'type':Sequelize[_0xf37b('0x2')],'defaultValue':![]},'timeout':{'type':Sequelize[_0xf37b('0x3')],'defaultValue':0xa}};
\ No newline at end of file
+var _0x77c6=['exports','STRING','BOOLEAN','INTEGER','sequelize'];(function(_0x46884e,_0x6fe685){var _0x4d49b2=function(_0x534335){while(--_0x534335){_0x46884e['push'](_0x46884e['shift']());}};_0x4d49b2(++_0x6fe685);}(_0x77c6,0x13a));var _0x677c=function(_0x3614fc,_0x447f2d){_0x3614fc=_0x3614fc-0x0;var _0x305de3=_0x77c6[_0x3614fc];return _0x305de3;};'use strict';var Sequelize=require(_0x677c('0x0'));module[_0x677c('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'channel':{'type':Sequelize[_0x677c('0x2')]},'description':{'type':Sequelize[_0x677c('0x2')]},'status':{'type':Sequelize[_0x677c('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x677c('0x4')],'defaultValue':0xa}};
\ No newline at end of file
diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js
index d7d39e6..e31e720 100644
--- a/server/api/automation/automation.controller.js
+++ b/server/api/automation/automation.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x6984=['moment','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','update','then','destroy','sendStatus','error','stack','send','map','Automation','rawAttributes','type','key','model','name','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','where','filters','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','params','length','find','create','body','Condition','omit','ids','getConditions','keys','sort','addActions','findOne','Action','getActions','rimraf','fast-json-patch','request-promise'];(function(_0x55d332,_0x549069){var _0x584ba6=function(_0x367e6b){while(--_0x367e6b){_0x55d332['push'](_0x55d332['shift']());}};_0x584ba6(++_0x549069);}(_0x6984,0x9d));var _0x4698=function(_0xfc514d,_0x54c4db){_0xfc514d=_0xfc514d-0x0;var _0x306239=_0x6984[_0xfc514d];return _0x306239;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4698('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4698('0x1'));var rp=require(_0x4698('0x2'));var moment=require(_0x4698('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x4698('0x4'));var util=require(_0x4698('0x5'));var path=require('path');var sox=require(_0x4698('0x6'));var csv=require(_0x4698('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4698('0x8'));var _=require(_0x4698('0x9'));var squel=require(_0x4698('0xa'));var crypto=require(_0x4698('0xb'));var jsforce=require(_0x4698('0xc'));var deskjs=require(_0x4698('0xd'));var toCsv=require(_0x4698('0x7'));var querystring=require(_0x4698('0xe'));var Papa=require('papaparse');var Redis=require(_0x4698('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x4698('0x10'));var as=require(_0x4698('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4698('0x12'))(_0x4698('0x13'));var utils=require(_0x4698('0x14'));var config=require(_0x4698('0x15'));var licenseUtil=require(_0x4698('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1b8f39,_0x1e6d42){_0x1e6d42=_0x1e6d42||0xcc;return function(_0x516400){if(_0x516400){return _0x1b8f39['sendStatus'](_0x1e6d42);}return _0x1b8f39[_0x4698('0x17')](_0x1e6d42)[_0x4698('0x18')]();};}function respondWithResult(_0x4e1de9,_0x405440){_0x405440=_0x405440||0xc8;return function(_0x1a9561){if(_0x1a9561){return _0x4e1de9[_0x4698('0x17')](_0x405440)[_0x4698('0x19')](_0x1a9561);}};}function respondWithFilteredResult(_0x381c9e,_0x7230ae){return function(_0x5181cd){if(_0x5181cd){var _0x360342=typeof _0x7230ae['offset']===_0x4698('0x1a')&&typeof _0x7230ae[_0x4698('0x1b')]===_0x4698('0x1a');var _0x3f85ab=_0x5181cd[_0x4698('0x1c')];var _0x5c7aae=_0x360342?0x0:_0x7230ae[_0x4698('0x1d')];var _0x1d3aa5=_0x360342?_0x5181cd[_0x4698('0x1c')]:_0x7230ae[_0x4698('0x1d')]+_0x7230ae['limit'];var _0x4596b0;if(_0x1d3aa5>=_0x3f85ab){_0x1d3aa5=_0x3f85ab;_0x4596b0=0xc8;}else{_0x4596b0=0xce;}_0x381c9e[_0x4698('0x17')](_0x4596b0);return _0x381c9e[_0x4698('0x1e')](_0x4698('0x1f'),_0x5c7aae+'-'+_0x1d3aa5+'/'+_0x3f85ab)[_0x4698('0x19')](_0x5181cd);}return null;};}function patchUpdates(_0x19f9df){return function(_0x101695){try{jsonpatch['apply'](_0x101695,_0x19f9df,!![]);}catch(_0x38b51a){return BPromise[_0x4698('0x20')](_0x38b51a);}return _0x101695['save']();};}function saveUpdates(_0xd5db26,_0x3b5616){return function(_0x532af6){if(_0x532af6){return _0x532af6[_0x4698('0x21')](_0xd5db26)[_0x4698('0x22')](function(_0x203859){return _0x203859;});}return null;};}function removeEntity(_0x24378a,_0x41935b){return function(_0x1a573f){if(_0x1a573f){return _0x1a573f[_0x4698('0x23')]()[_0x4698('0x22')](function(){_0x24378a[_0x4698('0x17')](0xcc)[_0x4698('0x18')]();});}};}function handleEntityNotFound(_0x157211,_0x105184){return function(_0x1ee308){if(!_0x1ee308){_0x157211[_0x4698('0x24')](0x194);}return _0x1ee308;};}function handleError(_0x4c9d7a,_0x474114){_0x474114=_0x474114||0x1f4;return function(_0x398469){logger[_0x4698('0x25')](_0x398469[_0x4698('0x26')]);if(_0x398469['name']){delete _0x398469['name'];}_0x4c9d7a['status'](_0x474114)[_0x4698('0x27')](_0x398469);};}exports['index']=function(_0x5f4592,_0x4648aa){var _0x44081b={},_0x6791f1={},_0x88a115={'count':0x0,'rows':[]};var _0x2b3ba7=_[_0x4698('0x28')](db[_0x4698('0x29')][_0x4698('0x2a')],function(_0x233abd){return{'name':_0x233abd['fieldName'],'type':_0x233abd[_0x4698('0x2b')][_0x4698('0x2c')]};});_0x6791f1[_0x4698('0x2d')]=_[_0x4698('0x28')](_0x2b3ba7,_0x4698('0x2e'));_0x6791f1[_0x4698('0x2f')]=_['keys'](_0x5f4592[_0x4698('0x2f')]);_0x6791f1['filters']=_[_0x4698('0x30')](_0x6791f1[_0x4698('0x2d')],_0x6791f1[_0x4698('0x2f')]);_0x44081b[_0x4698('0x31')]=_[_0x4698('0x30')](_0x6791f1[_0x4698('0x2d')],qs['fields'](_0x5f4592[_0x4698('0x2f')][_0x4698('0x32')]));_0x44081b[_0x4698('0x31')]=_0x44081b[_0x4698('0x31')]['length']?_0x44081b[_0x4698('0x31')]:_0x6791f1[_0x4698('0x2d')];if(!_0x5f4592[_0x4698('0x2f')][_0x4698('0x33')](_0x4698('0x34'))){_0x44081b[_0x4698('0x1b')]=qs[_0x4698('0x1b')](_0x5f4592[_0x4698('0x2f')]['limit']);_0x44081b['offset']=qs[_0x4698('0x1d')](_0x5f4592['query'][_0x4698('0x1d')]);}_0x44081b[_0x4698('0x35')]=qs['sort'](_0x5f4592['query']['sort']);_0x44081b[_0x4698('0x36')]=qs[_0x4698('0x37')](_[_0x4698('0x38')](_0x5f4592[_0x4698('0x2f')],_0x6791f1[_0x4698('0x37')]),_0x2b3ba7);if(_0x5f4592[_0x4698('0x2f')][_0x4698('0x39')]){_0x44081b[_0x4698('0x36')]=_[_0x4698('0x3a')](_0x44081b['where'],{'$or':_[_0x4698('0x28')](_0x2b3ba7,function(_0x246fa2){if(_0x246fa2[_0x4698('0x2b')]!==_0x4698('0x3b')){var _0x22c972={};_0x22c972[_0x246fa2[_0x4698('0x2e')]]={'$like':'%'+_0x5f4592[_0x4698('0x2f')]['filter']+'%'};return _0x22c972;}})});}_0x44081b=_[_0x4698('0x3a')]({},_0x44081b,_0x5f4592[_0x4698('0x3c')]);var _0x53f9d7={'where':_0x44081b[_0x4698('0x36')]};return db['Automation']['count'](_0x53f9d7)[_0x4698('0x22')](function(_0x19bb7a){_0x88a115[_0x4698('0x1c')]=_0x19bb7a;if(_0x5f4592['query']['includeAll']){_0x44081b[_0x4698('0x3d')]=[{'all':!![]}];}return db[_0x4698('0x29')][_0x4698('0x3e')](_0x44081b);})[_0x4698('0x22')](function(_0x1cd21e){_0x88a115['rows']=_0x1cd21e;return _0x88a115;})['then'](respondWithFilteredResult(_0x4648aa,_0x44081b))[_0x4698('0x3f')](handleError(_0x4648aa,null));};exports[_0x4698('0x40')]=function(_0x240e9a,_0x506c04){var _0x11d718={'raw':![],'where':{'id':_0x240e9a[_0x4698('0x41')]['id']}},_0x5c7fbd={};_0x5c7fbd['model']=_['keys'](db[_0x4698('0x29')][_0x4698('0x2a')]);_0x5c7fbd[_0x4698('0x2f')]=_['keys'](_0x240e9a[_0x4698('0x2f')]);_0x5c7fbd[_0x4698('0x37')]=_[_0x4698('0x30')](_0x5c7fbd[_0x4698('0x2d')],_0x5c7fbd[_0x4698('0x2f')]);_0x11d718['attributes']=_[_0x4698('0x30')](_0x5c7fbd[_0x4698('0x2d')],qs['fields'](_0x240e9a[_0x4698('0x2f')]['fields']));_0x11d718[_0x4698('0x31')]=_0x11d718[_0x4698('0x31')][_0x4698('0x42')]?_0x11d718[_0x4698('0x31')]:_0x5c7fbd[_0x4698('0x2d')];if(_0x240e9a[_0x4698('0x2f')]['includeAll']){_0x11d718[_0x4698('0x3d')]=[{'all':!![]}];}_0x11d718=_[_0x4698('0x3a')]({},_0x11d718,_0x240e9a[_0x4698('0x3c')]);return db['Automation'][_0x4698('0x43')](_0x11d718)[_0x4698('0x22')](handleEntityNotFound(_0x506c04,null))[_0x4698('0x22')](respondWithResult(_0x506c04,null))[_0x4698('0x3f')](handleError(_0x506c04,null));};exports[_0x4698('0x44')]=function(_0x2f773c,_0x1bf35e){return db['Automation'][_0x4698('0x44')](_0x2f773c[_0x4698('0x45')],{})[_0x4698('0x22')](respondWithResult(_0x1bf35e,0xc9))[_0x4698('0x3f')](handleError(_0x1bf35e,null));};exports[_0x4698('0x21')]=function(_0xd761f5,_0x526883){if(_0xd761f5[_0x4698('0x45')]['id']){delete _0xd761f5[_0x4698('0x45')]['id'];}return db[_0x4698('0x29')][_0x4698('0x43')]({'where':{'id':_0xd761f5[_0x4698('0x41')]['id']}})[_0x4698('0x22')](handleEntityNotFound(_0x526883,null))['then'](saveUpdates(_0xd761f5[_0x4698('0x45')],null))[_0x4698('0x22')](respondWithResult(_0x526883,null))['catch'](handleError(_0x526883,null));};exports['destroy']=function(_0x124051,_0x1a286e){return db['Automation'][_0x4698('0x43')]({'where':{'id':_0x124051[_0x4698('0x41')]['id']}})['then'](handleEntityNotFound(_0x1a286e,null))[_0x4698('0x22')](removeEntity(_0x1a286e,null))[_0x4698('0x3f')](handleError(_0x1a286e,null));};exports['addConditions']=function(_0xc9bbcd,_0x5efcb5,_0x130917){return db[_0x4698('0x46')][_0x4698('0x43')]({'where':{'id':_0xc9bbcd['params']['id']}})[_0x4698('0x22')](handleEntityNotFound(_0x5efcb5,null))[_0x4698('0x22')](function(_0xc07ec0){if(_0xc07ec0){return _0xc07ec0['addConditions'](_0xc9bbcd['body']['ids'],_[_0x4698('0x47')](_0xc9bbcd['body'],[_0x4698('0x48'),'id'])||{});}})[_0x4698('0x22')](respondWithResult(_0x5efcb5,null))[_0x4698('0x3f')](handleError(_0x5efcb5,null));};exports[_0x4698('0x49')]=function(_0x90da86,_0x29c41e,_0x64c73c){var _0x4b7354={};var _0x50c732={};var _0x3b0d8b;var _0x1953e9;return db[_0x4698('0x29')]['findOne']({'where':{'id':_0x90da86['params']['id']}})[_0x4698('0x22')](handleEntityNotFound(_0x29c41e,null))['then'](function(_0x25c73f){if(_0x25c73f){_0x3b0d8b=_0x25c73f;_0x50c732['model']=_[_0x4698('0x4a')](db[_0x4698('0x46')][_0x4698('0x2a')]);_0x50c732[_0x4698('0x2f')]=_['keys'](_0x90da86[_0x4698('0x2f')]);_0x50c732[_0x4698('0x37')]=_[_0x4698('0x30')](_0x50c732[_0x4698('0x2d')],_0x50c732[_0x4698('0x2f')]);_0x4b7354['attributes']=_[_0x4698('0x30')](_0x50c732[_0x4698('0x2d')],qs[_0x4698('0x32')](_0x90da86[_0x4698('0x2f')]['fields']));_0x4b7354['attributes']=_0x4b7354[_0x4698('0x31')][_0x4698('0x42')]?_0x4b7354[_0x4698('0x31')]:_0x50c732[_0x4698('0x2d')];_0x4b7354['order']=qs['sort'](_0x90da86['query'][_0x4698('0x4b')]);_0x4b7354['where']=qs[_0x4698('0x37')](_['pick'](_0x90da86['query'],_0x50c732[_0x4698('0x37')]));if(_0x90da86[_0x4698('0x2f')]['filter']){_0x4b7354[_0x4698('0x36')]=_[_0x4698('0x3a')](_0x4b7354[_0x4698('0x36')],{'$or':_[_0x4698('0x28')](_0x4b7354['attributes'],function(_0x34972d){var _0x2a1883={};_0x2a1883[_0x34972d]={'$like':'%'+_0x90da86[_0x4698('0x2f')][_0x4698('0x39')]+'%'};return _0x2a1883;})});}_0x4b7354=_[_0x4698('0x3a')]({},_0x4b7354,_0x90da86[_0x4698('0x3c')]);return _0x3b0d8b[_0x4698('0x49')](_0x4b7354);}})[_0x4698('0x22')](function(_0x4f2e9a){if(_0x4f2e9a){_0x1953e9=_0x4f2e9a['length'];if(!_0x90da86[_0x4698('0x2f')]['hasOwnProperty']('nolimit')){_0x4b7354[_0x4698('0x1b')]=qs['limit'](_0x90da86[_0x4698('0x2f')][_0x4698('0x1b')]);_0x4b7354[_0x4698('0x1d')]=qs[_0x4698('0x1d')](_0x90da86[_0x4698('0x2f')][_0x4698('0x1d')]);}return _0x3b0d8b[_0x4698('0x49')](_0x4b7354);}})[_0x4698('0x22')](function(_0x49140a){if(_0x49140a){return _0x49140a?{'count':_0x1953e9,'rows':_0x49140a}:null;}})[_0x4698('0x22')](respondWithResult(_0x29c41e,null))[_0x4698('0x3f')](handleError(_0x29c41e,null));};exports[_0x4698('0x4c')]=function(_0x591a08,_0x49310d,_0x3d7503){return db['Action'][_0x4698('0x43')]({'where':{'id':_0x591a08['params']['id']}})['then'](handleEntityNotFound(_0x49310d,null))['then'](function(_0x3e7707){if(_0x3e7707){return _0x3e7707[_0x4698('0x4c')](_0x591a08['body'][_0x4698('0x48')],_['omit'](_0x591a08['body'],['ids','id'])||{});}})[_0x4698('0x22')](respondWithResult(_0x49310d,null))[_0x4698('0x3f')](handleError(_0x49310d,null));};exports['getActions']=function(_0x2099c0,_0x3a7137,_0x2f9fdf){var _0x38faa0={};var _0x33a2ab={};var _0x79f6a7;var _0x2d7851;return db[_0x4698('0x29')][_0x4698('0x4d')]({'where':{'id':_0x2099c0[_0x4698('0x41')]['id']}})[_0x4698('0x22')](handleEntityNotFound(_0x3a7137,null))[_0x4698('0x22')](function(_0x104162){if(_0x104162){_0x79f6a7=_0x104162;_0x33a2ab[_0x4698('0x2d')]=_[_0x4698('0x4a')](db[_0x4698('0x4e')][_0x4698('0x2a')]);_0x33a2ab[_0x4698('0x2f')]=_[_0x4698('0x4a')](_0x2099c0['query']);_0x33a2ab['filters']=_[_0x4698('0x30')](_0x33a2ab[_0x4698('0x2d')],_0x33a2ab[_0x4698('0x2f')]);_0x38faa0[_0x4698('0x31')]=_[_0x4698('0x30')](_0x33a2ab[_0x4698('0x2d')],qs[_0x4698('0x32')](_0x2099c0[_0x4698('0x2f')][_0x4698('0x32')]));_0x38faa0['attributes']=_0x38faa0['attributes'][_0x4698('0x42')]?_0x38faa0[_0x4698('0x31')]:_0x33a2ab[_0x4698('0x2d')];_0x38faa0[_0x4698('0x35')]=qs[_0x4698('0x4b')](_0x2099c0[_0x4698('0x2f')]['sort']);_0x38faa0['where']=qs[_0x4698('0x37')](_[_0x4698('0x38')](_0x2099c0['query'],_0x33a2ab['filters']));if(_0x2099c0[_0x4698('0x2f')][_0x4698('0x39')]){_0x38faa0[_0x4698('0x36')]=_[_0x4698('0x3a')](_0x38faa0[_0x4698('0x36')],{'$or':_['map'](_0x38faa0[_0x4698('0x31')],function(_0x2c1534){var _0x2365f7={};_0x2365f7[_0x2c1534]={'$like':'%'+_0x2099c0[_0x4698('0x2f')][_0x4698('0x39')]+'%'};return _0x2365f7;})});}_0x38faa0=_[_0x4698('0x3a')]({},_0x38faa0,_0x2099c0[_0x4698('0x3c')]);return _0x79f6a7['getActions'](_0x38faa0);}})[_0x4698('0x22')](function(_0x5407e5){if(_0x5407e5){_0x2d7851=_0x5407e5['length'];if(!_0x2099c0[_0x4698('0x2f')]['hasOwnProperty'](_0x4698('0x34'))){_0x38faa0['limit']=qs[_0x4698('0x1b')](_0x2099c0[_0x4698('0x2f')][_0x4698('0x1b')]);_0x38faa0['offset']=qs[_0x4698('0x1d')](_0x2099c0[_0x4698('0x2f')][_0x4698('0x1d')]);}return _0x79f6a7[_0x4698('0x4f')](_0x38faa0);}})[_0x4698('0x22')](function(_0x24d0a3){if(_0x24d0a3){return _0x24d0a3?{'count':_0x2d7851,'rows':_0x24d0a3}:null;}})[_0x4698('0x22')](respondWithResult(_0x3a7137,null))[_0x4698('0x3f')](handleError(_0x3a7137,null));};
\ No newline at end of file
+var _0x6989=['query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','merge','options','includeAll','findAll','rows','show','params','include','find','catch','create','body','addConditions','ids','omit','findOne','Condition','getConditions','addActions','Action','getActions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','index','map','Automation','rawAttributes','fieldName','model','name'];(function(_0x2e3dfc,_0x454d6c){var _0x4b1245=function(_0x5e9faa){while(--_0x5e9faa){_0x2e3dfc['push'](_0x2e3dfc['shift']());}};_0x4b1245(++_0x454d6c);}(_0x6989,0x123));var _0x9698=function(_0x3f0b2a,_0x52f963){_0x3f0b2a=_0x3f0b2a-0x0;var _0x23bd63=_0x6989[_0x3f0b2a];return _0x23bd63;};'use strict';var emlformat=require(_0x9698('0x0'));var rimraf=require(_0x9698('0x1'));var zipdir=require(_0x9698('0x2'));var jsonpatch=require(_0x9698('0x3'));var rp=require(_0x9698('0x4'));var moment=require(_0x9698('0x5'));var BPromise=require(_0x9698('0x6'));var Mustache=require(_0x9698('0x7'));var util=require(_0x9698('0x8'));var path=require('path');var sox=require(_0x9698('0x9'));var csv=require(_0x9698('0xa'));var ejs=require(_0x9698('0xb'));var fs=require('fs');var fs_extra=require(_0x9698('0xc'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x9698('0xd'));var deskjs=require(_0x9698('0xe'));var toCsv=require(_0x9698('0xa'));var querystring=require(_0x9698('0xf'));var Papa=require(_0x9698('0x10'));var Redis=require(_0x9698('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9698('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9698('0x13'));var logger=require('../../config/logger')(_0x9698('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x9698('0x15'));var db=require(_0x9698('0x16'))['db'];function respondWithStatusCode(_0x55c188,_0x284732){_0x284732=_0x284732||0xcc;return function(_0x2c1151){if(_0x2c1151){return _0x55c188[_0x9698('0x17')](_0x284732);}return _0x55c188[_0x9698('0x18')](_0x284732)[_0x9698('0x19')]();};}function respondWithResult(_0x22dae1,_0x88da3e){_0x88da3e=_0x88da3e||0xc8;return function(_0x9405a7){if(_0x9405a7){return _0x22dae1[_0x9698('0x18')](_0x88da3e)[_0x9698('0x1a')](_0x9405a7);}};}function respondWithFilteredResult(_0x4e3a37,_0x407f6b){return function(_0x27ce54){if(_0x27ce54){var _0x25be21=typeof _0x407f6b[_0x9698('0x1b')]===_0x9698('0x1c')&&typeof _0x407f6b[_0x9698('0x1d')]===_0x9698('0x1c');var _0x257109=_0x27ce54[_0x9698('0x1e')];var _0x5757c4=_0x25be21?0x0:_0x407f6b[_0x9698('0x1b')];var _0xb1a17b=_0x25be21?_0x27ce54[_0x9698('0x1e')]:_0x407f6b[_0x9698('0x1b')]+_0x407f6b[_0x9698('0x1d')];var _0x575715;if(_0xb1a17b>=_0x257109){_0xb1a17b=_0x257109;_0x575715=0xc8;}else{_0x575715=0xce;}_0x4e3a37[_0x9698('0x18')](_0x575715);return _0x4e3a37[_0x9698('0x1f')](_0x9698('0x20'),_0x5757c4+'-'+_0xb1a17b+'/'+_0x257109)['json'](_0x27ce54);}return null;};}function patchUpdates(_0x2219df){return function(_0x346ef0){try{jsonpatch[_0x9698('0x21')](_0x346ef0,_0x2219df,!![]);}catch(_0x454b37){return BPromise[_0x9698('0x22')](_0x454b37);}return _0x346ef0[_0x9698('0x23')]();};}function saveUpdates(_0x282002,_0x66432f){return function(_0x25a046){if(_0x25a046){return _0x25a046[_0x9698('0x24')](_0x282002)[_0x9698('0x25')](function(_0x2d2caf){return _0x2d2caf;});}return null;};}function removeEntity(_0x1ed4ec,_0x357348){return function(_0x534579){if(_0x534579){return _0x534579[_0x9698('0x26')]()[_0x9698('0x25')](function(){_0x1ed4ec[_0x9698('0x18')](0xcc)[_0x9698('0x19')]();});}};}function handleEntityNotFound(_0x707c75,_0x27ca57){return function(_0x5ea04c){if(!_0x5ea04c){_0x707c75[_0x9698('0x17')](0x194);}return _0x5ea04c;};}function handleError(_0x471d83,_0x26d7df){_0x26d7df=_0x26d7df||0x1f4;return function(_0x532eb6){logger[_0x9698('0x27')](_0x532eb6[_0x9698('0x28')]);if(_0x532eb6['name']){delete _0x532eb6['name'];}_0x471d83[_0x9698('0x18')](_0x26d7df)[_0x9698('0x29')](_0x532eb6);};}exports[_0x9698('0x2a')]=function(_0x3faf9d,_0x2cb765){var _0x4f2ac7={},_0x3b77e9={},_0x406cf={'count':0x0,'rows':[]};var _0x1258a7=_[_0x9698('0x2b')](db[_0x9698('0x2c')][_0x9698('0x2d')],function(_0xe16203){return{'name':_0xe16203[_0x9698('0x2e')],'type':_0xe16203['type']['key']};});_0x3b77e9[_0x9698('0x2f')]=_['map'](_0x1258a7,_0x9698('0x30'));_0x3b77e9[_0x9698('0x31')]=_[_0x9698('0x32')](_0x3faf9d[_0x9698('0x31')]);_0x3b77e9[_0x9698('0x33')]=_[_0x9698('0x34')](_0x3b77e9['model'],_0x3b77e9['query']);_0x4f2ac7[_0x9698('0x35')]=_[_0x9698('0x34')](_0x3b77e9[_0x9698('0x2f')],qs[_0x9698('0x36')](_0x3faf9d[_0x9698('0x31')][_0x9698('0x36')]));_0x4f2ac7[_0x9698('0x35')]=_0x4f2ac7[_0x9698('0x35')][_0x9698('0x37')]?_0x4f2ac7[_0x9698('0x35')]:_0x3b77e9['model'];if(!_0x3faf9d['query'][_0x9698('0x38')](_0x9698('0x39'))){_0x4f2ac7['limit']=qs[_0x9698('0x1d')](_0x3faf9d[_0x9698('0x31')][_0x9698('0x1d')]);_0x4f2ac7['offset']=qs['offset'](_0x3faf9d[_0x9698('0x31')][_0x9698('0x1b')]);}_0x4f2ac7[_0x9698('0x3a')]=qs['sort'](_0x3faf9d['query'][_0x9698('0x3b')]);_0x4f2ac7[_0x9698('0x3c')]=qs[_0x9698('0x33')](_[_0x9698('0x3d')](_0x3faf9d[_0x9698('0x31')],_0x3b77e9[_0x9698('0x33')]),_0x1258a7);if(_0x3faf9d[_0x9698('0x31')][_0x9698('0x3e')]){_0x4f2ac7[_0x9698('0x3c')]=_['merge'](_0x4f2ac7['where'],{'$or':_[_0x9698('0x2b')](_0x1258a7,function(_0x2cc28a){if(_0x2cc28a[_0x9698('0x3f')]!=='VIRTUAL'){var _0x81854c={};_0x81854c[_0x2cc28a[_0x9698('0x30')]]={'$like':'%'+_0x3faf9d[_0x9698('0x31')][_0x9698('0x3e')]+'%'};return _0x81854c;}})});}_0x4f2ac7=_[_0x9698('0x40')]({},_0x4f2ac7,_0x3faf9d[_0x9698('0x41')]);var _0x5660d5={'where':_0x4f2ac7[_0x9698('0x3c')]};return db[_0x9698('0x2c')][_0x9698('0x1e')](_0x5660d5)[_0x9698('0x25')](function(_0x5da928){_0x406cf[_0x9698('0x1e')]=_0x5da928;if(_0x3faf9d[_0x9698('0x31')][_0x9698('0x42')]){_0x4f2ac7['include']=[{'all':!![]}];}return db[_0x9698('0x2c')][_0x9698('0x43')](_0x4f2ac7);})[_0x9698('0x25')](function(_0x43e5dd){_0x406cf[_0x9698('0x44')]=_0x43e5dd;return _0x406cf;})[_0x9698('0x25')](respondWithFilteredResult(_0x2cb765,_0x4f2ac7))['catch'](handleError(_0x2cb765,null));};exports[_0x9698('0x45')]=function(_0x126ab1,_0x4aeb8a){var _0x1cf1c3={'raw':![],'where':{'id':_0x126ab1[_0x9698('0x46')]['id']}},_0x148c49={};_0x148c49[_0x9698('0x2f')]=_[_0x9698('0x32')](db[_0x9698('0x2c')][_0x9698('0x2d')]);_0x148c49[_0x9698('0x31')]=_[_0x9698('0x32')](_0x126ab1[_0x9698('0x31')]);_0x148c49['filters']=_[_0x9698('0x34')](_0x148c49[_0x9698('0x2f')],_0x148c49['query']);_0x1cf1c3[_0x9698('0x35')]=_['intersection'](_0x148c49[_0x9698('0x2f')],qs[_0x9698('0x36')](_0x126ab1[_0x9698('0x31')][_0x9698('0x36')]));_0x1cf1c3[_0x9698('0x35')]=_0x1cf1c3[_0x9698('0x35')][_0x9698('0x37')]?_0x1cf1c3[_0x9698('0x35')]:_0x148c49[_0x9698('0x2f')];if(_0x126ab1[_0x9698('0x31')]['includeAll']){_0x1cf1c3[_0x9698('0x47')]=[{'all':!![]}];}_0x1cf1c3=_[_0x9698('0x40')]({},_0x1cf1c3,_0x126ab1['options']);return db[_0x9698('0x2c')][_0x9698('0x48')](_0x1cf1c3)[_0x9698('0x25')](handleEntityNotFound(_0x4aeb8a,null))[_0x9698('0x25')](respondWithResult(_0x4aeb8a,null))[_0x9698('0x49')](handleError(_0x4aeb8a,null));};exports[_0x9698('0x4a')]=function(_0x5b8231,_0x1a6333){return db[_0x9698('0x2c')][_0x9698('0x4a')](_0x5b8231[_0x9698('0x4b')],{})['then'](respondWithResult(_0x1a6333,0xc9))[_0x9698('0x49')](handleError(_0x1a6333,null));};exports['update']=function(_0x527784,_0x27a1eb){if(_0x527784[_0x9698('0x4b')]['id']){delete _0x527784[_0x9698('0x4b')]['id'];}return db[_0x9698('0x2c')][_0x9698('0x48')]({'where':{'id':_0x527784[_0x9698('0x46')]['id']}})['then'](handleEntityNotFound(_0x27a1eb,null))['then'](saveUpdates(_0x527784[_0x9698('0x4b')],null))[_0x9698('0x25')](respondWithResult(_0x27a1eb,null))[_0x9698('0x49')](handleError(_0x27a1eb,null));};exports[_0x9698('0x26')]=function(_0x36174d,_0x150a49){return db[_0x9698('0x2c')][_0x9698('0x48')]({'where':{'id':_0x36174d[_0x9698('0x46')]['id']}})['then'](handleEntityNotFound(_0x150a49,null))['then'](removeEntity(_0x150a49,null))[_0x9698('0x49')](handleError(_0x150a49,null));};exports[_0x9698('0x4c')]=function(_0x491549,_0x19bd65,_0x5f35b2){return db['Condition']['find']({'where':{'id':_0x491549[_0x9698('0x46')]['id']}})[_0x9698('0x25')](handleEntityNotFound(_0x19bd65,null))['then'](function(_0x506fbe){if(_0x506fbe){return _0x506fbe['addConditions'](_0x491549['body'][_0x9698('0x4d')],_[_0x9698('0x4e')](_0x491549[_0x9698('0x4b')],[_0x9698('0x4d'),'id'])||{});}})[_0x9698('0x25')](respondWithResult(_0x19bd65,null))['catch'](handleError(_0x19bd65,null));};exports['getConditions']=function(_0x12d616,_0x30033e,_0x4a84d0){var _0x4ba5b8={};var _0x36b47c={};var _0x12842d;var _0x4e8430;return db[_0x9698('0x2c')][_0x9698('0x4f')]({'where':{'id':_0x12d616[_0x9698('0x46')]['id']}})[_0x9698('0x25')](handleEntityNotFound(_0x30033e,null))[_0x9698('0x25')](function(_0xed8ed0){if(_0xed8ed0){_0x12842d=_0xed8ed0;_0x36b47c[_0x9698('0x2f')]=_[_0x9698('0x32')](db[_0x9698('0x50')][_0x9698('0x2d')]);_0x36b47c[_0x9698('0x31')]=_[_0x9698('0x32')](_0x12d616[_0x9698('0x31')]);_0x36b47c['filters']=_['intersection'](_0x36b47c[_0x9698('0x2f')],_0x36b47c[_0x9698('0x31')]);_0x4ba5b8[_0x9698('0x35')]=_[_0x9698('0x34')](_0x36b47c[_0x9698('0x2f')],qs[_0x9698('0x36')](_0x12d616[_0x9698('0x31')][_0x9698('0x36')]));_0x4ba5b8['attributes']=_0x4ba5b8[_0x9698('0x35')][_0x9698('0x37')]?_0x4ba5b8[_0x9698('0x35')]:_0x36b47c[_0x9698('0x2f')];_0x4ba5b8[_0x9698('0x3a')]=qs[_0x9698('0x3b')](_0x12d616[_0x9698('0x31')][_0x9698('0x3b')]);_0x4ba5b8[_0x9698('0x3c')]=qs[_0x9698('0x33')](_[_0x9698('0x3d')](_0x12d616[_0x9698('0x31')],_0x36b47c[_0x9698('0x33')]));if(_0x12d616['query'][_0x9698('0x3e')]){_0x4ba5b8[_0x9698('0x3c')]=_['merge'](_0x4ba5b8['where'],{'$or':_['map'](_0x4ba5b8['attributes'],function(_0x101cd4){var _0x30ab0b={};_0x30ab0b[_0x101cd4]={'$like':'%'+_0x12d616['query'][_0x9698('0x3e')]+'%'};return _0x30ab0b;})});}_0x4ba5b8=_[_0x9698('0x40')]({},_0x4ba5b8,_0x12d616[_0x9698('0x41')]);return _0x12842d['getConditions'](_0x4ba5b8);}})[_0x9698('0x25')](function(_0x5578d3){if(_0x5578d3){_0x4e8430=_0x5578d3['length'];if(!_0x12d616[_0x9698('0x31')][_0x9698('0x38')]('nolimit')){_0x4ba5b8[_0x9698('0x1d')]=qs[_0x9698('0x1d')](_0x12d616[_0x9698('0x31')][_0x9698('0x1d')]);_0x4ba5b8[_0x9698('0x1b')]=qs['offset'](_0x12d616[_0x9698('0x31')]['offset']);}return _0x12842d[_0x9698('0x51')](_0x4ba5b8);}})[_0x9698('0x25')](function(_0x5ba940){if(_0x5ba940){return _0x5ba940?{'count':_0x4e8430,'rows':_0x5ba940}:null;}})[_0x9698('0x25')](respondWithResult(_0x30033e,null))[_0x9698('0x49')](handleError(_0x30033e,null));};exports[_0x9698('0x52')]=function(_0x5aff58,_0x1309f9,_0x5ceb91){return db[_0x9698('0x53')][_0x9698('0x48')]({'where':{'id':_0x5aff58['params']['id']}})[_0x9698('0x25')](handleEntityNotFound(_0x1309f9,null))[_0x9698('0x25')](function(_0x234bc0){if(_0x234bc0){return _0x234bc0['addActions'](_0x5aff58[_0x9698('0x4b')]['ids'],_[_0x9698('0x4e')](_0x5aff58[_0x9698('0x4b')],[_0x9698('0x4d'),'id'])||{});}})[_0x9698('0x25')](respondWithResult(_0x1309f9,null))[_0x9698('0x49')](handleError(_0x1309f9,null));};exports[_0x9698('0x54')]=function(_0x566b77,_0x3086a2,_0xe6829c){var _0x1381e0={};var _0x1eee55={};var _0x37e403;var _0x45393b;return db[_0x9698('0x2c')]['findOne']({'where':{'id':_0x566b77[_0x9698('0x46')]['id']}})[_0x9698('0x25')](handleEntityNotFound(_0x3086a2,null))['then'](function(_0x32a71e){if(_0x32a71e){_0x37e403=_0x32a71e;_0x1eee55[_0x9698('0x2f')]=_['keys'](db[_0x9698('0x53')][_0x9698('0x2d')]);_0x1eee55[_0x9698('0x31')]=_[_0x9698('0x32')](_0x566b77[_0x9698('0x31')]);_0x1eee55[_0x9698('0x33')]=_[_0x9698('0x34')](_0x1eee55[_0x9698('0x2f')],_0x1eee55[_0x9698('0x31')]);_0x1381e0['attributes']=_[_0x9698('0x34')](_0x1eee55['model'],qs['fields'](_0x566b77[_0x9698('0x31')][_0x9698('0x36')]));_0x1381e0[_0x9698('0x35')]=_0x1381e0[_0x9698('0x35')][_0x9698('0x37')]?_0x1381e0[_0x9698('0x35')]:_0x1eee55['model'];_0x1381e0[_0x9698('0x3a')]=qs[_0x9698('0x3b')](_0x566b77[_0x9698('0x31')][_0x9698('0x3b')]);_0x1381e0[_0x9698('0x3c')]=qs[_0x9698('0x33')](_[_0x9698('0x3d')](_0x566b77['query'],_0x1eee55[_0x9698('0x33')]));if(_0x566b77[_0x9698('0x31')][_0x9698('0x3e')]){_0x1381e0[_0x9698('0x3c')]=_[_0x9698('0x40')](_0x1381e0[_0x9698('0x3c')],{'$or':_[_0x9698('0x2b')](_0x1381e0[_0x9698('0x35')],function(_0x1cc9cd){var _0x2b4674={};_0x2b4674[_0x1cc9cd]={'$like':'%'+_0x566b77[_0x9698('0x31')]['filter']+'%'};return _0x2b4674;})});}_0x1381e0=_[_0x9698('0x40')]({},_0x1381e0,_0x566b77[_0x9698('0x41')]);return _0x37e403[_0x9698('0x54')](_0x1381e0);}})[_0x9698('0x25')](function(_0x55d2e9){if(_0x55d2e9){_0x45393b=_0x55d2e9[_0x9698('0x37')];if(!_0x566b77['query'][_0x9698('0x38')](_0x9698('0x39'))){_0x1381e0[_0x9698('0x1d')]=qs[_0x9698('0x1d')](_0x566b77[_0x9698('0x31')][_0x9698('0x1d')]);_0x1381e0[_0x9698('0x1b')]=qs[_0x9698('0x1b')](_0x566b77[_0x9698('0x31')][_0x9698('0x1b')]);}return _0x37e403[_0x9698('0x54')](_0x1381e0);}})[_0x9698('0x25')](function(_0xd25a1d){if(_0xd25a1d){return _0xd25a1d?{'count':_0x45393b,'rows':_0xd25a1d}:null;}})[_0x9698('0x25')](respondWithResult(_0x3086a2,null))[_0x9698('0x49')](handleError(_0x3086a2,null));};
\ No newline at end of file
diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js
index 2a66f6b..ce91996 100644
--- a/server/api/automation/automation.model.js
+++ b/server/api/automation/automation.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1b46=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./automation.attributes','exports','define','Automation','tools_automations','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1b46,0x137));var _0x61b4=function(_0x89f63,_0x4d8c95){_0x89f63=_0x89f63-0x0;var _0x2adbf8=_0x1b46[_0x89f63];return _0x2adbf8;};'use strict';var _=require('lodash');var util=require(_0x61b4('0x0'));var logger=require(_0x61b4('0x1'))('api');var moment=require(_0x61b4('0x2'));var BPromise=require(_0x61b4('0x3'));var rp=require(_0x61b4('0x4'));var fs=require('fs');var path=require(_0x61b4('0x5'));var rimraf=require(_0x61b4('0x6'));var config=require(_0x61b4('0x7'));var attributes=require(_0x61b4('0x8'));module[_0x61b4('0x9')]=function(_0x51da86,_0x14c5de){return _0x51da86[_0x61b4('0xa')](_0x61b4('0xb'),attributes,{'tableName':_0x61b4('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa2c2=['api','bluebird','path','../../config/environment','./automation.attributes','exports','define','Automation','tools_automations','util'];(function(_0x17882c,_0x4b964b){var _0x355a59=function(_0x534b5b){while(--_0x534b5b){_0x17882c['push'](_0x17882c['shift']());}};_0x355a59(++_0x4b964b);}(_0xa2c2,0x18f));var _0x2a2c=function(_0x28617f,_0xd69ba7){_0x28617f=_0x28617f-0x0;var _0x152e49=_0xa2c2[_0x28617f];return _0x152e49;};'use strict';var _=require('lodash');var util=require(_0x2a2c('0x0'));var logger=require('../../config/logger')(_0x2a2c('0x1'));var moment=require('moment');var BPromise=require(_0x2a2c('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2a2c('0x3'));var rimraf=require('rimraf');var config=require(_0x2a2c('0x4'));var attributes=require(_0x2a2c('0x5'));module[_0x2a2c('0x6')]=function(_0x4a0aee,_0x8f3529){return _0x4a0aee[_0x2a2c('0x7')](_0x2a2c('0x8'),attributes,{'tableName':_0x2a2c('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/automation/automation.rpc.js b/server/api/automation/automation.rpc.js
index 1da9619..ae07ec7 100644
--- a/server/api/automation/automation.rpc.js
+++ b/server/api/automation/automation.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa32b=['message','info','result','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','debug','request\x20sent','error','Automation,\x20%s,\x20%s'];(function(_0x4a5cce,_0x34265f){var _0x347252=function(_0x7d6755){while(--_0x7d6755){_0x4a5cce['push'](_0x4a5cce['shift']());}};_0x347252(++_0x34265f);}(_0xa32b,0x68));var _0xba32=function(_0x1992f1,_0x5c61f0){_0x1992f1=_0x1992f1-0x0;var _0x413dfe=_0xa32b[_0x1992f1];return _0x413dfe;};'use strict';var _=require(_0xba32('0x0'));var util=require('util');var moment=require(_0xba32('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xba32('0x2'));var db=require(_0xba32('0x3'))['db'];var utils=require(_0xba32('0x4'));var logger=require('../../config/logger')(_0xba32('0x5'));var config=require(_0xba32('0x6'));var jayson=require(_0xba32('0x7'));var client=jayson[_0xba32('0x8')][_0xba32('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5c5a59,_0x1b1332,_0x4edbc6){return new BPromise(function(_0xcdcc5b,_0x13395b){return client[_0xba32('0xa')](_0x5c5a59,_0x4edbc6)[_0xba32('0xb')](function(_0x5d8f64){logger['info']('Automation,\x20%s,\x20%s',_0x1b1332,'request\x20sent');logger[_0xba32('0xc')]('Automation,\x20%s,\x20%s,\x20%s',_0x1b1332,_0xba32('0xd'),JSON['stringify'](_0x5d8f64));if(_0x5d8f64[_0xba32('0xe')]){if(_0x5d8f64['error']['code']===0x1f4){logger[_0xba32('0xe')](_0xba32('0xf'),_0x1b1332,_0x5d8f64[_0xba32('0xe')][_0xba32('0x10')]);return _0x13395b(_0x5d8f64[_0xba32('0xe')]['message']);}logger[_0xba32('0xe')](_0xba32('0xf'),_0x1b1332,_0x5d8f64[_0xba32('0xe')][_0xba32('0x10')]);return _0xcdcc5b(_0x5d8f64[_0xba32('0xe')][_0xba32('0x10')]);}else{logger[_0xba32('0x11')]('Automation,\x20%s,\x20%s',_0x1b1332,_0xba32('0xd'));_0xcdcc5b(_0x5d8f64[_0xba32('0x12')][_0xba32('0x10')]);}})[_0xba32('0x13')](function(_0x310dee){logger['error']('Automation,\x20%s,\x20%s',_0x1b1332,_0x310dee);_0x13395b(_0x310dee);});});}
\ No newline at end of file
+var _0xf9ac=['info','request\x20sent','Automation,\x20%s,\x20%s,\x20%s','stringify','error','Automation,\x20%s,\x20%s','message','result','catch','lodash','bluebird','randomstring','../../mysqldb','../../config/logger','jayson/promise','client','http','then'];(function(_0x3db71e,_0x275086){var _0x4240a1=function(_0x155c4f){while(--_0x155c4f){_0x3db71e['push'](_0x3db71e['shift']());}};_0x4240a1(++_0x275086);}(_0xf9ac,0x87));var _0xcf9a=function(_0x5e6aec,_0x3f3127){_0x5e6aec=_0x5e6aec-0x0;var _0x130f09=_0xf9ac[_0x5e6aec];return _0x130f09;};'use strict';var _=require(_0xcf9a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xcf9a('0x1'));var rs=require(_0xcf9a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcf9a('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xcf9a('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0xcf9a('0x5'));var client=jayson[_0xcf9a('0x6')][_0xcf9a('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x235e47,_0x54ebf6,_0x33a1a6){return new BPromise(function(_0x3d2f54,_0x4c0665){return client['request'](_0x235e47,_0x33a1a6)[_0xcf9a('0x8')](function(_0x579cf9){logger[_0xcf9a('0x9')]('Automation,\x20%s,\x20%s',_0x54ebf6,_0xcf9a('0xa'));logger['debug'](_0xcf9a('0xb'),_0x54ebf6,_0xcf9a('0xa'),JSON[_0xcf9a('0xc')](_0x579cf9));if(_0x579cf9['error']){if(_0x579cf9['error']['code']===0x1f4){logger[_0xcf9a('0xd')](_0xcf9a('0xe'),_0x54ebf6,_0x579cf9['error'][_0xcf9a('0xf')]);return _0x4c0665(_0x579cf9[_0xcf9a('0xd')][_0xcf9a('0xf')]);}logger['error'](_0xcf9a('0xe'),_0x54ebf6,_0x579cf9['error']['message']);return _0x3d2f54(_0x579cf9['error']['message']);}else{logger[_0xcf9a('0x9')](_0xcf9a('0xe'),_0x54ebf6,_0xcf9a('0xa'));_0x3d2f54(_0x579cf9[_0xcf9a('0x10')][_0xcf9a('0xf')]);}})[_0xcf9a('0x11')](function(_0x25dc10){logger['error'](_0xcf9a('0xe'),_0x54ebf6,_0x25dc10);_0x4c0665(_0x25dc10);});});}
\ No newline at end of file
diff --git a/server/api/automation/index.js b/server/api/automation/index.js
index d4336ea..092f624 100644
--- a/server/api/automation/index.js
+++ b/server/api/automation/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x117d=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./automation.controller','get','isAuthenticated','index','show','/:id/conditions','getConditions','/:id/actions','getActions','post','create','addConditions','put','update','delete','destroy','exports','multer','util','path'];(function(_0x4af95c,_0x40708f){var _0x28c01f=function(_0x3fae4e){while(--_0x3fae4e){_0x4af95c['push'](_0x4af95c['shift']());}};_0x28c01f(++_0x40708f);}(_0x117d,0xac));var _0xd117=function(_0x47568e,_0x5ccdaf){_0x47568e=_0x47568e-0x0;var _0x33815b=_0x117d[_0x47568e];return _0x33815b;};'use strict';var multer=require(_0xd117('0x0'));var util=require(_0xd117('0x1'));var path=require(_0xd117('0x2'));var timeout=require('connect-timeout');var express=require(_0xd117('0x3'));var router=express[_0xd117('0x4')]();var fs_extra=require(_0xd117('0x5'));var auth=require(_0xd117('0x6'));var interaction=require(_0xd117('0x7'));var config=require('../../config/environment');var controller=require(_0xd117('0x8'));router[_0xd117('0x9')]('/',auth[_0xd117('0xa')](),controller[_0xd117('0xb')]);router['get']('/:id',auth[_0xd117('0xa')](),controller[_0xd117('0xc')]);router[_0xd117('0x9')](_0xd117('0xd'),auth[_0xd117('0xa')](),controller[_0xd117('0xe')]);router[_0xd117('0x9')](_0xd117('0xf'),auth[_0xd117('0xa')](),controller[_0xd117('0x10')]);router[_0xd117('0x11')]('/',auth[_0xd117('0xa')](),controller[_0xd117('0x12')]);router['post'](_0xd117('0xd'),auth[_0xd117('0xa')](),controller[_0xd117('0x13')]);router[_0xd117('0x11')](_0xd117('0xf'),auth['isAuthenticated'](),controller['addActions']);router[_0xd117('0x14')]('/:id',auth[_0xd117('0xa')](),controller[_0xd117('0x15')]);router[_0xd117('0x16')]('/:id',auth[_0xd117('0xa')](),controller[_0xd117('0x17')]);module[_0xd117('0x18')]=router;
\ No newline at end of file
+var _0xc31d=['addActions','put','update','delete','destroy','exports','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','index','/:id','/:id/conditions','getConditions','/:id/actions','post','addConditions'];(function(_0x1d1779,_0x284147){var _0x2377e9=function(_0x299f6f){while(--_0x299f6f){_0x1d1779['push'](_0x1d1779['shift']());}};_0x2377e9(++_0x284147);}(_0xc31d,0x124));var _0xdc31=function(_0x323419,_0x2a6172){_0x323419=_0x323419-0x0;var _0x4c0be7=_0xc31d[_0x323419];return _0x4c0be7;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xdc31('0x0'));var timeout=require(_0xdc31('0x1'));var express=require('express');var router=express[_0xdc31('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0xdc31('0x3'));var interaction=require(_0xdc31('0x4'));var config=require(_0xdc31('0x5'));var controller=require(_0xdc31('0x6'));router[_0xdc31('0x7')]('/',auth[_0xdc31('0x8')](),controller[_0xdc31('0x9')]);router[_0xdc31('0x7')](_0xdc31('0xa'),auth[_0xdc31('0x8')](),controller['show']);router[_0xdc31('0x7')](_0xdc31('0xb'),auth[_0xdc31('0x8')](),controller[_0xdc31('0xc')]);router['get'](_0xdc31('0xd'),auth[_0xdc31('0x8')](),controller['getActions']);router[_0xdc31('0xe')]('/',auth[_0xdc31('0x8')](),controller['create']);router[_0xdc31('0xe')](_0xdc31('0xb'),auth[_0xdc31('0x8')](),controller[_0xdc31('0xf')]);router['post'](_0xdc31('0xd'),auth['isAuthenticated'](),controller[_0xdc31('0x10')]);router[_0xdc31('0x11')](_0xdc31('0xa'),auth[_0xdc31('0x8')](),controller[_0xdc31('0x12')]);router[_0xdc31('0x13')](_0xdc31('0xa'),auth[_0xdc31('0x8')](),controller[_0xdc31('0x14')]);module[_0xdc31('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js
index 215bbe0..0d94e4e 100644
--- a/server/api/campaign/campaign.attributes.js
+++ b/server/api/campaign/campaign.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x99de=['onlyIfOpen','always','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','STRING','name','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','ENUM','never'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x99de,0x194));var _0xe99d=function(_0xe30e17,_0xce02be){_0xe30e17=_0xe30e17-0x0;var _0x2342c9=_0x99de[_0xe30e17];return _0x2342c9;};'use strict';var Sequelize=require(_0xe99d('0x0'));module['exports']={'name':{'type':Sequelize[_0xe99d('0x1')],'unique':_0xe99d('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM']('ivr'),'allowNull':![],'defaultValue':_0xe99d('0x3')},'description':{'type':Sequelize[_0xe99d('0x1')]},'active':{'type':Sequelize[_0xe99d('0x4')],'defaultValue':0x0,'comment':_0xe99d('0x5')},'limitCalls':{'type':Sequelize[_0xe99d('0x6')](0x4)[_0xe99d('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':'Max\x20200\x20calls.'},'dialOriginateCallerIdName':{'type':Sequelize[_0xe99d('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xe99d('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xe99d('0x8')},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xe99d('0x9')},'dialCongestionRetryFrequency':{'type':Sequelize[_0xe99d('0x6')](0x5)[_0xe99d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xe99d('0xa')},'dialBusyMaxRetry':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize[_0xe99d('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xe99d('0xb')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xe99d('0x6')](0x5)[_0xe99d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xe99d('0x7')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xe99d('0xc')},'dialTimezone':{'type':Sequelize[_0xe99d('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize['STRING'],'defaultValue':_0xe99d('0xd')},'dialCheckDuplicateType':{'type':Sequelize[_0xe99d('0xe')]('always',_0xe99d('0xf'),_0xe99d('0x10')),'defaultValue':_0xe99d('0x11')},'dialAMDActive':{'type':Sequelize[_0xe99d('0x4')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0xe99d('0x6')](0x9)[_0xe99d('0x7')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xe99d('0x12')},'dialAMDGreeting':{'type':Sequelize[_0xe99d('0x6')](0x9)[_0xe99d('0x7')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xe99d('0x13')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xe99d('0x6')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xe99d('0x14')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0xe99d('0x6')](0x9)[_0xe99d('0x7')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xe99d('0x15')},'dialAMDMinWordLength':{'type':Sequelize[_0xe99d('0x6')](0x9)[_0xe99d('0x7')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xe99d('0x6')](0x9)[_0xe99d('0x7')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xe99d('0x16')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xe99d('0x6')](0x9)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0xe99d('0x17')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)[_0xe99d('0x7')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xe99d('0x18')},'dialAMDMaximumWordLength':{'type':Sequelize[_0xe99d('0x6')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xe99d('0x19')},'dialOrderByScheduledAt':{'type':Sequelize[_0xe99d('0xe')]('DESC',_0xe99d('0x1a')),'defaultValue':'DESC'},'dialPrefix':{'type':Sequelize[_0xe99d('0x1')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xe99d('0x1b')},'dialCutDigit':{'type':Sequelize[_0xe99d('0x6')](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xe99d('0x1c')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xe99d('0x1d')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xe99d('0x1e')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xe99d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xe99d('0x1f')},'dialAbandonedMaxRetry':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xe99d('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xe99d('0x20')},'dialMachineRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xe99d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAgentRejectMaxRetry':{'type':Sequelize[_0xe99d('0x6')](0x3)[_0xe99d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xe99d('0x21')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0xe99d('0x6')](0x5)[_0xe99d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xe99d('0x22')}};
\ No newline at end of file
+var _0x6854=['UNSIGNED','Max\x20200\x20calls.','INTEGER','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','never','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Number\x20Of\x20Words','ENUM','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','#Machine\x20Retry\x20(min:1,\x20max:999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','name','ivr','STRING','BOOLEAN','Active/Disactive\x20Campaign'];(function(_0x2d5fad,_0x4fc299){var _0x41b330=function(_0x38d0af){while(--_0x38d0af){_0x2d5fad['push'](_0x2d5fad['shift']());}};_0x41b330(++_0x4fc299);}(_0x6854,0x19d));var _0x4685=function(_0x3ed054,_0x4d4f16){_0x3ed054=_0x3ed054-0x0;var _0x16dd95=_0x6854[_0x3ed054];return _0x16dd95;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x4685('0x0'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM'](_0x4685('0x1')),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize[_0x4685('0x2')]},'active':{'type':Sequelize[_0x4685('0x3')],'defaultValue':0x0,'comment':_0x4685('0x4')},'limitCalls':{'type':Sequelize['INTEGER'](0x4)[_0x4685('0x5')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x4685('0x6')},'dialOriginateCallerIdName':{'type':Sequelize[_0x4685('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x4685('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x4685('0x7')](0x3)[_0x4685('0x5')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0x8')},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x4685('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize[_0x4685('0x7')](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4685('0x9')},'dialBusyMaxRetry':{'type':Sequelize[_0x4685('0x7')](0x3)[_0x4685('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0xa')},'dialBusyRetryFrequency':{'type':Sequelize[_0x4685('0x7')](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4685('0xb')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x4685('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':_0x4685('0xc')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x4685('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4685('0xd')},'dialGlobalMaxRetry':{'type':Sequelize[_0x4685('0x7')](0x3)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x4685('0xe')},'dialTimezone':{'type':Sequelize[_0x4685('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize['STRING'],'defaultValue':_0x4685('0xf')},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0x4685('0x10'),_0x4685('0x11'),_0x4685('0x12')),'defaultValue':'always'},'dialAMDActive':{'type':Sequelize[_0x4685('0x3')],'defaultValue':0x0,'comment':_0x4685('0x13')},'dialAMDInitialSilence':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x4685('0x14')},'dialAMDGreeting':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x4685('0x15')},'dialAMDAfterGreetingSilence':{'type':Sequelize['INTEGER'](0x9)[_0x4685('0x5')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x4685('0x16')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x4685('0x17')},'dialAMDMinWordLength':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x4685('0x18')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x4685('0x19')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x4685('0x7')](0x5)[_0x4685('0x5')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':'#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)'},'dialAMDMaximumWordLength':{'type':Sequelize[_0x4685('0x7')](0x9)[_0x4685('0x5')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Word\x20Length'},'dialOrderByScheduledAt':{'type':Sequelize[_0x4685('0x1a')]('DESC',_0x4685('0x1b')),'defaultValue':_0x4685('0x1c')},'dialPrefix':{'type':Sequelize[_0x4685('0x2')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x4685('0x7')](0x3)[_0x4685('0x5')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x4685('0x1d')},'dialCutDigit':{'type':Sequelize[_0x4685('0x7')](0x3)[_0x4685('0x5')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x4685('0x1e')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x4685('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0x1f')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x4685('0x7')](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4685('0x20')},'dialDropMaxRetry':{'type':Sequelize[_0x4685('0x7')](0x3)[_0x4685('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0x21')},'dialDropRetryFrequency':{'type':Sequelize[_0x4685('0x7')](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4685('0x22')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x4685('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0x23')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x4685('0x7')](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x4685('0x5')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0x24')},'dialMachineRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x4685('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4685('0x25')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x4685('0x5')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'}};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js
index 825faee..5558682 100644
--- a/server/api/campaign/campaign.controller.js
+++ b/server/api/campaign/campaign.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x1226=['sequelize','all','removeLists','getBlackLists','format','addBlackLists','cm_hopper_black','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','UserProfileResource','then','stack','name','send','index','map','Campaign','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','type','filter','merge','options','rows','catch','show','params','include','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','IvrCampaigns','userProfileId','autoAssociation','error','includeAll','omit','createdAt','updatedAt','body','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','CmHopper','CampaignId','findAll','getHopperHistories','findOne','CmHopperHistory','getHopperFinals','CmHopperFinal','CmHopperBlack','getLists','CmList','addLists','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','insert','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','select','field','NOW()','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','CampaignId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(phone,\x27\x27)','onlyIfOpen','into','cm_hopper_additional_phones','OrderBy','h.id','ci.item','ci.OrderBY','cm_contact_has_items','join','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','push'];(function(_0x78d78d,_0x4e73f0){var _0x14e121=function(_0x1f80a1){while(--_0x1f80a1){_0x78d78d['push'](_0x78d78d['shift']());}};_0x14e121(++_0x4e73f0);}(_0x1226,0x1c1));var _0x6122=function(_0x4ca057,_0x4ef66c){_0x4ca057=_0x4ca057-0x0;var _0x378bb5=_0x1226[_0x4ca057];return _0x378bb5;};'use strict';var emlformat=require(_0x6122('0x0'));var rimraf=require(_0x6122('0x1'));var zipdir=require(_0x6122('0x2'));var jsonpatch=require(_0x6122('0x3'));var rp=require(_0x6122('0x4'));var moment=require(_0x6122('0x5'));var BPromise=require(_0x6122('0x6'));var Mustache=require(_0x6122('0x7'));var util=require(_0x6122('0x8'));var path=require('path');var sox=require(_0x6122('0x9'));var csv=require(_0x6122('0xa'));var ejs=require(_0x6122('0xb'));var fs=require('fs');var fs_extra=require(_0x6122('0xc'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x6122('0xd'));var jsforce=require(_0x6122('0xe'));var deskjs=require(_0x6122('0xf'));var toCsv=require(_0x6122('0xa'));var querystring=require(_0x6122('0x10'));var Papa=require(_0x6122('0x11'));var Redis=require(_0x6122('0x12'));var authService=require(_0x6122('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x6122('0x14'));var hardwareService=require(_0x6122('0x15'));var logger=require('../../config/logger')(_0x6122('0x16'));var utils=require(_0x6122('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x6122('0x18'));var db=require(_0x6122('0x19'))['db'];function respondWithStatusCode(_0x3738a4,_0x10eea1){_0x10eea1=_0x10eea1||0xcc;return function(_0x2e0a31){if(_0x2e0a31){return _0x3738a4[_0x6122('0x1a')](_0x10eea1);}return _0x3738a4['status'](_0x10eea1)[_0x6122('0x1b')]();};}function respondWithResult(_0x24116e,_0x9a39cd){_0x9a39cd=_0x9a39cd||0xc8;return function(_0x320b46){if(_0x320b46){return _0x24116e[_0x6122('0x1c')](_0x9a39cd)['json'](_0x320b46);}};}function respondWithFilteredResult(_0x2023d1,_0x4cd8fb){return function(_0x5d9678){if(_0x5d9678){var _0x7dd3fe=typeof _0x4cd8fb[_0x6122('0x1d')]===_0x6122('0x1e')&&typeof _0x4cd8fb[_0x6122('0x1f')]===_0x6122('0x1e');var _0x15f72c=_0x5d9678[_0x6122('0x20')];var _0x15ee1d=_0x7dd3fe?0x0:_0x4cd8fb['offset'];var _0xcfd359=_0x7dd3fe?_0x5d9678[_0x6122('0x20')]:_0x4cd8fb['offset']+_0x4cd8fb[_0x6122('0x1f')];var _0x2a5908;if(_0xcfd359>=_0x15f72c){_0xcfd359=_0x15f72c;_0x2a5908=0xc8;}else{_0x2a5908=0xce;}_0x2023d1[_0x6122('0x1c')](_0x2a5908);return _0x2023d1[_0x6122('0x21')](_0x6122('0x22'),_0x15ee1d+'-'+_0xcfd359+'/'+_0x15f72c)['json'](_0x5d9678);}return null;};}function patchUpdates(_0x3f6cd2){return function(_0x5bd8ff){try{jsonpatch[_0x6122('0x23')](_0x5bd8ff,_0x3f6cd2,!![]);}catch(_0x29de92){return BPromise[_0x6122('0x24')](_0x29de92);}return _0x5bd8ff[_0x6122('0x25')]();};}function saveUpdates(_0x25aff5,_0x194357){return function(_0x2980e8){if(_0x2980e8){return _0x2980e8[_0x6122('0x26')](_0x25aff5)['then'](function(_0x2c9967){return _0x2c9967;});}return null;};}function removeEntity(_0x558bc0,_0x7de029){return function(_0x3a3efa){if(_0x3a3efa){return _0x3a3efa[_0x6122('0x27')]()['then'](function(){var _0x4ea2fb=_0x3a3efa['get']({'plain':!![]});var _0x12df5a='IvrCampaigns';return db[_0x6122('0x28')][_0x6122('0x27')]({'where':{'type':_0x12df5a,'resourceId':_0x4ea2fb['id']}})[_0x6122('0x29')](function(){return _0x3a3efa;});})['then'](function(){_0x558bc0[_0x6122('0x1c')](0xcc)[_0x6122('0x1b')]();});}};}function handleEntityNotFound(_0x472411,_0x5660af){return function(_0x503843){if(!_0x503843){_0x472411[_0x6122('0x1a')](0x194);}return _0x503843;};}function handleError(_0x5ee15a,_0x19487c){_0x19487c=_0x19487c||0x1f4;return function(_0x549c0e){logger['error'](_0x549c0e[_0x6122('0x2a')]);if(_0x549c0e[_0x6122('0x2b')]){delete _0x549c0e[_0x6122('0x2b')];}_0x5ee15a[_0x6122('0x1c')](_0x19487c)[_0x6122('0x2c')](_0x549c0e);};}exports[_0x6122('0x2d')]=function(_0x45b1df,_0x128135){var _0x16fcbd={},_0x540fff={},_0x5ba87e={'count':0x0,'rows':[]};var _0x3cc864=_[_0x6122('0x2e')](db[_0x6122('0x2f')][_0x6122('0x30')],function(_0x341d62){return{'name':_0x341d62['fieldName'],'type':_0x341d62['type'][_0x6122('0x31')]};});_0x540fff[_0x6122('0x32')]=_[_0x6122('0x2e')](_0x3cc864,_0x6122('0x2b'));_0x540fff[_0x6122('0x33')]=_[_0x6122('0x34')](_0x45b1df['query']);_0x540fff[_0x6122('0x35')]=_[_0x6122('0x36')](_0x540fff[_0x6122('0x32')],_0x540fff[_0x6122('0x33')]);_0x16fcbd[_0x6122('0x37')]=_['intersection'](_0x540fff[_0x6122('0x32')],qs[_0x6122('0x38')](_0x45b1df[_0x6122('0x33')][_0x6122('0x38')]));_0x16fcbd[_0x6122('0x37')]=_0x16fcbd['attributes'][_0x6122('0x39')]?_0x16fcbd[_0x6122('0x37')]:_0x540fff[_0x6122('0x32')];if(!_0x45b1df[_0x6122('0x33')][_0x6122('0x3a')](_0x6122('0x3b'))){_0x16fcbd[_0x6122('0x1f')]=qs[_0x6122('0x1f')](_0x45b1df[_0x6122('0x33')]['limit']);_0x16fcbd[_0x6122('0x1d')]=qs[_0x6122('0x1d')](_0x45b1df[_0x6122('0x33')][_0x6122('0x1d')]);}_0x16fcbd[_0x6122('0x3c')]=qs['sort'](_0x45b1df[_0x6122('0x33')][_0x6122('0x3d')]);_0x16fcbd[_0x6122('0x3e')]=qs['filters'](_[_0x6122('0x3f')](_0x45b1df[_0x6122('0x33')],_0x540fff[_0x6122('0x35')]),_0x3cc864);if(_0x45b1df['query']['filter']){_0x16fcbd[_0x6122('0x3e')]=_['merge'](_0x16fcbd[_0x6122('0x3e')],{'$or':_[_0x6122('0x2e')](_0x3cc864,function(_0x52f1ec){if(_0x52f1ec[_0x6122('0x40')]!=='VIRTUAL'){var _0x520753={};_0x520753[_0x52f1ec[_0x6122('0x2b')]]={'$like':'%'+_0x45b1df['query'][_0x6122('0x41')]+'%'};return _0x520753;}})});}_0x16fcbd=_[_0x6122('0x42')]({},_0x16fcbd,_0x45b1df[_0x6122('0x43')]);var _0x5055d8={'where':_0x16fcbd[_0x6122('0x3e')]};return db['Campaign'][_0x6122('0x20')](_0x5055d8)['then'](function(_0x3b2ad3){_0x5ba87e[_0x6122('0x20')]=_0x3b2ad3;if(_0x45b1df[_0x6122('0x33')]['includeAll']){_0x16fcbd['include']=[{'all':!![]}];}return db[_0x6122('0x2f')]['findAll'](_0x16fcbd);})[_0x6122('0x29')](function(_0x5463e4){_0x5ba87e[_0x6122('0x44')]=_0x5463e4;return _0x5ba87e;})[_0x6122('0x29')](respondWithFilteredResult(_0x128135,_0x16fcbd))[_0x6122('0x45')](handleError(_0x128135,null));};exports[_0x6122('0x46')]=function(_0x23422b,_0x39f0b9){var _0x4e3aff={'raw':![],'where':{'id':_0x23422b[_0x6122('0x47')]['id']}},_0x1f2d10={};_0x1f2d10['model']=_[_0x6122('0x34')](db[_0x6122('0x2f')][_0x6122('0x30')]);_0x1f2d10[_0x6122('0x33')]=_['keys'](_0x23422b[_0x6122('0x33')]);_0x1f2d10[_0x6122('0x35')]=_[_0x6122('0x36')](_0x1f2d10['model'],_0x1f2d10[_0x6122('0x33')]);_0x4e3aff['attributes']=_[_0x6122('0x36')](_0x1f2d10['model'],qs[_0x6122('0x38')](_0x23422b['query'][_0x6122('0x38')]));_0x4e3aff[_0x6122('0x37')]=_0x4e3aff[_0x6122('0x37')]['length']?_0x4e3aff[_0x6122('0x37')]:_0x1f2d10[_0x6122('0x32')];if(_0x23422b['query']['includeAll']){_0x4e3aff[_0x6122('0x48')]=[{'all':!![]}];}_0x4e3aff=_[_0x6122('0x42')]({},_0x4e3aff,_0x23422b['options']);return db[_0x6122('0x2f')][_0x6122('0x49')](_0x4e3aff)[_0x6122('0x29')](handleEntityNotFound(_0x39f0b9,null))[_0x6122('0x29')](respondWithResult(_0x39f0b9,null))[_0x6122('0x45')](handleError(_0x39f0b9,null));};exports[_0x6122('0x4a')]=function(_0x46907a,_0x21ae83){return db[_0x6122('0x2f')][_0x6122('0x4a')](_0x46907a['body'],{})[_0x6122('0x29')](function(_0x563da1){var _0x5d773b=_0x46907a[_0x6122('0x4b')][_0x6122('0x4c')]({'plain':!![]});if(!_0x5d773b)throw new Error(_0x6122('0x4d'));if(_0x5d773b['role']===_0x6122('0x4b')){var _0x319675=_0x563da1[_0x6122('0x4c')]({'plain':!![]});var _0x1b5258=_0x6122('0x4e');return db['UserProfileSection'][_0x6122('0x49')]({'where':{'name':_0x1b5258,'userProfileId':_0x5d773b[_0x6122('0x4f')]},'raw':!![]})[_0x6122('0x29')](function(_0x537525){if(_0x537525&&_0x537525[_0x6122('0x50')]===0x0){return db[_0x6122('0x28')][_0x6122('0x4a')]({'name':_0x319675['name'],'resourceId':_0x319675['id'],'type':_0x537525[_0x6122('0x2b')],'sectionId':_0x537525['id']},{})[_0x6122('0x29')](function(){return _0x563da1;});}else{return _0x563da1;}})['catch'](function(_0x371b74){logger[_0x6122('0x51')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x371b74);throw _0x371b74;});}return _0x563da1;})['then'](respondWithResult(_0x21ae83,0xc9))['catch'](handleError(_0x21ae83,null));};exports['clone']=function(_0x366b51,_0x4c99c3){var _0x578ff3={'where':{'id':_0x366b51[_0x6122('0x47')]['id']}},_0x5c7ca6={};_0x5c7ca6[_0x6122('0x32')]=_[_0x6122('0x34')](db[_0x6122('0x2f')][_0x6122('0x30')]);_0x578ff3['attributes']=_['intersection'](_0x5c7ca6[_0x6122('0x32')],qs[_0x6122('0x38')](_0x366b51[_0x6122('0x33')][_0x6122('0x38')]));_0x578ff3[_0x6122('0x37')]=_0x578ff3['attributes'][_0x6122('0x39')]?_0x578ff3['attributes']:_0x5c7ca6['model'];if(_0x366b51['query'][_0x6122('0x52')]){_0x578ff3[_0x6122('0x48')]=[{'all':!![]}];}_0x578ff3=_[_0x6122('0x42')]({},_0x578ff3,_0x366b51[_0x6122('0x43')]);return db[_0x6122('0x2f')][_0x6122('0x49')](_0x578ff3)['then'](handleEntityNotFound(_0x4c99c3,null))['then'](function(_0x112fd4){if(_0x112fd4){var _0x5290be=_0x112fd4[_0x6122('0x4c')]({'plain':!![]});_0x5290be=qs[_0x6122('0x53')](_0x5290be,['id',_0x6122('0x54'),_0x6122('0x55')]);_0x366b51[_0x6122('0x56')]=_[_0x6122('0x53')](_0x366b51[_0x6122('0x56')],['id',_0x6122('0x54'),_0x6122('0x55')]);return db[_0x6122('0x2f')][_0x6122('0x4a')](_[_0x6122('0x42')](_0x5290be,_0x366b51[_0x6122('0x56')]),{'include':_0x366b51[_0x6122('0x33')][_0x6122('0x52')]?[{'all':!![]}]:undefined})[_0x6122('0x29')](function(_0xeffe8d){var _0x5d05f7=_0x366b51[_0x6122('0x4b')][_0x6122('0x4c')]({'plain':!![]});if(!_0x5d05f7)throw new Error(_0x6122('0x4d'));if(_0x5d05f7['role']==='user'){var _0x1bee71=_0xeffe8d[_0x6122('0x4c')]({'plain':!![]});var _0x244168=_0x6122('0x4e');return db[_0x6122('0x57')][_0x6122('0x49')]({'where':{'name':_0x244168,'userProfileId':_0x5d05f7['userProfileId']},'raw':!![]})[_0x6122('0x29')](function(_0x41fb3f){if(_0x41fb3f&&_0x41fb3f[_0x6122('0x50')]===0x0){return db[_0x6122('0x28')][_0x6122('0x4a')]({'name':_0x1bee71[_0x6122('0x2b')],'resourceId':_0x1bee71['id'],'type':_0x41fb3f[_0x6122('0x2b')],'sectionId':_0x41fb3f['id']},{})['then'](function(){return _0xeffe8d;});}else{return _0xeffe8d;}})[_0x6122('0x45')](function(_0x569e4a){logger[_0x6122('0x51')](_0x6122('0x58'),_0x569e4a);throw _0x569e4a;});}return _0xeffe8d;});}})[_0x6122('0x29')](respondWithResult(_0x4c99c3,0xc9))[_0x6122('0x45')](handleError(_0x4c99c3,null));};exports[_0x6122('0x26')]=function(_0x4dd9f8,_0x1c7c13){if(_0x4dd9f8[_0x6122('0x56')]['id']){delete _0x4dd9f8[_0x6122('0x56')]['id'];}return db[_0x6122('0x2f')]['find']({'where':{'id':_0x4dd9f8[_0x6122('0x47')]['id']}})['then'](handleEntityNotFound(_0x1c7c13,null))[_0x6122('0x29')](saveUpdates(_0x4dd9f8[_0x6122('0x56')],null))[_0x6122('0x29')](respondWithResult(_0x1c7c13,null))[_0x6122('0x45')](handleError(_0x1c7c13,null));};exports[_0x6122('0x27')]=function(_0x5a17d6,_0x1a71ea){return db[_0x6122('0x2f')][_0x6122('0x49')]({'where':{'id':_0x5a17d6['params']['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x1a71ea,null))[_0x6122('0x29')](removeEntity(_0x1a71ea,null))[_0x6122('0x45')](handleError(_0x1a71ea,null));};exports['getHoppers']=function(_0x24ffea,_0x71a8f2,_0x45fd5c){var _0x1b5b81={'raw':!![],'where':{}};var _0x459a3b={};var _0x43700d={'count':0x0,'rows':[]};return db[_0x6122('0x2f')]['findOne']({'where':{'id':_0x24ffea['params']['id']}})['then'](handleEntityNotFound(_0x71a8f2,null))[_0x6122('0x29')](function(_0x5e101e){if(_0x5e101e){_0x459a3b[_0x6122('0x32')]=_[_0x6122('0x34')](db[_0x6122('0x59')][_0x6122('0x30')]);_0x459a3b[_0x6122('0x33')]=_[_0x6122('0x34')](_0x24ffea[_0x6122('0x33')]);_0x459a3b[_0x6122('0x35')]=_[_0x6122('0x36')](_0x459a3b[_0x6122('0x32')],_0x459a3b[_0x6122('0x33')]);_0x1b5b81['attributes']=_[_0x6122('0x36')](_0x459a3b['model'],qs[_0x6122('0x38')](_0x24ffea[_0x6122('0x33')][_0x6122('0x38')]));_0x1b5b81[_0x6122('0x37')]=_0x1b5b81['attributes'][_0x6122('0x39')]?_0x1b5b81[_0x6122('0x37')]:_0x459a3b['model'];if(!_0x24ffea[_0x6122('0x33')][_0x6122('0x3a')]('nolimit')){_0x1b5b81[_0x6122('0x1f')]=qs['limit'](_0x24ffea['query'][_0x6122('0x1f')]);_0x1b5b81[_0x6122('0x1d')]=qs['offset'](_0x24ffea['query'][_0x6122('0x1d')]);}_0x1b5b81[_0x6122('0x3c')]=qs[_0x6122('0x3d')](_0x24ffea[_0x6122('0x33')][_0x6122('0x3d')]);_0x1b5b81[_0x6122('0x3e')]=qs[_0x6122('0x35')](_['pick'](_0x24ffea[_0x6122('0x33')],_0x459a3b[_0x6122('0x35')]));_0x1b5b81[_0x6122('0x3e')][_0x6122('0x5a')]=_0x5e101e['id'];if(_0x24ffea['query'][_0x6122('0x41')]){_0x1b5b81[_0x6122('0x3e')]=_[_0x6122('0x42')](_0x1b5b81['where'],{'$or':_[_0x6122('0x2e')](_0x1b5b81[_0x6122('0x37')],function(_0x46b6db){var _0x34e102={};_0x34e102[_0x46b6db]={'$like':'%'+_0x24ffea[_0x6122('0x33')][_0x6122('0x41')]+'%'};return _0x34e102;})});}_0x1b5b81=_[_0x6122('0x42')]({},_0x1b5b81,_0x24ffea[_0x6122('0x43')]);return db[_0x6122('0x59')]['count']({'where':_0x1b5b81[_0x6122('0x3e')]})[_0x6122('0x29')](function(_0x45809b){_0x43700d['count']=_0x45809b;if(_0x24ffea[_0x6122('0x33')][_0x6122('0x52')]){_0x1b5b81[_0x6122('0x48')]=[{'all':!![]}];}return db[_0x6122('0x59')][_0x6122('0x5b')](_0x1b5b81);})[_0x6122('0x29')](function(_0x255221){_0x43700d[_0x6122('0x44')]=_0x255221;return _0x43700d;});}})[_0x6122('0x29')](respondWithFilteredResult(_0x71a8f2,_0x1b5b81))[_0x6122('0x45')](handleError(_0x71a8f2,null));};exports[_0x6122('0x5c')]=function(_0x2cae5f,_0x5e03de,_0x534ece){var _0xf00aee={'raw':!![],'where':{}};var _0x14ce13={};var _0x218d1e={'count':0x0,'rows':[]};return db[_0x6122('0x2f')][_0x6122('0x5d')]({'where':{'id':_0x2cae5f[_0x6122('0x47')]['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x5e03de,null))[_0x6122('0x29')](function(_0x38cfcf){if(_0x38cfcf){_0x14ce13[_0x6122('0x32')]=_[_0x6122('0x34')](db['CmHopperHistory'][_0x6122('0x30')]);_0x14ce13[_0x6122('0x33')]=_[_0x6122('0x34')](_0x2cae5f[_0x6122('0x33')]);_0x14ce13[_0x6122('0x35')]=_[_0x6122('0x36')](_0x14ce13[_0x6122('0x32')],_0x14ce13[_0x6122('0x33')]);_0xf00aee['attributes']=_['intersection'](_0x14ce13[_0x6122('0x32')],qs[_0x6122('0x38')](_0x2cae5f[_0x6122('0x33')]['fields']));_0xf00aee['attributes']=_0xf00aee['attributes'][_0x6122('0x39')]?_0xf00aee[_0x6122('0x37')]:_0x14ce13[_0x6122('0x32')];if(!_0x2cae5f[_0x6122('0x33')][_0x6122('0x3a')](_0x6122('0x3b'))){_0xf00aee['limit']=qs[_0x6122('0x1f')](_0x2cae5f['query'][_0x6122('0x1f')]);_0xf00aee[_0x6122('0x1d')]=qs[_0x6122('0x1d')](_0x2cae5f['query'][_0x6122('0x1d')]);}_0xf00aee[_0x6122('0x3c')]=qs['sort'](_0x2cae5f[_0x6122('0x33')]['sort']);_0xf00aee[_0x6122('0x3e')]=qs[_0x6122('0x35')](_[_0x6122('0x3f')](_0x2cae5f[_0x6122('0x33')],_0x14ce13[_0x6122('0x35')]));_0xf00aee[_0x6122('0x3e')]['CampaignId']=_0x38cfcf['id'];if(_0x2cae5f[_0x6122('0x33')][_0x6122('0x41')]){_0xf00aee[_0x6122('0x3e')]=_[_0x6122('0x42')](_0xf00aee[_0x6122('0x3e')],{'$or':_[_0x6122('0x2e')](_0xf00aee[_0x6122('0x37')],function(_0x35519d){var _0x4a0739={};_0x4a0739[_0x35519d]={'$like':'%'+_0x2cae5f['query'][_0x6122('0x41')]+'%'};return _0x4a0739;})});}_0xf00aee=_[_0x6122('0x42')]({},_0xf00aee,_0x2cae5f[_0x6122('0x43')]);return db[_0x6122('0x5e')][_0x6122('0x20')]({'where':_0xf00aee[_0x6122('0x3e')]})['then'](function(_0x1b15c1){_0x218d1e['count']=_0x1b15c1;if(_0x2cae5f[_0x6122('0x33')]['includeAll']){_0xf00aee[_0x6122('0x48')]=[{'all':!![]}];}return db[_0x6122('0x5e')][_0x6122('0x5b')](_0xf00aee);})[_0x6122('0x29')](function(_0x565841){_0x218d1e[_0x6122('0x44')]=_0x565841;return _0x218d1e;});}})[_0x6122('0x29')](respondWithFilteredResult(_0x5e03de,_0xf00aee))[_0x6122('0x45')](handleError(_0x5e03de,null));};exports[_0x6122('0x5f')]=function(_0x5571ef,_0xc3abed,_0x590104){var _0x114fa4={'raw':!![],'where':{}};var _0x109902={};var _0x19c43c={'count':0x0,'rows':[]};return db[_0x6122('0x2f')][_0x6122('0x5d')]({'where':{'id':_0x5571ef[_0x6122('0x47')]['id']}})['then'](handleEntityNotFound(_0xc3abed,null))[_0x6122('0x29')](function(_0x7092e2){if(_0x7092e2){_0x109902[_0x6122('0x32')]=_[_0x6122('0x34')](db[_0x6122('0x60')][_0x6122('0x30')]);_0x109902[_0x6122('0x33')]=_[_0x6122('0x34')](_0x5571ef[_0x6122('0x33')]);_0x109902['filters']=_[_0x6122('0x36')](_0x109902['model'],_0x109902[_0x6122('0x33')]);_0x114fa4[_0x6122('0x37')]=_[_0x6122('0x36')](_0x109902[_0x6122('0x32')],qs[_0x6122('0x38')](_0x5571ef[_0x6122('0x33')][_0x6122('0x38')]));_0x114fa4[_0x6122('0x37')]=_0x114fa4[_0x6122('0x37')]['length']?_0x114fa4[_0x6122('0x37')]:_0x109902[_0x6122('0x32')];if(!_0x5571ef['query'][_0x6122('0x3a')](_0x6122('0x3b'))){_0x114fa4[_0x6122('0x1f')]=qs[_0x6122('0x1f')](_0x5571ef[_0x6122('0x33')]['limit']);_0x114fa4[_0x6122('0x1d')]=qs[_0x6122('0x1d')](_0x5571ef[_0x6122('0x33')][_0x6122('0x1d')]);}_0x114fa4['order']=qs[_0x6122('0x3d')](_0x5571ef[_0x6122('0x33')][_0x6122('0x3d')]);_0x114fa4[_0x6122('0x3e')]=qs['filters'](_[_0x6122('0x3f')](_0x5571ef[_0x6122('0x33')],_0x109902[_0x6122('0x35')]));_0x114fa4[_0x6122('0x3e')]['CampaignId']=_0x7092e2['id'];if(_0x5571ef['query'][_0x6122('0x41')]){_0x114fa4[_0x6122('0x3e')]=_[_0x6122('0x42')](_0x114fa4[_0x6122('0x3e')],{'$or':_[_0x6122('0x2e')](_0x114fa4[_0x6122('0x37')],function(_0x48bb32){var _0x526a14={};_0x526a14[_0x48bb32]={'$like':'%'+_0x5571ef[_0x6122('0x33')][_0x6122('0x41')]+'%'};return _0x526a14;})});}_0x114fa4=_[_0x6122('0x42')]({},_0x114fa4,_0x5571ef[_0x6122('0x43')]);return db[_0x6122('0x60')][_0x6122('0x20')]({'where':_0x114fa4['where']})[_0x6122('0x29')](function(_0x593d7c){_0x19c43c['count']=_0x593d7c;if(_0x5571ef[_0x6122('0x33')][_0x6122('0x52')]){_0x114fa4[_0x6122('0x48')]=[{'all':!![]}];}return db[_0x6122('0x60')][_0x6122('0x5b')](_0x114fa4);})['then'](function(_0x5dc304){_0x19c43c[_0x6122('0x44')]=_0x5dc304;return _0x19c43c;});}})['then'](respondWithFilteredResult(_0xc3abed,_0x114fa4))[_0x6122('0x45')](handleError(_0xc3abed,null));};exports['getHopperBlacks']=function(_0x29c346,_0x4bd4a5,_0x1f300e){var _0x52f9db={'raw':!![],'where':{}};var _0xa9d4e0={};var _0x3d18d2={'count':0x0,'rows':[]};return db[_0x6122('0x2f')][_0x6122('0x5d')]({'where':{'id':_0x29c346[_0x6122('0x47')]['id']}})['then'](handleEntityNotFound(_0x4bd4a5,null))[_0x6122('0x29')](function(_0x233bc5){if(_0x233bc5){_0xa9d4e0[_0x6122('0x32')]=_[_0x6122('0x34')](db[_0x6122('0x61')][_0x6122('0x30')]);_0xa9d4e0[_0x6122('0x33')]=_['keys'](_0x29c346[_0x6122('0x33')]);_0xa9d4e0[_0x6122('0x35')]=_[_0x6122('0x36')](_0xa9d4e0[_0x6122('0x32')],_0xa9d4e0[_0x6122('0x33')]);_0x52f9db[_0x6122('0x37')]=_[_0x6122('0x36')](_0xa9d4e0[_0x6122('0x32')],qs[_0x6122('0x38')](_0x29c346['query'][_0x6122('0x38')]));_0x52f9db[_0x6122('0x37')]=_0x52f9db[_0x6122('0x37')][_0x6122('0x39')]?_0x52f9db[_0x6122('0x37')]:_0xa9d4e0['model'];if(!_0x29c346[_0x6122('0x33')]['hasOwnProperty'](_0x6122('0x3b'))){_0x52f9db['limit']=qs['limit'](_0x29c346[_0x6122('0x33')][_0x6122('0x1f')]);_0x52f9db[_0x6122('0x1d')]=qs[_0x6122('0x1d')](_0x29c346['query'][_0x6122('0x1d')]);}_0x52f9db[_0x6122('0x3c')]=qs['sort'](_0x29c346['query'][_0x6122('0x3d')]);_0x52f9db[_0x6122('0x3e')]=qs[_0x6122('0x35')](_[_0x6122('0x3f')](_0x29c346[_0x6122('0x33')],_0xa9d4e0[_0x6122('0x35')]));_0x52f9db[_0x6122('0x3e')]['CampaignId']=_0x233bc5['id'];if(_0x29c346[_0x6122('0x33')][_0x6122('0x41')]){_0x52f9db[_0x6122('0x3e')]=_[_0x6122('0x42')](_0x52f9db[_0x6122('0x3e')],{'$or':_[_0x6122('0x2e')](_0x52f9db[_0x6122('0x37')],function(_0x1a800b){var _0x2cf82f={};_0x2cf82f[_0x1a800b]={'$like':'%'+_0x29c346[_0x6122('0x33')][_0x6122('0x41')]+'%'};return _0x2cf82f;})});}_0x52f9db=_['merge']({},_0x52f9db,_0x29c346[_0x6122('0x43')]);return db['CmHopperBlack']['count']({'where':_0x52f9db['where']})[_0x6122('0x29')](function(_0x50ad73){_0x3d18d2[_0x6122('0x20')]=_0x50ad73;if(_0x29c346[_0x6122('0x33')][_0x6122('0x52')]){_0x52f9db[_0x6122('0x48')]=[{'all':!![]}];}return db[_0x6122('0x61')][_0x6122('0x5b')](_0x52f9db);})[_0x6122('0x29')](function(_0x20663b){_0x3d18d2[_0x6122('0x44')]=_0x20663b;return _0x3d18d2;});}})[_0x6122('0x29')](respondWithFilteredResult(_0x4bd4a5,_0x52f9db))[_0x6122('0x45')](handleError(_0x4bd4a5,null));};exports[_0x6122('0x62')]=function(_0x168686,_0x4ca6b1,_0x5e5b6b){var _0x3193ba={};var _0x1d6836={};var _0x421a58;var _0x548499;return db[_0x6122('0x2f')][_0x6122('0x5d')]({'where':{'id':_0x168686[_0x6122('0x47')]['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x4ca6b1,null))[_0x6122('0x29')](function(_0xcc995){if(_0xcc995){_0x421a58=_0xcc995;_0x1d6836['model']=_['keys'](db[_0x6122('0x63')][_0x6122('0x30')]);_0x1d6836['query']=_[_0x6122('0x34')](_0x168686[_0x6122('0x33')]);_0x1d6836[_0x6122('0x35')]=_[_0x6122('0x36')](_0x1d6836[_0x6122('0x32')],_0x1d6836[_0x6122('0x33')]);_0x3193ba[_0x6122('0x37')]=_['intersection'](_0x1d6836[_0x6122('0x32')],qs['fields'](_0x168686[_0x6122('0x33')][_0x6122('0x38')]));_0x3193ba[_0x6122('0x37')]=_0x3193ba[_0x6122('0x37')][_0x6122('0x39')]?_0x3193ba['attributes']:_0x1d6836[_0x6122('0x32')];_0x3193ba[_0x6122('0x3c')]=qs[_0x6122('0x3d')](_0x168686[_0x6122('0x33')][_0x6122('0x3d')]);_0x3193ba['where']=qs[_0x6122('0x35')](_[_0x6122('0x3f')](_0x168686[_0x6122('0x33')],_0x1d6836[_0x6122('0x35')]));if(_0x168686[_0x6122('0x33')][_0x6122('0x41')]){_0x3193ba[_0x6122('0x3e')]=_[_0x6122('0x42')](_0x3193ba[_0x6122('0x3e')],{'$or':_['map'](_0x3193ba['attributes'],function(_0x19116d){var _0x30d4c1={};_0x30d4c1[_0x19116d]={'$like':'%'+_0x168686[_0x6122('0x33')][_0x6122('0x41')]+'%'};return _0x30d4c1;})});}_0x3193ba=_[_0x6122('0x42')]({},_0x3193ba,_0x168686[_0x6122('0x43')]);return _0x421a58[_0x6122('0x62')](_0x3193ba);}})[_0x6122('0x29')](function(_0x4f83e4){if(_0x4f83e4){_0x548499=_0x4f83e4[_0x6122('0x39')];if(!_0x168686[_0x6122('0x33')][_0x6122('0x3a')](_0x6122('0x3b'))){_0x3193ba[_0x6122('0x1f')]=qs[_0x6122('0x1f')](_0x168686[_0x6122('0x33')][_0x6122('0x1f')]);_0x3193ba[_0x6122('0x1d')]=qs[_0x6122('0x1d')](_0x168686[_0x6122('0x33')][_0x6122('0x1d')]);}return _0x421a58[_0x6122('0x62')](_0x3193ba);}})['then'](function(_0x5b330d){if(_0x5b330d){return _0x5b330d?{'count':_0x548499,'rows':_0x5b330d}:null;}})[_0x6122('0x29')](respondWithResult(_0x4ca6b1,null))[_0x6122('0x45')](handleError(_0x4ca6b1,null));};exports[_0x6122('0x64')]=function(_0x5f112d,_0x3d1c66,_0x592f67){var _0x4c26e7,_0x1825bf;var _0x36bae2=[];var _0x9233d1=moment()['format'](_0x6122('0x65'));return db[_0x6122('0x2f')][_0x6122('0x49')]({'where':{'id':_0x5f112d[_0x6122('0x47')]['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x3d1c66,null))[_0x6122('0x29')](function(_0x362796){if(_0x362796){_0x1825bf=_0x362796;return _0x362796[_0x6122('0x64')](_0x5f112d[_0x6122('0x56')][_0x6122('0x66')],_[_0x6122('0x53')](_0x5f112d[_0x6122('0x56')],[_0x6122('0x66'),'id'])||{});}return null;})[_0x6122('0x67')](function(_0x15487a){var _0x242fc0;var _0x483638;_0x4c26e7=_0x15487a||[];var _0x2faa3c=[];if(_0x15487a){for(var _0x2404da=0x0;_0x2404da<_0x15487a[_0x6122('0x39')];_0x2404da+=0x1){var _0x45ccef=_0x15487a[_0x2404da][_0x6122('0x4c')]({'plain':!![]});_0x1825bf[_0x6122('0x68')]=_0x5f112d['body'][_0x6122('0x68')]?_0x5f112d[_0x6122('0x56')][_0x6122('0x68')]:_0x1825bf[_0x6122('0x68')];switch(_0x1825bf[_0x6122('0x68')]){case'always':_0x242fc0=squel[_0x6122('0x69')]()['into'](_0x6122('0x6a'))[_0x6122('0x6b')]([_0x6122('0x6c'),_0x6122('0x6d'),_0x6122('0x6e'),_0x6122('0x6f'),_0x6122('0x5a'),_0x6122('0x54'),_0x6122('0x55')],squel[_0x6122('0x70')]()[_0x6122('0x71')]('phone',_0x6122('0x6c'))[_0x6122('0x71')](_0x6122('0x72'),_0x6122('0x6d'))[_0x6122('0x71')]('id','ContactId')['field'](_0x45ccef[_0x6122('0x73')]['toString'](),_0x6122('0x6f'))[_0x6122('0x71')](_0x5f112d[_0x6122('0x47')]['id'][_0x6122('0x74')](),'CampaignId')['field']('\x27'+_0x9233d1+'\x27','createdAt')[_0x6122('0x71')]('\x27'+_0x9233d1+'\x27','updatedAt')[_0x6122('0x75')](_0x6122('0x76'))['where'](_0x6122('0x77'))['where'](_0x6122('0x78'),_0x45ccef[_0x6122('0x73')][_0x6122('0x74')]())['where'](_0x6122('0x79'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x6122('0x70')]()[_0x6122('0x71')](_0x6122('0x7a'))[_0x6122('0x75')](_0x6122('0x7b'))[_0x6122('0x3e')](_0x6122('0x7c'),_0x5f112d['params']['id'][_0x6122('0x74')]()))['where'](_0x6122('0x7d'),squel['select']()[_0x6122('0x71')](_0x6122('0x7e'))[_0x6122('0x75')]('cm_hopper')[_0x6122('0x3e')](_0x6122('0x7c'),_0x5f112d[_0x6122('0x47')]['id'][_0x6122('0x74')]())))['toString']();break;case _0x6122('0x7f'):_0x242fc0=squel[_0x6122('0x69')]()[_0x6122('0x80')](_0x6122('0x6a'))['fromQuery'](['phone',_0x6122('0x6d'),_0x6122('0x6e'),_0x6122('0x6f'),'CampaignId',_0x6122('0x54'),_0x6122('0x55')],squel[_0x6122('0x70')]()[_0x6122('0x71')](_0x6122('0x6c'),_0x6122('0x6c'))['field']('NOW()',_0x6122('0x6d'))[_0x6122('0x71')]('id','ContactId')[_0x6122('0x71')](_0x45ccef['CmListId'][_0x6122('0x74')](),'ListId')['field'](_0x5f112d['params']['id'][_0x6122('0x74')](),'CampaignId')[_0x6122('0x71')]('\x27'+_0x9233d1+'\x27','createdAt')[_0x6122('0x71')]('\x27'+_0x9233d1+'\x27',_0x6122('0x55'))['from'](_0x6122('0x76'))[_0x6122('0x3e')](_0x6122('0x77'))[_0x6122('0x3e')](_0x6122('0x78'),_0x45ccef['CmListId'][_0x6122('0x74')]())['where'](_0x6122('0x79'))[_0x6122('0x3e')]('phone\x20NOT\x20IN\x20(?)',squel[_0x6122('0x70')]()[_0x6122('0x71')]('COALESCE(phone,\x27\x27)')[_0x6122('0x75')]('cm_hopper')[_0x6122('0x3e')](_0x6122('0x7c'),_0x5f112d[_0x6122('0x47')]['id'][_0x6122('0x74')]())))['toString']();break;default:_0x242fc0=squel[_0x6122('0x69')]()['into']('cm_hopper')['fromQuery']([_0x6122('0x6c'),'scheduledAt',_0x6122('0x6e'),_0x6122('0x6f'),_0x6122('0x5a'),_0x6122('0x54'),_0x6122('0x55')],squel['select']()['field'](_0x6122('0x6c'),_0x6122('0x6c'))[_0x6122('0x71')]('NOW()',_0x6122('0x6d'))[_0x6122('0x71')]('id',_0x6122('0x6e'))[_0x6122('0x71')](_0x45ccef[_0x6122('0x73')][_0x6122('0x74')](),_0x6122('0x6f'))[_0x6122('0x71')](_0x5f112d[_0x6122('0x47')]['id'][_0x6122('0x74')](),_0x6122('0x5a'))[_0x6122('0x71')]('\x27'+_0x9233d1+'\x27',_0x6122('0x54'))['field']('\x27'+_0x9233d1+'\x27',_0x6122('0x55'))[_0x6122('0x75')](_0x6122('0x76'))[_0x6122('0x3e')](_0x6122('0x77'))[_0x6122('0x3e')](_0x6122('0x78'),_0x45ccef[_0x6122('0x73')][_0x6122('0x74')]())['where']('phone\x20IS\x20NOT\x20NULL'))[_0x6122('0x74')]();}_0x483638=squel['insert']()[_0x6122('0x80')](_0x6122('0x81'))['fromQuery'](['cmHopperId',_0x6122('0x6d'),'phone',_0x6122('0x82'),'createdAt','updatedAt'],squel['select']()[_0x6122('0x71')](_0x6122('0x83'),'id')[_0x6122('0x71')](_0x6122('0x72'),'scheduledAt')[_0x6122('0x71')](_0x6122('0x84'),_0x6122('0x6c'))[_0x6122('0x71')](_0x6122('0x85'),_0x6122('0x82'))[_0x6122('0x71')]('\x27'+_0x9233d1+'\x27',_0x6122('0x54'))[_0x6122('0x71')]('\x27'+_0x9233d1+'\x27','updatedAt')['from'](_0x6122('0x86'),'ci')[_0x6122('0x87')](_0x6122('0x6a'),'h',_0x6122('0x88'))[_0x6122('0x3e')](_0x6122('0x89'),_0x45ccef[_0x6122('0x73')][_0x6122('0x74')]())[_0x6122('0x3e')]('h.CampaignId=?',_0x5f112d['params']['id'][_0x6122('0x74')]())[_0x6122('0x3e')]('h.createdAt\x20=\x20?',_0x9233d1))[_0x6122('0x74')]();_0x2faa3c[_0x6122('0x8a')](db[_0x6122('0x8b')][_0x6122('0x33')](_0x242fc0));_0x36bae2[_0x6122('0x8a')](db[_0x6122('0x8b')]['query'](_0x483638));}return BPromise[_0x6122('0x8c')](_0x2faa3c);}})[_0x6122('0x29')](function(){return BPromise[_0x6122('0x8c')](_0x36bae2);})[_0x6122('0x29')](function(){return _0x4c26e7;})['then'](respondWithResult(_0x3d1c66,null))[_0x6122('0x45')](handleError(_0x3d1c66,null));};exports[_0x6122('0x8d')]=function(_0x5c34e2,_0x220598,_0x124494){return db[_0x6122('0x2f')][_0x6122('0x49')]({'where':{'id':_0x5c34e2['params']['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x220598,null))[_0x6122('0x29')](function(_0x40bf20){if(_0x40bf20){return _0x40bf20[_0x6122('0x8d')](_0x5c34e2[_0x6122('0x33')]['ids']);}})[_0x6122('0x29')](function(_0x586340){if(_0x586340){return db[_0x6122('0x59')][_0x6122('0x27')]({'where':{'ListId':_0x5c34e2['query'][_0x6122('0x66')],'CampaignId':_0x5c34e2[_0x6122('0x47')]['id']}})['then'](function(){return _0x586340;});}})[_0x6122('0x29')](respondWithStatusCode(_0x220598,null))[_0x6122('0x45')](handleError(_0x220598,null));};exports[_0x6122('0x8e')]=function(_0x4e6715,_0x184c5e,_0x4c408a){var _0x29c532={};var _0x54b0a2={};var _0x39a7f7;var _0x5c4646;return db['Campaign'][_0x6122('0x5d')]({'where':{'id':_0x4e6715[_0x6122('0x47')]['id']}})['then'](handleEntityNotFound(_0x184c5e,null))[_0x6122('0x29')](function(_0x32ef98){if(_0x32ef98){_0x39a7f7=_0x32ef98;_0x54b0a2['model']=_[_0x6122('0x34')](db[_0x6122('0x63')][_0x6122('0x30')]);_0x54b0a2[_0x6122('0x33')]=_[_0x6122('0x34')](_0x4e6715['query']);_0x54b0a2[_0x6122('0x35')]=_['intersection'](_0x54b0a2['model'],_0x54b0a2[_0x6122('0x33')]);_0x29c532[_0x6122('0x37')]=_[_0x6122('0x36')](_0x54b0a2[_0x6122('0x32')],qs[_0x6122('0x38')](_0x4e6715[_0x6122('0x33')][_0x6122('0x38')]));_0x29c532['attributes']=_0x29c532['attributes']['length']?_0x29c532['attributes']:_0x54b0a2[_0x6122('0x32')];_0x29c532[_0x6122('0x3c')]=qs['sort'](_0x4e6715[_0x6122('0x33')][_0x6122('0x3d')]);_0x29c532[_0x6122('0x3e')]=qs[_0x6122('0x35')](_[_0x6122('0x3f')](_0x4e6715[_0x6122('0x33')],_0x54b0a2[_0x6122('0x35')]));if(_0x4e6715[_0x6122('0x33')]['filter']){_0x29c532[_0x6122('0x3e')]=_['merge'](_0x29c532[_0x6122('0x3e')],{'$or':_[_0x6122('0x2e')](_0x29c532[_0x6122('0x37')],function(_0x281740){var _0x2f09c3={};_0x2f09c3[_0x281740]={'$like':'%'+_0x4e6715[_0x6122('0x33')]['filter']+'%'};return _0x2f09c3;})});}_0x29c532=_[_0x6122('0x42')]({},_0x29c532,_0x4e6715[_0x6122('0x43')]);return _0x39a7f7[_0x6122('0x8e')](_0x29c532);}})['then'](function(_0x1fccdf){if(_0x1fccdf){_0x5c4646=_0x1fccdf['length'];if(!_0x4e6715[_0x6122('0x33')]['hasOwnProperty']('nolimit')){_0x29c532['limit']=qs['limit'](_0x4e6715[_0x6122('0x33')][_0x6122('0x1f')]);_0x29c532[_0x6122('0x1d')]=qs[_0x6122('0x1d')](_0x4e6715[_0x6122('0x33')][_0x6122('0x1d')]);}return _0x39a7f7[_0x6122('0x8e')](_0x29c532);}})['then'](function(_0x45a3b5){if(_0x45a3b5){return _0x45a3b5?{'count':_0x5c4646,'rows':_0x45a3b5}:null;}})[_0x6122('0x29')](respondWithResult(_0x184c5e,null))[_0x6122('0x45')](handleError(_0x184c5e,null));};exports['addBlackLists']=function(_0x1b0357,_0x451bf7,_0x12cd3a){var _0x58390e,_0xf4ea04;var _0x3be502=[];var _0x4f92c5=moment()[_0x6122('0x8f')](_0x6122('0x65'));return db[_0x6122('0x2f')][_0x6122('0x49')]({'where':{'id':_0x1b0357[_0x6122('0x47')]['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x451bf7,null))['then'](function(_0x127836){if(_0x127836){_0xf4ea04=_0x127836;return _0x127836[_0x6122('0x90')](_0x1b0357[_0x6122('0x56')][_0x6122('0x66')],_[_0x6122('0x53')](_0x1b0357['body'],[_0x6122('0x66'),'id'])||{});}return null;})[_0x6122('0x67')](function(_0x3ddade){var _0x4c8e9c;var _0x45edc7;_0x58390e=_0x3ddade||[];var _0x1d465c=[];if(_0x3ddade){for(var _0x2ef407=0x0;_0x2ef407<_0x3ddade[_0x6122('0x39')];_0x2ef407+=0x1){var _0x5d05bb=_0x3ddade[_0x2ef407][_0x6122('0x4c')]({'plain':!![]});_0x4c8e9c=squel['insert']()['into'](_0x6122('0x91'))['fromQuery']([_0x6122('0x6c'),'ContactId','ListId',_0x6122('0x5a'),_0x6122('0x54'),_0x6122('0x55')],squel[_0x6122('0x70')]()[_0x6122('0x71')]('phone',_0x6122('0x6c'))['field']('id',_0x6122('0x6e'))['field'](_0x5d05bb[_0x6122('0x73')][_0x6122('0x74')](),'ListId')[_0x6122('0x71')](_0x1b0357[_0x6122('0x47')]['id'][_0x6122('0x74')](),_0x6122('0x5a'))[_0x6122('0x71')](_0x6122('0x72'),'createdAt')[_0x6122('0x71')](_0x6122('0x72'),_0x6122('0x55'))[_0x6122('0x75')]('cm_contacts')[_0x6122('0x3e')](_0x6122('0x77'))[_0x6122('0x3e')](_0x6122('0x78'),_0x5d05bb[_0x6122('0x73')][_0x6122('0x74')]())[_0x6122('0x3e')](_0x6122('0x79')))[_0x6122('0x74')]();_0x1d465c['push'](db[_0x6122('0x8b')][_0x6122('0x33')](_0x4c8e9c));}return BPromise[_0x6122('0x8c')](_0x1d465c);}})['then'](function(){return _0x58390e;})[_0x6122('0x29')](respondWithResult(_0x451bf7,null))['catch'](handleError(_0x451bf7,null));};exports[_0x6122('0x92')]=function(_0x1a7cbf,_0x487590,_0x3f5322){return db[_0x6122('0x2f')][_0x6122('0x49')]({'where':{'id':_0x1a7cbf[_0x6122('0x47')]['id']}})[_0x6122('0x29')](handleEntityNotFound(_0x487590,null))[_0x6122('0x29')](function(_0x4beb96){if(_0x4beb96){return _0x4beb96[_0x6122('0x92')](_0x1a7cbf['query'][_0x6122('0x66')]);}})[_0x6122('0x29')](function(_0x156d9b){if(_0x156d9b){return db[_0x6122('0x61')][_0x6122('0x27')]({'where':{'ListId':_0x1a7cbf[_0x6122('0x33')][_0x6122('0x66')],'CampaignId':_0x1a7cbf['params']['id']}})[_0x6122('0x29')](function(){return _0x156d9b;});}})[_0x6122('0x29')](respondWithStatusCode(_0x487590,null))[_0x6122('0x45')](handleError(_0x487590,null));};
\ No newline at end of file
+var _0xa8d8=['sendStatus','status','json','offset','undefined','limit','count','apply','reject','update','then','destroy','IvrCampaigns','UserProfileResource','end','error','name','index','map','rawAttributes','fieldName','key','model','query','intersection','attributes','fields','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','Campaign','includeAll','include','rows','catch','show','params','keys','length','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','updatedAt','createdAt','findOne','CmHopper','hasOwnProperty','nolimit','order','CampaignId','findAll','getHopperHistories','CmHopperHistory','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','CmList','getLists','addLists','format','ids','dialCheckDuplicateType','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','ListId','phone','field','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','select','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','CampaignId\x20=\x20?','COALESCE(phone,\x27\x27)','NOW()','ListId\x20=\x20?','cm_hopper_additional_phones','cmHopperId','h.id','ci.item','ci.OrderBY','cm_contact_has_items','join','h.ContactId\x20=\x20ci.CmContactId','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','YYYY-MM-DD\x20HH:mm:ss','cm_hopper_black','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','crypto','jsforce','papaparse','../../components/parsers/advancedSearch','../../config/environment','../../config/license/util'];(function(_0x17787b,_0x56d009){var _0x13ca17=function(_0x29b586){while(--_0x29b586){_0x17787b['push'](_0x17787b['shift']());}};_0x13ca17(++_0x56d009);}(_0xa8d8,0x79));var _0x8a8d=function(_0x4da321,_0x409efe){_0x4da321=_0x4da321-0x0;var _0x1c3bc1=_0xa8d8[_0x4da321];return _0x1c3bc1;};'use strict';var emlformat=require(_0x8a8d('0x0'));var rimraf=require(_0x8a8d('0x1'));var zipdir=require(_0x8a8d('0x2'));var jsonpatch=require(_0x8a8d('0x3'));var rp=require(_0x8a8d('0x4'));var moment=require(_0x8a8d('0x5'));var BPromise=require(_0x8a8d('0x6'));var Mustache=require('mustache');var util=require(_0x8a8d('0x7'));var path=require('path');var sox=require(_0x8a8d('0x8'));var csv=require(_0x8a8d('0x9'));var ejs=require(_0x8a8d('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8a8d('0xb'));var squel=require('squel');var crypto=require(_0x8a8d('0xc'));var jsforce=require(_0x8a8d('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8a8d('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x8a8d('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x8a8d('0x10'));var licenseUtil=require(_0x8a8d('0x11'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5f02bd,_0x59ec0f){_0x59ec0f=_0x59ec0f||0xcc;return function(_0x22774e){if(_0x22774e){return _0x5f02bd[_0x8a8d('0x12')](_0x59ec0f);}return _0x5f02bd['status'](_0x59ec0f)['end']();};}function respondWithResult(_0x466990,_0x33a710){_0x33a710=_0x33a710||0xc8;return function(_0x5ec00f){if(_0x5ec00f){return _0x466990[_0x8a8d('0x13')](_0x33a710)[_0x8a8d('0x14')](_0x5ec00f);}};}function respondWithFilteredResult(_0x341602,_0x2fc39b){return function(_0x2e9477){if(_0x2e9477){var _0xbfc2af=typeof _0x2fc39b[_0x8a8d('0x15')]===_0x8a8d('0x16')&&typeof _0x2fc39b[_0x8a8d('0x17')]==='undefined';var _0x399287=_0x2e9477[_0x8a8d('0x18')];var _0x356c8a=_0xbfc2af?0x0:_0x2fc39b[_0x8a8d('0x15')];var _0x39a732=_0xbfc2af?_0x2e9477[_0x8a8d('0x18')]:_0x2fc39b[_0x8a8d('0x15')]+_0x2fc39b[_0x8a8d('0x17')];var _0x476007;if(_0x39a732>=_0x399287){_0x39a732=_0x399287;_0x476007=0xc8;}else{_0x476007=0xce;}_0x341602[_0x8a8d('0x13')](_0x476007);return _0x341602['set']('Content-Range',_0x356c8a+'-'+_0x39a732+'/'+_0x399287)[_0x8a8d('0x14')](_0x2e9477);}return null;};}function patchUpdates(_0x54cdce){return function(_0x4570ef){try{jsonpatch[_0x8a8d('0x19')](_0x4570ef,_0x54cdce,!![]);}catch(_0x5ecbaa){return BPromise[_0x8a8d('0x1a')](_0x5ecbaa);}return _0x4570ef['save']();};}function saveUpdates(_0xe02481,_0x4bf3d2){return function(_0x626487){if(_0x626487){return _0x626487[_0x8a8d('0x1b')](_0xe02481)[_0x8a8d('0x1c')](function(_0xa8d0be){return _0xa8d0be;});}return null;};}function removeEntity(_0x2a1932,_0x1c720f){return function(_0x5baa34){if(_0x5baa34){return _0x5baa34[_0x8a8d('0x1d')]()[_0x8a8d('0x1c')](function(){var _0x303d3a=_0x5baa34['get']({'plain':!![]});var _0x10f8f6=_0x8a8d('0x1e');return db[_0x8a8d('0x1f')][_0x8a8d('0x1d')]({'where':{'type':_0x10f8f6,'resourceId':_0x303d3a['id']}})[_0x8a8d('0x1c')](function(){return _0x5baa34;});})[_0x8a8d('0x1c')](function(){_0x2a1932[_0x8a8d('0x13')](0xcc)[_0x8a8d('0x20')]();});}};}function handleEntityNotFound(_0x431d3d,_0x7fdfad){return function(_0x120fd5){if(!_0x120fd5){_0x431d3d[_0x8a8d('0x12')](0x194);}return _0x120fd5;};}function handleError(_0x38bd9e,_0x23bbcd){_0x23bbcd=_0x23bbcd||0x1f4;return function(_0x265680){logger[_0x8a8d('0x21')](_0x265680['stack']);if(_0x265680[_0x8a8d('0x22')]){delete _0x265680[_0x8a8d('0x22')];}_0x38bd9e[_0x8a8d('0x13')](_0x23bbcd)['send'](_0x265680);};}exports[_0x8a8d('0x23')]=function(_0x56332a,_0x238bba){var _0x38e8af={},_0x21a076={},_0x14bf04={'count':0x0,'rows':[]};var _0x2ed5a7=_[_0x8a8d('0x24')](db['Campaign'][_0x8a8d('0x25')],function(_0x31f7fe){return{'name':_0x31f7fe[_0x8a8d('0x26')],'type':_0x31f7fe['type'][_0x8a8d('0x27')]};});_0x21a076[_0x8a8d('0x28')]=_[_0x8a8d('0x24')](_0x2ed5a7,'name');_0x21a076[_0x8a8d('0x29')]=_['keys'](_0x56332a[_0x8a8d('0x29')]);_0x21a076['filters']=_[_0x8a8d('0x2a')](_0x21a076[_0x8a8d('0x28')],_0x21a076[_0x8a8d('0x29')]);_0x38e8af[_0x8a8d('0x2b')]=_[_0x8a8d('0x2a')](_0x21a076[_0x8a8d('0x28')],qs[_0x8a8d('0x2c')](_0x56332a[_0x8a8d('0x29')]['fields']));_0x38e8af[_0x8a8d('0x2b')]=_0x38e8af[_0x8a8d('0x2b')]['length']?_0x38e8af[_0x8a8d('0x2b')]:_0x21a076['model'];if(!_0x56332a[_0x8a8d('0x29')]['hasOwnProperty']('nolimit')){_0x38e8af[_0x8a8d('0x17')]=qs[_0x8a8d('0x17')](_0x56332a[_0x8a8d('0x29')][_0x8a8d('0x17')]);_0x38e8af[_0x8a8d('0x15')]=qs[_0x8a8d('0x15')](_0x56332a[_0x8a8d('0x29')][_0x8a8d('0x15')]);}_0x38e8af['order']=qs['sort'](_0x56332a['query'][_0x8a8d('0x2d')]);_0x38e8af[_0x8a8d('0x2e')]=qs[_0x8a8d('0x2f')](_[_0x8a8d('0x30')](_0x56332a[_0x8a8d('0x29')],_0x21a076[_0x8a8d('0x2f')]),_0x2ed5a7);if(_0x56332a[_0x8a8d('0x29')][_0x8a8d('0x31')]){_0x38e8af[_0x8a8d('0x2e')]=_[_0x8a8d('0x32')](_0x38e8af[_0x8a8d('0x2e')],{'$or':_['map'](_0x2ed5a7,function(_0x2f5359){if(_0x2f5359[_0x8a8d('0x33')]!==_0x8a8d('0x34')){var _0x530610={};_0x530610[_0x2f5359[_0x8a8d('0x22')]]={'$like':'%'+_0x56332a[_0x8a8d('0x29')][_0x8a8d('0x31')]+'%'};return _0x530610;}})});}_0x38e8af=_[_0x8a8d('0x32')]({},_0x38e8af,_0x56332a[_0x8a8d('0x35')]);var _0x1eb738={'where':_0x38e8af[_0x8a8d('0x2e')]};return db[_0x8a8d('0x36')][_0x8a8d('0x18')](_0x1eb738)[_0x8a8d('0x1c')](function(_0x2d0110){_0x14bf04[_0x8a8d('0x18')]=_0x2d0110;if(_0x56332a[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x38e8af[_0x8a8d('0x38')]=[{'all':!![]}];}return db['Campaign']['findAll'](_0x38e8af);})[_0x8a8d('0x1c')](function(_0x3eaa16){_0x14bf04[_0x8a8d('0x39')]=_0x3eaa16;return _0x14bf04;})['then'](respondWithFilteredResult(_0x238bba,_0x38e8af))[_0x8a8d('0x3a')](handleError(_0x238bba,null));};exports[_0x8a8d('0x3b')]=function(_0x40684f,_0x31eeeb){var _0x1eec01={'raw':![],'where':{'id':_0x40684f[_0x8a8d('0x3c')]['id']}},_0x229f01={};_0x229f01[_0x8a8d('0x28')]=_[_0x8a8d('0x3d')](db[_0x8a8d('0x36')][_0x8a8d('0x25')]);_0x229f01[_0x8a8d('0x29')]=_['keys'](_0x40684f[_0x8a8d('0x29')]);_0x229f01[_0x8a8d('0x2f')]=_['intersection'](_0x229f01[_0x8a8d('0x28')],_0x229f01[_0x8a8d('0x29')]);_0x1eec01['attributes']=_[_0x8a8d('0x2a')](_0x229f01[_0x8a8d('0x28')],qs[_0x8a8d('0x2c')](_0x40684f['query'][_0x8a8d('0x2c')]));_0x1eec01['attributes']=_0x1eec01[_0x8a8d('0x2b')][_0x8a8d('0x3e')]?_0x1eec01[_0x8a8d('0x2b')]:_0x229f01['model'];if(_0x40684f[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x1eec01[_0x8a8d('0x38')]=[{'all':!![]}];}_0x1eec01=_[_0x8a8d('0x32')]({},_0x1eec01,_0x40684f[_0x8a8d('0x35')]);return db[_0x8a8d('0x36')]['find'](_0x1eec01)[_0x8a8d('0x1c')](handleEntityNotFound(_0x31eeeb,null))[_0x8a8d('0x1c')](respondWithResult(_0x31eeeb,null))[_0x8a8d('0x3a')](handleError(_0x31eeeb,null));};exports[_0x8a8d('0x3f')]=function(_0x5a434a,_0x9a4818){return db[_0x8a8d('0x36')][_0x8a8d('0x3f')](_0x5a434a[_0x8a8d('0x40')],{})[_0x8a8d('0x1c')](function(_0x5229e1){var _0x4194b7=_0x5a434a[_0x8a8d('0x41')][_0x8a8d('0x42')]({'plain':!![]});if(!_0x4194b7)throw new Error(_0x8a8d('0x43'));if(_0x4194b7[_0x8a8d('0x44')]===_0x8a8d('0x41')){var _0x363810=_0x5229e1[_0x8a8d('0x42')]({'plain':!![]});var _0x3cd6b0=_0x8a8d('0x1e');return db[_0x8a8d('0x45')][_0x8a8d('0x46')]({'where':{'name':_0x3cd6b0,'userProfileId':_0x4194b7[_0x8a8d('0x47')]},'raw':!![]})[_0x8a8d('0x1c')](function(_0x26e68f){if(_0x26e68f&&_0x26e68f[_0x8a8d('0x48')]===0x0){return db[_0x8a8d('0x1f')][_0x8a8d('0x3f')]({'name':_0x363810[_0x8a8d('0x22')],'resourceId':_0x363810['id'],'type':_0x26e68f['name'],'sectionId':_0x26e68f['id']},{})[_0x8a8d('0x1c')](function(){return _0x5229e1;});}else{return _0x5229e1;}})['catch'](function(_0x22578b){logger['error'](_0x8a8d('0x49'),_0x22578b);throw _0x22578b;});}return _0x5229e1;})[_0x8a8d('0x1c')](respondWithResult(_0x9a4818,0xc9))[_0x8a8d('0x3a')](handleError(_0x9a4818,null));};exports[_0x8a8d('0x4a')]=function(_0x4ed945,_0xd7b765){var _0x499d97={'where':{'id':_0x4ed945[_0x8a8d('0x3c')]['id']}},_0x1a4500={};_0x1a4500[_0x8a8d('0x28')]=_['keys'](db[_0x8a8d('0x36')][_0x8a8d('0x25')]);_0x499d97['attributes']=_[_0x8a8d('0x2a')](_0x1a4500[_0x8a8d('0x28')],qs['fields'](_0x4ed945['query'][_0x8a8d('0x2c')]));_0x499d97[_0x8a8d('0x2b')]=_0x499d97['attributes']['length']?_0x499d97['attributes']:_0x1a4500[_0x8a8d('0x28')];if(_0x4ed945[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x499d97[_0x8a8d('0x38')]=[{'all':!![]}];}_0x499d97=_[_0x8a8d('0x32')]({},_0x499d97,_0x4ed945['options']);return db[_0x8a8d('0x36')][_0x8a8d('0x46')](_0x499d97)[_0x8a8d('0x1c')](handleEntityNotFound(_0xd7b765,null))[_0x8a8d('0x1c')](function(_0x59c138){if(_0x59c138){var _0x8f258=_0x59c138[_0x8a8d('0x42')]({'plain':!![]});_0x8f258=qs[_0x8a8d('0x4b')](_0x8f258,['id','createdAt',_0x8a8d('0x4c')]);_0x4ed945[_0x8a8d('0x40')]=_[_0x8a8d('0x4b')](_0x4ed945[_0x8a8d('0x40')],['id',_0x8a8d('0x4d'),_0x8a8d('0x4c')]);return db[_0x8a8d('0x36')]['create'](_[_0x8a8d('0x32')](_0x8f258,_0x4ed945['body']),{'include':_0x4ed945[_0x8a8d('0x29')]['includeAll']?[{'all':!![]}]:undefined})[_0x8a8d('0x1c')](function(_0x5b24dc){var _0x11df07=_0x4ed945[_0x8a8d('0x41')]['get']({'plain':!![]});if(!_0x11df07)throw new Error(_0x8a8d('0x43'));if(_0x11df07[_0x8a8d('0x44')]==='user'){var _0x33d40c=_0x5b24dc[_0x8a8d('0x42')]({'plain':!![]});var _0xf1c57=_0x8a8d('0x1e');return db[_0x8a8d('0x45')]['find']({'where':{'name':_0xf1c57,'userProfileId':_0x11df07[_0x8a8d('0x47')]},'raw':!![]})['then'](function(_0x5890aa){if(_0x5890aa&&_0x5890aa[_0x8a8d('0x48')]===0x0){return db[_0x8a8d('0x1f')]['create']({'name':_0x33d40c[_0x8a8d('0x22')],'resourceId':_0x33d40c['id'],'type':_0x5890aa[_0x8a8d('0x22')],'sectionId':_0x5890aa['id']},{})[_0x8a8d('0x1c')](function(){return _0x5b24dc;});}else{return _0x5b24dc;}})[_0x8a8d('0x3a')](function(_0x32b8b6){logger[_0x8a8d('0x21')](_0x8a8d('0x49'),_0x32b8b6);throw _0x32b8b6;});}return _0x5b24dc;});}})[_0x8a8d('0x1c')](respondWithResult(_0xd7b765,0xc9))['catch'](handleError(_0xd7b765,null));};exports['update']=function(_0x37da48,_0x12749c){if(_0x37da48[_0x8a8d('0x40')]['id']){delete _0x37da48['body']['id'];}return db[_0x8a8d('0x36')][_0x8a8d('0x46')]({'where':{'id':_0x37da48['params']['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x12749c,null))[_0x8a8d('0x1c')](saveUpdates(_0x37da48[_0x8a8d('0x40')],null))['then'](respondWithResult(_0x12749c,null))[_0x8a8d('0x3a')](handleError(_0x12749c,null));};exports[_0x8a8d('0x1d')]=function(_0x4ed23b,_0x4a7c56){return db[_0x8a8d('0x36')][_0x8a8d('0x46')]({'where':{'id':_0x4ed23b[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x4a7c56,null))['then'](removeEntity(_0x4a7c56,null))[_0x8a8d('0x3a')](handleError(_0x4a7c56,null));};exports['getHoppers']=function(_0x4e79f9,_0x48329f,_0x47bde0){var _0x4c8f87={'raw':!![],'where':{}};var _0x5cf8ff={};var _0x434a43={'count':0x0,'rows':[]};return db[_0x8a8d('0x36')][_0x8a8d('0x4e')]({'where':{'id':_0x4e79f9['params']['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x48329f,null))[_0x8a8d('0x1c')](function(_0x401eba){if(_0x401eba){_0x5cf8ff['model']=_[_0x8a8d('0x3d')](db[_0x8a8d('0x4f')]['rawAttributes']);_0x5cf8ff[_0x8a8d('0x29')]=_['keys'](_0x4e79f9[_0x8a8d('0x29')]);_0x5cf8ff[_0x8a8d('0x2f')]=_[_0x8a8d('0x2a')](_0x5cf8ff[_0x8a8d('0x28')],_0x5cf8ff[_0x8a8d('0x29')]);_0x4c8f87[_0x8a8d('0x2b')]=_[_0x8a8d('0x2a')](_0x5cf8ff[_0x8a8d('0x28')],qs[_0x8a8d('0x2c')](_0x4e79f9['query']['fields']));_0x4c8f87[_0x8a8d('0x2b')]=_0x4c8f87[_0x8a8d('0x2b')][_0x8a8d('0x3e')]?_0x4c8f87[_0x8a8d('0x2b')]:_0x5cf8ff[_0x8a8d('0x28')];if(!_0x4e79f9[_0x8a8d('0x29')][_0x8a8d('0x50')](_0x8a8d('0x51'))){_0x4c8f87[_0x8a8d('0x17')]=qs['limit'](_0x4e79f9[_0x8a8d('0x29')][_0x8a8d('0x17')]);_0x4c8f87[_0x8a8d('0x15')]=qs[_0x8a8d('0x15')](_0x4e79f9[_0x8a8d('0x29')][_0x8a8d('0x15')]);}_0x4c8f87[_0x8a8d('0x52')]=qs[_0x8a8d('0x2d')](_0x4e79f9[_0x8a8d('0x29')][_0x8a8d('0x2d')]);_0x4c8f87[_0x8a8d('0x2e')]=qs[_0x8a8d('0x2f')](_[_0x8a8d('0x30')](_0x4e79f9[_0x8a8d('0x29')],_0x5cf8ff['filters']));_0x4c8f87[_0x8a8d('0x2e')][_0x8a8d('0x53')]=_0x401eba['id'];if(_0x4e79f9[_0x8a8d('0x29')][_0x8a8d('0x31')]){_0x4c8f87[_0x8a8d('0x2e')]=_[_0x8a8d('0x32')](_0x4c8f87[_0x8a8d('0x2e')],{'$or':_[_0x8a8d('0x24')](_0x4c8f87[_0x8a8d('0x2b')],function(_0x44f522){var _0x27924b={};_0x27924b[_0x44f522]={'$like':'%'+_0x4e79f9['query'][_0x8a8d('0x31')]+'%'};return _0x27924b;})});}_0x4c8f87=_[_0x8a8d('0x32')]({},_0x4c8f87,_0x4e79f9[_0x8a8d('0x35')]);return db['CmHopper']['count']({'where':_0x4c8f87[_0x8a8d('0x2e')]})[_0x8a8d('0x1c')](function(_0x1f8fe8){_0x434a43['count']=_0x1f8fe8;if(_0x4e79f9[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x4c8f87[_0x8a8d('0x38')]=[{'all':!![]}];}return db[_0x8a8d('0x4f')][_0x8a8d('0x54')](_0x4c8f87);})['then'](function(_0x3bd8ab){_0x434a43[_0x8a8d('0x39')]=_0x3bd8ab;return _0x434a43;});}})[_0x8a8d('0x1c')](respondWithFilteredResult(_0x48329f,_0x4c8f87))[_0x8a8d('0x3a')](handleError(_0x48329f,null));};exports[_0x8a8d('0x55')]=function(_0x42fe74,_0x36af56,_0x5a5f27){var _0x5bcfe1={'raw':!![],'where':{}};var _0x6ac8e3={};var _0x5c8474={'count':0x0,'rows':[]};return db[_0x8a8d('0x36')][_0x8a8d('0x4e')]({'where':{'id':_0x42fe74[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x36af56,null))[_0x8a8d('0x1c')](function(_0x38b8c8){if(_0x38b8c8){_0x6ac8e3[_0x8a8d('0x28')]=_['keys'](db[_0x8a8d('0x56')][_0x8a8d('0x25')]);_0x6ac8e3[_0x8a8d('0x29')]=_[_0x8a8d('0x3d')](_0x42fe74['query']);_0x6ac8e3[_0x8a8d('0x2f')]=_[_0x8a8d('0x2a')](_0x6ac8e3[_0x8a8d('0x28')],_0x6ac8e3[_0x8a8d('0x29')]);_0x5bcfe1[_0x8a8d('0x2b')]=_[_0x8a8d('0x2a')](_0x6ac8e3[_0x8a8d('0x28')],qs[_0x8a8d('0x2c')](_0x42fe74[_0x8a8d('0x29')][_0x8a8d('0x2c')]));_0x5bcfe1[_0x8a8d('0x2b')]=_0x5bcfe1[_0x8a8d('0x2b')][_0x8a8d('0x3e')]?_0x5bcfe1[_0x8a8d('0x2b')]:_0x6ac8e3['model'];if(!_0x42fe74[_0x8a8d('0x29')][_0x8a8d('0x50')](_0x8a8d('0x51'))){_0x5bcfe1[_0x8a8d('0x17')]=qs[_0x8a8d('0x17')](_0x42fe74[_0x8a8d('0x29')][_0x8a8d('0x17')]);_0x5bcfe1[_0x8a8d('0x15')]=qs[_0x8a8d('0x15')](_0x42fe74[_0x8a8d('0x29')][_0x8a8d('0x15')]);}_0x5bcfe1['order']=qs['sort'](_0x42fe74[_0x8a8d('0x29')][_0x8a8d('0x2d')]);_0x5bcfe1[_0x8a8d('0x2e')]=qs[_0x8a8d('0x2f')](_[_0x8a8d('0x30')](_0x42fe74[_0x8a8d('0x29')],_0x6ac8e3[_0x8a8d('0x2f')]));_0x5bcfe1['where']['CampaignId']=_0x38b8c8['id'];if(_0x42fe74[_0x8a8d('0x29')]['filter']){_0x5bcfe1[_0x8a8d('0x2e')]=_[_0x8a8d('0x32')](_0x5bcfe1[_0x8a8d('0x2e')],{'$or':_[_0x8a8d('0x24')](_0x5bcfe1[_0x8a8d('0x2b')],function(_0x3d18ff){var _0x4b5f17={};_0x4b5f17[_0x3d18ff]={'$like':'%'+_0x42fe74['query'][_0x8a8d('0x31')]+'%'};return _0x4b5f17;})});}_0x5bcfe1=_['merge']({},_0x5bcfe1,_0x42fe74[_0x8a8d('0x35')]);return db['CmHopperHistory'][_0x8a8d('0x18')]({'where':_0x5bcfe1[_0x8a8d('0x2e')]})[_0x8a8d('0x1c')](function(_0x2635b6){_0x5c8474[_0x8a8d('0x18')]=_0x2635b6;if(_0x42fe74[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x5bcfe1['include']=[{'all':!![]}];}return db[_0x8a8d('0x56')][_0x8a8d('0x54')](_0x5bcfe1);})[_0x8a8d('0x1c')](function(_0x3033b2){_0x5c8474['rows']=_0x3033b2;return _0x5c8474;});}})[_0x8a8d('0x1c')](respondWithFilteredResult(_0x36af56,_0x5bcfe1))[_0x8a8d('0x3a')](handleError(_0x36af56,null));};exports[_0x8a8d('0x57')]=function(_0x1130af,_0x39b863,_0x2ff95e){var _0x3a432d={'raw':!![],'where':{}};var _0x3d5395={};var _0x2296af={'count':0x0,'rows':[]};return db['Campaign'][_0x8a8d('0x4e')]({'where':{'id':_0x1130af[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x39b863,null))['then'](function(_0x3cdcc8){if(_0x3cdcc8){_0x3d5395[_0x8a8d('0x28')]=_[_0x8a8d('0x3d')](db[_0x8a8d('0x58')][_0x8a8d('0x25')]);_0x3d5395[_0x8a8d('0x29')]=_[_0x8a8d('0x3d')](_0x1130af[_0x8a8d('0x29')]);_0x3d5395['filters']=_[_0x8a8d('0x2a')](_0x3d5395[_0x8a8d('0x28')],_0x3d5395[_0x8a8d('0x29')]);_0x3a432d[_0x8a8d('0x2b')]=_[_0x8a8d('0x2a')](_0x3d5395[_0x8a8d('0x28')],qs[_0x8a8d('0x2c')](_0x1130af['query'][_0x8a8d('0x2c')]));_0x3a432d[_0x8a8d('0x2b')]=_0x3a432d[_0x8a8d('0x2b')]['length']?_0x3a432d['attributes']:_0x3d5395['model'];if(!_0x1130af['query'][_0x8a8d('0x50')](_0x8a8d('0x51'))){_0x3a432d[_0x8a8d('0x17')]=qs[_0x8a8d('0x17')](_0x1130af[_0x8a8d('0x29')][_0x8a8d('0x17')]);_0x3a432d['offset']=qs[_0x8a8d('0x15')](_0x1130af[_0x8a8d('0x29')][_0x8a8d('0x15')]);}_0x3a432d[_0x8a8d('0x52')]=qs[_0x8a8d('0x2d')](_0x1130af[_0x8a8d('0x29')]['sort']);_0x3a432d[_0x8a8d('0x2e')]=qs[_0x8a8d('0x2f')](_['pick'](_0x1130af[_0x8a8d('0x29')],_0x3d5395['filters']));_0x3a432d[_0x8a8d('0x2e')][_0x8a8d('0x53')]=_0x3cdcc8['id'];if(_0x1130af[_0x8a8d('0x29')]['filter']){_0x3a432d['where']=_[_0x8a8d('0x32')](_0x3a432d[_0x8a8d('0x2e')],{'$or':_[_0x8a8d('0x24')](_0x3a432d['attributes'],function(_0x281b0e){var _0x299ddb={};_0x299ddb[_0x281b0e]={'$like':'%'+_0x1130af[_0x8a8d('0x29')][_0x8a8d('0x31')]+'%'};return _0x299ddb;})});}_0x3a432d=_[_0x8a8d('0x32')]({},_0x3a432d,_0x1130af[_0x8a8d('0x35')]);return db[_0x8a8d('0x58')][_0x8a8d('0x18')]({'where':_0x3a432d['where']})[_0x8a8d('0x1c')](function(_0x52eb31){_0x2296af[_0x8a8d('0x18')]=_0x52eb31;if(_0x1130af[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x3a432d[_0x8a8d('0x38')]=[{'all':!![]}];}return db[_0x8a8d('0x58')]['findAll'](_0x3a432d);})[_0x8a8d('0x1c')](function(_0x189101){_0x2296af[_0x8a8d('0x39')]=_0x189101;return _0x2296af;});}})[_0x8a8d('0x1c')](respondWithFilteredResult(_0x39b863,_0x3a432d))['catch'](handleError(_0x39b863,null));};exports[_0x8a8d('0x59')]=function(_0x419249,_0x1ca67c,_0x53330a){var _0x42fef4={'raw':!![],'where':{}};var _0x2576c0={};var _0x2bf47e={'count':0x0,'rows':[]};return db[_0x8a8d('0x36')][_0x8a8d('0x4e')]({'where':{'id':_0x419249[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x1ca67c,null))['then'](function(_0x10c507){if(_0x10c507){_0x2576c0[_0x8a8d('0x28')]=_[_0x8a8d('0x3d')](db[_0x8a8d('0x5a')][_0x8a8d('0x25')]);_0x2576c0[_0x8a8d('0x29')]=_[_0x8a8d('0x3d')](_0x419249[_0x8a8d('0x29')]);_0x2576c0[_0x8a8d('0x2f')]=_['intersection'](_0x2576c0[_0x8a8d('0x28')],_0x2576c0['query']);_0x42fef4[_0x8a8d('0x2b')]=_[_0x8a8d('0x2a')](_0x2576c0['model'],qs[_0x8a8d('0x2c')](_0x419249[_0x8a8d('0x29')][_0x8a8d('0x2c')]));_0x42fef4[_0x8a8d('0x2b')]=_0x42fef4[_0x8a8d('0x2b')][_0x8a8d('0x3e')]?_0x42fef4[_0x8a8d('0x2b')]:_0x2576c0['model'];if(!_0x419249[_0x8a8d('0x29')][_0x8a8d('0x50')](_0x8a8d('0x51'))){_0x42fef4[_0x8a8d('0x17')]=qs[_0x8a8d('0x17')](_0x419249[_0x8a8d('0x29')][_0x8a8d('0x17')]);_0x42fef4[_0x8a8d('0x15')]=qs[_0x8a8d('0x15')](_0x419249[_0x8a8d('0x29')][_0x8a8d('0x15')]);}_0x42fef4['order']=qs['sort'](_0x419249[_0x8a8d('0x29')][_0x8a8d('0x2d')]);_0x42fef4[_0x8a8d('0x2e')]=qs['filters'](_[_0x8a8d('0x30')](_0x419249[_0x8a8d('0x29')],_0x2576c0[_0x8a8d('0x2f')]));_0x42fef4[_0x8a8d('0x2e')][_0x8a8d('0x53')]=_0x10c507['id'];if(_0x419249['query'][_0x8a8d('0x31')]){_0x42fef4[_0x8a8d('0x2e')]=_[_0x8a8d('0x32')](_0x42fef4[_0x8a8d('0x2e')],{'$or':_[_0x8a8d('0x24')](_0x42fef4[_0x8a8d('0x2b')],function(_0x56a8c4){var _0x134dfa={};_0x134dfa[_0x56a8c4]={'$like':'%'+_0x419249['query'][_0x8a8d('0x31')]+'%'};return _0x134dfa;})});}_0x42fef4=_[_0x8a8d('0x32')]({},_0x42fef4,_0x419249['options']);return db[_0x8a8d('0x5a')]['count']({'where':_0x42fef4[_0x8a8d('0x2e')]})[_0x8a8d('0x1c')](function(_0x33ef89){_0x2bf47e[_0x8a8d('0x18')]=_0x33ef89;if(_0x419249[_0x8a8d('0x29')][_0x8a8d('0x37')]){_0x42fef4[_0x8a8d('0x38')]=[{'all':!![]}];}return db[_0x8a8d('0x5a')][_0x8a8d('0x54')](_0x42fef4);})['then'](function(_0x18a971){_0x2bf47e[_0x8a8d('0x39')]=_0x18a971;return _0x2bf47e;});}})['then'](respondWithFilteredResult(_0x1ca67c,_0x42fef4))[_0x8a8d('0x3a')](handleError(_0x1ca67c,null));};exports['getLists']=function(_0x24d0ec,_0x3cb6b7,_0x5ee99d){var _0x492b1b={};var _0x11b24e={};var _0x13ae92;var _0x316de3;return db[_0x8a8d('0x36')][_0x8a8d('0x4e')]({'where':{'id':_0x24d0ec['params']['id']}})['then'](handleEntityNotFound(_0x3cb6b7,null))[_0x8a8d('0x1c')](function(_0x884b02){if(_0x884b02){_0x13ae92=_0x884b02;_0x11b24e[_0x8a8d('0x28')]=_[_0x8a8d('0x3d')](db[_0x8a8d('0x5b')][_0x8a8d('0x25')]);_0x11b24e[_0x8a8d('0x29')]=_[_0x8a8d('0x3d')](_0x24d0ec[_0x8a8d('0x29')]);_0x11b24e[_0x8a8d('0x2f')]=_[_0x8a8d('0x2a')](_0x11b24e[_0x8a8d('0x28')],_0x11b24e['query']);_0x492b1b['attributes']=_[_0x8a8d('0x2a')](_0x11b24e['model'],qs['fields'](_0x24d0ec[_0x8a8d('0x29')][_0x8a8d('0x2c')]));_0x492b1b[_0x8a8d('0x2b')]=_0x492b1b[_0x8a8d('0x2b')][_0x8a8d('0x3e')]?_0x492b1b[_0x8a8d('0x2b')]:_0x11b24e[_0x8a8d('0x28')];_0x492b1b['order']=qs[_0x8a8d('0x2d')](_0x24d0ec[_0x8a8d('0x29')][_0x8a8d('0x2d')]);_0x492b1b[_0x8a8d('0x2e')]=qs['filters'](_['pick'](_0x24d0ec['query'],_0x11b24e[_0x8a8d('0x2f')]));if(_0x24d0ec[_0x8a8d('0x29')][_0x8a8d('0x31')]){_0x492b1b[_0x8a8d('0x2e')]=_['merge'](_0x492b1b[_0x8a8d('0x2e')],{'$or':_['map'](_0x492b1b[_0x8a8d('0x2b')],function(_0x529fef){var _0x43cfc6={};_0x43cfc6[_0x529fef]={'$like':'%'+_0x24d0ec[_0x8a8d('0x29')]['filter']+'%'};return _0x43cfc6;})});}_0x492b1b=_[_0x8a8d('0x32')]({},_0x492b1b,_0x24d0ec[_0x8a8d('0x35')]);return _0x13ae92[_0x8a8d('0x5c')](_0x492b1b);}})[_0x8a8d('0x1c')](function(_0x5f7331){if(_0x5f7331){_0x316de3=_0x5f7331['length'];if(!_0x24d0ec['query'][_0x8a8d('0x50')](_0x8a8d('0x51'))){_0x492b1b['limit']=qs[_0x8a8d('0x17')](_0x24d0ec['query'][_0x8a8d('0x17')]);_0x492b1b[_0x8a8d('0x15')]=qs[_0x8a8d('0x15')](_0x24d0ec[_0x8a8d('0x29')][_0x8a8d('0x15')]);}return _0x13ae92[_0x8a8d('0x5c')](_0x492b1b);}})[_0x8a8d('0x1c')](function(_0x5c6054){if(_0x5c6054){return _0x5c6054?{'count':_0x316de3,'rows':_0x5c6054}:null;}})[_0x8a8d('0x1c')](respondWithResult(_0x3cb6b7,null))[_0x8a8d('0x3a')](handleError(_0x3cb6b7,null));};exports[_0x8a8d('0x5d')]=function(_0x162458,_0x21c21b,_0x2ceaeb){var _0x2e6501,_0x1bb6eb;var _0x24cc29=[];var _0x3777dc=moment()[_0x8a8d('0x5e')]('YYYY-MM-DD\x20HH:mm:ss');return db[_0x8a8d('0x36')][_0x8a8d('0x46')]({'where':{'id':_0x162458['params']['id']}})['then'](handleEntityNotFound(_0x21c21b,null))['then'](function(_0x335658){if(_0x335658){_0x1bb6eb=_0x335658;return _0x335658[_0x8a8d('0x5d')](_0x162458['body'][_0x8a8d('0x5f')],_[_0x8a8d('0x4b')](_0x162458[_0x8a8d('0x40')],[_0x8a8d('0x5f'),'id'])||{});}return null;})['spread'](function(_0x4483d8){var _0x39abe9;var _0x1644b8;_0x2e6501=_0x4483d8||[];var _0x592aea=[];if(_0x4483d8){for(var _0x148a5e=0x0;_0x148a5e<_0x4483d8[_0x8a8d('0x3e')];_0x148a5e+=0x1){var _0x1f7067=_0x4483d8[_0x148a5e][_0x8a8d('0x42')]({'plain':!![]});_0x1bb6eb[_0x8a8d('0x60')]=_0x162458[_0x8a8d('0x40')][_0x8a8d('0x60')]?_0x162458[_0x8a8d('0x40')][_0x8a8d('0x60')]:_0x1bb6eb[_0x8a8d('0x60')];switch(_0x1bb6eb[_0x8a8d('0x60')]){case'always':_0x39abe9=squel[_0x8a8d('0x61')]()[_0x8a8d('0x62')](_0x8a8d('0x63'))[_0x8a8d('0x64')](['phone',_0x8a8d('0x65'),_0x8a8d('0x66'),_0x8a8d('0x67'),_0x8a8d('0x53'),'createdAt','updatedAt'],squel['select']()['field'](_0x8a8d('0x68'),_0x8a8d('0x68'))[_0x8a8d('0x69')]('NOW()',_0x8a8d('0x65'))[_0x8a8d('0x69')]('id','ContactId')[_0x8a8d('0x69')](_0x1f7067[_0x8a8d('0x6a')][_0x8a8d('0x6b')](),_0x8a8d('0x67'))[_0x8a8d('0x69')](_0x162458['params']['id'][_0x8a8d('0x6b')](),_0x8a8d('0x53'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4d'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4c'))[_0x8a8d('0x6c')](_0x8a8d('0x6d'))[_0x8a8d('0x2e')](_0x8a8d('0x6e'))[_0x8a8d('0x2e')]('ListId\x20=\x20?',_0x1f7067['CmListId']['toString']())[_0x8a8d('0x2e')](_0x8a8d('0x6f'))['where'](_0x8a8d('0x70'),squel[_0x8a8d('0x71')]()[_0x8a8d('0x69')](_0x8a8d('0x72'))[_0x8a8d('0x6c')](_0x8a8d('0x73'))[_0x8a8d('0x2e')](_0x8a8d('0x74'),_0x162458[_0x8a8d('0x3c')]['id'][_0x8a8d('0x6b')]()))['where'](_0x8a8d('0x70'),squel[_0x8a8d('0x71')]()[_0x8a8d('0x69')](_0x8a8d('0x75'))[_0x8a8d('0x6c')](_0x8a8d('0x63'))[_0x8a8d('0x2e')](_0x8a8d('0x74'),_0x162458[_0x8a8d('0x3c')]['id'][_0x8a8d('0x6b')]())))[_0x8a8d('0x6b')]();break;case'onlyIfOpen':_0x39abe9=squel[_0x8a8d('0x61')]()[_0x8a8d('0x62')](_0x8a8d('0x63'))[_0x8a8d('0x64')]([_0x8a8d('0x68'),_0x8a8d('0x65'),_0x8a8d('0x66'),'ListId',_0x8a8d('0x53'),_0x8a8d('0x4d'),'updatedAt'],squel[_0x8a8d('0x71')]()[_0x8a8d('0x69')](_0x8a8d('0x68'),_0x8a8d('0x68'))['field'](_0x8a8d('0x76'),'scheduledAt')['field']('id',_0x8a8d('0x66'))[_0x8a8d('0x69')](_0x1f7067[_0x8a8d('0x6a')]['toString'](),_0x8a8d('0x67'))[_0x8a8d('0x69')](_0x162458['params']['id'][_0x8a8d('0x6b')](),_0x8a8d('0x53'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4d'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4c'))['from']('cm_contacts')[_0x8a8d('0x2e')](_0x8a8d('0x6e'))[_0x8a8d('0x2e')]('ListId\x20=\x20?',_0x1f7067['CmListId'][_0x8a8d('0x6b')]())[_0x8a8d('0x2e')](_0x8a8d('0x6f'))[_0x8a8d('0x2e')](_0x8a8d('0x70'),squel[_0x8a8d('0x71')]()[_0x8a8d('0x69')]('COALESCE(phone,\x27\x27)')[_0x8a8d('0x6c')](_0x8a8d('0x63'))[_0x8a8d('0x2e')]('CampaignId\x20=\x20?',_0x162458['params']['id']['toString']())))['toString']();break;default:_0x39abe9=squel['insert']()['into']('cm_hopper')[_0x8a8d('0x64')]([_0x8a8d('0x68'),_0x8a8d('0x65'),_0x8a8d('0x66'),_0x8a8d('0x67'),'CampaignId',_0x8a8d('0x4d'),'updatedAt'],squel[_0x8a8d('0x71')]()[_0x8a8d('0x69')](_0x8a8d('0x68'),'phone')[_0x8a8d('0x69')](_0x8a8d('0x76'),_0x8a8d('0x65'))['field']('id','ContactId')[_0x8a8d('0x69')](_0x1f7067[_0x8a8d('0x6a')][_0x8a8d('0x6b')](),_0x8a8d('0x67'))['field'](_0x162458[_0x8a8d('0x3c')]['id'][_0x8a8d('0x6b')](),_0x8a8d('0x53'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4d'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4c'))[_0x8a8d('0x6c')](_0x8a8d('0x6d'))[_0x8a8d('0x2e')](_0x8a8d('0x6e'))[_0x8a8d('0x2e')](_0x8a8d('0x77'),_0x1f7067[_0x8a8d('0x6a')][_0x8a8d('0x6b')]())[_0x8a8d('0x2e')]('phone\x20IS\x20NOT\x20NULL'))[_0x8a8d('0x6b')]();}_0x1644b8=squel[_0x8a8d('0x61')]()['into'](_0x8a8d('0x78'))[_0x8a8d('0x64')]([_0x8a8d('0x79'),_0x8a8d('0x65'),'phone','OrderBy','createdAt',_0x8a8d('0x4c')],squel[_0x8a8d('0x71')]()[_0x8a8d('0x69')](_0x8a8d('0x7a'),'id')['field'](_0x8a8d('0x76'),_0x8a8d('0x65'))[_0x8a8d('0x69')](_0x8a8d('0x7b'),_0x8a8d('0x68'))['field'](_0x8a8d('0x7c'),'OrderBy')[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4d'))[_0x8a8d('0x69')]('\x27'+_0x3777dc+'\x27',_0x8a8d('0x4c'))['from'](_0x8a8d('0x7d'),'ci')[_0x8a8d('0x7e')](_0x8a8d('0x63'),'h',_0x8a8d('0x7f'))[_0x8a8d('0x2e')]('h.ListId\x20=\x20?',_0x1f7067[_0x8a8d('0x6a')][_0x8a8d('0x6b')]())[_0x8a8d('0x2e')](_0x8a8d('0x80'),_0x162458[_0x8a8d('0x3c')]['id'][_0x8a8d('0x6b')]())['where'](_0x8a8d('0x81'),_0x3777dc))['toString']();_0x592aea[_0x8a8d('0x82')](db[_0x8a8d('0x83')][_0x8a8d('0x29')](_0x39abe9));_0x24cc29[_0x8a8d('0x82')](db[_0x8a8d('0x83')][_0x8a8d('0x29')](_0x1644b8));}return BPromise[_0x8a8d('0x84')](_0x592aea);}})[_0x8a8d('0x1c')](function(){return BPromise[_0x8a8d('0x84')](_0x24cc29);})[_0x8a8d('0x1c')](function(){return _0x2e6501;})[_0x8a8d('0x1c')](respondWithResult(_0x21c21b,null))[_0x8a8d('0x3a')](handleError(_0x21c21b,null));};exports[_0x8a8d('0x85')]=function(_0x3d07ee,_0x4269b8,_0x58b741){return db[_0x8a8d('0x36')][_0x8a8d('0x46')]({'where':{'id':_0x3d07ee[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x4269b8,null))['then'](function(_0x3fc34a){if(_0x3fc34a){return _0x3fc34a['removeLists'](_0x3d07ee[_0x8a8d('0x29')][_0x8a8d('0x5f')]);}})['then'](function(_0x3b91b4){if(_0x3b91b4){return db['CmHopper'][_0x8a8d('0x1d')]({'where':{'ListId':_0x3d07ee[_0x8a8d('0x29')]['ids'],'CampaignId':_0x3d07ee[_0x8a8d('0x3c')]['id']}})['then'](function(){return _0x3b91b4;});}})[_0x8a8d('0x1c')](respondWithStatusCode(_0x4269b8,null))[_0x8a8d('0x3a')](handleError(_0x4269b8,null));};exports[_0x8a8d('0x86')]=function(_0x4ea1de,_0x3fdb55,_0x4e638d){var _0x3cdf76={};var _0x37b1e5={};var _0x4339de;var _0x367b49;return db[_0x8a8d('0x36')]['findOne']({'where':{'id':_0x4ea1de[_0x8a8d('0x3c')]['id']}})['then'](handleEntityNotFound(_0x3fdb55,null))['then'](function(_0x6840fc){if(_0x6840fc){_0x4339de=_0x6840fc;_0x37b1e5['model']=_[_0x8a8d('0x3d')](db[_0x8a8d('0x5b')][_0x8a8d('0x25')]);_0x37b1e5['query']=_[_0x8a8d('0x3d')](_0x4ea1de['query']);_0x37b1e5['filters']=_[_0x8a8d('0x2a')](_0x37b1e5[_0x8a8d('0x28')],_0x37b1e5[_0x8a8d('0x29')]);_0x3cdf76['attributes']=_[_0x8a8d('0x2a')](_0x37b1e5[_0x8a8d('0x28')],qs['fields'](_0x4ea1de[_0x8a8d('0x29')][_0x8a8d('0x2c')]));_0x3cdf76[_0x8a8d('0x2b')]=_0x3cdf76[_0x8a8d('0x2b')]['length']?_0x3cdf76[_0x8a8d('0x2b')]:_0x37b1e5['model'];_0x3cdf76[_0x8a8d('0x52')]=qs[_0x8a8d('0x2d')](_0x4ea1de['query'][_0x8a8d('0x2d')]);_0x3cdf76[_0x8a8d('0x2e')]=qs[_0x8a8d('0x2f')](_['pick'](_0x4ea1de[_0x8a8d('0x29')],_0x37b1e5[_0x8a8d('0x2f')]));if(_0x4ea1de[_0x8a8d('0x29')][_0x8a8d('0x31')]){_0x3cdf76[_0x8a8d('0x2e')]=_[_0x8a8d('0x32')](_0x3cdf76[_0x8a8d('0x2e')],{'$or':_[_0x8a8d('0x24')](_0x3cdf76[_0x8a8d('0x2b')],function(_0x26d998){var _0x932fa5={};_0x932fa5[_0x26d998]={'$like':'%'+_0x4ea1de[_0x8a8d('0x29')][_0x8a8d('0x31')]+'%'};return _0x932fa5;})});}_0x3cdf76=_[_0x8a8d('0x32')]({},_0x3cdf76,_0x4ea1de[_0x8a8d('0x35')]);return _0x4339de[_0x8a8d('0x86')](_0x3cdf76);}})['then'](function(_0x5f362f){if(_0x5f362f){_0x367b49=_0x5f362f['length'];if(!_0x4ea1de['query'][_0x8a8d('0x50')]('nolimit')){_0x3cdf76[_0x8a8d('0x17')]=qs[_0x8a8d('0x17')](_0x4ea1de[_0x8a8d('0x29')][_0x8a8d('0x17')]);_0x3cdf76['offset']=qs['offset'](_0x4ea1de[_0x8a8d('0x29')][_0x8a8d('0x15')]);}return _0x4339de[_0x8a8d('0x86')](_0x3cdf76);}})[_0x8a8d('0x1c')](function(_0x3e4e0b){if(_0x3e4e0b){return _0x3e4e0b?{'count':_0x367b49,'rows':_0x3e4e0b}:null;}})[_0x8a8d('0x1c')](respondWithResult(_0x3fdb55,null))['catch'](handleError(_0x3fdb55,null));};exports[_0x8a8d('0x87')]=function(_0x5af877,_0x187389,_0x4f817d){var _0x1d13a2,_0x591fae;var _0x8b3149=[];var _0x4c5af1=moment()['format'](_0x8a8d('0x88'));return db[_0x8a8d('0x36')][_0x8a8d('0x46')]({'where':{'id':_0x5af877[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x187389,null))[_0x8a8d('0x1c')](function(_0x958cc2){if(_0x958cc2){_0x591fae=_0x958cc2;return _0x958cc2[_0x8a8d('0x87')](_0x5af877[_0x8a8d('0x40')][_0x8a8d('0x5f')],_['omit'](_0x5af877[_0x8a8d('0x40')],[_0x8a8d('0x5f'),'id'])||{});}return null;})['spread'](function(_0x422c58){var _0x3a0bb0;var _0x4c3def;_0x1d13a2=_0x422c58||[];var _0x2a5e64=[];if(_0x422c58){for(var _0x1b1e10=0x0;_0x1b1e10<_0x422c58[_0x8a8d('0x3e')];_0x1b1e10+=0x1){var _0x4191bf=_0x422c58[_0x1b1e10][_0x8a8d('0x42')]({'plain':!![]});_0x3a0bb0=squel['insert']()['into'](_0x8a8d('0x89'))[_0x8a8d('0x64')]([_0x8a8d('0x68'),'ContactId',_0x8a8d('0x67'),'CampaignId',_0x8a8d('0x4d'),_0x8a8d('0x4c')],squel['select']()[_0x8a8d('0x69')](_0x8a8d('0x68'),'phone')[_0x8a8d('0x69')]('id','ContactId')['field'](_0x4191bf[_0x8a8d('0x6a')][_0x8a8d('0x6b')](),'ListId')['field'](_0x5af877['params']['id']['toString'](),'CampaignId')[_0x8a8d('0x69')](_0x8a8d('0x76'),'createdAt')[_0x8a8d('0x69')](_0x8a8d('0x76'),_0x8a8d('0x4c'))[_0x8a8d('0x6c')](_0x8a8d('0x6d'))['where'](_0x8a8d('0x6e'))[_0x8a8d('0x2e')](_0x8a8d('0x77'),_0x4191bf[_0x8a8d('0x6a')]['toString']())[_0x8a8d('0x2e')]('phone\x20IS\x20NOT\x20NULL'))[_0x8a8d('0x6b')]();_0x2a5e64[_0x8a8d('0x82')](db[_0x8a8d('0x83')][_0x8a8d('0x29')](_0x3a0bb0));}return BPromise[_0x8a8d('0x84')](_0x2a5e64);}})[_0x8a8d('0x1c')](function(){return _0x1d13a2;})[_0x8a8d('0x1c')](respondWithResult(_0x187389,null))[_0x8a8d('0x3a')](handleError(_0x187389,null));};exports[_0x8a8d('0x8a')]=function(_0x15f81e,_0x365ba8,_0x16be6c){return db['Campaign']['find']({'where':{'id':_0x15f81e[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](handleEntityNotFound(_0x365ba8,null))['then'](function(_0x3b4939){if(_0x3b4939){return _0x3b4939[_0x8a8d('0x8a')](_0x15f81e[_0x8a8d('0x29')][_0x8a8d('0x5f')]);}})[_0x8a8d('0x1c')](function(_0x3d31b9){if(_0x3d31b9){return db[_0x8a8d('0x5a')][_0x8a8d('0x1d')]({'where':{'ListId':_0x15f81e[_0x8a8d('0x29')]['ids'],'CampaignId':_0x15f81e[_0x8a8d('0x3c')]['id']}})[_0x8a8d('0x1c')](function(){return _0x3d31b9;});}})['then'](respondWithStatusCode(_0x365ba8,null))[_0x8a8d('0x3a')](handleError(_0x365ba8,null));};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js
index a458427..bb7f0d5 100644
--- a/server/api/campaign/campaign.model.js
+++ b/server/api/campaign/campaign.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./campaign.attributes','exports','Campaign','campaigns','lodash','util'];(function(_0x55eb57,_0x1011e2){var _0x55ca29=function(_0xad5a1d){while(--_0xad5a1d){_0x55eb57['push'](_0x55eb57['shift']());}};_0x55ca29(++_0x1011e2);}(_0x7a54,0x106));var _0x47a5=function(_0x391582,_0x49efa7){_0x391582=_0x391582-0x0;var _0x8f3d97=_0x7a54[_0x391582];return _0x8f3d97;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9957=['exports','define','Campaign','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./campaign.attributes'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'campaigns','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/campaign/campaign.rpc.js b/server/api/campaign/campaign.rpc.js
index 6b4058c..b4e66fa 100644
--- a/server/api/campaign/campaign.rpc.js
+++ b/server/api/campaign/campaign.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9649=['Campaign,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Campaign,\x20%s,\x20%s','message','catch','GetCampaign','findAll','options','raw','where','attributes','limit','map','include','model','then','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','debug'];(function(_0x70a4e2,_0x1b833a){var _0x4d1d1e=function(_0x479208){while(--_0x479208){_0x70a4e2['push'](_0x70a4e2['shift']());}};_0x4d1d1e(++_0x1b833a);}(_0x9649,0x19f));var _0x9964=function(_0x21d821,_0x44aec5){_0x21d821=_0x21d821-0x0;var _0x5ae04f=_0x9649[_0x21d821];return _0x5ae04f;};'use strict';var _=require(_0x9964('0x0'));var util=require(_0x9964('0x1'));var moment=require(_0x9964('0x2'));var BPromise=require(_0x9964('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9964('0x4'));var db=require(_0x9964('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x9964('0x6'))('rpc');var config=require(_0x9964('0x7'));var jayson=require(_0x9964('0x8'));var client=jayson[_0x9964('0x9')][_0x9964('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x40c60b,_0x1338e7,_0x3fa639){return new BPromise(function(_0x4bec88,_0x45dda7){return client[_0x9964('0xb')](_0x40c60b,_0x3fa639)['then'](function(_0x10b88b){logger[_0x9964('0xc')]('Campaign,\x20%s,\x20%s',_0x1338e7,'request\x20sent');logger[_0x9964('0xd')](_0x9964('0xe'),_0x1338e7,_0x9964('0xf'),JSON[_0x9964('0x10')](_0x10b88b));if(_0x10b88b[_0x9964('0x11')]){if(_0x10b88b['error'][_0x9964('0x12')]===0x1f4){logger['error'](_0x9964('0x13'),_0x1338e7,_0x10b88b[_0x9964('0x11')]['message']);return _0x45dda7(_0x10b88b[_0x9964('0x11')][_0x9964('0x14')]);}logger['error'](_0x9964('0x13'),_0x1338e7,_0x10b88b[_0x9964('0x11')][_0x9964('0x14')]);return _0x4bec88(_0x10b88b[_0x9964('0x11')][_0x9964('0x14')]);}else{logger['info'](_0x9964('0x13'),_0x1338e7,_0x9964('0xf'));_0x4bec88(_0x10b88b['result'][_0x9964('0x14')]);}})[_0x9964('0x15')](function(_0x57fe55){logger[_0x9964('0x11')](_0x9964('0x13'),_0x1338e7,_0x57fe55);_0x45dda7(_0x57fe55);});});}exports[_0x9964('0x16')]=function(_0x4c18a4){var _0x4f2f68=this;return new Promise(function(_0x40b3dd,_0x931a0f){return db['Campaign'][_0x9964('0x17')]({'raw':_0x4c18a4[_0x9964('0x18')]?_0x4c18a4[_0x9964('0x18')][_0x9964('0x19')]===undefined?!![]:![]:!![],'where':_0x4c18a4[_0x9964('0x18')]?_0x4c18a4[_0x9964('0x18')][_0x9964('0x1a')]||null:null,'attributes':_0x4c18a4[_0x9964('0x18')]?_0x4c18a4[_0x9964('0x18')][_0x9964('0x1b')]||null:null,'limit':_0x4c18a4['options']?_0x4c18a4[_0x9964('0x18')][_0x9964('0x1c')]||null:null,'include':_0x4c18a4['options']?_0x4c18a4[_0x9964('0x18')]['include']?_[_0x9964('0x1d')](_0x4c18a4[_0x9964('0x18')][_0x9964('0x1e')],function(_0x167525){return{'model':db[_0x167525[_0x9964('0x1f')]],'as':_0x167525['as'],'attributes':_0x167525[_0x9964('0x1b')],'include':_0x167525['include']?_[_0x9964('0x1d')](_0x167525[_0x9964('0x1e')],function(_0x5961e9){return{'model':db[_0x5961e9[_0x9964('0x1f')]],'as':_0x5961e9['as'],'attributes':_0x5961e9[_0x9964('0x1b')],'include':_0x5961e9[_0x9964('0x1e')]?_[_0x9964('0x1d')](_0x5961e9[_0x9964('0x1e')],function(_0x5a5793){return{'model':db[_0x5a5793[_0x9964('0x1f')]],'as':_0x5a5793['as'],'attributes':_0x5a5793['attributes']};}):[]};}):[]};}):[]:[]})[_0x9964('0x20')](function(_0x512f6b){logger[_0x9964('0xc')]('GetCampaign',_0x4c18a4);logger[_0x9964('0xd')](_0x9964('0x16'),_0x4c18a4,JSON[_0x9964('0x10')](_0x512f6b));_0x40b3dd(_0x512f6b);})[_0x9964('0x15')](function(_0x11cdce){logger[_0x9964('0x11')](_0x9964('0x16'),_0x11cdce[_0x9964('0x14')],_0x4c18a4);_0x931a0f(_0x4f2f68[_0x9964('0x11')](0x1f4,_0x11cdce['message']));});});};
\ No newline at end of file
+var _0x8664=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','Campaign,\x20%s,\x20%s','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','findAll','options','raw','attributes','include','map','model','GetCampaign','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x1ea2a4,_0x28c8ee){var _0x103f84=function(_0x1b8f33){while(--_0x1b8f33){_0x1ea2a4['push'](_0x1ea2a4['shift']());}};_0x103f84(++_0x28c8ee);}(_0x8664,0x11a));var _0x4866=function(_0x1a174c,_0x4bafa3){_0x1a174c=_0x1a174c-0x0;var _0x405793=_0x8664[_0x1a174c];return _0x405793;};'use strict';var _=require(_0x4866('0x0'));var util=require(_0x4866('0x1'));var moment=require(_0x4866('0x2'));var BPromise=require(_0x4866('0x3'));var rs=require(_0x4866('0x4'));var fs=require('fs');var Redis=require(_0x4866('0x5'));var db=require(_0x4866('0x6'))['db'];var utils=require(_0x4866('0x7'));var logger=require(_0x4866('0x8'))('rpc');var config=require(_0x4866('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x4866('0xa')][_0x4866('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x439f55,_0x10f7c1,_0x2b4bb0){return new BPromise(function(_0x142f18,_0x4e07e3){return client[_0x4866('0xc')](_0x439f55,_0x2b4bb0)[_0x4866('0xd')](function(_0x10a369){logger[_0x4866('0xe')](_0x4866('0xf'),_0x10f7c1,'request\x20sent');logger[_0x4866('0x10')](_0x4866('0x11'),_0x10f7c1,'request\x20sent',JSON[_0x4866('0x12')](_0x10a369));if(_0x10a369[_0x4866('0x13')]){if(_0x10a369['error']['code']===0x1f4){logger['error'](_0x4866('0xf'),_0x10f7c1,_0x10a369[_0x4866('0x13')][_0x4866('0x14')]);return _0x4e07e3(_0x10a369[_0x4866('0x13')][_0x4866('0x14')]);}logger[_0x4866('0x13')]('Campaign,\x20%s,\x20%s',_0x10f7c1,_0x10a369[_0x4866('0x13')][_0x4866('0x14')]);return _0x142f18(_0x10a369['error'][_0x4866('0x14')]);}else{logger[_0x4866('0xe')](_0x4866('0xf'),_0x10f7c1,_0x4866('0x15'));_0x142f18(_0x10a369[_0x4866('0x16')][_0x4866('0x14')]);}})[_0x4866('0x17')](function(_0x653916){logger[_0x4866('0x13')]('Campaign,\x20%s,\x20%s',_0x10f7c1,_0x653916);_0x4e07e3(_0x653916);});});}exports['GetCampaign']=function(_0x423490){var _0x137ddf=this;return new Promise(function(_0x176c99,_0x51038a){return db['Campaign'][_0x4866('0x18')]({'raw':_0x423490[_0x4866('0x19')]?_0x423490['options'][_0x4866('0x1a')]===undefined?!![]:![]:!![],'where':_0x423490['options']?_0x423490[_0x4866('0x19')]['where']||null:null,'attributes':_0x423490[_0x4866('0x19')]?_0x423490[_0x4866('0x19')][_0x4866('0x1b')]||null:null,'limit':_0x423490[_0x4866('0x19')]?_0x423490[_0x4866('0x19')]['limit']||null:null,'include':_0x423490['options']?_0x423490[_0x4866('0x19')][_0x4866('0x1c')]?_[_0x4866('0x1d')](_0x423490['options'][_0x4866('0x1c')],function(_0x4d3da4){return{'model':db[_0x4d3da4['model']],'as':_0x4d3da4['as'],'attributes':_0x4d3da4[_0x4866('0x1b')],'include':_0x4d3da4[_0x4866('0x1c')]?_['map'](_0x4d3da4[_0x4866('0x1c')],function(_0x3aa7ad){return{'model':db[_0x3aa7ad[_0x4866('0x1e')]],'as':_0x3aa7ad['as'],'attributes':_0x3aa7ad[_0x4866('0x1b')],'include':_0x3aa7ad[_0x4866('0x1c')]?_[_0x4866('0x1d')](_0x3aa7ad[_0x4866('0x1c')],function(_0x136b1f){return{'model':db[_0x136b1f[_0x4866('0x1e')]],'as':_0x136b1f['as'],'attributes':_0x136b1f[_0x4866('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x4866('0xd')](function(_0x58f5f4){logger[_0x4866('0xe')](_0x4866('0x1f'),_0x423490);logger[_0x4866('0x10')](_0x4866('0x1f'),_0x423490,JSON[_0x4866('0x12')](_0x58f5f4));_0x176c99(_0x58f5f4);})[_0x4866('0x17')](function(_0x2e9b65){logger[_0x4866('0x13')](_0x4866('0x1f'),_0x2e9b65[_0x4866('0x14')],_0x423490);_0x51038a(_0x137ddf[_0x4866('0x13')](0x1f4,_0x2e9b65[_0x4866('0x14')]));});});};
\ No newline at end of file
diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js
index 3f27699..85e99ac 100644
--- a/server/api/campaign/index.js
+++ b/server/api/campaign/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0a8d=['index','/:id','/:id/hoppers','getHoppers','getHopperHistories','/:id/hopper_black','getHopperBlacks','getBlackLists','create','/:id/clone','post','/:id/lists','addLists','/:id/blacklists','addBlackLists','put','update','delete','destroy','removeBlackLists','exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','get','isAuthenticated'];(function(_0x51bfb2,_0x273636){var _0x15e037=function(_0x176764){while(--_0x176764){_0x51bfb2['push'](_0x51bfb2['shift']());}};_0x15e037(++_0x273636);}(_0x0a8d,0x89));var _0xd0a8=function(_0x1b2664,_0x197517){_0x1b2664=_0x1b2664-0x0;var _0x1c5397=_0x0a8d[_0x1b2664];return _0x1c5397;};'use strict';var multer=require(_0xd0a8('0x0'));var util=require(_0xd0a8('0x1'));var path=require('path');var timeout=require(_0xd0a8('0x2'));var express=require(_0xd0a8('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xd0a8('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xd0a8('0x5'));var controller=require('./campaign.controller');router[_0xd0a8('0x6')]('/',auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x8')]);router['get'](_0xd0a8('0x9'),auth['isAuthenticated'](),controller['show']);router['get'](_0xd0a8('0xa'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0xb')]);router[_0xd0a8('0x6')]('/:id/hopper_histories',auth['isAuthenticated'](),controller[_0xd0a8('0xc')]);router[_0xd0a8('0x6')]('/:id/hopper_finals',auth[_0xd0a8('0x7')](),controller['getHopperFinals']);router[_0xd0a8('0x6')](_0xd0a8('0xd'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0xe')]);router[_0xd0a8('0x6')]('/:id/lists',auth[_0xd0a8('0x7')](),controller['getLists']);router[_0xd0a8('0x6')]('/:id/blacklists',auth[_0xd0a8('0x7')](),controller[_0xd0a8('0xf')]);router['post']('/',auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x10')]);router['post'](_0xd0a8('0x11'),auth[_0xd0a8('0x7')](),controller['clone']);router[_0xd0a8('0x12')](_0xd0a8('0x13'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x14')]);router[_0xd0a8('0x12')](_0xd0a8('0x15'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x16')]);router[_0xd0a8('0x17')](_0xd0a8('0x9'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x18')]);router[_0xd0a8('0x19')](_0xd0a8('0x9'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x1a')]);router[_0xd0a8('0x19')](_0xd0a8('0x13'),auth[_0xd0a8('0x7')](),controller['removeLists']);router[_0xd0a8('0x19')](_0xd0a8('0x15'),auth[_0xd0a8('0x7')](),controller[_0xd0a8('0x1b')]);module[_0xd0a8('0x1c')]=router;
\ No newline at end of file
+var _0xdd51=['connect-timeout','Router','fs-extra','../../components/interaction/service','./campaign.controller','get','isAuthenticated','index','/:id','show','getHoppers','/:id/hopper_histories','/:id/hopper_finals','/:id/hopper_black','getHopperBlacks','getLists','/:id/blacklists','getBlackLists','post','create','/:id/lists','addLists','addBlackLists','put','update','destroy','removeLists','path'];(function(_0x4f0ee9,_0x41b41e){var _0x446da1=function(_0x4d534c){while(--_0x4d534c){_0x4f0ee9['push'](_0x4f0ee9['shift']());}};_0x446da1(++_0x41b41e);}(_0xdd51,0x8b));var _0x1dd5=function(_0x550d12,_0x5384bd){_0x550d12=_0x550d12-0x0;var _0x12103d=_0xdd51[_0x550d12];return _0x12103d;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1dd5('0x0'));var timeout=require(_0x1dd5('0x1'));var express=require('express');var router=express[_0x1dd5('0x2')]();var fs_extra=require(_0x1dd5('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x1dd5('0x4'));var config=require('../../config/environment');var controller=require(_0x1dd5('0x5'));router[_0x1dd5('0x6')]('/',auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x8')]);router['get'](_0x1dd5('0x9'),auth[_0x1dd5('0x7')](),controller[_0x1dd5('0xa')]);router[_0x1dd5('0x6')]('/:id/hoppers',auth[_0x1dd5('0x7')](),controller[_0x1dd5('0xb')]);router[_0x1dd5('0x6')](_0x1dd5('0xc'),auth[_0x1dd5('0x7')](),controller['getHopperHistories']);router['get'](_0x1dd5('0xd'),auth[_0x1dd5('0x7')](),controller['getHopperFinals']);router[_0x1dd5('0x6')](_0x1dd5('0xe'),auth['isAuthenticated'](),controller[_0x1dd5('0xf')]);router[_0x1dd5('0x6')]('/:id/lists',auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x10')]);router[_0x1dd5('0x6')](_0x1dd5('0x11'),auth['isAuthenticated'](),controller[_0x1dd5('0x12')]);router[_0x1dd5('0x13')]('/',auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x14')]);router[_0x1dd5('0x13')]('/:id/clone',auth[_0x1dd5('0x7')](),controller['clone']);router[_0x1dd5('0x13')](_0x1dd5('0x15'),auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x16')]);router['post']('/:id/blacklists',auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x17')]);router[_0x1dd5('0x18')](_0x1dd5('0x9'),auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x19')]);router['delete'](_0x1dd5('0x9'),auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x1a')]);router['delete']('/:id/lists',auth[_0x1dd5('0x7')](),controller[_0x1dd5('0x1b')]);router['delete'](_0x1dd5('0x11'),auth[_0x1dd5('0x7')](),controller['removeBlackLists']);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js
index 54f0e8a..cb4961e 100644
--- a/server/api/cannedAnswer/cannedAnswer.attributes.js
+++ b/server/api/cannedAnswer/cannedAnswer.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x83a5=['getDataValue','sequelize','exports','STRING','TEXT','medium','VIRTUAL'];(function(_0x46f3f8,_0x12c74b){var _0xbc57cd=function(_0x34df37){while(--_0x34df37){_0x46f3f8['push'](_0x46f3f8['shift']());}};_0xbc57cd(++_0x12c74b);}(_0x83a5,0x8d));var _0x583a=function(_0x532c88,_0x493d7c){_0x532c88=_0x532c88-0x0;var _0x4c6b26=_0x83a5[_0x532c88];return _0x4c6b26;};'use strict';var Sequelize=require(_0x583a('0x0'));module[_0x583a('0x1')]={'key':{'type':Sequelize[_0x583a('0x2')],'allowNull':![]},'value':{'type':Sequelize[_0x583a('0x3')],'length':_0x583a('0x4'),'allowNull':![]},'description':{'type':Sequelize[_0x583a('0x2')]},'name':{'type':Sequelize[_0x583a('0x5')],'get':function(){return this[_0x583a('0x6')]('key');}}};
\ No newline at end of file
+var _0x56e0=['sequelize','exports','TEXT','medium','STRING','VIRTUAL','key'];(function(_0x5028e6,_0x176c44){var _0x16af2d=function(_0x29ee09){while(--_0x29ee09){_0x5028e6['push'](_0x5028e6['shift']());}};_0x16af2d(++_0x176c44);}(_0x56e0,0x70));var _0x056e=function(_0x570eb5,_0xb20565){_0x570eb5=_0x570eb5-0x0;var _0x2bb3ae=_0x56e0[_0x570eb5];return _0x2bb3ae;};'use strict';var Sequelize=require(_0x056e('0x0'));module[_0x056e('0x1')]={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x056e('0x2')],'length':_0x056e('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x056e('0x4')]},'name':{'type':Sequelize[_0x056e('0x5')],'get':function(){return this['getDataValue'](_0x056e('0x6'));}}};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js
index ac0f823..4154d31 100644
--- a/server/api/cannedAnswer/cannedAnswer.controller.js
+++ b/server/api/cannedAnswer/cannedAnswer.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe52c=['path','sox','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','get','CannedAnswers','UserProfileResource','sendStatus','error','stack','name','send','index','map','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','options','CannedAnswer','includeAll','include','rows','catch','show','merge','find','update','body','params','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','eml-format','rimraf','fast-json-patch','moment','mustache'];(function(_0x313c96,_0x3cee6e){var _0x522f53=function(_0x8961e){while(--_0x8961e){_0x313c96['push'](_0x313c96['shift']());}};_0x522f53(++_0x3cee6e);}(_0xe52c,0xa7));var _0xce52=function(_0x3e57cc,_0x432089){_0x3e57cc=_0x3e57cc-0x0;var _0x4737a0=_0xe52c[_0x3e57cc];return _0x4737a0;};'use strict';var emlformat=require(_0xce52('0x0'));var rimraf=require(_0xce52('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xce52('0x2'));var rp=require('request-promise');var moment=require(_0xce52('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xce52('0x4'));var util=require('util');var path=require(_0xce52('0x5'));var sox=require(_0xce52('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xce52('0x7'));var _=require(_0xce52('0x8'));var squel=require(_0xce52('0x9'));var crypto=require(_0xce52('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xce52('0xb'));var toCsv=require(_0xce52('0xc'));var querystring=require(_0xce52('0xd'));var Papa=require('papaparse');var Redis=require(_0xce52('0xe'));var authService=require(_0xce52('0xf'));var qs=require(_0xce52('0x10'));var as=require(_0xce52('0x11'));var hardwareService=require(_0xce52('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0xce52('0x13'));var config=require(_0xce52('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0xce52('0x15'))['db'];function respondWithStatusCode(_0x1d3137,_0x1472ea){_0x1472ea=_0x1472ea||0xcc;return function(_0x135adf){if(_0x135adf){return _0x1d3137['sendStatus'](_0x1472ea);}return _0x1d3137[_0xce52('0x16')](_0x1472ea)[_0xce52('0x17')]();};}function respondWithResult(_0xaacb6,_0x35b5c5){_0x35b5c5=_0x35b5c5||0xc8;return function(_0x3fa8a1){if(_0x3fa8a1){return _0xaacb6[_0xce52('0x16')](_0x35b5c5)[_0xce52('0x18')](_0x3fa8a1);}};}function respondWithFilteredResult(_0x4fc0bc,_0x4bfbb1){return function(_0x483511){if(_0x483511){var _0x7f9ea9=typeof _0x4bfbb1[_0xce52('0x19')]===_0xce52('0x1a')&&typeof _0x4bfbb1[_0xce52('0x1b')]===_0xce52('0x1a');var _0x5c5267=_0x483511[_0xce52('0x1c')];var _0x40be60=_0x7f9ea9?0x0:_0x4bfbb1['offset'];var _0x528c0b=_0x7f9ea9?_0x483511[_0xce52('0x1c')]:_0x4bfbb1[_0xce52('0x19')]+_0x4bfbb1[_0xce52('0x1b')];var _0x343abc;if(_0x528c0b>=_0x5c5267){_0x528c0b=_0x5c5267;_0x343abc=0xc8;}else{_0x343abc=0xce;}_0x4fc0bc['status'](_0x343abc);return _0x4fc0bc[_0xce52('0x1d')]('Content-Range',_0x40be60+'-'+_0x528c0b+'/'+_0x5c5267)[_0xce52('0x18')](_0x483511);}return null;};}function patchUpdates(_0x525a2f){return function(_0x3c3bae){try{jsonpatch[_0xce52('0x1e')](_0x3c3bae,_0x525a2f,!![]);}catch(_0x5e446d){return BPromise[_0xce52('0x1f')](_0x5e446d);}return _0x3c3bae[_0xce52('0x20')]();};}function saveUpdates(_0x520692,_0x27ed10){return function(_0x3d03e5){if(_0x3d03e5){return _0x3d03e5['update'](_0x520692)[_0xce52('0x21')](function(_0x3d4ca4){return _0x3d4ca4;});}return null;};}function removeEntity(_0x5271fc,_0x36d193){return function(_0x3f4686){if(_0x3f4686){return _0x3f4686[_0xce52('0x22')]()['then'](function(){var _0x1e52d6=_0x3f4686[_0xce52('0x23')]({'plain':!![]});var _0x20d557=_0xce52('0x24');return db[_0xce52('0x25')]['destroy']({'where':{'type':_0x20d557,'resourceId':_0x1e52d6['id']}})[_0xce52('0x21')](function(){return _0x3f4686;});})['then'](function(){_0x5271fc['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3ad6bb,_0x575788){return function(_0x26caf2){if(!_0x26caf2){_0x3ad6bb[_0xce52('0x26')](0x194);}return _0x26caf2;};}function handleError(_0x16eb0f,_0x38ee66){_0x38ee66=_0x38ee66||0x1f4;return function(_0x6f8e3f){logger[_0xce52('0x27')](_0x6f8e3f[_0xce52('0x28')]);if(_0x6f8e3f[_0xce52('0x29')]){delete _0x6f8e3f[_0xce52('0x29')];}_0x16eb0f[_0xce52('0x16')](_0x38ee66)[_0xce52('0x2a')](_0x6f8e3f);};}exports[_0xce52('0x2b')]=function(_0x43941b,_0x568a9e){var _0x317e33={},_0x458889={},_0x25e08f={'count':0x0,'rows':[]};var _0x30eb82=_[_0xce52('0x2c')](db['CannedAnswer']['rawAttributes'],function(_0x584a3a){return{'name':_0x584a3a['fieldName'],'type':_0x584a3a[_0xce52('0x2d')][_0xce52('0x2e')]};});_0x458889['model']=_['map'](_0x30eb82,_0xce52('0x29'));_0x458889[_0xce52('0x2f')]=_[_0xce52('0x30')](_0x43941b['query']);_0x458889[_0xce52('0x31')]=_[_0xce52('0x32')](_0x458889[_0xce52('0x33')],_0x458889[_0xce52('0x2f')]);_0x317e33[_0xce52('0x34')]=_['intersection'](_0x458889['model'],qs[_0xce52('0x35')](_0x43941b[_0xce52('0x2f')][_0xce52('0x35')]));_0x317e33[_0xce52('0x34')]=_0x317e33[_0xce52('0x34')][_0xce52('0x36')]?_0x317e33[_0xce52('0x34')]:_0x458889[_0xce52('0x33')];if(!_0x43941b[_0xce52('0x2f')][_0xce52('0x37')]('nolimit')){_0x317e33[_0xce52('0x1b')]=qs[_0xce52('0x1b')](_0x43941b[_0xce52('0x2f')]['limit']);_0x317e33[_0xce52('0x19')]=qs[_0xce52('0x19')](_0x43941b[_0xce52('0x2f')]['offset']);}_0x317e33[_0xce52('0x38')]=qs[_0xce52('0x39')](_0x43941b[_0xce52('0x2f')][_0xce52('0x39')]);_0x317e33['where']=qs[_0xce52('0x31')](_[_0xce52('0x3a')](_0x43941b[_0xce52('0x2f')],_0x458889[_0xce52('0x31')]),_0x30eb82);if(_0x43941b[_0xce52('0x2f')][_0xce52('0x3b')]){_0x317e33[_0xce52('0x3c')]=_['merge'](_0x317e33['where'],{'$or':[{'key':{'$like':'%'+_0x43941b[_0xce52('0x2f')][_0xce52('0x3b')]+'%'}},{'value':{'$like':'%'+_0x43941b[_0xce52('0x2f')][_0xce52('0x3b')]+'%'}}]});}_0x317e33=_['merge']({},_0x317e33,_0x43941b[_0xce52('0x3d')]);var _0x18821e={'where':_0x317e33[_0xce52('0x3c')]};return db[_0xce52('0x3e')][_0xce52('0x1c')](_0x18821e)[_0xce52('0x21')](function(_0x1e833d){_0x25e08f['count']=_0x1e833d;if(_0x43941b['query'][_0xce52('0x3f')]){_0x317e33[_0xce52('0x40')]=[{'all':!![]}];}return db[_0xce52('0x3e')]['findAll'](_0x317e33);})[_0xce52('0x21')](function(_0x1097c7){_0x25e08f[_0xce52('0x41')]=_0x1097c7;return _0x25e08f;})[_0xce52('0x21')](respondWithFilteredResult(_0x568a9e,_0x317e33))[_0xce52('0x42')](handleError(_0x568a9e,null));};exports[_0xce52('0x43')]=function(_0x2db2c1,_0x1f8f09){var _0x5f87d4={'raw':!![],'where':{'id':_0x2db2c1['params']['id']}},_0x32b157={};_0x32b157[_0xce52('0x33')]=_[_0xce52('0x30')](db['CannedAnswer']['rawAttributes']);_0x32b157[_0xce52('0x2f')]=_['keys'](_0x2db2c1[_0xce52('0x2f')]);_0x32b157[_0xce52('0x31')]=_['intersection'](_0x32b157['model'],_0x32b157[_0xce52('0x2f')]);_0x5f87d4[_0xce52('0x34')]=_[_0xce52('0x32')](_0x32b157['model'],qs['fields'](_0x2db2c1[_0xce52('0x2f')][_0xce52('0x35')]));_0x5f87d4[_0xce52('0x34')]=_0x5f87d4[_0xce52('0x34')][_0xce52('0x36')]?_0x5f87d4[_0xce52('0x34')]:_0x32b157['model'];if(_0x2db2c1[_0xce52('0x2f')][_0xce52('0x3f')]){_0x5f87d4['include']=[{'all':!![]}];}_0x5f87d4=_[_0xce52('0x44')]({},_0x5f87d4,_0x2db2c1[_0xce52('0x3d')]);return db[_0xce52('0x3e')][_0xce52('0x45')](_0x5f87d4)[_0xce52('0x21')](handleEntityNotFound(_0x1f8f09,null))['then'](respondWithResult(_0x1f8f09,null))[_0xce52('0x42')](handleError(_0x1f8f09,null));};exports[_0xce52('0x46')]=function(_0x324ce8,_0x2c9d5f){if(_0x324ce8['body']['id']){delete _0x324ce8[_0xce52('0x47')]['id'];}return db[_0xce52('0x3e')][_0xce52('0x45')]({'where':{'id':_0x324ce8[_0xce52('0x48')]['id']}})['then'](handleEntityNotFound(_0x2c9d5f,null))['then'](saveUpdates(_0x324ce8[_0xce52('0x47')],null))[_0xce52('0x21')](respondWithResult(_0x2c9d5f,null))[_0xce52('0x42')](handleError(_0x2c9d5f,null));};exports[_0xce52('0x22')]=function(_0x28a172,_0x262f5a){return db[_0xce52('0x3e')][_0xce52('0x45')]({'where':{'id':_0x28a172[_0xce52('0x48')]['id']}})['then'](handleEntityNotFound(_0x262f5a,null))[_0xce52('0x21')](removeEntity(_0x262f5a,null))['catch'](handleError(_0x262f5a,null));};exports[_0xce52('0x49')]=function(_0x2a48fe,_0x428abb){var _0x2153a7={'key':_0x2a48fe[_0xce52('0x47')][_0xce52('0x2e')]};if(_0x2a48fe['body']['MailAccountId']){_0x2153a7[_0xce52('0x4a')]=_0x2a48fe['body']['MailAccountId'];}else if(_0x2a48fe[_0xce52('0x47')][_0xce52('0x4b')]){_0x2153a7['SmsAccountId']=_0x2a48fe[_0xce52('0x47')][_0xce52('0x4b')];}else if(_0x2a48fe['body'][_0xce52('0x4c')]){_0x2153a7['OpenchannelAccountId']=_0x2a48fe[_0xce52('0x47')][_0xce52('0x4c')];}else if(_0x2a48fe[_0xce52('0x47')][_0xce52('0x4d')]){_0x2153a7[_0xce52('0x4d')]=_0x2a48fe[_0xce52('0x47')]['ChatWebsiteId'];}return db['CannedAnswer'][_0xce52('0x45')]({'where':_0x2153a7})[_0xce52('0x21')](function(_0x5d4f61){if(_0x5d4f61){throw new db[(_0xce52('0x4e'))][(_0xce52('0x4f'))](_0xce52('0x50'));}return db[_0xce52('0x3e')]['create'](_0x2a48fe[_0xce52('0x47')]);})[_0xce52('0x21')](function(_0x3f0a0b){var _0x34e23d=_0x2a48fe[_0xce52('0x51')][_0xce52('0x23')]({'plain':!![]});if(!_0x34e23d)throw new Error(_0xce52('0x52'));if(_0x34e23d[_0xce52('0x53')]==='user'){var _0x4b76d1=_0x3f0a0b['get']({'plain':!![]});return db[_0xce52('0x54')]['find']({'where':{'name':_0xce52('0x24'),'userProfileId':_0x34e23d[_0xce52('0x55')]},'raw':!![]})[_0xce52('0x21')](function(_0x1c2799){if(_0x1c2799&&_0x1c2799['autoAssociation']===0x0){return db['UserProfileResource'][_0xce52('0x49')]({'name':_0x4b76d1[_0xce52('0x29')],'resourceId':_0x4b76d1['id'],'type':_0x1c2799[_0xce52('0x29')],'sectionId':_0x1c2799['id']},{})[_0xce52('0x21')](function(){return _0x3f0a0b;});}else{return _0x3f0a0b;}})[_0xce52('0x42')](function(_0x498c81){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x498c81);throw _0x498c81;});}return _0x3f0a0b;})[_0xce52('0x21')](respondWithResult(_0x428abb,0xc9))[_0xce52('0x42')](handleError(_0x428abb,null));};
\ No newline at end of file
+var _0xab9a=['ChatWebsiteId','Sequelize','The\x20inserted\x20key\x20already\x20exists.','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','UserProfileResource','create','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','json','offset','undefined','limit','count','status','Content-Range','apply','reject','update','destroy','then','CannedAnswers','end','error','name','send','index','CannedAnswer','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','catch','params','find','body','MailAccountId','SmsAccountId','OpenchannelAccountId'];(function(_0x307088,_0x497e83){var _0x209279=function(_0x53ccc7){while(--_0x53ccc7){_0x307088['push'](_0x307088['shift']());}};_0x209279(++_0x497e83);}(_0xab9a,0x112));var _0xaab9=function(_0x334841,_0x2bbc4c){_0x334841=_0x334841-0x0;var _0x5beb4b=_0xab9a[_0x334841];return _0x5beb4b;};'use strict';var emlformat=require(_0xaab9('0x0'));var rimraf=require(_0xaab9('0x1'));var zipdir=require(_0xaab9('0x2'));var jsonpatch=require(_0xaab9('0x3'));var rp=require(_0xaab9('0x4'));var moment=require(_0xaab9('0x5'));var BPromise=require(_0xaab9('0x6'));var Mustache=require(_0xaab9('0x7'));var util=require(_0xaab9('0x8'));var path=require(_0xaab9('0x9'));var sox=require(_0xaab9('0xa'));var csv=require(_0xaab9('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xaab9('0xc'));var squel=require('squel');var crypto=require(_0xaab9('0xd'));var jsforce=require(_0xaab9('0xe'));var deskjs=require(_0xaab9('0xf'));var toCsv=require(_0xaab9('0xb'));var querystring=require('querystring');var Papa=require(_0xaab9('0x10'));var Redis=require(_0xaab9('0x11'));var authService=require(_0xaab9('0x12'));var qs=require(_0xaab9('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xaab9('0x14'));var logger=require(_0xaab9('0x15'))('api');var utils=require(_0xaab9('0x16'));var config=require(_0xaab9('0x17'));var licenseUtil=require(_0xaab9('0x18'));var db=require(_0xaab9('0x19'))['db'];function respondWithStatusCode(_0x139ab6,_0x1dcb73){_0x1dcb73=_0x1dcb73||0xcc;return function(_0x1c8cdd){if(_0x1c8cdd){return _0x139ab6[_0xaab9('0x1a')](_0x1dcb73);}return _0x139ab6['status'](_0x1dcb73)['end']();};}function respondWithResult(_0x1d3488,_0x3a0a31){_0x3a0a31=_0x3a0a31||0xc8;return function(_0x5aa94f){if(_0x5aa94f){return _0x1d3488['status'](_0x3a0a31)[_0xaab9('0x1b')](_0x5aa94f);}};}function respondWithFilteredResult(_0x4bc81e,_0x4c4391){return function(_0x53cee1){if(_0x53cee1){var _0x768ff2=typeof _0x4c4391[_0xaab9('0x1c')]===_0xaab9('0x1d')&&typeof _0x4c4391[_0xaab9('0x1e')]===_0xaab9('0x1d');var _0x56f356=_0x53cee1[_0xaab9('0x1f')];var _0x785621=_0x768ff2?0x0:_0x4c4391[_0xaab9('0x1c')];var _0x4daa08=_0x768ff2?_0x53cee1[_0xaab9('0x1f')]:_0x4c4391['offset']+_0x4c4391['limit'];var _0x14ccdb;if(_0x4daa08>=_0x56f356){_0x4daa08=_0x56f356;_0x14ccdb=0xc8;}else{_0x14ccdb=0xce;}_0x4bc81e[_0xaab9('0x20')](_0x14ccdb);return _0x4bc81e['set'](_0xaab9('0x21'),_0x785621+'-'+_0x4daa08+'/'+_0x56f356)[_0xaab9('0x1b')](_0x53cee1);}return null;};}function patchUpdates(_0xc32894){return function(_0x4e87a1){try{jsonpatch[_0xaab9('0x22')](_0x4e87a1,_0xc32894,!![]);}catch(_0x3049c3){return BPromise[_0xaab9('0x23')](_0x3049c3);}return _0x4e87a1['save']();};}function saveUpdates(_0x4c8527,_0x16481a){return function(_0x1ec526){if(_0x1ec526){return _0x1ec526[_0xaab9('0x24')](_0x4c8527)['then'](function(_0xfc36d6){return _0xfc36d6;});}return null;};}function removeEntity(_0x2ea34d,_0x5e0794){return function(_0x20ad7a){if(_0x20ad7a){return _0x20ad7a[_0xaab9('0x25')]()[_0xaab9('0x26')](function(){var _0x4d669e=_0x20ad7a['get']({'plain':!![]});var _0x51e105=_0xaab9('0x27');return db['UserProfileResource'][_0xaab9('0x25')]({'where':{'type':_0x51e105,'resourceId':_0x4d669e['id']}})[_0xaab9('0x26')](function(){return _0x20ad7a;});})['then'](function(){_0x2ea34d[_0xaab9('0x20')](0xcc)[_0xaab9('0x28')]();});}};}function handleEntityNotFound(_0x3c208d,_0x56eeeb){return function(_0x255f38){if(!_0x255f38){_0x3c208d[_0xaab9('0x1a')](0x194);}return _0x255f38;};}function handleError(_0x4ab181,_0x54af0c){_0x54af0c=_0x54af0c||0x1f4;return function(_0x34988b){logger[_0xaab9('0x29')](_0x34988b['stack']);if(_0x34988b[_0xaab9('0x2a')]){delete _0x34988b[_0xaab9('0x2a')];}_0x4ab181[_0xaab9('0x20')](_0x54af0c)[_0xaab9('0x2b')](_0x34988b);};}exports[_0xaab9('0x2c')]=function(_0xf1a459,_0x548753){var _0x40a717={},_0x3e9acb={},_0x1b4370={'count':0x0,'rows':[]};var _0x5a6a80=_['map'](db[_0xaab9('0x2d')][_0xaab9('0x2e')],function(_0x570194){return{'name':_0x570194[_0xaab9('0x2f')],'type':_0x570194['type'][_0xaab9('0x30')]};});_0x3e9acb[_0xaab9('0x31')]=_[_0xaab9('0x32')](_0x5a6a80,_0xaab9('0x2a'));_0x3e9acb[_0xaab9('0x33')]=_[_0xaab9('0x34')](_0xf1a459['query']);_0x3e9acb[_0xaab9('0x35')]=_[_0xaab9('0x36')](_0x3e9acb[_0xaab9('0x31')],_0x3e9acb[_0xaab9('0x33')]);_0x40a717[_0xaab9('0x37')]=_['intersection'](_0x3e9acb[_0xaab9('0x31')],qs[_0xaab9('0x38')](_0xf1a459[_0xaab9('0x33')]['fields']));_0x40a717[_0xaab9('0x37')]=_0x40a717[_0xaab9('0x37')][_0xaab9('0x39')]?_0x40a717[_0xaab9('0x37')]:_0x3e9acb[_0xaab9('0x31')];if(!_0xf1a459[_0xaab9('0x33')][_0xaab9('0x3a')](_0xaab9('0x3b'))){_0x40a717['limit']=qs[_0xaab9('0x1e')](_0xf1a459[_0xaab9('0x33')][_0xaab9('0x1e')]);_0x40a717[_0xaab9('0x1c')]=qs[_0xaab9('0x1c')](_0xf1a459[_0xaab9('0x33')]['offset']);}_0x40a717[_0xaab9('0x3c')]=qs[_0xaab9('0x3d')](_0xf1a459[_0xaab9('0x33')][_0xaab9('0x3d')]);_0x40a717[_0xaab9('0x3e')]=qs[_0xaab9('0x35')](_[_0xaab9('0x3f')](_0xf1a459[_0xaab9('0x33')],_0x3e9acb[_0xaab9('0x35')]),_0x5a6a80);if(_0xf1a459['query']['filter']){_0x40a717['where']=_[_0xaab9('0x40')](_0x40a717[_0xaab9('0x3e')],{'$or':[{'key':{'$like':'%'+_0xf1a459[_0xaab9('0x33')]['filter']+'%'}},{'value':{'$like':'%'+_0xf1a459[_0xaab9('0x33')][_0xaab9('0x41')]+'%'}}]});}_0x40a717=_[_0xaab9('0x40')]({},_0x40a717,_0xf1a459[_0xaab9('0x42')]);var _0x575f3b={'where':_0x40a717['where']};return db[_0xaab9('0x2d')][_0xaab9('0x1f')](_0x575f3b)[_0xaab9('0x26')](function(_0x464ac3){_0x1b4370[_0xaab9('0x1f')]=_0x464ac3;if(_0xf1a459[_0xaab9('0x33')][_0xaab9('0x43')]){_0x40a717[_0xaab9('0x44')]=[{'all':!![]}];}return db[_0xaab9('0x2d')][_0xaab9('0x45')](_0x40a717);})['then'](function(_0x437a25){_0x1b4370[_0xaab9('0x46')]=_0x437a25;return _0x1b4370;})['then'](respondWithFilteredResult(_0x548753,_0x40a717))[_0xaab9('0x47')](handleError(_0x548753,null));};exports['show']=function(_0x2a607c,_0x30df15){var _0x53c613={'raw':!![],'where':{'id':_0x2a607c[_0xaab9('0x48')]['id']}},_0x5e3cc6={};_0x5e3cc6[_0xaab9('0x31')]=_['keys'](db[_0xaab9('0x2d')]['rawAttributes']);_0x5e3cc6[_0xaab9('0x33')]=_['keys'](_0x2a607c[_0xaab9('0x33')]);_0x5e3cc6[_0xaab9('0x35')]=_[_0xaab9('0x36')](_0x5e3cc6[_0xaab9('0x31')],_0x5e3cc6[_0xaab9('0x33')]);_0x53c613['attributes']=_[_0xaab9('0x36')](_0x5e3cc6[_0xaab9('0x31')],qs['fields'](_0x2a607c[_0xaab9('0x33')][_0xaab9('0x38')]));_0x53c613['attributes']=_0x53c613[_0xaab9('0x37')][_0xaab9('0x39')]?_0x53c613[_0xaab9('0x37')]:_0x5e3cc6[_0xaab9('0x31')];if(_0x2a607c[_0xaab9('0x33')][_0xaab9('0x43')]){_0x53c613['include']=[{'all':!![]}];}_0x53c613=_['merge']({},_0x53c613,_0x2a607c[_0xaab9('0x42')]);return db[_0xaab9('0x2d')][_0xaab9('0x49')](_0x53c613)[_0xaab9('0x26')](handleEntityNotFound(_0x30df15,null))[_0xaab9('0x26')](respondWithResult(_0x30df15,null))[_0xaab9('0x47')](handleError(_0x30df15,null));};exports[_0xaab9('0x24')]=function(_0xfa9161,_0x49993b){if(_0xfa9161[_0xaab9('0x4a')]['id']){delete _0xfa9161[_0xaab9('0x4a')]['id'];}return db[_0xaab9('0x2d')]['find']({'where':{'id':_0xfa9161[_0xaab9('0x48')]['id']}})[_0xaab9('0x26')](handleEntityNotFound(_0x49993b,null))['then'](saveUpdates(_0xfa9161['body'],null))[_0xaab9('0x26')](respondWithResult(_0x49993b,null))[_0xaab9('0x47')](handleError(_0x49993b,null));};exports[_0xaab9('0x25')]=function(_0x4d3da5,_0x3a4cd0){return db[_0xaab9('0x2d')][_0xaab9('0x49')]({'where':{'id':_0x4d3da5[_0xaab9('0x48')]['id']}})[_0xaab9('0x26')](handleEntityNotFound(_0x3a4cd0,null))['then'](removeEntity(_0x3a4cd0,null))[_0xaab9('0x47')](handleError(_0x3a4cd0,null));};exports['create']=function(_0x4a91b1,_0x3903d3){var _0x4f710c={'key':_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x30')]};if(_0x4a91b1['body'][_0xaab9('0x4b')]){_0x4f710c[_0xaab9('0x4b')]=_0x4a91b1['body'][_0xaab9('0x4b')];}else if(_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x4c')]){_0x4f710c['SmsAccountId']=_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x4c')];}else if(_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x4d')]){_0x4f710c[_0xaab9('0x4d')]=_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x4d')];}else if(_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x4e')]){_0x4f710c[_0xaab9('0x4e')]=_0x4a91b1[_0xaab9('0x4a')][_0xaab9('0x4e')];}return db[_0xaab9('0x2d')][_0xaab9('0x49')]({'where':_0x4f710c})['then'](function(_0x52c782){if(_0x52c782){throw new db[(_0xaab9('0x4f'))]['ValidationError'](_0xaab9('0x50'));}return db[_0xaab9('0x2d')]['create'](_0x4a91b1[_0xaab9('0x4a')]);})[_0xaab9('0x26')](function(_0x2a4de8){var _0x434da9=_0x4a91b1[_0xaab9('0x51')][_0xaab9('0x52')]({'plain':!![]});if(!_0x434da9)throw new Error(_0xaab9('0x53'));if(_0x434da9['role']===_0xaab9('0x51')){var _0x5042f3=_0x2a4de8[_0xaab9('0x52')]({'plain':!![]});return db['UserProfileSection'][_0xaab9('0x49')]({'where':{'name':_0xaab9('0x27'),'userProfileId':_0x434da9[_0xaab9('0x54')]},'raw':!![]})[_0xaab9('0x26')](function(_0x5a6d63){if(_0x5a6d63&&_0x5a6d63[_0xaab9('0x55')]===0x0){return db[_0xaab9('0x56')][_0xaab9('0x57')]({'name':_0x5042f3[_0xaab9('0x2a')],'resourceId':_0x5042f3['id'],'type':_0x5a6d63[_0xaab9('0x2a')],'sectionId':_0x5a6d63['id']},{})[_0xaab9('0x26')](function(){return _0x2a4de8;});}else{return _0x2a4de8;}})[_0xaab9('0x47')](function(_0x3f1c34){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3f1c34);throw _0x3f1c34;});}return _0x2a4de8;})['then'](respondWithResult(_0x3903d3,0xc9))[_0xaab9('0x47')](handleError(_0x3903d3,null));};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js
index 4c49d7a..63e6bd6 100644
--- a/server/api/cannedAnswer/cannedAnswer.model.js
+++ b/server/api/cannedAnswer/cannedAnswer.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4552=['bluebird','path','rimraf','../../config/environment','exports','define','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment'];(function(_0xc85fbd,_0x21d671){var _0x64f2d9=function(_0x4eb22d){while(--_0x4eb22d){_0xc85fbd['push'](_0xc85fbd['shift']());}};_0x64f2d9(++_0x21d671);}(_0x4552,0x1eb));var _0x2455=function(_0x9163f3,_0x3952eb){_0x9163f3=_0x9163f3-0x0;var _0x1b3790=_0x4552[_0x9163f3];return _0x1b3790;};'use strict';var _=require(_0x2455('0x0'));var util=require(_0x2455('0x1'));var logger=require(_0x2455('0x2'))('api');var moment=require(_0x2455('0x3'));var BPromise=require(_0x2455('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2455('0x5'));var rimraf=require(_0x2455('0x6'));var config=require(_0x2455('0x7'));var attributes=require('./cannedAnswer.attributes');module[_0x2455('0x8')]=function(_0x436101,_0x2d6b84){return _0x436101[_0x2455('0x9')]('CannedAnswer',attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x2455('0xa')});};
\ No newline at end of file
+var _0x984c=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cannedAnswer.attributes','exports','utf8mb4','utf8mb4_unicode_ci','lodash','util'];(function(_0xac3328,_0x23745a){var _0x33aec4=function(_0x476d1a){while(--_0x476d1a){_0xac3328['push'](_0xac3328['shift']());}};_0x33aec4(++_0x23745a);}(_0x984c,0x9a));var _0xc984=function(_0x55a82e,_0x33c436){_0x55a82e=_0x55a82e-0x0;var _0xef982d=_0x984c[_0x55a82e];return _0xef982d;};'use strict';var _=require(_0xc984('0x0'));var util=require(_0xc984('0x1'));var logger=require(_0xc984('0x2'))('api');var moment=require(_0xc984('0x3'));var BPromise=require(_0xc984('0x4'));var rp=require(_0xc984('0x5'));var fs=require('fs');var path=require(_0xc984('0x6'));var rimraf=require(_0xc984('0x7'));var config=require(_0xc984('0x8'));var attributes=require(_0xc984('0x9'));module[_0xc984('0xa')]=function(_0x122235,_0x2a9446){return _0x122235['define']('CannedAnswer',attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc984('0xb'),'collate':_0xc984('0xc')});};
\ No newline at end of file
diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js
index 8bb8153..1a175d5 100644
--- a/server/api/cannedAnswer/cannedAnswer.rpc.js
+++ b/server/api/cannedAnswer/cannedAnswer.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x24e637,_0x2c67d5){var _0x145d36=function(_0x3c5c69){while(--_0x3c5c69){_0x24e637['push'](_0x24e637['shift']());}};_0x145d36(++_0x2c67d5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xa9e0[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x1722a9,_0x3aee3b){var _0x37933e=function(_0x481c48){while(--_0x481c48){_0x1722a9['push'](_0x1722a9['shift']());}};_0x37933e(++_0x3aee3b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xa9e0[_0x387777];return _0x3f84c0;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});}
\ No newline at end of file
diff --git a/server/api/cannedAnswer/index.js b/server/api/cannedAnswer/index.js
index d602ca5..4a76375 100644
--- a/server/api/cannedAnswer/index.js
+++ b/server/api/cannedAnswer/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2773=['post','create','put','update','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','isAuthenticated','index','get','/:id','show'];(function(_0x20723b,_0x48e22e){var _0x103d08=function(_0x7b211e){while(--_0x7b211e){_0x20723b['push'](_0x20723b['shift']());}};_0x103d08(++_0x48e22e);}(_0x2773,0x65));var _0x3277=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x2773[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x3277('0x0'));var util=require(_0x3277('0x1'));var path=require(_0x3277('0x2'));var timeout=require('connect-timeout');var express=require(_0x3277('0x3'));var router=express[_0x3277('0x4')]();var fs_extra=require(_0x3277('0x5'));var auth=require(_0x3277('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x3277('0x7'));var controller=require('./cannedAnswer.controller');router['get']('/',auth[_0x3277('0x8')](),controller[_0x3277('0x9')]);router[_0x3277('0xa')](_0x3277('0xb'),auth[_0x3277('0x8')](),controller[_0x3277('0xc')]);router[_0x3277('0xd')]('/',auth[_0x3277('0x8')](),controller[_0x3277('0xe')]);router[_0x3277('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x3277('0x10')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x3277('0x11')]);module[_0x3277('0x12')]=router;
\ No newline at end of file
+var _0x535d=['util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','index','/:id','isAuthenticated','show','create','update','destroy','exports'];(function(_0x1c1464,_0x2bd8ea){var _0x34cbfb=function(_0x5b67f8){while(--_0x5b67f8){_0x1c1464['push'](_0x1c1464['shift']());}};_0x34cbfb(++_0x2bd8ea);}(_0x535d,0xc0));var _0xd535=function(_0x4f68ce,_0x4cfa98){_0x4f68ce=_0x4f68ce-0x0;var _0x394129=_0x535d[_0x4f68ce];return _0x394129;};'use strict';var multer=require('multer');var util=require(_0xd535('0x0'));var path=require(_0xd535('0x1'));var timeout=require(_0xd535('0x2'));var express=require('express');var router=express[_0xd535('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xd535('0x4'));var interaction=require(_0xd535('0x5'));var config=require(_0xd535('0x6'));var controller=require(_0xd535('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xd535('0x8')]);router['get'](_0xd535('0x9'),auth[_0xd535('0xa')](),controller[_0xd535('0xb')]);router['post']('/',auth[_0xd535('0xa')](),controller[_0xd535('0xc')]);router['put']('/:id',auth[_0xd535('0xa')](),controller[_0xd535('0xd')]);router['delete'](_0xd535('0x9'),auth[_0xd535('0xa')](),controller[_0xd535('0xe')]);module[_0xd535('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js
index 08e6e22..8392da4 100644
--- a/server/api/cdr/cdr.attributes.js
+++ b/server/api/cdr/cdr.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb910=['exports','DATE','1970-01-01\x2000:00:01','STRING','INTEGER','sequelize'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xb910,0x12b));var _0x0b91=function(_0x46d0c9,_0x526bfa){_0x46d0c9=_0x46d0c9-0x0;var _0x174506=_0xb910[_0x46d0c9];return _0x174506;};'use strict';var Sequelize=require(_0x0b91('0x0'));module[_0x0b91('0x1')]={'calldate':{'type':Sequelize[_0x0b91('0x2')],'allowNull':![],'defaultValue':_0x0b91('0x3')},'clid':{'type':Sequelize[_0x0b91('0x4')]},'src':{'type':Sequelize[_0x0b91('0x4')]},'dst':{'type':Sequelize[_0x0b91('0x4')]},'dcontext':{'type':Sequelize[_0x0b91('0x4')]},'channel':{'type':Sequelize[_0x0b91('0x4')]},'dstchannel':{'type':Sequelize[_0x0b91('0x4')]},'lastapp':{'type':Sequelize[_0x0b91('0x4')]},'lastdata':{'type':Sequelize[_0x0b91('0x4')]},'duration':{'type':Sequelize[_0x0b91('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x0b91('0x5')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0x0b91('0x5')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x0b91('0x4')]},'userfield':{'type':Sequelize[_0x0b91('0x4')]},'uniqueid':{'type':Sequelize[_0x0b91('0x4')]},'linkedid':{'type':Sequelize[_0x0b91('0x4')]},'sequence':{'type':Sequelize[_0x0b91('0x4')]},'peeraccount':{'type':Sequelize[_0x0b91('0x4')]},'type':{'type':Sequelize[_0x0b91('0x4')]},'tag':{'type':Sequelize[_0x0b91('0x4')]}};
\ No newline at end of file
+var _0xffdc=['STRING','INTEGER','sequelize','exports','1970-01-01\x2000:00:01'];(function(_0xf7fb5a,_0x1f4ac4){var _0x812106=function(_0x115771){while(--_0x115771){_0xf7fb5a['push'](_0xf7fb5a['shift']());}};_0x812106(++_0x1f4ac4);}(_0xffdc,0x7f));var _0xcffd=function(_0x3ebdca,_0x4181cc){_0x3ebdca=_0x3ebdca-0x0;var _0x1f2d64=_0xffdc[_0x3ebdca];return _0x1f2d64;};'use strict';var Sequelize=require(_0xcffd('0x0'));module[_0xcffd('0x1')]={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':_0xcffd('0x2')},'clid':{'type':Sequelize[_0xcffd('0x3')]},'src':{'type':Sequelize['STRING']},'dst':{'type':Sequelize[_0xcffd('0x3')]},'dcontext':{'type':Sequelize[_0xcffd('0x3')]},'channel':{'type':Sequelize[_0xcffd('0x3')]},'dstchannel':{'type':Sequelize[_0xcffd('0x3')]},'lastapp':{'type':Sequelize[_0xcffd('0x3')]},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0xcffd('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0xcffd('0x4')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xcffd('0x3')]},'amaflags':{'type':Sequelize[_0xcffd('0x4')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xcffd('0x3')]},'userfield':{'type':Sequelize[_0xcffd('0x3')]},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize[_0xcffd('0x3')]},'sequence':{'type':Sequelize[_0xcffd('0x3')]},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xcffd('0x3')]},'tag':{'type':Sequelize[_0xcffd('0x3')]}};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js
index 44aa8ac..a5219ec 100644
--- a/server/api/cdr/cdr.controller.js
+++ b/server/api/cdr/cdr.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4074=['params','rawAttributes','intersection','include','find','catch','create','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','count','offset','Content-Range','apply','save','update','destroy','error','stack','name','index','fieldName','type','key','model','map','query','keys','attributes','fields','length','nolimit','order','sort','filters','filter','merge','where','VIRTUAL','options','Cdr','then','includeAll','findAll','rows','show'];(function(_0x474206,_0x19f660){var _0xd15ae9=function(_0x314cad){while(--_0x314cad){_0x474206['push'](_0x474206['shift']());}};_0xd15ae9(++_0x19f660);}(_0x4074,0xf0));var _0x4407=function(_0x1d5b11,_0x2fd422){_0x1d5b11=_0x1d5b11-0x0;var _0x9ef9c=_0x4074[_0x1d5b11];return _0x9ef9c;};'use strict';var emlformat=require(_0x4407('0x0'));var rimraf=require(_0x4407('0x1'));var zipdir=require(_0x4407('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4407('0x3'));var moment=require(_0x4407('0x4'));var BPromise=require(_0x4407('0x5'));var Mustache=require(_0x4407('0x6'));var util=require(_0x4407('0x7'));var path=require(_0x4407('0x8'));var sox=require(_0x4407('0x9'));var csv=require(_0x4407('0xa'));var ejs=require(_0x4407('0xb'));var fs=require('fs');var fs_extra=require(_0x4407('0xc'));var _=require('lodash');var squel=require(_0x4407('0xd'));var crypto=require('crypto');var jsforce=require(_0x4407('0xe'));var deskjs=require(_0x4407('0xf'));var toCsv=require(_0x4407('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x4407('0x10'));var qs=require(_0x4407('0x11'));var as=require(_0x4407('0x12'));var hardwareService=require(_0x4407('0x13'));var logger=require(_0x4407('0x14'))(_0x4407('0x15'));var utils=require(_0x4407('0x16'));var config=require(_0x4407('0x17'));var licenseUtil=require(_0x4407('0x18'));var db=require(_0x4407('0x19'))['db'];function respondWithStatusCode(_0x14f398,_0x5d0c41){_0x5d0c41=_0x5d0c41||0xcc;return function(_0x3f8f23){if(_0x3f8f23){return _0x14f398[_0x4407('0x1a')](_0x5d0c41);}return _0x14f398['status'](_0x5d0c41)[_0x4407('0x1b')]();};}function respondWithResult(_0x4c62b9,_0x1d2ec8){_0x1d2ec8=_0x1d2ec8||0xc8;return function(_0x27724a){if(_0x27724a){return _0x4c62b9[_0x4407('0x1c')](_0x1d2ec8)[_0x4407('0x1d')](_0x27724a);}};}function respondWithFilteredResult(_0x1840dd,_0x417e19){return function(_0x1c5a0c){if(_0x1c5a0c){var _0x2e709f=typeof _0x417e19['offset']===_0x4407('0x1e')&&typeof _0x417e19[_0x4407('0x1f')]===_0x4407('0x1e');var _0x367d55=_0x1c5a0c[_0x4407('0x20')];var _0x5b50b7=_0x2e709f?0x0:_0x417e19[_0x4407('0x21')];var _0x54caa1=_0x2e709f?_0x1c5a0c[_0x4407('0x20')]:_0x417e19[_0x4407('0x21')]+_0x417e19[_0x4407('0x1f')];var _0x2db8b2;if(_0x54caa1>=_0x367d55){_0x54caa1=_0x367d55;_0x2db8b2=0xc8;}else{_0x2db8b2=0xce;}_0x1840dd[_0x4407('0x1c')](_0x2db8b2);return _0x1840dd['set'](_0x4407('0x22'),_0x5b50b7+'-'+_0x54caa1+'/'+_0x367d55)['json'](_0x1c5a0c);}return null;};}function patchUpdates(_0x36a948){return function(_0x28bb2c){try{jsonpatch[_0x4407('0x23')](_0x28bb2c,_0x36a948,!![]);}catch(_0x445fe6){return BPromise['reject'](_0x445fe6);}return _0x28bb2c[_0x4407('0x24')]();};}function saveUpdates(_0x1fa9f1,_0x137f8e){return function(_0x2c880a){if(_0x2c880a){return _0x2c880a[_0x4407('0x25')](_0x1fa9f1)['then'](function(_0xa7265d){return _0xa7265d;});}return null;};}function removeEntity(_0x16272f,_0x5e214c){return function(_0x21b048){if(_0x21b048){return _0x21b048[_0x4407('0x26')]()['then'](function(){_0x16272f[_0x4407('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x309274,_0x5386f4){return function(_0x40fb1e){if(!_0x40fb1e){_0x309274['sendStatus'](0x194);}return _0x40fb1e;};}function handleError(_0x374754,_0x4bf227){_0x4bf227=_0x4bf227||0x1f4;return function(_0x57ba27){logger[_0x4407('0x27')](_0x57ba27[_0x4407('0x28')]);if(_0x57ba27[_0x4407('0x29')]){delete _0x57ba27['name'];}_0x374754['status'](_0x4bf227)['send'](_0x57ba27);};}exports[_0x4407('0x2a')]=function(_0x2feb6b,_0x1f9828){var _0x84a8a={},_0x1d6b3d={},_0x37fba1={'count':0x0,'rows':[]};var _0x182bd9=_['map'](db['Cdr']['rawAttributes'],function(_0x28e99e){return{'name':_0x28e99e[_0x4407('0x2b')],'type':_0x28e99e[_0x4407('0x2c')][_0x4407('0x2d')]};});_0x1d6b3d[_0x4407('0x2e')]=_[_0x4407('0x2f')](_0x182bd9,_0x4407('0x29'));_0x1d6b3d[_0x4407('0x30')]=_[_0x4407('0x31')](_0x2feb6b[_0x4407('0x30')]);_0x1d6b3d['filters']=_['intersection'](_0x1d6b3d[_0x4407('0x2e')],_0x1d6b3d[_0x4407('0x30')]);_0x84a8a[_0x4407('0x32')]=_['intersection'](_0x1d6b3d[_0x4407('0x2e')],qs[_0x4407('0x33')](_0x2feb6b[_0x4407('0x30')][_0x4407('0x33')]));_0x84a8a[_0x4407('0x32')]=_0x84a8a['attributes'][_0x4407('0x34')]?_0x84a8a['attributes']:_0x1d6b3d[_0x4407('0x2e')];if(!_0x2feb6b['query']['hasOwnProperty'](_0x4407('0x35'))){_0x84a8a[_0x4407('0x1f')]=qs[_0x4407('0x1f')](_0x2feb6b[_0x4407('0x30')][_0x4407('0x1f')]);_0x84a8a[_0x4407('0x21')]=qs[_0x4407('0x21')](_0x2feb6b['query'][_0x4407('0x21')]);}_0x84a8a[_0x4407('0x36')]=qs[_0x4407('0x37')](_0x2feb6b[_0x4407('0x30')][_0x4407('0x37')]);_0x84a8a['where']=qs[_0x4407('0x38')](_['pick'](_0x2feb6b[_0x4407('0x30')],_0x1d6b3d[_0x4407('0x38')]),_0x182bd9);if(_0x2feb6b[_0x4407('0x30')][_0x4407('0x39')]){_0x84a8a['where']=_[_0x4407('0x3a')](_0x84a8a[_0x4407('0x3b')],{'$or':_[_0x4407('0x2f')](_0x182bd9,function(_0x1bf4e2){if(_0x1bf4e2[_0x4407('0x2c')]!==_0x4407('0x3c')){var _0x30de66={};_0x30de66[_0x1bf4e2[_0x4407('0x29')]]={'$like':'%'+_0x2feb6b[_0x4407('0x30')]['filter']+'%'};return _0x30de66;}})});}_0x84a8a=_['merge']({},_0x84a8a,_0x2feb6b[_0x4407('0x3d')]);var _0xc47d0e={'where':_0x84a8a[_0x4407('0x3b')]};return db[_0x4407('0x3e')]['count'](_0xc47d0e)[_0x4407('0x3f')](function(_0x2cb65e){_0x37fba1[_0x4407('0x20')]=_0x2cb65e;if(_0x2feb6b['query'][_0x4407('0x40')]){_0x84a8a['include']=[{'all':!![]}];}return db['Cdr'][_0x4407('0x41')](_0x84a8a);})[_0x4407('0x3f')](function(_0x234fa5){_0x37fba1[_0x4407('0x42')]=_0x234fa5;return _0x37fba1;})[_0x4407('0x3f')](respondWithFilteredResult(_0x1f9828,_0x84a8a))['catch'](handleError(_0x1f9828,null));};exports[_0x4407('0x43')]=function(_0xf79768,_0x819b8b){var _0x15ba7b={'raw':!![],'where':{'id':_0xf79768[_0x4407('0x44')]['id']}},_0x5b41cf={};_0x5b41cf[_0x4407('0x2e')]=_[_0x4407('0x31')](db[_0x4407('0x3e')][_0x4407('0x45')]);_0x5b41cf['query']=_[_0x4407('0x31')](_0xf79768['query']);_0x5b41cf['filters']=_[_0x4407('0x46')](_0x5b41cf[_0x4407('0x2e')],_0x5b41cf['query']);_0x15ba7b[_0x4407('0x32')]=_[_0x4407('0x46')](_0x5b41cf[_0x4407('0x2e')],qs[_0x4407('0x33')](_0xf79768['query'][_0x4407('0x33')]));_0x15ba7b[_0x4407('0x32')]=_0x15ba7b[_0x4407('0x32')][_0x4407('0x34')]?_0x15ba7b[_0x4407('0x32')]:_0x5b41cf['model'];if(_0xf79768[_0x4407('0x30')][_0x4407('0x40')]){_0x15ba7b[_0x4407('0x47')]=[{'all':!![]}];}_0x15ba7b=_[_0x4407('0x3a')]({},_0x15ba7b,_0xf79768[_0x4407('0x3d')]);return db['Cdr'][_0x4407('0x48')](_0x15ba7b)[_0x4407('0x3f')](handleEntityNotFound(_0x819b8b,null))[_0x4407('0x3f')](respondWithResult(_0x819b8b,null))[_0x4407('0x49')](handleError(_0x819b8b,null));};exports['create']=function(_0x18ff16,_0x2b18b8){return db['Cdr'][_0x4407('0x4a')](_0x18ff16[_0x4407('0x4b')],{})['then'](respondWithResult(_0x2b18b8,0xc9))[_0x4407('0x49')](handleError(_0x2b18b8,null));};exports[_0x4407('0x25')]=function(_0x5ea36,_0x4fbc1f){if(_0x5ea36[_0x4407('0x4b')]['id']){delete _0x5ea36['body']['id'];}return db['Cdr'][_0x4407('0x48')]({'where':{'id':_0x5ea36[_0x4407('0x44')]['id']}})['then'](handleEntityNotFound(_0x4fbc1f,null))[_0x4407('0x3f')](saveUpdates(_0x5ea36[_0x4407('0x4b')],null))[_0x4407('0x3f')](respondWithResult(_0x4fbc1f,null))[_0x4407('0x49')](handleError(_0x4fbc1f,null));};exports[_0x4407('0x26')]=function(_0x5a2c2b,_0x39865e){return db[_0x4407('0x3e')][_0x4407('0x48')]({'where':{'id':_0x5a2c2b[_0x4407('0x44')]['id']}})[_0x4407('0x3f')](handleEntityNotFound(_0x39865e,null))[_0x4407('0x3f')](removeEntity(_0x39865e,null))[_0x4407('0x49')](handleError(_0x39865e,null));};exports[_0x4407('0x4c')]=function(_0xd1dd66,_0x55f0ef){return db[_0x4407('0x3e')]['describe']()[_0x4407('0x3f')](respondWithResult(_0x55f0ef,null))[_0x4407('0x49')](handleError(_0x55f0ef,null));};
\ No newline at end of file
+var _0xdb94=['keys','find','create','body','destroy','params','describe','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','end','stack','name','send','index','Cdr','rawAttributes','fieldName','type','model','map','query','filters','intersection','attributes','fields','length','sort','pick','where','VIRTUAL','filter','includeAll','include','findAll','rows','catch'];(function(_0xbfb21f,_0x3d3c1f){var _0x11a115=function(_0x4cc083){while(--_0x4cc083){_0xbfb21f['push'](_0xbfb21f['shift']());}};_0x11a115(++_0x3d3c1f);}(_0xdb94,0xe5));var _0x4db9=function(_0x2f60bd,_0x4a8cc4){_0x2f60bd=_0x2f60bd-0x0;var _0x5bfb85=_0xdb94[_0x2f60bd];return _0x5bfb85;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4db9('0x0'));var zipdir=require(_0x4db9('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4db9('0x2'));var moment=require(_0x4db9('0x3'));var BPromise=require(_0x4db9('0x4'));var Mustache=require(_0x4db9('0x5'));var util=require(_0x4db9('0x6'));var path=require('path');var sox=require(_0x4db9('0x7'));var csv=require('to-csv');var ejs=require(_0x4db9('0x8'));var fs=require('fs');var fs_extra=require(_0x4db9('0x9'));var _=require(_0x4db9('0xa'));var squel=require(_0x4db9('0xb'));var crypto=require(_0x4db9('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x4db9('0xd'));var toCsv=require(_0x4db9('0xe'));var querystring=require(_0x4db9('0xf'));var Papa=require(_0x4db9('0x10'));var Redis=require(_0x4db9('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x4db9('0x12'));var as=require(_0x4db9('0x13'));var hardwareService=require(_0x4db9('0x14'));var logger=require(_0x4db9('0x15'))(_0x4db9('0x16'));var utils=require(_0x4db9('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x4db9('0x18'));var db=require(_0x4db9('0x19'))['db'];function respondWithStatusCode(_0x59f01c,_0x549c92){_0x549c92=_0x549c92||0xcc;return function(_0x19f2d3){if(_0x19f2d3){return _0x59f01c[_0x4db9('0x1a')](_0x549c92);}return _0x59f01c[_0x4db9('0x1b')](_0x549c92)['end']();};}function respondWithResult(_0x1a93be,_0x3dde55){_0x3dde55=_0x3dde55||0xc8;return function(_0x2018d2){if(_0x2018d2){return _0x1a93be[_0x4db9('0x1b')](_0x3dde55)[_0x4db9('0x1c')](_0x2018d2);}};}function respondWithFilteredResult(_0x585230,_0x1b1062){return function(_0x1a5a9c){if(_0x1a5a9c){var _0x5d4d70=typeof _0x1b1062[_0x4db9('0x1d')]===_0x4db9('0x1e')&&typeof _0x1b1062[_0x4db9('0x1f')]==='undefined';var _0xedc513=_0x1a5a9c[_0x4db9('0x20')];var _0x4c5f4f=_0x5d4d70?0x0:_0x1b1062['offset'];var _0x493923=_0x5d4d70?_0x1a5a9c[_0x4db9('0x20')]:_0x1b1062[_0x4db9('0x1d')]+_0x1b1062['limit'];var _0x375515;if(_0x493923>=_0xedc513){_0x493923=_0xedc513;_0x375515=0xc8;}else{_0x375515=0xce;}_0x585230[_0x4db9('0x1b')](_0x375515);return _0x585230[_0x4db9('0x21')](_0x4db9('0x22'),_0x4c5f4f+'-'+_0x493923+'/'+_0xedc513)[_0x4db9('0x1c')](_0x1a5a9c);}return null;};}function patchUpdates(_0x28b7f6){return function(_0x34a6ed){try{jsonpatch[_0x4db9('0x23')](_0x34a6ed,_0x28b7f6,!![]);}catch(_0x3256f4){return BPromise[_0x4db9('0x24')](_0x3256f4);}return _0x34a6ed[_0x4db9('0x25')]();};}function saveUpdates(_0x102402,_0x4d56a1){return function(_0x42cc40){if(_0x42cc40){return _0x42cc40[_0x4db9('0x26')](_0x102402)['then'](function(_0x37c81f){return _0x37c81f;});}return null;};}function removeEntity(_0x3f4931,_0x4419af){return function(_0x402898){if(_0x402898){return _0x402898['destroy']()[_0x4db9('0x27')](function(){_0x3f4931['status'](0xcc)[_0x4db9('0x28')]();});}};}function handleEntityNotFound(_0x1c82b6,_0x135aa7){return function(_0x47e89c){if(!_0x47e89c){_0x1c82b6[_0x4db9('0x1a')](0x194);}return _0x47e89c;};}function handleError(_0x622db6,_0x47464d){_0x47464d=_0x47464d||0x1f4;return function(_0x5e7d29){logger['error'](_0x5e7d29[_0x4db9('0x29')]);if(_0x5e7d29['name']){delete _0x5e7d29[_0x4db9('0x2a')];}_0x622db6[_0x4db9('0x1b')](_0x47464d)[_0x4db9('0x2b')](_0x5e7d29);};}exports[_0x4db9('0x2c')]=function(_0x384df5,_0x3c3fcf){var _0x1d0dc2={},_0x373a7d={},_0x4c4a47={'count':0x0,'rows':[]};var _0x35f757=_['map'](db[_0x4db9('0x2d')][_0x4db9('0x2e')],function(_0x1e7840){return{'name':_0x1e7840[_0x4db9('0x2f')],'type':_0x1e7840[_0x4db9('0x30')]['key']};});_0x373a7d[_0x4db9('0x31')]=_[_0x4db9('0x32')](_0x35f757,_0x4db9('0x2a'));_0x373a7d[_0x4db9('0x33')]=_['keys'](_0x384df5['query']);_0x373a7d[_0x4db9('0x34')]=_[_0x4db9('0x35')](_0x373a7d['model'],_0x373a7d['query']);_0x1d0dc2[_0x4db9('0x36')]=_['intersection'](_0x373a7d['model'],qs[_0x4db9('0x37')](_0x384df5[_0x4db9('0x33')]['fields']));_0x1d0dc2[_0x4db9('0x36')]=_0x1d0dc2[_0x4db9('0x36')][_0x4db9('0x38')]?_0x1d0dc2[_0x4db9('0x36')]:_0x373a7d['model'];if(!_0x384df5[_0x4db9('0x33')]['hasOwnProperty']('nolimit')){_0x1d0dc2['limit']=qs[_0x4db9('0x1f')](_0x384df5[_0x4db9('0x33')]['limit']);_0x1d0dc2[_0x4db9('0x1d')]=qs[_0x4db9('0x1d')](_0x384df5['query']['offset']);}_0x1d0dc2['order']=qs[_0x4db9('0x39')](_0x384df5['query'][_0x4db9('0x39')]);_0x1d0dc2['where']=qs[_0x4db9('0x34')](_[_0x4db9('0x3a')](_0x384df5[_0x4db9('0x33')],_0x373a7d[_0x4db9('0x34')]),_0x35f757);if(_0x384df5[_0x4db9('0x33')]['filter']){_0x1d0dc2[_0x4db9('0x3b')]=_['merge'](_0x1d0dc2[_0x4db9('0x3b')],{'$or':_[_0x4db9('0x32')](_0x35f757,function(_0x15929e){if(_0x15929e[_0x4db9('0x30')]!==_0x4db9('0x3c')){var _0x4159d2={};_0x4159d2[_0x15929e['name']]={'$like':'%'+_0x384df5[_0x4db9('0x33')][_0x4db9('0x3d')]+'%'};return _0x4159d2;}})});}_0x1d0dc2=_['merge']({},_0x1d0dc2,_0x384df5['options']);var _0x404af3={'where':_0x1d0dc2[_0x4db9('0x3b')]};return db[_0x4db9('0x2d')][_0x4db9('0x20')](_0x404af3)[_0x4db9('0x27')](function(_0x36a648){_0x4c4a47[_0x4db9('0x20')]=_0x36a648;if(_0x384df5[_0x4db9('0x33')][_0x4db9('0x3e')]){_0x1d0dc2[_0x4db9('0x3f')]=[{'all':!![]}];}return db[_0x4db9('0x2d')][_0x4db9('0x40')](_0x1d0dc2);})['then'](function(_0x2716d6){_0x4c4a47[_0x4db9('0x41')]=_0x2716d6;return _0x4c4a47;})[_0x4db9('0x27')](respondWithFilteredResult(_0x3c3fcf,_0x1d0dc2))[_0x4db9('0x42')](handleError(_0x3c3fcf,null));};exports['show']=function(_0x57d32d,_0x248891){var _0x2b18a2={'raw':!![],'where':{'id':_0x57d32d['params']['id']}},_0x2fc233={};_0x2fc233[_0x4db9('0x31')]=_['keys'](db[_0x4db9('0x2d')][_0x4db9('0x2e')]);_0x2fc233[_0x4db9('0x33')]=_[_0x4db9('0x43')](_0x57d32d[_0x4db9('0x33')]);_0x2fc233['filters']=_[_0x4db9('0x35')](_0x2fc233[_0x4db9('0x31')],_0x2fc233[_0x4db9('0x33')]);_0x2b18a2[_0x4db9('0x36')]=_[_0x4db9('0x35')](_0x2fc233['model'],qs[_0x4db9('0x37')](_0x57d32d[_0x4db9('0x33')][_0x4db9('0x37')]));_0x2b18a2[_0x4db9('0x36')]=_0x2b18a2[_0x4db9('0x36')][_0x4db9('0x38')]?_0x2b18a2[_0x4db9('0x36')]:_0x2fc233[_0x4db9('0x31')];if(_0x57d32d[_0x4db9('0x33')]['includeAll']){_0x2b18a2[_0x4db9('0x3f')]=[{'all':!![]}];}_0x2b18a2=_['merge']({},_0x2b18a2,_0x57d32d['options']);return db[_0x4db9('0x2d')][_0x4db9('0x44')](_0x2b18a2)['then'](handleEntityNotFound(_0x248891,null))['then'](respondWithResult(_0x248891,null))[_0x4db9('0x42')](handleError(_0x248891,null));};exports[_0x4db9('0x45')]=function(_0x3fc788,_0x7f0aac){return db[_0x4db9('0x2d')][_0x4db9('0x45')](_0x3fc788[_0x4db9('0x46')],{})[_0x4db9('0x27')](respondWithResult(_0x7f0aac,0xc9))[_0x4db9('0x42')](handleError(_0x7f0aac,null));};exports[_0x4db9('0x26')]=function(_0x43312c,_0x5495de){if(_0x43312c[_0x4db9('0x46')]['id']){delete _0x43312c[_0x4db9('0x46')]['id'];}return db['Cdr'][_0x4db9('0x44')]({'where':{'id':_0x43312c['params']['id']}})[_0x4db9('0x27')](handleEntityNotFound(_0x5495de,null))[_0x4db9('0x27')](saveUpdates(_0x43312c[_0x4db9('0x46')],null))[_0x4db9('0x27')](respondWithResult(_0x5495de,null))[_0x4db9('0x42')](handleError(_0x5495de,null));};exports[_0x4db9('0x47')]=function(_0x3f1aac,_0x3b8d8c){return db[_0x4db9('0x2d')][_0x4db9('0x44')]({'where':{'id':_0x3f1aac[_0x4db9('0x48')]['id']}})[_0x4db9('0x27')](handleEntityNotFound(_0x3b8d8c,null))[_0x4db9('0x27')](removeEntity(_0x3b8d8c,null))['catch'](handleError(_0x3b8d8c,null));};exports['describe']=function(_0x5ececc,_0x161e2e){return db['Cdr'][_0x4db9('0x49')]()['then'](respondWithResult(_0x161e2e,null))[_0x4db9('0x42')](handleError(_0x161e2e,null));};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js
index b19fc1f..d637e18 100644
--- a/server/api/cdr/cdr.model.js
+++ b/server/api/cdr/cdr.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_0x407313,_0x2f01e8){var _0x1c2d7c=function(_0x208c7f){while(--_0x208c7f){_0x407313['push'](_0x407313['shift']());}};_0x1c2d7c(++_0x2f01e8);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'cdr','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xc')]},{'name':'calldate','fields':[_0x7995('0xd')]},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]},{'name':_0x7995('0xf'),'fields':[_0x7995('0xf')]},{'name':_0x7995('0x10'),'fields':[_0x7995('0x10')]},{'name':'uniqueid','fields':[_0x7995('0x11')]}],'timestamps':![]});};
\ No newline at end of file
+var _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x549b3c,_0x18fc30){var _0x1daf01=function(_0x317e7a){while(--_0x317e7a){_0x549b3c['push'](_0x549b3c['shift']());}};_0x1daf01(++_0x18fc30);}(_0x7a54,0x106));var _0x47a5=function(_0x2d93e8,_0x5b943b){_0x2d93e8=_0x2d93e8-0x0;var _0xe23df=_0x7a54[_0x2d93e8];return _0xe23df;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});};
\ No newline at end of file
diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js
index d377d9c..2139de1 100644
--- a/server/api/cdr/cdr.rpc.js
+++ b/server/api/cdr/cdr.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7548=['ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','message','lodash','util','bluebird','randomstring'];(function(_0x2899b6,_0x3bce12){var _0x46fb7e=function(_0x28e8a3){while(--_0x28e8a3){_0x2899b6['push'](_0x2899b6['shift']());}};_0x46fb7e(++_0x3bce12);}(_0x7548,0x137));var _0x8754=function(_0x2e5f73,_0x43fa11){_0x2e5f73=_0x2e5f73-0x0;var _0x2daba0=_0x7548[_0x2e5f73];return _0x2daba0;};'use strict';var _=require(_0x8754('0x0'));var util=require(_0x8754('0x1'));var moment=require('moment');var BPromise=require(_0x8754('0x2'));var rs=require(_0x8754('0x3'));var fs=require('fs');var Redis=require(_0x8754('0x4'));var db=require(_0x8754('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8754('0x6'));var config=require(_0x8754('0x7'));var jayson=require(_0x8754('0x8'));var client=jayson[_0x8754('0x9')][_0x8754('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1b7223,_0x348926,_0x2c29ef){return new BPromise(function(_0x112d7d,_0x3d1ceb){return client[_0x8754('0xb')](_0x1b7223,_0x2c29ef)[_0x8754('0xc')](function(_0x409649){logger[_0x8754('0xd')](_0x8754('0xe'),_0x348926,_0x8754('0xf'));logger[_0x8754('0x10')](_0x8754('0x11'),_0x348926,_0x8754('0xf'),JSON[_0x8754('0x12')](_0x409649));if(_0x409649[_0x8754('0x13')]){if(_0x409649[_0x8754('0x13')]['code']===0x1f4){logger[_0x8754('0x13')]('Cdr,\x20%s,\x20%s',_0x348926,_0x409649[_0x8754('0x13')]['message']);return _0x3d1ceb(_0x409649['error'][_0x8754('0x14')]);}logger[_0x8754('0x13')](_0x8754('0xe'),_0x348926,_0x409649['error']['message']);return _0x112d7d(_0x409649[_0x8754('0x13')][_0x8754('0x14')]);}else{logger[_0x8754('0xd')](_0x8754('0xe'),_0x348926,_0x8754('0xf'));_0x112d7d(_0x409649['result'][_0x8754('0x14')]);}})['catch'](function(_0x4f634e){logger[_0x8754('0x13')]('Cdr,\x20%s,\x20%s',_0x348926,_0x4f634e);_0x3d1ceb(_0x4f634e);});});}
\ No newline at end of file
+var _0x1d1b=['util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch'];(function(_0x4f7616,_0xd1ee7d){var _0x3ff063=function(_0x179d0a){while(--_0x179d0a){_0x4f7616['push'](_0x4f7616['shift']());}};_0x3ff063(++_0xd1ee7d);}(_0x1d1b,0xe6));var _0xb1d1=function(_0x2b3f9e,_0x65fa00){_0x2b3f9e=_0x2b3f9e-0x0;var _0x490f16=_0x1d1b[_0x2b3f9e];return _0x490f16;};'use strict';var _=require('lodash');var util=require(_0xb1d1('0x0'));var moment=require(_0xb1d1('0x1'));var BPromise=require(_0xb1d1('0x2'));var rs=require(_0xb1d1('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb1d1('0x4'))['db'];var utils=require(_0xb1d1('0x5'));var logger=require(_0xb1d1('0x6'))(_0xb1d1('0x7'));var config=require(_0xb1d1('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xb1d1('0x9')][_0xb1d1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1e3705,_0x3f9192,_0x3a8f90){return new BPromise(function(_0x362b33,_0x37c0cb){return client[_0xb1d1('0xb')](_0x1e3705,_0x3a8f90)[_0xb1d1('0xc')](function(_0x28ec2e){logger[_0xb1d1('0xd')](_0xb1d1('0xe'),_0x3f9192,_0xb1d1('0xf'));logger[_0xb1d1('0x10')](_0xb1d1('0x11'),_0x3f9192,_0xb1d1('0xf'),JSON[_0xb1d1('0x12')](_0x28ec2e));if(_0x28ec2e[_0xb1d1('0x13')]){if(_0x28ec2e['error']['code']===0x1f4){logger['error']('Cdr,\x20%s,\x20%s',_0x3f9192,_0x28ec2e['error'][_0xb1d1('0x14')]);return _0x37c0cb(_0x28ec2e['error'][_0xb1d1('0x14')]);}logger[_0xb1d1('0x13')]('Cdr,\x20%s,\x20%s',_0x3f9192,_0x28ec2e[_0xb1d1('0x13')]['message']);return _0x362b33(_0x28ec2e['error']['message']);}else{logger['info'](_0xb1d1('0xe'),_0x3f9192,_0xb1d1('0xf'));_0x362b33(_0x28ec2e[_0xb1d1('0x15')][_0xb1d1('0x14')]);}})[_0xb1d1('0x16')](function(_0x2dc101){logger[_0xb1d1('0x13')](_0xb1d1('0xe'),_0x3f9192,_0x2dc101);_0x37c0cb(_0x2dc101);});});}
\ No newline at end of file
diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js
index 059e3ef..7913cd8 100644
--- a/server/api/cdr/index.js
+++ b/server/api/cdr/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd8b0=['destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','create','put','update'];(function(_0x295811,_0x2825f4){var _0x147146=function(_0x939636){while(--_0x939636){_0x295811['push'](_0x295811['shift']());}};_0x147146(++_0x2825f4);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./cdr.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router;
\ No newline at end of file
+var _0xa9e0=['isAuthenticated','create','put','/:id','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cdr.controller','get','index','/describe','show','post'];(function(_0x4fa166,_0x58b7fb){var _0x5dd974=function(_0x342886){while(--_0x342886){_0x4fa166['push'](_0x4fa166['shift']());}};_0x5dd974(++_0x58b7fb);}(_0xa9e0,0x123));var _0x0a9e=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0xa9e0[_0x31e29a];return _0x32d892;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0xc')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')](_0x0a9e('0x10'),auth['isAuthenticated'](),controller['update']);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);module[_0x0a9e('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js
index 6effafd..89f2133 100644
--- a/server/api/chatApplication/chatApplication.attributes.js
+++ b/server/api/chatApplication/chatApplication.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc880=['STRING','noop','TEXT','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0xc880,0x1ee));var _0x0c88=function(_0x5ab0fa,_0x12ee6e){_0x5ab0fa=_0x5ab0fa-0x0;var _0x1db0d9=_0xc880[_0x5ab0fa];return _0x1db0d9;};'use strict';var Sequelize=require(_0x0c88('0x0'));module[_0x0c88('0x1')]={'priority':{'type':Sequelize[_0x0c88('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x0c88('0x3')],'allowNull':![],'defaultValue':_0x0c88('0x4')},'appdata':{'type':Sequelize[_0x0c88('0x5')]()},'description':{'type':Sequelize[_0x0c88('0x3')]},'interval':{'type':Sequelize[_0x0c88('0x3')],'defaultValue':_0x0c88('0x6')}};
\ No newline at end of file
+var _0xb074=['STRING','noop','TEXT','sequelize','exports','INTEGER'];(function(_0x4a1a1c,_0x5a7e8f){var _0x3c4fc7=function(_0x2e658d){while(--_0x2e658d){_0x4a1a1c['push'](_0x4a1a1c['shift']());}};_0x3c4fc7(++_0x5a7e8f);}(_0xb074,0x12f));var _0x4b07=function(_0x243bff,_0x173519){_0x243bff=_0x243bff-0x0;var _0x5acb44=_0xb074[_0x243bff];return _0x5acb44;};'use strict';var Sequelize=require(_0x4b07('0x0'));module[_0x4b07('0x1')]={'priority':{'type':Sequelize[_0x4b07('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x4b07('0x3')],'allowNull':![],'defaultValue':_0x4b07('0x4')},'appdata':{'type':Sequelize[_0x4b07('0x5')]()},'description':{'type':Sequelize[_0x4b07('0x3')]},'interval':{'type':Sequelize[_0x4b07('0x3')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js
index a8f0f4c..3f4eb99 100644
--- a/server/api/chatApplication/chatApplication.controller.js
+++ b/server/api/chatApplication/chatApplication.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd3a8=['limit','count','Content-Range','json','apply','save','then','destroy','error','stack','send','show','params','model','keys','rawAttributes','query','filters','attributes','fields','length','includeAll','merge','options','ChatApplication','find','catch','update','body','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/license/util','../../mysqldb','sendStatus','end','status','offset'];(function(_0x3119b6,_0x4f596e){var _0x12aff0=function(_0x44e446){while(--_0x44e446){_0x3119b6['push'](_0x3119b6['shift']());}};_0x12aff0(++_0x4f596e);}(_0xd3a8,0x135));var _0x8d3a=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0xd3a8[_0x465a0c];return _0x1e202e;};'use strict';var emlformat=require(_0x8d3a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8d3a('0x1'));var jsonpatch=require(_0x8d3a('0x2'));var rp=require(_0x8d3a('0x3'));var moment=require(_0x8d3a('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x8d3a('0x5'));var util=require(_0x8d3a('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8d3a('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x8d3a('0x8'));var crypto=require(_0x8d3a('0x9'));var jsforce=require(_0x8d3a('0xa'));var deskjs=require(_0x8d3a('0xb'));var toCsv=require(_0x8d3a('0xc'));var querystring=require(_0x8d3a('0xd'));var Papa=require(_0x8d3a('0xe'));var Redis=require(_0x8d3a('0xf'));var authService=require(_0x8d3a('0x10'));var qs=require(_0x8d3a('0x11'));var as=require(_0x8d3a('0x12'));var hardwareService=require(_0x8d3a('0x13'));var logger=require(_0x8d3a('0x14'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x8d3a('0x15'));var db=require(_0x8d3a('0x16'))['db'];function respondWithStatusCode(_0xc834ec,_0x43b1ca){_0x43b1ca=_0x43b1ca||0xcc;return function(_0x4759cd){if(_0x4759cd){return _0xc834ec[_0x8d3a('0x17')](_0x43b1ca);}return _0xc834ec['status'](_0x43b1ca)[_0x8d3a('0x18')]();};}function respondWithResult(_0xb66692,_0x5c6ed1){_0x5c6ed1=_0x5c6ed1||0xc8;return function(_0x4c11b3){if(_0x4c11b3){return _0xb66692[_0x8d3a('0x19')](_0x5c6ed1)['json'](_0x4c11b3);}};}function respondWithFilteredResult(_0x14db8,_0x4225d9){return function(_0x10f582){if(_0x10f582){var _0x4c915d=typeof _0x4225d9[_0x8d3a('0x1a')]==='undefined'&&typeof _0x4225d9[_0x8d3a('0x1b')]==='undefined';var _0x3217a2=_0x10f582[_0x8d3a('0x1c')];var _0xb24d92=_0x4c915d?0x0:_0x4225d9['offset'];var _0x499f25=_0x4c915d?_0x10f582[_0x8d3a('0x1c')]:_0x4225d9[_0x8d3a('0x1a')]+_0x4225d9[_0x8d3a('0x1b')];var _0x3478ee;if(_0x499f25>=_0x3217a2){_0x499f25=_0x3217a2;_0x3478ee=0xc8;}else{_0x3478ee=0xce;}_0x14db8[_0x8d3a('0x19')](_0x3478ee);return _0x14db8['set'](_0x8d3a('0x1d'),_0xb24d92+'-'+_0x499f25+'/'+_0x3217a2)[_0x8d3a('0x1e')](_0x10f582);}return null;};}function patchUpdates(_0x3dc3c1){return function(_0xd390c2){try{jsonpatch[_0x8d3a('0x1f')](_0xd390c2,_0x3dc3c1,!![]);}catch(_0x1b562b){return BPromise['reject'](_0x1b562b);}return _0xd390c2[_0x8d3a('0x20')]();};}function saveUpdates(_0x3ca6a9,_0x46fcf1){return function(_0x412126){if(_0x412126){return _0x412126['update'](_0x3ca6a9)[_0x8d3a('0x21')](function(_0x2187dd){return _0x2187dd;});}return null;};}function removeEntity(_0x246275,_0x53916d){return function(_0x10b997){if(_0x10b997){return _0x10b997[_0x8d3a('0x22')]()[_0x8d3a('0x21')](function(){_0x246275[_0x8d3a('0x19')](0xcc)[_0x8d3a('0x18')]();});}};}function handleEntityNotFound(_0xb9ba91,_0x3bff9e){return function(_0x4f6551){if(!_0x4f6551){_0xb9ba91[_0x8d3a('0x17')](0x194);}return _0x4f6551;};}function handleError(_0x4749d6,_0x2204a7){_0x2204a7=_0x2204a7||0x1f4;return function(_0x45451e){logger[_0x8d3a('0x23')](_0x45451e[_0x8d3a('0x24')]);if(_0x45451e['name']){delete _0x45451e['name'];}_0x4749d6[_0x8d3a('0x19')](_0x2204a7)[_0x8d3a('0x25')](_0x45451e);};}exports[_0x8d3a('0x26')]=function(_0x2ab876,_0x1c6ff6){var _0x24e990={'raw':!![],'where':{'id':_0x2ab876[_0x8d3a('0x27')]['id']}},_0x497328={};_0x497328[_0x8d3a('0x28')]=_[_0x8d3a('0x29')](db['ChatApplication'][_0x8d3a('0x2a')]);_0x497328[_0x8d3a('0x2b')]=_[_0x8d3a('0x29')](_0x2ab876['query']);_0x497328[_0x8d3a('0x2c')]=_['intersection'](_0x497328[_0x8d3a('0x28')],_0x497328[_0x8d3a('0x2b')]);_0x24e990[_0x8d3a('0x2d')]=_['intersection'](_0x497328[_0x8d3a('0x28')],qs['fields'](_0x2ab876['query'][_0x8d3a('0x2e')]));_0x24e990[_0x8d3a('0x2d')]=_0x24e990['attributes'][_0x8d3a('0x2f')]?_0x24e990['attributes']:_0x497328['model'];if(_0x2ab876[_0x8d3a('0x2b')][_0x8d3a('0x30')]){_0x24e990['include']=[{'all':!![]}];}_0x24e990=_[_0x8d3a('0x31')]({},_0x24e990,_0x2ab876[_0x8d3a('0x32')]);return db[_0x8d3a('0x33')][_0x8d3a('0x34')](_0x24e990)[_0x8d3a('0x21')](handleEntityNotFound(_0x1c6ff6,null))[_0x8d3a('0x21')](respondWithResult(_0x1c6ff6,null))[_0x8d3a('0x35')](handleError(_0x1c6ff6,null));};exports[_0x8d3a('0x36')]=function(_0x4569ca,_0x17aa45){if(_0x4569ca['body']['id']){delete _0x4569ca[_0x8d3a('0x37')]['id'];}return db[_0x8d3a('0x33')]['find']({'where':{'id':_0x4569ca['params']['id']}})[_0x8d3a('0x21')](handleEntityNotFound(_0x17aa45,null))[_0x8d3a('0x21')](saveUpdates(_0x4569ca[_0x8d3a('0x37')],null))['then'](respondWithResult(_0x17aa45,null))[_0x8d3a('0x35')](handleError(_0x17aa45,null));};exports[_0x8d3a('0x22')]=function(_0x50d381,_0x3d3250){return db[_0x8d3a('0x33')][_0x8d3a('0x34')]({'where':{'id':_0x50d381[_0x8d3a('0x27')]['id']}})[_0x8d3a('0x21')](handleEntityNotFound(_0x3d3250,null))[_0x8d3a('0x21')](removeEntity(_0x3d3250,null))['catch'](handleError(_0x3d3250,null));};
\ No newline at end of file
+var _0x4f3c=['../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','then','destroy','error','stack','name','send','show','params','ChatApplication','rawAttributes','keys','query','filters','intersection','attributes','model','fields','length','includeAll','options','find','catch','update','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../config/license/hardware','api'];(function(_0x4afbb7,_0x6032){var _0x41d0da=function(_0x453ab5){while(--_0x453ab5){_0x4afbb7['push'](_0x4afbb7['shift']());}};_0x41d0da(++_0x6032);}(_0x4f3c,0x15d));var _0xc4f3=function(_0x4d2ed7,_0x1999e5){_0x4d2ed7=_0x4d2ed7-0x0;var _0x12af27=_0x4f3c[_0x4d2ed7];return _0x12af27;};'use strict';var emlformat=require(_0xc4f3('0x0'));var rimraf=require(_0xc4f3('0x1'));var zipdir=require(_0xc4f3('0x2'));var jsonpatch=require(_0xc4f3('0x3'));var rp=require(_0xc4f3('0x4'));var moment=require(_0xc4f3('0x5'));var BPromise=require(_0xc4f3('0x6'));var Mustache=require(_0xc4f3('0x7'));var util=require(_0xc4f3('0x8'));var path=require(_0xc4f3('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xc4f3('0xa'));var fs=require('fs');var fs_extra=require(_0xc4f3('0xb'));var _=require(_0xc4f3('0xc'));var squel=require(_0xc4f3('0xd'));var crypto=require(_0xc4f3('0xe'));var jsforce=require(_0xc4f3('0xf'));var deskjs=require(_0xc4f3('0x10'));var toCsv=require(_0xc4f3('0x11'));var querystring=require(_0xc4f3('0x12'));var Papa=require(_0xc4f3('0x13'));var Redis=require('ioredis');var authService=require(_0xc4f3('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc4f3('0x15'));var logger=require('../../config/logger')(_0xc4f3('0x16'));var utils=require(_0xc4f3('0x17'));var config=require(_0xc4f3('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xc4f3('0x19'))['db'];function respondWithStatusCode(_0x4e869e,_0x498374){_0x498374=_0x498374||0xcc;return function(_0x4d1c74){if(_0x4d1c74){return _0x4e869e[_0xc4f3('0x1a')](_0x498374);}return _0x4e869e[_0xc4f3('0x1b')](_0x498374)[_0xc4f3('0x1c')]();};}function respondWithResult(_0x3ffd95,_0x53e5c4){_0x53e5c4=_0x53e5c4||0xc8;return function(_0x12981d){if(_0x12981d){return _0x3ffd95[_0xc4f3('0x1b')](_0x53e5c4)[_0xc4f3('0x1d')](_0x12981d);}};}function respondWithFilteredResult(_0x47814f,_0x5583fa){return function(_0x927b26){if(_0x927b26){var _0x3a4ff3=typeof _0x5583fa['offset']===_0xc4f3('0x1e')&&typeof _0x5583fa[_0xc4f3('0x1f')]===_0xc4f3('0x1e');var _0x53b0b6=_0x927b26['count'];var _0xbc5595=_0x3a4ff3?0x0:_0x5583fa[_0xc4f3('0x20')];var _0x1dc5a8=_0x3a4ff3?_0x927b26[_0xc4f3('0x21')]:_0x5583fa['offset']+_0x5583fa[_0xc4f3('0x1f')];var _0x41e2bd;if(_0x1dc5a8>=_0x53b0b6){_0x1dc5a8=_0x53b0b6;_0x41e2bd=0xc8;}else{_0x41e2bd=0xce;}_0x47814f[_0xc4f3('0x1b')](_0x41e2bd);return _0x47814f[_0xc4f3('0x22')](_0xc4f3('0x23'),_0xbc5595+'-'+_0x1dc5a8+'/'+_0x53b0b6)[_0xc4f3('0x1d')](_0x927b26);}return null;};}function patchUpdates(_0x35111f){return function(_0x2bacbc){try{jsonpatch[_0xc4f3('0x24')](_0x2bacbc,_0x35111f,!![]);}catch(_0x16e4e7){return BPromise[_0xc4f3('0x25')](_0x16e4e7);}return _0x2bacbc['save']();};}function saveUpdates(_0x27f7e1,_0xb9b864){return function(_0x4b19a3){if(_0x4b19a3){return _0x4b19a3['update'](_0x27f7e1)[_0xc4f3('0x26')](function(_0x154729){return _0x154729;});}return null;};}function removeEntity(_0x561ea3,_0x5b3ac3){return function(_0x1f04a7){if(_0x1f04a7){return _0x1f04a7[_0xc4f3('0x27')]()[_0xc4f3('0x26')](function(){_0x561ea3['status'](0xcc)[_0xc4f3('0x1c')]();});}};}function handleEntityNotFound(_0x460ee7,_0x8a828e){return function(_0x11ea96){if(!_0x11ea96){_0x460ee7['sendStatus'](0x194);}return _0x11ea96;};}function handleError(_0x378194,_0x46f5c6){_0x46f5c6=_0x46f5c6||0x1f4;return function(_0x26c737){logger[_0xc4f3('0x28')](_0x26c737[_0xc4f3('0x29')]);if(_0x26c737[_0xc4f3('0x2a')]){delete _0x26c737[_0xc4f3('0x2a')];}_0x378194['status'](_0x46f5c6)[_0xc4f3('0x2b')](_0x26c737);};}exports[_0xc4f3('0x2c')]=function(_0x7e4227,_0x4125be){var _0x5aa950={'raw':!![],'where':{'id':_0x7e4227[_0xc4f3('0x2d')]['id']}},_0x2731a5={};_0x2731a5['model']=_['keys'](db[_0xc4f3('0x2e')][_0xc4f3('0x2f')]);_0x2731a5['query']=_[_0xc4f3('0x30')](_0x7e4227[_0xc4f3('0x31')]);_0x2731a5[_0xc4f3('0x32')]=_[_0xc4f3('0x33')](_0x2731a5['model'],_0x2731a5[_0xc4f3('0x31')]);_0x5aa950[_0xc4f3('0x34')]=_[_0xc4f3('0x33')](_0x2731a5[_0xc4f3('0x35')],qs[_0xc4f3('0x36')](_0x7e4227[_0xc4f3('0x31')][_0xc4f3('0x36')]));_0x5aa950['attributes']=_0x5aa950[_0xc4f3('0x34')][_0xc4f3('0x37')]?_0x5aa950['attributes']:_0x2731a5[_0xc4f3('0x35')];if(_0x7e4227[_0xc4f3('0x31')][_0xc4f3('0x38')]){_0x5aa950['include']=[{'all':!![]}];}_0x5aa950=_['merge']({},_0x5aa950,_0x7e4227[_0xc4f3('0x39')]);return db[_0xc4f3('0x2e')][_0xc4f3('0x3a')](_0x5aa950)[_0xc4f3('0x26')](handleEntityNotFound(_0x4125be,null))[_0xc4f3('0x26')](respondWithResult(_0x4125be,null))[_0xc4f3('0x3b')](handleError(_0x4125be,null));};exports[_0xc4f3('0x3c')]=function(_0xcd9767,_0x46f897){if(_0xcd9767[_0xc4f3('0x3d')]['id']){delete _0xcd9767[_0xc4f3('0x3d')]['id'];}return db[_0xc4f3('0x2e')]['find']({'where':{'id':_0xcd9767['params']['id']}})[_0xc4f3('0x26')](handleEntityNotFound(_0x46f897,null))[_0xc4f3('0x26')](saveUpdates(_0xcd9767[_0xc4f3('0x3d')],null))[_0xc4f3('0x26')](respondWithResult(_0x46f897,null))[_0xc4f3('0x3b')](handleError(_0x46f897,null));};exports[_0xc4f3('0x27')]=function(_0x2d35ae,_0x15456e){return db[_0xc4f3('0x2e')]['find']({'where':{'id':_0x2d35ae[_0xc4f3('0x2d')]['id']}})[_0xc4f3('0x26')](handleEntityNotFound(_0x15456e,null))['then'](removeEntity(_0x15456e,null))['catch'](handleError(_0x15456e,null));};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js
index f850727..a87be44 100644
--- a/server/api/chatApplication/chatApplication.model.js
+++ b/server/api/chatApplication/chatApplication.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7be1=['bluebird','path','../../config/environment','./chatApplication.attributes','exports','define','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment'];(function(_0x1a0985,_0x2e7a69){var _0x18fb0d=function(_0x44c77d){while(--_0x44c77d){_0x1a0985['push'](_0x1a0985['shift']());}};_0x18fb0d(++_0x2e7a69);}(_0x7be1,0x98));var _0x17be=function(_0x38f5f8,_0xefe164){_0x38f5f8=_0x38f5f8-0x0;var _0x34e820=_0x7be1[_0x38f5f8];return _0x34e820;};'use strict';var _=require('lodash');var util=require(_0x17be('0x0'));var logger=require(_0x17be('0x1'))(_0x17be('0x2'));var moment=require(_0x17be('0x3'));var BPromise=require(_0x17be('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x17be('0x5'));var rimraf=require('rimraf');var config=require(_0x17be('0x6'));var attributes=require(_0x17be('0x7'));module[_0x17be('0x8')]=function(_0x108618,_0x4a9b31){return _0x108618[_0x17be('0x9')]('ChatApplication',attributes,{'tableName':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x17be('0xa'),'collate':_0x17be('0xb')});};
\ No newline at end of file
+var _0x95ef=['define','chat_applications','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment','../../config/environment','./chatApplication.attributes','exports'];(function(_0x1a72f3,_0x217011){var _0x57ef47=function(_0x20123d){while(--_0x20123d){_0x1a72f3['push'](_0x1a72f3['shift']());}};_0x57ef47(++_0x217011);}(_0x95ef,0xb4));var _0xf95e=function(_0x3c6d4a,_0x7ec6b){_0x3c6d4a=_0x3c6d4a-0x0;var _0x290eb6=_0x95ef[_0x3c6d4a];return _0x290eb6;};'use strict';var _=require('lodash');var util=require(_0xf95e('0x0'));var logger=require(_0xf95e('0x1'))(_0xf95e('0x2'));var moment=require(_0xf95e('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xf95e('0x4'));var attributes=require(_0xf95e('0x5'));module[_0xf95e('0x6')]=function(_0x56081f,_0x133d18){return _0x56081f[_0xf95e('0x7')]('ChatApplication',attributes,{'tableName':_0xf95e('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xf95e('0x9'),'collate':_0xf95e('0xa')});};
\ No newline at end of file
diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js
index 474c5d1..1108a9f 100644
--- a/server/api/chatApplication/chatApplication.rpc.js
+++ b/server/api/chatApplication/chatApplication.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xef03=['lodash','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatApplication,\x20%s,\x20%s','debug','ChatApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch'];(function(_0xa26908,_0x4abfbb){var _0x48b115=function(_0x12db7a){while(--_0x12db7a){_0xa26908['push'](_0xa26908['shift']());}};_0x48b115(++_0x4abfbb);}(_0xef03,0x150));var _0x3ef0=function(_0x288889,_0x208b44){_0x288889=_0x288889-0x0;var _0x18f361=_0xef03[_0x288889];return _0x18f361;};'use strict';var _=require(_0x3ef0('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3ef0('0x1'));var rs=require(_0x3ef0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3ef0('0x3'))['db'];var utils=require(_0x3ef0('0x4'));var logger=require('../../config/logger')(_0x3ef0('0x5'));var config=require(_0x3ef0('0x6'));var jayson=require(_0x3ef0('0x7'));var client=jayson[_0x3ef0('0x8')][_0x3ef0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x14c08e,_0x29ed13,_0xddd1d0){return new BPromise(function(_0x399980,_0xcfab30){return client[_0x3ef0('0xa')](_0x14c08e,_0xddd1d0)[_0x3ef0('0xb')](function(_0x15ee85){logger[_0x3ef0('0xc')](_0x3ef0('0xd'),_0x29ed13,'request\x20sent');logger[_0x3ef0('0xe')](_0x3ef0('0xf'),_0x29ed13,_0x3ef0('0x10'),JSON[_0x3ef0('0x11')](_0x15ee85));if(_0x15ee85[_0x3ef0('0x12')]){if(_0x15ee85['error']['code']===0x1f4){logger[_0x3ef0('0x12')](_0x3ef0('0xd'),_0x29ed13,_0x15ee85['error']['message']);return _0xcfab30(_0x15ee85[_0x3ef0('0x12')][_0x3ef0('0x13')]);}logger[_0x3ef0('0x12')](_0x3ef0('0xd'),_0x29ed13,_0x15ee85['error'][_0x3ef0('0x13')]);return _0x399980(_0x15ee85['error'][_0x3ef0('0x13')]);}else{logger[_0x3ef0('0xc')](_0x3ef0('0xd'),_0x29ed13,'request\x20sent');_0x399980(_0x15ee85['result'][_0x3ef0('0x13')]);}})[_0x3ef0('0x14')](function(_0x3dda64){logger['error']('ChatApplication,\x20%s,\x20%s',_0x29ed13,_0x3dda64);_0xcfab30(_0x3dda64);});});}
\ No newline at end of file
+var _0x7c28=['catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x2cb321,_0x4966fe){var _0x24c609=function(_0x4ed75d){while(--_0x4ed75d){_0x2cb321['push'](_0x2cb321['shift']());}};_0x24c609(++_0x4966fe);}(_0x7c28,0x1a3));var _0x87c2=function(_0x2aecb2,_0x343312){_0x2aecb2=_0x2aecb2-0x0;var _0x3ebb80=_0x7c28[_0x2aecb2];return _0x3ebb80;};'use strict';var _=require(_0x87c2('0x0'));var util=require('util');var moment=require(_0x87c2('0x1'));var BPromise=require('bluebird');var rs=require(_0x87c2('0x2'));var fs=require('fs');var Redis=require(_0x87c2('0x3'));var db=require(_0x87c2('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x87c2('0x5'))(_0x87c2('0x6'));var config=require('../../config/environment');var jayson=require(_0x87c2('0x7'));var client=jayson[_0x87c2('0x8')][_0x87c2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5d3007,_0x1f7bb8,_0x4e676e){return new BPromise(function(_0x1df5ac,_0x4c0164){return client[_0x87c2('0xa')](_0x5d3007,_0x4e676e)[_0x87c2('0xb')](function(_0xa23137){logger[_0x87c2('0xc')](_0x87c2('0xd'),_0x1f7bb8,_0x87c2('0xe'));logger['debug'](_0x87c2('0xf'),_0x1f7bb8,_0x87c2('0xe'),JSON[_0x87c2('0x10')](_0xa23137));if(_0xa23137[_0x87c2('0x11')]){if(_0xa23137[_0x87c2('0x11')][_0x87c2('0x12')]===0x1f4){logger[_0x87c2('0x11')]('ChatApplication,\x20%s,\x20%s',_0x1f7bb8,_0xa23137[_0x87c2('0x11')]['message']);return _0x4c0164(_0xa23137[_0x87c2('0x11')][_0x87c2('0x13')]);}logger['error'](_0x87c2('0xd'),_0x1f7bb8,_0xa23137[_0x87c2('0x11')][_0x87c2('0x13')]);return _0x1df5ac(_0xa23137[_0x87c2('0x11')]['message']);}else{logger['info'](_0x87c2('0xd'),_0x1f7bb8,_0x87c2('0xe'));_0x1df5ac(_0xa23137[_0x87c2('0x14')][_0x87c2('0x13')]);}})[_0x87c2('0x15')](function(_0x3c1081){logger[_0x87c2('0x11')](_0x87c2('0xd'),_0x1f7bb8,_0x3c1081);_0x4c0164(_0x3c1081);});});}
\ No newline at end of file
diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js
index 9d0cdce..20770d5 100644
--- a/server/api/chatApplication/index.js
+++ b/server/api/chatApplication/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xaa3e=['delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','/:id','isAuthenticated','put','update'];(function(_0x20e164,_0x24d0ca){var _0x3432b9=function(_0x2654cb){while(--_0x2654cb){_0x20e164['push'](_0x20e164['shift']());}};_0x3432b9(++_0x24d0ca);}(_0xaa3e,0x1bd));var _0xeaa3=function(_0x5a4400,_0xfae3b6){_0x5a4400=_0x5a4400-0x0;var _0xf9b532=_0xaa3e[_0x5a4400];return _0xf9b532;};'use strict';var multer=require(_0xeaa3('0x0'));var util=require(_0xeaa3('0x1'));var path=require(_0xeaa3('0x2'));var timeout=require(_0xeaa3('0x3'));var express=require(_0xeaa3('0x4'));var router=express[_0xeaa3('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xeaa3('0x6'));var interaction=require(_0xeaa3('0x7'));var config=require(_0xeaa3('0x8'));var controller=require(_0xeaa3('0x9'));router['get'](_0xeaa3('0xa'),auth[_0xeaa3('0xb')](),controller['show']);router[_0xeaa3('0xc')](_0xeaa3('0xa'),auth[_0xeaa3('0xb')](),controller[_0xeaa3('0xd')]);router[_0xeaa3('0xe')]('/:id',auth[_0xeaa3('0xb')](),controller[_0xeaa3('0xf')]);module[_0xeaa3('0x10')]=router;
\ No newline at end of file
+var _0x7582=['exports','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','get','isAuthenticated','show','put','/:id','update','delete','destroy'];(function(_0x999b85,_0x1edc2b){var _0x1d7124=function(_0x59cd29){while(--_0x59cd29){_0x999b85['push'](_0x999b85['shift']());}};_0x1d7124(++_0x1edc2b);}(_0x7582,0x171));var _0x2758=function(_0x599c94,_0x464f0e){_0x599c94=_0x599c94-0x0;var _0x34e215=_0x7582[_0x599c94];return _0x34e215;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2758('0x0'));var timeout=require(_0x2758('0x1'));var express=require('express');var router=express[_0x2758('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x2758('0x3'));var interaction=require(_0x2758('0x4'));var config=require(_0x2758('0x5'));var controller=require(_0x2758('0x6'));router[_0x2758('0x7')]('/:id',auth[_0x2758('0x8')](),controller[_0x2758('0x9')]);router[_0x2758('0xa')](_0x2758('0xb'),auth[_0x2758('0x8')](),controller[_0x2758('0xc')]);router[_0x2758('0xd')](_0x2758('0xb'),auth['isAuthenticated'](),controller[_0x2758('0xe')]);module[_0x2758('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js
index 702bd03..0d6649a 100644
--- a/server/api/chatGroup/chatGroup.attributes.js
+++ b/server/api/chatGroup/chatGroup.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x80d3=['STRING'];(function(_0x404c20,_0x1a8fa4){var _0xbf3067=function(_0x233a69){while(--_0x233a69){_0x404c20['push'](_0x404c20['shift']());}};_0xbf3067(++_0x1a8fa4);}(_0x80d3,0x122));var _0x380d=function(_0x4f645a,_0x65a067){_0x4f645a=_0x4f645a-0x0;var _0x12c258=_0x80d3[_0x4f645a];return _0x12c258;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x380d('0x0')],'allowNull':![]},'description':{'type':Sequelize[_0x380d('0x0')]},'write':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
+var _0x6f7c=['exports','STRING','BOOLEAN','sequelize'];(function(_0x35083e,_0x32664b){var _0xe744d8=function(_0x5ad67e){while(--_0x5ad67e){_0x35083e['push'](_0x35083e['shift']());}};_0xe744d8(++_0x32664b);}(_0x6f7c,0x137));var _0xc6f7=function(_0x2d8ddc,_0x35b941){_0x2d8ddc=_0x2d8ddc-0x0;var _0x5c7a4a=_0x6f7c[_0x2d8ddc];return _0x5c7a4a;};'use strict';var Sequelize=require(_0xc6f7('0x0'));module[_0xc6f7('0x1')]={'name':{'type':Sequelize[_0xc6f7('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xc6f7('0x2')]},'write':{'type':Sequelize[_0xc6f7('0x3')],'defaultValue':!![]}};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js
index d034bcb..2175560 100644
--- a/server/api/chatGroup/chatGroup.controller.js
+++ b/server/api/chatGroup/chatGroup.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8bd7=['to-csv','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatGroup.socket','sendStatus','status','offset','undefined','limit','count','set','Content-Range','json','apply','save','then','destroy','end','error','stack','name','index','ChatGroup','rawAttributes','fieldName','type','key','model','map','keys','filters','query','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','find','create','body','update','catch','describe','getUnread','user','toInteger','ids','omit','User','length','getMembers','removeMembers','addMessage','ChatGroupId','ChatInternalMessage','getMessages','findOne','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox'];(function(_0x44c935,_0x3653f0){var _0x465bee=function(_0x211d20){while(--_0x211d20){_0x44c935['push'](_0x44c935['shift']());}};_0x465bee(++_0x3653f0);}(_0x8bd7,0x11d));var _0x78bd=function(_0xa38167,_0x5d12b6){_0xa38167=_0xa38167-0x0;var _0x409f8d=_0x8bd7[_0xa38167];return _0x409f8d;};'use strict';var emlformat=require(_0x78bd('0x0'));var rimraf=require(_0x78bd('0x1'));var zipdir=require(_0x78bd('0x2'));var jsonpatch=require(_0x78bd('0x3'));var rp=require(_0x78bd('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x78bd('0x5'));var util=require(_0x78bd('0x6'));var path=require(_0x78bd('0x7'));var sox=require(_0x78bd('0x8'));var csv=require(_0x78bd('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x78bd('0xa'));var crypto=require(_0x78bd('0xb'));var jsforce=require(_0x78bd('0xc'));var deskjs=require(_0x78bd('0xd'));var toCsv=require(_0x78bd('0x9'));var querystring=require('querystring');var Papa=require(_0x78bd('0xe'));var Redis=require(_0x78bd('0xf'));var authService=require(_0x78bd('0x10'));var qs=require(_0x78bd('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x78bd('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0x78bd('0x13'));var config=require(_0x78bd('0x14'));var licenseUtil=require(_0x78bd('0x15'));var db=require(_0x78bd('0x16'))['db'];config[_0x78bd('0x17')]=_[_0x78bd('0x18')](config[_0x78bd('0x17')],{'host':_0x78bd('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x78bd('0x17')]));require(_0x78bd('0x1a'))['register'](socket);function respondWithStatusCode(_0xb01357,_0xace10f){_0xace10f=_0xace10f||0xcc;return function(_0x56bfb7){if(_0x56bfb7){return _0xb01357[_0x78bd('0x1b')](_0xace10f);}return _0xb01357[_0x78bd('0x1c')](_0xace10f)['end']();};}function respondWithResult(_0x40a8b3,_0x39ee42){_0x39ee42=_0x39ee42||0xc8;return function(_0x2c75ca){if(_0x2c75ca){return _0x40a8b3[_0x78bd('0x1c')](_0x39ee42)['json'](_0x2c75ca);}};}function respondWithFilteredResult(_0x579f89,_0x44e606){return function(_0x212885){if(_0x212885){var _0x5cb613=typeof _0x44e606[_0x78bd('0x1d')]===_0x78bd('0x1e')&&typeof _0x44e606[_0x78bd('0x1f')]===_0x78bd('0x1e');var _0x3b150c=_0x212885[_0x78bd('0x20')];var _0x280837=_0x5cb613?0x0:_0x44e606[_0x78bd('0x1d')];var _0x9fc140=_0x5cb613?_0x212885['count']:_0x44e606[_0x78bd('0x1d')]+_0x44e606['limit'];var _0xe95e28;if(_0x9fc140>=_0x3b150c){_0x9fc140=_0x3b150c;_0xe95e28=0xc8;}else{_0xe95e28=0xce;}_0x579f89['status'](_0xe95e28);return _0x579f89[_0x78bd('0x21')](_0x78bd('0x22'),_0x280837+'-'+_0x9fc140+'/'+_0x3b150c)[_0x78bd('0x23')](_0x212885);}return null;};}function patchUpdates(_0x3cf9dd){return function(_0x358313){try{jsonpatch[_0x78bd('0x24')](_0x358313,_0x3cf9dd,!![]);}catch(_0x8697d1){return BPromise['reject'](_0x8697d1);}return _0x358313[_0x78bd('0x25')]();};}function saveUpdates(_0x222bb2,_0x37b8cc){return function(_0x4765e1){if(_0x4765e1){return _0x4765e1['update'](_0x222bb2)[_0x78bd('0x26')](function(_0x5c5c50){return _0x5c5c50;});}return null;};}function removeEntity(_0x9445b7,_0x2bcd41){return function(_0x81ad20){if(_0x81ad20){return _0x81ad20[_0x78bd('0x27')]()[_0x78bd('0x26')](function(){_0x9445b7[_0x78bd('0x1c')](0xcc)[_0x78bd('0x28')]();});}};}function handleEntityNotFound(_0x58efd7,_0x20ec65){return function(_0x176085){if(!_0x176085){_0x58efd7[_0x78bd('0x1b')](0x194);}return _0x176085;};}function handleError(_0x48376d,_0xa3032c){_0xa3032c=_0xa3032c||0x1f4;return function(_0x4ab3e9){logger[_0x78bd('0x29')](_0x4ab3e9[_0x78bd('0x2a')]);if(_0x4ab3e9['name']){delete _0x4ab3e9[_0x78bd('0x2b')];}_0x48376d[_0x78bd('0x1c')](_0xa3032c)['send'](_0x4ab3e9);};}exports[_0x78bd('0x2c')]=function(_0x5c0578,_0x155b5a){var _0x15994c={},_0x197ff3={},_0x64539a={'count':0x0,'rows':[]};var _0x5a6248=_['map'](db[_0x78bd('0x2d')][_0x78bd('0x2e')],function(_0xbe7f3c){return{'name':_0xbe7f3c[_0x78bd('0x2f')],'type':_0xbe7f3c[_0x78bd('0x30')][_0x78bd('0x31')]};});_0x197ff3[_0x78bd('0x32')]=_[_0x78bd('0x33')](_0x5a6248,_0x78bd('0x2b'));_0x197ff3['query']=_[_0x78bd('0x34')](_0x5c0578['query']);_0x197ff3[_0x78bd('0x35')]=_['intersection'](_0x197ff3[_0x78bd('0x32')],_0x197ff3[_0x78bd('0x36')]);_0x15994c[_0x78bd('0x37')]=_[_0x78bd('0x38')](_0x197ff3['model'],qs[_0x78bd('0x39')](_0x5c0578['query'][_0x78bd('0x39')]));_0x15994c['attributes']=_0x15994c['attributes']['length']?_0x15994c[_0x78bd('0x37')]:_0x197ff3[_0x78bd('0x32')];if(!_0x5c0578[_0x78bd('0x36')][_0x78bd('0x3a')](_0x78bd('0x3b'))){_0x15994c[_0x78bd('0x1f')]=qs[_0x78bd('0x1f')](_0x5c0578[_0x78bd('0x36')][_0x78bd('0x1f')]);_0x15994c[_0x78bd('0x1d')]=qs[_0x78bd('0x1d')](_0x5c0578['query'][_0x78bd('0x1d')]);}_0x15994c[_0x78bd('0x3c')]=qs[_0x78bd('0x3d')](_0x5c0578[_0x78bd('0x36')][_0x78bd('0x3d')]);_0x15994c[_0x78bd('0x3e')]=qs['filters'](_[_0x78bd('0x3f')](_0x5c0578[_0x78bd('0x36')],_0x197ff3['filters']),_0x5a6248);if(_0x5c0578[_0x78bd('0x36')][_0x78bd('0x40')]){_0x15994c[_0x78bd('0x3e')]=_[_0x78bd('0x41')](_0x15994c[_0x78bd('0x3e')],{'$or':_[_0x78bd('0x33')](_0x5a6248,function(_0x21dc98){if(_0x21dc98[_0x78bd('0x30')]!==_0x78bd('0x42')){var _0x97bad5={};_0x97bad5[_0x21dc98['name']]={'$like':'%'+_0x5c0578[_0x78bd('0x36')][_0x78bd('0x40')]+'%'};return _0x97bad5;}})});}_0x15994c=_[_0x78bd('0x41')]({},_0x15994c,_0x5c0578[_0x78bd('0x43')]);var _0x12b653={'where':_0x15994c[_0x78bd('0x3e')]};return db['ChatGroup'][_0x78bd('0x20')](_0x12b653)[_0x78bd('0x26')](function(_0x3dc495){_0x64539a[_0x78bd('0x20')]=_0x3dc495;if(_0x5c0578[_0x78bd('0x36')][_0x78bd('0x44')]){_0x15994c[_0x78bd('0x45')]=[{'all':!![]}];}return db['ChatGroup'][_0x78bd('0x46')](_0x15994c);})[_0x78bd('0x26')](function(_0x2cce23){_0x64539a[_0x78bd('0x47')]=_0x2cce23;return _0x64539a;})['then'](respondWithFilteredResult(_0x155b5a,_0x15994c))['catch'](handleError(_0x155b5a,null));};exports[_0x78bd('0x48')]=function(_0x537b1f,_0x48cfeb){var _0x23c434={'raw':!![],'where':{'id':_0x537b1f[_0x78bd('0x49')]['id']}},_0x328bbe={};_0x328bbe[_0x78bd('0x32')]=_['keys'](db['ChatGroup'][_0x78bd('0x2e')]);_0x328bbe['query']=_[_0x78bd('0x34')](_0x537b1f[_0x78bd('0x36')]);_0x328bbe[_0x78bd('0x35')]=_[_0x78bd('0x38')](_0x328bbe[_0x78bd('0x32')],_0x328bbe[_0x78bd('0x36')]);_0x23c434[_0x78bd('0x37')]=_[_0x78bd('0x38')](_0x328bbe[_0x78bd('0x32')],qs['fields'](_0x537b1f[_0x78bd('0x36')][_0x78bd('0x39')]));_0x23c434[_0x78bd('0x37')]=_0x23c434[_0x78bd('0x37')]['length']?_0x23c434[_0x78bd('0x37')]:_0x328bbe[_0x78bd('0x32')];if(_0x537b1f[_0x78bd('0x36')]['includeAll']){_0x23c434[_0x78bd('0x45')]=[{'all':!![]}];}_0x23c434=_[_0x78bd('0x41')]({},_0x23c434,_0x537b1f[_0x78bd('0x43')]);return db[_0x78bd('0x2d')][_0x78bd('0x4a')](_0x23c434)[_0x78bd('0x26')](handleEntityNotFound(_0x48cfeb,null))[_0x78bd('0x26')](respondWithResult(_0x48cfeb,null))['catch'](handleError(_0x48cfeb,null));};exports[_0x78bd('0x4b')]=function(_0x508edb,_0x1e0fcb){return db[_0x78bd('0x2d')][_0x78bd('0x4b')](_0x508edb[_0x78bd('0x4c')],{})[_0x78bd('0x26')](respondWithResult(_0x1e0fcb,0xc9))['catch'](handleError(_0x1e0fcb,null));};exports[_0x78bd('0x4d')]=function(_0x1304ed,_0x463771){if(_0x1304ed['body']['id']){delete _0x1304ed[_0x78bd('0x4c')]['id'];}return db[_0x78bd('0x2d')]['find']({'where':{'id':_0x1304ed['params']['id']}})[_0x78bd('0x26')](handleEntityNotFound(_0x463771,null))[_0x78bd('0x26')](saveUpdates(_0x1304ed['body'],null))['then'](respondWithResult(_0x463771,null))[_0x78bd('0x4e')](handleError(_0x463771,null));};exports[_0x78bd('0x27')]=function(_0x5a304b,_0x24394f){return db[_0x78bd('0x2d')][_0x78bd('0x4a')]({'where':{'id':_0x5a304b['params']['id']}})[_0x78bd('0x26')](handleEntityNotFound(_0x24394f,null))[_0x78bd('0x26')](removeEntity(_0x24394f,null))[_0x78bd('0x4e')](handleError(_0x24394f,null));};exports['describe']=function(_0x296ee9,_0x416b5a){return db[_0x78bd('0x2d')][_0x78bd('0x4f')]()[_0x78bd('0x26')](respondWithResult(_0x416b5a,null))[_0x78bd('0x4e')](handleError(_0x416b5a,null));};exports[_0x78bd('0x50')]=function(_0x2aeac3,_0x56ed14,_0x56d6cd){return db['ChatInternalMessage'][_0x78bd('0x20')]({'where':{'ChatGroupId':_0x2aeac3[_0x78bd('0x49')]['id'],'ToId':_0x2aeac3[_0x78bd('0x51')]['id'],'read':![]}})[_0x78bd('0x26')](function(_0x3be7c0){return{'id':_[_0x78bd('0x52')](_0x2aeac3['params']['id']),'count':_0x3be7c0};})['then'](respondWithResult(_0x56ed14,null))['catch'](handleError(_0x56ed14,null));};exports['addMembers']=function(_0x5162f0,_0x14eafd,_0x5af770){return db[_0x78bd('0x2d')][_0x78bd('0x4a')]({'where':{'id':_0x5162f0['params']['id']}})['then'](handleEntityNotFound(_0x14eafd,null))['then'](function(_0x48a09a){if(_0x48a09a){return _0x48a09a['addMembers'](_0x5162f0[_0x78bd('0x4c')][_0x78bd('0x53')],_[_0x78bd('0x54')](_0x5162f0[_0x78bd('0x4c')],[_0x78bd('0x53'),'id'])||{});}})[_0x78bd('0x26')](respondWithResult(_0x14eafd,null))[_0x78bd('0x4e')](handleError(_0x14eafd,null));};exports['getMembers']=function(_0x3f2328,_0x1c1671,_0x173318){var _0x3fede0={};var _0x1f47eb={};var _0x48cdd1;var _0x126ce7;return db[_0x78bd('0x2d')]['findOne']({'where':{'id':_0x3f2328['params']['id']}})[_0x78bd('0x26')](handleEntityNotFound(_0x1c1671,null))[_0x78bd('0x26')](function(_0x4e41ae){if(_0x4e41ae){_0x48cdd1=_0x4e41ae;_0x1f47eb[_0x78bd('0x32')]=_['keys'](db[_0x78bd('0x55')][_0x78bd('0x2e')]);_0x1f47eb[_0x78bd('0x36')]=_[_0x78bd('0x34')](_0x3f2328[_0x78bd('0x36')]);_0x1f47eb[_0x78bd('0x35')]=_[_0x78bd('0x38')](_0x1f47eb['model'],_0x1f47eb[_0x78bd('0x36')]);_0x3fede0['attributes']=_[_0x78bd('0x38')](_0x1f47eb[_0x78bd('0x32')],qs[_0x78bd('0x39')](_0x3f2328['query'][_0x78bd('0x39')]));_0x3fede0[_0x78bd('0x37')]=_0x3fede0[_0x78bd('0x37')][_0x78bd('0x56')]?_0x3fede0[_0x78bd('0x37')]:_0x1f47eb['model'];_0x3fede0['order']=qs[_0x78bd('0x3d')](_0x3f2328[_0x78bd('0x36')][_0x78bd('0x3d')]);_0x3fede0[_0x78bd('0x3e')]=qs[_0x78bd('0x35')](_['pick'](_0x3f2328[_0x78bd('0x36')],_0x1f47eb[_0x78bd('0x35')]));if(_0x3f2328[_0x78bd('0x36')]['filter']){_0x3fede0[_0x78bd('0x3e')]=_[_0x78bd('0x41')](_0x3fede0[_0x78bd('0x3e')],{'$or':_[_0x78bd('0x33')](_0x3fede0[_0x78bd('0x37')],function(_0x525dba){var _0x4a8787={};_0x4a8787[_0x525dba]={'$like':'%'+_0x3f2328[_0x78bd('0x36')][_0x78bd('0x40')]+'%'};return _0x4a8787;})});}_0x3fede0=_[_0x78bd('0x41')]({},_0x3fede0,_0x3f2328[_0x78bd('0x43')]);return _0x48cdd1[_0x78bd('0x57')](_0x3fede0);}})[_0x78bd('0x26')](function(_0x5cc56b){if(_0x5cc56b){_0x126ce7=_0x5cc56b[_0x78bd('0x56')];if(!_0x3f2328[_0x78bd('0x36')][_0x78bd('0x3a')]('nolimit')){_0x3fede0[_0x78bd('0x1f')]=qs['limit'](_0x3f2328[_0x78bd('0x36')]['limit']);_0x3fede0[_0x78bd('0x1d')]=qs[_0x78bd('0x1d')](_0x3f2328[_0x78bd('0x36')][_0x78bd('0x1d')]);}return _0x48cdd1[_0x78bd('0x57')](_0x3fede0);}})[_0x78bd('0x26')](function(_0x192f68){if(_0x192f68){return _0x192f68?{'count':_0x126ce7,'rows':_0x192f68}:null;}})['then'](respondWithResult(_0x1c1671,null))[_0x78bd('0x4e')](handleError(_0x1c1671,null));};exports[_0x78bd('0x58')]=function(_0x39758c,_0x5c43be,_0x49bced){return db[_0x78bd('0x2d')]['find']({'where':{'id':_0x39758c[_0x78bd('0x49')]['id']}})[_0x78bd('0x26')](handleEntityNotFound(_0x5c43be,null))[_0x78bd('0x26')](function(_0x6d5b21){if(_0x6d5b21){return _0x6d5b21['removeMembers'](_0x39758c[_0x78bd('0x36')]['ids']);}})['then'](respondWithStatusCode(_0x5c43be,null))[_0x78bd('0x4e')](handleError(_0x5c43be,null));};exports[_0x78bd('0x59')]=function(_0x16ef03,_0xc0bbe5,_0x5e512a){if(_0x16ef03['body']['id']){delete _0x16ef03[_0x78bd('0x4c')]['id'];}return db[_0x78bd('0x2d')][_0x78bd('0x4a')]({'where':{'id':_0x16ef03[_0x78bd('0x49')]['id']}})[_0x78bd('0x26')](handleEntityNotFound(_0xc0bbe5,null))['then'](function(_0x47fc65){if(_0x47fc65){_0x16ef03[_0x78bd('0x4c')][_0x78bd('0x5a')]=_0x47fc65['id'];return db[_0x78bd('0x5b')][_0x78bd('0x4b')](_0x16ef03[_0x78bd('0x4c')]);}})['then'](respondWithResult(_0xc0bbe5,null))['catch'](handleError(_0xc0bbe5,null));};exports[_0x78bd('0x5c')]=function(_0x4c0deb,_0x5ee58a,_0x3bbc21){var _0x29d414={};var _0x4a395b={};var _0x221860;var _0x4b3726;return db[_0x78bd('0x2d')][_0x78bd('0x5d')]({'where':{'id':_0x4c0deb[_0x78bd('0x49')]['id']}})['then'](handleEntityNotFound(_0x5ee58a,null))[_0x78bd('0x26')](function(_0x1c3f3a){if(_0x1c3f3a){_0x221860=_0x1c3f3a;_0x4a395b[_0x78bd('0x32')]=_[_0x78bd('0x34')](db[_0x78bd('0x5b')]['rawAttributes']);_0x4a395b[_0x78bd('0x36')]=_[_0x78bd('0x34')](_0x4c0deb['query']);_0x4a395b[_0x78bd('0x35')]=_[_0x78bd('0x38')](_0x4a395b[_0x78bd('0x32')],_0x4a395b[_0x78bd('0x36')]);_0x29d414[_0x78bd('0x37')]=_['intersection'](_0x4a395b['model'],qs['fields'](_0x4c0deb['query'][_0x78bd('0x39')]));_0x29d414[_0x78bd('0x37')]=_0x29d414[_0x78bd('0x37')][_0x78bd('0x56')]?_0x29d414[_0x78bd('0x37')]:_0x4a395b[_0x78bd('0x32')];_0x29d414[_0x78bd('0x3c')]=qs[_0x78bd('0x3d')](_0x4c0deb[_0x78bd('0x36')]['sort']);_0x29d414[_0x78bd('0x3e')]=qs[_0x78bd('0x35')](_['pick'](_0x4c0deb[_0x78bd('0x36')],_0x4a395b[_0x78bd('0x35')]));if(_0x4c0deb[_0x78bd('0x36')][_0x78bd('0x40')]){_0x29d414[_0x78bd('0x3e')]=_[_0x78bd('0x41')](_0x29d414['where'],{'$or':_['map'](_0x29d414[_0x78bd('0x37')],function(_0x2b540c){var _0xed0026={};_0xed0026[_0x2b540c]={'$like':'%'+_0x4c0deb[_0x78bd('0x36')][_0x78bd('0x40')]+'%'};return _0xed0026;})});}if(_0x4c0deb[_0x78bd('0x36')][_0x78bd('0x5e')]){var _0x23bdf3=_0x4c0deb[_0x78bd('0x36')]['$gte'][_0x78bd('0x5f')](',');var _0x1670cf={};_0x1670cf[_0x23bdf3[0x0]]={'$gte':moment(_0x23bdf3[0x1])[_0x78bd('0x60')](_0x78bd('0x61'))};_0x29d414['where']=_[_0x78bd('0x41')](_0x29d414[_0x78bd('0x3e')],_0x1670cf);}_0x29d414=_[_0x78bd('0x41')]({},_0x29d414,_0x4c0deb[_0x78bd('0x43')]);return _0x221860[_0x78bd('0x5c')](_0x29d414);}})[_0x78bd('0x26')](function(_0x3162ea){if(_0x3162ea){_0x4b3726=_0x3162ea[_0x78bd('0x56')];if(!_0x4c0deb['query'][_0x78bd('0x3a')]('nolimit')){_0x29d414[_0x78bd('0x1f')]=qs[_0x78bd('0x1f')](_0x4c0deb[_0x78bd('0x36')][_0x78bd('0x1f')]);_0x29d414['offset']=qs[_0x78bd('0x1d')](_0x4c0deb[_0x78bd('0x36')][_0x78bd('0x1d')]);}return _0x221860[_0x78bd('0x5c')](_0x29d414);}})[_0x78bd('0x26')](function(_0x4d831f){if(_0x4d831f){return _0x4d831f?{'count':_0x4b3726,'rows':_0x4d831f}:null;}})['then'](respondWithResult(_0x5ee58a,null))[_0x78bd('0x4e')](handleError(_0x5ee58a,null));};
\ No newline at end of file
+var _0x947d=['ids','findOne','getMembers','removeMembers','addMessage','ChatGroupId','getMessages','$gte','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','request-promise','bluebird','mustache','path','sox','ejs','fs-extra','crypto','jsforce','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','socket.io-emitter','./chatGroup.socket','sendStatus','status','end','json','offset','undefined','count','limit','apply','reject','save','update','then','stack','name','ChatGroup','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','getUnread','ChatInternalMessage','user','addMembers','omit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x947d,0x171));var _0xd947=function(_0x507056,_0xe16b72){_0x507056=_0x507056-0x0;var _0x4eaecc=_0x947d[_0x507056];return _0x4eaecc;};'use strict';var emlformat=require(_0xd947('0x0'));var rimraf=require(_0xd947('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xd947('0x2'));var moment=require('moment');var BPromise=require(_0xd947('0x3'));var Mustache=require(_0xd947('0x4'));var util=require('util');var path=require(_0xd947('0x5'));var sox=require(_0xd947('0x6'));var csv=require('to-csv');var ejs=require(_0xd947('0x7'));var fs=require('fs');var fs_extra=require(_0xd947('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xd947('0x9'));var jsforce=require(_0xd947('0xa'));var deskjs=require('desk.js');var toCsv=require(_0xd947('0xb'));var querystring=require(_0xd947('0xc'));var Papa=require(_0xd947('0xd'));var Redis=require('ioredis');var authService=require(_0xd947('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0xd947('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd947('0x10'))(_0xd947('0x11'));var utils=require(_0xd947('0x12'));var config=require(_0xd947('0x13'));var licenseUtil=require(_0xd947('0x14'));var db=require(_0xd947('0x15'))['db'];config['redis']=_[_0xd947('0x16')](config[_0xd947('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0xd947('0x18'))(new Redis(config[_0xd947('0x17')]));require(_0xd947('0x19'))['register'](socket);function respondWithStatusCode(_0x42a6f,_0x20357a){_0x20357a=_0x20357a||0xcc;return function(_0x52e659){if(_0x52e659){return _0x42a6f[_0xd947('0x1a')](_0x20357a);}return _0x42a6f[_0xd947('0x1b')](_0x20357a)[_0xd947('0x1c')]();};}function respondWithResult(_0x1513c2,_0x101bda){_0x101bda=_0x101bda||0xc8;return function(_0x49f849){if(_0x49f849){return _0x1513c2[_0xd947('0x1b')](_0x101bda)[_0xd947('0x1d')](_0x49f849);}};}function respondWithFilteredResult(_0x488deb,_0x4170a6){return function(_0x35cd59){if(_0x35cd59){var _0x21ec46=typeof _0x4170a6[_0xd947('0x1e')]===_0xd947('0x1f')&&typeof _0x4170a6['limit']===_0xd947('0x1f');var _0x3d032e=_0x35cd59[_0xd947('0x20')];var _0x4a9d8c=_0x21ec46?0x0:_0x4170a6[_0xd947('0x1e')];var _0x153e71=_0x21ec46?_0x35cd59['count']:_0x4170a6[_0xd947('0x1e')]+_0x4170a6[_0xd947('0x21')];var _0x1420bd;if(_0x153e71>=_0x3d032e){_0x153e71=_0x3d032e;_0x1420bd=0xc8;}else{_0x1420bd=0xce;}_0x488deb[_0xd947('0x1b')](_0x1420bd);return _0x488deb['set']('Content-Range',_0x4a9d8c+'-'+_0x153e71+'/'+_0x3d032e)[_0xd947('0x1d')](_0x35cd59);}return null;};}function patchUpdates(_0x35f02a){return function(_0x8e8614){try{jsonpatch[_0xd947('0x22')](_0x8e8614,_0x35f02a,!![]);}catch(_0x446d38){return BPromise[_0xd947('0x23')](_0x446d38);}return _0x8e8614[_0xd947('0x24')]();};}function saveUpdates(_0x25e23c,_0x1502b0){return function(_0x121793){if(_0x121793){return _0x121793[_0xd947('0x25')](_0x25e23c)[_0xd947('0x26')](function(_0x2cef2d){return _0x2cef2d;});}return null;};}function removeEntity(_0x5b2963,_0x559de4){return function(_0x4c5455){if(_0x4c5455){return _0x4c5455['destroy']()[_0xd947('0x26')](function(){_0x5b2963[_0xd947('0x1b')](0xcc)[_0xd947('0x1c')]();});}};}function handleEntityNotFound(_0x5c5bd8,_0x33e56c){return function(_0x50ddd4){if(!_0x50ddd4){_0x5c5bd8[_0xd947('0x1a')](0x194);}return _0x50ddd4;};}function handleError(_0x5369e5,_0x131890){_0x131890=_0x131890||0x1f4;return function(_0x1b84b9){logger['error'](_0x1b84b9[_0xd947('0x27')]);if(_0x1b84b9[_0xd947('0x28')]){delete _0x1b84b9['name'];}_0x5369e5[_0xd947('0x1b')](_0x131890)['send'](_0x1b84b9);};}exports['index']=function(_0x5b9238,_0x593774){var _0x399752={},_0x8d8263={},_0x3bc98f={'count':0x0,'rows':[]};var _0x1d9acc=_['map'](db[_0xd947('0x29')][_0xd947('0x2a')],function(_0x3bb087){return{'name':_0x3bb087[_0xd947('0x2b')],'type':_0x3bb087[_0xd947('0x2c')][_0xd947('0x2d')]};});_0x8d8263[_0xd947('0x2e')]=_['map'](_0x1d9acc,_0xd947('0x28'));_0x8d8263[_0xd947('0x2f')]=_[_0xd947('0x30')](_0x5b9238[_0xd947('0x2f')]);_0x8d8263['filters']=_[_0xd947('0x31')](_0x8d8263['model'],_0x8d8263[_0xd947('0x2f')]);_0x399752[_0xd947('0x32')]=_[_0xd947('0x31')](_0x8d8263[_0xd947('0x2e')],qs['fields'](_0x5b9238[_0xd947('0x2f')][_0xd947('0x33')]));_0x399752['attributes']=_0x399752[_0xd947('0x32')][_0xd947('0x34')]?_0x399752[_0xd947('0x32')]:_0x8d8263[_0xd947('0x2e')];if(!_0x5b9238[_0xd947('0x2f')][_0xd947('0x35')](_0xd947('0x36'))){_0x399752[_0xd947('0x21')]=qs[_0xd947('0x21')](_0x5b9238[_0xd947('0x2f')]['limit']);_0x399752[_0xd947('0x1e')]=qs[_0xd947('0x1e')](_0x5b9238[_0xd947('0x2f')][_0xd947('0x1e')]);}_0x399752[_0xd947('0x37')]=qs['sort'](_0x5b9238[_0xd947('0x2f')][_0xd947('0x38')]);_0x399752[_0xd947('0x39')]=qs[_0xd947('0x3a')](_[_0xd947('0x3b')](_0x5b9238[_0xd947('0x2f')],_0x8d8263[_0xd947('0x3a')]),_0x1d9acc);if(_0x5b9238[_0xd947('0x2f')][_0xd947('0x3c')]){_0x399752[_0xd947('0x39')]=_[_0xd947('0x3d')](_0x399752['where'],{'$or':_[_0xd947('0x3e')](_0x1d9acc,function(_0x154e1f){if(_0x154e1f['type']!==_0xd947('0x3f')){var _0x12c346={};_0x12c346[_0x154e1f['name']]={'$like':'%'+_0x5b9238[_0xd947('0x2f')][_0xd947('0x3c')]+'%'};return _0x12c346;}})});}_0x399752=_['merge']({},_0x399752,_0x5b9238[_0xd947('0x40')]);var _0x5e1e85={'where':_0x399752[_0xd947('0x39')]};return db[_0xd947('0x29')]['count'](_0x5e1e85)[_0xd947('0x26')](function(_0x4127c2){_0x3bc98f[_0xd947('0x20')]=_0x4127c2;if(_0x5b9238[_0xd947('0x2f')][_0xd947('0x41')]){_0x399752[_0xd947('0x42')]=[{'all':!![]}];}return db[_0xd947('0x29')][_0xd947('0x43')](_0x399752);})[_0xd947('0x26')](function(_0x58b48c){_0x3bc98f[_0xd947('0x44')]=_0x58b48c;return _0x3bc98f;})['then'](respondWithFilteredResult(_0x593774,_0x399752))[_0xd947('0x45')](handleError(_0x593774,null));};exports[_0xd947('0x46')]=function(_0x33417e,_0x18cf9e){var _0x3902d2={'raw':!![],'where':{'id':_0x33417e[_0xd947('0x47')]['id']}},_0x2fa172={};_0x2fa172[_0xd947('0x2e')]=_[_0xd947('0x30')](db[_0xd947('0x29')][_0xd947('0x2a')]);_0x2fa172['query']=_[_0xd947('0x30')](_0x33417e[_0xd947('0x2f')]);_0x2fa172[_0xd947('0x3a')]=_[_0xd947('0x31')](_0x2fa172[_0xd947('0x2e')],_0x2fa172[_0xd947('0x2f')]);_0x3902d2[_0xd947('0x32')]=_['intersection'](_0x2fa172[_0xd947('0x2e')],qs['fields'](_0x33417e[_0xd947('0x2f')]['fields']));_0x3902d2[_0xd947('0x32')]=_0x3902d2['attributes'][_0xd947('0x34')]?_0x3902d2[_0xd947('0x32')]:_0x2fa172[_0xd947('0x2e')];if(_0x33417e[_0xd947('0x2f')][_0xd947('0x41')]){_0x3902d2[_0xd947('0x42')]=[{'all':!![]}];}_0x3902d2=_[_0xd947('0x3d')]({},_0x3902d2,_0x33417e[_0xd947('0x40')]);return db[_0xd947('0x29')][_0xd947('0x48')](_0x3902d2)[_0xd947('0x26')](handleEntityNotFound(_0x18cf9e,null))[_0xd947('0x26')](respondWithResult(_0x18cf9e,null))[_0xd947('0x45')](handleError(_0x18cf9e,null));};exports[_0xd947('0x49')]=function(_0x5bdba0,_0xa0649f){return db[_0xd947('0x29')][_0xd947('0x49')](_0x5bdba0[_0xd947('0x4a')],{})[_0xd947('0x26')](respondWithResult(_0xa0649f,0xc9))[_0xd947('0x45')](handleError(_0xa0649f,null));};exports[_0xd947('0x25')]=function(_0x33e0d2,_0x3e230a){if(_0x33e0d2[_0xd947('0x4a')]['id']){delete _0x33e0d2[_0xd947('0x4a')]['id'];}return db[_0xd947('0x29')][_0xd947('0x48')]({'where':{'id':_0x33e0d2[_0xd947('0x47')]['id']}})[_0xd947('0x26')](handleEntityNotFound(_0x3e230a,null))['then'](saveUpdates(_0x33e0d2[_0xd947('0x4a')],null))['then'](respondWithResult(_0x3e230a,null))['catch'](handleError(_0x3e230a,null));};exports['destroy']=function(_0x218b12,_0x1ca9e8){return db[_0xd947('0x29')][_0xd947('0x48')]({'where':{'id':_0x218b12[_0xd947('0x47')]['id']}})[_0xd947('0x26')](handleEntityNotFound(_0x1ca9e8,null))[_0xd947('0x26')](removeEntity(_0x1ca9e8,null))[_0xd947('0x45')](handleError(_0x1ca9e8,null));};exports['describe']=function(_0x4fe008,_0x23d47c){return db['ChatGroup'][_0xd947('0x4b')]()[_0xd947('0x26')](respondWithResult(_0x23d47c,null))[_0xd947('0x45')](handleError(_0x23d47c,null));};exports[_0xd947('0x4c')]=function(_0x375c70,_0xb25d3,_0x2bd223){return db[_0xd947('0x4d')][_0xd947('0x20')]({'where':{'ChatGroupId':_0x375c70['params']['id'],'ToId':_0x375c70[_0xd947('0x4e')]['id'],'read':![]}})[_0xd947('0x26')](function(_0x1437d3){return{'id':_['toInteger'](_0x375c70[_0xd947('0x47')]['id']),'count':_0x1437d3};})[_0xd947('0x26')](respondWithResult(_0xb25d3,null))['catch'](handleError(_0xb25d3,null));};exports[_0xd947('0x4f')]=function(_0x3606f3,_0xf060b6,_0x3beeda){return db[_0xd947('0x29')]['find']({'where':{'id':_0x3606f3['params']['id']}})['then'](handleEntityNotFound(_0xf060b6,null))['then'](function(_0x1c1d60){if(_0x1c1d60){return _0x1c1d60[_0xd947('0x4f')](_0x3606f3[_0xd947('0x4a')]['ids'],_[_0xd947('0x50')](_0x3606f3[_0xd947('0x4a')],[_0xd947('0x51'),'id'])||{});}})[_0xd947('0x26')](respondWithResult(_0xf060b6,null))['catch'](handleError(_0xf060b6,null));};exports['getMembers']=function(_0x23241d,_0x2e925a,_0x3e10ac){var _0x1d0a79={};var _0x57de7d={};var _0x34f66e;var _0x2762e8;return db[_0xd947('0x29')][_0xd947('0x52')]({'where':{'id':_0x23241d[_0xd947('0x47')]['id']}})[_0xd947('0x26')](handleEntityNotFound(_0x2e925a,null))[_0xd947('0x26')](function(_0x5165f0){if(_0x5165f0){_0x34f66e=_0x5165f0;_0x57de7d[_0xd947('0x2e')]=_[_0xd947('0x30')](db['User'][_0xd947('0x2a')]);_0x57de7d['query']=_[_0xd947('0x30')](_0x23241d[_0xd947('0x2f')]);_0x57de7d['filters']=_[_0xd947('0x31')](_0x57de7d[_0xd947('0x2e')],_0x57de7d[_0xd947('0x2f')]);_0x1d0a79[_0xd947('0x32')]=_['intersection'](_0x57de7d['model'],qs['fields'](_0x23241d['query'][_0xd947('0x33')]));_0x1d0a79[_0xd947('0x32')]=_0x1d0a79['attributes']['length']?_0x1d0a79['attributes']:_0x57de7d[_0xd947('0x2e')];_0x1d0a79['order']=qs[_0xd947('0x38')](_0x23241d[_0xd947('0x2f')][_0xd947('0x38')]);_0x1d0a79[_0xd947('0x39')]=qs[_0xd947('0x3a')](_[_0xd947('0x3b')](_0x23241d[_0xd947('0x2f')],_0x57de7d[_0xd947('0x3a')]));if(_0x23241d['query'][_0xd947('0x3c')]){_0x1d0a79[_0xd947('0x39')]=_[_0xd947('0x3d')](_0x1d0a79['where'],{'$or':_[_0xd947('0x3e')](_0x1d0a79[_0xd947('0x32')],function(_0x3f2466){var _0x7f3892={};_0x7f3892[_0x3f2466]={'$like':'%'+_0x23241d['query'][_0xd947('0x3c')]+'%'};return _0x7f3892;})});}_0x1d0a79=_[_0xd947('0x3d')]({},_0x1d0a79,_0x23241d[_0xd947('0x40')]);return _0x34f66e[_0xd947('0x53')](_0x1d0a79);}})[_0xd947('0x26')](function(_0x561246){if(_0x561246){_0x2762e8=_0x561246[_0xd947('0x34')];if(!_0x23241d['query']['hasOwnProperty'](_0xd947('0x36'))){_0x1d0a79[_0xd947('0x21')]=qs[_0xd947('0x21')](_0x23241d['query'][_0xd947('0x21')]);_0x1d0a79['offset']=qs[_0xd947('0x1e')](_0x23241d[_0xd947('0x2f')][_0xd947('0x1e')]);}return _0x34f66e[_0xd947('0x53')](_0x1d0a79);}})[_0xd947('0x26')](function(_0x18bb70){if(_0x18bb70){return _0x18bb70?{'count':_0x2762e8,'rows':_0x18bb70}:null;}})[_0xd947('0x26')](respondWithResult(_0x2e925a,null))['catch'](handleError(_0x2e925a,null));};exports[_0xd947('0x54')]=function(_0x5e0689,_0x502dfc,_0x3de355){return db[_0xd947('0x29')][_0xd947('0x48')]({'where':{'id':_0x5e0689['params']['id']}})[_0xd947('0x26')](handleEntityNotFound(_0x502dfc,null))['then'](function(_0x364feb){if(_0x364feb){return _0x364feb[_0xd947('0x54')](_0x5e0689[_0xd947('0x2f')][_0xd947('0x51')]);}})[_0xd947('0x26')](respondWithStatusCode(_0x502dfc,null))[_0xd947('0x45')](handleError(_0x502dfc,null));};exports[_0xd947('0x55')]=function(_0x1fa41e,_0x22109b,_0x4c7ac0){if(_0x1fa41e[_0xd947('0x4a')]['id']){delete _0x1fa41e[_0xd947('0x4a')]['id'];}return db['ChatGroup'][_0xd947('0x48')]({'where':{'id':_0x1fa41e[_0xd947('0x47')]['id']}})[_0xd947('0x26')](handleEntityNotFound(_0x22109b,null))[_0xd947('0x26')](function(_0x5a8a04){if(_0x5a8a04){_0x1fa41e[_0xd947('0x4a')][_0xd947('0x56')]=_0x5a8a04['id'];return db[_0xd947('0x4d')][_0xd947('0x49')](_0x1fa41e[_0xd947('0x4a')]);}})[_0xd947('0x26')](respondWithResult(_0x22109b,null))['catch'](handleError(_0x22109b,null));};exports[_0xd947('0x57')]=function(_0x916aa6,_0x1012d9,_0x1d42d5){var _0x157784={};var _0x197959={};var _0xc0533f;var _0x25d87d;return db['ChatGroup'][_0xd947('0x52')]({'where':{'id':_0x916aa6[_0xd947('0x47')]['id']}})[_0xd947('0x26')](handleEntityNotFound(_0x1012d9,null))[_0xd947('0x26')](function(_0x464994){if(_0x464994){_0xc0533f=_0x464994;_0x197959[_0xd947('0x2e')]=_['keys'](db[_0xd947('0x4d')]['rawAttributes']);_0x197959[_0xd947('0x2f')]=_[_0xd947('0x30')](_0x916aa6[_0xd947('0x2f')]);_0x197959[_0xd947('0x3a')]=_[_0xd947('0x31')](_0x197959[_0xd947('0x2e')],_0x197959[_0xd947('0x2f')]);_0x157784[_0xd947('0x32')]=_[_0xd947('0x31')](_0x197959[_0xd947('0x2e')],qs['fields'](_0x916aa6[_0xd947('0x2f')]['fields']));_0x157784[_0xd947('0x32')]=_0x157784[_0xd947('0x32')][_0xd947('0x34')]?_0x157784[_0xd947('0x32')]:_0x197959['model'];_0x157784[_0xd947('0x37')]=qs['sort'](_0x916aa6['query'][_0xd947('0x38')]);_0x157784[_0xd947('0x39')]=qs['filters'](_[_0xd947('0x3b')](_0x916aa6[_0xd947('0x2f')],_0x197959[_0xd947('0x3a')]));if(_0x916aa6[_0xd947('0x2f')][_0xd947('0x3c')]){_0x157784[_0xd947('0x39')]=_['merge'](_0x157784[_0xd947('0x39')],{'$or':_[_0xd947('0x3e')](_0x157784[_0xd947('0x32')],function(_0x404931){var _0x5dbc27={};_0x5dbc27[_0x404931]={'$like':'%'+_0x916aa6['query'][_0xd947('0x3c')]+'%'};return _0x5dbc27;})});}if(_0x916aa6['query'][_0xd947('0x58')]){var _0x453bd7=_0x916aa6[_0xd947('0x2f')]['$gte']['split'](',');var _0x3a39c0={};_0x3a39c0[_0x453bd7[0x0]]={'$gte':moment(_0x453bd7[0x1])['format'](_0xd947('0x59'))};_0x157784[_0xd947('0x39')]=_[_0xd947('0x3d')](_0x157784['where'],_0x3a39c0);}_0x157784=_[_0xd947('0x3d')]({},_0x157784,_0x916aa6['options']);return _0xc0533f['getMessages'](_0x157784);}})[_0xd947('0x26')](function(_0x404a5d){if(_0x404a5d){_0x25d87d=_0x404a5d[_0xd947('0x34')];if(!_0x916aa6[_0xd947('0x2f')][_0xd947('0x35')]('nolimit')){_0x157784[_0xd947('0x21')]=qs['limit'](_0x916aa6[_0xd947('0x2f')][_0xd947('0x21')]);_0x157784[_0xd947('0x1e')]=qs[_0xd947('0x1e')](_0x916aa6[_0xd947('0x2f')][_0xd947('0x1e')]);}return _0xc0533f['getMessages'](_0x157784);}})['then'](function(_0x5ed148){if(_0x5ed148){return _0x5ed148?{'count':_0x25d87d,'rows':_0x5ed148}:null;}})[_0xd947('0x26')](respondWithResult(_0x1012d9,null))['catch'](handleError(_0x1012d9,null));};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js
index 4d8cbc3..7539a58 100644
--- a/server/api/chatGroup/chatGroup.events.js
+++ b/server/api/chatGroup/chatGroup.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2172=['save','hasOwnProperty','hook','exports','../../mysqldb','ChatGroup','setMaxListeners'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x2172,0x15b));var _0x2217=function(_0x4801c0,_0x35d200){_0x4801c0=_0x4801c0-0x0;var _0x8b28e5=_0x2172[_0x4801c0];return _0x8b28e5;};'use strict';var EventEmitter=require('events');var ChatGroup=require(_0x2217('0x0'))['db'][_0x2217('0x1')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x2217('0x2')](0x0);var events={'afterCreate':_0x2217('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x37b96a){return function(_0xd6fb71,_0x40863f,_0x57c819){ChatGroupEvents['emit'](_0x37b96a+':'+_0xd6fb71['id'],_0xd6fb71);ChatGroupEvents['emit'](_0x37b96a,_0xd6fb71);_0x57c819(null);};}for(var e in events){if(events[_0x2217('0x4')](e)){var event=events[e];ChatGroup[_0x2217('0x5')](e,emitEvent(event));}}module[_0x2217('0x6')]=ChatGroupEvents;
\ No newline at end of file
+var _0xc029=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatGroup','setMaxListeners','save'];(function(_0x3cf8f0,_0x247960){var _0x43a6b5=function(_0x50b07a){while(--_0x50b07a){_0x3cf8f0['push'](_0x3cf8f0['shift']());}};_0x43a6b5(++_0x247960);}(_0xc029,0x1df));var _0x9c02=function(_0x507f9e,_0x308d20){_0x507f9e=_0x507f9e-0x0;var _0x250f7e=_0xc029[_0x507f9e];return _0x250f7e;};'use strict';var EventEmitter=require(_0x9c02('0x0'));var ChatGroup=require(_0x9c02('0x1'))['db'][_0x9c02('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x9c02('0x3')](0x0);var events={'afterCreate':_0x9c02('0x4'),'afterUpdate':_0x9c02('0x5'),'afterDestroy':_0x9c02('0x6')};function emitEvent(_0x291f30){return function(_0x39c897,_0x2a96cd,_0x283c37){ChatGroupEvents[_0x9c02('0x7')](_0x291f30+':'+_0x39c897['id'],_0x39c897);ChatGroupEvents[_0x9c02('0x7')](_0x291f30,_0x39c897);_0x283c37(null);};}for(var e in events){if(events[_0x9c02('0x8')](e)){var event=events[e];ChatGroup[_0x9c02('0x9')](e,emitEvent(event));}}module[_0x9c02('0xa')]=ChatGroupEvents;
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js
index d2e78ab..dbec9ef 100644
--- a/server/api/chatGroup/chatGroup.model.js
+++ b/server/api/chatGroup/chatGroup.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd7d7=['util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./chatGroup.attributes','exports','define','ChatGroup','chat_groups','lodash'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xd7d7,0xd1));var _0x7d7d=function(_0x155d89,_0x24d2e9){_0x155d89=_0x155d89-0x0;var _0x4b0806=_0xd7d7[_0x155d89];return _0x4b0806;};'use strict';var _=require(_0x7d7d('0x0'));var util=require(_0x7d7d('0x1'));var logger=require(_0x7d7d('0x2'))(_0x7d7d('0x3'));var moment=require(_0x7d7d('0x4'));var BPromise=require(_0x7d7d('0x5'));var rp=require(_0x7d7d('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7d7d('0x7'));var config=require(_0x7d7d('0x8'));var attributes=require(_0x7d7d('0x9'));module[_0x7d7d('0xa')]=function(_0x3d7ccc,_0x4bafb8){return _0x3d7ccc[_0x7d7d('0xb')](_0x7d7d('0xc'),attributes,{'tableName':_0x7d7d('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdc9c=['path','rimraf','../../config/environment','exports','define','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5afb08,_0x4338bf){var _0x257cb3=function(_0x127d9d){while(--_0x127d9d){_0x5afb08['push'](_0x5afb08['shift']());}};_0x257cb3(++_0x4338bf);}(_0xdc9c,0x123));var _0xcdc9=function(_0x2ff9e5,_0x2718be){_0x2ff9e5=_0x2ff9e5-0x0;var _0x3ecc6a=_0xdc9c[_0x2ff9e5];return _0x3ecc6a;};'use strict';var _=require('lodash');var util=require(_0xcdc9('0x0'));var logger=require(_0xcdc9('0x1'))(_0xcdc9('0x2'));var moment=require(_0xcdc9('0x3'));var BPromise=require(_0xcdc9('0x4'));var rp=require(_0xcdc9('0x5'));var fs=require('fs');var path=require(_0xcdc9('0x6'));var rimraf=require(_0xcdc9('0x7'));var config=require(_0xcdc9('0x8'));var attributes=require('./chatGroup.attributes');module[_0xcdc9('0x9')]=function(_0x355e31,_0x470ec4){return _0x355e31[_0xcdc9('0xa')]('ChatGroup',attributes,{'tableName':'chat_groups','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.rpc.js b/server/api/chatGroup/chatGroup.rpc.js
index e4eade1..93c2ede 100644
--- a/server/api/chatGroup/chatGroup.rpc.js
+++ b/server/api/chatGroup/chatGroup.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9f60=['request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','defaults','redis','localhost','socket.io-emitter','./chatGroup.socket','register','then','ChatGroup,\x20%s,\x20%s'];(function(_0x3cae69,_0x233c38){var _0x3128eb=function(_0x21d64e){while(--_0x21d64e){_0x3cae69['push'](_0x3cae69['shift']());}};_0x3128eb(++_0x233c38);}(_0x9f60,0x1ae));var _0x09f6=function(_0x14deb4,_0x32297e){_0x14deb4=_0x14deb4-0x0;var _0x26aa7d=_0x9f60[_0x14deb4];return _0x26aa7d;};'use strict';var _=require(_0x09f6('0x0'));var util=require('util');var moment=require(_0x09f6('0x1'));var BPromise=require(_0x09f6('0x2'));var rs=require(_0x09f6('0x3'));var fs=require('fs');var Redis=require(_0x09f6('0x4'));var db=require(_0x09f6('0x5'))['db'];var utils=require(_0x09f6('0x6'));var logger=require(_0x09f6('0x7'))('rpc');var config=require(_0x09f6('0x8'));var jayson=require(_0x09f6('0x9'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0x09f6('0xa')](config[_0x09f6('0xb')],{'host':_0x09f6('0xc'),'port':0x18eb});var socket=require(_0x09f6('0xd'))(new Redis(config[_0x09f6('0xb')]));require(_0x09f6('0xe'))[_0x09f6('0xf')](socket);function respondWithRpcPromise(_0x2e1bb3,_0x5b5038,_0x14d079){return new BPromise(function(_0x978b31,_0x1e10e2){return client['request'](_0x2e1bb3,_0x14d079)[_0x09f6('0x10')](function(_0x3a9988){logger['info'](_0x09f6('0x11'),_0x5b5038,_0x09f6('0x12'));logger[_0x09f6('0x13')](_0x09f6('0x14'),_0x5b5038,_0x09f6('0x12'),JSON[_0x09f6('0x15')](_0x3a9988));if(_0x3a9988[_0x09f6('0x16')]){if(_0x3a9988[_0x09f6('0x16')][_0x09f6('0x17')]===0x1f4){logger[_0x09f6('0x16')]('ChatGroup,\x20%s,\x20%s',_0x5b5038,_0x3a9988[_0x09f6('0x16')][_0x09f6('0x18')]);return _0x1e10e2(_0x3a9988['error'][_0x09f6('0x18')]);}logger['error']('ChatGroup,\x20%s,\x20%s',_0x5b5038,_0x3a9988[_0x09f6('0x16')][_0x09f6('0x18')]);return _0x978b31(_0x3a9988['error'][_0x09f6('0x18')]);}else{logger[_0x09f6('0x19')]('ChatGroup,\x20%s,\x20%s',_0x5b5038,_0x09f6('0x12'));_0x978b31(_0x3a9988[_0x09f6('0x1a')][_0x09f6('0x18')]);}})[_0x09f6('0x1b')](function(_0x1ab9f6){logger['error']('ChatGroup,\x20%s,\x20%s',_0x5b5038,_0x1ab9f6);_0x1e10e2(_0x1ab9f6);});});}
\ No newline at end of file
+var _0xdf67=['debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatGroup,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','socket.io-emitter','./chatGroup.socket','register','request','then','info','request\x20sent'];(function(_0x204013,_0x114a6d){var _0x14f124=function(_0x42452d){while(--_0x42452d){_0x204013['push'](_0x204013['shift']());}};_0x14f124(++_0x114a6d);}(_0xdf67,0x117));var _0x7df6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xdf67[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7df6('0x0'));var util=require(_0x7df6('0x1'));var moment=require(_0x7df6('0x2'));var BPromise=require(_0x7df6('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7df6('0x4'));var db=require(_0x7df6('0x5'))['db'];var utils=require(_0x7df6('0x6'));var logger=require(_0x7df6('0x7'))(_0x7df6('0x8'));var config=require(_0x7df6('0x9'));var jayson=require(_0x7df6('0xa'));var client=jayson[_0x7df6('0xb')]['http']({'port':0x232a});config[_0x7df6('0xc')]=_[_0x7df6('0xd')](config[_0x7df6('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x7df6('0xe'))(new Redis(config[_0x7df6('0xc')]));require(_0x7df6('0xf'))[_0x7df6('0x10')](socket);function respondWithRpcPromise(_0xc1cf3a,_0x2d052d,_0x535ad7){return new BPromise(function(_0x44c366,_0x9f243b){return client[_0x7df6('0x11')](_0xc1cf3a,_0x535ad7)[_0x7df6('0x12')](function(_0x212942){logger[_0x7df6('0x13')]('ChatGroup,\x20%s,\x20%s',_0x2d052d,_0x7df6('0x14'));logger[_0x7df6('0x15')](_0x7df6('0x16'),_0x2d052d,_0x7df6('0x14'),JSON[_0x7df6('0x17')](_0x212942));if(_0x212942[_0x7df6('0x18')]){if(_0x212942['error'][_0x7df6('0x19')]===0x1f4){logger[_0x7df6('0x18')](_0x7df6('0x1a'),_0x2d052d,_0x212942[_0x7df6('0x18')][_0x7df6('0x1b')]);return _0x9f243b(_0x212942[_0x7df6('0x18')][_0x7df6('0x1b')]);}logger['error'](_0x7df6('0x1a'),_0x2d052d,_0x212942['error'][_0x7df6('0x1b')]);return _0x44c366(_0x212942[_0x7df6('0x18')][_0x7df6('0x1b')]);}else{logger[_0x7df6('0x13')](_0x7df6('0x1a'),_0x2d052d,_0x7df6('0x14'));_0x44c366(_0x212942[_0x7df6('0x1c')][_0x7df6('0x1b')]);}})[_0x7df6('0x1d')](function(_0x32cabe){logger['error'](_0x7df6('0x1a'),_0x2d052d,_0x32cabe);_0x9f243b(_0x32cabe);});});}
\ No newline at end of file
diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js
index 6946e72..ab50ee2 100644
--- a/server/api/chatGroup/chatGroup.socket.js
+++ b/server/api/chatGroup/chatGroup.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x430f=['remove','removeListener','register','length','./chatGroup.events','save'];(function(_0x354e4e,_0x74f187){var _0x1ca266=function(_0x5772d3){while(--_0x5772d3){_0x354e4e['push'](_0x354e4e['shift']());}};_0x1ca266(++_0x74f187);}(_0x430f,0xb2));var _0xf430=function(_0x47a8e9,_0x3bddb2){_0x47a8e9=_0x47a8e9-0x0;var _0x2fadb5=_0x430f[_0x47a8e9];return _0x2fadb5;};'use strict';var ChatGroupEvents=require(_0xf430('0x0'));var events=[_0xf430('0x1'),_0xf430('0x2'),'update'];function createListener(_0x1ec010,_0x4fdbcd){return function(_0x53a54c){_0x4fdbcd['emit'](_0x1ec010,_0x53a54c);};}function removeListener(_0x370e7b,_0x5c5c18){return function(){ChatGroupEvents[_0xf430('0x3')](_0x370e7b,_0x5c5c18);};}exports[_0xf430('0x4')]=function(_0x1f7de0){for(var _0x44bcdc=0x0,_0x4dda0e=events[_0xf430('0x5')];_0x44bcdc<_0x4dda0e;_0x44bcdc++){var _0x372dae=events[_0x44bcdc];var _0x54f990=createListener('chatGroup:'+_0x372dae,_0x1f7de0);ChatGroupEvents['on'](_0x372dae,_0x54f990);}};
\ No newline at end of file
+var _0xcd93=['chatGroup:','update','emit','removeListener','register','length'];(function(_0x3d78d7,_0x44acea){var _0x4b6784=function(_0x284157){while(--_0x284157){_0x3d78d7['push'](_0x3d78d7['shift']());}};_0x4b6784(++_0x44acea);}(_0xcd93,0x17b));var _0x3cd9=function(_0x11dfbf,_0x54ead0){_0x11dfbf=_0x11dfbf-0x0;var _0x1c909e=_0xcd93[_0x11dfbf];return _0x1c909e;};'use strict';var ChatGroupEvents=require('./chatGroup.events');var events=['save','remove',_0x3cd9('0x0')];function createListener(_0x1504bd,_0x842d47){return function(_0x217cef){_0x842d47[_0x3cd9('0x1')](_0x1504bd,_0x217cef);};}function removeListener(_0x5f0324,_0x319f7d){return function(){ChatGroupEvents[_0x3cd9('0x2')](_0x5f0324,_0x319f7d);};}exports[_0x3cd9('0x3')]=function(_0x582e01){for(var _0x3363e1=0x0,_0x2613bf=events[_0x3cd9('0x4')];_0x3363e1<_0x2613bf;_0x3363e1++){var _0x57b684=events[_0x3363e1];var _0x2cc443=createListener(_0x3cd9('0x5')+_0x57b684,_0x582e01);ChatGroupEvents['on'](_0x57b684,_0x2cc443);}};
\ No newline at end of file
diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js
index d008fde..0a1746d 100644
--- a/server/api/chatGroup/index.js
+++ b/server/api/chatGroup/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x335f=['path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatGroup.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getUnread','/:id/members','getMembers','/:id/messages','getMessages','post','create','addMessage','update','delete','exports','multer','util'];(function(_0x95411e,_0x38b4c3){var _0x2c8718=function(_0x35c672){while(--_0x35c672){_0x95411e['push'](_0x95411e['shift']());}};_0x2c8718(++_0x38b4c3);}(_0x335f,0x8a));var _0xf335=function(_0x458c2a,_0x531b2e){_0x458c2a=_0x458c2a-0x0;var _0x1be615=_0x335f[_0x458c2a];return _0x1be615;};'use strict';var multer=require(_0xf335('0x0'));var util=require(_0xf335('0x1'));var path=require(_0xf335('0x2'));var timeout=require('connect-timeout');var express=require(_0xf335('0x3'));var router=express[_0xf335('0x4')]();var fs_extra=require(_0xf335('0x5'));var auth=require(_0xf335('0x6'));var interaction=require(_0xf335('0x7'));var config=require(_0xf335('0x8'));var controller=require(_0xf335('0x9'));router[_0xf335('0xa')]('/',auth[_0xf335('0xb')](),controller[_0xf335('0xc')]);router[_0xf335('0xa')](_0xf335('0xd'),auth[_0xf335('0xb')](),controller[_0xf335('0xe')]);router[_0xf335('0xa')](_0xf335('0xf'),auth[_0xf335('0xb')](),controller[_0xf335('0x10')]);router[_0xf335('0xa')]('/:id/unread',auth[_0xf335('0xb')](),controller[_0xf335('0x11')]);router[_0xf335('0xa')](_0xf335('0x12'),auth[_0xf335('0xb')](),controller[_0xf335('0x13')]);router[_0xf335('0xa')](_0xf335('0x14'),auth[_0xf335('0xb')](),controller[_0xf335('0x15')]);router[_0xf335('0x16')]('/',auth['isAuthenticated'](),controller[_0xf335('0x17')]);router[_0xf335('0x16')](_0xf335('0x12'),auth['isAuthenticated'](),controller['addMembers']);router[_0xf335('0x16')](_0xf335('0x14'),auth[_0xf335('0xb')](),controller[_0xf335('0x18')]);router['put'](_0xf335('0xf'),auth[_0xf335('0xb')](),controller[_0xf335('0x19')]);router[_0xf335('0x1a')](_0xf335('0xf'),auth[_0xf335('0xb')](),controller['destroy']);router[_0xf335('0x1a')](_0xf335('0x12'),auth[_0xf335('0xb')](),controller['removeMembers']);module[_0xf335('0x1b')]=router;
\ No newline at end of file
+var _0x0016=['/:id','update','destroy','removeMembers','multer','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./chatGroup.controller','isAuthenticated','index','get','describe','/:id/unread','getUnread','/:id/members','getMembers','/:id/messages','getMessages','post','addMembers','addMessage'];(function(_0x199e95,_0x5404f3){var _0x2a250a=function(_0x38eeab){while(--_0x38eeab){_0x199e95['push'](_0x199e95['shift']());}};_0x2a250a(++_0x5404f3);}(_0x0016,0xac));var _0x6001=function(_0x11ba83,_0xd5611a){_0x11ba83=_0x11ba83-0x0;var _0x3f3925=_0x0016[_0x11ba83];return _0x3f3925;};'use strict';var multer=require(_0x6001('0x0'));var util=require('util');var path=require(_0x6001('0x1'));var timeout=require(_0x6001('0x2'));var express=require('express');var router=express[_0x6001('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x6001('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x6001('0x5'));var controller=require(_0x6001('0x6'));router['get']('/',auth[_0x6001('0x7')](),controller[_0x6001('0x8')]);router[_0x6001('0x9')]('/describe',auth[_0x6001('0x7')](),controller[_0x6001('0xa')]);router['get']('/:id',auth[_0x6001('0x7')](),controller['show']);router[_0x6001('0x9')](_0x6001('0xb'),auth[_0x6001('0x7')](),controller[_0x6001('0xc')]);router[_0x6001('0x9')](_0x6001('0xd'),auth['isAuthenticated'](),controller[_0x6001('0xe')]);router[_0x6001('0x9')](_0x6001('0xf'),auth[_0x6001('0x7')](),controller[_0x6001('0x10')]);router['post']('/',auth[_0x6001('0x7')](),controller['create']);router[_0x6001('0x11')](_0x6001('0xd'),auth['isAuthenticated'](),controller[_0x6001('0x12')]);router[_0x6001('0x11')](_0x6001('0xf'),auth[_0x6001('0x7')](),controller[_0x6001('0x13')]);router['put'](_0x6001('0x14'),auth[_0x6001('0x7')](),controller[_0x6001('0x15')]);router['delete'](_0x6001('0x14'),auth['isAuthenticated'](),controller[_0x6001('0x16')]);router['delete'](_0x6001('0xd'),auth['isAuthenticated'](),controller[_0x6001('0x17')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js
index d1c5167..709c04a 100644
--- a/server/api/chatInteraction/chatInteraction.attributes.js
+++ b/server/api/chatInteraction/chatInteraction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbd3a=['out','INTEGER','sequelize','BOOLEAN','ENUM','star','thumb','TEXT','DATE','STRING','long'];(function(_0xa81ce1,_0x1c5c59){var _0x4cb9fe=function(_0x525e92){while(--_0x525e92){_0xa81ce1['push'](_0xa81ce1['shift']());}};_0x4cb9fe(++_0x1c5c59);}(_0xbd3a,0x10a));var _0xabd3=function(_0x58c043,_0x267d07){_0x58c043=_0x58c043-0x0;var _0x19a4c4=_0xbd3a[_0x58c043];return _0x19a4c4;};'use strict';var Sequelize=require(_0xabd3('0x0'));module['exports']={'closed':{'type':Sequelize[_0xabd3('0x1')],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize[_0xabd3('0x2')](_0xabd3('0x3'),_0xabd3('0x4')),'defaultValue':_0xabd3('0x3')},'ratingMessage':{'type':Sequelize[_0xabd3('0x5')]},'pathTranscript':{'type':Sequelize['TEXT']},'mailTranscript':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xabd3('0x6')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0xabd3('0x7')]},'note':{'type':Sequelize[_0xabd3('0x7')]},'browserName':{'type':Sequelize[_0xabd3('0x7')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize['STRING']},'deviceModel':{'type':Sequelize['STRING']},'deviceVendor':{'type':Sequelize[_0xabd3('0x7')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0xabd3('0x5')]},'customerIp':{'type':Sequelize[_0xabd3('0x7')]},'formData':{'type':Sequelize[_0xabd3('0x5')](_0xabd3('0x8'))},'read1stAt':{'type':Sequelize['DATE']},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xabd3('0x2')]('in',_0xabd3('0x9')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize['STRING']},'vidaooSessionId':{'type':Sequelize[_0xabd3('0x5')]},'autoreplyExecuted':{'type':Sequelize[_0xabd3('0x1')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xabd3('0xa')]}};
\ No newline at end of file
+var _0x3e86=['thumb','star','TEXT','STRING','DATE','long','ENUM','out','BOOLEAN','sequelize','INTEGER'];(function(_0x3458fb,_0x1e1287){var _0x490dc6=function(_0x114cf4){while(--_0x114cf4){_0x3458fb['push'](_0x3458fb['shift']());}};_0x490dc6(++_0x1e1287);}(_0x3e86,0x132));var _0x63e8=function(_0x17b4f2,_0x2d975a){_0x17b4f2=_0x17b4f2-0x0;var _0x122945=_0x3e86[_0x17b4f2];return _0x122945;};'use strict';var Sequelize=require(_0x63e8('0x0'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0x63e8('0x1')]},'ratingType':{'type':Sequelize['ENUM']('star',_0x63e8('0x2')),'defaultValue':_0x63e8('0x3')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0x63e8('0x4')]},'mailTranscript':{'type':Sequelize[_0x63e8('0x5')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x63e8('0x6')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x63e8('0x5')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize['STRING']},'browserName':{'type':Sequelize[_0x63e8('0x5')]},'browserVersion':{'type':Sequelize[_0x63e8('0x5')]},'osName':{'type':Sequelize[_0x63e8('0x5')]},'osVersion':{'type':Sequelize[_0x63e8('0x5')]},'deviceModel':{'type':Sequelize[_0x63e8('0x5')]},'deviceVendor':{'type':Sequelize[_0x63e8('0x5')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize['TEXT']},'customerIp':{'type':Sequelize[_0x63e8('0x5')]},'formData':{'type':Sequelize[_0x63e8('0x4')](_0x63e8('0x7'))},'read1stAt':{'type':Sequelize[_0x63e8('0x6')]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x63e8('0x8')]('in',_0x63e8('0x9')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x63e8('0x5')]},'customerPort':{'type':Sequelize[_0x63e8('0x5')]},'vidaooSessionId':{'type':Sequelize[_0x63e8('0x4')]},'autoreplyExecuted':{'type':Sequelize[_0x63e8('0xa')],'defaultValue':![]},'queueId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js
index f3ce2ac..dabde53 100644
--- a/server/api/chatInteraction/chatInteraction.controller.js
+++ b/server/api/chatInteraction/chatInteraction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd762=['../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../mysqldb','defaults','socket.io-emitter','./chatInteraction.socket','register','client','http','then','info','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','ChatInteraction,\x20%s,\x20%s','message','result','catch','sendStatus','end','status','json','offset','limit','count','set','Content-Range','update','destroy','stack','name','send','render','merge','body','contact','agent','interaction','account','map','rawAttributes','type','key','getOptions','findAll','query','user','show','keys','ChatInteraction','filters','intersection','model','attributes','fields','length','includeAll','include','options','create','find','params','describe','createVidaooSession','findOne','vidaooTopic','vidaooNote','vidaooApiKey','vidaooEscalation','fullname','email','POST','isNull','vidaooMetadata','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','join_url','out','ChatMessage','updateAttributes','customUpdate','CmContact','Contact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','UserId','Interaction\x20already\x20assigned','closed','disposition','AbandonInteraction','attachmentUpload','file','originalname','filename','mimetype','Attachment','attachmentDownload','Unauthorized','ChatOfflineMessageId','offline-chat/','join','download','close','mailTranscript','root','server/files/chat/upload/','format','transcript-%s.txt','now','pathTranscript','Messages','User','ContactId','%s%d','agentAlias','customer','website_alias','agent_alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','direction','secret','MailAccount','MailServerOut','Smtp','CloudProvider','SendMail','sendMail','Mail\x20Transcript','addMessage','ids','omit','getMessages','hasOwnProperty','nolimit','order','sort','where','pick','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','rows','getMyMessages','push','alias','addTags','setTags','spread','color','chatInteractionTags:save','removeTags','toString','server','tmp','attachments','firstName','lastName','read','ChatWebsite','Owner','get','mkdirSync','Account','N.A.','browserName','referer','customerIp','customerPort','tail','basename','existsSync','createReadStream','createWriteStream','System','value','views','downloadInteraction.ejs','transcript-','.pdf','Chat','err','unlinkSync','rimraf','zip-dir','request-promise','moment','bluebird','util','path','ejs','lodash','ioredis'];(function(_0x275745,_0x2df1dd){var _0xb260c1=function(_0x1ccbb8){while(--_0x1ccbb8){_0x275745['push'](_0x275745['shift']());}};_0xb260c1(++_0x2df1dd);}(_0xd762,0xc1));var _0x2d76=function(_0x296079,_0x14e860){_0x296079=_0x296079-0x0;var _0x268dda=_0xd762[_0x296079];return _0x268dda;};'use strict';var rimraf=require(_0x2d76('0x0'));var zipdir=require(_0x2d76('0x1'));var rp=require(_0x2d76('0x2'));var moment=require(_0x2d76('0x3'));var BPromise=require(_0x2d76('0x4'));var Mustache=require('mustache');var util=require(_0x2d76('0x5'));var path=require(_0x2d76('0x6'));var ejs=require(_0x2d76('0x7'));var fs=require('fs');var _=require(_0x2d76('0x8'));var Redis=require(_0x2d76('0x9'));var interaction=require('../../components/interaction/service');var qs=require(_0x2d76('0xa'));var pdf=require(_0x2d76('0xb'));var logger=require(_0x2d76('0xc'))(_0x2d76('0xd'));var config=require('../../config/environment');var db=require(_0x2d76('0xe'))['db'];config['redis']=_[_0x2d76('0xf')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x2d76('0x10'))(new Redis(config['redis']));require(_0x2d76('0x11'))[_0x2d76('0x12')](socket);var jayson=require('jayson/promise');var client=jayson[_0x2d76('0x13')][_0x2d76('0x14')]({'port':0x232b});var client9004=jayson[_0x2d76('0x13')][_0x2d76('0x14')]({'port':0x232c});function respondWithRpcPromise(_0x355d92,_0x321277,_0x2282e2,_0x5976ec){return new BPromise(function(_0x5288df,_0x509f72){var _0x47d865=_0x5976ec||client;return _0x47d865['request'](_0x355d92,_0x2282e2)[_0x2d76('0x15')](function(_0x5d3b73){logger[_0x2d76('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x321277,_0x2d76('0x17'));logger[_0x2d76('0x18')](_0x2d76('0x19'),_0x321277,_0x2d76('0x17'),JSON[_0x2d76('0x1a')](_0x5d3b73));if(_0x5d3b73[_0x2d76('0x1b')]){if(_0x5d3b73[_0x2d76('0x1b')]['code']===0x1f4){logger['error'](_0x2d76('0x1c'),_0x321277,_0x5d3b73[_0x2d76('0x1b')]['message']);return _0x509f72(_0x5d3b73[_0x2d76('0x1b')][_0x2d76('0x1d')]);}logger[_0x2d76('0x1b')]('ChatInteraction,\x20%s,\x20%s',_0x321277,_0x5d3b73[_0x2d76('0x1b')][_0x2d76('0x1d')]);return _0x5288df(_0x5d3b73['error'][_0x2d76('0x1d')]);}else{logger[_0x2d76('0x16')](_0x2d76('0x1c'),_0x321277,_0x2d76('0x17'));_0x5288df(_0x5d3b73[_0x2d76('0x1e')][_0x2d76('0x1d')]);}})[_0x2d76('0x1f')](function(_0x566982){logger['error'](_0x2d76('0x1c'),_0x321277,_0x566982);_0x509f72(_0x566982);});});}function respondWithStatusCode(_0x19a4af,_0x49d666){_0x49d666=_0x49d666||0xcc;return function(_0x86a49f){if(_0x86a49f){return _0x19a4af[_0x2d76('0x20')](_0x49d666);}return _0x19a4af['status'](_0x49d666)[_0x2d76('0x21')]();};}function respondWithResult(_0x3df81c,_0x5cbc46){_0x5cbc46=_0x5cbc46||0xc8;return function(_0x4e2dae){if(_0x4e2dae){return _0x3df81c[_0x2d76('0x22')](_0x5cbc46)[_0x2d76('0x23')](_0x4e2dae);}};}function respondWithFilteredResult(_0x12622a,_0x48c276){return function(_0x2e99ab){if(_0x2e99ab){var _0x34a32c=typeof _0x48c276[_0x2d76('0x24')]==='undefined'&&typeof _0x48c276[_0x2d76('0x25')]==='undefined';var _0x13c81c=_0x2e99ab[_0x2d76('0x26')];var _0xcce04e=_0x34a32c?0x0:_0x48c276['offset'];var _0x1c8482=_0x34a32c?_0x2e99ab['count']:_0x48c276[_0x2d76('0x24')]+_0x48c276[_0x2d76('0x25')];var _0x48d348;if(_0x1c8482>=_0x13c81c){_0x1c8482=_0x13c81c;_0x48d348=0xc8;}else{_0x48d348=0xce;}_0x12622a[_0x2d76('0x22')](_0x48d348);return _0x12622a[_0x2d76('0x27')](_0x2d76('0x28'),_0xcce04e+'-'+_0x1c8482+'/'+_0x13c81c)['json'](_0x2e99ab);}return null;};}function saveUpdates(_0x2dccb2){return function(_0x2be574){if(_0x2be574){return _0x2be574[_0x2d76('0x29')](_0x2dccb2)[_0x2d76('0x15')](function(_0x611f04){return _0x611f04;});}return null;};}function removeEntity(_0x3f46ae){return function(_0x46ef14){if(_0x46ef14){return _0x46ef14[_0x2d76('0x2a')]()[_0x2d76('0x15')](function(){_0x3f46ae[_0x2d76('0x22')](0xcc)[_0x2d76('0x21')]();});}};}function handleEntityNotFound(_0x42a3d7){return function(_0x1db2c3){if(!_0x1db2c3){_0x42a3d7['sendStatus'](0x194);}return _0x1db2c3;};}function handleError(_0x2a13c3,_0xf2910b){_0xf2910b=_0xf2910b||0x1f4;return function(_0xfe895e){logger['error'](_0xfe895e[_0x2d76('0x2b')]);if(_0xfe895e[_0x2d76('0x2c')]){delete _0xfe895e['name'];}_0x2a13c3[_0x2d76('0x22')](_0xf2910b)[_0x2d76('0x2d')](_0xfe895e);};}function getMustacheRender(_0x45c27a,_0x1c6fbc){return Mustache[_0x2d76('0x2e')](_0x45c27a,_[_0x2d76('0x2f')](_0x1c6fbc[_0x2d76('0x30')],{'contact':_0x1c6fbc[_0x2d76('0x31')],'message':_0x1c6fbc[_0x2d76('0x1d')],'agent':_0x1c6fbc[_0x2d76('0x32')],'interaction':_0x1c6fbc[_0x2d76('0x33')],'account':_0x1c6fbc[_0x2d76('0x34')]}))||'';}exports['index']=function(_0x24a55c,_0x445299){var _0xd2202c={};var _0x56c004=_[_0x2d76('0x35')](db['ChatInteraction'][_0x2d76('0x36')],function(_0x25230c){return{'name':_0x25230c['fieldName'],'type':_0x25230c[_0x2d76('0x37')][_0x2d76('0x38')]};});_0xd2202c=qs[_0x2d76('0x39')](_0x56c004,_0x24a55c);return interaction[_0x2d76('0x3a')]('chat',_0x24a55c[_0x2d76('0x3b')],_0x24a55c[_0x2d76('0x3c')],_0xd2202c,_0x56c004)[_0x2d76('0x15')](respondWithFilteredResult(_0x445299,_0xd2202c))['catch'](handleError(_0x445299,null));};exports[_0x2d76('0x3d')]=function(_0x75e966,_0x54220c){var _0x335dca={'raw':![],'where':{'id':_0x75e966['params']['id']}},_0x5bbe9f={};_0x5bbe9f['model']=_[_0x2d76('0x3e')](db[_0x2d76('0x3f')]['rawAttributes']);_0x5bbe9f['query']=_[_0x2d76('0x3e')](_0x75e966[_0x2d76('0x3b')]);_0x5bbe9f[_0x2d76('0x40')]=_[_0x2d76('0x41')](_0x5bbe9f[_0x2d76('0x42')],_0x5bbe9f[_0x2d76('0x3b')]);_0x335dca[_0x2d76('0x43')]=_[_0x2d76('0x41')](_0x5bbe9f[_0x2d76('0x42')],qs[_0x2d76('0x44')](_0x75e966[_0x2d76('0x3b')][_0x2d76('0x44')]));_0x335dca[_0x2d76('0x43')]=_0x335dca[_0x2d76('0x43')][_0x2d76('0x45')]?_0x335dca['attributes']:_0x5bbe9f['model'];if(_0x75e966['query'][_0x2d76('0x46')]){_0x335dca[_0x2d76('0x47')]=[{'all':!![]}];}_0x335dca=_[_0x2d76('0x2f')]({},_0x335dca,_0x75e966[_0x2d76('0x48')]);return db['ChatInteraction']['find'](_0x335dca)[_0x2d76('0x15')](handleEntityNotFound(_0x54220c,null))[_0x2d76('0x15')](respondWithResult(_0x54220c,null))[_0x2d76('0x1f')](handleError(_0x54220c,null));};exports[_0x2d76('0x49')]=function(_0x4bafe1,_0x89e954){return db[_0x2d76('0x3f')][_0x2d76('0x49')](_0x4bafe1['body'],{})[_0x2d76('0x15')](respondWithResult(_0x89e954,0xc9))[_0x2d76('0x1f')](handleError(_0x89e954,null));};exports[_0x2d76('0x29')]=function(_0x22b54e,_0xbaa8cd){if(_0x22b54e[_0x2d76('0x30')]['id']){delete _0x22b54e[_0x2d76('0x30')]['id'];}return db['ChatInteraction'][_0x2d76('0x4a')]({'where':{'id':_0x22b54e[_0x2d76('0x4b')]['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0xbaa8cd,null))[_0x2d76('0x15')](saveUpdates(_0x22b54e[_0x2d76('0x30')],null))[_0x2d76('0x15')](respondWithResult(_0xbaa8cd,null))['catch'](handleError(_0xbaa8cd,null));};exports[_0x2d76('0x2a')]=function(_0x2be3d7,_0x27b0b3){return db[_0x2d76('0x3f')][_0x2d76('0x4a')]({'where':{'id':_0x2be3d7[_0x2d76('0x4b')]['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0x27b0b3,null))[_0x2d76('0x15')](removeEntity(_0x27b0b3,null))[_0x2d76('0x1f')](handleError(_0x27b0b3,null));};exports[_0x2d76('0x4c')]=function(_0x4910a9,_0x498629){return db['ChatInteraction'][_0x2d76('0x4c')]()[_0x2d76('0x15')](respondWithResult(_0x498629,null))[_0x2d76('0x1f')](handleError(_0x498629,null));};exports[_0x2d76('0x4d')]=function(_0x9d7308,_0x169fd9){var _0x2c50d3=_0x9d7308[_0x2d76('0x4b')]['id'];var _0x5e5963;var _0x281ccf;var _0x1ec588;return db[_0x2d76('0x3f')][_0x2d76('0x4e')]({'where':{'id':_0x2c50d3}})[_0x2d76('0x15')](function(_0x9c81e6){_0x5e5963=_0x9c81e6;return db['ChatWebsite']['findOne']({'where':{'id':_0x9c81e6['ChatWebsiteId']},'attributes':['id','vidaooApiKey','vidaooEscalation',_0x2d76('0x4f'),_0x2d76('0x50'),'vidaooMetadata'],'raw':!![]});})['then'](function(_0x3049c2){if(_0x3049c2&&_0x3049c2[_0x2d76('0x51')]&&_0x3049c2[_0x2d76('0x52')]){_0x281ccf=_0x3049c2;var _0x1f76de={'interaction':{'id':_0x2c50d3},'agent':{'id':_0x9d7308[_0x2d76('0x3c')]['id'],'name':_0x9d7308[_0x2d76('0x3c')][_0x2d76('0x2c')],'fullname':_0x9d7308[_0x2d76('0x3c')][_0x2d76('0x53')],'email':_0x9d7308[_0x2d76('0x3c')][_0x2d76('0x54')]},'contact':_0x9d7308['body']['contact'],'account':_0x9d7308['body'][_0x2d76('0x34')]};var _0x1ec0f1={'rejectUnauthorized':![],'method':_0x2d76('0x55'),'url':'https://api-vidaoo.xcally.com/api/v1/meetings','headers':{'X-APIKEY':_0x3049c2[_0x2d76('0x51')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x9d7308[_0x2d76('0x3c')]['email']],'buttons':null,'topic':_0x281ccf[_0x2d76('0x4f')],'note':_[_0x2d76('0x56')](_0x281ccf[_0x2d76('0x50')])?null:getMustacheRender(_0x281ccf[_0x2d76('0x50')],_0x1f76de),'metadata':null},'redirect':'follow','json':!![]};try{if(!_[_0x2d76('0x56')](_0x281ccf[_0x2d76('0x57')])){var _0x5c1a38=getMustacheRender(_0x281ccf[_0x2d76('0x57')],_0x1f76de);var _0x1b174f=JSON['parse'](_0x5c1a38);_0x1ec0f1[_0x2d76('0x30')][_0x2d76('0x58')]=_0x1b174f;}}catch(_0x8239e0){throw new db[(_0x2d76('0x59'))][(_0x2d76('0x5a'))](_0x2d76('0x5b'));}return rp(_0x1ec0f1);}else{throw new db[(_0x2d76('0x59'))]['ValidationError']('Error\x20in\x20Vidaoo\x20configuration');}})[_0x2d76('0x15')](function(_0x190267){_0x1ec588=_0x190267;if(_0x1ec588['id']){var _0x278619={'body':_0x1ec588[_0x2d76('0x5c')],'ChatWebsiteId':_0x281ccf['id'],'ChatInteractionId':_0x5e5963['id'],'direction':_0x2d76('0x5d'),'UserId':_0x9d7308['user']['id']};return db[_0x2d76('0x5e')]['create'](_0x278619,{});}else{throw new db[(_0x2d76('0x59'))]['ValidationError']('Unable\x20to\x20create\x20Vidaoo\x20session');}})[_0x2d76('0x15')](function(){return _0x5e5963[_0x2d76('0x5f')]({'vidaooSessionId':_0x1ec588['id']});})[_0x2d76('0x15')](respondWithResult(_0x169fd9,null))[_0x2d76('0x1f')](handleError(_0x169fd9,null));};exports[_0x2d76('0x60')]=function(_0x55284f,_0x2bc062){if(_0x55284f[_0x2d76('0x30')]['id']){delete _0x55284f[_0x2d76('0x30')]['id'];}return db[_0x2d76('0x3f')]['find']({'where':{'id':_0x55284f[_0x2d76('0x4b')]['id']},'include':[{'model':db[_0x2d76('0x61')],'as':_0x2d76('0x62')}]})[_0x2d76('0x15')](handleEntityNotFound(_0x2bc062,null))[_0x2d76('0x15')](saveUpdates(_0x55284f[_0x2d76('0x30')],null))[_0x2d76('0x15')](respondWithResult(_0x2bc062,null))[_0x2d76('0x1f')](handleError(_0x2bc062,null));};exports[_0x2d76('0x63')]=function(_0x443308,_0x4afbda){if(_0x443308[_0x2d76('0x30')]['id']){delete _0x443308[_0x2d76('0x30')]['id'];}return db[_0x2d76('0x3f')][_0x2d76('0x4a')]({'where':{'id':_0x443308['params']['id']}})[_0x2d76('0x15')](function(_0x1cc6fb){if(!_0x1cc6fb){logger[_0x2d76('0x1b')](_0x2d76('0x64'),_0x2d76('0x63'),0x194,_0x2d76('0x65'));_0x4afbda[_0x2d76('0x20')](0x194);}else{if(_0x1cc6fb[_0x2d76('0x66')]){throw new db[(_0x2d76('0x59'))][(_0x2d76('0x5a'))](_0x2d76('0x67'));}}return _0x1cc6fb;})[_0x2d76('0x15')](function(_0x4d5949){if(_0x4d5949){return _0x4d5949['update']({'closed':_0x443308[_0x2d76('0x30')][_0x2d76('0x68')],'disposition':_0x443308['body'][_0x2d76('0x69')]})[_0x2d76('0x15')](function(_0x418647){return _0x418647;});}})[_0x2d76('0x15')](function(){return respondWithRpcPromise(_0x2d76('0x6a'),'abandon',_0x443308[_0x2d76('0x30')],client9004);})['then'](respondWithResult(_0x4afbda,null))[_0x2d76('0x1f')](handleError(_0x4afbda,null));};exports[_0x2d76('0x6b')]=function(_0xba05af,_0x3d1cc1){_0xba05af[_0x2d76('0x30')][_0x2d76('0x2c')]=_0xba05af[_0x2d76('0x6c')][_0x2d76('0x6d')];_0xba05af['body']['basename']=_0xba05af['file'][_0x2d76('0x6e')];_0xba05af[_0x2d76('0x30')]['type']=_0xba05af['file'][_0x2d76('0x6f')];return db[_0x2d76('0x70')][_0x2d76('0x49')](_0xba05af[_0x2d76('0x30')])[_0x2d76('0x15')](respondWithResult(_0x3d1cc1,0xc9))[_0x2d76('0x1f')](handleError(_0x3d1cc1,null));};exports[_0x2d76('0x71')]=function(_0xf7be3c,_0x1f5019){return db[_0x2d76('0x3f')][_0x2d76('0x4e')]({'where':{'id':_0xf7be3c['params']['id']},'raw':!![]})[_0x2d76('0x15')](handleEntityNotFound(_0x1f5019,null))[_0x2d76('0x15')](function(_0xa03891){if(_0xa03891){if(_0xa03891[_0x2d76('0x68')]){return _0x1f5019[_0x2d76('0x22')](0x193)[_0x2d76('0x23')]({'status':0x193,'message':_0x2d76('0x72')});}return db[_0x2d76('0x70')][_0x2d76('0x4e')]({'where':{'id':_0xf7be3c[_0x2d76('0x3b')]['attachId']},'raw':!![]})[_0x2d76('0x15')](handleEntityNotFound(_0x1f5019,null));}})[_0x2d76('0x15')](function(_0x392a8f){if(_0x392a8f){var _0x3297fb=_0x392a8f[_0x2d76('0x73')]!==null;var _0x5b553e=path['join'](config['root'],'server/files/attachments/');if(_0x3297fb){_0x5b553e=path['join'](_0x5b553e,_0x2d76('0x74'));}var _0x590340=path[_0x2d76('0x75')](_0x5b553e,_0x392a8f['basename']);return _0x1f5019[_0x2d76('0x76')](_0x590340);}})['catch'](handleError(_0x1f5019,null));};exports[_0x2d76('0x77')]=function(_0x13ddac,_0x9ce99){var _0x562c4d=null;var _0x31015f=null;var _0x48103d=null;if(_0x13ddac[_0x2d76('0x30')]['id']){delete _0x13ddac[_0x2d76('0x30')]['id'];}if(_0x13ddac[_0x2d76('0x30')][_0x2d76('0x78')]){_0x48103d=path['join'](config[_0x2d76('0x79')],_0x2d76('0x7a'),util[_0x2d76('0x7b')](_0x2d76('0x7c'),Date[_0x2d76('0x7d')]()));_0x13ddac[_0x2d76('0x30')][_0x2d76('0x7e')]=_0x48103d;}return db[_0x2d76('0x3f')][_0x2d76('0x4a')]({'where':{'id':_0x13ddac[_0x2d76('0x4b')]['id']},'include':[{'model':db[_0x2d76('0x5e')],'as':_0x2d76('0x7f'),'include':[{'model':db[_0x2d76('0x80')],'as':'User'}]}]})[_0x2d76('0x15')](handleEntityNotFound(_0x9ce99,null))['then'](saveUpdates(_0x13ddac[_0x2d76('0x30')],null))['then'](function(_0x3b7b24){if(_0x3b7b24){_0x562c4d=_0x3b7b24;return db['ChatWebsite'][_0x2d76('0x4a')]({'where':{'id':_0x562c4d['ChatWebsiteId']}});}})[_0x2d76('0x15')](function(_0x5c2efb){if(_0x5c2efb){_0x31015f=_0x5c2efb;return db[_0x2d76('0x61')][_0x2d76('0x4a')]({'where':{'id':_0x562c4d[_0x2d76('0x81')]}});}})['then'](function(_0x4cf3bc){if(_0x4cf3bc){if(_0x48103d){var _0x4fa6fd=null;for(var _0x1255dd=0x1;_0x1255dd<_0x562c4d[_0x2d76('0x7f')][_0x2d76('0x45')];++_0x1255dd){_0x4fa6fd=_0x562c4d[_0x2d76('0x7f')][_0x1255dd];var _0x2c6f47=_0x4fa6fd['UserId']?util[_0x2d76('0x7b')](_0x2d76('0x82'),_0x31015f[_0x2d76('0x83')],_0x4fa6fd['UserId']):'System';var _0x4ad94b=_0x13ddac['body'][_0x2d76('0x84')]||util['format'](_0x2d76('0x82'),'Visitor',_0x4fa6fd[_0x2d76('0x81')]);switch(_0x31015f['agentIdentifier']){case _0x2d76('0x85'):_0x2c6f47=_0x4fa6fd['UserId']?util['format'](_0x2d76('0x82'),_0x31015f[_0x2d76('0x83')],_0x4fa6fd['UserId']):'System';break;case _0x2d76('0x86'):_0x2c6f47=_0x4fa6fd['UserId']?_0x4fa6fd[_0x2d76('0x80')]['alias']||_0x4fa6fd[_0x2d76('0x80')][_0x2d76('0x53')]:'System';break;case _0x2d76('0x87'):_0x2c6f47=_0x4fa6fd[_0x2d76('0x66')]?_0x4fa6fd[_0x2d76('0x80')][_0x2d76('0x53')]:'System';break;default:_0x2c6f47=_0x4fa6fd[_0x2d76('0x66')]?util['format'](_0x2d76('0x82'),_0x31015f['agentAlias'],_0x4fa6fd[_0x2d76('0x66')]):'System';}var _0x2bb942=util[_0x2d76('0x7b')](_0x2d76('0x88'),moment(_0x4fa6fd[_0x2d76('0x89')])[_0x2d76('0x7b')](_0x2d76('0x8a')),_0x4fa6fd[_0x2d76('0x8b')]==='in'?_0x4ad94b:_0x2c6f47,_0x4fa6fd[_0x2d76('0x30')]);if(!_0x4fa6fd[_0x2d76('0x8c')]){fs['appendFileSync'](_0x48103d,_0x2bb942);}}return db[_0x2d76('0x8d')][_0x2d76('0x4e')]({'where':{'service':!![]},'include':[{'model':db[_0x2d76('0x8e')],'as':_0x2d76('0x8f'),'raw':!![],'include':[{'model':db[_0x2d76('0x90')],'as':_0x2d76('0x90'),'raw':!![]}]}]});}}})[_0x2d76('0x15')](function(_0x359721){if(!_0x359721||!_0x359721[_0x2d76('0x8f')]||!_0x13ddac[_0x2d76('0x30')])return _0x562c4d;var _0x531e31=_0x359721['getSmtpOptions']();return respondWithRpcPromise(_0x2d76('0x91'),_0x2d76('0x92'),{'account':_0x531e31,'message':{'from':util[_0x2d76('0x7b')]('\x22%s\x22\x20<%s>',_0x359721[_0x2d76('0x2c')],_0x359721[_0x2d76('0x54')]||_0x359721[_0x2d76('0x8f')][_0x2d76('0x3c')]),'to':_0x13ddac[_0x2d76('0x30')][_0x2d76('0x78')],'subject':_0x2d76('0x93'),'text':util[_0x2d76('0x7b')]('Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a',_0x13ddac['body']['mailTranscript']),'attachments':[{'path':_0x48103d}]}})[_0x2d76('0x15')](function(){return _0x562c4d;})['catch'](function(_0x56f272){logger['error'](_0x56f272);});})[_0x2d76('0x15')](respondWithStatusCode(_0x9ce99,0xc8))['catch'](handleError(_0x9ce99,null));};exports[_0x2d76('0x94')]=function(_0x577af6,_0x5a864b){return db['ChatMessage'][_0x2d76('0x4a')]({'where':{'id':_0x577af6['params']['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0x5a864b,null))[_0x2d76('0x15')](function(_0x47dc74){if(_0x47dc74){return _0x47dc74[_0x2d76('0x94')](_0x577af6[_0x2d76('0x30')][_0x2d76('0x95')],_[_0x2d76('0x96')](_0x577af6[_0x2d76('0x30')],[_0x2d76('0x95'),'id'])||{});}})[_0x2d76('0x15')](respondWithResult(_0x5a864b,null))[_0x2d76('0x1f')](handleError(_0x5a864b,null));};exports[_0x2d76('0x97')]=function(_0x1c664d,_0xd98011){var _0x456894={'raw':![],'where':{}};var _0x18eb1f={};var _0x987363={'count':0x0,'rows':[]};return db[_0x2d76('0x3f')][_0x2d76('0x4e')]({'where':{'id':_0x1c664d['params']['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0xd98011,null))[_0x2d76('0x15')](function(_0x2dff98){if(_0x2dff98){_0x18eb1f[_0x2d76('0x42')]=_[_0x2d76('0x3e')](db[_0x2d76('0x5e')][_0x2d76('0x36')]);_0x18eb1f['query']=_[_0x2d76('0x3e')](_0x1c664d[_0x2d76('0x3b')]);_0x18eb1f[_0x2d76('0x40')]=_[_0x2d76('0x41')](_0x18eb1f[_0x2d76('0x42')],_0x18eb1f[_0x2d76('0x3b')]);_0x456894[_0x2d76('0x43')]=_[_0x2d76('0x41')](_0x18eb1f[_0x2d76('0x42')],qs[_0x2d76('0x44')](_0x1c664d[_0x2d76('0x3b')]['fields']));_0x456894[_0x2d76('0x43')]=_0x456894['attributes'][_0x2d76('0x45')]?_0x456894['attributes']:_0x18eb1f[_0x2d76('0x42')];if(!_0x1c664d['query'][_0x2d76('0x98')](_0x2d76('0x99'))){_0x456894['limit']=qs[_0x2d76('0x25')](_0x1c664d[_0x2d76('0x3b')]['limit']);_0x456894[_0x2d76('0x24')]=qs['offset'](_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x24')]);}_0x456894[_0x2d76('0x9a')]=qs['sort'](_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x9b')]);_0x456894[_0x2d76('0x9c')]=qs['filters'](_[_0x2d76('0x9d')](_0x1c664d['query'],_0x18eb1f[_0x2d76('0x40')]));_0x456894[_0x2d76('0x9c')]['ChatInteractionId']=_0x2dff98['id'];if(_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x9e')]){_0x456894['where']=_['merge'](_0x456894['where'],{'$or':_[_0x2d76('0x35')](_0x456894[_0x2d76('0x43')],function(_0x18c846){var _0xe1a121={};_0xe1a121[_0x18c846]={'$like':'%'+_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x9e')]+'%'};return _0xe1a121;})});}if(_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x9f')]){var _0x38c5fd=_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x9f')][_0x2d76('0xa0')](',');var _0x216df3={};_0x216df3[_0x38c5fd[0x0]]={'$gte':moment(_0x38c5fd[0x1])[_0x2d76('0x7b')](_0x2d76('0xa1'))};_0x456894[_0x2d76('0x9c')]=_[_0x2d76('0x2f')](_0x456894[_0x2d76('0x9c')],_0x216df3);}_0x456894=_[_0x2d76('0x2f')]({},_0x456894,_0x1c664d[_0x2d76('0x48')]);return db[_0x2d76('0x5e')][_0x2d76('0x26')]({'where':_0x456894[_0x2d76('0x9c')]})[_0x2d76('0x15')](function(_0x1969e5){_0x987363[_0x2d76('0x26')]=_0x1969e5;if(_0x1c664d[_0x2d76('0x3b')][_0x2d76('0x46')]){_0x456894[_0x2d76('0x47')]=[{'all':!![]}];}return db[_0x2d76('0x5e')][_0x2d76('0x3a')](_0x456894);})[_0x2d76('0x15')](function(_0x5d68c8){_0x987363[_0x2d76('0xa2')]=_0x5d68c8;return _0x987363;});}})['then'](respondWithFilteredResult(_0xd98011,_0x456894))['catch'](handleError(_0xd98011,null));};exports[_0x2d76('0xa3')]=function(_0x5582d8,_0x33b431){var _0x32fdd0={'where':{}},_0x34f062={},_0x669b8c={'count':0x0,'rows':[]};return db[_0x2d76('0x3f')][_0x2d76('0x4e')]({'where':{'id':_0x5582d8['params']['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0x33b431,null))[_0x2d76('0x15')](function(_0x5e7bb5){if(_0x5e7bb5){_0x34f062[_0x2d76('0x42')]=_[_0x2d76('0x3e')](db[_0x2d76('0x5e')][_0x2d76('0x36')]);_0x34f062['query']=_['keys'](_0x5582d8[_0x2d76('0x3b')]);_0x34f062[_0x2d76('0x40')]=_[_0x2d76('0x41')](_0x34f062[_0x2d76('0x42')],_0x34f062[_0x2d76('0x3b')]);_0x32fdd0['attributes']=_[_0x2d76('0x41')](_0x34f062[_0x2d76('0x42')],qs[_0x2d76('0x44')](_0x5582d8['query'][_0x2d76('0x44')]));_0x32fdd0[_0x2d76('0x43')]=_0x32fdd0[_0x2d76('0x43')][_0x2d76('0x45')]?_0x32fdd0['attributes']:_0x34f062[_0x2d76('0x42')];if(!_0x5582d8[_0x2d76('0x3b')][_0x2d76('0x98')](_0x2d76('0x99'))){_0x32fdd0[_0x2d76('0x25')]=qs[_0x2d76('0x25')](_0x5582d8[_0x2d76('0x3b')][_0x2d76('0x25')]);_0x32fdd0[_0x2d76('0x24')]=qs[_0x2d76('0x24')](_0x5582d8[_0x2d76('0x3b')]['offset']);}_0x32fdd0['order']=qs['sort'](_0x5582d8[_0x2d76('0x3b')][_0x2d76('0x9b')]);_0x32fdd0['where']=qs[_0x2d76('0x40')](_[_0x2d76('0x9d')](_0x5582d8[_0x2d76('0x3b')],_0x34f062[_0x2d76('0x40')]));_0x32fdd0[_0x2d76('0x9c')]['ChatInteractionId']=_0x5e7bb5['id'];if(_0x5582d8[_0x2d76('0x3b')]['filter']){_0x32fdd0[_0x2d76('0x9c')]=_[_0x2d76('0x2f')](_0x32fdd0[_0x2d76('0x9c')],{'$or':_[_0x2d76('0x35')](_0x32fdd0['attributes'],function(_0x33a1a5){var _0x27e791={};_0x27e791[_0x33a1a5]={'$like':'%'+_0x5582d8[_0x2d76('0x3b')]['filter']+'%'};return _0x27e791;})});}_0x32fdd0[_0x2d76('0x9c')][_0x2d76('0x8c')]=![];if(_0x5582d8[_0x2d76('0x3b')]['id']){_0x32fdd0[_0x2d76('0x9c')]['id']={'$gt':_0x5582d8[_0x2d76('0x3b')]['id']};}_0x32fdd0=_[_0x2d76('0x2f')]({},_0x32fdd0,_0x5582d8[_0x2d76('0x48')]);return db[_0x2d76('0x5e')][_0x2d76('0x26')]({'where':_0x32fdd0[_0x2d76('0x9c')]})['then'](function(_0x82f306){_0x669b8c[_0x2d76('0x26')]=_0x82f306;_0x32fdd0[_0x2d76('0x47')]=[];if(_0x5582d8['query']['includeAgent']){_0x32fdd0[_0x2d76('0x47')][_0x2d76('0xa4')]({'model':db[_0x2d76('0x80')],'as':_0x2d76('0x80'),'attributes':['id',_0x2d76('0x53'),_0x2d76('0xa5')]});}if(_0x5582d8['query']['includeAll']){_0x32fdd0['include']=[{'all':!![]}];}return db[_0x2d76('0x5e')][_0x2d76('0x3a')](_0x32fdd0);})['then'](function(_0x206879){_0x669b8c[_0x2d76('0xa2')]=_0x206879;return _0x669b8c;});}})[_0x2d76('0x15')](respondWithFilteredResult(_0x33b431,_0x32fdd0))[_0x2d76('0x1f')](handleError(_0x33b431,null));};exports[_0x2d76('0xa6')]=function(_0x3dd41c,_0x4e32ee){return db['ChatInteraction'][_0x2d76('0x4a')]({'where':{'id':_0x3dd41c[_0x2d76('0x4b')]['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0x4e32ee,null))[_0x2d76('0x15')](function(_0xa7cb56){if(_0xa7cb56){return _0xa7cb56[_0x2d76('0xa7')](_0x3dd41c[_0x2d76('0x30')][_0x2d76('0x95')],_['omit'](_0x3dd41c[_0x2d76('0x30')],[_0x2d76('0x95'),'id'])||{})[_0x2d76('0xa8')](function(){return db['Tag']['findAll']({'attributes':['id',_0x2d76('0x2c'),_0x2d76('0xa9')],'where':{'id':_0x3dd41c[_0x2d76('0x30')][_0x2d76('0x95')]}});})[_0x2d76('0x15')](function(_0x4019af){socket['emit'](_0x2d76('0xaa'),{'id':Number(_0x3dd41c['params']['id']),'tags':_0x4019af||[]});return{'id':Number(_0x3dd41c[_0x2d76('0x4b')]['id']),'tags':_0x4019af||[]};});}})[_0x2d76('0x15')](respondWithResult(_0x4e32ee,null))[_0x2d76('0x1f')](handleError(_0x4e32ee,null));};exports['removeTags']=function(_0x1b6f1d,_0x2143fb){return db[_0x2d76('0x3f')][_0x2d76('0x4a')]({'where':{'id':_0x1b6f1d[_0x2d76('0x4b')]['id']}})[_0x2d76('0x15')](handleEntityNotFound(_0x2143fb,null))[_0x2d76('0x15')](function(_0x555f9e){if(_0x555f9e){return _0x555f9e[_0x2d76('0xab')](_0x1b6f1d[_0x2d76('0x3b')]['ids']);}})[_0x2d76('0x15')](respondWithStatusCode(_0x2143fb,null))['catch'](handleError(_0x2143fb,null));};exports[_0x2d76('0x76')]=function(_0x1c9f70,_0x22ff76){var _0x1ed890=moment()['unix']()[_0x2d76('0xac')]();var _0x9142d4=path[_0x2d76('0x75')](config['root'],_0x2d76('0xad'),'files',_0x2d76('0xae'));var _0x2439ca=path['join'](config[_0x2d76('0x79')],_0x2d76('0xad'),'files',_0x2d76('0xaf'));var _0x57952=path['join'](_0x9142d4,_0x1ed890);var _0x247fec=util[_0x2d76('0x7b')]('transcript-%d-%s.zip',_0x1c9f70[_0x2d76('0x4b')]['id'],_0x1ed890);var _0x3d35d8=path['join'](_0x9142d4,_0x247fec);var _0x5889ab=[];_0x5889ab[_0x2d76('0xa4')]({'model':db[_0x2d76('0x80')],'as':_0x2d76('0x80'),'attributes':['id',_0x2d76('0x53')],'raw':!![]});_0x5889ab[_0x2d76('0xa4')]({'model':db[_0x2d76('0x61')],'as':_0x2d76('0x62'),'attributes':['id',_0x2d76('0xb0'),_0x2d76('0xb1')],'raw':!![]});if(_0x1c9f70[_0x2d76('0x3b')]['attachments']){_0x5889ab['push']({'model':db['Attachment'],'as':'Attachment','raw':!![]});}var _0x3d2542=[{'model':db[_0x2d76('0x5e')],'as':_0x2d76('0x7f'),'attributes':['id','body',_0x2d76('0x89'),_0x2d76('0x8b'),'secret',_0x2d76('0xb2')],'include':_0x5889ab}];_0x3d2542['push']({'model':db[_0x2d76('0xb3')],'as':'Account','attributes':['id',_0x2d76('0x2c')]});_0x3d2542[_0x2d76('0xa4')]({'model':db[_0x2d76('0x80')],'as':_0x2d76('0xb4'),'attributes':['id','fullname']});return db[_0x2d76('0x3f')][_0x2d76('0x4a')]({'where':{'id':_0x1c9f70[_0x2d76('0x4b')]['id']},'include':_0x3d2542})[_0x2d76('0x15')](handleEntityNotFound(_0x22ff76,null))[_0x2d76('0x15')](function(_0x2f3fab){if(_0x2f3fab){var _0x3af6b=_0x2f3fab[_0x2d76('0xb5')]({'plain':!![]});fs[_0x2d76('0xb6')](_0x57952);var _0x5822f2={'channel':'Chat','account':_0x3af6b[_0x2d76('0xb7')][_0x2d76('0x2c')],'agent':_0x3af6b[_0x2d76('0xb4')]?_0x3af6b[_0x2d76('0xb4')]['fullname']:_0x2d76('0xb8'),'createdAt':moment(_0x3af6b['createdAt'])[_0x2d76('0x7b')](_0x2d76('0xa1'))[_0x2d76('0xac')](),'closedAt':_0x3af6b[_0x2d76('0x68')]?moment(_0x3af6b['closedAt'])[_0x2d76('0x7b')](_0x2d76('0xa1'))[_0x2d76('0xac')]():'','disposition':_0x3af6b[_0x2d76('0x69')],'chatInfo':{'browser':_0x3af6b[_0x2d76('0xb9')],'os':_0x3af6b['osName'],'referer':_0x3af6b[_0x2d76('0xba')],'customerIp':_0x3af6b[_0x2d76('0xbb')],'customerPort':_0x3af6b[_0x2d76('0xbc')]?_0x3af6b['customerPort']:'N.A.'},'messages':_(_0x3af6b[_0x2d76('0x7f')])[_0x2d76('0xbd')]()[_0x2d76('0x9e')]({'secret':![]})['map'](function(_0x5d5c44){if(_0x5d5c44[_0x2d76('0x70')]){var _0x119cd0=path[_0x2d76('0x75')](_0x2439ca,_0x5d5c44['Attachment'][_0x2d76('0xbe')]);if(fs[_0x2d76('0xbf')](_0x119cd0)){fs[_0x2d76('0xc0')](_0x119cd0)['pipe'](fs[_0x2d76('0xc1')](path[_0x2d76('0x75')](_0x57952,_0x5d5c44[_0x2d76('0x70')]['basename'])));}}return{'date':moment(_0x5d5c44[_0x2d76('0x89')])[_0x2d76('0x7b')](_0x2d76('0xa1'))[_0x2d76('0xac')](),'sender':_0x5d5c44[_0x2d76('0x8b')]===_0x2d76('0x5d')?_0x5d5c44[_0x2d76('0x80')]?_0x5d5c44[_0x2d76('0x80')]['fullname']:_0x2d76('0xc2'):_0x5d5c44[_0x2d76('0x62')][_0x2d76('0xb0')]+(_0x5d5c44[_0x2d76('0x62')]['lastName']?'\x20'+_0x5d5c44[_0x2d76('0x62')][_0x2d76('0xb1')]:''),'body':_0x5d5c44[_0x2d76('0x70')]?_0x5d5c44['Attachment']['basename']:_0x5d5c44['body'],'direction':_0x5d5c44[_0x2d76('0x8b')]===_0x2d76('0x5d')?'A':'C','secret':_0x5d5c44[_0x2d76('0x8c')],'read':_0x5d5c44[_0x2d76('0xb2')],'attachment':_0x5d5c44[_0x2d76('0x70')]};})[_0x2d76('0xc3')]()};return ejs['renderFile'](path[_0x2d76('0x75')](config['root'],_0x2d76('0xad'),_0x2d76('0xc4'),_0x2d76('0xc5')),{'interaction':_0x5822f2})[_0x2d76('0x15')](function(_0x4fdfa9){var _0x315e74=path[_0x2d76('0x75')](_0x57952,_0x2d76('0xc6')+_0x3af6b['id']+'-'+_0x1ed890+_0x2d76('0xc7'));var _0x489167={'path':_0x315e74,'channel':_0x2d76('0xc8'),'interactionId':_0x3af6b['id']};return pdf['createPdfFromHTML'](_0x4fdfa9,_0x489167);})[_0x2d76('0x15')](function(){return new Promise(function(_0x6d7cc8,_0x554d68){zipdir(_0x57952,{'saveTo':_0x3d35d8},function(_0x280b57,_0x1e6225){if(_0x280b57)return _0x554d68(_0x280b57);return _0x6d7cc8(_0x1e6225);});})['then'](function(){return new BPromise(function(_0xa3d2d3,_0x467dc7){rimraf(_0x57952,function(_0xfd4f82){if(_0xfd4f82)_0x467dc7(_0xfd4f82);return _0xa3d2d3();});});})[_0x2d76('0x15')](function(){return _0x22ff76[_0x2d76('0x76')](_0x3d35d8,_0x247fec,function(_0x14a75d){if(_0x14a75d){logger[_0x2d76('0x1b')](_0x2d76('0xc9'),_0x14a75d);}else{fs[_0x2d76('0xca')](_0x3d35d8);}});});});}else{return _0x22ff76[_0x2d76('0x20')](0xc8);}})[_0x2d76('0x1f')](handleError(_0x22ff76,null));};
\ No newline at end of file
+var _0xb19f=['CloudProvider','Smtp','getSmtpOptions','SendMail','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','length','order','sort','where','pick','filter','$gte','split','findAll','rows','getMyMessages','nolimit','ChatInteractionId','includeAgent','push','addTags','omit','spread','Tag','color','emit','chatInteractionTags:save','removeTags','download','unix','toString','server','files','tmp','attachments','Contact','firstName','lastName','read','Account','Owner','mkdirSync','Chat','YYYY-MM-DD\x20HH:mm:ss','osName','referer','customerIp','customerPort','N.A.','existsSync','createReadStream','pipe','createWriteStream','renderFile','downloadInteraction.ejs','unlinkSync','request-promise','bluebird','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','api','../../config/environment','../../mysqldb','defaults','redis','./chatInteraction.socket','register','jayson/promise','http','request','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','status','json','offset','limit','undefined','count','set','Content-Range','update','end','sendStatus','stack','name','send','body','contact','agent','interaction','index','map','rawAttributes','type','key','getOptions','query','catch','show','params','model','ChatInteraction','keys','filters','intersection','attributes','fields','includeAll','include','merge','options','find','create','describe','createVidaooSession','findOne','vidaooEscalation','vidaooTopic','vidaooNote','vidaooMetadata','user','email','account','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooApiKey','isNull','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','out','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','CmContact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','Interaction\x20already\x20assigned','closed','disposition','AbandonInteraction','attachmentUpload','basename','file','filename','mimetype','Attachment','Unauthorized','attachId','ChatOfflineMessageId','join','root','offline-chat/','close','mailTranscript','server/files/chat/upload/','format','now','Messages','User','ChatWebsite','ChatWebsiteId','UserId','%s%d','System','customer','Visitor','ContactId','agentIdentifier','agentAlias','alias','fullname','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailAccount'];(function(_0x22b98c,_0x3cc5dc){var _0x5e846e=function(_0x265144){while(--_0x265144){_0x22b98c['push'](_0x22b98c['shift']());}};_0x5e846e(++_0x3cc5dc);}(_0xb19f,0x1c5));var _0xfb19=function(_0x4db537,_0x53a37b){_0x4db537=_0x4db537-0x0;var _0x25d062=_0xb19f[_0x4db537];return _0x25d062;};'use strict';var rimraf=require('rimraf');var zipdir=require('zip-dir');var rp=require(_0xfb19('0x0'));var moment=require('moment');var BPromise=require(_0xfb19('0x1'));var Mustache=require('mustache');var util=require('util');var path=require(_0xfb19('0x2'));var ejs=require(_0xfb19('0x3'));var fs=require('fs');var _=require(_0xfb19('0x4'));var Redis=require(_0xfb19('0x5'));var interaction=require(_0xfb19('0x6'));var qs=require(_0xfb19('0x7'));var pdf=require(_0xfb19('0x8'));var logger=require('../../config/logger')(_0xfb19('0x9'));var config=require(_0xfb19('0xa'));var db=require(_0xfb19('0xb'))['db'];config['redis']=_[_0xfb19('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xfb19('0xd')]));require(_0xfb19('0xe'))[_0xfb19('0xf')](socket);var jayson=require(_0xfb19('0x10'));var client=jayson['client'][_0xfb19('0x11')]({'port':0x232b});var client9004=jayson['client'][_0xfb19('0x11')]({'port':0x232c});function respondWithRpcPromise(_0x328e08,_0x113e00,_0x461139,_0x1199ce){return new BPromise(function(_0x47428c,_0x326cfa){var _0x1ad65a=_0x1199ce||client;return _0x1ad65a[_0xfb19('0x12')](_0x328e08,_0x461139)[_0xfb19('0x13')](function(_0x3c2876){logger[_0xfb19('0x14')](_0xfb19('0x15'),_0x113e00,_0xfb19('0x16'));logger['debug'](_0xfb19('0x17'),_0x113e00,_0xfb19('0x16'),JSON[_0xfb19('0x18')](_0x3c2876));if(_0x3c2876['error']){if(_0x3c2876['error'][_0xfb19('0x19')]===0x1f4){logger[_0xfb19('0x1a')](_0xfb19('0x15'),_0x113e00,_0x3c2876[_0xfb19('0x1a')][_0xfb19('0x1b')]);return _0x326cfa(_0x3c2876[_0xfb19('0x1a')][_0xfb19('0x1b')]);}logger[_0xfb19('0x1a')](_0xfb19('0x15'),_0x113e00,_0x3c2876[_0xfb19('0x1a')][_0xfb19('0x1b')]);return _0x47428c(_0x3c2876['error'][_0xfb19('0x1b')]);}else{logger[_0xfb19('0x14')](_0xfb19('0x15'),_0x113e00,'request\x20sent');_0x47428c(_0x3c2876[_0xfb19('0x1c')]['message']);}})['catch'](function(_0xc39524){logger[_0xfb19('0x1a')]('ChatInteraction,\x20%s,\x20%s',_0x113e00,_0xc39524);_0x326cfa(_0xc39524);});});}function respondWithStatusCode(_0x144594,_0x529ac8){_0x529ac8=_0x529ac8||0xcc;return function(_0x45eb95){if(_0x45eb95){return _0x144594['sendStatus'](_0x529ac8);}return _0x144594[_0xfb19('0x1d')](_0x529ac8)['end']();};}function respondWithResult(_0x487c35,_0x53f479){_0x53f479=_0x53f479||0xc8;return function(_0xecf033){if(_0xecf033){return _0x487c35[_0xfb19('0x1d')](_0x53f479)[_0xfb19('0x1e')](_0xecf033);}};}function respondWithFilteredResult(_0x151357,_0x4854cc){return function(_0x21c144){if(_0x21c144){var _0x5538bf=typeof _0x4854cc[_0xfb19('0x1f')]==='undefined'&&typeof _0x4854cc[_0xfb19('0x20')]===_0xfb19('0x21');var _0x3b853b=_0x21c144[_0xfb19('0x22')];var _0x45040f=_0x5538bf?0x0:_0x4854cc[_0xfb19('0x1f')];var _0x305cbf=_0x5538bf?_0x21c144['count']:_0x4854cc[_0xfb19('0x1f')]+_0x4854cc[_0xfb19('0x20')];var _0xa41126;if(_0x305cbf>=_0x3b853b){_0x305cbf=_0x3b853b;_0xa41126=0xc8;}else{_0xa41126=0xce;}_0x151357[_0xfb19('0x1d')](_0xa41126);return _0x151357[_0xfb19('0x23')](_0xfb19('0x24'),_0x45040f+'-'+_0x305cbf+'/'+_0x3b853b)['json'](_0x21c144);}return null;};}function saveUpdates(_0x1d105c){return function(_0x1ce5e7){if(_0x1ce5e7){return _0x1ce5e7[_0xfb19('0x25')](_0x1d105c)['then'](function(_0x4cc93d){return _0x4cc93d;});}return null;};}function removeEntity(_0x2b185){return function(_0x434094){if(_0x434094){return _0x434094['destroy']()['then'](function(){_0x2b185['status'](0xcc)[_0xfb19('0x26')]();});}};}function handleEntityNotFound(_0x278091){return function(_0x1c1ea3){if(!_0x1c1ea3){_0x278091[_0xfb19('0x27')](0x194);}return _0x1c1ea3;};}function handleError(_0x1dba41,_0xa5254b){_0xa5254b=_0xa5254b||0x1f4;return function(_0x13ac1f){logger['error'](_0x13ac1f[_0xfb19('0x28')]);if(_0x13ac1f['name']){delete _0x13ac1f[_0xfb19('0x29')];}_0x1dba41[_0xfb19('0x1d')](_0xa5254b)[_0xfb19('0x2a')](_0x13ac1f);};}function getMustacheRender(_0x4f054f,_0xfc5ede){return Mustache['render'](_0x4f054f,_['merge'](_0xfc5ede[_0xfb19('0x2b')],{'contact':_0xfc5ede[_0xfb19('0x2c')],'message':_0xfc5ede[_0xfb19('0x1b')],'agent':_0xfc5ede[_0xfb19('0x2d')],'interaction':_0xfc5ede[_0xfb19('0x2e')],'account':_0xfc5ede['account']}))||'';}exports[_0xfb19('0x2f')]=function(_0x3bd7e0,_0x3fcfdc){var _0x32b060={};var _0x41e754=_[_0xfb19('0x30')](db['ChatInteraction'][_0xfb19('0x31')],function(_0x43529f){return{'name':_0x43529f['fieldName'],'type':_0x43529f[_0xfb19('0x32')][_0xfb19('0x33')]};});_0x32b060=qs[_0xfb19('0x34')](_0x41e754,_0x3bd7e0);return interaction['findAll']('chat',_0x3bd7e0[_0xfb19('0x35')],_0x3bd7e0['user'],_0x32b060,_0x41e754)[_0xfb19('0x13')](respondWithFilteredResult(_0x3fcfdc,_0x32b060))[_0xfb19('0x36')](handleError(_0x3fcfdc,null));};exports[_0xfb19('0x37')]=function(_0x1dc8dc,_0x957f09){var _0x32e662={'raw':![],'where':{'id':_0x1dc8dc[_0xfb19('0x38')]['id']}},_0x41541b={};_0x41541b[_0xfb19('0x39')]=_['keys'](db[_0xfb19('0x3a')]['rawAttributes']);_0x41541b[_0xfb19('0x35')]=_[_0xfb19('0x3b')](_0x1dc8dc[_0xfb19('0x35')]);_0x41541b[_0xfb19('0x3c')]=_[_0xfb19('0x3d')](_0x41541b[_0xfb19('0x39')],_0x41541b[_0xfb19('0x35')]);_0x32e662[_0xfb19('0x3e')]=_[_0xfb19('0x3d')](_0x41541b['model'],qs[_0xfb19('0x3f')](_0x1dc8dc[_0xfb19('0x35')][_0xfb19('0x3f')]));_0x32e662[_0xfb19('0x3e')]=_0x32e662[_0xfb19('0x3e')]['length']?_0x32e662[_0xfb19('0x3e')]:_0x41541b[_0xfb19('0x39')];if(_0x1dc8dc[_0xfb19('0x35')][_0xfb19('0x40')]){_0x32e662[_0xfb19('0x41')]=[{'all':!![]}];}_0x32e662=_[_0xfb19('0x42')]({},_0x32e662,_0x1dc8dc[_0xfb19('0x43')]);return db[_0xfb19('0x3a')][_0xfb19('0x44')](_0x32e662)[_0xfb19('0x13')](handleEntityNotFound(_0x957f09,null))[_0xfb19('0x13')](respondWithResult(_0x957f09,null))[_0xfb19('0x36')](handleError(_0x957f09,null));};exports[_0xfb19('0x45')]=function(_0x54f62b,_0x5cbf3b){return db[_0xfb19('0x3a')]['create'](_0x54f62b[_0xfb19('0x2b')],{})['then'](respondWithResult(_0x5cbf3b,0xc9))['catch'](handleError(_0x5cbf3b,null));};exports[_0xfb19('0x25')]=function(_0x5d77d2,_0x559bfd){if(_0x5d77d2[_0xfb19('0x2b')]['id']){delete _0x5d77d2[_0xfb19('0x2b')]['id'];}return db[_0xfb19('0x3a')]['find']({'where':{'id':_0x5d77d2[_0xfb19('0x38')]['id']}})['then'](handleEntityNotFound(_0x559bfd,null))['then'](saveUpdates(_0x5d77d2[_0xfb19('0x2b')],null))[_0xfb19('0x13')](respondWithResult(_0x559bfd,null))['catch'](handleError(_0x559bfd,null));};exports['destroy']=function(_0x3df4fc,_0x1816da){return db['ChatInteraction'][_0xfb19('0x44')]({'where':{'id':_0x3df4fc[_0xfb19('0x38')]['id']}})['then'](handleEntityNotFound(_0x1816da,null))[_0xfb19('0x13')](removeEntity(_0x1816da,null))['catch'](handleError(_0x1816da,null));};exports['describe']=function(_0x556822,_0x1c2714){return db[_0xfb19('0x3a')][_0xfb19('0x46')]()[_0xfb19('0x13')](respondWithResult(_0x1c2714,null))[_0xfb19('0x36')](handleError(_0x1c2714,null));};exports[_0xfb19('0x47')]=function(_0x45754a,_0x2e9a6e){var _0x42bbba=_0x45754a[_0xfb19('0x38')]['id'];var _0x44843f;var _0x15fa58;var _0x24613a;return db[_0xfb19('0x3a')][_0xfb19('0x48')]({'where':{'id':_0x42bbba}})[_0xfb19('0x13')](function(_0x4c4da5){_0x44843f=_0x4c4da5;return db['ChatWebsite'][_0xfb19('0x48')]({'where':{'id':_0x4c4da5['ChatWebsiteId']},'attributes':['id','vidaooApiKey',_0xfb19('0x49'),_0xfb19('0x4a'),_0xfb19('0x4b'),_0xfb19('0x4c')],'raw':!![]});})[_0xfb19('0x13')](function(_0xff539c){if(_0xff539c&&_0xff539c['vidaooApiKey']&&_0xff539c[_0xfb19('0x49')]){_0x15fa58=_0xff539c;var _0x2d3056={'interaction':{'id':_0x42bbba},'agent':{'id':_0x45754a['user']['id'],'name':_0x45754a['user']['name'],'fullname':_0x45754a['user']['fullname'],'email':_0x45754a[_0xfb19('0x4d')][_0xfb19('0x4e')]},'contact':_0x45754a[_0xfb19('0x2b')][_0xfb19('0x2c')],'account':_0x45754a['body'][_0xfb19('0x4f')]};var _0x18a648={'rejectUnauthorized':![],'method':'POST','url':_0xfb19('0x50'),'headers':{'X-APIKEY':_0xff539c[_0xfb19('0x51')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x45754a[_0xfb19('0x4d')][_0xfb19('0x4e')]],'buttons':null,'topic':_0x15fa58[_0xfb19('0x4a')],'note':_[_0xfb19('0x52')](_0x15fa58['vidaooNote'])?null:getMustacheRender(_0x15fa58[_0xfb19('0x4b')],_0x2d3056),'metadata':null},'redirect':'follow','json':!![]};try{if(!_['isNull'](_0x15fa58['vidaooMetadata'])){var _0x416023=getMustacheRender(_0x15fa58[_0xfb19('0x4c')],_0x2d3056);var _0x44cfa5=JSON['parse'](_0x416023);_0x18a648[_0xfb19('0x2b')]['metadata']=_0x44cfa5;}}catch(_0x2c566b){throw new db[(_0xfb19('0x53'))][(_0xfb19('0x54'))](_0xfb19('0x55'));}return rp(_0x18a648);}else{throw new db[(_0xfb19('0x53'))]['ValidationError'](_0xfb19('0x56'));}})['then'](function(_0x4014a0){_0x24613a=_0x4014a0;if(_0x24613a['id']){var _0x998691={'body':_0x24613a['join_url'],'ChatWebsiteId':_0x15fa58['id'],'ChatInteractionId':_0x44843f['id'],'direction':_0xfb19('0x57'),'UserId':_0x45754a['user']['id']};return db[_0xfb19('0x58')][_0xfb19('0x45')](_0x998691,{});}else{throw new db[(_0xfb19('0x53'))][(_0xfb19('0x54'))](_0xfb19('0x59'));}})['then'](function(){return _0x44843f[_0xfb19('0x5a')]({'vidaooSessionId':_0x24613a['id']});})['then'](respondWithResult(_0x2e9a6e,null))[_0xfb19('0x36')](handleError(_0x2e9a6e,null));};exports['customUpdate']=function(_0x53ed15,_0x31a510){if(_0x53ed15[_0xfb19('0x2b')]['id']){delete _0x53ed15['body']['id'];}return db[_0xfb19('0x3a')][_0xfb19('0x44')]({'where':{'id':_0x53ed15[_0xfb19('0x38')]['id']},'include':[{'model':db[_0xfb19('0x5b')],'as':'Contact'}]})[_0xfb19('0x13')](handleEntityNotFound(_0x31a510,null))['then'](saveUpdates(_0x53ed15['body'],null))[_0xfb19('0x13')](respondWithResult(_0x31a510,null))[_0xfb19('0x36')](handleError(_0x31a510,null));};exports[_0xfb19('0x5c')]=function(_0x316a4c,_0x249dcb){if(_0x316a4c['body']['id']){delete _0x316a4c[_0xfb19('0x2b')]['id'];}return db[_0xfb19('0x3a')][_0xfb19('0x44')]({'where':{'id':_0x316a4c[_0xfb19('0x38')]['id']}})['then'](function(_0x2c73d0){if(!_0x2c73d0){logger[_0xfb19('0x1a')](_0xfb19('0x5d'),'abandon',0x194,_0xfb19('0x5e'));_0x249dcb[_0xfb19('0x27')](0x194);}else{if(_0x2c73d0['UserId']){throw new db[(_0xfb19('0x53'))][(_0xfb19('0x54'))](_0xfb19('0x5f'));}}return _0x2c73d0;})[_0xfb19('0x13')](function(_0x24be50){if(_0x24be50){return _0x24be50[_0xfb19('0x25')]({'closed':_0x316a4c[_0xfb19('0x2b')][_0xfb19('0x60')],'disposition':_0x316a4c['body'][_0xfb19('0x61')]})[_0xfb19('0x13')](function(_0x1ee62a){return _0x1ee62a;});}})['then'](function(){return respondWithRpcPromise(_0xfb19('0x62'),_0xfb19('0x5c'),_0x316a4c['body'],client9004);})[_0xfb19('0x13')](respondWithResult(_0x249dcb,null))[_0xfb19('0x36')](handleError(_0x249dcb,null));};exports[_0xfb19('0x63')]=function(_0x1752b1,_0x409a78){_0x1752b1[_0xfb19('0x2b')][_0xfb19('0x29')]=_0x1752b1['file']['originalname'];_0x1752b1[_0xfb19('0x2b')][_0xfb19('0x64')]=_0x1752b1[_0xfb19('0x65')][_0xfb19('0x66')];_0x1752b1[_0xfb19('0x2b')][_0xfb19('0x32')]=_0x1752b1['file'][_0xfb19('0x67')];return db[_0xfb19('0x68')][_0xfb19('0x45')](_0x1752b1[_0xfb19('0x2b')])['then'](respondWithResult(_0x409a78,0xc9))[_0xfb19('0x36')](handleError(_0x409a78,null));};exports['attachmentDownload']=function(_0x34f041,_0x2dcf3b){return db[_0xfb19('0x3a')][_0xfb19('0x48')]({'where':{'id':_0x34f041[_0xfb19('0x38')]['id']},'raw':!![]})[_0xfb19('0x13')](handleEntityNotFound(_0x2dcf3b,null))[_0xfb19('0x13')](function(_0x586d2f){if(_0x586d2f){if(_0x586d2f[_0xfb19('0x60')]){return _0x2dcf3b['status'](0x193)[_0xfb19('0x1e')]({'status':0x193,'message':_0xfb19('0x69')});}return db[_0xfb19('0x68')][_0xfb19('0x48')]({'where':{'id':_0x34f041['query'][_0xfb19('0x6a')]},'raw':!![]})[_0xfb19('0x13')](handleEntityNotFound(_0x2dcf3b,null));}})[_0xfb19('0x13')](function(_0x1dcdbd){if(_0x1dcdbd){var _0x271c08=_0x1dcdbd[_0xfb19('0x6b')]!==null;var _0x29078b=path[_0xfb19('0x6c')](config[_0xfb19('0x6d')],'server/files/attachments/');if(_0x271c08){_0x29078b=path[_0xfb19('0x6c')](_0x29078b,_0xfb19('0x6e'));}var _0x174ec5=path['join'](_0x29078b,_0x1dcdbd['basename']);return _0x2dcf3b['download'](_0x174ec5);}})[_0xfb19('0x36')](handleError(_0x2dcf3b,null));};exports[_0xfb19('0x6f')]=function(_0xfc3783,_0x68e73e){var _0x4b0c44=null;var _0x172dfe=null;var _0x2b0d4a=null;if(_0xfc3783[_0xfb19('0x2b')]['id']){delete _0xfc3783[_0xfb19('0x2b')]['id'];}if(_0xfc3783[_0xfb19('0x2b')][_0xfb19('0x70')]){_0x2b0d4a=path[_0xfb19('0x6c')](config[_0xfb19('0x6d')],_0xfb19('0x71'),util[_0xfb19('0x72')]('transcript-%s.txt',Date[_0xfb19('0x73')]()));_0xfc3783[_0xfb19('0x2b')]['pathTranscript']=_0x2b0d4a;}return db['ChatInteraction'][_0xfb19('0x44')]({'where':{'id':_0xfc3783[_0xfb19('0x38')]['id']},'include':[{'model':db[_0xfb19('0x58')],'as':_0xfb19('0x74'),'include':[{'model':db[_0xfb19('0x75')],'as':_0xfb19('0x75')}]}]})[_0xfb19('0x13')](handleEntityNotFound(_0x68e73e,null))['then'](saveUpdates(_0xfc3783[_0xfb19('0x2b')],null))['then'](function(_0x3999b4){if(_0x3999b4){_0x4b0c44=_0x3999b4;return db[_0xfb19('0x76')]['find']({'where':{'id':_0x4b0c44[_0xfb19('0x77')]}});}})[_0xfb19('0x13')](function(_0x5a25f3){if(_0x5a25f3){_0x172dfe=_0x5a25f3;return db[_0xfb19('0x5b')][_0xfb19('0x44')]({'where':{'id':_0x4b0c44['ContactId']}});}})['then'](function(_0x28d5dd){if(_0x28d5dd){if(_0x2b0d4a){var _0x295098=null;for(var _0x2ac085=0x1;_0x2ac085<_0x4b0c44[_0xfb19('0x74')]['length'];++_0x2ac085){_0x295098=_0x4b0c44['Messages'][_0x2ac085];var _0x1ae65d=_0x295098[_0xfb19('0x78')]?util[_0xfb19('0x72')](_0xfb19('0x79'),_0x172dfe['agentAlias'],_0x295098['UserId']):_0xfb19('0x7a');var _0x11f773=_0xfc3783['body'][_0xfb19('0x7b')]||util[_0xfb19('0x72')]('%s%d',_0xfb19('0x7c'),_0x295098[_0xfb19('0x7d')]);switch(_0x172dfe[_0xfb19('0x7e')]){case'website_alias':_0x1ae65d=_0x295098[_0xfb19('0x78')]?util[_0xfb19('0x72')](_0xfb19('0x79'),_0x172dfe[_0xfb19('0x7f')],_0x295098[_0xfb19('0x78')]):_0xfb19('0x7a');break;case'agent_alias':_0x1ae65d=_0x295098[_0xfb19('0x78')]?_0x295098[_0xfb19('0x75')][_0xfb19('0x80')]||_0x295098[_0xfb19('0x75')][_0xfb19('0x81')]:'System';break;case _0xfb19('0x82'):_0x1ae65d=_0x295098[_0xfb19('0x78')]?_0x295098[_0xfb19('0x75')][_0xfb19('0x81')]:_0xfb19('0x7a');break;default:_0x1ae65d=_0x295098[_0xfb19('0x78')]?util[_0xfb19('0x72')](_0xfb19('0x79'),_0x172dfe[_0xfb19('0x7f')],_0x295098['UserId']):'System';}var _0x437ef4=util[_0xfb19('0x72')](_0xfb19('0x83'),moment(_0x295098[_0xfb19('0x84')])[_0xfb19('0x72')](_0xfb19('0x85')),_0x295098[_0xfb19('0x86')]==='in'?_0x11f773:_0x1ae65d,_0x295098[_0xfb19('0x2b')]);if(!_0x295098[_0xfb19('0x87')]){fs[_0xfb19('0x88')](_0x2b0d4a,_0x437ef4);}}return db[_0xfb19('0x89')][_0xfb19('0x48')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':'Smtp','raw':!![],'include':[{'model':db[_0xfb19('0x8a')],'as':_0xfb19('0x8a'),'raw':!![]}]}]});}}})[_0xfb19('0x13')](function(_0x25cc36){if(!_0x25cc36||!_0x25cc36[_0xfb19('0x8b')]||!_0xfc3783['body'])return _0x4b0c44;var _0x6186b7=_0x25cc36[_0xfb19('0x8c')]();return respondWithRpcPromise(_0xfb19('0x8d'),'sendMail',{'account':_0x6186b7,'message':{'from':util['format']('\x22%s\x22\x20<%s>',_0x25cc36[_0xfb19('0x29')],_0x25cc36[_0xfb19('0x4e')]||_0x25cc36[_0xfb19('0x8b')][_0xfb19('0x4d')]),'to':_0xfc3783[_0xfb19('0x2b')][_0xfb19('0x70')],'subject':_0xfb19('0x8e'),'text':util['format'](_0xfb19('0x8f'),_0xfc3783[_0xfb19('0x2b')]['mailTranscript']),'attachments':[{'path':_0x2b0d4a}]}})[_0xfb19('0x13')](function(){return _0x4b0c44;})[_0xfb19('0x36')](function(_0x23cb5f){logger['error'](_0x23cb5f);});})[_0xfb19('0x13')](respondWithStatusCode(_0x68e73e,0xc8))[_0xfb19('0x36')](handleError(_0x68e73e,null));};exports[_0xfb19('0x90')]=function(_0x381a1b,_0x4713a5){return db[_0xfb19('0x58')]['find']({'where':{'id':_0x381a1b[_0xfb19('0x38')]['id']}})[_0xfb19('0x13')](handleEntityNotFound(_0x4713a5,null))[_0xfb19('0x13')](function(_0x715f9a){if(_0x715f9a){return _0x715f9a['addMessage'](_0x381a1b[_0xfb19('0x2b')][_0xfb19('0x91')],_['omit'](_0x381a1b[_0xfb19('0x2b')],[_0xfb19('0x91'),'id'])||{});}})[_0xfb19('0x13')](respondWithResult(_0x4713a5,null))[_0xfb19('0x36')](handleError(_0x4713a5,null));};exports['getMessages']=function(_0x44b176,_0x231055){var _0x3d9742={'raw':![],'where':{}};var _0x70a883={};var _0x59dc5a={'count':0x0,'rows':[]};return db['ChatInteraction'][_0xfb19('0x48')]({'where':{'id':_0x44b176['params']['id']}})[_0xfb19('0x13')](handleEntityNotFound(_0x231055,null))[_0xfb19('0x13')](function(_0x2ef259){if(_0x2ef259){_0x70a883[_0xfb19('0x39')]=_[_0xfb19('0x3b')](db[_0xfb19('0x58')][_0xfb19('0x31')]);_0x70a883['query']=_['keys'](_0x44b176['query']);_0x70a883['filters']=_[_0xfb19('0x3d')](_0x70a883['model'],_0x70a883[_0xfb19('0x35')]);_0x3d9742[_0xfb19('0x3e')]=_[_0xfb19('0x3d')](_0x70a883[_0xfb19('0x39')],qs['fields'](_0x44b176[_0xfb19('0x35')][_0xfb19('0x3f')]));_0x3d9742['attributes']=_0x3d9742[_0xfb19('0x3e')][_0xfb19('0x92')]?_0x3d9742['attributes']:_0x70a883['model'];if(!_0x44b176[_0xfb19('0x35')]['hasOwnProperty']('nolimit')){_0x3d9742[_0xfb19('0x20')]=qs[_0xfb19('0x20')](_0x44b176[_0xfb19('0x35')]['limit']);_0x3d9742['offset']=qs['offset'](_0x44b176[_0xfb19('0x35')][_0xfb19('0x1f')]);}_0x3d9742[_0xfb19('0x93')]=qs[_0xfb19('0x94')](_0x44b176[_0xfb19('0x35')][_0xfb19('0x94')]);_0x3d9742[_0xfb19('0x95')]=qs['filters'](_[_0xfb19('0x96')](_0x44b176['query'],_0x70a883[_0xfb19('0x3c')]));_0x3d9742[_0xfb19('0x95')]['ChatInteractionId']=_0x2ef259['id'];if(_0x44b176[_0xfb19('0x35')][_0xfb19('0x97')]){_0x3d9742[_0xfb19('0x95')]=_['merge'](_0x3d9742['where'],{'$or':_[_0xfb19('0x30')](_0x3d9742['attributes'],function(_0x2f98c9){var _0x552e42={};_0x552e42[_0x2f98c9]={'$like':'%'+_0x44b176[_0xfb19('0x35')][_0xfb19('0x97')]+'%'};return _0x552e42;})});}if(_0x44b176[_0xfb19('0x35')][_0xfb19('0x98')]){var _0x48bec6=_0x44b176[_0xfb19('0x35')][_0xfb19('0x98')][_0xfb19('0x99')](',');var _0x500dba={};_0x500dba[_0x48bec6[0x0]]={'$gte':moment(_0x48bec6[0x1])[_0xfb19('0x72')]('YYYY-MM-DD\x20HH:mm:ss')};_0x3d9742[_0xfb19('0x95')]=_[_0xfb19('0x42')](_0x3d9742[_0xfb19('0x95')],_0x500dba);}_0x3d9742=_[_0xfb19('0x42')]({},_0x3d9742,_0x44b176[_0xfb19('0x43')]);return db[_0xfb19('0x58')][_0xfb19('0x22')]({'where':_0x3d9742[_0xfb19('0x95')]})[_0xfb19('0x13')](function(_0x36a6e9){_0x59dc5a[_0xfb19('0x22')]=_0x36a6e9;if(_0x44b176[_0xfb19('0x35')][_0xfb19('0x40')]){_0x3d9742[_0xfb19('0x41')]=[{'all':!![]}];}return db[_0xfb19('0x58')][_0xfb19('0x9a')](_0x3d9742);})[_0xfb19('0x13')](function(_0x2721cd){_0x59dc5a[_0xfb19('0x9b')]=_0x2721cd;return _0x59dc5a;});}})['then'](respondWithFilteredResult(_0x231055,_0x3d9742))[_0xfb19('0x36')](handleError(_0x231055,null));};exports[_0xfb19('0x9c')]=function(_0x1a9007,_0x2e7d4c){var _0x5a03fd={'where':{}},_0x34a2aa={},_0x3ea20e={'count':0x0,'rows':[]};return db[_0xfb19('0x3a')][_0xfb19('0x48')]({'where':{'id':_0x1a9007['params']['id']}})[_0xfb19('0x13')](handleEntityNotFound(_0x2e7d4c,null))[_0xfb19('0x13')](function(_0x1611b8){if(_0x1611b8){_0x34a2aa[_0xfb19('0x39')]=_[_0xfb19('0x3b')](db[_0xfb19('0x58')][_0xfb19('0x31')]);_0x34a2aa['query']=_[_0xfb19('0x3b')](_0x1a9007['query']);_0x34a2aa[_0xfb19('0x3c')]=_[_0xfb19('0x3d')](_0x34a2aa[_0xfb19('0x39')],_0x34a2aa[_0xfb19('0x35')]);_0x5a03fd[_0xfb19('0x3e')]=_[_0xfb19('0x3d')](_0x34a2aa[_0xfb19('0x39')],qs[_0xfb19('0x3f')](_0x1a9007[_0xfb19('0x35')][_0xfb19('0x3f')]));_0x5a03fd[_0xfb19('0x3e')]=_0x5a03fd[_0xfb19('0x3e')]['length']?_0x5a03fd['attributes']:_0x34a2aa[_0xfb19('0x39')];if(!_0x1a9007[_0xfb19('0x35')]['hasOwnProperty'](_0xfb19('0x9d'))){_0x5a03fd[_0xfb19('0x20')]=qs[_0xfb19('0x20')](_0x1a9007[_0xfb19('0x35')][_0xfb19('0x20')]);_0x5a03fd['offset']=qs[_0xfb19('0x1f')](_0x1a9007[_0xfb19('0x35')]['offset']);}_0x5a03fd[_0xfb19('0x93')]=qs['sort'](_0x1a9007[_0xfb19('0x35')][_0xfb19('0x94')]);_0x5a03fd['where']=qs[_0xfb19('0x3c')](_[_0xfb19('0x96')](_0x1a9007['query'],_0x34a2aa[_0xfb19('0x3c')]));_0x5a03fd['where'][_0xfb19('0x9e')]=_0x1611b8['id'];if(_0x1a9007['query'][_0xfb19('0x97')]){_0x5a03fd[_0xfb19('0x95')]=_[_0xfb19('0x42')](_0x5a03fd[_0xfb19('0x95')],{'$or':_[_0xfb19('0x30')](_0x5a03fd[_0xfb19('0x3e')],function(_0x665429){var _0x22fba3={};_0x22fba3[_0x665429]={'$like':'%'+_0x1a9007[_0xfb19('0x35')]['filter']+'%'};return _0x22fba3;})});}_0x5a03fd[_0xfb19('0x95')][_0xfb19('0x87')]=![];if(_0x1a9007[_0xfb19('0x35')]['id']){_0x5a03fd[_0xfb19('0x95')]['id']={'$gt':_0x1a9007[_0xfb19('0x35')]['id']};}_0x5a03fd=_[_0xfb19('0x42')]({},_0x5a03fd,_0x1a9007[_0xfb19('0x43')]);return db[_0xfb19('0x58')][_0xfb19('0x22')]({'where':_0x5a03fd[_0xfb19('0x95')]})[_0xfb19('0x13')](function(_0x256e64){_0x3ea20e['count']=_0x256e64;_0x5a03fd[_0xfb19('0x41')]=[];if(_0x1a9007['query'][_0xfb19('0x9f')]){_0x5a03fd[_0xfb19('0x41')][_0xfb19('0xa0')]({'model':db[_0xfb19('0x75')],'as':_0xfb19('0x75'),'attributes':['id',_0xfb19('0x81'),_0xfb19('0x80')]});}if(_0x1a9007['query']['includeAll']){_0x5a03fd[_0xfb19('0x41')]=[{'all':!![]}];}return db[_0xfb19('0x58')][_0xfb19('0x9a')](_0x5a03fd);})['then'](function(_0x3fd9e8){_0x3ea20e['rows']=_0x3fd9e8;return _0x3ea20e;});}})[_0xfb19('0x13')](respondWithFilteredResult(_0x2e7d4c,_0x5a03fd))[_0xfb19('0x36')](handleError(_0x2e7d4c,null));};exports[_0xfb19('0xa1')]=function(_0x58b95f,_0x417bfb){return db[_0xfb19('0x3a')][_0xfb19('0x44')]({'where':{'id':_0x58b95f['params']['id']}})[_0xfb19('0x13')](handleEntityNotFound(_0x417bfb,null))[_0xfb19('0x13')](function(_0x252e04){if(_0x252e04){return _0x252e04['setTags'](_0x58b95f['body'][_0xfb19('0x91')],_[_0xfb19('0xa2')](_0x58b95f[_0xfb19('0x2b')],[_0xfb19('0x91'),'id'])||{})[_0xfb19('0xa3')](function(){return db[_0xfb19('0xa4')]['findAll']({'attributes':['id',_0xfb19('0x29'),_0xfb19('0xa5')],'where':{'id':_0x58b95f[_0xfb19('0x2b')][_0xfb19('0x91')]}});})['then'](function(_0x4e85a9){socket[_0xfb19('0xa6')](_0xfb19('0xa7'),{'id':Number(_0x58b95f['params']['id']),'tags':_0x4e85a9||[]});return{'id':Number(_0x58b95f[_0xfb19('0x38')]['id']),'tags':_0x4e85a9||[]};});}})[_0xfb19('0x13')](respondWithResult(_0x417bfb,null))[_0xfb19('0x36')](handleError(_0x417bfb,null));};exports[_0xfb19('0xa8')]=function(_0x146abe,_0x134c80){return db[_0xfb19('0x3a')][_0xfb19('0x44')]({'where':{'id':_0x146abe[_0xfb19('0x38')]['id']}})['then'](handleEntityNotFound(_0x134c80,null))[_0xfb19('0x13')](function(_0x4c0481){if(_0x4c0481){return _0x4c0481[_0xfb19('0xa8')](_0x146abe[_0xfb19('0x35')][_0xfb19('0x91')]);}})[_0xfb19('0x13')](respondWithStatusCode(_0x134c80,null))[_0xfb19('0x36')](handleError(_0x134c80,null));};exports[_0xfb19('0xa9')]=function(_0xc1a9cc,_0x22b642){var _0x6891a9=moment()[_0xfb19('0xaa')]()[_0xfb19('0xab')]();var _0x31d7d8=path[_0xfb19('0x6c')](config[_0xfb19('0x6d')],_0xfb19('0xac'),_0xfb19('0xad'),_0xfb19('0xae'));var _0x35a1b8=path['join'](config[_0xfb19('0x6d')],_0xfb19('0xac'),'files',_0xfb19('0xaf'));var _0x51a3bb=path[_0xfb19('0x6c')](_0x31d7d8,_0x6891a9);var _0x457d62=util[_0xfb19('0x72')]('transcript-%d-%s.zip',_0xc1a9cc[_0xfb19('0x38')]['id'],_0x6891a9);var _0x3210d8=path[_0xfb19('0x6c')](_0x31d7d8,_0x457d62);var _0x5912a4=[];_0x5912a4[_0xfb19('0xa0')]({'model':db[_0xfb19('0x75')],'as':_0xfb19('0x75'),'attributes':['id',_0xfb19('0x81')],'raw':!![]});_0x5912a4[_0xfb19('0xa0')]({'model':db[_0xfb19('0x5b')],'as':_0xfb19('0xb0'),'attributes':['id',_0xfb19('0xb1'),_0xfb19('0xb2')],'raw':!![]});if(_0xc1a9cc['query'][_0xfb19('0xaf')]){_0x5912a4['push']({'model':db['Attachment'],'as':'Attachment','raw':!![]});}var _0x316674=[{'model':db[_0xfb19('0x58')],'as':'Messages','attributes':['id',_0xfb19('0x2b'),_0xfb19('0x84'),_0xfb19('0x86'),_0xfb19('0x87'),_0xfb19('0xb3')],'include':_0x5912a4}];_0x316674[_0xfb19('0xa0')]({'model':db[_0xfb19('0x76')],'as':_0xfb19('0xb4'),'attributes':['id',_0xfb19('0x29')]});_0x316674[_0xfb19('0xa0')]({'model':db[_0xfb19('0x75')],'as':_0xfb19('0xb5'),'attributes':['id',_0xfb19('0x81')]});return db[_0xfb19('0x3a')][_0xfb19('0x44')]({'where':{'id':_0xc1a9cc[_0xfb19('0x38')]['id']},'include':_0x316674})[_0xfb19('0x13')](handleEntityNotFound(_0x22b642,null))['then'](function(_0x185126){if(_0x185126){var _0x5e912f=_0x185126['get']({'plain':!![]});fs[_0xfb19('0xb6')](_0x51a3bb);var _0x191d60={'channel':_0xfb19('0xb7'),'account':_0x5e912f[_0xfb19('0xb4')][_0xfb19('0x29')],'agent':_0x5e912f[_0xfb19('0xb5')]?_0x5e912f[_0xfb19('0xb5')][_0xfb19('0x81')]:'N.A.','createdAt':moment(_0x5e912f['createdAt'])[_0xfb19('0x72')](_0xfb19('0xb8'))['toString'](),'closedAt':_0x5e912f[_0xfb19('0x60')]?moment(_0x5e912f['closedAt'])[_0xfb19('0x72')]('YYYY-MM-DD\x20HH:mm:ss')[_0xfb19('0xab')]():'','disposition':_0x5e912f[_0xfb19('0x61')],'chatInfo':{'browser':_0x5e912f['browserName'],'os':_0x5e912f[_0xfb19('0xb9')],'referer':_0x5e912f[_0xfb19('0xba')],'customerIp':_0x5e912f[_0xfb19('0xbb')],'customerPort':_0x5e912f[_0xfb19('0xbc')]?_0x5e912f[_0xfb19('0xbc')]:_0xfb19('0xbd')},'messages':_(_0x5e912f['Messages'])['tail']()['filter']({'secret':![]})['map'](function(_0x4731ef){if(_0x4731ef['Attachment']){var _0x1f80e4=path[_0xfb19('0x6c')](_0x35a1b8,_0x4731ef[_0xfb19('0x68')]['basename']);if(fs[_0xfb19('0xbe')](_0x1f80e4)){fs[_0xfb19('0xbf')](_0x1f80e4)[_0xfb19('0xc0')](fs[_0xfb19('0xc1')](path['join'](_0x51a3bb,_0x4731ef[_0xfb19('0x68')][_0xfb19('0x64')])));}}return{'date':moment(_0x4731ef[_0xfb19('0x84')])['format'](_0xfb19('0xb8'))['toString'](),'sender':_0x4731ef[_0xfb19('0x86')]===_0xfb19('0x57')?_0x4731ef['User']?_0x4731ef['User'][_0xfb19('0x81')]:_0xfb19('0x7a'):_0x4731ef[_0xfb19('0xb0')][_0xfb19('0xb1')]+(_0x4731ef[_0xfb19('0xb0')][_0xfb19('0xb2')]?'\x20'+_0x4731ef[_0xfb19('0xb0')][_0xfb19('0xb2')]:''),'body':_0x4731ef[_0xfb19('0x68')]?_0x4731ef[_0xfb19('0x68')]['basename']:_0x4731ef[_0xfb19('0x2b')],'direction':_0x4731ef[_0xfb19('0x86')]==='out'?'A':'C','secret':_0x4731ef[_0xfb19('0x87')],'read':_0x4731ef[_0xfb19('0xb3')],'attachment':_0x4731ef[_0xfb19('0x68')]};})['value']()};return ejs[_0xfb19('0xc2')](path[_0xfb19('0x6c')](config[_0xfb19('0x6d')],_0xfb19('0xac'),'views',_0xfb19('0xc3')),{'interaction':_0x191d60})[_0xfb19('0x13')](function(_0x599b60){var _0x42a3ff=path[_0xfb19('0x6c')](_0x51a3bb,'transcript-'+_0x5e912f['id']+'-'+_0x6891a9+'.pdf');var _0x3338da={'path':_0x42a3ff,'channel':'Chat','interactionId':_0x5e912f['id']};return pdf['createPdfFromHTML'](_0x599b60,_0x3338da);})[_0xfb19('0x13')](function(){return new Promise(function(_0x5d2666,_0x59b968){zipdir(_0x51a3bb,{'saveTo':_0x3210d8},function(_0x1b274f,_0x3bb162){if(_0x1b274f)return _0x59b968(_0x1b274f);return _0x5d2666(_0x3bb162);});})[_0xfb19('0x13')](function(){return new BPromise(function(_0xd5d6f4,_0x457b6c){rimraf(_0x51a3bb,function(_0x2ded7e){if(_0x2ded7e)_0x457b6c(_0x2ded7e);return _0xd5d6f4();});});})['then'](function(){return _0x22b642[_0xfb19('0xa9')](_0x3210d8,_0x457d62,function(_0x4fe5d2){if(_0x4fe5d2){logger[_0xfb19('0x1a')]('err',_0x4fe5d2);}else{fs[_0xfb19('0xc4')](_0x3210d8);}});});});}else{return _0x22b642[_0xfb19('0x27')](0xc8);}})[_0xfb19('0x36')](handleError(_0x22b642,null));};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js
index 85032f5..27dbdbc 100644
--- a/server/api/chatInteraction/chatInteraction.events.js
+++ b/server/api/chatInteraction/chatInteraction.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc629=['Users','map','findAll','setDataValue','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','../../mysqldb','ChatInteraction','ChatMessage','setMaxListeners','update','remove','getUsers','then'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc629,0xb6));var _0x9c62=function(_0x63a69b,_0x296888){_0x63a69b=_0x63a69b-0x0;var _0x425fa1=_0xc629[_0x63a69b];return _0x425fa1;};'use strict';var EventEmitter=require('events');var ChatInteraction=require(_0x9c62('0x0'))['db'][_0x9c62('0x1')];var ChatMessage=require(_0x9c62('0x0'))['db'][_0x9c62('0x2')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x9c62('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9c62('0x4'),'afterDestroy':_0x9c62('0x5')};function emitEvent(_0x43843b){return function(_0x467a62,_0x4e479f,_0x233cf6){_0x467a62[_0x9c62('0x6')]({'attributes':['id'],'raw':!![]})[_0x9c62('0x7')](function(_0xc5ec41){_0x467a62['setDataValue'](_0x9c62('0x8'),_0xc5ec41[_0x9c62('0x9')](function(_0x30e90b){return{'id':_0x30e90b['id']};}));return ChatMessage[_0x9c62('0xa')]({'where':{'ChatInteractionId':_0x467a62['id'],'direction':'in','read':![]},'raw':!![]});})[_0x9c62('0x7')](function(_0x5d662a){_0x467a62[_0x9c62('0xb')](_0x9c62('0xc'),_0x5d662a[_0x9c62('0xd')]);ChatInteractionEvents[_0x9c62('0xe')](_0x43843b+':'+_0x467a62['id'],_0x467a62);ChatInteractionEvents[_0x9c62('0xe')](_0x43843b,_0x467a62);_0x233cf6(null);})[_0x9c62('0xf')](_0x233cf6(null));};}for(var e in events){if(events[_0x9c62('0x10')](e)){var event=events[e];ChatInteraction[_0x9c62('0x11')](e,emitEvent(event));}}module[_0x9c62('0x12')]=ChatInteractionEvents;
\ No newline at end of file
+var _0x78ba=['save','update','remove','getUsers','then','setDataValue','map','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x78ba,0x1de));var _0xa78b=function(_0x1c744e,_0x1ad2b4){_0x1c744e=_0x1c744e-0x0;var _0x60a8f6=_0x78ba[_0x1c744e];return _0x60a8f6;};'use strict';var EventEmitter=require(_0xa78b('0x0'));var ChatInteraction=require(_0xa78b('0x1'))['db']['ChatInteraction'];var ChatMessage=require(_0xa78b('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa78b('0x2'),'afterUpdate':_0xa78b('0x3'),'afterDestroy':_0xa78b('0x4')};function emitEvent(_0x20423d){return function(_0x1a1e79,_0x3870d4,_0x3e0270){_0x1a1e79[_0xa78b('0x5')]({'attributes':['id'],'raw':!![]})[_0xa78b('0x6')](function(_0x43d436){_0x1a1e79[_0xa78b('0x7')]('Users',_0x43d436[_0xa78b('0x8')](function(_0x1b03ee){return{'id':_0x1b03ee['id']};}));return ChatMessage['findAll']({'where':{'ChatInteractionId':_0x1a1e79['id'],'direction':'in','read':![]},'raw':!![]});})[_0xa78b('0x6')](function(_0x17d327){_0x1a1e79[_0xa78b('0x7')](_0xa78b('0x9'),_0x17d327[_0xa78b('0xa')]);ChatInteractionEvents[_0xa78b('0xb')](_0x20423d+':'+_0x1a1e79['id'],_0x1a1e79);ChatInteractionEvents[_0xa78b('0xb')](_0x20423d,_0x1a1e79);_0x3e0270(null);})[_0xa78b('0xc')](_0x3e0270(null));};}for(var e in events){if(events[_0xa78b('0xd')](e)){var event=events[e];ChatInteraction[_0xa78b('0xe')](e,emitEvent(event));}}module[_0xa78b('0xf')]=ChatInteractionEvents;
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js
index d8e95d8..b4792c6 100644
--- a/server/api/chatInteraction/chatInteraction.model.js
+++ b/server/api/chatInteraction/chatInteraction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf9fb=['ChatInteraction','changed','closed','YYYY-MM-DD\x20HH:mm:ss','utf8mb4_unicode_ci','lodash','util','api','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf9fb,0x147));var _0xbf9f=function(_0x53934d,_0xaba2c){_0x53934d=_0x53934d-0x0;var _0x169c7d=_0xf9fb[_0x53934d];return _0x169c7d;};'use strict';var _=require(_0xbf9f('0x0'));var util=require(_0xbf9f('0x1'));var logger=require('../../config/logger')(_0xbf9f('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbf9f('0x3'));var rimraf=require(_0xbf9f('0x4'));var config=require(_0xbf9f('0x5'));var attributes=require(_0xbf9f('0x6'));module[_0xbf9f('0x7')]=function(_0x4782ea,_0x212aef){return _0x4782ea[_0xbf9f('0x8')](_0xbf9f('0x9'),attributes,{'tableName':'chat_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x96edc8,_0x487edf,_0x1295b2){if(_0x96edc8[_0xbf9f('0xa')](_0xbf9f('0xb'))){_0x96edc8['closedAt']=moment()['format'](_0xbf9f('0xc'));}_0x1295b2(null,_0x96edc8);}},'charset':'utf8mb4','collate':_0xbf9f('0xd')});};
\ No newline at end of file
+var _0x501d=['chat_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','../../config/logger','api','moment','request-promise','path','../../config/environment','./chatInteraction.attributes','define'];(function(_0x3a07e3,_0x324a74){var _0x265a47=function(_0x3665d4){while(--_0x3665d4){_0x3a07e3['push'](_0x3a07e3['shift']());}};_0x265a47(++_0x324a74);}(_0x501d,0xa0));var _0xd501=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x501d[_0x5b644e];return _0x49c6bf;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xd501('0x0'))(_0xd501('0x1'));var moment=require(_0xd501('0x2'));var BPromise=require('bluebird');var rp=require(_0xd501('0x3'));var fs=require('fs');var path=require(_0xd501('0x4'));var rimraf=require('rimraf');var config=require(_0xd501('0x5'));var attributes=require(_0xd501('0x6'));module['exports']=function(_0x237e4e,_0x19c025){return _0x237e4e[_0xd501('0x7')]('ChatInteraction',attributes,{'tableName':_0xd501('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1e3ff9,_0x4dcae8,_0x2e87bd){if(_0x1e3ff9['changed'](_0xd501('0x9'))){_0x1e3ff9[_0xd501('0xa')]=moment()[_0xd501('0xb')](_0xd501('0xc'));}_0x2e87bd(null,_0x1e3ff9);}},'charset':_0xd501('0xd'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js
index 90bd4b3..021fda5 100644
--- a/server/api/chatInteraction/chatInteraction.rpc.js
+++ b/server/api/chatInteraction/chatInteraction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc2c6=['../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./chatInteraction.socket','register','request','then','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','error','code','ChatInteraction,\x20%s,\x20%s','info','result','message','catch','UpdateChatInteraction','ChatInteraction','update','body','options','raw','where','attributes','limit','stringify','AddTagsToChatInteraction','find','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x49cf57,_0x428742){var _0x15eca3=function(_0x3c8468){while(--_0x3c8468){_0x49cf57['push'](_0x49cf57['shift']());}};_0x15eca3(++_0x428742);}(_0xc2c6,0x1b1));var _0x6c2c=function(_0x1601ad,_0x4e4a92){_0x1601ad=_0x1601ad-0x0;var _0x3973aa=_0xc2c6[_0x1601ad];return _0x3973aa;};'use strict';var _=require(_0x6c2c('0x0'));var util=require(_0x6c2c('0x1'));var moment=require(_0x6c2c('0x2'));var BPromise=require(_0x6c2c('0x3'));var rs=require(_0x6c2c('0x4'));var fs=require('fs');var Redis=require(_0x6c2c('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x6c2c('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x6c2c('0x7'));var jayson=require(_0x6c2c('0x8'));var client=jayson[_0x6c2c('0x9')]['http']({'port':0x232a});config[_0x6c2c('0xa')]=_['defaults'](config[_0x6c2c('0xa')],{'host':_0x6c2c('0xb'),'port':0x18eb});var socket=require(_0x6c2c('0xc'))(new Redis(config['redis']));require(_0x6c2c('0xd'))[_0x6c2c('0xe')](socket);function respondWithRpcPromise(_0x5c28de,_0x482322,_0x241b1e){return new BPromise(function(_0x12a9d5,_0x43ebed){return client[_0x6c2c('0xf')](_0x5c28de,_0x241b1e)[_0x6c2c('0x10')](function(_0x5c8244){logger['info']('ChatInteraction,\x20%s,\x20%s',_0x482322,_0x6c2c('0x11'));logger[_0x6c2c('0x12')](_0x6c2c('0x13'),_0x482322,_0x6c2c('0x11'),JSON['stringify'](_0x5c8244));if(_0x5c8244[_0x6c2c('0x14')]){if(_0x5c8244[_0x6c2c('0x14')][_0x6c2c('0x15')]===0x1f4){logger['error'](_0x6c2c('0x16'),_0x482322,_0x5c8244['error']['message']);return _0x43ebed(_0x5c8244['error']['message']);}logger['error'](_0x6c2c('0x16'),_0x482322,_0x5c8244[_0x6c2c('0x14')]['message']);return _0x12a9d5(_0x5c8244[_0x6c2c('0x14')]['message']);}else{logger[_0x6c2c('0x17')](_0x6c2c('0x16'),_0x482322,'request\x20sent');_0x12a9d5(_0x5c8244[_0x6c2c('0x18')][_0x6c2c('0x19')]);}})[_0x6c2c('0x1a')](function(_0xb704bf){logger[_0x6c2c('0x14')](_0x6c2c('0x16'),_0x482322,_0xb704bf);_0x43ebed(_0xb704bf);});});}exports[_0x6c2c('0x1b')]=function(_0x55cb4a){var _0x25d8ba=this;return new Promise(function(_0x2506da,_0x1573a2){return db[_0x6c2c('0x1c')][_0x6c2c('0x1d')](_0x55cb4a[_0x6c2c('0x1e')],{'raw':_0x55cb4a[_0x6c2c('0x1f')]?_0x55cb4a[_0x6c2c('0x1f')][_0x6c2c('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x55cb4a[_0x6c2c('0x1f')]?_0x55cb4a[_0x6c2c('0x1f')][_0x6c2c('0x21')]||null:null,'attributes':_0x55cb4a[_0x6c2c('0x1f')]?_0x55cb4a[_0x6c2c('0x1f')][_0x6c2c('0x22')]||null:null,'limit':_0x55cb4a['options']?_0x55cb4a['options'][_0x6c2c('0x23')]||null:null})['then'](function(_0xfd9896){logger[_0x6c2c('0x17')](_0x6c2c('0x1b'),_0x55cb4a);logger[_0x6c2c('0x12')](_0x6c2c('0x1b'),_0x55cb4a,JSON[_0x6c2c('0x24')](_0xfd9896));_0x2506da(_0xfd9896);})[_0x6c2c('0x1a')](function(_0x51f8fc){logger[_0x6c2c('0x14')]('UpdateChatInteraction',_0x51f8fc[_0x6c2c('0x19')],_0x55cb4a);_0x1573a2(_0x25d8ba['error'](0x1f4,_0x51f8fc[_0x6c2c('0x19')]));});});};exports[_0x6c2c('0x25')]=function(_0x38119b){return new Promise(function(_0xfca7fc,_0x22b1c0){return db[_0x6c2c('0x1c')][_0x6c2c('0x26')]({'where':_0x38119b[_0x6c2c('0x1f')]?_0x38119b[_0x6c2c('0x1f')][_0x6c2c('0x21')]||null:null})['then'](function(_0x1e343e){if(_0x1e343e){return _0x1e343e[_0x6c2c('0x27')](_0x38119b[_0x6c2c('0x1e')][_0x6c2c('0x28')],_[_0x6c2c('0x29')](_0x38119b[_0x6c2c('0x1e')],[_0x6c2c('0x28'),'id'])||{});}})[_0x6c2c('0x2a')](function(_0x4682b5){logger[_0x6c2c('0x17')](_0x6c2c('0x2b'),_0x38119b);logger['debug'](_0x6c2c('0x2b'),_0x38119b,JSON[_0x6c2c('0x24')](_0x4682b5));_0xfca7fc(_0x4682b5);})[_0x6c2c('0x1a')](function(_0xbfae19){logger[_0x6c2c('0x14')](_0x6c2c('0x2b'),_0xbfae19[_0x6c2c('0x19')],_0x38119b);_0x22b1c0(_this[_0x6c2c('0x14')](0x1f4,_0xbfae19['message']));});});};
\ No newline at end of file
+var _0x318b=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','UpdateChatInteraction','update','body','raw','options','where','attributes','limit','debug','AddTagsToChatInteraction','ChatInteraction','find','then','ids','spread','AddTags','util'];(function(_0x317ed7,_0x521c96){var _0xf2f51c=function(_0x3e1b48){while(--_0x3e1b48){_0x317ed7['push'](_0x317ed7['shift']());}};_0xf2f51c(++_0x521c96);}(_0x318b,0x182));var _0xb318=function(_0x2a960f,_0x5aab73){_0x2a960f=_0x2a960f-0x0;var _0x5027df=_0x318b[_0x2a960f];return _0x5027df;};'use strict';var _=require('lodash');var util=require(_0xb318('0x0'));var moment=require(_0xb318('0x1'));var BPromise=require(_0xb318('0x2'));var rs=require(_0xb318('0x3'));var fs=require('fs');var Redis=require(_0xb318('0x4'));var db=require(_0xb318('0x5'))['db'];var utils=require(_0xb318('0x6'));var logger=require(_0xb318('0x7'))(_0xb318('0x8'));var config=require(_0xb318('0x9'));var jayson=require(_0xb318('0xa'));var client=jayson['client'][_0xb318('0xb')]({'port':0x232a});config[_0xb318('0xc')]=_[_0xb318('0xd')](config[_0xb318('0xc')],{'host':_0xb318('0xe'),'port':0x18eb});var socket=require(_0xb318('0xf'))(new Redis(config['redis']));require(_0xb318('0x10'))[_0xb318('0x11')](socket);function respondWithRpcPromise(_0x2263f3,_0x565bf3,_0x13eafa){return new BPromise(function(_0x40044a,_0x4cbe65){return client['request'](_0x2263f3,_0x13eafa)['then'](function(_0x39dd0c){logger[_0xb318('0x12')](_0xb318('0x13'),_0x565bf3,_0xb318('0x14'));logger['debug'](_0xb318('0x15'),_0x565bf3,_0xb318('0x14'),JSON[_0xb318('0x16')](_0x39dd0c));if(_0x39dd0c[_0xb318('0x17')]){if(_0x39dd0c['error']['code']===0x1f4){logger[_0xb318('0x17')](_0xb318('0x13'),_0x565bf3,_0x39dd0c[_0xb318('0x17')][_0xb318('0x18')]);return _0x4cbe65(_0x39dd0c[_0xb318('0x17')][_0xb318('0x18')]);}logger['error'](_0xb318('0x13'),_0x565bf3,_0x39dd0c[_0xb318('0x17')][_0xb318('0x18')]);return _0x40044a(_0x39dd0c[_0xb318('0x17')]['message']);}else{logger[_0xb318('0x12')](_0xb318('0x13'),_0x565bf3,'request\x20sent');_0x40044a(_0x39dd0c[_0xb318('0x19')][_0xb318('0x18')]);}})[_0xb318('0x1a')](function(_0x37ee51){logger[_0xb318('0x17')](_0xb318('0x13'),_0x565bf3,_0x37ee51);_0x4cbe65(_0x37ee51);});});}exports[_0xb318('0x1b')]=function(_0x35c17b){var _0x276c6e=this;return new Promise(function(_0x49e205,_0x4c4fc0){return db['ChatInteraction'][_0xb318('0x1c')](_0x35c17b[_0xb318('0x1d')],{'raw':_0x35c17b['options']?_0x35c17b['options'][_0xb318('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x35c17b[_0xb318('0x1f')]?_0x35c17b[_0xb318('0x1f')][_0xb318('0x20')]||null:null,'attributes':_0x35c17b['options']?_0x35c17b[_0xb318('0x1f')][_0xb318('0x21')]||null:null,'limit':_0x35c17b[_0xb318('0x1f')]?_0x35c17b[_0xb318('0x1f')][_0xb318('0x22')]||null:null})['then'](function(_0x3e2df9){logger[_0xb318('0x12')](_0xb318('0x1b'),_0x35c17b);logger[_0xb318('0x23')](_0xb318('0x1b'),_0x35c17b,JSON['stringify'](_0x3e2df9));_0x49e205(_0x3e2df9);})['catch'](function(_0x522453){logger[_0xb318('0x17')](_0xb318('0x1b'),_0x522453[_0xb318('0x18')],_0x35c17b);_0x4c4fc0(_0x276c6e[_0xb318('0x17')](0x1f4,_0x522453[_0xb318('0x18')]));});});};exports[_0xb318('0x24')]=function(_0x1763bd){return new Promise(function(_0x103f18,_0x3fe18a){return db[_0xb318('0x25')][_0xb318('0x26')]({'where':_0x1763bd['options']?_0x1763bd[_0xb318('0x1f')][_0xb318('0x20')]||null:null})[_0xb318('0x27')](function(_0x20cb18){if(_0x20cb18){return _0x20cb18['addTags'](_0x1763bd[_0xb318('0x1d')][_0xb318('0x28')],_['omit'](_0x1763bd[_0xb318('0x1d')],[_0xb318('0x28'),'id'])||{});}})[_0xb318('0x29')](function(_0x7f7382){logger[_0xb318('0x12')](_0xb318('0x2a'),_0x1763bd);logger[_0xb318('0x23')](_0xb318('0x2a'),_0x1763bd,JSON[_0xb318('0x16')](_0x7f7382));_0x103f18(_0x7f7382);})[_0xb318('0x1a')](function(_0x466d68){logger[_0xb318('0x17')](_0xb318('0x2a'),_0x466d68[_0xb318('0x18')],_0x1763bd);_0x3fe18a(_this['error'](0x1f4,_0x466d68[_0xb318('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js
index fc3ec53..5f83b88 100644
--- a/server/api/chatInteraction/chatInteraction.socket.js
+++ b/server/api/chatInteraction/chatInteraction.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb9c5=['removeListener','chatInteraction:','remove','update','emit'];(function(_0x3b53b0,_0x23dc58){var _0x4eddc6=function(_0x46254f){while(--_0x46254f){_0x3b53b0['push'](_0x3b53b0['shift']());}};_0x4eddc6(++_0x23dc58);}(_0xb9c5,0x14c));var _0x5b9c=function(_0x38b4fe,_0x4f84d){_0x38b4fe=_0x38b4fe-0x0;var _0x1be3a3=_0xb9c5[_0x38b4fe];return _0x1be3a3;};'use strict';var ChatInteractionEvents=require('./chatInteraction.events');var events=['save',_0x5b9c('0x0'),_0x5b9c('0x1')];function createListener(_0x219f9e,_0x71a54d){return function(_0x7a8d0e){_0x71a54d[_0x5b9c('0x2')](_0x219f9e,_0x7a8d0e);};}function removeListener(_0x8b9804,_0x1e6874){return function(){ChatInteractionEvents[_0x5b9c('0x3')](_0x8b9804,_0x1e6874);};}exports['register']=function(_0xfeef37){for(var _0x45007d=0x0,_0x3259c2=events['length'];_0x45007d<_0x3259c2;_0x45007d++){var _0x2a9fd6=events[_0x45007d];var _0x3f43b5=createListener(_0x5b9c('0x4')+_0x2a9fd6,_0xfeef37);ChatInteractionEvents['on'](_0x2a9fd6,_0x3f43b5);}};
\ No newline at end of file
+var _0x1b3d=['emit','removeListener','register','length','chatInteraction:','./chatInteraction.events','save','remove','update'];(function(_0x40eb76,_0x5f5dcb){var _0x3557b6=function(_0x212ed2){while(--_0x212ed2){_0x40eb76['push'](_0x40eb76['shift']());}};_0x3557b6(++_0x5f5dcb);}(_0x1b3d,0x1f4));var _0xd1b3=function(_0x57a33e,_0x1cdeba){_0x57a33e=_0x57a33e-0x0;var _0x1de38e=_0x1b3d[_0x57a33e];return _0x1de38e;};'use strict';var ChatInteractionEvents=require(_0xd1b3('0x0'));var events=[_0xd1b3('0x1'),_0xd1b3('0x2'),_0xd1b3('0x3')];function createListener(_0x2f313d,_0x20265b){return function(_0x48cafa){_0x20265b[_0xd1b3('0x4')](_0x2f313d,_0x48cafa);};}function removeListener(_0x58efe5,_0x15476e){return function(){ChatInteractionEvents[_0xd1b3('0x5')](_0x58efe5,_0x15476e);};}exports[_0xd1b3('0x6')]=function(_0x532edf){for(var _0x579252=0x0,_0x3f7a0e=events[_0xd1b3('0x7')];_0x579252<_0x3f7a0e;_0x579252++){var _0x20163c=events[_0x579252];var _0x23ac2f=createListener(_0xd1b3('0x8')+_0x20163c,_0x532edf);ChatInteractionEvents['on'](_0x20163c,_0x23ac2f);}};
\ No newline at end of file
diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js
index c63031b..c2ba9d6 100644
--- a/server/api/chatInteraction/index.js
+++ b/server/api/chatInteraction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x082c=['attachmentUpload','/:id/messages','/:id/tags','tracked','addTags','put','/:id','customUpdate','abandon','/:id/close','close','delete','chatinteraction:destroy','destroy','removeTags','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','get','isAuthenticated','index','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','getMessages','getMyMessages','/:id/download','download','create','post','/:id/vidaoo','join','root','server/files/attachments/','%s-%s','now','originalname','replace','/:id/attachment_upload','single','file'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x082c,0x13c));var _0xc082=function(_0x12ab97,_0x43a673){_0x12ab97=_0x12ab97-0x0;var _0x338e43=_0x082c[_0x12ab97];return _0x338e43;};'use strict';var multer=require('multer');var util=require(_0xc082('0x0'));var path=require(_0xc082('0x1'));var timeout=require(_0xc082('0x2'));var express=require(_0xc082('0x3'));var router=express[_0xc082('0x4')]();var fs_extra=require(_0xc082('0x5'));var auth=require(_0xc082('0x6'));var interaction=require(_0xc082('0x7'));var config=require(_0xc082('0x8'));var controller=require(_0xc082('0x9'));router[_0xc082('0xa')]('/',auth[_0xc082('0xb')](),controller[_0xc082('0xc')]);router[_0xc082('0xa')]('/describe',auth[_0xc082('0xb')](),controller['describe']);router[_0xc082('0xa')]('/:id',auth[_0xc082('0xd')](),controller[_0xc082('0xe')]);router[_0xc082('0xa')](_0xc082('0xf'),auth['isChatInteractionAuthorized'](),controller[_0xc082('0x10')]);router[_0xc082('0xa')]('/:id/messages',auth['isAuthenticated'](),controller[_0xc082('0x11')]);router['get']('/:id/my_messages',auth['isChatInteractionAuthorized'](),controller[_0xc082('0x12')]);router[_0xc082('0xa')](_0xc082('0x13'),auth[_0xc082('0xb')](),controller[_0xc082('0x14')]);router['post']('/',auth['isAuthenticated'](),controller[_0xc082('0x15')]);router[_0xc082('0x16')](_0xc082('0x17'),auth[_0xc082('0xb')](),controller['createVidaooSession']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x27a6c4,_0x346abc,_0x3b97cb){_0x3b97cb(null,path[_0xc082('0x18')](config[_0xc082('0x19')],_0xc082('0x1a')));},'filename':function(_0x2504d5,_0x9b02e8,_0x4552d2){_0x4552d2(null,util['format'](_0xc082('0x1b'),Date[_0xc082('0x1c')](),_0x9b02e8[_0xc082('0x1d')][_0xc082('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xc082('0x16')](_0xc082('0x1f'),upload[_0xc082('0x20')](_0xc082('0x21')),controller[_0xc082('0x22')]);router[_0xc082('0x16')](_0xc082('0x23'),auth[_0xc082('0xd')](),controller['addMessage']);router['post'](_0xc082('0x24'),auth[_0xc082('0xb')](),interaction[_0xc082('0x25')]('chat','chatinteraction:addtags'),controller[_0xc082('0x26')]);router[_0xc082('0x27')](_0xc082('0x28'),auth[_0xc082('0xb')](),interaction[_0xc082('0x25')]('chat','chatinteraction:update'),controller['update']);router[_0xc082('0x27')]('/:id/custom_update',controller[_0xc082('0x29')]);router[_0xc082('0x27')]('/:id/abandon',auth['isChatInteractionAuthorized'](),controller[_0xc082('0x2a')]);router[_0xc082('0x27')](_0xc082('0x2b'),controller[_0xc082('0x2c')]);router[_0xc082('0x2d')](_0xc082('0x28'),auth['isAuthenticated'](),interaction[_0xc082('0x25')]('chat',_0xc082('0x2e')),controller[_0xc082('0x2f')]);router[_0xc082('0x2d')](_0xc082('0x24'),auth[_0xc082('0xb')](),controller[_0xc082('0x30')]);module[_0xc082('0x31')]=router;
\ No newline at end of file
+var _0x193e=['removeTags','exports','multer','util','Router','../../components/auth/service','../../config/environment','./chatInteraction.controller','index','get','/describe','isAuthenticated','describe','/:id','show','/:id/attachment_download','isChatInteractionAuthorized','attachmentDownload','/:id/messages','getMyMessages','/:id/download','post','create','createVidaooSession','diskStorage','join','server/files/attachments/','format','%s-%s','now','originalname','replace','/:id/attachment_upload','single','file','attachmentUpload','addMessage','/:id/tags','tracked','chat','addTags','update','put','/:id/custom_update','/:id/abandon','abandon','close','destroy','delete'];(function(_0x495499,_0x2c41f2){var _0x2d8d88=function(_0x2907de){while(--_0x2907de){_0x495499['push'](_0x495499['shift']());}};_0x2d8d88(++_0x2c41f2);}(_0x193e,0x95));var _0xe193=function(_0x4a2168,_0x3ff402){_0x4a2168=_0x4a2168-0x0;var _0x519525=_0x193e[_0x4a2168];return _0x519525;};'use strict';var multer=require(_0xe193('0x0'));var util=require(_0xe193('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xe193('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0xe193('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xe193('0x4'));var controller=require(_0xe193('0x5'));router['get']('/',auth['isAuthenticated'](),controller[_0xe193('0x6')]);router[_0xe193('0x7')](_0xe193('0x8'),auth[_0xe193('0x9')](),controller[_0xe193('0xa')]);router['get'](_0xe193('0xb'),auth['isChatInteractionAuthorized'](),controller[_0xe193('0xc')]);router[_0xe193('0x7')](_0xe193('0xd'),auth[_0xe193('0xe')](),controller[_0xe193('0xf')]);router['get'](_0xe193('0x10'),auth[_0xe193('0x9')](),controller['getMessages']);router['get']('/:id/my_messages',auth[_0xe193('0xe')](),controller[_0xe193('0x11')]);router[_0xe193('0x7')](_0xe193('0x12'),auth[_0xe193('0x9')](),controller['download']);router[_0xe193('0x13')]('/',auth[_0xe193('0x9')](),controller[_0xe193('0x14')]);router[_0xe193('0x13')]('/:id/vidaoo',auth[_0xe193('0x9')](),controller[_0xe193('0x15')]);var upload=multer({'storage':multer[_0xe193('0x16')]({'destination':function(_0x4a5b28,_0x17bdf6,_0x162123){_0x162123(null,path[_0xe193('0x17')](config['root'],_0xe193('0x18')));},'filename':function(_0x5f3b9a,_0x47928b,_0x2c030c){_0x2c030c(null,util[_0xe193('0x19')](_0xe193('0x1a'),Date[_0xe193('0x1b')](),_0x47928b[_0xe193('0x1c')][_0xe193('0x1d')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xe193('0x13')](_0xe193('0x1e'),upload[_0xe193('0x1f')](_0xe193('0x20')),controller[_0xe193('0x21')]);router[_0xe193('0x13')](_0xe193('0x10'),auth[_0xe193('0xe')](),controller[_0xe193('0x22')]);router[_0xe193('0x13')](_0xe193('0x23'),auth[_0xe193('0x9')](),interaction[_0xe193('0x24')](_0xe193('0x25'),'chatinteraction:addtags'),controller[_0xe193('0x26')]);router['put'](_0xe193('0xb'),auth[_0xe193('0x9')](),interaction['tracked']('chat','chatinteraction:update'),controller[_0xe193('0x27')]);router[_0xe193('0x28')](_0xe193('0x29'),controller['customUpdate']);router[_0xe193('0x28')](_0xe193('0x2a'),auth[_0xe193('0xe')](),controller[_0xe193('0x2b')]);router[_0xe193('0x28')]('/:id/close',controller[_0xe193('0x2c')]);router['delete'](_0xe193('0xb'),auth['isAuthenticated'](),interaction[_0xe193('0x24')]('chat','chatinteraction:destroy'),controller[_0xe193('0x2d')]);router[_0xe193('0x2e')](_0xe193('0x23'),auth[_0xe193('0x9')](),controller[_0xe193('0x2f')]);module[_0xe193('0x30')]=router;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
index 785abdf..0770106 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.attributes.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xe20e=['medium','BOOLEAN','INTEGER','sequelize','exports','TEXT'];(function(_0x2b582c,_0xce9b8b){var _0x13323e=function(_0x403087){while(--_0x403087){_0x2b582c['push'](_0x2b582c['shift']());}};_0x13323e(++_0xce9b8b);}(_0xe20e,0x171));var _0xee20=function(_0x127a60,_0x37f33a){_0x127a60=_0x127a60-0x0;var _0xc1f6a3=_0xe20e[_0x127a60];return _0xc1f6a3;};'use strict';var Sequelize=require(_0xee20('0x0'));module[_0xee20('0x1')]={'body':{'type':Sequelize[_0xee20('0x2')](_0xee20('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0xee20('0x4')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xee20('0x5')]}};
\ No newline at end of file
+var _0x6ebf=['exports','BOOLEAN','INTEGER','sequelize'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x6ebf,0x9f));var _0xf6eb=function(_0x45b29d,_0x44ce43){_0x45b29d=_0x45b29d-0x0;var _0x32d74=_0x6ebf[_0x45b29d];return _0x32d74;};'use strict';var Sequelize=require(_0xf6eb('0x0'));module[_0xf6eb('0x1')]={'body':{'type':Sequelize['TEXT']('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xf6eb('0x2')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xf6eb('0x3')]}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js
index 16dd7b0..7eb1564 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.controller.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbd08=['agent','admin','user','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','userProfileId','autoAssociation','UserProfileResource','isEmpty','messages','push','ToId','read','-createdAt','all','eml-format','zip-dir','fast-json-patch','moment','util','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','redis','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','end','name','send','index','ChatInternalMessage','rawAttributes','fieldName','key','model','map','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filters','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','update','describe','get','lastMessageAt','createdAt','format','YYYY-MM-DD\x20HH:mm:ss','lastMessage','getUsers'];(function(_0x58506e,_0x369f9d){var _0x4cd297=function(_0x3d251f){while(--_0x3d251f){_0x58506e['push'](_0x58506e['shift']());}};_0x4cd297(++_0x369f9d);}(_0xbd08,0x163));var _0x8bd0=function(_0x35885a,_0x42fed7){_0x35885a=_0x35885a-0x0;var _0xe86249=_0xbd08[_0x35885a];return _0xe86249;};'use strict';var emlformat=require(_0x8bd0('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8bd0('0x1'));var jsonpatch=require(_0x8bd0('0x2'));var rp=require('request-promise');var moment=require(_0x8bd0('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x8bd0('0x4'));var path=require(_0x8bd0('0x5'));var sox=require('sox');var csv=require(_0x8bd0('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8bd0('0x7'));var _=require(_0x8bd0('0x8'));var squel=require(_0x8bd0('0x9'));var crypto=require(_0x8bd0('0xa'));var jsforce=require(_0x8bd0('0xb'));var deskjs=require(_0x8bd0('0xc'));var toCsv=require(_0x8bd0('0x6'));var querystring=require(_0x8bd0('0xd'));var Papa=require('papaparse');var Redis=require(_0x8bd0('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x8bd0('0xf'));var as=require(_0x8bd0('0x10'));var hardwareService=require(_0x8bd0('0x11'));var logger=require('../../config/logger')('api');var utils=require(_0x8bd0('0x12'));var config=require(_0x8bd0('0x13'));var licenseUtil=require(_0x8bd0('0x14'));var db=require('../../mysqldb')['db'];config[_0x8bd0('0x15')]=_['defaults'](config[_0x8bd0('0x15')],{'host':'localhost','port':0x18eb});var socket=require(_0x8bd0('0x16'))(new Redis(config[_0x8bd0('0x15')]));require(_0x8bd0('0x17'))[_0x8bd0('0x18')](socket);function respondWithStatusCode(_0x53c763,_0x47a69b){_0x47a69b=_0x47a69b||0xcc;return function(_0x4cef03){if(_0x4cef03){return _0x53c763[_0x8bd0('0x19')](_0x47a69b);}return _0x53c763[_0x8bd0('0x1a')](_0x47a69b)['end']();};}function respondWithResult(_0x1f79e0,_0x47ae26){_0x47ae26=_0x47ae26||0xc8;return function(_0x3875f0){if(_0x3875f0){return _0x1f79e0['status'](_0x47ae26)[_0x8bd0('0x1b')](_0x3875f0);}};}function respondWithFilteredResult(_0x2c19ec,_0x243d06){return function(_0x5ac561){if(_0x5ac561){var _0x56ed9d=typeof _0x243d06[_0x8bd0('0x1c')]===_0x8bd0('0x1d')&&typeof _0x243d06[_0x8bd0('0x1e')]===_0x8bd0('0x1d');var _0x308deb=_0x5ac561[_0x8bd0('0x1f')];var _0x590ed=_0x56ed9d?0x0:_0x243d06['offset'];var _0x1b1a3c=_0x56ed9d?_0x5ac561['count']:_0x243d06['offset']+_0x243d06[_0x8bd0('0x1e')];var _0x5b1c87;if(_0x1b1a3c>=_0x308deb){_0x1b1a3c=_0x308deb;_0x5b1c87=0xc8;}else{_0x5b1c87=0xce;}_0x2c19ec[_0x8bd0('0x1a')](_0x5b1c87);return _0x2c19ec[_0x8bd0('0x20')](_0x8bd0('0x21'),_0x590ed+'-'+_0x1b1a3c+'/'+_0x308deb)[_0x8bd0('0x1b')](_0x5ac561);}return null;};}function patchUpdates(_0x3d3b3d){return function(_0x4331b3){try{jsonpatch[_0x8bd0('0x22')](_0x4331b3,_0x3d3b3d,!![]);}catch(_0x4725ee){return BPromise[_0x8bd0('0x23')](_0x4725ee);}return _0x4331b3[_0x8bd0('0x24')]();};}function saveUpdates(_0x2ec05d,_0x4ce4b1){return function(_0x196115){if(_0x196115){return _0x196115['update'](_0x2ec05d)[_0x8bd0('0x25')](function(_0x53faa6){return _0x53faa6;});}return null;};}function removeEntity(_0x1dde3a,_0x1aa286){return function(_0x23ebbd){if(_0x23ebbd){return _0x23ebbd[_0x8bd0('0x26')]()[_0x8bd0('0x25')](function(){_0x1dde3a[_0x8bd0('0x1a')](0xcc)[_0x8bd0('0x27')]();});}};}function handleEntityNotFound(_0x4a2875,_0x3277fa){return function(_0x15ab81){if(!_0x15ab81){_0x4a2875[_0x8bd0('0x19')](0x194);}return _0x15ab81;};}function handleError(_0x2a4fb3,_0x6910c1){_0x6910c1=_0x6910c1||0x1f4;return function(_0x11fb38){logger['error'](_0x11fb38['stack']);if(_0x11fb38[_0x8bd0('0x28')]){delete _0x11fb38[_0x8bd0('0x28')];}_0x2a4fb3[_0x8bd0('0x1a')](_0x6910c1)[_0x8bd0('0x29')](_0x11fb38);};}exports[_0x8bd0('0x2a')]=function(_0x227bc7,_0x370369){var _0x172f39={},_0x4f74ec={},_0x1545b5={'count':0x0,'rows':[]};var _0x4ff3d4=_['map'](db[_0x8bd0('0x2b')][_0x8bd0('0x2c')],function(_0x23e115){return{'name':_0x23e115[_0x8bd0('0x2d')],'type':_0x23e115['type'][_0x8bd0('0x2e')]};});_0x4f74ec[_0x8bd0('0x2f')]=_[_0x8bd0('0x30')](_0x4ff3d4,_0x8bd0('0x28'));_0x4f74ec[_0x8bd0('0x31')]=_['keys'](_0x227bc7[_0x8bd0('0x31')]);_0x4f74ec['filters']=_[_0x8bd0('0x32')](_0x4f74ec[_0x8bd0('0x2f')],_0x4f74ec[_0x8bd0('0x31')]);_0x172f39[_0x8bd0('0x33')]=_[_0x8bd0('0x32')](_0x4f74ec[_0x8bd0('0x2f')],qs[_0x8bd0('0x34')](_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x34')]));_0x172f39[_0x8bd0('0x33')]=_0x172f39['attributes'][_0x8bd0('0x35')]?_0x172f39[_0x8bd0('0x33')]:_0x4f74ec['model'];if(!_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x36')]('nolimit')){_0x172f39[_0x8bd0('0x1e')]=qs[_0x8bd0('0x1e')](_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x1e')]);_0x172f39[_0x8bd0('0x1c')]=qs[_0x8bd0('0x1c')](_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x1c')]);}_0x172f39[_0x8bd0('0x37')]=qs[_0x8bd0('0x38')](_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x38')]);_0x172f39[_0x8bd0('0x39')]=qs['filters'](_[_0x8bd0('0x3a')](_0x227bc7[_0x8bd0('0x31')],_0x4f74ec[_0x8bd0('0x3b')]),_0x4ff3d4);if(_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x3c')]){_0x172f39['where']=_[_0x8bd0('0x3d')](_0x172f39['where'],{'$or':_['map'](_0x4ff3d4,function(_0x173ec7){if(_0x173ec7[_0x8bd0('0x3e')]!==_0x8bd0('0x3f')){var _0x5e2907={};_0x5e2907[_0x173ec7[_0x8bd0('0x28')]]={'$like':'%'+_0x227bc7['query'][_0x8bd0('0x3c')]+'%'};return _0x5e2907;}})});}_0x172f39=_[_0x8bd0('0x3d')]({},_0x172f39,_0x227bc7[_0x8bd0('0x40')]);var _0xf8c260={'where':_0x172f39['where']};return db['ChatInternalMessage'][_0x8bd0('0x1f')](_0xf8c260)['then'](function(_0x5347c0){_0x1545b5['count']=_0x5347c0;if(_0x227bc7[_0x8bd0('0x31')][_0x8bd0('0x41')]){_0x172f39[_0x8bd0('0x42')]=[{'all':!![]}];}return db[_0x8bd0('0x2b')][_0x8bd0('0x43')](_0x172f39);})['then'](function(_0x4203ed){_0x1545b5[_0x8bd0('0x44')]=_0x4203ed;return _0x1545b5;})[_0x8bd0('0x25')](respondWithFilteredResult(_0x370369,_0x172f39))[_0x8bd0('0x45')](handleError(_0x370369,null));};exports[_0x8bd0('0x46')]=function(_0x5c48d9,_0x1299fc){var _0x109953={'raw':!![],'where':{'id':_0x5c48d9[_0x8bd0('0x47')]['id']}},_0x54f8bf={};_0x54f8bf['model']=_['keys'](db[_0x8bd0('0x2b')][_0x8bd0('0x2c')]);_0x54f8bf['query']=_[_0x8bd0('0x48')](_0x5c48d9[_0x8bd0('0x31')]);_0x54f8bf[_0x8bd0('0x3b')]=_[_0x8bd0('0x32')](_0x54f8bf[_0x8bd0('0x2f')],_0x54f8bf[_0x8bd0('0x31')]);_0x109953[_0x8bd0('0x33')]=_[_0x8bd0('0x32')](_0x54f8bf[_0x8bd0('0x2f')],qs[_0x8bd0('0x34')](_0x5c48d9['query'][_0x8bd0('0x34')]));_0x109953[_0x8bd0('0x33')]=_0x109953[_0x8bd0('0x33')]['length']?_0x109953['attributes']:_0x54f8bf[_0x8bd0('0x2f')];if(_0x5c48d9['query']['includeAll']){_0x109953['include']=[{'all':!![]}];}_0x109953=_[_0x8bd0('0x3d')]({},_0x109953,_0x5c48d9[_0x8bd0('0x40')]);return db[_0x8bd0('0x2b')][_0x8bd0('0x49')](_0x109953)['then'](handleEntityNotFound(_0x1299fc,null))[_0x8bd0('0x25')](respondWithResult(_0x1299fc,null))[_0x8bd0('0x45')](handleError(_0x1299fc,null));};exports[_0x8bd0('0x4a')]=function(_0x1fb3c8,_0x3e35b8){return db[_0x8bd0('0x2b')][_0x8bd0('0x4a')](_0x1fb3c8[_0x8bd0('0x4b')],{})[_0x8bd0('0x25')](respondWithResult(_0x3e35b8,0xc9))[_0x8bd0('0x45')](handleError(_0x3e35b8,null));};exports[_0x8bd0('0x4c')]=function(_0x42f987,_0x322ad9){if(_0x42f987[_0x8bd0('0x4b')]['id']){delete _0x42f987[_0x8bd0('0x4b')]['id'];}return db[_0x8bd0('0x2b')]['find']({'where':{'id':_0x42f987['params']['id']}})[_0x8bd0('0x25')](handleEntityNotFound(_0x322ad9,null))[_0x8bd0('0x25')](saveUpdates(_0x42f987[_0x8bd0('0x4b')],null))[_0x8bd0('0x25')](respondWithResult(_0x322ad9,null))['catch'](handleError(_0x322ad9,null));};exports[_0x8bd0('0x26')]=function(_0x3258aa,_0x2f7f80){return db[_0x8bd0('0x2b')][_0x8bd0('0x49')]({'where':{'id':_0x3258aa[_0x8bd0('0x47')]['id']}})[_0x8bd0('0x25')](handleEntityNotFound(_0x2f7f80,null))[_0x8bd0('0x25')](removeEntity(_0x2f7f80,null))[_0x8bd0('0x45')](handleError(_0x2f7f80,null));};exports[_0x8bd0('0x4d')]=function(_0x50b2a1,_0x26da61){return db[_0x8bd0('0x2b')]['describe']()[_0x8bd0('0x25')](respondWithResult(_0x26da61,null))[_0x8bd0('0x45')](handleError(_0x26da61,null));};function wrapUser(_0x31462a){return function(_0xb07ffd){var _0x59279c=_0x31462a[_0x8bd0('0x4e')]({'plain':!![]});_0x59279c['messages']=[];if(_0xb07ffd){_0x59279c[_0x8bd0('0x4f')]=_0xb07ffd[_0x8bd0('0x50')];_0x59279c['lastMessage']=_0xb07ffd;}else{_0x59279c[_0x8bd0('0x4f')]=moment(0x0)[_0x8bd0('0x51')](_0x8bd0('0x52'));_0x59279c[_0x8bd0('0x53')]={};}return _0x59279c;};}exports[_0x8bd0('0x54')]=function(_0x4b05bf,_0x4cfeff,_0x4f3de3){var _0x4ecf68=[];return db['User'][_0x8bd0('0x43')]({'where':{'role':[_0x8bd0('0x55'),_0x8bd0('0x56'),_0x8bd0('0x57')]},'attributes':['id','fullname',_0x8bd0('0x28'),_0x8bd0('0x58'),_0x8bd0('0x59'),_0x8bd0('0x5a'),_0x8bd0('0x5b'),_0x8bd0('0x5c'),_0x8bd0('0x5d'),_0x8bd0('0x5e')],'order':qs[_0x8bd0('0x38')]('-online'),'include':[{'model':db[_0x8bd0('0x5f')],'as':_0x8bd0('0x60'),'attributes':['id','name',_0x8bd0('0x3e')],'through':{'attributes':[]}}]})['then'](function(_0x5e893d){if(_0x5e893d){var _0x5030de=_0x4b05bf[_0x8bd0('0x57')][_0x8bd0('0x4e')]({'plain':!![]});if(!_0x5030de)throw new Error(_0x8bd0('0x61'));if(_0x5030de[_0x8bd0('0x58')]===_0x8bd0('0x57')){return db[_0x8bd0('0x62')][_0x8bd0('0x49')]({'where':{'name':_0x8bd0('0x63'),'userProfileId':_0x5030de[_0x8bd0('0x64')]},'raw':!![]})['then'](function(_0x11afd4){if(_0x11afd4){if(_0x11afd4[_0x8bd0('0x65')]===0x0){return db[_0x8bd0('0x66')][_0x8bd0('0x43')]({'where':{'sectionId':_0x11afd4['id']},'raw':!![]})['then'](function(_0x91b4eb){var _0x13d2c7=[];if(_[_0x8bd0('0x67')](_0x91b4eb)){_0x13d2c7=_[_0x8bd0('0x3c')](_0x5e893d,function(_0xf1afce){if(_0xf1afce[_0x8bd0('0x58')]!==_0x8bd0('0x55')){return _0xf1afce;}});return _0x13d2c7;}else{for(var _0x7b947a=0x0;_0x7b947a<_0x5e893d[_0x8bd0('0x35')];_0x7b947a++){var _0x6ac35a=_0x5e893d[_0x7b947a];if(_0x6ac35a[_0x8bd0('0x58')]===_0x8bd0('0x55')){var _0x2b52eb=_[_0x8bd0('0x49')](_0x91b4eb,function(_0x53d82f){return _0x53d82f['resourceId']===_0x6ac35a['id'];});if(_0x2b52eb)_0x13d2c7['push'](_0x6ac35a);}else{_0x13d2c7['push'](_0x6ac35a);}}return _0x13d2c7;}});}else{return _0x5e893d;}}else{var _0x5e9906=_[_0x8bd0('0x3c')](_0x5e893d,function(_0x4160a8){if(_0x4160a8[_0x8bd0('0x58')]!==_0x8bd0('0x55')){return _0x4160a8;}});return _0x5e9906;}});}else{return _0x5e893d;}}})[_0x8bd0('0x25')](function(_0x2bab9a){var _0x39b26a=[];if(_0x2bab9a){_0x4ecf68=_0x2bab9a;for(var _0x86bfee=0x0;_0x86bfee<_0x2bab9a[_0x8bd0('0x35')];_0x86bfee+=0x1){_0x4ecf68[_0x86bfee][_0x8bd0('0x68')]=[];_0x39b26a[_0x8bd0('0x69')](db[_0x8bd0('0x2b')][_0x8bd0('0x49')]({'where':{'FromId':[_0x4b05bf[_0x8bd0('0x57')]['id'],_0x2bab9a[_0x86bfee]['id']],'ToId':[_0x4b05bf[_0x8bd0('0x57')]['id'],_0x2bab9a[_0x86bfee]['id']],'ChatGroupId':null},'attributes':['id',_0x8bd0('0x50'),'FromId',_0x8bd0('0x6a'),_0x8bd0('0x6b'),_0x8bd0('0x4b')],'order':qs[_0x8bd0('0x38')](_0x8bd0('0x6c')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x8bd0('0x25')](wrapUser(_0x2bab9a[_0x86bfee])));}return BPromise[_0x8bd0('0x6d')](_0x39b26a);}return[];})[_0x8bd0('0x25')](function(_0x5b41f6){return{'rows':_0x5b41f6,'count':_0x5b41f6[_0x8bd0('0x35')]};})[_0x8bd0('0x25')](respondWithResult(_0x4cfeff,null))[_0x8bd0('0x45')](handleError(_0x4cfeff,null));};
\ No newline at end of file
+var _0x5aae=['create','body','describe','get','messages','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','getUsers','User','agent','admin','user','fullname','online','allowmessenger','showWebBar','-online','VoiceQueue','VoiceQueues','role','UserProfileSection','userProfileId','isEmpty','filter','resourceId','push','FromId','ToId','read','-createdAt','all','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatInternalMessage.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','map','ChatInternalMessage','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','order','sort','where','pick','filters','merge','options','includeAll','include','findAll','rows','catch','show','params','find'];(function(_0x488962,_0x4aa9a3){var _0x123330=function(_0x28e5ba){while(--_0x28e5ba){_0x488962['push'](_0x488962['shift']());}};_0x123330(++_0x4aa9a3);}(_0x5aae,0x1de));var _0xe5aa=function(_0x2356e3,_0x3c1521){_0x2356e3=_0x2356e3-0x0;var _0x12e9f7=_0x5aae[_0x2356e3];return _0x12e9f7;};'use strict';var emlformat=require(_0xe5aa('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe5aa('0x1'));var jsonpatch=require(_0xe5aa('0x2'));var rp=require(_0xe5aa('0x3'));var moment=require(_0xe5aa('0x4'));var BPromise=require(_0xe5aa('0x5'));var Mustache=require(_0xe5aa('0x6'));var util=require('util');var path=require(_0xe5aa('0x7'));var sox=require(_0xe5aa('0x8'));var csv=require(_0xe5aa('0x9'));var ejs=require(_0xe5aa('0xa'));var fs=require('fs');var fs_extra=require(_0xe5aa('0xb'));var _=require(_0xe5aa('0xc'));var squel=require(_0xe5aa('0xd'));var crypto=require(_0xe5aa('0xe'));var jsforce=require(_0xe5aa('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xe5aa('0x10'));var Redis=require(_0xe5aa('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xe5aa('0x12'));var as=require(_0xe5aa('0x13'));var hardwareService=require(_0xe5aa('0x14'));var logger=require(_0xe5aa('0x15'))(_0xe5aa('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xe5aa('0x17'));var db=require(_0xe5aa('0x18'))['db'];config[_0xe5aa('0x19')]=_[_0xe5aa('0x1a')](config[_0xe5aa('0x19')],{'host':_0xe5aa('0x1b'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe5aa('0x19')]));require(_0xe5aa('0x1c'))[_0xe5aa('0x1d')](socket);function respondWithStatusCode(_0x2fb57f,_0x355a87){_0x355a87=_0x355a87||0xcc;return function(_0x419be3){if(_0x419be3){return _0x2fb57f[_0xe5aa('0x1e')](_0x355a87);}return _0x2fb57f[_0xe5aa('0x1f')](_0x355a87)[_0xe5aa('0x20')]();};}function respondWithResult(_0x5d0ef1,_0x4a68d5){_0x4a68d5=_0x4a68d5||0xc8;return function(_0x321e42){if(_0x321e42){return _0x5d0ef1['status'](_0x4a68d5)[_0xe5aa('0x21')](_0x321e42);}};}function respondWithFilteredResult(_0x8b50ba,_0xa2e062){return function(_0x17d65){if(_0x17d65){var _0x7a29d9=typeof _0xa2e062[_0xe5aa('0x22')]===_0xe5aa('0x23')&&typeof _0xa2e062[_0xe5aa('0x24')]===_0xe5aa('0x23');var _0x43aa99=_0x17d65['count'];var _0xb4c393=_0x7a29d9?0x0:_0xa2e062[_0xe5aa('0x22')];var _0x1bbd6e=_0x7a29d9?_0x17d65[_0xe5aa('0x25')]:_0xa2e062['offset']+_0xa2e062[_0xe5aa('0x24')];var _0xa6484c;if(_0x1bbd6e>=_0x43aa99){_0x1bbd6e=_0x43aa99;_0xa6484c=0xc8;}else{_0xa6484c=0xce;}_0x8b50ba['status'](_0xa6484c);return _0x8b50ba['set'](_0xe5aa('0x26'),_0xb4c393+'-'+_0x1bbd6e+'/'+_0x43aa99)['json'](_0x17d65);}return null;};}function patchUpdates(_0xde88c3){return function(_0xf8f024){try{jsonpatch[_0xe5aa('0x27')](_0xf8f024,_0xde88c3,!![]);}catch(_0x4770d1){return BPromise[_0xe5aa('0x28')](_0x4770d1);}return _0xf8f024[_0xe5aa('0x29')]();};}function saveUpdates(_0x471f16,_0x415720){return function(_0x5eefff){if(_0x5eefff){return _0x5eefff[_0xe5aa('0x2a')](_0x471f16)[_0xe5aa('0x2b')](function(_0x4fd87c){return _0x4fd87c;});}return null;};}function removeEntity(_0x379576,_0x536af0){return function(_0x25c87e){if(_0x25c87e){return _0x25c87e[_0xe5aa('0x2c')]()[_0xe5aa('0x2b')](function(){_0x379576[_0xe5aa('0x1f')](0xcc)[_0xe5aa('0x20')]();});}};}function handleEntityNotFound(_0x5f4a53,_0x1d49ea){return function(_0x4281d7){if(!_0x4281d7){_0x5f4a53[_0xe5aa('0x1e')](0x194);}return _0x4281d7;};}function handleError(_0x1055bb,_0x8f6c94){_0x8f6c94=_0x8f6c94||0x1f4;return function(_0x176602){logger[_0xe5aa('0x2d')](_0x176602[_0xe5aa('0x2e')]);if(_0x176602['name']){delete _0x176602[_0xe5aa('0x2f')];}_0x1055bb[_0xe5aa('0x1f')](_0x8f6c94)[_0xe5aa('0x30')](_0x176602);};}exports['index']=function(_0x12a63c,_0x7773ed){var _0x15104f={},_0x9a7f1c={},_0x4a98fe={'count':0x0,'rows':[]};var _0x254987=_[_0xe5aa('0x31')](db[_0xe5aa('0x32')][_0xe5aa('0x33')],function(_0x5dc0d3){return{'name':_0x5dc0d3[_0xe5aa('0x34')],'type':_0x5dc0d3[_0xe5aa('0x35')][_0xe5aa('0x36')]};});_0x9a7f1c[_0xe5aa('0x37')]=_[_0xe5aa('0x31')](_0x254987,'name');_0x9a7f1c[_0xe5aa('0x38')]=_[_0xe5aa('0x39')](_0x12a63c['query']);_0x9a7f1c['filters']=_[_0xe5aa('0x3a')](_0x9a7f1c[_0xe5aa('0x37')],_0x9a7f1c[_0xe5aa('0x38')]);_0x15104f[_0xe5aa('0x3b')]=_[_0xe5aa('0x3a')](_0x9a7f1c[_0xe5aa('0x37')],qs[_0xe5aa('0x3c')](_0x12a63c[_0xe5aa('0x38')][_0xe5aa('0x3c')]));_0x15104f[_0xe5aa('0x3b')]=_0x15104f[_0xe5aa('0x3b')][_0xe5aa('0x3d')]?_0x15104f[_0xe5aa('0x3b')]:_0x9a7f1c[_0xe5aa('0x37')];if(!_0x12a63c[_0xe5aa('0x38')]['hasOwnProperty']('nolimit')){_0x15104f['limit']=qs[_0xe5aa('0x24')](_0x12a63c[_0xe5aa('0x38')]['limit']);_0x15104f[_0xe5aa('0x22')]=qs[_0xe5aa('0x22')](_0x12a63c[_0xe5aa('0x38')][_0xe5aa('0x22')]);}_0x15104f[_0xe5aa('0x3e')]=qs['sort'](_0x12a63c[_0xe5aa('0x38')][_0xe5aa('0x3f')]);_0x15104f[_0xe5aa('0x40')]=qs['filters'](_[_0xe5aa('0x41')](_0x12a63c[_0xe5aa('0x38')],_0x9a7f1c[_0xe5aa('0x42')]),_0x254987);if(_0x12a63c[_0xe5aa('0x38')]['filter']){_0x15104f[_0xe5aa('0x40')]=_[_0xe5aa('0x43')](_0x15104f['where'],{'$or':_['map'](_0x254987,function(_0x2b1ef8){if(_0x2b1ef8[_0xe5aa('0x35')]!=='VIRTUAL'){var _0x39e6f9={};_0x39e6f9[_0x2b1ef8[_0xe5aa('0x2f')]]={'$like':'%'+_0x12a63c['query']['filter']+'%'};return _0x39e6f9;}})});}_0x15104f=_[_0xe5aa('0x43')]({},_0x15104f,_0x12a63c[_0xe5aa('0x44')]);var _0x1d11a7={'where':_0x15104f[_0xe5aa('0x40')]};return db[_0xe5aa('0x32')][_0xe5aa('0x25')](_0x1d11a7)['then'](function(_0x37a031){_0x4a98fe[_0xe5aa('0x25')]=_0x37a031;if(_0x12a63c[_0xe5aa('0x38')][_0xe5aa('0x45')]){_0x15104f[_0xe5aa('0x46')]=[{'all':!![]}];}return db[_0xe5aa('0x32')][_0xe5aa('0x47')](_0x15104f);})['then'](function(_0x20054a){_0x4a98fe[_0xe5aa('0x48')]=_0x20054a;return _0x4a98fe;})['then'](respondWithFilteredResult(_0x7773ed,_0x15104f))[_0xe5aa('0x49')](handleError(_0x7773ed,null));};exports[_0xe5aa('0x4a')]=function(_0x2f65b6,_0x2d10c8){var _0x22ac77={'raw':!![],'where':{'id':_0x2f65b6[_0xe5aa('0x4b')]['id']}},_0x2341fd={};_0x2341fd[_0xe5aa('0x37')]=_[_0xe5aa('0x39')](db[_0xe5aa('0x32')][_0xe5aa('0x33')]);_0x2341fd[_0xe5aa('0x38')]=_['keys'](_0x2f65b6[_0xe5aa('0x38')]);_0x2341fd[_0xe5aa('0x42')]=_[_0xe5aa('0x3a')](_0x2341fd[_0xe5aa('0x37')],_0x2341fd[_0xe5aa('0x38')]);_0x22ac77[_0xe5aa('0x3b')]=_[_0xe5aa('0x3a')](_0x2341fd[_0xe5aa('0x37')],qs['fields'](_0x2f65b6[_0xe5aa('0x38')][_0xe5aa('0x3c')]));_0x22ac77[_0xe5aa('0x3b')]=_0x22ac77['attributes'][_0xe5aa('0x3d')]?_0x22ac77[_0xe5aa('0x3b')]:_0x2341fd['model'];if(_0x2f65b6[_0xe5aa('0x38')]['includeAll']){_0x22ac77[_0xe5aa('0x46')]=[{'all':!![]}];}_0x22ac77=_[_0xe5aa('0x43')]({},_0x22ac77,_0x2f65b6['options']);return db[_0xe5aa('0x32')][_0xe5aa('0x4c')](_0x22ac77)['then'](handleEntityNotFound(_0x2d10c8,null))[_0xe5aa('0x2b')](respondWithResult(_0x2d10c8,null))[_0xe5aa('0x49')](handleError(_0x2d10c8,null));};exports[_0xe5aa('0x4d')]=function(_0x49940c,_0x4393e6){return db[_0xe5aa('0x32')][_0xe5aa('0x4d')](_0x49940c['body'],{})[_0xe5aa('0x2b')](respondWithResult(_0x4393e6,0xc9))['catch'](handleError(_0x4393e6,null));};exports[_0xe5aa('0x2a')]=function(_0xc5a820,_0x37cd96){if(_0xc5a820[_0xe5aa('0x4e')]['id']){delete _0xc5a820[_0xe5aa('0x4e')]['id'];}return db[_0xe5aa('0x32')]['find']({'where':{'id':_0xc5a820[_0xe5aa('0x4b')]['id']}})[_0xe5aa('0x2b')](handleEntityNotFound(_0x37cd96,null))[_0xe5aa('0x2b')](saveUpdates(_0xc5a820[_0xe5aa('0x4e')],null))[_0xe5aa('0x2b')](respondWithResult(_0x37cd96,null))[_0xe5aa('0x49')](handleError(_0x37cd96,null));};exports[_0xe5aa('0x2c')]=function(_0x2f5ed3,_0x3cb4a6){return db['ChatInternalMessage'][_0xe5aa('0x4c')]({'where':{'id':_0x2f5ed3[_0xe5aa('0x4b')]['id']}})[_0xe5aa('0x2b')](handleEntityNotFound(_0x3cb4a6,null))['then'](removeEntity(_0x3cb4a6,null))[_0xe5aa('0x49')](handleError(_0x3cb4a6,null));};exports[_0xe5aa('0x4f')]=function(_0x15fe34,_0x16276a){return db[_0xe5aa('0x32')][_0xe5aa('0x4f')]()[_0xe5aa('0x2b')](respondWithResult(_0x16276a,null))['catch'](handleError(_0x16276a,null));};function wrapUser(_0x3c6bd0){return function(_0x43ac8c){var _0x52a882=_0x3c6bd0[_0xe5aa('0x50')]({'plain':!![]});_0x52a882[_0xe5aa('0x51')]=[];if(_0x43ac8c){_0x52a882[_0xe5aa('0x52')]=_0x43ac8c[_0xe5aa('0x53')];_0x52a882[_0xe5aa('0x54')]=_0x43ac8c;}else{_0x52a882[_0xe5aa('0x52')]=moment(0x0)[_0xe5aa('0x55')](_0xe5aa('0x56'));_0x52a882[_0xe5aa('0x54')]={};}return _0x52a882;};}exports[_0xe5aa('0x57')]=function(_0x5505f9,_0x1cc492,_0x2f3598){var _0xafe73b=[];return db[_0xe5aa('0x58')][_0xe5aa('0x47')]({'where':{'role':[_0xe5aa('0x59'),_0xe5aa('0x5a'),_0xe5aa('0x5b')]},'attributes':['id',_0xe5aa('0x5c'),_0xe5aa('0x2f'),'role','userpic','internal',_0xe5aa('0x5d'),'lastLoginAt',_0xe5aa('0x5e'),_0xe5aa('0x5f')],'order':qs[_0xe5aa('0x3f')](_0xe5aa('0x60')),'include':[{'model':db[_0xe5aa('0x61')],'as':_0xe5aa('0x62'),'attributes':['id',_0xe5aa('0x2f'),_0xe5aa('0x35')],'through':{'attributes':[]}}]})['then'](function(_0x503e2c){if(_0x503e2c){var _0x2a9469=_0x5505f9[_0xe5aa('0x5b')]['get']({'plain':!![]});if(!_0x2a9469)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2a9469[_0xe5aa('0x63')]===_0xe5aa('0x5b')){return db[_0xe5aa('0x64')][_0xe5aa('0x4c')]({'where':{'name':'Agents','userProfileId':_0x2a9469[_0xe5aa('0x65')]},'raw':!![]})[_0xe5aa('0x2b')](function(_0x1cee72){if(_0x1cee72){if(_0x1cee72['autoAssociation']===0x0){return db['UserProfileResource'][_0xe5aa('0x47')]({'where':{'sectionId':_0x1cee72['id']},'raw':!![]})[_0xe5aa('0x2b')](function(_0x39c6d6){var _0x43754e=[];if(_[_0xe5aa('0x66')](_0x39c6d6)){_0x43754e=_[_0xe5aa('0x67')](_0x503e2c,function(_0x4144c1){if(_0x4144c1['role']!=='agent'){return _0x4144c1;}});return _0x43754e;}else{for(var _0x46b847=0x0;_0x46b847<_0x503e2c[_0xe5aa('0x3d')];_0x46b847++){var _0x1dec51=_0x503e2c[_0x46b847];if(_0x1dec51[_0xe5aa('0x63')]===_0xe5aa('0x59')){var _0x1148c2=_[_0xe5aa('0x4c')](_0x39c6d6,function(_0x485ca4){return _0x485ca4[_0xe5aa('0x68')]===_0x1dec51['id'];});if(_0x1148c2)_0x43754e['push'](_0x1dec51);}else{_0x43754e[_0xe5aa('0x69')](_0x1dec51);}}return _0x43754e;}});}else{return _0x503e2c;}}else{var _0x219714=_['filter'](_0x503e2c,function(_0x1010f6){if(_0x1010f6[_0xe5aa('0x63')]!=='agent'){return _0x1010f6;}});return _0x219714;}});}else{return _0x503e2c;}}})['then'](function(_0x237626){var _0x20815b=[];if(_0x237626){_0xafe73b=_0x237626;for(var _0x3c3d20=0x0;_0x3c3d20<_0x237626['length'];_0x3c3d20+=0x1){_0xafe73b[_0x3c3d20][_0xe5aa('0x51')]=[];_0x20815b[_0xe5aa('0x69')](db['ChatInternalMessage'][_0xe5aa('0x4c')]({'where':{'FromId':[_0x5505f9[_0xe5aa('0x5b')]['id'],_0x237626[_0x3c3d20]['id']],'ToId':[_0x5505f9[_0xe5aa('0x5b')]['id'],_0x237626[_0x3c3d20]['id']],'ChatGroupId':null},'attributes':['id',_0xe5aa('0x53'),_0xe5aa('0x6a'),_0xe5aa('0x6b'),_0xe5aa('0x6c'),_0xe5aa('0x4e')],'order':qs[_0xe5aa('0x3f')](_0xe5aa('0x6d')),'limit':0x1,'offset':0x0,'raw':!![]})[_0xe5aa('0x2b')](wrapUser(_0x237626[_0x3c3d20])));}return BPromise[_0xe5aa('0x6e')](_0x20815b);}return[];})['then'](function(_0x4b21a7){return{'rows':_0x4b21a7,'count':_0x4b21a7['length']};})[_0xe5aa('0x2b')](respondWithResult(_0x1cc492,null))[_0xe5aa('0x49')](handleError(_0x1cc492,null));};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js
index 7c5516e..06e9b84 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.events.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3c9a=['../../mysqldb','ChatInternalMessage','save','emit','hasOwnProperty','events'];(function(_0x595d29,_0x3cab2a){var _0x254cdf=function(_0x2f3b9c){while(--_0x2f3b9c){_0x595d29['push'](_0x595d29['shift']());}};_0x254cdf(++_0x3cab2a);}(_0x3c9a,0x131));var _0xa3c9=function(_0x19ad71,_0x5e9627){_0x19ad71=_0x19ad71-0x0;var _0x1994e6=_0x3c9a[_0x19ad71];return _0x1994e6;};'use strict';var EventEmitter=require(_0xa3c9('0x0'));var ChatInternalMessage=require(_0xa3c9('0x1'))['db'][_0xa3c9('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa3c9('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x7db66d){return function(_0x9cc2f3,_0x4ec896,_0x392856){ChatInternalMessageEvents[_0xa3c9('0x4')](_0x7db66d+':'+_0x9cc2f3['id'],_0x9cc2f3);ChatInternalMessageEvents['emit'](_0x7db66d,_0x9cc2f3);_0x392856(null);};}for(var e in events){if(events[_0xa3c9('0x5')](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents;
\ No newline at end of file
+var _0xa940=['emit','hook','events','../../mysqldb','ChatInternalMessage','setMaxListeners','save'];(function(_0x513172,_0x46b320){var _0x33a292=function(_0x22bf10){while(--_0x22bf10){_0x513172['push'](_0x513172['shift']());}};_0x33a292(++_0x46b320);}(_0xa940,0x113));var _0x0a94=function(_0x1baa43,_0xf525ab){_0x1baa43=_0x1baa43-0x0;var _0x3c1329=_0xa940[_0x1baa43];return _0x3c1329;};'use strict';var EventEmitter=require(_0x0a94('0x0'));var ChatInternalMessage=require(_0x0a94('0x1'))['db'][_0x0a94('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x0a94('0x3')](0x0);var events={'afterCreate':_0x0a94('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x2fe403){return function(_0x44942c,_0x17c2d6,_0x25f6bf){ChatInternalMessageEvents[_0x0a94('0x5')](_0x2fe403+':'+_0x44942c['id'],_0x44942c);ChatInternalMessageEvents[_0x0a94('0x5')](_0x2fe403,_0x44942c);_0x25f6bf(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage[_0x0a94('0x6')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js
index 2cfe1f3..826f3b5 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.model.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb83d=['bluebird','request-promise','rimraf','../../config/environment','./chatInternalMessage.attributes','define','ChatInternalMessage','utf8mb4_unicode_ci','lodash','util','api','moment'];(function(_0x6c172e,_0x168af6){var _0x1428dd=function(_0x16753d){while(--_0x16753d){_0x6c172e['push'](_0x6c172e['shift']());}};_0x1428dd(++_0x168af6);}(_0xb83d,0x8c));var _0xdb83=function(_0x24c07c,_0x4889c5){_0x24c07c=_0x24c07c-0x0;var _0x413a44=_0xb83d[_0x24c07c];return _0x413a44;};'use strict';var _=require(_0xdb83('0x0'));var util=require(_0xdb83('0x1'));var logger=require('../../config/logger')(_0xdb83('0x2'));var moment=require(_0xdb83('0x3'));var BPromise=require(_0xdb83('0x4'));var rp=require(_0xdb83('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdb83('0x6'));var config=require(_0xdb83('0x7'));var attributes=require(_0xdb83('0x8'));module['exports']=function(_0x3fb8bd,_0x3a3e72){return _0x3fb8bd[_0xdb83('0x9')](_0xdb83('0xa'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xdb83('0xb')});};
\ No newline at end of file
+var _0x4f06=['utf8mb4_unicode_ci','lodash','util','api','bluebird','request-promise','rimraf','./chatInternalMessage.attributes','exports','ChatInternalMessage','chat_internal_messages','utf8mb4'];(function(_0x47604d,_0x15a014){var _0x388e4c=function(_0x42a446){while(--_0x42a446){_0x47604d['push'](_0x47604d['shift']());}};_0x388e4c(++_0x15a014);}(_0x4f06,0x91));var _0x64f0=function(_0x2ce86d,_0x60547){_0x2ce86d=_0x2ce86d-0x0;var _0x332157=_0x4f06[_0x2ce86d];return _0x332157;};'use strict';var _=require(_0x64f0('0x0'));var util=require(_0x64f0('0x1'));var logger=require('../../config/logger')(_0x64f0('0x2'));var moment=require('moment');var BPromise=require(_0x64f0('0x3'));var rp=require(_0x64f0('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x64f0('0x5'));var config=require('../../config/environment');var attributes=require(_0x64f0('0x6'));module[_0x64f0('0x7')]=function(_0xd89c3e,_0x1ce155){return _0xd89c3e['define'](_0x64f0('0x8'),attributes,{'tableName':_0x64f0('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x64f0('0xa'),'collate':_0x64f0('0xb')});};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
index 9f19f31..3bf6e89 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.rpc.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5915=['code','message','info','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','rpc','client','http','defaults','redis','localhost','socket.io-emitter','register','request','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2c3c23,_0x3609b5){var _0x24e0ee=function(_0x510410){while(--_0x510410){_0x2c3c23['push'](_0x2c3c23['shift']());}};_0x24e0ee(++_0x3609b5);}(_0x5915,0x14a));var _0x5591=function(_0x4c666d,_0x41cb12){_0x4c666d=_0x4c666d-0x0;var _0x1ad479=_0x5915[_0x4c666d];return _0x1ad479;};'use strict';var _=require(_0x5591('0x0'));var util=require(_0x5591('0x1'));var moment=require(_0x5591('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5591('0x3'));var db=require(_0x5591('0x4'))['db'];var utils=require(_0x5591('0x5'));var logger=require('../../config/logger')(_0x5591('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x5591('0x7')][_0x5591('0x8')]({'port':0x232a});config['redis']=_[_0x5591('0x9')](config[_0x5591('0xa')],{'host':_0x5591('0xb'),'port':0x18eb});var socket=require(_0x5591('0xc'))(new Redis(config[_0x5591('0xa')]));require('./chatInternalMessage.socket')[_0x5591('0xd')](socket);function respondWithRpcPromise(_0x3ca61c,_0x5a964e,_0xa9a68f){return new BPromise(function(_0x5d8375,_0x1636d3){return client[_0x5591('0xe')](_0x3ca61c,_0xa9a68f)['then'](function(_0x2b97a3){logger['info'](_0x5591('0xf'),_0x5a964e,_0x5591('0x10'));logger['debug'](_0x5591('0x11'),_0x5a964e,_0x5591('0x10'),JSON[_0x5591('0x12')](_0x2b97a3));if(_0x2b97a3[_0x5591('0x13')]){if(_0x2b97a3[_0x5591('0x13')][_0x5591('0x14')]===0x1f4){logger['error'](_0x5591('0xf'),_0x5a964e,_0x2b97a3[_0x5591('0x13')]['message']);return _0x1636d3(_0x2b97a3[_0x5591('0x13')][_0x5591('0x15')]);}logger[_0x5591('0x13')](_0x5591('0xf'),_0x5a964e,_0x2b97a3['error'][_0x5591('0x15')]);return _0x5d8375(_0x2b97a3[_0x5591('0x13')][_0x5591('0x15')]);}else{logger[_0x5591('0x16')](_0x5591('0xf'),_0x5a964e,_0x5591('0x10'));_0x5d8375(_0x2b97a3[_0x5591('0x17')][_0x5591('0x15')]);}})[_0x5591('0x18')](function(_0xf8fd40){logger[_0x5591('0x13')](_0x5591('0xf'),_0x5a964e,_0xf8fd40);_0x1636d3(_0xf8fd40);});});}
\ No newline at end of file
+var _0x3593=['defaults','localhost','register','request','then','info','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInternalMessage,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','redis'];(function(_0x523ef6,_0x38c250){var _0x1b5dcd=function(_0x302f6c){while(--_0x302f6c){_0x523ef6['push'](_0x523ef6['shift']());}};_0x1b5dcd(++_0x38c250);}(_0x3593,0xb8));var _0x3359=function(_0x498c9a,_0x43cd7f){_0x498c9a=_0x498c9a-0x0;var _0x63ef27=_0x3593[_0x498c9a];return _0x63ef27;};'use strict';var _=require(_0x3359('0x0'));var util=require(_0x3359('0x1'));var moment=require(_0x3359('0x2'));var BPromise=require(_0x3359('0x3'));var rs=require(_0x3359('0x4'));var fs=require('fs');var Redis=require(_0x3359('0x5'));var db=require(_0x3359('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x3359('0x7'))('rpc');var config=require(_0x3359('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x3359('0x9')][_0x3359('0xa')]({'port':0x232a});config[_0x3359('0xb')]=_[_0x3359('0xc')](config['redis'],{'host':_0x3359('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3359('0xb')]));require('./chatInternalMessage.socket')[_0x3359('0xe')](socket);function respondWithRpcPromise(_0x1d1d93,_0x1d9e90,_0x4093fb){return new BPromise(function(_0x24784f,_0x32cd00){return client[_0x3359('0xf')](_0x1d1d93,_0x4093fb)[_0x3359('0x10')](function(_0x2c5cad){logger[_0x3359('0x11')]('ChatInternalMessage,\x20%s,\x20%s',_0x1d9e90,_0x3359('0x12'));logger[_0x3359('0x13')](_0x3359('0x14'),_0x1d9e90,_0x3359('0x12'),JSON[_0x3359('0x15')](_0x2c5cad));if(_0x2c5cad[_0x3359('0x16')]){if(_0x2c5cad[_0x3359('0x16')][_0x3359('0x17')]===0x1f4){logger[_0x3359('0x16')](_0x3359('0x18'),_0x1d9e90,_0x2c5cad[_0x3359('0x16')][_0x3359('0x19')]);return _0x32cd00(_0x2c5cad[_0x3359('0x16')][_0x3359('0x19')]);}logger[_0x3359('0x16')]('ChatInternalMessage,\x20%s,\x20%s',_0x1d9e90,_0x2c5cad[_0x3359('0x16')]['message']);return _0x24784f(_0x2c5cad[_0x3359('0x16')][_0x3359('0x19')]);}else{logger[_0x3359('0x11')](_0x3359('0x18'),_0x1d9e90,_0x3359('0x12'));_0x24784f(_0x2c5cad[_0x3359('0x1a')][_0x3359('0x19')]);}})[_0x3359('0x1b')](function(_0x5db753){logger[_0x3359('0x16')](_0x3359('0x18'),_0x1d9e90,_0x5db753);_0x32cd00(_0x5db753);});});}
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js
index 3d1f0d9..9aed65c 100644
--- a/server/api/chatInternalMessage/chatInternalMessage.socket.js
+++ b/server/api/chatInternalMessage/chatInternalMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xb98e=['chatInternalMessage:','save','remove','emit','removeListener','length'];(function(_0x437b50,_0x45e934){var _0x28c321=function(_0x333824){while(--_0x333824){_0x437b50['push'](_0x437b50['shift']());}};_0x28c321(++_0x45e934);}(_0xb98e,0x1d5));var _0xeb98=function(_0x3d1254,_0xb758c8){_0x3d1254=_0x3d1254-0x0;var _0x22b82a=_0xb98e[_0x3d1254];return _0x22b82a;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=[_0xeb98('0x0'),_0xeb98('0x1'),'update'];function createListener(_0x4940f6,_0x1fb859){return function(_0x185a70){_0x1fb859[_0xeb98('0x2')](_0x4940f6,_0x185a70);};}function removeListener(_0x27b78e,_0xbb84f8){return function(){ChatInternalMessageEvents[_0xeb98('0x3')](_0x27b78e,_0xbb84f8);};}exports['register']=function(_0x5568bf){for(var _0xabe588=0x0,_0x30f1ab=events[_0xeb98('0x4')];_0xabe588<_0x30f1ab;_0xabe588++){var _0x37bdc7=events[_0xabe588];var _0x75a00a=createListener(_0xeb98('0x5')+_0x37bdc7,_0x5568bf);ChatInternalMessageEvents['on'](_0x37bdc7,_0x75a00a);}};
\ No newline at end of file
+var _0xb3b5=['update','removeListener','register','length','chatInternalMessage:','./chatInternalMessage.events','save','remove'];(function(_0x231e16,_0x67347b){var _0x570a7c=function(_0x2c35b4){while(--_0x2c35b4){_0x231e16['push'](_0x231e16['shift']());}};_0x570a7c(++_0x67347b);}(_0xb3b5,0x1cd));var _0x5b3b=function(_0x1a9e78,_0x180720){_0x1a9e78=_0x1a9e78-0x0;var _0x113e06=_0xb3b5[_0x1a9e78];return _0x113e06;};'use strict';var ChatInternalMessageEvents=require(_0x5b3b('0x0'));var events=[_0x5b3b('0x1'),_0x5b3b('0x2'),_0x5b3b('0x3')];function createListener(_0x425b4e,_0x51ca4f){return function(_0x53374f){_0x51ca4f['emit'](_0x425b4e,_0x53374f);};}function removeListener(_0x138786,_0x4ab53b){return function(){ChatInternalMessageEvents[_0x5b3b('0x4')](_0x138786,_0x4ab53b);};}exports[_0x5b3b('0x5')]=function(_0x371dae){for(var _0xb16dd6=0x0,_0x352175=events[_0x5b3b('0x6')];_0xb16dd6<_0x352175;_0xb16dd6++){var _0x189bc8=events[_0xb16dd6];var _0x569849=createListener(_0x5b3b('0x7')+_0x189bc8,_0x371dae);ChatInternalMessageEvents['on'](_0x189bc8,_0x569849);}};
\ No newline at end of file
diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js
index 8706d3b..d95e84c 100644
--- a/server/api/chatInternalMessage/index.js
+++ b/server/api/chatInternalMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x94f9=['isAuthenticated','index','/describe','describe','/users','getUsers','/:id','show','post','put','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./chatInternalMessage.controller','get'];(function(_0x290638,_0x1fa809){var _0x5d9530=function(_0x4c0214){while(--_0x4c0214){_0x290638['push'](_0x290638['shift']());}};_0x5d9530(++_0x1fa809);}(_0x94f9,0x11d));var _0x994f=function(_0x11e496,_0x550762){_0x11e496=_0x11e496-0x0;var _0x4b2c4b=_0x94f9[_0x11e496];return _0x4b2c4b;};'use strict';var multer=require('multer');var util=require(_0x994f('0x0'));var path=require(_0x994f('0x1'));var timeout=require(_0x994f('0x2'));var express=require(_0x994f('0x3'));var router=express[_0x994f('0x4')]();var fs_extra=require(_0x994f('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x994f('0x6'));var config=require('../../config/environment');var controller=require(_0x994f('0x7'));router[_0x994f('0x8')]('/',auth[_0x994f('0x9')](),controller[_0x994f('0xa')]);router[_0x994f('0x8')](_0x994f('0xb'),auth[_0x994f('0x9')](),controller[_0x994f('0xc')]);router[_0x994f('0x8')](_0x994f('0xd'),auth[_0x994f('0x9')](),controller[_0x994f('0xe')]);router[_0x994f('0x8')](_0x994f('0xf'),auth[_0x994f('0x9')](),controller[_0x994f('0x10')]);router[_0x994f('0x11')]('/',auth[_0x994f('0x9')](),controller['create']);router[_0x994f('0x12')]('/:id',controller['update']);router[_0x994f('0x13')]('/:id',auth[_0x994f('0x9')](),controller['destroy']);module[_0x994f('0x14')]=router;
\ No newline at end of file
+var _0xd25f=['destroy','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','./chatInternalMessage.controller','get','isAuthenticated','index','/describe','describe','/users','getUsers','/:id','show','post','create','put','update','delete'];(function(_0x1e48d3,_0x5d8c43){var _0x2852b1=function(_0x11d7b3){while(--_0x11d7b3){_0x1e48d3['push'](_0x1e48d3['shift']());}};_0x2852b1(++_0x5d8c43);}(_0xd25f,0x1e5));var _0xfd25=function(_0x2ff762,_0x342c0b){_0x2ff762=_0x2ff762-0x0;var _0x158b02=_0xd25f[_0x2ff762];return _0x158b02;};'use strict';var multer=require(_0xfd25('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xfd25('0x1'));var express=require(_0xfd25('0x2'));var router=express[_0xfd25('0x3')]();var fs_extra=require(_0xfd25('0x4'));var auth=require(_0xfd25('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xfd25('0x6'));router[_0xfd25('0x7')]('/',auth[_0xfd25('0x8')](),controller[_0xfd25('0x9')]);router['get'](_0xfd25('0xa'),auth[_0xfd25('0x8')](),controller[_0xfd25('0xb')]);router['get'](_0xfd25('0xc'),auth[_0xfd25('0x8')](),controller[_0xfd25('0xd')]);router[_0xfd25('0x7')](_0xfd25('0xe'),auth[_0xfd25('0x8')](),controller[_0xfd25('0xf')]);router[_0xfd25('0x10')]('/',auth[_0xfd25('0x8')](),controller[_0xfd25('0x11')]);router[_0xfd25('0x12')](_0xfd25('0xe'),controller[_0xfd25('0x13')]);router[_0xfd25('0x14')](_0xfd25('0xe'),auth[_0xfd25('0x8')](),controller[_0xfd25('0x15')]);module['exports']=router;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js
index d953fbd..cf0bad7 100644
--- a/server/api/chatMessage/chatMessage.attributes.js
+++ b/server/api/chatMessage/chatMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8603=['medium','ENUM','out','STRING','exports','TEXT'];(function(_0xe5b349,_0x5f06e4){var _0x26b0ad=function(_0x1a97f1){while(--_0x1a97f1){_0xe5b349['push'](_0xe5b349['shift']());}};_0x26b0ad(++_0x5f06e4);}(_0x8603,0x190));var _0x3860=function(_0x56ed5d,_0x222353){_0x56ed5d=_0x56ed5d-0x0;var _0x3391a6=_0x8603[_0x56ed5d];return _0x3391a6;};'use strict';var Sequelize=require('sequelize');module[_0x3860('0x0')]={'body':{'type':Sequelize[_0x3860('0x1')](_0x3860('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x3860('0x3')]('in',_0x3860('0x4')),'defaultValue':_0x3860('0x4'),'allowNull':![]},'readAt':{'type':Sequelize['DATE']},'providerName':{'type':Sequelize[_0x3860('0x5')]},'providerResponse':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0x7292=['DATE','STRING','sequelize','exports','TEXT','medium','BOOLEAN','ENUM','out'];(function(_0x128b33,_0x19579d){var _0x282a2a=function(_0x53625e){while(--_0x53625e){_0x128b33['push'](_0x128b33['shift']());}};_0x282a2a(++_0x19579d);}(_0x7292,0x107));var _0x2729=function(_0x263a74,_0xc31414){_0x263a74=_0x263a74-0x0;var _0x2aa86c=_0x7292[_0x263a74];return _0x2aa86c;};'use strict';var Sequelize=require(_0x2729('0x0'));module[_0x2729('0x1')]={'body':{'type':Sequelize[_0x2729('0x2')](_0x2729('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x2729('0x4')],'defaultValue':![]},'secret':{'type':Sequelize[_0x2729('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x2729('0x5')]('in','out'),'defaultValue':_0x2729('0x6'),'allowNull':![]},'readAt':{'type':Sequelize[_0x2729('0x7')]},'providerName':{'type':Sequelize[_0x2729('0x8')]},'providerResponse':{'type':Sequelize[_0x2729('0x2')]}};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js
index 23ab3a0..bc6b761 100644
--- a/server/api/chatMessage/chatMessage.controller.js
+++ b/server/api/chatMessage/chatMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa369=['fast-json-patch','request-promise','moment','bluebird','mustache','util','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','register','jayson/promise','client','http','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','status','offset','undefined','count','limit','set','json','reject','save','update','destroy','sendStatus','name','send','index','map','ChatMessage','rawAttributes','fieldName','model','query','keys','filters','intersection','length','attributes','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','VIRTUAL','filter','options','includeAll','include','rows','show','params','fields','find','create','body','describe','../../config/logger','chat-interactions','accept','chat','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','ChatInteractionId','read1stAt','interaction','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','fullname','email','internal','manual','interface','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','parse','formData','ChatInteraction','role','RejectMessage','rejectMessage','rejectmessage','rimraf'];(function(_0x482790,_0x280ef1){var _0x1ea5c8=function(_0x2925fd){while(--_0x2925fd){_0x482790['push'](_0x482790['shift']());}};_0x1ea5c8(++_0x280ef1);}(_0xa369,0x107));var _0x9a36=function(_0x434b43,_0x2e0a0d){_0x434b43=_0x434b43-0x0;var _0x179ecc=_0xa369[_0x434b43];return _0x179ecc;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9a36('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9a36('0x1'));var rp=require(_0x9a36('0x2'));var moment=require(_0x9a36('0x3'));var BPromise=require(_0x9a36('0x4'));var Mustache=require(_0x9a36('0x5'));var util=require(_0x9a36('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x9a36('0x7'));var fs=require('fs');var fs_extra=require(_0x9a36('0x8'));var _=require(_0x9a36('0x9'));var squel=require(_0x9a36('0xa'));var crypto=require(_0x9a36('0xb'));var jsforce=require(_0x9a36('0xc'));var deskjs=require(_0x9a36('0xd'));var toCsv=require(_0x9a36('0xe'));var querystring=require(_0x9a36('0xf'));var Papa=require(_0x9a36('0x10'));var Redis=require(_0x9a36('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9a36('0x12'));var as=require(_0x9a36('0x13'));var hardwareService=require(_0x9a36('0x14'));var logger=require('../../config/logger')(_0x9a36('0x15'));var utils=require('../../config/utils');var config=require(_0x9a36('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x9a36('0x17'))['db'];config[_0x9a36('0x18')]=_[_0x9a36('0x19')](config[_0x9a36('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x9a36('0x1a'))(new Redis(config[_0x9a36('0x18')]));require('./chatMessage.socket')[_0x9a36('0x1b')](socket);var jayson=require(_0x9a36('0x1c'));var client=jayson[_0x9a36('0x1d')][_0x9a36('0x1e')]({'port':0x232c});var client9002=jayson[_0x9a36('0x1d')][_0x9a36('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x5f4b85,_0x350dab,_0x4a1333,_0x398035){return new BPromise(function(_0x2081ec,_0xafa2ec){var _0x4b13cd=_0x398035||client;return _0x4b13cd[_0x9a36('0x1f')](_0x5f4b85,_0x4a1333)[_0x9a36('0x20')](function(_0x1d5499){logger[_0x9a36('0x21')](_0x9a36('0x22'),_0x350dab,_0x9a36('0x23'));logger[_0x9a36('0x24')](_0x9a36('0x25'),_0x350dab,'request\x20sent',JSON[_0x9a36('0x26')](_0x1d5499));if(_0x1d5499[_0x9a36('0x27')]){if(_0x1d5499['error'][_0x9a36('0x28')]===0x1f4){logger[_0x9a36('0x27')](_0x9a36('0x22'),_0x350dab,_0x1d5499[_0x9a36('0x27')][_0x9a36('0x29')]);return _0xafa2ec(_0x1d5499['error'][_0x9a36('0x29')]);}logger[_0x9a36('0x27')]('ChatMessage,\x20%s,\x20%s',_0x350dab,_0x1d5499[_0x9a36('0x27')][_0x9a36('0x29')]);return _0x2081ec(_0x1d5499['error']['message']);}else{logger[_0x9a36('0x21')](_0x9a36('0x22'),_0x350dab,_0x9a36('0x23'));_0x2081ec(_0x1d5499['result']['message']);}})[_0x9a36('0x2a')](function(_0x1a117e){logger[_0x9a36('0x27')]('ChatMessage,\x20%s,\x20%s',_0x350dab,_0x1a117e);_0xafa2ec(_0x1a117e);});});}function respondWithStatusCode(_0x521546,_0x4bcc13){_0x4bcc13=_0x4bcc13||0xcc;return function(_0x11a99d){if(_0x11a99d){return _0x521546['sendStatus'](_0x4bcc13);}return _0x521546[_0x9a36('0x2b')](_0x4bcc13)['end']();};}function respondWithResult(_0x463d8d,_0x417b62){_0x417b62=_0x417b62||0xc8;return function(_0x40196e){if(_0x40196e){return _0x463d8d[_0x9a36('0x2b')](_0x417b62)['json'](_0x40196e);}};}function respondWithFilteredResult(_0x3747f1,_0x45a2d2){return function(_0x2bff7b){if(_0x2bff7b){var _0x1fcf0a=typeof _0x45a2d2[_0x9a36('0x2c')]===_0x9a36('0x2d')&&typeof _0x45a2d2['limit']===_0x9a36('0x2d');var _0x3df796=_0x2bff7b[_0x9a36('0x2e')];var _0x50b1f6=_0x1fcf0a?0x0:_0x45a2d2[_0x9a36('0x2c')];var _0x328b21=_0x1fcf0a?_0x2bff7b[_0x9a36('0x2e')]:_0x45a2d2['offset']+_0x45a2d2[_0x9a36('0x2f')];var _0x156d00;if(_0x328b21>=_0x3df796){_0x328b21=_0x3df796;_0x156d00=0xc8;}else{_0x156d00=0xce;}_0x3747f1['status'](_0x156d00);return _0x3747f1[_0x9a36('0x30')]('Content-Range',_0x50b1f6+'-'+_0x328b21+'/'+_0x3df796)[_0x9a36('0x31')](_0x2bff7b);}return null;};}function patchUpdates(_0x24c62a){return function(_0x1a3407){try{jsonpatch['apply'](_0x1a3407,_0x24c62a,!![]);}catch(_0x20f8db){return BPromise[_0x9a36('0x32')](_0x20f8db);}return _0x1a3407[_0x9a36('0x33')]();};}function saveUpdates(_0x4b4d1d,_0x3fdfc4){return function(_0xda446e){if(_0xda446e){return _0xda446e[_0x9a36('0x34')](_0x4b4d1d)[_0x9a36('0x20')](function(_0x4b59fe){return _0x4b59fe;});}return null;};}function removeEntity(_0x25fa90,_0x38461b){return function(_0x1908c8){if(_0x1908c8){return _0x1908c8[_0x9a36('0x35')]()['then'](function(){_0x25fa90[_0x9a36('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x619848,_0x78336a){return function(_0x4eb519){if(!_0x4eb519){_0x619848[_0x9a36('0x36')](0x194);}return _0x4eb519;};}function handleError(_0x3abee4,_0x29777c){_0x29777c=_0x29777c||0x1f4;return function(_0x48c3eb){logger[_0x9a36('0x27')](_0x48c3eb['stack']);if(_0x48c3eb[_0x9a36('0x37')]){delete _0x48c3eb['name'];}_0x3abee4[_0x9a36('0x2b')](_0x29777c)[_0x9a36('0x38')](_0x48c3eb);};}exports[_0x9a36('0x39')]=function(_0x5f1f72,_0x178b47){var _0x46dc9e={},_0x5c883d={},_0x4e69d0={'count':0x0,'rows':[]};var _0x19a59e=_[_0x9a36('0x3a')](db[_0x9a36('0x3b')][_0x9a36('0x3c')],function(_0x20c67d){return{'name':_0x20c67d[_0x9a36('0x3d')],'type':_0x20c67d['type']['key']};});_0x5c883d[_0x9a36('0x3e')]=_[_0x9a36('0x3a')](_0x19a59e,_0x9a36('0x37'));_0x5c883d[_0x9a36('0x3f')]=_[_0x9a36('0x40')](_0x5f1f72[_0x9a36('0x3f')]);_0x5c883d[_0x9a36('0x41')]=_['intersection'](_0x5c883d[_0x9a36('0x3e')],_0x5c883d[_0x9a36('0x3f')]);_0x46dc9e['attributes']=_[_0x9a36('0x42')](_0x5c883d[_0x9a36('0x3e')],qs['fields'](_0x5f1f72[_0x9a36('0x3f')]['fields']));_0x46dc9e['attributes']=_0x46dc9e['attributes'][_0x9a36('0x43')]?_0x46dc9e[_0x9a36('0x44')]:_0x5c883d[_0x9a36('0x3e')];if(!_0x5f1f72['query'][_0x9a36('0x45')](_0x9a36('0x46'))){_0x46dc9e[_0x9a36('0x2f')]=qs[_0x9a36('0x2f')](_0x5f1f72[_0x9a36('0x3f')][_0x9a36('0x2f')]);_0x46dc9e[_0x9a36('0x2c')]=qs['offset'](_0x5f1f72['query'][_0x9a36('0x2c')]);}_0x46dc9e[_0x9a36('0x47')]=qs[_0x9a36('0x48')](_0x5f1f72['query'][_0x9a36('0x48')]);_0x46dc9e[_0x9a36('0x49')]=qs['filters'](_[_0x9a36('0x4a')](_0x5f1f72['query'],_0x5c883d[_0x9a36('0x41')]),_0x19a59e);if(_0x5f1f72[_0x9a36('0x3f')]['filter']){_0x46dc9e['where']=_[_0x9a36('0x4b')](_0x46dc9e[_0x9a36('0x49')],{'$or':_[_0x9a36('0x3a')](_0x19a59e,function(_0x41d72f){if(_0x41d72f[_0x9a36('0x4c')]!==_0x9a36('0x4d')){var _0x5c282e={};_0x5c282e[_0x41d72f[_0x9a36('0x37')]]={'$like':'%'+_0x5f1f72[_0x9a36('0x3f')][_0x9a36('0x4e')]+'%'};return _0x5c282e;}})});}_0x46dc9e=_['merge']({},_0x46dc9e,_0x5f1f72[_0x9a36('0x4f')]);var _0x3fe872={'where':_0x46dc9e[_0x9a36('0x49')]};return db[_0x9a36('0x3b')]['count'](_0x3fe872)[_0x9a36('0x20')](function(_0x1edbce){_0x4e69d0['count']=_0x1edbce;if(_0x5f1f72[_0x9a36('0x3f')][_0x9a36('0x50')]){_0x46dc9e[_0x9a36('0x51')]=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x46dc9e);})['then'](function(_0x3b66cd){_0x4e69d0[_0x9a36('0x52')]=_0x3b66cd;return _0x4e69d0;})['then'](respondWithFilteredResult(_0x178b47,_0x46dc9e))[_0x9a36('0x2a')](handleError(_0x178b47,null));};exports[_0x9a36('0x53')]=function(_0x391b1f,_0x2775ce){var _0x164cf3={'raw':!![],'where':{'id':_0x391b1f[_0x9a36('0x54')]['id']}},_0x400074={};_0x400074[_0x9a36('0x3e')]=_['keys'](db['ChatMessage'][_0x9a36('0x3c')]);_0x400074[_0x9a36('0x3f')]=_['keys'](_0x391b1f['query']);_0x400074[_0x9a36('0x41')]=_[_0x9a36('0x42')](_0x400074['model'],_0x400074[_0x9a36('0x3f')]);_0x164cf3['attributes']=_[_0x9a36('0x42')](_0x400074[_0x9a36('0x3e')],qs[_0x9a36('0x55')](_0x391b1f[_0x9a36('0x3f')][_0x9a36('0x55')]));_0x164cf3[_0x9a36('0x44')]=_0x164cf3['attributes'][_0x9a36('0x43')]?_0x164cf3[_0x9a36('0x44')]:_0x400074['model'];if(_0x391b1f[_0x9a36('0x3f')][_0x9a36('0x50')]){_0x164cf3[_0x9a36('0x51')]=[{'all':!![]}];}_0x164cf3=_[_0x9a36('0x4b')]({},_0x164cf3,_0x391b1f[_0x9a36('0x4f')]);return db['ChatMessage'][_0x9a36('0x56')](_0x164cf3)[_0x9a36('0x20')](handleEntityNotFound(_0x2775ce,null))[_0x9a36('0x20')](respondWithResult(_0x2775ce,null))[_0x9a36('0x2a')](handleError(_0x2775ce,null));};exports[_0x9a36('0x57')]=function(_0x38b477,_0x4e7873){return db['ChatMessage']['create'](_0x38b477[_0x9a36('0x58')],{})[_0x9a36('0x20')](respondWithResult(_0x4e7873,0xc9))[_0x9a36('0x2a')](handleError(_0x4e7873,null));};exports[_0x9a36('0x34')]=function(_0x52fd56,_0xe0818a){if(_0x52fd56['body']['id']){delete _0x52fd56[_0x9a36('0x58')]['id'];}return db[_0x9a36('0x3b')][_0x9a36('0x56')]({'where':{'id':_0x52fd56[_0x9a36('0x54')]['id']}})['then'](handleEntityNotFound(_0xe0818a,null))[_0x9a36('0x20')](saveUpdates(_0x52fd56[_0x9a36('0x58')],null))[_0x9a36('0x20')](respondWithResult(_0xe0818a,null))[_0x9a36('0x2a')](handleError(_0xe0818a,null));};exports['destroy']=function(_0x36ce2b,_0x30408a){return db[_0x9a36('0x3b')]['find']({'where':{'id':_0x36ce2b[_0x9a36('0x54')]['id']}})[_0x9a36('0x20')](handleEntityNotFound(_0x30408a,null))[_0x9a36('0x20')](removeEntity(_0x30408a,null))[_0x9a36('0x2a')](handleError(_0x30408a,null));};exports['describe']=function(_0x2ef047,_0x4d6e73){return db[_0x9a36('0x3b')][_0x9a36('0x59')]()[_0x9a36('0x20')](respondWithResult(_0x4d6e73,null))['catch'](handleError(_0x4d6e73,null));};var interaction_log=require(_0x9a36('0x5a'))(_0x9a36('0x5b'));exports[_0x9a36('0x5c')]=function(_0x307079,_0x331345,_0x30d067){var _0x21e3c6={'agent':{},'channel':_0x9a36('0x5d')};if(_0x307079[_0x9a36('0x58')]['id']){delete _0x307079[_0x9a36('0x58')]['id'];}_0x307079[_0x9a36('0x58')]['read']=!![];_0x307079['body'][_0x9a36('0x5e')]=moment()[_0x9a36('0x5f')](_0x9a36('0x60'));_0x307079['body']['UserId']=_0x307079[_0x9a36('0x58')][_0x9a36('0x61')]||_0x307079[_0x9a36('0x62')]['id'];_0x21e3c6[_0x9a36('0x63')]['id']=_0x307079[_0x9a36('0x58')][_0x9a36('0x61')];return db[_0x9a36('0x3b')]['find']({'where':{'id':_0x307079['params']['id'],'UserId':null}})[_0x9a36('0x20')](handleEntityNotFound(_0x331345,null))[_0x9a36('0x20')](saveUpdates(_0x307079[_0x9a36('0x58')],null))['then'](function(_0x49fd0d){if(_0x49fd0d){_0x21e3c6[_0x9a36('0x29')]=_0x49fd0d[_0x9a36('0x64')]({'plain':!![]});return db['ChatInteraction'][_0x9a36('0x56')]({'where':{'id':_0x49fd0d[_0x9a36('0x65')]}});}return null;})['then'](handleEntityNotFound(_0x331345,null))[_0x9a36('0x20')](function(_0x4987d5){if(_0x4987d5){return _0x4987d5[_0x9a36('0x34')]({'UserId':_0x307079[_0x9a36('0x58')]['UserId'],'read1stAt':_['isNil'](_0x4987d5[_0x9a36('0x66')])?moment()['format'](_0x9a36('0x60')):undefined});}return null;})[_0x9a36('0x20')](function(_0x23687c){if(_0x23687c){_0x21e3c6[_0x9a36('0x67')]=_0x23687c[_0x9a36('0x64')]({'plain':!![]});interaction_log[_0x9a36('0x21')]('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x307079['user']['id'],_0x307079[_0x9a36('0x62')][_0x9a36('0x37')],_0x307079['user']['role'],_0x21e3c6['interaction']['id'],_0x307079[_0x9a36('0x58')]?JSON[_0x9a36('0x26')](_0x307079[_0x9a36('0x58')]):_0x9a36('0x68'));return respondWithRpcPromise(_0x9a36('0x69'),_0x9a36('0x6a'),_0x21e3c6);}return null;})[_0x9a36('0x20')](function(_0x26ecd6){var _0x11a234=_0x9a36('0x6b')+_0x26ecd6[_0x9a36('0x29')][_0x9a36('0x6c')];return db[_0x9a36('0x6d')][_0x9a36('0x3f')](_0x11a234,{'type':db[_0x9a36('0x6e')][_0x9a36('0x6f')][_0x9a36('0x70')],'raw':!![]})[_0x9a36('0x20')](function(_0x31cd7d){return _0x31cd7d;});})['then'](function(_0x189d42){if(_0x189d42){_0x21e3c6[_0x9a36('0x29')][_0x9a36('0x71')]=_0x189d42[0x0];if(!_0x307079[_0x9a36('0x58')][_0x9a36('0x61')])return;return db['User'][_0x9a36('0x56')]({'where':{'id':_0x307079[_0x9a36('0x58')][_0x9a36('0x61')],'role':_0x9a36('0x63')},'attributes':['id',_0x9a36('0x37'),_0x9a36('0x72'),_0x9a36('0x73'),_0x9a36('0x74')],'raw':!![]});}return null;})[_0x9a36('0x20')](function(_0x54cad4){if(!_0x54cad4)return null;_0x21e3c6[_0x9a36('0x29')][_0x9a36('0x63')]=_0x54cad4;return _0x21e3c6;})[_0x9a36('0x20')](function(_0x399492){if(_0x399492){if(_0x307079[_0x9a36('0x58')][_0x9a36('0x75')]){_0x21e3c6[_0x9a36('0x29')][_0x9a36('0x76')]=util[_0x9a36('0x5f')](_0x9a36('0x77'),_0x307079[_0x9a36('0x62')][_0x9a36('0x37')]);_0x21e3c6[_0x9a36('0x29')][_0x9a36('0x78')]=_0x21e3c6['channel'];_0x21e3c6[_0x9a36('0x29')][_0x9a36('0x79')]=_0x21e3c6['channel'];_0x21e3c6[_0x9a36('0x29')][_0x9a36('0x7a')]='accept';return respondWithRpcPromise('EventManager',_0x9a36('0x7b'),{'event':_0x9a36('0x7c'),'message':_[_0x9a36('0x4b')](_0x21e3c6['message'],JSON[_0x9a36('0x7d')](_0x21e3c6['interaction'][_0x9a36('0x7e')]))},client9002)[_0x9a36('0x20')](function(){return _0x21e3c6;});}return _0x21e3c6;}return null;})[_0x9a36('0x20')](respondWithResult(_0x331345,null))[_0x9a36('0x2a')](handleError(_0x331345,null));};var interaction_log=require(_0x9a36('0x5a'))('chat-interactions');exports[_0x9a36('0x32')]=function(_0x55f984,_0x48e637,_0x9ac26e){var _0x1b195a={'agent':{},'channel':'chat'};if(_0x55f984['body']['id']){delete _0x55f984['body']['id'];}_0x55f984[_0x9a36('0x58')][_0x9a36('0x61')]=_0x55f984[_0x9a36('0x58')][_0x9a36('0x61')]||_0x55f984[_0x9a36('0x62')]['id'];_0x1b195a['agent']['id']=_0x55f984[_0x9a36('0x58')]['UserId'];return db[_0x9a36('0x3b')]['find']({'where':{'id':_0x55f984[_0x9a36('0x54')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x48e637,null))['then'](function(_0x40b09a){if(_0x40b09a){_0x1b195a[_0x9a36('0x29')]=_0x40b09a[_0x9a36('0x64')]({'plain':!![]});return db[_0x9a36('0x7f')][_0x9a36('0x56')]({'where':{'id':_0x40b09a[_0x9a36('0x65')]}});}return null;})[_0x9a36('0x20')](handleEntityNotFound(_0x48e637,null))['then'](function(_0x436385){if(_0x436385){_0x1b195a['interaction']=_0x436385[_0x9a36('0x64')]({'plain':!![]});interaction_log[_0x9a36('0x21')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x55f984[_0x9a36('0x62')]['id'],_0x55f984['user'][_0x9a36('0x37')],_0x55f984[_0x9a36('0x62')][_0x9a36('0x80')],_0x1b195a[_0x9a36('0x67')]['id'],_0x55f984[_0x9a36('0x58')]?JSON[_0x9a36('0x26')](_0x55f984['body']):_0x9a36('0x68'));return respondWithRpcPromise(_0x9a36('0x81'),_0x9a36('0x82'),_0x1b195a);}return null;})[_0x9a36('0x20')](function(_0x1e855d){var _0xc7c0c4=_0x9a36('0x6b')+_0x1e855d[_0x9a36('0x29')][_0x9a36('0x6c')];return db[_0x9a36('0x6d')][_0x9a36('0x3f')](_0xc7c0c4,{'type':db[_0x9a36('0x6e')]['QueryTypes']['SELECT'],'raw':!![]})[_0x9a36('0x20')](function(_0x19bbc8){return _0x19bbc8;});})['then'](function(_0x24421c){if(_0x24421c){_0x1b195a[_0x9a36('0x29')]['contact']=_0x24421c[0x0];if(!_0x55f984[_0x9a36('0x58')][_0x9a36('0x61')])return;return db['User'][_0x9a36('0x56')]({'where':{'id':_0x55f984[_0x9a36('0x58')]['UserId'],'role':'agent'},'attributes':['id',_0x9a36('0x37'),_0x9a36('0x72'),_0x9a36('0x73'),'internal'],'raw':!![]});}return null;})['then'](function(_0x325792){if(!_0x325792)return null;_0x1b195a[_0x9a36('0x29')][_0x9a36('0x63')]=_0x325792;return _0x1b195a;})[_0x9a36('0x20')](function(_0x54b5c9){if(_0x54b5c9){_0x54b5c9['message'][_0x9a36('0x76')]=util[_0x9a36('0x5f')](_0x9a36('0x77'),_0x55f984['user'][_0x9a36('0x37')]);_0x54b5c9[_0x9a36('0x29')][_0x9a36('0x78')]=_0x1b195a[_0x9a36('0x78')];_0x54b5c9[_0x9a36('0x29')][_0x9a36('0x79')]=_0x1b195a[_0x9a36('0x78')];_0x54b5c9[_0x9a36('0x29')][_0x9a36('0x7a')]=_0x9a36('0x32');respondWithRpcPromise('EventManager','EventManager',{'event':_0x9a36('0x83'),'message':_[_0x9a36('0x4b')](_0x1b195a[_0x9a36('0x29')],JSON[_0x9a36('0x7d')](_0x1b195a[_0x9a36('0x67')][_0x9a36('0x7e')]))},client9002);return _0x1b195a;}return null;})[_0x9a36('0x20')](respondWithResult(_0x48e637,null))[_0x9a36('0x2a')](handleError(_0x48e637,null));};
\ No newline at end of file
+var _0x02f2=['eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','to-csv','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','defaults','localhost','socket.io-emitter','redis','register','jayson/promise','client','http','request','then','info','ChatMessage,\x20%s,\x20%s','debug','ChatMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','destroy','name','send','index','map','ChatMessage','rawAttributes','fieldName','type','model','keys','filters','intersection','query','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','rows','show','params','fields','include','find','create','update','body','describe','chat','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','get','ChatInteraction','isNil','interaction','null','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','SELECT','contact','agent','fullname','email','internal','manual','interface','channel','event','accept','EventManager','acceptmessage','parse','formData','chat-interactions','ChatInteractionId','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','RejectMessage','rejectMessage','Sequelize','QueryTypes','SIP/%s'];(function(_0x2347ae,_0x192e55){var _0x1918c7=function(_0xfdd11e){while(--_0xfdd11e){_0x2347ae['push'](_0x2347ae['shift']());}};_0x1918c7(++_0x192e55);}(_0x02f2,0x7d));var _0x202f=function(_0x378be5,_0x7934e1){_0x378be5=_0x378be5-0x0;var _0x50bade=_0x02f2[_0x378be5];return _0x50bade;};'use strict';var emlformat=require(_0x202f('0x0'));var rimraf=require(_0x202f('0x1'));var zipdir=require(_0x202f('0x2'));var jsonpatch=require(_0x202f('0x3'));var rp=require(_0x202f('0x4'));var moment=require('moment');var BPromise=require(_0x202f('0x5'));var Mustache=require(_0x202f('0x6'));var util=require('util');var path=require(_0x202f('0x7'));var sox=require('sox');var csv=require(_0x202f('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x202f('0x9'));var squel=require(_0x202f('0xa'));var crypto=require(_0x202f('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x202f('0x8'));var querystring=require(_0x202f('0xc'));var Papa=require(_0x202f('0xd'));var Redis=require(_0x202f('0xe'));var authService=require(_0x202f('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x202f('0x10'));var logger=require(_0x202f('0x11'))(_0x202f('0x12'));var utils=require('../../config/utils');var config=require(_0x202f('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x202f('0x14'))['db'];config['redis']=_[_0x202f('0x15')](config['redis'],{'host':_0x202f('0x16'),'port':0x18eb});var socket=require(_0x202f('0x17'))(new Redis(config[_0x202f('0x18')]));require('./chatMessage.socket')[_0x202f('0x19')](socket);var jayson=require(_0x202f('0x1a'));var client=jayson[_0x202f('0x1b')][_0x202f('0x1c')]({'port':0x232c});var client9002=jayson['client'][_0x202f('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x8e5fc0,_0x1d47b0,_0x59b536,_0x1ae0d2){return new BPromise(function(_0xa43c6,_0x174cc9){var _0x181a60=_0x1ae0d2||client;return _0x181a60[_0x202f('0x1d')](_0x8e5fc0,_0x59b536)[_0x202f('0x1e')](function(_0x41034f){logger[_0x202f('0x1f')](_0x202f('0x20'),_0x1d47b0,'request\x20sent');logger[_0x202f('0x21')](_0x202f('0x22'),_0x1d47b0,_0x202f('0x23'),JSON[_0x202f('0x24')](_0x41034f));if(_0x41034f[_0x202f('0x25')]){if(_0x41034f[_0x202f('0x25')]['code']===0x1f4){logger[_0x202f('0x25')](_0x202f('0x20'),_0x1d47b0,_0x41034f[_0x202f('0x25')][_0x202f('0x26')]);return _0x174cc9(_0x41034f[_0x202f('0x25')][_0x202f('0x26')]);}logger[_0x202f('0x25')](_0x202f('0x20'),_0x1d47b0,_0x41034f[_0x202f('0x25')][_0x202f('0x26')]);return _0xa43c6(_0x41034f['error'][_0x202f('0x26')]);}else{logger[_0x202f('0x1f')](_0x202f('0x20'),_0x1d47b0,'request\x20sent');_0xa43c6(_0x41034f['result'][_0x202f('0x26')]);}})[_0x202f('0x27')](function(_0x3598d2){logger[_0x202f('0x25')](_0x202f('0x20'),_0x1d47b0,_0x3598d2);_0x174cc9(_0x3598d2);});});}function respondWithStatusCode(_0x52f0f7,_0x4fc4e1){_0x4fc4e1=_0x4fc4e1||0xcc;return function(_0x45217d){if(_0x45217d){return _0x52f0f7['sendStatus'](_0x4fc4e1);}return _0x52f0f7[_0x202f('0x28')](_0x4fc4e1)[_0x202f('0x29')]();};}function respondWithResult(_0x31f9cb,_0x3db4c8){_0x3db4c8=_0x3db4c8||0xc8;return function(_0xf10b74){if(_0xf10b74){return _0x31f9cb[_0x202f('0x28')](_0x3db4c8)[_0x202f('0x2a')](_0xf10b74);}};}function respondWithFilteredResult(_0x1d6616,_0x2b1540){return function(_0x42ce5f){if(_0x42ce5f){var _0x5acc41=typeof _0x2b1540[_0x202f('0x2b')]===_0x202f('0x2c')&&typeof _0x2b1540[_0x202f('0x2d')]===_0x202f('0x2c');var _0x4a2540=_0x42ce5f[_0x202f('0x2e')];var _0x3c8eef=_0x5acc41?0x0:_0x2b1540['offset'];var _0x39795a=_0x5acc41?_0x42ce5f[_0x202f('0x2e')]:_0x2b1540[_0x202f('0x2b')]+_0x2b1540[_0x202f('0x2d')];var _0x1a047b;if(_0x39795a>=_0x4a2540){_0x39795a=_0x4a2540;_0x1a047b=0xc8;}else{_0x1a047b=0xce;}_0x1d6616[_0x202f('0x28')](_0x1a047b);return _0x1d6616[_0x202f('0x2f')](_0x202f('0x30'),_0x3c8eef+'-'+_0x39795a+'/'+_0x4a2540)[_0x202f('0x2a')](_0x42ce5f);}return null;};}function patchUpdates(_0x5e7351){return function(_0x365494){try{jsonpatch[_0x202f('0x31')](_0x365494,_0x5e7351,!![]);}catch(_0x23e830){return BPromise[_0x202f('0x32')](_0x23e830);}return _0x365494['save']();};}function saveUpdates(_0x1b5841,_0x1aacb2){return function(_0x4adea2){if(_0x4adea2){return _0x4adea2['update'](_0x1b5841)['then'](function(_0x17efa4){return _0x17efa4;});}return null;};}function removeEntity(_0x399451,_0x1eb950){return function(_0x3be1dd){if(_0x3be1dd){return _0x3be1dd[_0x202f('0x33')]()['then'](function(){_0x399451[_0x202f('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0x82dff,_0x594c5b){return function(_0x56c0d5){if(!_0x56c0d5){_0x82dff['sendStatus'](0x194);}return _0x56c0d5;};}function handleError(_0x397d29,_0x148dce){_0x148dce=_0x148dce||0x1f4;return function(_0x469acb){logger['error'](_0x469acb['stack']);if(_0x469acb['name']){delete _0x469acb[_0x202f('0x34')];}_0x397d29[_0x202f('0x28')](_0x148dce)[_0x202f('0x35')](_0x469acb);};}exports[_0x202f('0x36')]=function(_0x4d6802,_0x131884){var _0x4e79a7={},_0x59d302={},_0x19a8e1={'count':0x0,'rows':[]};var _0x302c2b=_[_0x202f('0x37')](db[_0x202f('0x38')][_0x202f('0x39')],function(_0x31fbc7){return{'name':_0x31fbc7[_0x202f('0x3a')],'type':_0x31fbc7[_0x202f('0x3b')]['key']};});_0x59d302[_0x202f('0x3c')]=_[_0x202f('0x37')](_0x302c2b,_0x202f('0x34'));_0x59d302['query']=_[_0x202f('0x3d')](_0x4d6802['query']);_0x59d302[_0x202f('0x3e')]=_[_0x202f('0x3f')](_0x59d302[_0x202f('0x3c')],_0x59d302[_0x202f('0x40')]);_0x4e79a7[_0x202f('0x41')]=_['intersection'](_0x59d302[_0x202f('0x3c')],qs['fields'](_0x4d6802['query']['fields']));_0x4e79a7[_0x202f('0x41')]=_0x4e79a7[_0x202f('0x41')][_0x202f('0x42')]?_0x4e79a7[_0x202f('0x41')]:_0x59d302[_0x202f('0x3c')];if(!_0x4d6802['query'][_0x202f('0x43')](_0x202f('0x44'))){_0x4e79a7[_0x202f('0x2d')]=qs[_0x202f('0x2d')](_0x4d6802[_0x202f('0x40')][_0x202f('0x2d')]);_0x4e79a7[_0x202f('0x2b')]=qs[_0x202f('0x2b')](_0x4d6802[_0x202f('0x40')]['offset']);}_0x4e79a7[_0x202f('0x45')]=qs[_0x202f('0x46')](_0x4d6802[_0x202f('0x40')][_0x202f('0x46')]);_0x4e79a7[_0x202f('0x47')]=qs[_0x202f('0x3e')](_['pick'](_0x4d6802[_0x202f('0x40')],_0x59d302['filters']),_0x302c2b);if(_0x4d6802[_0x202f('0x40')][_0x202f('0x48')]){_0x4e79a7[_0x202f('0x47')]=_[_0x202f('0x49')](_0x4e79a7['where'],{'$or':_[_0x202f('0x37')](_0x302c2b,function(_0x5a09e7){if(_0x5a09e7[_0x202f('0x3b')]!==_0x202f('0x4a')){var _0x52e291={};_0x52e291[_0x5a09e7[_0x202f('0x34')]]={'$like':'%'+_0x4d6802[_0x202f('0x40')][_0x202f('0x48')]+'%'};return _0x52e291;}})});}_0x4e79a7=_['merge']({},_0x4e79a7,_0x4d6802[_0x202f('0x4b')]);var _0x2815a1={'where':_0x4e79a7[_0x202f('0x47')]};return db[_0x202f('0x38')][_0x202f('0x2e')](_0x2815a1)[_0x202f('0x1e')](function(_0x51ff26){_0x19a8e1[_0x202f('0x2e')]=_0x51ff26;if(_0x4d6802[_0x202f('0x40')][_0x202f('0x4c')]){_0x4e79a7['include']=[{'all':!![]}];}return db[_0x202f('0x38')]['findAll'](_0x4e79a7);})[_0x202f('0x1e')](function(_0x116160){_0x19a8e1[_0x202f('0x4d')]=_0x116160;return _0x19a8e1;})['then'](respondWithFilteredResult(_0x131884,_0x4e79a7))[_0x202f('0x27')](handleError(_0x131884,null));};exports[_0x202f('0x4e')]=function(_0x3c0471,_0x26018b){var _0x3bfeb9={'raw':!![],'where':{'id':_0x3c0471[_0x202f('0x4f')]['id']}},_0x396521={};_0x396521[_0x202f('0x3c')]=_[_0x202f('0x3d')](db[_0x202f('0x38')][_0x202f('0x39')]);_0x396521[_0x202f('0x40')]=_[_0x202f('0x3d')](_0x3c0471['query']);_0x396521[_0x202f('0x3e')]=_[_0x202f('0x3f')](_0x396521[_0x202f('0x3c')],_0x396521[_0x202f('0x40')]);_0x3bfeb9['attributes']=_['intersection'](_0x396521[_0x202f('0x3c')],qs['fields'](_0x3c0471[_0x202f('0x40')][_0x202f('0x50')]));_0x3bfeb9[_0x202f('0x41')]=_0x3bfeb9[_0x202f('0x41')][_0x202f('0x42')]?_0x3bfeb9['attributes']:_0x396521[_0x202f('0x3c')];if(_0x3c0471[_0x202f('0x40')][_0x202f('0x4c')]){_0x3bfeb9[_0x202f('0x51')]=[{'all':!![]}];}_0x3bfeb9=_[_0x202f('0x49')]({},_0x3bfeb9,_0x3c0471[_0x202f('0x4b')]);return db[_0x202f('0x38')][_0x202f('0x52')](_0x3bfeb9)[_0x202f('0x1e')](handleEntityNotFound(_0x26018b,null))['then'](respondWithResult(_0x26018b,null))[_0x202f('0x27')](handleError(_0x26018b,null));};exports[_0x202f('0x53')]=function(_0x18a60c,_0x17961f){return db['ChatMessage'][_0x202f('0x53')](_0x18a60c['body'],{})[_0x202f('0x1e')](respondWithResult(_0x17961f,0xc9))[_0x202f('0x27')](handleError(_0x17961f,null));};exports[_0x202f('0x54')]=function(_0x59505e,_0x255a91){if(_0x59505e['body']['id']){delete _0x59505e[_0x202f('0x55')]['id'];}return db[_0x202f('0x38')]['find']({'where':{'id':_0x59505e[_0x202f('0x4f')]['id']}})[_0x202f('0x1e')](handleEntityNotFound(_0x255a91,null))[_0x202f('0x1e')](saveUpdates(_0x59505e[_0x202f('0x55')],null))[_0x202f('0x1e')](respondWithResult(_0x255a91,null))[_0x202f('0x27')](handleError(_0x255a91,null));};exports[_0x202f('0x33')]=function(_0x3ac240,_0x173a20){return db['ChatMessage'][_0x202f('0x52')]({'where':{'id':_0x3ac240[_0x202f('0x4f')]['id']}})[_0x202f('0x1e')](handleEntityNotFound(_0x173a20,null))[_0x202f('0x1e')](removeEntity(_0x173a20,null))[_0x202f('0x27')](handleError(_0x173a20,null));};exports[_0x202f('0x56')]=function(_0x30886c,_0x4e7b3e){return db[_0x202f('0x38')][_0x202f('0x56')]()[_0x202f('0x1e')](respondWithResult(_0x4e7b3e,null))['catch'](handleError(_0x4e7b3e,null));};var interaction_log=require(_0x202f('0x11'))('chat-interactions');exports['accept']=function(_0x52229f,_0x58b55c,_0x32cf4c){var _0x1f5703={'agent':{},'channel':_0x202f('0x57')};if(_0x52229f[_0x202f('0x55')]['id']){delete _0x52229f[_0x202f('0x55')]['id'];}_0x52229f[_0x202f('0x55')][_0x202f('0x58')]=!![];_0x52229f['body']['readAt']=moment()[_0x202f('0x59')](_0x202f('0x5a'));_0x52229f[_0x202f('0x55')][_0x202f('0x5b')]=_0x52229f[_0x202f('0x55')][_0x202f('0x5b')]||_0x52229f[_0x202f('0x5c')]['id'];_0x1f5703['agent']['id']=_0x52229f[_0x202f('0x55')][_0x202f('0x5b')];return db[_0x202f('0x38')]['find']({'where':{'id':_0x52229f[_0x202f('0x4f')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x58b55c,null))['then'](saveUpdates(_0x52229f[_0x202f('0x55')],null))[_0x202f('0x1e')](function(_0x2f1911){if(_0x2f1911){_0x1f5703[_0x202f('0x26')]=_0x2f1911[_0x202f('0x5d')]({'plain':!![]});return db[_0x202f('0x5e')][_0x202f('0x52')]({'where':{'id':_0x2f1911['ChatInteractionId']}});}return null;})[_0x202f('0x1e')](handleEntityNotFound(_0x58b55c,null))['then'](function(_0x48dd66){if(_0x48dd66){return _0x48dd66[_0x202f('0x54')]({'UserId':_0x52229f[_0x202f('0x55')]['UserId'],'read1stAt':_[_0x202f('0x5f')](_0x48dd66['read1stAt'])?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x202f('0x1e')](function(_0x108640){if(_0x108640){_0x1f5703[_0x202f('0x60')]=_0x108640[_0x202f('0x5d')]({'plain':!![]});interaction_log[_0x202f('0x1f')]('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x52229f[_0x202f('0x5c')]['id'],_0x52229f['user'][_0x202f('0x34')],_0x52229f[_0x202f('0x5c')]['role'],_0x1f5703['interaction']['id'],_0x52229f[_0x202f('0x55')]?JSON[_0x202f('0x24')](_0x52229f[_0x202f('0x55')]):_0x202f('0x61'));return respondWithRpcPromise('AcceptMessage','acceptMessage',_0x1f5703);}return null;})[_0x202f('0x1e')](function(_0x4cd6de){var _0x32747a=_0x202f('0x62')+_0x4cd6de[_0x202f('0x26')][_0x202f('0x63')];return db[_0x202f('0x64')]['query'](_0x32747a,{'type':db['Sequelize']['QueryTypes'][_0x202f('0x65')],'raw':!![]})[_0x202f('0x1e')](function(_0xc9c14){return _0xc9c14;});})[_0x202f('0x1e')](function(_0x18dd83){if(_0x18dd83){_0x1f5703[_0x202f('0x26')][_0x202f('0x66')]=_0x18dd83[0x0];if(!_0x52229f[_0x202f('0x55')]['UserId'])return;return db['User'][_0x202f('0x52')]({'where':{'id':_0x52229f['body'][_0x202f('0x5b')],'role':_0x202f('0x67')},'attributes':['id','name',_0x202f('0x68'),_0x202f('0x69'),_0x202f('0x6a')],'raw':!![]});}return null;})[_0x202f('0x1e')](function(_0x3b54b2){if(!_0x3b54b2)return null;_0x1f5703['message'][_0x202f('0x67')]=_0x3b54b2;return _0x1f5703;})[_0x202f('0x1e')](function(_0x2e0a85){if(_0x2e0a85){if(_0x52229f['body'][_0x202f('0x6b')]){_0x1f5703[_0x202f('0x26')][_0x202f('0x6c')]=util[_0x202f('0x59')]('SIP/%s',_0x52229f[_0x202f('0x5c')][_0x202f('0x34')]);_0x1f5703[_0x202f('0x26')][_0x202f('0x6d')]=_0x1f5703[_0x202f('0x6d')];_0x1f5703['message']['motionChannel']=_0x1f5703['channel'];_0x1f5703['message'][_0x202f('0x6e')]=_0x202f('0x6f');return respondWithRpcPromise(_0x202f('0x70'),_0x202f('0x70'),{'event':_0x202f('0x71'),'message':_['merge'](_0x1f5703[_0x202f('0x26')],JSON[_0x202f('0x72')](_0x1f5703['interaction'][_0x202f('0x73')]))},client9002)['then'](function(){return _0x1f5703;});}return _0x1f5703;}return null;})['then'](respondWithResult(_0x58b55c,null))[_0x202f('0x27')](handleError(_0x58b55c,null));};var interaction_log=require(_0x202f('0x11'))(_0x202f('0x74'));exports[_0x202f('0x32')]=function(_0x18fb6b,_0x208ae5,_0x689af5){var _0x308935={'agent':{},'channel':_0x202f('0x57')};if(_0x18fb6b[_0x202f('0x55')]['id']){delete _0x18fb6b[_0x202f('0x55')]['id'];}_0x18fb6b[_0x202f('0x55')][_0x202f('0x5b')]=_0x18fb6b[_0x202f('0x55')][_0x202f('0x5b')]||_0x18fb6b[_0x202f('0x5c')]['id'];_0x308935['agent']['id']=_0x18fb6b[_0x202f('0x55')][_0x202f('0x5b')];return db[_0x202f('0x38')][_0x202f('0x52')]({'where':{'id':_0x18fb6b[_0x202f('0x4f')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x208ae5,null))[_0x202f('0x1e')](function(_0x269a85){if(_0x269a85){_0x308935[_0x202f('0x26')]=_0x269a85[_0x202f('0x5d')]({'plain':!![]});return db[_0x202f('0x5e')]['find']({'where':{'id':_0x269a85[_0x202f('0x75')]}});}return null;})[_0x202f('0x1e')](handleEntityNotFound(_0x208ae5,null))[_0x202f('0x1e')](function(_0x739c9b){if(_0x739c9b){_0x308935[_0x202f('0x60')]=_0x739c9b[_0x202f('0x5d')]({'plain':!![]});interaction_log[_0x202f('0x1f')](_0x202f('0x76'),_0x18fb6b['user']['id'],_0x18fb6b[_0x202f('0x5c')]['name'],_0x18fb6b[_0x202f('0x5c')][_0x202f('0x77')],_0x308935[_0x202f('0x60')]['id'],_0x18fb6b['body']?JSON[_0x202f('0x24')](_0x18fb6b[_0x202f('0x55')]):_0x202f('0x61'));return respondWithRpcPromise(_0x202f('0x78'),_0x202f('0x79'),_0x308935);}return null;})[_0x202f('0x1e')](function(_0x3ddeb7){var _0x1ff1db=_0x202f('0x62')+_0x3ddeb7[_0x202f('0x26')][_0x202f('0x63')];return db[_0x202f('0x64')][_0x202f('0x40')](_0x1ff1db,{'type':db[_0x202f('0x7a')][_0x202f('0x7b')]['SELECT'],'raw':!![]})['then'](function(_0x47df18){return _0x47df18;});})[_0x202f('0x1e')](function(_0xf9d259){if(_0xf9d259){_0x308935[_0x202f('0x26')][_0x202f('0x66')]=_0xf9d259[0x0];if(!_0x18fb6b[_0x202f('0x55')][_0x202f('0x5b')])return;return db['User']['find']({'where':{'id':_0x18fb6b[_0x202f('0x55')]['UserId'],'role':_0x202f('0x67')},'attributes':['id',_0x202f('0x34'),_0x202f('0x68'),_0x202f('0x69'),'internal'],'raw':!![]});}return null;})['then'](function(_0x38cafc){if(!_0x38cafc)return null;_0x308935['message'][_0x202f('0x67')]=_0x38cafc;return _0x308935;})[_0x202f('0x1e')](function(_0x446b0c){if(_0x446b0c){_0x446b0c[_0x202f('0x26')][_0x202f('0x6c')]=util[_0x202f('0x59')](_0x202f('0x7c'),_0x18fb6b[_0x202f('0x5c')][_0x202f('0x34')]);_0x446b0c[_0x202f('0x26')][_0x202f('0x6d')]=_0x308935[_0x202f('0x6d')];_0x446b0c[_0x202f('0x26')]['motionChannel']=_0x308935[_0x202f('0x6d')];_0x446b0c[_0x202f('0x26')]['event']=_0x202f('0x32');respondWithRpcPromise(_0x202f('0x70'),_0x202f('0x70'),{'event':'rejectmessage','message':_['merge'](_0x308935['message'],JSON[_0x202f('0x72')](_0x308935[_0x202f('0x60')][_0x202f('0x73')]))},client9002);return _0x308935;}return null;})[_0x202f('0x1e')](respondWithResult(_0x208ae5,null))[_0x202f('0x27')](handleError(_0x208ae5,null));};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js
index 04f5cb0..044effe 100644
--- a/server/api/chatMessage/chatMessage.events.js
+++ b/server/api/chatMessage/chatMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4626=['hasOwnProperty','exports','events','../../mysqldb','ChatMessage','setMaxListeners','save','emit'];(function(_0x50d6f7,_0x15a219){var _0x10c70b=function(_0x311e0a){while(--_0x311e0a){_0x50d6f7['push'](_0x50d6f7['shift']());}};_0x10c70b(++_0x15a219);}(_0x4626,0x122));var _0x6462=function(_0x3ab32e,_0x375413){_0x3ab32e=_0x3ab32e-0x0;var _0x3c75ed=_0x4626[_0x3ab32e];return _0x3c75ed;};'use strict';var EventEmitter=require(_0x6462('0x0'));var ChatMessage=require(_0x6462('0x1'))['db'][_0x6462('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x6462('0x3')](0x0);var events={'afterCreate':_0x6462('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x23e7f5){return function(_0x21da51,_0x49afc0,_0x1900ed){ChatMessageEvents[_0x6462('0x5')](_0x23e7f5+':'+_0x21da51['id'],_0x21da51);ChatMessageEvents[_0x6462('0x5')](_0x23e7f5,_0x21da51);_0x1900ed(null);};}for(var e in events){if(events[_0x6462('0x6')](e)){var event=events[e];ChatMessage['hook'](e,emitEvent(event));}}module[_0x6462('0x7')]=ChatMessageEvents;
\ No newline at end of file
+var _0x05ef=['hook','exports','../../mysqldb','ChatMessage','setMaxListeners','save','update','remove','emit'];(function(_0x3d2e4b,_0x1f6653){var _0x509e78=function(_0x307037){while(--_0x307037){_0x3d2e4b['push'](_0x3d2e4b['shift']());}};_0x509e78(++_0x1f6653);}(_0x05ef,0x1f1));var _0xf05e=function(_0x2d579f,_0x370e5d){_0x2d579f=_0x2d579f-0x0;var _0x1145da=_0x05ef[_0x2d579f];return _0x1145da;};'use strict';var EventEmitter=require('events');var ChatMessage=require(_0xf05e('0x0'))['db'][_0xf05e('0x1')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xf05e('0x2')](0x0);var events={'afterCreate':_0xf05e('0x3'),'afterUpdate':_0xf05e('0x4'),'afterDestroy':_0xf05e('0x5')};function emitEvent(_0x54416b){return function(_0x1a5139,_0x2a86ce,_0x512481){ChatMessageEvents['emit'](_0x54416b+':'+_0x1a5139['id'],_0x1a5139);ChatMessageEvents[_0xf05e('0x6')](_0x54416b,_0x1a5139);_0x512481(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatMessage[_0xf05e('0x7')](e,emitEvent(event));}}module[_0xf05e('0x8')]=ChatMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js
index 19d6dcb..0f1f4a9 100644
--- a/server/api/chatMessage/chatMessage.model.js
+++ b/server/api/chatMessage/chatMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3182=['update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','bluebird','request-promise','path','./chatMessage.attributes','exports','define','chat_messages','fti_chat_messages','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','ChatInteraction','findOne'];(function(_0x33644b,_0x19371b){var _0x49c65f=function(_0x5e732b){while(--_0x5e732b){_0x33644b['push'](_0x33644b['shift']());}};_0x49c65f(++_0x19371b);}(_0x3182,0x1b6));var _0x2318=function(_0x46e6b3,_0x1f5410){_0x46e6b3=_0x46e6b3-0x0;var _0x3fe8ec=_0x3182[_0x46e6b3];return _0x3fe8ec;};'use strict';var _=require(_0x2318('0x0'));var util=require(_0x2318('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x2318('0x2'));var rp=require(_0x2318('0x3'));var fs=require('fs');var path=require(_0x2318('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x2318('0x5'));module[_0x2318('0x6')]=function(_0x25a9d7,_0xbb67af){return _0x25a9d7[_0x2318('0x7')]('ChatMessage',attributes,{'tableName':_0x2318('0x8'),'paranoid':![],'indexes':[{'name':_0x2318('0x9'),'fields':['body'],'type':_0x2318('0xa')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1f2bb2,_0x40acc4,_0x4e9b24){var _0x278127=_0x25a9d7[_0x2318('0xb')];var _0x2cac30=_0x1f2bb2[_0x2318('0xc')]({'plain':!![]});if(_0x2cac30[_0x2318('0xd')]['toLowerCase']()==='in'||_0x2cac30[_0x2318('0xd')][_0x2318('0xe')]()===_0x2318('0xf')&&!_0x2cac30[_0x2318('0x10')]&&!_[_0x2318('0x11')](_0x2cac30[_0x2318('0x12')])){_0x278127[_0x2318('0x13')][_0x2318('0x14')]({'where':{'id':_0x2cac30['ChatInteractionId']}})['then'](function(_0x3ef71d){if(_0x3ef71d){_0x3ef71d[_0x2318('0x15')]({'lastMsgAt':_0x2cac30[_0x2318('0x16')],'lastMsgDirection':_0x2cac30[_0x2318('0xd')][_0x2318('0xe')]()});}})[_0x2318('0x17')](function(_0x19edb3){console[_0x2318('0x18')](_0x19edb3);});}_0x4e9b24();}},'charset':_0x2318('0x19'),'collate':_0x2318('0x1a')});};
\ No newline at end of file
+var _0x4ea9=['secret','isNil','findOne','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./chatMessage.attributes','exports','chat_messages','fti_chat_messages','body','FULLTEXT','models','get','direction','toLowerCase','out'];(function(_0x50818c,_0x4dbf5c){var _0x46fe84=function(_0x3755df){while(--_0x3755df){_0x50818c['push'](_0x50818c['shift']());}};_0x46fe84(++_0x4dbf5c);}(_0x4ea9,0x166));var _0x94ea=function(_0x18491f,_0x579f47){_0x18491f=_0x18491f-0x0;var _0x4830bc=_0x4ea9[_0x18491f];return _0x4830bc;};'use strict';var _=require(_0x94ea('0x0'));var util=require('util');var logger=require(_0x94ea('0x1'))(_0x94ea('0x2'));var moment=require(_0x94ea('0x3'));var BPromise=require(_0x94ea('0x4'));var rp=require(_0x94ea('0x5'));var fs=require('fs');var path=require(_0x94ea('0x6'));var rimraf=require('rimraf');var config=require(_0x94ea('0x7'));var attributes=require(_0x94ea('0x8'));module[_0x94ea('0x9')]=function(_0x540920,_0x423380){return _0x540920['define']('ChatMessage',attributes,{'tableName':_0x94ea('0xa'),'paranoid':![],'indexes':[{'name':_0x94ea('0xb'),'fields':[_0x94ea('0xc')],'type':_0x94ea('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x3e396d,_0x5730d5,_0x86a69e){var _0x1e2c30=_0x540920[_0x94ea('0xe')];var _0x2de7f7=_0x3e396d[_0x94ea('0xf')]({'plain':!![]});if(_0x2de7f7[_0x94ea('0x10')][_0x94ea('0x11')]()==='in'||_0x2de7f7[_0x94ea('0x10')][_0x94ea('0x11')]()===_0x94ea('0x12')&&!_0x2de7f7[_0x94ea('0x13')]&&!_[_0x94ea('0x14')](_0x2de7f7['UserId'])){_0x1e2c30['ChatInteraction'][_0x94ea('0x15')]({'where':{'id':_0x2de7f7['ChatInteractionId']}})[_0x94ea('0x16')](function(_0x58c0bd){if(_0x58c0bd){_0x58c0bd[_0x94ea('0x17')]({'lastMsgAt':_0x2de7f7[_0x94ea('0x18')],'lastMsgDirection':_0x2de7f7[_0x94ea('0x10')][_0x94ea('0x11')]()});}})[_0x94ea('0x19')](function(_0x26c8fd){console[_0x94ea('0x1a')](_0x26c8fd);});}_0x86a69e();}},'charset':_0x94ea('0x1b'),'collate':_0x94ea('0x1c')});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js
index cfe1d86..7c2bf43 100644
--- a/server/api/chatMessage/chatMessage.rpc.js
+++ b/server/api/chatMessage/chatMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8c29=['request\x20sent','debug','stringify','error','message','result','catch','CreateChatMessage','ChatMessage','create','options','raw','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','./chatMessage.socket','register','request','then','info','ChatMessage,\x20%s,\x20%s'];(function(_0x4c2b80,_0x2d9078){var _0x21ecf9=function(_0x41b90d){while(--_0x41b90d){_0x4c2b80['push'](_0x4c2b80['shift']());}};_0x21ecf9(++_0x2d9078);}(_0x8c29,0x14c));var _0x98c2=function(_0x4c70a0,_0x22ab1d){_0x4c70a0=_0x4c70a0-0x0;var _0x486e65=_0x8c29[_0x4c70a0];return _0x486e65;};'use strict';var _=require(_0x98c2('0x0'));var util=require(_0x98c2('0x1'));var moment=require(_0x98c2('0x2'));var BPromise=require(_0x98c2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x98c2('0x4'));var db=require(_0x98c2('0x5'))['db'];var utils=require(_0x98c2('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x98c2('0x7'));var jayson=require(_0x98c2('0x8'));var client=jayson[_0x98c2('0x9')][_0x98c2('0xa')]({'port':0x232a});config['redis']=_[_0x98c2('0xb')](config[_0x98c2('0xc')],{'host':_0x98c2('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x98c2('0xc')]));require(_0x98c2('0xe'))[_0x98c2('0xf')](socket);function respondWithRpcPromise(_0x1849e0,_0x3351db,_0x360f5f){return new BPromise(function(_0x279234,_0x1614fc){return client[_0x98c2('0x10')](_0x1849e0,_0x360f5f)[_0x98c2('0x11')](function(_0x4c641e){logger[_0x98c2('0x12')](_0x98c2('0x13'),_0x3351db,_0x98c2('0x14'));logger[_0x98c2('0x15')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x3351db,_0x98c2('0x14'),JSON[_0x98c2('0x16')](_0x4c641e));if(_0x4c641e[_0x98c2('0x17')]){if(_0x4c641e['error']['code']===0x1f4){logger[_0x98c2('0x17')](_0x98c2('0x13'),_0x3351db,_0x4c641e[_0x98c2('0x17')][_0x98c2('0x18')]);return _0x1614fc(_0x4c641e[_0x98c2('0x17')][_0x98c2('0x18')]);}logger[_0x98c2('0x17')](_0x98c2('0x13'),_0x3351db,_0x4c641e[_0x98c2('0x17')][_0x98c2('0x18')]);return _0x279234(_0x4c641e['error'][_0x98c2('0x18')]);}else{logger[_0x98c2('0x12')](_0x98c2('0x13'),_0x3351db,_0x98c2('0x14'));_0x279234(_0x4c641e[_0x98c2('0x19')][_0x98c2('0x18')]);}})[_0x98c2('0x1a')](function(_0x59a008){logger[_0x98c2('0x17')]('ChatMessage,\x20%s,\x20%s',_0x3351db,_0x59a008);_0x1614fc(_0x59a008);});});}exports[_0x98c2('0x1b')]=function(_0x4b0e5f){var _0x5e2e09=this;return new Promise(function(_0x430638,_0x480309){return db[_0x98c2('0x1c')][_0x98c2('0x1d')](_0x4b0e5f['body'],{'raw':_0x4b0e5f['options']?_0x4b0e5f[_0x98c2('0x1e')][_0x98c2('0x1f')]===undefined?!![]:![]:!![]})[_0x98c2('0x11')](function(_0x1a7e63){logger['info'](_0x98c2('0x1b'),_0x4b0e5f);logger[_0x98c2('0x15')](_0x98c2('0x1b'),_0x4b0e5f,JSON[_0x98c2('0x16')](_0x1a7e63));_0x430638(_0x1a7e63);})[_0x98c2('0x1a')](function(_0x394cbc){logger[_0x98c2('0x17')](_0x98c2('0x1b'),_0x394cbc['message'],_0x4b0e5f);_0x480309(_0x5e2e09['error'](0x1f4,_0x394cbc[_0x98c2('0x18')]));});});};
\ No newline at end of file
+var _0xddff=['request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','CreateChatMessage','ChatMessage','create','body','options','then','debug','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./chatMessage.socket','register','ChatMessage,\x20%s,\x20%s'];(function(_0x2d103b,_0x3b2d41){var _0x40773c=function(_0x3879f4){while(--_0x3879f4){_0x2d103b['push'](_0x2d103b['shift']());}};_0x40773c(++_0x3b2d41);}(_0xddff,0xb8));var _0xfddf=function(_0x1a89ca,_0x27394b){_0x1a89ca=_0x1a89ca-0x0;var _0x29cbb2=_0xddff[_0x1a89ca];return _0x29cbb2;};'use strict';var _=require(_0xfddf('0x0'));var util=require(_0xfddf('0x1'));var moment=require(_0xfddf('0x2'));var BPromise=require(_0xfddf('0x3'));var rs=require(_0xfddf('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfddf('0x5'))['db'];var utils=require(_0xfddf('0x6'));var logger=require(_0xfddf('0x7'))(_0xfddf('0x8'));var config=require(_0xfddf('0x9'));var jayson=require(_0xfddf('0xa'));var client=jayson[_0xfddf('0xb')][_0xfddf('0xc')]({'port':0x232a});config['redis']=_[_0xfddf('0xd')](config[_0xfddf('0xe')],{'host':_0xfddf('0xf'),'port':0x18eb});var socket=require(_0xfddf('0x10'))(new Redis(config[_0xfddf('0xe')]));require(_0xfddf('0x11'))[_0xfddf('0x12')](socket);function respondWithRpcPromise(_0x2fd554,_0x39bdf1,_0x1da789){return new BPromise(function(_0x14728f,_0x5c272b){return client['request'](_0x2fd554,_0x1da789)['then'](function(_0x488320){logger['info'](_0xfddf('0x13'),_0x39bdf1,_0xfddf('0x14'));logger['debug'](_0xfddf('0x15'),_0x39bdf1,'request\x20sent',JSON[_0xfddf('0x16')](_0x488320));if(_0x488320[_0xfddf('0x17')]){if(_0x488320[_0xfddf('0x17')]['code']===0x1f4){logger['error'](_0xfddf('0x13'),_0x39bdf1,_0x488320[_0xfddf('0x17')][_0xfddf('0x18')]);return _0x5c272b(_0x488320[_0xfddf('0x17')][_0xfddf('0x18')]);}logger[_0xfddf('0x17')]('ChatMessage,\x20%s,\x20%s',_0x39bdf1,_0x488320[_0xfddf('0x17')][_0xfddf('0x18')]);return _0x14728f(_0x488320['error'][_0xfddf('0x18')]);}else{logger[_0xfddf('0x19')](_0xfddf('0x13'),_0x39bdf1,_0xfddf('0x14'));_0x14728f(_0x488320['result']['message']);}})[_0xfddf('0x1a')](function(_0x2e4c33){logger['error']('ChatMessage,\x20%s,\x20%s',_0x39bdf1,_0x2e4c33);_0x5c272b(_0x2e4c33);});});}exports[_0xfddf('0x1b')]=function(_0x5cf2d2){var _0x29f3a0=this;return new Promise(function(_0x4073a6,_0x1ba10d){return db[_0xfddf('0x1c')][_0xfddf('0x1d')](_0x5cf2d2[_0xfddf('0x1e')],{'raw':_0x5cf2d2[_0xfddf('0x1f')]?_0x5cf2d2[_0xfddf('0x1f')]['raw']===undefined?!![]:![]:!![]})[_0xfddf('0x20')](function(_0xace40a){logger[_0xfddf('0x19')]('CreateChatMessage',_0x5cf2d2);logger[_0xfddf('0x21')](_0xfddf('0x1b'),_0x5cf2d2,JSON[_0xfddf('0x16')](_0xace40a));_0x4073a6(_0xace40a);})[_0xfddf('0x1a')](function(_0x58bcdb){logger['error'](_0xfddf('0x1b'),_0x58bcdb[_0xfddf('0x18')],_0x5cf2d2);_0x1ba10d(_0x29f3a0[_0xfddf('0x17')](0x1f4,_0x58bcdb[_0xfddf('0x18')]));});});};
\ No newline at end of file
diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js
index 51624c3..537ce5f 100644
--- a/server/api/chatMessage/chatMessage.socket.js
+++ b/server/api/chatMessage/chatMessage.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc949=['chatMessage:','./chatMessage.events','remove','update','emit','removeListener','register','length'];(function(_0x38f411,_0x5864cc){var _0x2a6132=function(_0x206d69){while(--_0x206d69){_0x38f411['push'](_0x38f411['shift']());}};_0x2a6132(++_0x5864cc);}(_0xc949,0x181));var _0x9c94=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0xc949[_0x2160a9];return _0xa88cf7;};'use strict';var ChatMessageEvents=require(_0x9c94('0x0'));var events=['save',_0x9c94('0x1'),_0x9c94('0x2')];function createListener(_0x209cd8,_0x27613f){return function(_0x54facf){_0x27613f[_0x9c94('0x3')](_0x209cd8,_0x54facf);};}function removeListener(_0x231762,_0x528a17){return function(){ChatMessageEvents[_0x9c94('0x4')](_0x231762,_0x528a17);};}exports[_0x9c94('0x5')]=function(_0x46d560){for(var _0x1357ac=0x0,_0x57fcd7=events[_0x9c94('0x6')];_0x1357ac<_0x57fcd7;_0x1357ac++){var _0x360e7b=events[_0x1357ac];var _0x25ecd0=createListener(_0x9c94('0x7')+_0x360e7b,_0x46d560);ChatMessageEvents['on'](_0x360e7b,_0x25ecd0);}};
\ No newline at end of file
+var _0x9576=['save','remove','update','emit','removeListener','register','length','chatMessage:','./chatMessage.events'];(function(_0x7557f4,_0x5be8c9){var _0x245342=function(_0x4b625e){while(--_0x4b625e){_0x7557f4['push'](_0x7557f4['shift']());}};_0x245342(++_0x5be8c9);}(_0x9576,0x182));var _0x6957=function(_0x57b5dd,_0x4e934d){_0x57b5dd=_0x57b5dd-0x0;var _0x4ea6cf=_0x9576[_0x57b5dd];return _0x4ea6cf;};'use strict';var ChatMessageEvents=require(_0x6957('0x0'));var events=[_0x6957('0x1'),_0x6957('0x2'),_0x6957('0x3')];function createListener(_0x47fd53,_0x4ee0d8){return function(_0xf9d8fc){_0x4ee0d8[_0x6957('0x4')](_0x47fd53,_0xf9d8fc);};}function removeListener(_0x9e834,_0x10ed80){return function(){ChatMessageEvents[_0x6957('0x5')](_0x9e834,_0x10ed80);};}exports[_0x6957('0x6')]=function(_0x2eb79e){for(var _0x49e08a=0x0,_0x6d8af8=events[_0x6957('0x7')];_0x49e08a<_0x6d8af8;_0x49e08a++){var _0x70b8c4=events[_0x49e08a];var _0x2e5727=createListener(_0x6957('0x8')+_0x70b8c4,_0x2eb79e);ChatMessageEvents['on'](_0x70b8c4,_0x2e5727);}};
\ No newline at end of file
diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js
index b0cebee..6b83738 100644
--- a/server/api/chatMessage/index.js
+++ b/server/api/chatMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4327=['show','post','tracked','create','put','accept','/:id/reject','reject','destroy','exports','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x1023b2,_0x4afae8){var _0xd9e85c=function(_0x4c968f){while(--_0x4c968f){_0x1023b2['push'](_0x1023b2['shift']());}};_0xd9e85c(++_0x4afae8);}(_0x4327,0x1d2));var _0x7432=function(_0x2859f2,_0x1e3102){_0x2859f2=_0x2859f2-0x0;var _0x4974cd=_0x4327[_0x2859f2];return _0x4974cd;};'use strict';var multer=require('multer');var util=require(_0x7432('0x0'));var path=require(_0x7432('0x1'));var timeout=require(_0x7432('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x7432('0x3'));var auth=require(_0x7432('0x4'));var interaction=require(_0x7432('0x5'));var config=require(_0x7432('0x6'));var controller=require(_0x7432('0x7'));router[_0x7432('0x8')]('/',auth[_0x7432('0x9')](),controller[_0x7432('0xa')]);router['get'](_0x7432('0xb'),auth['isAuthenticated'](),controller[_0x7432('0xc')]);router[_0x7432('0x8')](_0x7432('0xd'),auth[_0x7432('0x9')](),controller[_0x7432('0xe')]);router[_0x7432('0xf')]('/',auth[_0x7432('0x9')](),interaction[_0x7432('0x10')]('chat','chatmessage:create'),controller[_0x7432('0x11')]);router[_0x7432('0x12')](_0x7432('0xd'),controller['update']);router[_0x7432('0x12')]('/:id/accept',auth['isAuthenticated'](),controller[_0x7432('0x13')]);router[_0x7432('0x12')](_0x7432('0x14'),auth[_0x7432('0x9')](),controller[_0x7432('0x15')]);router['delete']('/:id',auth[_0x7432('0x9')](),controller[_0x7432('0x16')]);module[_0x7432('0x17')]=router;
\ No newline at end of file
+var _0xa108=['delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','get','index','/describe','isAuthenticated','describe','/:id','post','tracked','chatmessage:create','create','put','update','/:id/accept','accept','/:id/reject','reject'];(function(_0x33176f,_0x1e9976){var _0xe0f491=function(_0x242b5d){while(--_0x242b5d){_0x33176f['push'](_0x33176f['shift']());}};_0xe0f491(++_0x1e9976);}(_0xa108,0x1bd));var _0x8a10=function(_0x10be73,_0x58c43){_0x10be73=_0x10be73-0x0;var _0xd430f7=_0xa108[_0x10be73];return _0xd430f7;};'use strict';var multer=require('multer');var util=require(_0x8a10('0x0'));var path=require(_0x8a10('0x1'));var timeout=require(_0x8a10('0x2'));var express=require(_0x8a10('0x3'));var router=express[_0x8a10('0x4')]();var fs_extra=require(_0x8a10('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x8a10('0x6'));var controller=require('./chatMessage.controller');router[_0x8a10('0x7')]('/',auth['isAuthenticated'](),controller[_0x8a10('0x8')]);router[_0x8a10('0x7')](_0x8a10('0x9'),auth[_0x8a10('0xa')](),controller[_0x8a10('0xb')]);router[_0x8a10('0x7')](_0x8a10('0xc'),auth[_0x8a10('0xa')](),controller['show']);router[_0x8a10('0xd')]('/',auth[_0x8a10('0xa')](),interaction[_0x8a10('0xe')]('chat',_0x8a10('0xf')),controller[_0x8a10('0x10')]);router[_0x8a10('0x11')](_0x8a10('0xc'),controller[_0x8a10('0x12')]);router[_0x8a10('0x11')](_0x8a10('0x13'),auth[_0x8a10('0xa')](),controller[_0x8a10('0x14')]);router[_0x8a10('0x11')](_0x8a10('0x15'),auth[_0x8a10('0xa')](),controller[_0x8a10('0x16')]);router[_0x8a10('0x17')](_0x8a10('0xc'),auth[_0x8a10('0xa')](),controller[_0x8a10('0x18')]);module[_0x8a10('0x19')]=router;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
index 9f0e839..49f08ea 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdb28=['TEXT','medium','sequelize','exports'];(function(_0x132477,_0x42d24b){var _0x95b79f=function(_0x291f1c){while(--_0x291f1c){_0x132477['push'](_0x132477['shift']());}};_0x95b79f(++_0x42d24b);}(_0xdb28,0x106));var _0x8db2=function(_0xebf7da,_0x1fc65e){_0xebf7da=_0xebf7da-0x0;var _0x1df326=_0xdb28[_0xebf7da];return _0x1df326;};'use strict';var Sequelize=require(_0x8db2('0x0'));module[_0x8db2('0x1')]={'body':{'type':Sequelize[_0x8db2('0x2')](_0x8db2('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT'](_0x8db2('0x3')),'allowNull':![]}};
\ No newline at end of file
+var _0x757a=['exports','TEXT'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0x757a,0xde));var _0xa757=function(_0x2924db,_0x15cae5){_0x2924db=_0x2924db-0x0;var _0x112658=_0x757a[_0x2924db];return _0x112658;};'use strict';var Sequelize=require('sequelize');module[_0xa757('0x0')]={'body':{'type':Sequelize[_0xa757('0x1')]('medium'),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT']('medium'),'allowNull':![]}};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
index e1a7996..155b214 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7a54=['filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','Attachment','join','server','attachments','offline-chat','basename','remove','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','ChatOfflineMessage','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0x7a54,0x106));var _0x47a5=function(_0xe98c5f,_0x26267f){_0xe98c5f=_0xe98c5f-0x0;var _0x9e8d98=_0x7a54[_0xe98c5f];return _0x9e8d98;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x29')]=function(_0x136b14,_0x16631f){var _0x361bfa={},_0x1127f8={},_0x11a4fa={'count':0x0,'rows':[]};var _0x3ad507=_['map'](db[_0x47a5('0x2a')]['rawAttributes'],function(_0x2ef875){return{'name':_0x2ef875[_0x47a5('0x2b')],'type':_0x2ef875[_0x47a5('0x2c')]['key']};});_0x1127f8[_0x47a5('0x2d')]=_[_0x47a5('0x2e')](_0x3ad507,_0x47a5('0x27'));_0x1127f8[_0x47a5('0x2f')]=_['keys'](_0x136b14['query']);_0x1127f8[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x1127f8['model'],_0x1127f8['query']);_0x361bfa[_0x47a5('0x32')]=_[_0x47a5('0x31')](_0x1127f8['model'],qs[_0x47a5('0x33')](_0x136b14['query'][_0x47a5('0x33')]));_0x361bfa[_0x47a5('0x32')]=_0x361bfa['attributes']['length']?_0x361bfa[_0x47a5('0x32')]:_0x1127f8['model'];if(!_0x136b14[_0x47a5('0x2f')][_0x47a5('0x34')](_0x47a5('0x35'))){_0x361bfa['limit']=qs[_0x47a5('0x1d')](_0x136b14['query']['limit']);_0x361bfa[_0x47a5('0x1a')]=qs['offset'](_0x136b14[_0x47a5('0x2f')]['offset']);}_0x361bfa[_0x47a5('0x36')]=qs[_0x47a5('0x37')](_0x136b14[_0x47a5('0x2f')][_0x47a5('0x37')]);_0x361bfa[_0x47a5('0x38')]=qs[_0x47a5('0x30')](_[_0x47a5('0x39')](_0x136b14[_0x47a5('0x2f')],_0x1127f8[_0x47a5('0x30')]),_0x3ad507);if(_0x136b14['query'][_0x47a5('0x3a')]){_0x361bfa[_0x47a5('0x38')]=_['merge'](_0x361bfa[_0x47a5('0x38')],{'$or':_[_0x47a5('0x2e')](_0x3ad507,function(_0x1d4348){if(_0x1d4348['type']!==_0x47a5('0x3b')){var _0x10f660={};_0x10f660[_0x1d4348['name']]={'$like':'%'+_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3a')]+'%'};return _0x10f660;}})});}_0x361bfa=_['merge']({},_0x361bfa,_0x136b14['options']);var _0x5ebd8c={'where':_0x361bfa[_0x47a5('0x38')]};return db['ChatOfflineMessage'][_0x47a5('0x1c')](_0x5ebd8c)[_0x47a5('0x23')](function(_0x301a85){_0x11a4fa[_0x47a5('0x1c')]=_0x301a85;if(_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x361bfa[_0x47a5('0x3d')]=[{'all':!![]}];}return db[_0x47a5('0x2a')][_0x47a5('0x3e')](_0x361bfa);})[_0x47a5('0x23')](function(_0x280500){_0x11a4fa[_0x47a5('0x3f')]=_0x280500;return _0x11a4fa;})[_0x47a5('0x23')](respondWithFilteredResult(_0x16631f,_0x361bfa))['catch'](handleError(_0x16631f,null));};exports[_0x47a5('0x40')]=function(_0x1c36fa,_0x331474){var _0x23bd8d={'raw':!![],'where':{'id':_0x1c36fa[_0x47a5('0x41')]['id']}},_0x586f4f={};_0x586f4f['model']=_['keys'](db['ChatOfflineMessage']['rawAttributes']);_0x586f4f[_0x47a5('0x2f')]=_['keys'](_0x1c36fa[_0x47a5('0x2f')]);_0x586f4f[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x586f4f['model'],_0x586f4f[_0x47a5('0x2f')]);_0x23bd8d[_0x47a5('0x32')]=_['intersection'](_0x586f4f['model'],qs[_0x47a5('0x33')](_0x1c36fa['query'][_0x47a5('0x33')]));_0x23bd8d[_0x47a5('0x32')]=_0x23bd8d[_0x47a5('0x32')][_0x47a5('0x42')]?_0x23bd8d[_0x47a5('0x32')]:_0x586f4f[_0x47a5('0x2d')];if(_0x1c36fa[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x23bd8d[_0x47a5('0x3d')]=[{'all':!![]}];}_0x23bd8d=_[_0x47a5('0x43')]({},_0x23bd8d,_0x1c36fa[_0x47a5('0x44')]);return db[_0x47a5('0x2a')][_0x47a5('0x45')](_0x23bd8d)[_0x47a5('0x23')](handleEntityNotFound(_0x331474,null))[_0x47a5('0x23')](respondWithResult(_0x331474,null))[_0x47a5('0x46')](handleError(_0x331474,null));};exports['create']=function(_0x2d38de,_0x23bb04){return db['ChatOfflineMessage']['create'](_0x2d38de[_0x47a5('0x47')],{})['then'](respondWithResult(_0x23bb04,0xc9))[_0x47a5('0x46')](handleError(_0x23bb04,null));};exports[_0x47a5('0x22')]=function(_0x54c35f,_0x4f62d3){if(_0x54c35f[_0x47a5('0x47')]['id']){delete _0x54c35f['body']['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x54c35f[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x4f62d3,null))[_0x47a5('0x23')](saveUpdates(_0x54c35f[_0x47a5('0x47')],null))[_0x47a5('0x23')](respondWithResult(_0x4f62d3,null))['catch'](handleError(_0x4f62d3,null));};exports['destroy']=function(_0x2dd1db,_0x411230){return db[_0x47a5('0x48')][_0x47a5('0x3e')]({'where':{'ChatOfflineMessageId':_0x2dd1db[_0x47a5('0x41')]['id']},'raw':!![]})[_0x47a5('0x23')](function(_0x249de5){_0x249de5['forEach'](function(_0x45cca5){var _0x1c9a62=path[_0x47a5('0x49')](config['root'],_0x47a5('0x4a'),'files',_0x47a5('0x4b'),_0x47a5('0x4c'),_0x45cca5[_0x47a5('0x4d')]);var _0xf03bd5=fs['existsSync'](_0x1c9a62);if(_0xf03bd5)fs_extra[_0x47a5('0x4e')](_0x1c9a62);});})[_0x47a5('0x23')](function(){return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']},'individualHooks':!![]});})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x4f')]=function(_0x43721b,_0x187d7e){return db[_0x47a5('0x2a')][_0x47a5('0x4f')]()[_0x47a5('0x23')](respondWithResult(_0x187d7e,null))['catch'](handleError(_0x187d7e,null));};
\ No newline at end of file
+var _0x9957=['sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy','error','name','send','index','fieldName','type','key','model','map','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','ChatOfflineMessage','findAll','rows','show','rawAttributes','includeAll','include','find','create','catch','body','params','Attachment','forEach','join','root','server','files','attachments','basename','existsSync','remove','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb'];(function(_0x53b7fd,_0xcac0d7){var _0x18a294=function(_0x484450){while(--_0x484450){_0x53b7fd['push'](_0x53b7fd['shift']());}};_0x18a294(++_0xcac0d7);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0x7995('0x0'));var rimraf=require(_0x7995('0x1'));var zipdir=require(_0x7995('0x2'));var jsonpatch=require(_0x7995('0x3'));var rp=require('request-promise');var moment=require(_0x7995('0x4'));var BPromise=require(_0x7995('0x5'));var Mustache=require(_0x7995('0x6'));var util=require(_0x7995('0x7'));var path=require('path');var sox=require(_0x7995('0x8'));var csv=require(_0x7995('0x9'));var ejs=require(_0x7995('0xa'));var fs=require('fs');var fs_extra=require(_0x7995('0xb'));var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x7995('0x19'));var db=require(_0x7995('0x1a'))['db'];function respondWithStatusCode(_0x19a27e,_0x385f00){_0x385f00=_0x385f00||0xcc;return function(_0x281576){if(_0x281576){return _0x19a27e[_0x7995('0x1b')](_0x385f00);}return _0x19a27e[_0x7995('0x1c')](_0x385f00)['end']();};}function respondWithResult(_0x58f5ad,_0x2b4e94){_0x2b4e94=_0x2b4e94||0xc8;return function(_0x2233dd){if(_0x2233dd){return _0x58f5ad[_0x7995('0x1c')](_0x2b4e94)[_0x7995('0x1d')](_0x2233dd);}};}function respondWithFilteredResult(_0x3f1d3e,_0x1a5310){return function(_0x2202ce){if(_0x2202ce){var _0x41cbf0=typeof _0x1a5310['offset']===_0x7995('0x1e')&&typeof _0x1a5310['limit']===_0x7995('0x1e');var _0x37f297=_0x2202ce[_0x7995('0x1f')];var _0x291317=_0x41cbf0?0x0:_0x1a5310[_0x7995('0x20')];var _0x37a7d4=_0x41cbf0?_0x2202ce['count']:_0x1a5310['offset']+_0x1a5310[_0x7995('0x21')];var _0x5e6f90;if(_0x37a7d4>=_0x37f297){_0x37a7d4=_0x37f297;_0x5e6f90=0xc8;}else{_0x5e6f90=0xce;}_0x3f1d3e['status'](_0x5e6f90);return _0x3f1d3e[_0x7995('0x22')](_0x7995('0x23'),_0x291317+'-'+_0x37a7d4+'/'+_0x37f297)['json'](_0x2202ce);}return null;};}function patchUpdates(_0x3a9b54){return function(_0x51f276){try{jsonpatch['apply'](_0x51f276,_0x3a9b54,!![]);}catch(_0x3e4c54){return BPromise[_0x7995('0x24')](_0x3e4c54);}return _0x51f276[_0x7995('0x25')]();};}function saveUpdates(_0x1a8568,_0x460924){return function(_0x1c278a){if(_0x1c278a){return _0x1c278a['update'](_0x1a8568)[_0x7995('0x26')](function(_0x46ee4b){return _0x46ee4b;});}return null;};}function removeEntity(_0x204507,_0x285437){return function(_0x563799){if(_0x563799){return _0x563799[_0x7995('0x27')]()[_0x7995('0x26')](function(){_0x204507[_0x7995('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39df42,_0x34e70c){return function(_0x401dc3){if(!_0x401dc3){_0x39df42[_0x7995('0x1b')](0x194);}return _0x401dc3;};}function handleError(_0x3a3fcf,_0x2a307e){_0x2a307e=_0x2a307e||0x1f4;return function(_0x56691a){logger[_0x7995('0x28')](_0x56691a['stack']);if(_0x56691a[_0x7995('0x29')]){delete _0x56691a[_0x7995('0x29')];}_0x3a3fcf[_0x7995('0x1c')](_0x2a307e)[_0x7995('0x2a')](_0x56691a);};}exports[_0x7995('0x2b')]=function(_0x4b6f99,_0x9b2a15){var _0x514445={},_0x456a28={},_0x3250e0={'count':0x0,'rows':[]};var _0x4253e5=_['map'](db['ChatOfflineMessage']['rawAttributes'],function(_0x3573be){return{'name':_0x3573be[_0x7995('0x2c')],'type':_0x3573be[_0x7995('0x2d')][_0x7995('0x2e')]};});_0x456a28[_0x7995('0x2f')]=_[_0x7995('0x30')](_0x4253e5,'name');_0x456a28['query']=_[_0x7995('0x31')](_0x4b6f99['query']);_0x456a28[_0x7995('0x32')]=_[_0x7995('0x33')](_0x456a28[_0x7995('0x2f')],_0x456a28[_0x7995('0x34')]);_0x514445[_0x7995('0x35')]=_['intersection'](_0x456a28[_0x7995('0x2f')],qs[_0x7995('0x36')](_0x4b6f99['query']['fields']));_0x514445['attributes']=_0x514445[_0x7995('0x35')][_0x7995('0x37')]?_0x514445['attributes']:_0x456a28[_0x7995('0x2f')];if(!_0x4b6f99['query'][_0x7995('0x38')](_0x7995('0x39'))){_0x514445[_0x7995('0x21')]=qs['limit'](_0x4b6f99['query'][_0x7995('0x21')]);_0x514445['offset']=qs['offset'](_0x4b6f99[_0x7995('0x34')][_0x7995('0x20')]);}_0x514445['order']=qs[_0x7995('0x3a')](_0x4b6f99[_0x7995('0x34')][_0x7995('0x3a')]);_0x514445[_0x7995('0x3b')]=qs[_0x7995('0x32')](_['pick'](_0x4b6f99[_0x7995('0x34')],_0x456a28[_0x7995('0x32')]),_0x4253e5);if(_0x4b6f99[_0x7995('0x34')][_0x7995('0x3c')]){_0x514445['where']=_[_0x7995('0x3d')](_0x514445[_0x7995('0x3b')],{'$or':_[_0x7995('0x30')](_0x4253e5,function(_0xe5ea43){if(_0xe5ea43[_0x7995('0x2d')]!==_0x7995('0x3e')){var _0x5688a1={};_0x5688a1[_0xe5ea43[_0x7995('0x29')]]={'$like':'%'+_0x4b6f99[_0x7995('0x34')][_0x7995('0x3c')]+'%'};return _0x5688a1;}})});}_0x514445=_[_0x7995('0x3d')]({},_0x514445,_0x4b6f99[_0x7995('0x3f')]);var _0x298fc2={'where':_0x514445[_0x7995('0x3b')]};return db[_0x7995('0x40')][_0x7995('0x1f')](_0x298fc2)[_0x7995('0x26')](function(_0x6fe77b){_0x3250e0[_0x7995('0x1f')]=_0x6fe77b;if(_0x4b6f99[_0x7995('0x34')]['includeAll']){_0x514445['include']=[{'all':!![]}];}return db[_0x7995('0x40')][_0x7995('0x41')](_0x514445);})['then'](function(_0x4b0855){_0x3250e0[_0x7995('0x42')]=_0x4b0855;return _0x3250e0;})['then'](respondWithFilteredResult(_0x9b2a15,_0x514445))['catch'](handleError(_0x9b2a15,null));};exports[_0x7995('0x43')]=function(_0x36e28b,_0x35c8ff){var _0x576b96={'raw':!![],'where':{'id':_0x36e28b['params']['id']}},_0x46ac4f={};_0x46ac4f[_0x7995('0x2f')]=_['keys'](db['ChatOfflineMessage'][_0x7995('0x44')]);_0x46ac4f[_0x7995('0x34')]=_[_0x7995('0x31')](_0x36e28b[_0x7995('0x34')]);_0x46ac4f['filters']=_[_0x7995('0x33')](_0x46ac4f[_0x7995('0x2f')],_0x46ac4f[_0x7995('0x34')]);_0x576b96[_0x7995('0x35')]=_['intersection'](_0x46ac4f['model'],qs[_0x7995('0x36')](_0x36e28b['query'][_0x7995('0x36')]));_0x576b96['attributes']=_0x576b96[_0x7995('0x35')]['length']?_0x576b96[_0x7995('0x35')]:_0x46ac4f[_0x7995('0x2f')];if(_0x36e28b['query'][_0x7995('0x45')]){_0x576b96[_0x7995('0x46')]=[{'all':!![]}];}_0x576b96=_[_0x7995('0x3d')]({},_0x576b96,_0x36e28b[_0x7995('0x3f')]);return db['ChatOfflineMessage'][_0x7995('0x47')](_0x576b96)[_0x7995('0x26')](handleEntityNotFound(_0x35c8ff,null))[_0x7995('0x26')](respondWithResult(_0x35c8ff,null))['catch'](handleError(_0x35c8ff,null));};exports[_0x7995('0x48')]=function(_0x44f516,_0x511567){return db[_0x7995('0x40')][_0x7995('0x48')](_0x44f516['body'],{})[_0x7995('0x26')](respondWithResult(_0x511567,0xc9))[_0x7995('0x49')](handleError(_0x511567,null));};exports['update']=function(_0x3d1dbb,_0x5843ba){if(_0x3d1dbb[_0x7995('0x4a')]['id']){delete _0x3d1dbb[_0x7995('0x4a')]['id'];}return db[_0x7995('0x40')][_0x7995('0x47')]({'where':{'id':_0x3d1dbb[_0x7995('0x4b')]['id']}})[_0x7995('0x26')](handleEntityNotFound(_0x5843ba,null))[_0x7995('0x26')](saveUpdates(_0x3d1dbb['body'],null))[_0x7995('0x26')](respondWithResult(_0x5843ba,null))[_0x7995('0x49')](handleError(_0x5843ba,null));};exports[_0x7995('0x27')]=function(_0x4ffc8a,_0x19da63){return db[_0x7995('0x4c')][_0x7995('0x41')]({'where':{'ChatOfflineMessageId':_0x4ffc8a['params']['id']},'raw':!![]})['then'](function(_0x5a592e){_0x5a592e[_0x7995('0x4d')](function(_0x1fd1ca){var _0x4cf5db=path[_0x7995('0x4e')](config[_0x7995('0x4f')],_0x7995('0x50'),_0x7995('0x51'),_0x7995('0x52'),'offline-chat',_0x1fd1ca[_0x7995('0x53')]);var _0x4ab09f=fs[_0x7995('0x54')](_0x4cf5db);if(_0x4ab09f)fs_extra[_0x7995('0x55')](_0x4cf5db);});})[_0x7995('0x26')](function(){return db['ChatOfflineMessage']['find']({'where':{'id':_0x4ffc8a['params']['id']},'individualHooks':!![]});})['then'](handleEntityNotFound(_0x19da63,null))[_0x7995('0x26')](removeEntity(_0x19da63,null))[_0x7995('0x49')](handleError(_0x19da63,null));};exports[_0x7995('0x56')]=function(_0x150261,_0x1d957e){return db[_0x7995('0x40')][_0x7995('0x56')]()[_0x7995('0x26')](respondWithResult(_0x1d957e,null))[_0x7995('0x49')](handleError(_0x1d957e,null));};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.events.js b/server/api/chatOfflineMessage/chatOfflineMessage.events.js
index 9abf282..75bf33d 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.events.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfb50=['remove','hasOwnProperty','hook','exports','events','../../mysqldb','save','update'];(function(_0xa475c7,_0x3b1a88){var _0x4d53ed=function(_0x575e25){while(--_0x575e25){_0xa475c7['push'](_0xa475c7['shift']());}};_0x4d53ed(++_0x3b1a88);}(_0xfb50,0x1ec));var _0x0fb5=function(_0x38537f,_0x252124){_0x38537f=_0x38537f-0x0;var _0x141e23=_0xfb50[_0x38537f];return _0x141e23;};'use strict';var EventEmitter=require(_0x0fb5('0x0'));var ChatOfflineMessage=require(_0x0fb5('0x1'))['db']['ChatOfflineMessage'];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0fb5('0x2'),'afterUpdate':_0x0fb5('0x3'),'afterDestroy':_0x0fb5('0x4')};function emitEvent(_0x4b1ff2){return function(_0x4f13a1,_0x729778,_0x2e10b6){ChatOfflineMessageEvents['emit'](_0x4b1ff2+':'+_0x4f13a1['id'],_0x4f13a1);ChatOfflineMessageEvents['emit'](_0x4b1ff2,_0x4f13a1);_0x2e10b6(null);};}for(var e in events){if(events[_0x0fb5('0x5')](e)){var event=events[e];ChatOfflineMessage[_0x0fb5('0x6')](e,emitEvent(event));}}module[_0x0fb5('0x7')]=ChatOfflineMessageEvents;
\ No newline at end of file
+var _0x3ef1=['events','ChatOfflineMessage','setMaxListeners','save','update','remove','hook'];(function(_0x34ea11,_0x252984){var _0x1cdda9=function(_0x371d56){while(--_0x371d56){_0x34ea11['push'](_0x34ea11['shift']());}};_0x1cdda9(++_0x252984);}(_0x3ef1,0x8c));var _0x13ef=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x3ef1[_0x2641f9];return _0x585741;};'use strict';var EventEmitter=require(_0x13ef('0x0'));var ChatOfflineMessage=require('../../mysqldb')['db'][_0x13ef('0x1')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0x13ef('0x2')](0x0);var events={'afterCreate':_0x13ef('0x3'),'afterUpdate':_0x13ef('0x4'),'afterDestroy':_0x13ef('0x5')};function emitEvent(_0x15a5fb){return function(_0x4d9478,_0x260b8b,_0x1cc364){ChatOfflineMessageEvents['emit'](_0x15a5fb+':'+_0x4d9478['id'],_0x4d9478);ChatOfflineMessageEvents['emit'](_0x15a5fb,_0x4d9478);_0x1cc364(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatOfflineMessage[_0x13ef('0x6')](e,emitEvent(event));}}module['exports']=ChatOfflineMessageEvents;
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
index 9cf4c81..14c85f1 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.model.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x35f2=['define','ChatOfflineMessage','chat_offline_messages','utf8mb4_unicode_ci','exports'];(function(_0x236c65,_0x23b8ee){var _0x5c2b0b=function(_0x556ed1){while(--_0x556ed1){_0x236c65['push'](_0x236c65['shift']());}};_0x5c2b0b(++_0x23b8ee);}(_0x35f2,0x68));var _0x235f=function(_0xd209e7,_0x1224b4){_0xd209e7=_0xd209e7-0x0;var _0x55a4f1=_0x35f2[_0xd209e7];return _0x55a4f1;};'use strict';var attributes=require('./chatOfflineMessage.attributes');module[_0x235f('0x0')]=function(_0x42a76e){return _0x42a76e[_0x235f('0x1')](_0x235f('0x2'),attributes,{'tableName':_0x235f('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x235f('0x4')});};
\ No newline at end of file
+var _0x7959=['define','ChatOfflineMessage','chat_offline_messages','utf8mb4_unicode_ci'];(function(_0x2335bd,_0x54e892){var _0x2aac2c=function(_0x3194dc){while(--_0x3194dc){_0x2335bd['push'](_0x2335bd['shift']());}};_0x2aac2c(++_0x54e892);}(_0x7959,0x15c));var _0x9795=function(_0x59d621,_0x21edd6){_0x59d621=_0x59d621-0x0;var _0x4f52cf=_0x7959[_0x59d621];return _0x4f52cf;};'use strict';var attributes=require('./chatOfflineMessage.attributes');module['exports']=function(_0x23ed26){return _0x23ed26[_0x9795('0x0')](_0x9795('0x1'),attributes,{'tableName':_0x9795('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x9795('0x3')});};
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
index a0dfc0f..eceab3c 100644
--- a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
+++ b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7303=['../../config/utils','rpc','../../config/environment','client','http','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x41bf55,_0x5ce76d){var _0x3aa827=function(_0x37639f){while(--_0x37639f){_0x41bf55['push'](_0x41bf55['shift']());}};_0x3aa827(++_0x5ce76d);}(_0x7303,0xa3));var _0x3730=function(_0xb1dcb1,_0x1ca3fe){_0xb1dcb1=_0xb1dcb1-0x0;var _0x36cffb=_0x7303[_0xb1dcb1];return _0x36cffb;};'use strict';var _=require(_0x3730('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3730('0x1'));var rs=require(_0x3730('0x2'));var fs=require('fs');var Redis=require(_0x3730('0x3'));var db=require(_0x3730('0x4'))['db'];var utils=require(_0x3730('0x5'));var logger=require('../../config/logger')(_0x3730('0x6'));var config=require(_0x3730('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x3730('0x8')][_0x3730('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x238a0b,_0x228202,_0xa9e149){return new BPromise(function(_0x493b0b,_0x2130d9){return client[_0x3730('0xa')](_0x238a0b,_0xa9e149)[_0x3730('0xb')](function(_0x120db6){logger[_0x3730('0xc')](_0x3730('0xd'),_0x228202,_0x3730('0xe'));logger['debug'](_0x3730('0xf'),_0x228202,'request\x20sent',JSON[_0x3730('0x10')](_0x120db6));if(_0x120db6['error']){if(_0x120db6[_0x3730('0x11')]['code']===0x1f4){logger[_0x3730('0x11')]('ChatOfflineMessage,\x20%s,\x20%s',_0x228202,_0x120db6[_0x3730('0x11')]['message']);return _0x2130d9(_0x120db6[_0x3730('0x11')][_0x3730('0x12')]);}logger[_0x3730('0x11')](_0x3730('0xd'),_0x228202,_0x120db6['error'][_0x3730('0x12')]);return _0x493b0b(_0x120db6[_0x3730('0x11')]['message']);}else{logger[_0x3730('0xc')](_0x3730('0xd'),_0x228202,_0x3730('0xe'));_0x493b0b(_0x120db6[_0x3730('0x13')]['message']);}})[_0x3730('0x14')](function(_0x2a758d){logger['error'](_0x3730('0xd'),_0x228202,_0x2a758d);_0x2130d9(_0x2a758d);});});}
\ No newline at end of file
+var _0x776f=['../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatOfflineMessage,\x20%s,\x20%s','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x776f,0x68));var _0xf776=function(_0x19017b,_0x56d52c){_0x19017b=_0x19017b-0x0;var _0x3becdc=_0x776f[_0x19017b];return _0x3becdc;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xf776('0x0'));var BPromise=require(_0xf776('0x1'));var rs=require(_0xf776('0x2'));var fs=require('fs');var Redis=require(_0xf776('0x3'));var db=require(_0xf776('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf776('0x5'))('rpc');var config=require(_0xf776('0x6'));var jayson=require(_0xf776('0x7'));var client=jayson['client'][_0xf776('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1c3877,_0x55d8e6,_0x2d7515){return new BPromise(function(_0x21ac6c,_0x52a0fc){return client[_0xf776('0x9')](_0x1c3877,_0x2d7515)[_0xf776('0xa')](function(_0x4b0f41){logger[_0xf776('0xb')]('ChatOfflineMessage,\x20%s,\x20%s',_0x55d8e6,_0xf776('0xc'));logger[_0xf776('0xd')](_0xf776('0xe'),_0x55d8e6,_0xf776('0xc'),JSON[_0xf776('0xf')](_0x4b0f41));if(_0x4b0f41[_0xf776('0x10')]){if(_0x4b0f41['error'][_0xf776('0x11')]===0x1f4){logger['error'](_0xf776('0x12'),_0x55d8e6,_0x4b0f41[_0xf776('0x10')][_0xf776('0x13')]);return _0x52a0fc(_0x4b0f41['error'][_0xf776('0x13')]);}logger['error'](_0xf776('0x12'),_0x55d8e6,_0x4b0f41[_0xf776('0x10')][_0xf776('0x13')]);return _0x21ac6c(_0x4b0f41['error']['message']);}else{logger[_0xf776('0xb')](_0xf776('0x12'),_0x55d8e6,'request\x20sent');_0x21ac6c(_0x4b0f41[_0xf776('0x14')][_0xf776('0x13')]);}})[_0xf776('0x15')](function(_0xd5f3c2){logger[_0xf776('0x10')](_0xf776('0x12'),_0x55d8e6,_0xd5f3c2);_0x52a0fc(_0xd5f3c2);});});}
\ No newline at end of file
diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js
index b552876..efed676 100644
--- a/server/api/chatOfflineMessage/index.js
+++ b/server/api/chatOfflineMessage/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xffc6=['show','post','create','put','delete','/:id','destroy','exports','util','path','connect-timeout','express','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/describe','describe'];(function(_0x12b00b,_0x1e11e1){var _0x1748da=function(_0x2a2f46){while(--_0x2a2f46){_0x12b00b['push'](_0x12b00b['shift']());}};_0x1748da(++_0x1e11e1);}(_0xffc6,0x15e));var _0x6ffc=function(_0x2cd9f6,_0x450d32){_0x2cd9f6=_0x2cd9f6-0x0;var _0x35182a=_0xffc6[_0x2cd9f6];return _0x35182a;};'use strict';var multer=require('multer');var util=require(_0x6ffc('0x0'));var path=require(_0x6ffc('0x1'));var timeout=require(_0x6ffc('0x2'));var express=require(_0x6ffc('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x6ffc('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x6ffc('0x5'));var controller=require('./chatOfflineMessage.controller');router[_0x6ffc('0x6')]('/',auth[_0x6ffc('0x7')](),controller[_0x6ffc('0x8')]);router[_0x6ffc('0x6')](_0x6ffc('0x9'),auth[_0x6ffc('0x7')](),controller[_0x6ffc('0xa')]);router[_0x6ffc('0x6')]('/:id',auth[_0x6ffc('0x7')](),controller[_0x6ffc('0xb')]);router[_0x6ffc('0xc')]('/',auth['isAuthenticated'](),controller[_0x6ffc('0xd')]);router[_0x6ffc('0xe')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x6ffc('0xf')](_0x6ffc('0x10'),auth[_0x6ffc('0x7')](),controller[_0x6ffc('0x11')]);module[_0x6ffc('0x12')]=router;
\ No newline at end of file
+var _0xd58f=['../../config/environment','./chatOfflineMessage.controller','isAuthenticated','index','get','/describe','describe','/:id','post','create','put','update','destroy','exports','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service'];(function(_0x328e59,_0x36e438){var _0x54a543=function(_0x173b63){while(--_0x173b63){_0x328e59['push'](_0x328e59['shift']());}};_0x54a543(++_0x36e438);}(_0xd58f,0x105));var _0xfd58=function(_0x10a0c9,_0x1ea34a){_0x10a0c9=_0x10a0c9-0x0;var _0x29c377=_0xd58f[_0x10a0c9];return _0x29c377;};'use strict';var multer=require('multer');var util=require(_0xfd58('0x0'));var path=require(_0xfd58('0x1'));var timeout=require(_0xfd58('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xfd58('0x3'));var interaction=require(_0xfd58('0x4'));var config=require(_0xfd58('0x5'));var controller=require(_0xfd58('0x6'));router['get']('/',auth[_0xfd58('0x7')](),controller[_0xfd58('0x8')]);router[_0xfd58('0x9')](_0xfd58('0xa'),auth[_0xfd58('0x7')](),controller[_0xfd58('0xb')]);router[_0xfd58('0x9')](_0xfd58('0xc'),auth[_0xfd58('0x7')](),controller['show']);router[_0xfd58('0xd')]('/',auth['isAuthenticated'](),controller[_0xfd58('0xe')]);router[_0xfd58('0xf')](_0xfd58('0xc'),auth['isAuthenticated'](),controller[_0xfd58('0x10')]);router['delete'](_0xfd58('0xc'),auth[_0xfd58('0x7')](),controller[_0xfd58('0x11')]);module[_0xfd58('0x12')]=router;
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
index df6c522..413b034 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.attributes.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8abd=['STRING','timeout','mouseOver','INTEGER','exports'];(function(_0x3a213b,_0x2539b1){var _0x48552c=function(_0x26db9d){while(--_0x26db9d){_0x3a213b['push'](_0x3a213b['shift']());}};_0x48552c(++_0x2539b1);}(_0x8abd,0x18a));var _0xd8ab=function(_0x211f55,_0x520aea){_0x211f55=_0x211f55-0x0;var _0x5d7628=_0x8abd[_0x211f55];return _0x5d7628;};'use strict';var Sequelize=require('sequelize');module[_0xd8ab('0x0')]={'name':{'type':Sequelize[_0xd8ab('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('mouseOver',_0xd8ab('0x2')),'defaultValue':_0xd8ab('0x3')},'selector':{'type':Sequelize[_0xd8ab('0x1')]},'timeout':{'type':Sequelize[_0xd8ab('0x4')]}};
\ No newline at end of file
+var _0xa388=['mouseOver','timeout','sequelize','exports','STRING','ENUM'];(function(_0x3a7b72,_0x43751b){var _0x2752a3=function(_0x564050){while(--_0x564050){_0x3a7b72['push'](_0x3a7b72['shift']());}};_0x2752a3(++_0x43751b);}(_0xa388,0x15e));var _0x8a38=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa388[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x8a38('0x0'));module[_0x8a38('0x1')]={'name':{'type':Sequelize[_0x8a38('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x8a38('0x3')](_0x8a38('0x4'),_0x8a38('0x5')),'defaultValue':_0x8a38('0x4')},'selector':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js
index c9f06e1..5de5429 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.controller.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x8255=['Content-Range','reject','save','then','error','stack','name','send','params','model','ChatProactiveAction','keys','filters','query','attributes','intersection','fields','length','include','merge','options','find','catch','create','body','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','count','set'];(function(_0x2730eb,_0x231d72){var _0x2678ca=function(_0x530e56){while(--_0x530e56){_0x2730eb['push'](_0x2730eb['shift']());}};_0x2678ca(++_0x231d72);}(_0x8255,0x176));var _0x5825=function(_0x3efe54,_0x27c823){_0x3efe54=_0x3efe54-0x0;var _0x2a4efc=_0x8255[_0x3efe54];return _0x2a4efc;};'use strict';var emlformat=require(_0x5825('0x0'));var rimraf=require(_0x5825('0x1'));var zipdir=require(_0x5825('0x2'));var jsonpatch=require(_0x5825('0x3'));var rp=require(_0x5825('0x4'));var moment=require(_0x5825('0x5'));var BPromise=require(_0x5825('0x6'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x5825('0x7'));var csv=require(_0x5825('0x8'));var ejs=require(_0x5825('0x9'));var fs=require('fs');var fs_extra=require(_0x5825('0xa'));var _=require(_0x5825('0xb'));var squel=require(_0x5825('0xc'));var crypto=require(_0x5825('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x5825('0x8'));var querystring=require(_0x5825('0xe'));var Papa=require(_0x5825('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5825('0x10'));var as=require(_0x5825('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5825('0x12'))(_0x5825('0x13'));var utils=require('../../config/utils');var config=require(_0x5825('0x14'));var licenseUtil=require(_0x5825('0x15'));var db=require(_0x5825('0x16'))['db'];function respondWithStatusCode(_0x592725,_0x4d948e){_0x4d948e=_0x4d948e||0xcc;return function(_0x325034){if(_0x325034){return _0x592725[_0x5825('0x17')](_0x4d948e);}return _0x592725[_0x5825('0x18')](_0x4d948e)[_0x5825('0x19')]();};}function respondWithResult(_0x5bb480,_0x473eb0){_0x473eb0=_0x473eb0||0xc8;return function(_0x53687f){if(_0x53687f){return _0x5bb480[_0x5825('0x18')](_0x473eb0)[_0x5825('0x1a')](_0x53687f);}};}function respondWithFilteredResult(_0x35a8dd,_0x1e2751){return function(_0xb9fc6c){if(_0xb9fc6c){var _0x5ecffa=typeof _0x1e2751['offset']===_0x5825('0x1b')&&typeof _0x1e2751[_0x5825('0x1c')]===_0x5825('0x1b');var _0x1247b6=_0xb9fc6c['count'];var _0x4c59a1=_0x5ecffa?0x0:_0x1e2751[_0x5825('0x1d')];var _0x1fc690=_0x5ecffa?_0xb9fc6c[_0x5825('0x1e')]:_0x1e2751[_0x5825('0x1d')]+_0x1e2751['limit'];var _0x36bf06;if(_0x1fc690>=_0x1247b6){_0x1fc690=_0x1247b6;_0x36bf06=0xc8;}else{_0x36bf06=0xce;}_0x35a8dd[_0x5825('0x18')](_0x36bf06);return _0x35a8dd[_0x5825('0x1f')](_0x5825('0x20'),_0x4c59a1+'-'+_0x1fc690+'/'+_0x1247b6)[_0x5825('0x1a')](_0xb9fc6c);}return null;};}function patchUpdates(_0x12517c){return function(_0x54ca58){try{jsonpatch['apply'](_0x54ca58,_0x12517c,!![]);}catch(_0x43a216){return BPromise[_0x5825('0x21')](_0x43a216);}return _0x54ca58[_0x5825('0x22')]();};}function saveUpdates(_0x47913e,_0x141c77){return function(_0x310546){if(_0x310546){return _0x310546['update'](_0x47913e)[_0x5825('0x23')](function(_0x2787d5){return _0x2787d5;});}return null;};}function removeEntity(_0x271695,_0x4d0abb){return function(_0x5e0f40){if(_0x5e0f40){return _0x5e0f40['destroy']()['then'](function(){_0x271695[_0x5825('0x18')](0xcc)[_0x5825('0x19')]();});}};}function handleEntityNotFound(_0x6b07dd,_0x23b3ef){return function(_0x3502ce){if(!_0x3502ce){_0x6b07dd[_0x5825('0x17')](0x194);}return _0x3502ce;};}function handleError(_0x5e1f78,_0x1f27fd){_0x1f27fd=_0x1f27fd||0x1f4;return function(_0x3c8dec){logger[_0x5825('0x24')](_0x3c8dec[_0x5825('0x25')]);if(_0x3c8dec[_0x5825('0x26')]){delete _0x3c8dec[_0x5825('0x26')];}_0x5e1f78[_0x5825('0x18')](_0x1f27fd)[_0x5825('0x27')](_0x3c8dec);};}exports['show']=function(_0x589411,_0x3725dc){var _0x45e941={'raw':!![],'where':{'id':_0x589411[_0x5825('0x28')]['id']}},_0x582f12={};_0x582f12[_0x5825('0x29')]=_['keys'](db[_0x5825('0x2a')]['rawAttributes']);_0x582f12['query']=_[_0x5825('0x2b')](_0x589411['query']);_0x582f12[_0x5825('0x2c')]=_['intersection'](_0x582f12['model'],_0x582f12[_0x5825('0x2d')]);_0x45e941[_0x5825('0x2e')]=_[_0x5825('0x2f')](_0x582f12[_0x5825('0x29')],qs[_0x5825('0x30')](_0x589411[_0x5825('0x2d')][_0x5825('0x30')]));_0x45e941[_0x5825('0x2e')]=_0x45e941[_0x5825('0x2e')][_0x5825('0x31')]?_0x45e941[_0x5825('0x2e')]:_0x582f12['model'];if(_0x589411[_0x5825('0x2d')]['includeAll']){_0x45e941[_0x5825('0x32')]=[{'all':!![]}];}_0x45e941=_[_0x5825('0x33')]({},_0x45e941,_0x589411[_0x5825('0x34')]);return db[_0x5825('0x2a')][_0x5825('0x35')](_0x45e941)[_0x5825('0x23')](handleEntityNotFound(_0x3725dc,null))[_0x5825('0x23')](respondWithResult(_0x3725dc,null))[_0x5825('0x36')](handleError(_0x3725dc,null));};exports[_0x5825('0x37')]=function(_0xe8d01b,_0x1fa9a3){return db[_0x5825('0x2a')][_0x5825('0x37')](_0xe8d01b[_0x5825('0x38')],{})[_0x5825('0x23')](respondWithResult(_0x1fa9a3,0xc9))[_0x5825('0x36')](handleError(_0x1fa9a3,null));};exports[_0x5825('0x39')]=function(_0x53a43c,_0x4f4ab9){if(_0x53a43c['body']['id']){delete _0x53a43c[_0x5825('0x38')]['id'];}return db[_0x5825('0x2a')][_0x5825('0x35')]({'where':{'id':_0x53a43c[_0x5825('0x28')]['id']}})[_0x5825('0x23')](handleEntityNotFound(_0x4f4ab9,null))['then'](saveUpdates(_0x53a43c[_0x5825('0x38')],null))[_0x5825('0x23')](respondWithResult(_0x4f4ab9,null))[_0x5825('0x36')](handleError(_0x4f4ab9,null));};exports['destroy']=function(_0x1465c0,_0x56e758){return db[_0x5825('0x2a')][_0x5825('0x35')]({'where':{'id':_0x1465c0[_0x5825('0x28')]['id']}})[_0x5825('0x23')](handleEntityNotFound(_0x56e758,null))[_0x5825('0x23')](removeEntity(_0x56e758,null))[_0x5825('0x36')](handleError(_0x56e758,null));};
\ No newline at end of file
+var _0x5b7f=['length','include','merge','options','find','create','body','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','set','json','save','update','then','destroy','error','stack','name','send','show','params','model','keys','ChatProactiveAction','rawAttributes','query','filters','intersection','attributes','fields'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5b7f,0x8c));var _0xf5b7=function(_0x4e8a62,_0x1a56fd){_0x4e8a62=_0x4e8a62-0x0;var _0x1a99aa=_0x5b7f[_0x4e8a62];return _0x1a99aa;};'use strict';var emlformat=require(_0xf5b7('0x0'));var rimraf=require(_0xf5b7('0x1'));var zipdir=require(_0xf5b7('0x2'));var jsonpatch=require(_0xf5b7('0x3'));var rp=require(_0xf5b7('0x4'));var moment=require(_0xf5b7('0x5'));var BPromise=require(_0xf5b7('0x6'));var Mustache=require(_0xf5b7('0x7'));var util=require(_0xf5b7('0x8'));var path=require(_0xf5b7('0x9'));var sox=require(_0xf5b7('0xa'));var csv=require(_0xf5b7('0xb'));var ejs=require(_0xf5b7('0xc'));var fs=require('fs');var fs_extra=require(_0xf5b7('0xd'));var _=require(_0xf5b7('0xe'));var squel=require(_0xf5b7('0xf'));var crypto=require(_0xf5b7('0x10'));var jsforce=require(_0xf5b7('0x11'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf5b7('0x12'));var Redis=require(_0xf5b7('0x13'));var authService=require(_0xf5b7('0x14'));var qs=require(_0xf5b7('0x15'));var as=require(_0xf5b7('0x16'));var hardwareService=require(_0xf5b7('0x17'));var logger=require(_0xf5b7('0x18'))(_0xf5b7('0x19'));var utils=require(_0xf5b7('0x1a'));var config=require(_0xf5b7('0x1b'));var licenseUtil=require(_0xf5b7('0x1c'));var db=require(_0xf5b7('0x1d'))['db'];function respondWithStatusCode(_0x5c793a,_0x30adf0){_0x30adf0=_0x30adf0||0xcc;return function(_0x29dead){if(_0x29dead){return _0x5c793a[_0xf5b7('0x1e')](_0x30adf0);}return _0x5c793a[_0xf5b7('0x1f')](_0x30adf0)[_0xf5b7('0x20')]();};}function respondWithResult(_0x5dfeb7,_0x20cd2){_0x20cd2=_0x20cd2||0xc8;return function(_0x4f087e){if(_0x4f087e){return _0x5dfeb7['status'](_0x20cd2)['json'](_0x4f087e);}};}function respondWithFilteredResult(_0x4a4c37,_0x231013){return function(_0xfdcfe4){if(_0xfdcfe4){var _0xa3db02=typeof _0x231013[_0xf5b7('0x21')]===_0xf5b7('0x22')&&typeof _0x231013['limit']===_0xf5b7('0x22');var _0x32f697=_0xfdcfe4[_0xf5b7('0x23')];var _0x451537=_0xa3db02?0x0:_0x231013[_0xf5b7('0x21')];var _0x268616=_0xa3db02?_0xfdcfe4['count']:_0x231013[_0xf5b7('0x21')]+_0x231013[_0xf5b7('0x24')];var _0x3214ae;if(_0x268616>=_0x32f697){_0x268616=_0x32f697;_0x3214ae=0xc8;}else{_0x3214ae=0xce;}_0x4a4c37[_0xf5b7('0x1f')](_0x3214ae);return _0x4a4c37[_0xf5b7('0x25')]('Content-Range',_0x451537+'-'+_0x268616+'/'+_0x32f697)[_0xf5b7('0x26')](_0xfdcfe4);}return null;};}function patchUpdates(_0x3ef4c8){return function(_0x53bd4b){try{jsonpatch['apply'](_0x53bd4b,_0x3ef4c8,!![]);}catch(_0x4c9a83){return BPromise['reject'](_0x4c9a83);}return _0x53bd4b[_0xf5b7('0x27')]();};}function saveUpdates(_0xc5c02d,_0xd23307){return function(_0x1e2121){if(_0x1e2121){return _0x1e2121[_0xf5b7('0x28')](_0xc5c02d)[_0xf5b7('0x29')](function(_0x3e98e7){return _0x3e98e7;});}return null;};}function removeEntity(_0x445d22,_0x47dc6d){return function(_0x348826){if(_0x348826){return _0x348826[_0xf5b7('0x2a')]()[_0xf5b7('0x29')](function(){_0x445d22['status'](0xcc)[_0xf5b7('0x20')]();});}};}function handleEntityNotFound(_0x3f7258,_0x50af10){return function(_0x480208){if(!_0x480208){_0x3f7258['sendStatus'](0x194);}return _0x480208;};}function handleError(_0x450b70,_0x16046b){_0x16046b=_0x16046b||0x1f4;return function(_0x557ab5){logger[_0xf5b7('0x2b')](_0x557ab5[_0xf5b7('0x2c')]);if(_0x557ab5[_0xf5b7('0x2d')]){delete _0x557ab5[_0xf5b7('0x2d')];}_0x450b70['status'](_0x16046b)[_0xf5b7('0x2e')](_0x557ab5);};}exports[_0xf5b7('0x2f')]=function(_0x574cf5,_0x4487be){var _0x903891={'raw':!![],'where':{'id':_0x574cf5[_0xf5b7('0x30')]['id']}},_0x270b40={};_0x270b40[_0xf5b7('0x31')]=_[_0xf5b7('0x32')](db[_0xf5b7('0x33')][_0xf5b7('0x34')]);_0x270b40[_0xf5b7('0x35')]=_[_0xf5b7('0x32')](_0x574cf5['query']);_0x270b40[_0xf5b7('0x36')]=_[_0xf5b7('0x37')](_0x270b40[_0xf5b7('0x31')],_0x270b40[_0xf5b7('0x35')]);_0x903891[_0xf5b7('0x38')]=_[_0xf5b7('0x37')](_0x270b40[_0xf5b7('0x31')],qs['fields'](_0x574cf5[_0xf5b7('0x35')][_0xf5b7('0x39')]));_0x903891[_0xf5b7('0x38')]=_0x903891[_0xf5b7('0x38')][_0xf5b7('0x3a')]?_0x903891[_0xf5b7('0x38')]:_0x270b40[_0xf5b7('0x31')];if(_0x574cf5[_0xf5b7('0x35')]['includeAll']){_0x903891[_0xf5b7('0x3b')]=[{'all':!![]}];}_0x903891=_[_0xf5b7('0x3c')]({},_0x903891,_0x574cf5[_0xf5b7('0x3d')]);return db[_0xf5b7('0x33')][_0xf5b7('0x3e')](_0x903891)[_0xf5b7('0x29')](handleEntityNotFound(_0x4487be,null))[_0xf5b7('0x29')](respondWithResult(_0x4487be,null))['catch'](handleError(_0x4487be,null));};exports['create']=function(_0x4d0ac4,_0xbe3be5){return db[_0xf5b7('0x33')][_0xf5b7('0x3f')](_0x4d0ac4[_0xf5b7('0x40')],{})[_0xf5b7('0x29')](respondWithResult(_0xbe3be5,0xc9))[_0xf5b7('0x41')](handleError(_0xbe3be5,null));};exports[_0xf5b7('0x28')]=function(_0x27a9a6,_0xce03c7){if(_0x27a9a6[_0xf5b7('0x40')]['id']){delete _0x27a9a6['body']['id'];}return db['ChatProactiveAction'][_0xf5b7('0x3e')]({'where':{'id':_0x27a9a6['params']['id']}})['then'](handleEntityNotFound(_0xce03c7,null))[_0xf5b7('0x29')](saveUpdates(_0x27a9a6[_0xf5b7('0x40')],null))['then'](respondWithResult(_0xce03c7,null))[_0xf5b7('0x41')](handleError(_0xce03c7,null));};exports[_0xf5b7('0x2a')]=function(_0x20a36a,_0x62a8f3){return db[_0xf5b7('0x33')][_0xf5b7('0x3e')]({'where':{'id':_0x20a36a[_0xf5b7('0x30')]['id']}})[_0xf5b7('0x29')](handleEntityNotFound(_0x62a8f3,null))[_0xf5b7('0x29')](removeEntity(_0x62a8f3,null))[_0xf5b7('0x41')](handleError(_0x62a8f3,null));};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js
index b6f472a..d44ba95 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.model.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x968f=['request-promise','rimraf','../../config/environment','./chatProactiveAction.attributes','exports','define','chat_proactive_actions','lodash','util','bluebird'];(function(_0x407064,_0x2be626){var _0x3323d1=function(_0x20ae00){while(--_0x20ae00){_0x407064['push'](_0x407064['shift']());}};_0x3323d1(++_0x2be626);}(_0x968f,0x89));var _0xf968=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x968f[_0x2641f9];return _0x585741;};'use strict';var _=require(_0xf968('0x0'));var util=require(_0xf968('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xf968('0x2'));var rp=require(_0xf968('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf968('0x4'));var config=require(_0xf968('0x5'));var attributes=require(_0xf968('0x6'));module[_0xf968('0x7')]=function(_0x5cad3a,_0x6b446d){return _0x5cad3a[_0xf968('0x8')]('ChatProactiveAction',attributes,{'tableName':_0xf968('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4d3d=['../../config/environment','./chatProactiveAction.attributes','exports','ChatProactiveAction','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x558e45,_0x4f5e4f){var _0x3e9075=function(_0x289725){while(--_0x289725){_0x558e45['push'](_0x558e45['shift']());}};_0x3e9075(++_0x4f5e4f);}(_0x4d3d,0x10c));var _0xd4d3=function(_0x3c2c9c,_0x4895a){_0x3c2c9c=_0x3c2c9c-0x0;var _0x43e18e=_0x4d3d[_0x3c2c9c];return _0x43e18e;};'use strict';var _=require(_0xd4d3('0x0'));var util=require(_0xd4d3('0x1'));var logger=require(_0xd4d3('0x2'))(_0xd4d3('0x3'));var moment=require(_0xd4d3('0x4'));var BPromise=require('bluebird');var rp=require(_0xd4d3('0x5'));var fs=require('fs');var path=require(_0xd4d3('0x6'));var rimraf=require(_0xd4d3('0x7'));var config=require(_0xd4d3('0x8'));var attributes=require(_0xd4d3('0x9'));module[_0xd4d3('0xa')]=function(_0x7be985,_0x5a0052){return _0x7be985['define'](_0xd4d3('0xb'),attributes,{'tableName':'chat_proactive_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
index c63b6fa..d36584b 100644
--- a/server/api/chatProactiveAction/chatProactiveAction.rpc.js
+++ b/server/api/chatProactiveAction/chatProactiveAction.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2a7b=['message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x4f06be,_0x321c80){var _0x1c0a92=function(_0x33a1e5){while(--_0x33a1e5){_0x4f06be['push'](_0x4f06be['shift']());}};_0x1c0a92(++_0x321c80);}(_0x2a7b,0x8d));var _0xb2a7=function(_0x492071,_0x24e16e){_0x492071=_0x492071-0x0;var _0x26ae90=_0x2a7b[_0x492071];return _0x26ae90;};'use strict';var _=require(_0xb2a7('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb2a7('0x1'));var rs=require(_0xb2a7('0x2'));var fs=require('fs');var Redis=require(_0xb2a7('0x3'));var db=require(_0xb2a7('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xb2a7('0x5'))(_0xb2a7('0x6'));var config=require(_0xb2a7('0x7'));var jayson=require(_0xb2a7('0x8'));var client=jayson[_0xb2a7('0x9')][_0xb2a7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xd9bc20,_0x44c0d1,_0x1e20d1){return new BPromise(function(_0x36aeef,_0x5119cb){return client[_0xb2a7('0xb')](_0xd9bc20,_0x1e20d1)[_0xb2a7('0xc')](function(_0x9d5e64){logger[_0xb2a7('0xd')](_0xb2a7('0xe'),_0x44c0d1,'request\x20sent');logger[_0xb2a7('0xf')](_0xb2a7('0x10'),_0x44c0d1,_0xb2a7('0x11'),JSON[_0xb2a7('0x12')](_0x9d5e64));if(_0x9d5e64[_0xb2a7('0x13')]){if(_0x9d5e64[_0xb2a7('0x13')]['code']===0x1f4){logger[_0xb2a7('0x13')](_0xb2a7('0xe'),_0x44c0d1,_0x9d5e64[_0xb2a7('0x13')]['message']);return _0x5119cb(_0x9d5e64[_0xb2a7('0x13')][_0xb2a7('0x14')]);}logger[_0xb2a7('0x13')]('ChatProactiveAction,\x20%s,\x20%s',_0x44c0d1,_0x9d5e64[_0xb2a7('0x13')][_0xb2a7('0x14')]);return _0x36aeef(_0x9d5e64[_0xb2a7('0x13')][_0xb2a7('0x14')]);}else{logger[_0xb2a7('0xd')]('ChatProactiveAction,\x20%s,\x20%s',_0x44c0d1,_0xb2a7('0x11'));_0x36aeef(_0x9d5e64[_0xb2a7('0x15')]['message']);}})[_0xb2a7('0x16')](function(_0x4bb5f4){logger[_0xb2a7('0x13')](_0xb2a7('0xe'),_0x44c0d1,_0x4bb5f4);_0x5119cb(_0x4bb5f4);});});}
\ No newline at end of file
+var _0xff3f=['error','message','result','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s'];(function(_0x441517,_0x38dc9a){var _0x1cbb1f=function(_0x2d78d1){while(--_0x2d78d1){_0x441517['push'](_0x441517['shift']());}};_0x1cbb1f(++_0x38dc9a);}(_0xff3f,0x1c5));var _0xfff3=function(_0xa2c0a3,_0x5bbac0){_0xa2c0a3=_0xa2c0a3-0x0;var _0x52c618=_0xff3f[_0xa2c0a3];return _0x52c618;};'use strict';var _=require('lodash');var util=require(_0xfff3('0x0'));var moment=require(_0xfff3('0x1'));var BPromise=require(_0xfff3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfff3('0x3'));var db=require(_0xfff3('0x4'))['db'];var utils=require(_0xfff3('0x5'));var logger=require(_0xfff3('0x6'))(_0xfff3('0x7'));var config=require('../../config/environment');var jayson=require(_0xfff3('0x8'));var client=jayson[_0xfff3('0x9')][_0xfff3('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5b923c,_0x4ec895,_0x2c93be){return new BPromise(function(_0x5b13cf,_0x1255ba){return client[_0xfff3('0xb')](_0x5b923c,_0x2c93be)[_0xfff3('0xc')](function(_0x420984){logger[_0xfff3('0xd')](_0xfff3('0xe'),_0x4ec895,'request\x20sent');logger['debug']('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x4ec895,'request\x20sent',JSON['stringify'](_0x420984));if(_0x420984['error']){if(_0x420984['error']['code']===0x1f4){logger[_0xfff3('0xf')](_0xfff3('0xe'),_0x4ec895,_0x420984[_0xfff3('0xf')]['message']);return _0x1255ba(_0x420984[_0xfff3('0xf')][_0xfff3('0x10')]);}logger[_0xfff3('0xf')](_0xfff3('0xe'),_0x4ec895,_0x420984[_0xfff3('0xf')][_0xfff3('0x10')]);return _0x5b13cf(_0x420984['error'][_0xfff3('0x10')]);}else{logger['info']('ChatProactiveAction,\x20%s,\x20%s',_0x4ec895,'request\x20sent');_0x5b13cf(_0x420984[_0xfff3('0x11')][_0xfff3('0x10')]);}})['catch'](function(_0x286b56){logger[_0xfff3('0xf')](_0xfff3('0xe'),_0x4ec895,_0x286b56);_0x1255ba(_0x286b56);});});}
\ No newline at end of file
diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js
index d48e5cb..0c923bc 100644
--- a/server/api/chatProactiveAction/index.js
+++ b/server/api/chatProactiveAction/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2675=['../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','get','/:id','isAuthenticated','show','post','create','put','delete','exports','multer','express','Router'];(function(_0x20d6f0,_0x5bf6b8){var _0x4cdb25=function(_0x2f7773){while(--_0x2f7773){_0x20d6f0['push'](_0x20d6f0['shift']());}};_0x4cdb25(++_0x5bf6b8);}(_0x2675,0x75));var _0x5267=function(_0x4ef8c2,_0x19a834){_0x4ef8c2=_0x4ef8c2-0x0;var _0x38dce9=_0x2675[_0x4ef8c2];return _0x38dce9;};'use strict';var multer=require(_0x5267('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x5267('0x1'));var router=express[_0x5267('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x5267('0x3'));var interaction=require(_0x5267('0x4'));var config=require('../../config/environment');var controller=require(_0x5267('0x5'));router[_0x5267('0x6')](_0x5267('0x7'),auth[_0x5267('0x8')](),controller[_0x5267('0x9')]);router[_0x5267('0xa')]('/',auth['isAuthenticated'](),controller[_0x5267('0xb')]);router[_0x5267('0xc')]('/:id',auth[_0x5267('0x8')](),controller['update']);router[_0x5267('0xd')](_0x5267('0x7'),auth[_0x5267('0x8')](),controller['destroy']);module[_0x5267('0xe')]=router;
\ No newline at end of file
+var _0xbd51=['show','post','isAuthenticated','create','put','delete','destroy','exports','multer','path','connect-timeout','express','Router','./chatProactiveAction.controller','get','/:id'];(function(_0x503b50,_0x9d2e66){var _0x44a075=function(_0x2b8969){while(--_0x2b8969){_0x503b50['push'](_0x503b50['shift']());}};_0x44a075(++_0x9d2e66);}(_0xbd51,0x1a8));var _0x1bd5=function(_0x2c4116,_0x37541f){_0x2c4116=_0x2c4116-0x0;var _0x4eb3ef=_0xbd51[_0x2c4116];return _0x4eb3ef;};'use strict';var multer=require(_0x1bd5('0x0'));var util=require('util');var path=require(_0x1bd5('0x1'));var timeout=require(_0x1bd5('0x2'));var express=require(_0x1bd5('0x3'));var router=express[_0x1bd5('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x1bd5('0x5'));router[_0x1bd5('0x6')](_0x1bd5('0x7'),auth['isAuthenticated'](),controller[_0x1bd5('0x8')]);router[_0x1bd5('0x9')]('/',auth[_0x1bd5('0xa')](),controller[_0x1bd5('0xb')]);router[_0x1bd5('0xc')]('/:id',auth[_0x1bd5('0xa')](),controller['update']);router[_0x1bd5('0xd')](_0x1bd5('0x7'),auth[_0x1bd5('0xa')](),controller[_0x1bd5('0xe')]);module[_0x1bd5('0xf')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js
index 1751152..95a0440 100644
--- a/server/api/chatQueue/chatQueue.attributes.js
+++ b/server/api/chatQueue/chatQueue.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b56=['name','STRING','INTEGER','ENUM','rrmemory','beepall','sequelize'];(function(_0x490ff6,_0x5e5554){var _0x2ccce5=function(_0x36743d){while(--_0x36743d){_0x490ff6['push'](_0x490ff6['shift']());}};_0x2ccce5(++_0x5e5554);}(_0x2b56,0xa0));var _0x62b5=function(_0x542291,_0x3733d4){_0x542291=_0x542291-0x0;var _0x3a021c=_0x2b56[_0x542291];return _0x3a021c;};'use strict';var Sequelize=require(_0x62b5('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x62b5('0x1'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x62b5('0x2')]},'timeout':{'type':Sequelize[_0x62b5('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x62b5('0x4')](_0x62b5('0x5'),_0x62b5('0x6'),'roundrobin')}};
\ No newline at end of file
+var _0x5f25=['STRING','name','INTEGER','ENUM','rrmemory','beepall','roundrobin','sequelize','exports'];(function(_0xa41f50,_0x2b318d){var _0x4f856f=function(_0x200687){while(--_0x200687){_0xa41f50['push'](_0xa41f50['shift']());}};_0x4f856f(++_0x2b318d);}(_0x5f25,0x139));var _0x55f2=function(_0x459573,_0x35679e){_0x459573=_0x459573-0x0;var _0x51ffcd=_0x5f25[_0x459573];return _0x51ffcd;};'use strict';var Sequelize=require(_0x55f2('0x0'));module[_0x55f2('0x1')]={'name':{'type':Sequelize[_0x55f2('0x2')],'unique':_0x55f2('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x55f2('0x2')]},'timeout':{'type':Sequelize[_0x55f2('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x55f2('0x5')](_0x55f2('0x6'),_0x55f2('0x7'),_0x55f2('0x8'))}};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js
index c458e5d..9e52bd3 100644
--- a/server/api/chatQueue/chatQueue.controller.js
+++ b/server/api/chatQueue/chatQueue.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xd3ea=['format','%s/%s','createdAt','getTeams','Team','order','ids','online','voicePause','interface','flatMap','Agents','transaction','addTeams','each','findOrCreate','forEach','userChatQueue:save','removeTeams','field','tq.TeamId','from','join','user_has_teams','clone','push','sequelize','toString','QueryTypes','every','TeamId','includes','all','compact','value','isEmpty','removeAgents','emit','userChatQueue:remove','addAgents','spread','isArray','getAgents','util','lodash','squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','./chatQueue.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','update','then','destroy','get','ChatQueues','UserProfileResource','name','send','index','map','key','where','include','ChatQueue','findAll','rows','catch','show','params','model','keys','query','filters','attributes','intersection','fields','includeAll','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','findOne','UserChatQueue','rawAttributes','length','hasOwnProperty','nolimit','sort','pick','ChatQueueId','filter','merge','User','UserId','chatPause','updatedAt'];(function(_0x1dab5f,_0x10cd21){var _0x40c2f3=function(_0x325a0d){while(--_0x325a0d){_0x1dab5f['push'](_0x1dab5f['shift']());}};_0x40c2f3(++_0x10cd21);}(_0xd3ea,0x117));var _0xad3e=function(_0x411add,_0x1aed38){_0x411add=_0x411add-0x0;var _0x238242=_0xd3ea[_0x411add];return _0x238242;};'use strict';var BPromise=require('bluebird');var util=require(_0xad3e('0x0'));var _=require(_0xad3e('0x1'));var squel=require(_0xad3e('0x2'));var Redis=require(_0xad3e('0x3'));var qs=require(_0xad3e('0x4'));var logger=require(_0xad3e('0x5'))(_0xad3e('0x6'));var config=require(_0xad3e('0x7'));var db=require(_0xad3e('0x8'))['db'];config[_0xad3e('0x9')]=_['defaults'](config[_0xad3e('0x9')],{'host':_0xad3e('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xad3e('0x9')]));require(_0xad3e('0xb'))[_0xad3e('0xc')](socket);function respondWithStatusCode(_0xd26996,_0x279e65){_0x279e65=_0x279e65||0xcc;return function(_0x17891d){if(_0x17891d){return _0xd26996[_0xad3e('0xd')](_0x279e65);}return _0xd26996[_0xad3e('0xe')](_0x279e65)[_0xad3e('0xf')]();};}function respondWithResult(_0x193929,_0x74f391){_0x74f391=_0x74f391||0xc8;return function(_0x499da7){if(_0x499da7){return _0x193929['status'](_0x74f391)[_0xad3e('0x10')](_0x499da7);}};}function respondWithFilteredResult(_0x412fcb,_0x3e9852){return function(_0x409fa5){if(_0x409fa5){var _0x4dd82c=typeof _0x3e9852[_0xad3e('0x11')]===_0xad3e('0x12')&&typeof _0x3e9852[_0xad3e('0x13')]===_0xad3e('0x12');var _0x1c751d=_0x409fa5[_0xad3e('0x14')];var _0x43183c=_0x4dd82c?0x0:_0x3e9852[_0xad3e('0x11')];var _0x1f220b=_0x4dd82c?_0x409fa5['count']:_0x3e9852[_0xad3e('0x11')]+_0x3e9852[_0xad3e('0x13')];var _0x11aa33;if(_0x1f220b>=_0x1c751d){_0x1f220b=_0x1c751d;_0x11aa33=0xc8;}else{_0x11aa33=0xce;}_0x412fcb[_0xad3e('0xe')](_0x11aa33);return _0x412fcb['set'](_0xad3e('0x15'),_0x43183c+'-'+_0x1f220b+'/'+_0x1c751d)[_0xad3e('0x10')](_0x409fa5);}return null;};}function saveUpdates(_0x54fa7e){return function(_0x1e1223){if(_0x1e1223){return _0x1e1223[_0xad3e('0x16')](_0x54fa7e)[_0xad3e('0x17')](function(_0x20f6b0){return _0x20f6b0;});}return null;};}function removeEntity(_0x5619c1){return function(_0x112770){if(_0x112770){return _0x112770[_0xad3e('0x18')]()[_0xad3e('0x17')](function(){var _0x4aa536=_0x112770[_0xad3e('0x19')]({'plain':!![]});var _0x1bdef3=_0xad3e('0x1a');return db[_0xad3e('0x1b')][_0xad3e('0x18')]({'where':{'type':_0x1bdef3,'resourceId':_0x4aa536['id']}})[_0xad3e('0x17')](function(){return _0x112770;});})[_0xad3e('0x17')](function(){_0x5619c1[_0xad3e('0xe')](0xcc)[_0xad3e('0xf')]();});}};}function handleEntityNotFound(_0x174445){return function(_0xa2dffe){if(!_0xa2dffe){_0x174445['sendStatus'](0x194);}return _0xa2dffe;};}function handleError(_0x29a774,_0xa9bf60){_0xa9bf60=_0xa9bf60||0x1f4;return function(_0x30ee19){logger['error'](_0x30ee19['stack']);if(_0x30ee19[_0xad3e('0x1c')]){delete _0x30ee19['name'];}_0x29a774[_0xad3e('0xe')](_0xa9bf60)[_0xad3e('0x1d')](_0x30ee19);};}exports[_0xad3e('0x1e')]=function(_0xfb6b9a,_0xfdf539){var _0x2842f5={};var _0x34fbb4={'count':0x0,'rows':[]};var _0x48dae4=_[_0xad3e('0x1f')](db['ChatQueue']['rawAttributes'],function(_0x115bf8){return{'name':_0x115bf8['fieldName'],'type':_0x115bf8['type'][_0xad3e('0x20')]};});_0x2842f5=qs['getOptions'](_0x48dae4,_0xfb6b9a);var _0x55361b={'where':_0x2842f5[_0xad3e('0x21')]};return db['ChatQueue']['count'](_0x55361b)[_0xad3e('0x17')](function(_0x441eb3){_0x34fbb4[_0xad3e('0x14')]=_0x441eb3;_0x2842f5[_0xad3e('0x22')]=qs[_0xad3e('0x22')](_0xfb6b9a['query']);return db[_0xad3e('0x23')][_0xad3e('0x24')](_0x2842f5);})[_0xad3e('0x17')](function(_0x22e88b){_0x34fbb4[_0xad3e('0x25')]=_0x22e88b;return _0x34fbb4;})[_0xad3e('0x17')](respondWithFilteredResult(_0xfdf539,_0x2842f5))[_0xad3e('0x26')](handleError(_0xfdf539,null));};exports[_0xad3e('0x27')]=function(_0x5921c5,_0x651b9e){var _0x198e4c={'raw':!![],'where':{'id':_0x5921c5[_0xad3e('0x28')]['id']}},_0x13cf97={};_0x13cf97[_0xad3e('0x29')]=_[_0xad3e('0x2a')](db[_0xad3e('0x23')]['rawAttributes']);_0x13cf97[_0xad3e('0x2b')]=_['keys'](_0x5921c5[_0xad3e('0x2b')]);_0x13cf97[_0xad3e('0x2c')]=_['intersection'](_0x13cf97[_0xad3e('0x29')],_0x13cf97[_0xad3e('0x2b')]);_0x198e4c[_0xad3e('0x2d')]=_[_0xad3e('0x2e')](_0x13cf97['model'],qs['fields'](_0x5921c5['query'][_0xad3e('0x2f')]));_0x198e4c[_0xad3e('0x2d')]=_0x198e4c[_0xad3e('0x2d')]['length']?_0x198e4c['attributes']:_0x13cf97[_0xad3e('0x29')];if(_0x5921c5['query'][_0xad3e('0x30')]){_0x198e4c[_0xad3e('0x22')]=[{'all':!![]}];}_0x198e4c=_['merge']({},_0x198e4c,_0x5921c5[_0xad3e('0x31')]);return db[_0xad3e('0x23')][_0xad3e('0x32')](_0x198e4c)[_0xad3e('0x17')](handleEntityNotFound(_0x651b9e,null))['then'](respondWithResult(_0x651b9e,null))['catch'](handleError(_0x651b9e,null));};exports['create']=function(_0x22c077,_0x58e474){return db['ChatQueue'][_0xad3e('0x33')](_0x22c077[_0xad3e('0x34')],{})[_0xad3e('0x17')](function(_0xfaa1e7){var _0x8d3513=_0x22c077['user'][_0xad3e('0x19')]({'plain':!![]});if(!_0x8d3513)throw new Error(_0xad3e('0x35'));if(_0x8d3513['role']===_0xad3e('0x36')){var _0x3b5feb=_0xfaa1e7['get']({'plain':!![]});var _0x4f5139=_0xad3e('0x1a');return db[_0xad3e('0x37')][_0xad3e('0x32')]({'where':{'name':_0x4f5139,'userProfileId':_0x8d3513['userProfileId']},'raw':!![]})[_0xad3e('0x17')](function(_0xa63950){if(_0xa63950&&_0xa63950[_0xad3e('0x38')]===0x0){return db[_0xad3e('0x1b')][_0xad3e('0x33')]({'name':_0x3b5feb[_0xad3e('0x1c')],'resourceId':_0x3b5feb['id'],'type':_0xa63950[_0xad3e('0x1c')],'sectionId':_0xa63950['id']},{})[_0xad3e('0x17')](function(){return _0xfaa1e7;});}else{return _0xfaa1e7;}})[_0xad3e('0x26')](function(_0x10f52d){logger[_0xad3e('0x39')](_0xad3e('0x3a'),_0x10f52d);throw _0x10f52d;});}return _0xfaa1e7;})[_0xad3e('0x17')](respondWithResult(_0x58e474,0xc9))[_0xad3e('0x26')](handleError(_0x58e474,null));};exports[_0xad3e('0x16')]=function(_0xd440dc,_0x39a6a3){if(_0xd440dc[_0xad3e('0x34')]['id']){delete _0xd440dc['body']['id'];}return db[_0xad3e('0x23')]['find']({'where':{'id':_0xd440dc[_0xad3e('0x28')]['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x39a6a3,null))['then'](saveUpdates(_0xd440dc[_0xad3e('0x34')],null))['then'](respondWithResult(_0x39a6a3,null))[_0xad3e('0x26')](handleError(_0x39a6a3,null));};exports[_0xad3e('0x18')]=function(_0x43bcf0,_0x3bdda2){return db[_0xad3e('0x23')][_0xad3e('0x32')]({'where':{'id':_0x43bcf0[_0xad3e('0x28')]['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x3bdda2,null))[_0xad3e('0x17')](removeEntity(_0x3bdda2,null))[_0xad3e('0x26')](handleError(_0x3bdda2,null));};exports[_0xad3e('0x3b')]=function(_0x2f25f8,_0x49181a){return db[_0xad3e('0x23')]['describe']()[_0xad3e('0x17')](respondWithResult(_0x49181a,null))[_0xad3e('0x26')](handleError(_0x49181a,null));};exports['getMembers']=function(_0x478a80,_0x47676e){var _0x11d245={'raw':!![],'where':{}},_0xf456bf={},_0x5668c7;return db[_0xad3e('0x23')][_0xad3e('0x3c')]({'where':{'id':_0x478a80[_0xad3e('0x28')]['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x47676e,null))[_0xad3e('0x17')](function(_0x346622){if(_0x346622){_0x5668c7=_0x346622[_0xad3e('0x19')]({'plain':!![]});_0xf456bf[_0xad3e('0x29')]=_[_0xad3e('0x2a')](db[_0xad3e('0x3d')][_0xad3e('0x3e')]);_0xf456bf['query']=_['keys'](_0x478a80[_0xad3e('0x2b')]);_0xf456bf[_0xad3e('0x2c')]=_['intersection'](_0xf456bf[_0xad3e('0x29')],_0xf456bf['query']);_0x11d245['attributes']=_[_0xad3e('0x2e')](_0xf456bf['model'],qs[_0xad3e('0x2f')](_0x478a80[_0xad3e('0x2b')]['fields']));_0x11d245[_0xad3e('0x2d')]=_0x11d245[_0xad3e('0x2d')][_0xad3e('0x3f')]?_0x11d245[_0xad3e('0x2d')]:_0xf456bf[_0xad3e('0x29')];if(!_0x478a80['query'][_0xad3e('0x40')](_0xad3e('0x41'))){_0x11d245[_0xad3e('0x13')]=qs[_0xad3e('0x13')](_0x478a80['query'][_0xad3e('0x13')]);_0x11d245[_0xad3e('0x11')]=qs[_0xad3e('0x11')](_0x478a80['query']['offset']);}_0x11d245['order']=qs[_0xad3e('0x42')](_0x478a80[_0xad3e('0x2b')]['sort']);_0x11d245[_0xad3e('0x21')]=qs['filters'](_[_0xad3e('0x43')](_0x478a80[_0xad3e('0x2b')],_0xf456bf[_0xad3e('0x2c')]));_0x11d245['where'][_0xad3e('0x44')]=_0x346622['id'];if(_0x478a80[_0xad3e('0x2b')][_0xad3e('0x45')]){_0x11d245[_0xad3e('0x21')]=_[_0xad3e('0x46')](_0x11d245['where'],{'$or':_[_0xad3e('0x1f')](_0x11d245[_0xad3e('0x2d')],function(_0x2c0532){var _0x2b5d84={};_0x2b5d84[_0x2c0532]={'$like':'%'+_0x478a80['query'][_0xad3e('0x45')]+'%'};return _0x2b5d84;})});}_0x11d245=_[_0xad3e('0x46')]({},_0x11d245,_0x478a80['options']);return db[_0xad3e('0x3d')][_0xad3e('0x24')](_0x11d245);}})['then'](function(_0x276609){if(_0x276609){return db[_0xad3e('0x47')]['findAndCountAll']({'where':{'id':_['map'](_0x276609,_0xad3e('0x48')),'role':'agent'},'attributes':['id',_0xad3e('0x1c'),_0xad3e('0x49'),_0xad3e('0x4a'),'createdAt']});}})['then'](function(_0x2704bb){if(_0x2704bb){return{'count':_0x2704bb[_0xad3e('0x14')],'rows':_[_0xad3e('0x1f')](_0x2704bb[_0xad3e('0x25')],function(_0x3cf1fb){return{'membername':_0x3cf1fb[_0xad3e('0x1c')],'UserId':_0x3cf1fb['id'],'queue_name':_0x5668c7[_0xad3e('0x1c')],'ChatQueueId':_0x5668c7['id'],'interface':util[_0xad3e('0x4b')](_0xad3e('0x4c'),'SIP',_0x3cf1fb[_0xad3e('0x1c')]),'penalty':0x0,'paused':_0x3cf1fb['chatPause'],'createdAt':_0x3cf1fb[_0xad3e('0x4d')],'updatedAt':_0x3cf1fb['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0xad3e('0x17')](respondWithFilteredResult(_0x47676e,_0x11d245))['catch'](handleError(_0x47676e,null));};exports[_0xad3e('0x4e')]=function(_0x2e53a8,_0x2584ff){var _0x4fd8c6={};var _0x4431ec={};var _0x4b9c64;var _0x2f31a8;return db[_0xad3e('0x23')][_0xad3e('0x3c')]({'where':{'id':_0x2e53a8['params']['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x2584ff,null))['then'](function(_0xae5de){if(_0xae5de){_0x4b9c64=_0xae5de;_0x4431ec[_0xad3e('0x29')]=_['keys'](db[_0xad3e('0x4f')]['rawAttributes']);_0x4431ec[_0xad3e('0x2b')]=_[_0xad3e('0x2a')](_0x2e53a8['query']);_0x4431ec[_0xad3e('0x2c')]=_[_0xad3e('0x2e')](_0x4431ec[_0xad3e('0x29')],_0x4431ec[_0xad3e('0x2b')]);_0x4fd8c6[_0xad3e('0x2d')]=_[_0xad3e('0x2e')](_0x4431ec[_0xad3e('0x29')],qs[_0xad3e('0x2f')](_0x2e53a8[_0xad3e('0x2b')][_0xad3e('0x2f')]));_0x4fd8c6[_0xad3e('0x2d')]=_0x4fd8c6['attributes'][_0xad3e('0x3f')]?_0x4fd8c6[_0xad3e('0x2d')]:_0x4431ec[_0xad3e('0x29')];_0x4fd8c6[_0xad3e('0x50')]=qs[_0xad3e('0x42')](_0x2e53a8['query'][_0xad3e('0x42')]);_0x4fd8c6[_0xad3e('0x21')]=qs['filters'](_[_0xad3e('0x43')](_0x2e53a8[_0xad3e('0x2b')],_0x4431ec[_0xad3e('0x2c')]));if(_0x2e53a8['query'][_0xad3e('0x45')]){_0x4fd8c6[_0xad3e('0x21')]=_[_0xad3e('0x46')](_0x4fd8c6['where'],{'$or':_[_0xad3e('0x1f')](_0x4fd8c6['attributes'],function(_0x30f127){var _0x7e9661={};_0x7e9661[_0x30f127]={'$like':'%'+_0x2e53a8[_0xad3e('0x2b')][_0xad3e('0x45')]+'%'};return _0x7e9661;})});}_0x4fd8c6=_[_0xad3e('0x46')]({},_0x4fd8c6,_0x2e53a8[_0xad3e('0x31')]);return _0x4b9c64[_0xad3e('0x4e')](_0x4fd8c6);}})[_0xad3e('0x17')](function(_0x6ca786){if(_0x6ca786){_0x2f31a8=_0x6ca786[_0xad3e('0x3f')];if(!_0x2e53a8[_0xad3e('0x2b')][_0xad3e('0x40')]('nolimit')){_0x4fd8c6[_0xad3e('0x13')]=qs['limit'](_0x2e53a8[_0xad3e('0x2b')][_0xad3e('0x13')]);_0x4fd8c6['offset']=qs['offset'](_0x2e53a8['query'][_0xad3e('0x11')]);}return _0x4b9c64[_0xad3e('0x4e')](_0x4fd8c6);}})[_0xad3e('0x17')](function(_0x34d033){if(_0x34d033){return _0x34d033?{'count':_0x2f31a8,'rows':_0x34d033}:null;}})['then'](respondWithResult(_0x2584ff,null))[_0xad3e('0x26')](handleError(_0x2584ff,null));};exports['addTeams']=function(_0xde52d6,_0x24ca93){var _0x100595=_0xde52d6[_0xad3e('0x34')][_0xad3e('0x51')];return db['Team'][_0xad3e('0x24')]({'where':{'id':_0x100595},'attributes':['id'],'include':[{'model':db[_0xad3e('0x47')],'as':'Agents','attributes':['id',_0xad3e('0x1c'),_0xad3e('0x52'),_0xad3e('0x53'),_0xad3e('0x54')],'raw':!![]}]})[_0xad3e('0x17')](function(_0x283f21){if(_0x283f21){var _0x581106=_[_0xad3e('0x55')](_0x283f21,function(_0x5734ec){var _0x40e69a=_0x5734ec[_0xad3e('0x19')]({'plain':!![]});return _0x40e69a[_0xad3e('0x56')];});return db[_0xad3e('0x23')][_0xad3e('0x32')]({'where':{'id':_0xde52d6[_0xad3e('0x28')]['id']}})[_0xad3e('0x17')](function(_0x5be351){return db['sequelize'][_0xad3e('0x57')](function(_0x2db83f){return _0x5be351[_0xad3e('0x58')](_0x100595,{'transaction':_0x2db83f})[_0xad3e('0x17')](function(){return BPromise[_0xad3e('0x59')](_0x581106,function(_0x8d48a9){return db[_0xad3e('0x3d')][_0xad3e('0x5a')]({'where':{'UserId':_0x8d48a9['id'],'ChatQueueId':_0xde52d6[_0xad3e('0x28')]['id']},'transaction':_0x2db83f});});})[_0xad3e('0x17')](function(){_0x581106[_0xad3e('0x5b')](function(_0x20b767){socket['emit'](_0xad3e('0x5c'),{'UserId':_0x20b767['id'],'ChatQueueId':_0x5be351['id']});});});});});}})[_0xad3e('0x17')](respondWithStatusCode(_0x24ca93,null))[_0xad3e('0x26')](handleError(_0x24ca93,null));};exports[_0xad3e('0x5d')]=function(_0x450aed,_0x12c4cd){return db[_0xad3e('0x4f')][_0xad3e('0x24')]({'where':{'id':_0x450aed[_0xad3e('0x2b')][_0xad3e('0x51')]},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x12c4cd,null))[_0xad3e('0x17')](function(_0x6c68b7){var _0x407f75=_[_0xad3e('0x1f')](_0x6c68b7,'id');var _0x1e6a32=[];var _0x4d6e5f=[];var _0x277aa8=squel['select']();_0x277aa8[_0xad3e('0x5e')](_0xad3e('0x5f'))[_0xad3e('0x60')]('team_has_chat_queues','tq')[_0xad3e('0x61')](_0xad3e('0x62'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0xad3e('0x21')]('ChatQueueId\x20=\x20?',_0x450aed[_0xad3e('0x28')]['id']);for(var _0x27de95=0x0;_0x27de95<_0x6c68b7[_0xad3e('0x3f')];_0x27de95+=0x1){let _0x174da6=_0x6c68b7[_0x27de95];for(var _0x5cb843=0x0;_0x5cb843<_0x174da6['Agents']['length'];_0x5cb843+=0x1){let _0x27a9c4=_0x174da6[_0xad3e('0x56')][_0x5cb843];var _0x19b8e4=_0x277aa8[_0xad3e('0x63')]();_0x19b8e4[_0xad3e('0x21')]('ut.UserId\x20=\x20?',_0x27a9c4['id']);_0x4d6e5f[_0xad3e('0x64')](db[_0xad3e('0x65')][_0xad3e('0x2b')](_0x19b8e4[_0xad3e('0x66')](),{'type':db[_0xad3e('0x65')][_0xad3e('0x67')]['SELECT']})[_0xad3e('0x17')](function(_0x185ff1){if(_0x185ff1[_0xad3e('0x3f')]===0x1){return _0x27a9c4['id'];}else{var _0x46570e=_[_0xad3e('0x68')](_[_0xad3e('0x1f')](_0x185ff1,_0xad3e('0x69')),function(_0x1ca05b){return _[_0xad3e('0x6a')](_0x407f75,_0x1ca05b);});if(_0x46570e){return _0x27a9c4['id'];}}}));}}return BPromise[_0xad3e('0x6b')](_0x4d6e5f)[_0xad3e('0x17')](function(_0x5bae7a){_0x1e6a32=_(_0x1e6a32)['union'](_0x5bae7a)[_0xad3e('0x6c')]()[_0xad3e('0x6d')]();return db['ChatQueue'][_0xad3e('0x32')]({'where':{'id':_0x450aed[_0xad3e('0x28')]['id']}})['then'](function(_0x18b5b0){return db[_0xad3e('0x65')][_0xad3e('0x57')](function(_0x503d7f){return _0x18b5b0[_0xad3e('0x5d')](_0x450aed[_0xad3e('0x2b')][_0xad3e('0x51')],{'transaction':_0x503d7f})[_0xad3e('0x17')](function(){if(!_[_0xad3e('0x6e')](_0x1e6a32)){return _0x18b5b0[_0xad3e('0x6f')](_0x1e6a32,{'transaction':_0x503d7f});}})[_0xad3e('0x17')](function(){_0x1e6a32[_0xad3e('0x5b')](function(_0x40b080){socket[_0xad3e('0x70')](_0xad3e('0x71'),{'UserId':_0x40b080,'ChatQueueId':_0x18b5b0['id']});});});});});});})[_0xad3e('0x17')](respondWithStatusCode(_0x12c4cd,null))[_0xad3e('0x26')](handleError(_0x12c4cd,null));};exports['addAgents']=function(_0x591f63,_0x44e6ce){return db[_0xad3e('0x23')][_0xad3e('0x32')]({'where':{'id':_0x591f63['params']['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x44e6ce,null))[_0xad3e('0x17')](function(_0x323584){if(_0x323584){return _0x323584[_0xad3e('0x72')](_0x591f63['body'][_0xad3e('0x51')],_['omit'](_0x591f63[_0xad3e('0x34')],['ids','id'])||{})[_0xad3e('0x73')](function(_0x3106cf){for(var _0xcd6372=0x0;_0xcd6372<_0x591f63[_0xad3e('0x34')]['ids'][_0xad3e('0x3f')];_0xcd6372+=0x1){socket[_0xad3e('0x70')](_0xad3e('0x5c'),{'UserId':Number(_0x591f63[_0xad3e('0x34')][_0xad3e('0x51')][_0xcd6372]),'ChatQueueId':Number(_0x591f63[_0xad3e('0x28')]['id'])});}return _0x3106cf;});}})['then'](respondWithResult(_0x44e6ce,null))['catch'](handleError(_0x44e6ce,null));};exports[_0xad3e('0x6f')]=function(_0x381672,_0x5e904a){return db[_0xad3e('0x23')]['find']({'where':{'id':_0x381672[_0xad3e('0x28')]['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x5e904a,null))[_0xad3e('0x17')](function(_0x37281a){if(_0x37281a){return _0x37281a[_0xad3e('0x6f')](_0x381672['query'][_0xad3e('0x51')])[_0xad3e('0x17')](function(){if(_[_0xad3e('0x74')](_0x381672[_0xad3e('0x2b')][_0xad3e('0x51')])){for(var _0x235131=0x0;_0x235131<_0x381672[_0xad3e('0x2b')][_0xad3e('0x51')][_0xad3e('0x3f')];_0x235131+=0x1){socket['emit']('userChatQueue:remove',{'UserId':Number(_0x381672[_0xad3e('0x2b')][_0xad3e('0x51')][_0x235131]),'ChatQueueId':Number(_0x381672[_0xad3e('0x28')]['id'])});}}else{socket[_0xad3e('0x70')](_0xad3e('0x71'),{'UserId':Number(_0x381672[_0xad3e('0x2b')][_0xad3e('0x51')]),'ChatQueueId':Number(_0x381672[_0xad3e('0x28')]['id'])});}});}})[_0xad3e('0x17')](respondWithStatusCode(_0x5e904a,null))[_0xad3e('0x26')](handleError(_0x5e904a,null));};exports[_0xad3e('0x75')]=function(_0xd0bc74,_0x5ec18f){var _0x541ce6={};var _0x4ff3cb={};var _0x1cabdd;var _0x1c6199;return db[_0xad3e('0x23')][_0xad3e('0x3c')]({'where':{'id':_0xd0bc74['params']['id']}})[_0xad3e('0x17')](handleEntityNotFound(_0x5ec18f,null))[_0xad3e('0x17')](function(_0x4cf5ed){if(_0x4cf5ed){_0x1cabdd=_0x4cf5ed;_0x4ff3cb[_0xad3e('0x29')]=_[_0xad3e('0x2a')](db[_0xad3e('0x47')][_0xad3e('0x3e')]);_0x4ff3cb[_0xad3e('0x2b')]=_[_0xad3e('0x2a')](_0xd0bc74[_0xad3e('0x2b')]);_0x4ff3cb['filters']=_['intersection'](_0x4ff3cb[_0xad3e('0x29')],_0x4ff3cb[_0xad3e('0x2b')]);_0x541ce6[_0xad3e('0x2d')]=_[_0xad3e('0x2e')](_0x4ff3cb[_0xad3e('0x29')],qs[_0xad3e('0x2f')](_0xd0bc74[_0xad3e('0x2b')][_0xad3e('0x2f')]));_0x541ce6[_0xad3e('0x2d')]=_0x541ce6[_0xad3e('0x2d')][_0xad3e('0x3f')]?_0x541ce6[_0xad3e('0x2d')]:_0x4ff3cb[_0xad3e('0x29')];_0x541ce6[_0xad3e('0x50')]=qs[_0xad3e('0x42')](_0xd0bc74[_0xad3e('0x2b')][_0xad3e('0x42')]);_0x541ce6[_0xad3e('0x21')]=qs[_0xad3e('0x2c')](_['pick'](_0xd0bc74[_0xad3e('0x2b')],_0x4ff3cb['filters']));if(_0xd0bc74[_0xad3e('0x2b')][_0xad3e('0x45')]){_0x541ce6[_0xad3e('0x21')]=_['merge'](_0x541ce6['where'],{'$or':_['map'](_0x541ce6['attributes'],function(_0x437481){var _0x2668d2={};_0x2668d2[_0x437481]={'$like':'%'+_0xd0bc74['query'][_0xad3e('0x45')]+'%'};return _0x2668d2;})});}_0x541ce6=_[_0xad3e('0x46')]({},_0x541ce6,_0xd0bc74[_0xad3e('0x31')]);return _0x1cabdd[_0xad3e('0x75')](_0x541ce6);}})[_0xad3e('0x17')](function(_0x21280c){if(_0x21280c){_0x1c6199=_0x21280c['length'];if(!_0xd0bc74[_0xad3e('0x2b')][_0xad3e('0x40')](_0xad3e('0x41'))){_0x541ce6[_0xad3e('0x13')]=qs[_0xad3e('0x13')](_0xd0bc74['query'][_0xad3e('0x13')]);_0x541ce6[_0xad3e('0x11')]=qs[_0xad3e('0x11')](_0xd0bc74[_0xad3e('0x2b')][_0xad3e('0x11')]);}return _0x1cabdd['getAgents'](_0x541ce6);}})['then'](function(_0x16f921){if(_0x16f921){return _0x16f921?{'count':_0x1c6199,'rows':_0x16f921}:null;}})['then'](respondWithResult(_0x5ec18f,null))[_0xad3e('0x26')](handleError(_0x5ec18f,null));};
\ No newline at end of file
+var _0xff18=['undefined','count','limit','set','update','then','destroy','get','ChatQueues','UserProfileResource','sendStatus','error','name','send','map','ChatQueue','rawAttributes','fieldName','key','getOptions','where','include','query','catch','params','model','keys','attributes','intersection','fields','length','includeAll','merge','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','filters','nolimit','order','sort','pick','filter','findAll','findAndCountAll','agent','chatPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','Team','hasOwnProperty','addTeams','ids','online','interface','flatMap','Agents','each','forEach','emit','userChatQueue:save','removeTeams','field','from','join','user_has_teams','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','sequelize','QueryTypes','every','TeamId','includes','all','union','compact','value','transaction','removeAgents','userChatQueue:remove','addAgents','omit','spread','isArray','User','getAgents','util','lodash','squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','redis','defaults','socket.io-emitter','./chatQueue.socket','register','status','end','json','offset'];(function(_0xc2adf7,_0xd55f45){var _0x464209=function(_0x5cb2bb){while(--_0x5cb2bb){_0xc2adf7['push'](_0xc2adf7['shift']());}};_0x464209(++_0xd55f45);}(_0xff18,0xdd));var _0x8ff1=function(_0x175a55,_0x4082fd){_0x175a55=_0x175a55-0x0;var _0x167adf=_0xff18[_0x175a55];return _0x167adf;};'use strict';var BPromise=require('bluebird');var util=require(_0x8ff1('0x0'));var _=require(_0x8ff1('0x1'));var squel=require(_0x8ff1('0x2'));var Redis=require(_0x8ff1('0x3'));var qs=require(_0x8ff1('0x4'));var logger=require(_0x8ff1('0x5'))(_0x8ff1('0x6'));var config=require(_0x8ff1('0x7'));var db=require('../../mysqldb')['db'];config[_0x8ff1('0x8')]=_[_0x8ff1('0x9')](config[_0x8ff1('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0x8ff1('0xa'))(new Redis(config[_0x8ff1('0x8')]));require(_0x8ff1('0xb'))[_0x8ff1('0xc')](socket);function respondWithStatusCode(_0x1835c0,_0x48fa42){_0x48fa42=_0x48fa42||0xcc;return function(_0xc1c7a0){if(_0xc1c7a0){return _0x1835c0['sendStatus'](_0x48fa42);}return _0x1835c0[_0x8ff1('0xd')](_0x48fa42)[_0x8ff1('0xe')]();};}function respondWithResult(_0x3c38e2,_0x277a5e){_0x277a5e=_0x277a5e||0xc8;return function(_0x1fba60){if(_0x1fba60){return _0x3c38e2[_0x8ff1('0xd')](_0x277a5e)[_0x8ff1('0xf')](_0x1fba60);}};}function respondWithFilteredResult(_0x45999e,_0x493073){return function(_0x5dec81){if(_0x5dec81){var _0x402b98=typeof _0x493073[_0x8ff1('0x10')]==='undefined'&&typeof _0x493073['limit']===_0x8ff1('0x11');var _0x387154=_0x5dec81['count'];var _0x2d9478=_0x402b98?0x0:_0x493073[_0x8ff1('0x10')];var _0x4f0121=_0x402b98?_0x5dec81[_0x8ff1('0x12')]:_0x493073[_0x8ff1('0x10')]+_0x493073[_0x8ff1('0x13')];var _0xa5b800;if(_0x4f0121>=_0x387154){_0x4f0121=_0x387154;_0xa5b800=0xc8;}else{_0xa5b800=0xce;}_0x45999e[_0x8ff1('0xd')](_0xa5b800);return _0x45999e[_0x8ff1('0x14')]('Content-Range',_0x2d9478+'-'+_0x4f0121+'/'+_0x387154)['json'](_0x5dec81);}return null;};}function saveUpdates(_0x5a0141){return function(_0x519cb0){if(_0x519cb0){return _0x519cb0[_0x8ff1('0x15')](_0x5a0141)[_0x8ff1('0x16')](function(_0xd5f69c){return _0xd5f69c;});}return null;};}function removeEntity(_0x39c5a0){return function(_0x22e1ed){if(_0x22e1ed){return _0x22e1ed[_0x8ff1('0x17')]()[_0x8ff1('0x16')](function(){var _0x5e7b11=_0x22e1ed[_0x8ff1('0x18')]({'plain':!![]});var _0x493be0=_0x8ff1('0x19');return db[_0x8ff1('0x1a')]['destroy']({'where':{'type':_0x493be0,'resourceId':_0x5e7b11['id']}})[_0x8ff1('0x16')](function(){return _0x22e1ed;});})[_0x8ff1('0x16')](function(){_0x39c5a0['status'](0xcc)[_0x8ff1('0xe')]();});}};}function handleEntityNotFound(_0x281dab){return function(_0x41b69c){if(!_0x41b69c){_0x281dab[_0x8ff1('0x1b')](0x194);}return _0x41b69c;};}function handleError(_0x1a0d41,_0x5d3431){_0x5d3431=_0x5d3431||0x1f4;return function(_0x35378b){logger[_0x8ff1('0x1c')](_0x35378b['stack']);if(_0x35378b[_0x8ff1('0x1d')]){delete _0x35378b['name'];}_0x1a0d41['status'](_0x5d3431)[_0x8ff1('0x1e')](_0x35378b);};}exports['index']=function(_0x5c2a29,_0x4acbb5){var _0x2506e3={};var _0x23fa1c={'count':0x0,'rows':[]};var _0x42f01a=_[_0x8ff1('0x1f')](db[_0x8ff1('0x20')][_0x8ff1('0x21')],function(_0x27e843){return{'name':_0x27e843[_0x8ff1('0x22')],'type':_0x27e843['type'][_0x8ff1('0x23')]};});_0x2506e3=qs[_0x8ff1('0x24')](_0x42f01a,_0x5c2a29);var _0x589e8f={'where':_0x2506e3[_0x8ff1('0x25')]};return db[_0x8ff1('0x20')][_0x8ff1('0x12')](_0x589e8f)['then'](function(_0x5dd9ea){_0x23fa1c['count']=_0x5dd9ea;_0x2506e3[_0x8ff1('0x26')]=qs['include'](_0x5c2a29[_0x8ff1('0x27')]);return db[_0x8ff1('0x20')]['findAll'](_0x2506e3);})[_0x8ff1('0x16')](function(_0x24a93c){_0x23fa1c['rows']=_0x24a93c;return _0x23fa1c;})[_0x8ff1('0x16')](respondWithFilteredResult(_0x4acbb5,_0x2506e3))[_0x8ff1('0x28')](handleError(_0x4acbb5,null));};exports['show']=function(_0x7ef62d,_0x13d4f3){var _0x475b9c={'raw':!![],'where':{'id':_0x7ef62d[_0x8ff1('0x29')]['id']}},_0x25e045={};_0x25e045[_0x8ff1('0x2a')]=_[_0x8ff1('0x2b')](db[_0x8ff1('0x20')]['rawAttributes']);_0x25e045[_0x8ff1('0x27')]=_[_0x8ff1('0x2b')](_0x7ef62d[_0x8ff1('0x27')]);_0x25e045['filters']=_['intersection'](_0x25e045['model'],_0x25e045[_0x8ff1('0x27')]);_0x475b9c[_0x8ff1('0x2c')]=_[_0x8ff1('0x2d')](_0x25e045[_0x8ff1('0x2a')],qs['fields'](_0x7ef62d[_0x8ff1('0x27')][_0x8ff1('0x2e')]));_0x475b9c['attributes']=_0x475b9c['attributes'][_0x8ff1('0x2f')]?_0x475b9c[_0x8ff1('0x2c')]:_0x25e045[_0x8ff1('0x2a')];if(_0x7ef62d[_0x8ff1('0x27')][_0x8ff1('0x30')]){_0x475b9c[_0x8ff1('0x26')]=[{'all':!![]}];}_0x475b9c=_[_0x8ff1('0x31')]({},_0x475b9c,_0x7ef62d[_0x8ff1('0x32')]);return db[_0x8ff1('0x20')][_0x8ff1('0x33')](_0x475b9c)[_0x8ff1('0x16')](handleEntityNotFound(_0x13d4f3,null))['then'](respondWithResult(_0x13d4f3,null))[_0x8ff1('0x28')](handleError(_0x13d4f3,null));};exports[_0x8ff1('0x34')]=function(_0x15ab14,_0xca6a7d){return db['ChatQueue'][_0x8ff1('0x34')](_0x15ab14['body'],{})[_0x8ff1('0x16')](function(_0x176243){var _0x2d5831=_0x15ab14[_0x8ff1('0x35')]['get']({'plain':!![]});if(!_0x2d5831)throw new Error(_0x8ff1('0x36'));if(_0x2d5831[_0x8ff1('0x37')]==='user'){var _0x105ec7=_0x176243[_0x8ff1('0x18')]({'plain':!![]});var _0x24dbe3=_0x8ff1('0x19');return db[_0x8ff1('0x38')]['find']({'where':{'name':_0x24dbe3,'userProfileId':_0x2d5831[_0x8ff1('0x39')]},'raw':!![]})[_0x8ff1('0x16')](function(_0x3b1b28){if(_0x3b1b28&&_0x3b1b28[_0x8ff1('0x3a')]===0x0){return db[_0x8ff1('0x1a')][_0x8ff1('0x34')]({'name':_0x105ec7['name'],'resourceId':_0x105ec7['id'],'type':_0x3b1b28[_0x8ff1('0x1d')],'sectionId':_0x3b1b28['id']},{})[_0x8ff1('0x16')](function(){return _0x176243;});}else{return _0x176243;}})[_0x8ff1('0x28')](function(_0x2eda99){logger['error'](_0x8ff1('0x3b'),_0x2eda99);throw _0x2eda99;});}return _0x176243;})[_0x8ff1('0x16')](respondWithResult(_0xca6a7d,0xc9))['catch'](handleError(_0xca6a7d,null));};exports[_0x8ff1('0x15')]=function(_0x17c909,_0x438c7a){if(_0x17c909['body']['id']){delete _0x17c909['body']['id'];}return db[_0x8ff1('0x20')][_0x8ff1('0x33')]({'where':{'id':_0x17c909['params']['id']}})[_0x8ff1('0x16')](handleEntityNotFound(_0x438c7a,null))[_0x8ff1('0x16')](saveUpdates(_0x17c909[_0x8ff1('0x3c')],null))['then'](respondWithResult(_0x438c7a,null))[_0x8ff1('0x28')](handleError(_0x438c7a,null));};exports[_0x8ff1('0x17')]=function(_0x15e524,_0x2d2ad1){return db['ChatQueue'][_0x8ff1('0x33')]({'where':{'id':_0x15e524['params']['id']}})['then'](handleEntityNotFound(_0x2d2ad1,null))[_0x8ff1('0x16')](removeEntity(_0x2d2ad1,null))[_0x8ff1('0x28')](handleError(_0x2d2ad1,null));};exports[_0x8ff1('0x3d')]=function(_0x3d75c9,_0x49d8d1){return db['ChatQueue'][_0x8ff1('0x3d')]()['then'](respondWithResult(_0x49d8d1,null))[_0x8ff1('0x28')](handleError(_0x49d8d1,null));};exports[_0x8ff1('0x3e')]=function(_0x4dff99,_0x43f58b){var _0x75152c={'raw':!![],'where':{}},_0x31850f={},_0x4e6cd6;return db[_0x8ff1('0x20')][_0x8ff1('0x3f')]({'where':{'id':_0x4dff99[_0x8ff1('0x29')]['id']}})[_0x8ff1('0x16')](handleEntityNotFound(_0x43f58b,null))[_0x8ff1('0x16')](function(_0x1aaced){if(_0x1aaced){_0x4e6cd6=_0x1aaced[_0x8ff1('0x18')]({'plain':!![]});_0x31850f[_0x8ff1('0x2a')]=_[_0x8ff1('0x2b')](db['UserChatQueue']['rawAttributes']);_0x31850f['query']=_[_0x8ff1('0x2b')](_0x4dff99['query']);_0x31850f[_0x8ff1('0x40')]=_[_0x8ff1('0x2d')](_0x31850f[_0x8ff1('0x2a')],_0x31850f[_0x8ff1('0x27')]);_0x75152c['attributes']=_[_0x8ff1('0x2d')](_0x31850f[_0x8ff1('0x2a')],qs[_0x8ff1('0x2e')](_0x4dff99[_0x8ff1('0x27')][_0x8ff1('0x2e')]));_0x75152c['attributes']=_0x75152c['attributes'][_0x8ff1('0x2f')]?_0x75152c['attributes']:_0x31850f[_0x8ff1('0x2a')];if(!_0x4dff99[_0x8ff1('0x27')]['hasOwnProperty'](_0x8ff1('0x41'))){_0x75152c[_0x8ff1('0x13')]=qs[_0x8ff1('0x13')](_0x4dff99[_0x8ff1('0x27')]['limit']);_0x75152c['offset']=qs[_0x8ff1('0x10')](_0x4dff99['query'][_0x8ff1('0x10')]);}_0x75152c[_0x8ff1('0x42')]=qs[_0x8ff1('0x43')](_0x4dff99[_0x8ff1('0x27')][_0x8ff1('0x43')]);_0x75152c['where']=qs['filters'](_[_0x8ff1('0x44')](_0x4dff99[_0x8ff1('0x27')],_0x31850f[_0x8ff1('0x40')]));_0x75152c['where']['ChatQueueId']=_0x1aaced['id'];if(_0x4dff99[_0x8ff1('0x27')][_0x8ff1('0x45')]){_0x75152c[_0x8ff1('0x25')]=_[_0x8ff1('0x31')](_0x75152c['where'],{'$or':_[_0x8ff1('0x1f')](_0x75152c[_0x8ff1('0x2c')],function(_0x1ae210){var _0x1fd930={};_0x1fd930[_0x1ae210]={'$like':'%'+_0x4dff99[_0x8ff1('0x27')]['filter']+'%'};return _0x1fd930;})});}_0x75152c=_[_0x8ff1('0x31')]({},_0x75152c,_0x4dff99[_0x8ff1('0x32')]);return db['UserChatQueue'][_0x8ff1('0x46')](_0x75152c);}})['then'](function(_0x3df0b8){if(_0x3df0b8){return db['User'][_0x8ff1('0x47')]({'where':{'id':_[_0x8ff1('0x1f')](_0x3df0b8,'UserId'),'role':_0x8ff1('0x48')},'attributes':['id',_0x8ff1('0x1d'),_0x8ff1('0x49'),_0x8ff1('0x4a'),_0x8ff1('0x4b')]});}})[_0x8ff1('0x16')](function(_0x3c4940){if(_0x3c4940){return{'count':_0x3c4940[_0x8ff1('0x12')],'rows':_[_0x8ff1('0x1f')](_0x3c4940['rows'],function(_0x319633){return{'membername':_0x319633[_0x8ff1('0x1d')],'UserId':_0x319633['id'],'queue_name':_0x4e6cd6[_0x8ff1('0x1d')],'ChatQueueId':_0x4e6cd6['id'],'interface':util[_0x8ff1('0x4c')](_0x8ff1('0x4d'),_0x8ff1('0x4e'),_0x319633[_0x8ff1('0x1d')]),'penalty':0x0,'paused':_0x319633[_0x8ff1('0x49')],'createdAt':_0x319633[_0x8ff1('0x4b')],'updatedAt':_0x319633[_0x8ff1('0x4a')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x43f58b,_0x75152c))['catch'](handleError(_0x43f58b,null));};exports[_0x8ff1('0x4f')]=function(_0x4ee506,_0x11d254){var _0x852991={};var _0x183e62={};var _0x2dfb90;var _0x329224;return db[_0x8ff1('0x20')]['findOne']({'where':{'id':_0x4ee506[_0x8ff1('0x29')]['id']}})[_0x8ff1('0x16')](handleEntityNotFound(_0x11d254,null))[_0x8ff1('0x16')](function(_0x4869d4){if(_0x4869d4){_0x2dfb90=_0x4869d4;_0x183e62[_0x8ff1('0x2a')]=_[_0x8ff1('0x2b')](db[_0x8ff1('0x50')][_0x8ff1('0x21')]);_0x183e62['query']=_[_0x8ff1('0x2b')](_0x4ee506[_0x8ff1('0x27')]);_0x183e62[_0x8ff1('0x40')]=_['intersection'](_0x183e62['model'],_0x183e62[_0x8ff1('0x27')]);_0x852991[_0x8ff1('0x2c')]=_[_0x8ff1('0x2d')](_0x183e62[_0x8ff1('0x2a')],qs[_0x8ff1('0x2e')](_0x4ee506[_0x8ff1('0x27')][_0x8ff1('0x2e')]));_0x852991[_0x8ff1('0x2c')]=_0x852991['attributes'][_0x8ff1('0x2f')]?_0x852991[_0x8ff1('0x2c')]:_0x183e62[_0x8ff1('0x2a')];_0x852991['order']=qs['sort'](_0x4ee506['query']['sort']);_0x852991['where']=qs[_0x8ff1('0x40')](_['pick'](_0x4ee506[_0x8ff1('0x27')],_0x183e62[_0x8ff1('0x40')]));if(_0x4ee506['query'][_0x8ff1('0x45')]){_0x852991['where']=_[_0x8ff1('0x31')](_0x852991[_0x8ff1('0x25')],{'$or':_[_0x8ff1('0x1f')](_0x852991[_0x8ff1('0x2c')],function(_0x1d9fb0){var _0xd45fd0={};_0xd45fd0[_0x1d9fb0]={'$like':'%'+_0x4ee506[_0x8ff1('0x27')][_0x8ff1('0x45')]+'%'};return _0xd45fd0;})});}_0x852991=_[_0x8ff1('0x31')]({},_0x852991,_0x4ee506['options']);return _0x2dfb90[_0x8ff1('0x4f')](_0x852991);}})[_0x8ff1('0x16')](function(_0x5737f5){if(_0x5737f5){_0x329224=_0x5737f5['length'];if(!_0x4ee506[_0x8ff1('0x27')][_0x8ff1('0x51')](_0x8ff1('0x41'))){_0x852991[_0x8ff1('0x13')]=qs[_0x8ff1('0x13')](_0x4ee506[_0x8ff1('0x27')]['limit']);_0x852991['offset']=qs[_0x8ff1('0x10')](_0x4ee506[_0x8ff1('0x27')][_0x8ff1('0x10')]);}return _0x2dfb90[_0x8ff1('0x4f')](_0x852991);}})[_0x8ff1('0x16')](function(_0x48e9e5){if(_0x48e9e5){return _0x48e9e5?{'count':_0x329224,'rows':_0x48e9e5}:null;}})[_0x8ff1('0x16')](respondWithResult(_0x11d254,null))[_0x8ff1('0x28')](handleError(_0x11d254,null));};exports[_0x8ff1('0x52')]=function(_0x2bc04b,_0x34df77){var _0x347761=_0x2bc04b['body'][_0x8ff1('0x53')];return db[_0x8ff1('0x50')][_0x8ff1('0x46')]({'where':{'id':_0x347761},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0x8ff1('0x1d'),_0x8ff1('0x54'),'voicePause',_0x8ff1('0x55')],'raw':!![]}]})[_0x8ff1('0x16')](function(_0x5d21b5){if(_0x5d21b5){var _0x5d0b95=_[_0x8ff1('0x56')](_0x5d21b5,function(_0x42f4e1){var _0x39efab=_0x42f4e1['get']({'plain':!![]});return _0x39efab[_0x8ff1('0x57')];});return db['ChatQueue'][_0x8ff1('0x33')]({'where':{'id':_0x2bc04b[_0x8ff1('0x29')]['id']}})['then'](function(_0x30dde4){return db['sequelize']['transaction'](function(_0x4e38e3){return _0x30dde4[_0x8ff1('0x52')](_0x347761,{'transaction':_0x4e38e3})[_0x8ff1('0x16')](function(){return BPromise[_0x8ff1('0x58')](_0x5d0b95,function(_0x424aaa){return db['UserChatQueue']['findOrCreate']({'where':{'UserId':_0x424aaa['id'],'ChatQueueId':_0x2bc04b['params']['id']},'transaction':_0x4e38e3});});})[_0x8ff1('0x16')](function(){_0x5d0b95[_0x8ff1('0x59')](function(_0x4af254){socket[_0x8ff1('0x5a')](_0x8ff1('0x5b'),{'UserId':_0x4af254['id'],'ChatQueueId':_0x30dde4['id']});});});});});}})['then'](respondWithStatusCode(_0x34df77,null))['catch'](handleError(_0x34df77,null));};exports[_0x8ff1('0x5c')]=function(_0x3cd816,_0x1e9423){return db['Team'][_0x8ff1('0x46')]({'where':{'id':_0x3cd816['query'][_0x8ff1('0x53')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x8ff1('0x57'),'attributes':['id'],'raw':!![]}]})[_0x8ff1('0x16')](handleEntityNotFound(_0x1e9423,null))[_0x8ff1('0x16')](function(_0x577bdc){var _0x24ab2b=_[_0x8ff1('0x1f')](_0x577bdc,'id');var _0xc00e45=[];var _0x1f75f3=[];var _0x2e29e7=squel['select']();_0x2e29e7[_0x8ff1('0x5d')]('tq.TeamId')[_0x8ff1('0x5e')]('team_has_chat_queues','tq')[_0x8ff1('0x5f')](_0x8ff1('0x60'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x8ff1('0x25')](_0x8ff1('0x61'),_0x3cd816[_0x8ff1('0x29')]['id']);for(var _0x588f13=0x0;_0x588f13<_0x577bdc['length'];_0x588f13+=0x1){let _0x34866a=_0x577bdc[_0x588f13];for(var _0x32d925=0x0;_0x32d925<_0x34866a['Agents'][_0x8ff1('0x2f')];_0x32d925+=0x1){let _0x482d73=_0x34866a[_0x8ff1('0x57')][_0x32d925];var _0x4bb2d7=_0x2e29e7[_0x8ff1('0x62')]();_0x4bb2d7[_0x8ff1('0x25')](_0x8ff1('0x63'),_0x482d73['id']);_0x1f75f3['push'](db['sequelize']['query'](_0x4bb2d7[_0x8ff1('0x64')](),{'type':db[_0x8ff1('0x65')][_0x8ff1('0x66')]['SELECT']})[_0x8ff1('0x16')](function(_0x543c5e){if(_0x543c5e[_0x8ff1('0x2f')]===0x1){return _0x482d73['id'];}else{var _0x520b97=_[_0x8ff1('0x67')](_[_0x8ff1('0x1f')](_0x543c5e,_0x8ff1('0x68')),function(_0x108b28){return _[_0x8ff1('0x69')](_0x24ab2b,_0x108b28);});if(_0x520b97){return _0x482d73['id'];}}}));}}return BPromise[_0x8ff1('0x6a')](_0x1f75f3)[_0x8ff1('0x16')](function(_0x362901){_0xc00e45=_(_0xc00e45)[_0x8ff1('0x6b')](_0x362901)[_0x8ff1('0x6c')]()[_0x8ff1('0x6d')]();return db[_0x8ff1('0x20')][_0x8ff1('0x33')]({'where':{'id':_0x3cd816[_0x8ff1('0x29')]['id']}})[_0x8ff1('0x16')](function(_0x1aa84f){return db['sequelize'][_0x8ff1('0x6e')](function(_0xdcfabc){return _0x1aa84f[_0x8ff1('0x5c')](_0x3cd816[_0x8ff1('0x27')][_0x8ff1('0x53')],{'transaction':_0xdcfabc})[_0x8ff1('0x16')](function(){if(!_['isEmpty'](_0xc00e45)){return _0x1aa84f[_0x8ff1('0x6f')](_0xc00e45,{'transaction':_0xdcfabc});}})[_0x8ff1('0x16')](function(){_0xc00e45['forEach'](function(_0x465c74){socket[_0x8ff1('0x5a')](_0x8ff1('0x70'),{'UserId':_0x465c74,'ChatQueueId':_0x1aa84f['id']});});});});});});})[_0x8ff1('0x16')](respondWithStatusCode(_0x1e9423,null))[_0x8ff1('0x28')](handleError(_0x1e9423,null));};exports[_0x8ff1('0x71')]=function(_0x302aa6,_0x6883f8){return db['ChatQueue'][_0x8ff1('0x33')]({'where':{'id':_0x302aa6['params']['id']}})[_0x8ff1('0x16')](handleEntityNotFound(_0x6883f8,null))['then'](function(_0x5a3802){if(_0x5a3802){return _0x5a3802[_0x8ff1('0x71')](_0x302aa6[_0x8ff1('0x3c')][_0x8ff1('0x53')],_[_0x8ff1('0x72')](_0x302aa6[_0x8ff1('0x3c')],[_0x8ff1('0x53'),'id'])||{})[_0x8ff1('0x73')](function(_0x12416f){for(var _0x3b85e8=0x0;_0x3b85e8<_0x302aa6['body'][_0x8ff1('0x53')][_0x8ff1('0x2f')];_0x3b85e8+=0x1){socket[_0x8ff1('0x5a')](_0x8ff1('0x5b'),{'UserId':Number(_0x302aa6[_0x8ff1('0x3c')][_0x8ff1('0x53')][_0x3b85e8]),'ChatQueueId':Number(_0x302aa6[_0x8ff1('0x29')]['id'])});}return _0x12416f;});}})[_0x8ff1('0x16')](respondWithResult(_0x6883f8,null))[_0x8ff1('0x28')](handleError(_0x6883f8,null));};exports[_0x8ff1('0x6f')]=function(_0x1e1d80,_0x56f850){return db[_0x8ff1('0x20')]['find']({'where':{'id':_0x1e1d80[_0x8ff1('0x29')]['id']}})[_0x8ff1('0x16')](handleEntityNotFound(_0x56f850,null))['then'](function(_0x4a019e){if(_0x4a019e){return _0x4a019e['removeAgents'](_0x1e1d80['query'][_0x8ff1('0x53')])[_0x8ff1('0x16')](function(){if(_[_0x8ff1('0x74')](_0x1e1d80[_0x8ff1('0x27')][_0x8ff1('0x53')])){for(var _0x3b0fb9=0x0;_0x3b0fb9<_0x1e1d80['query'][_0x8ff1('0x53')]['length'];_0x3b0fb9+=0x1){socket[_0x8ff1('0x5a')](_0x8ff1('0x70'),{'UserId':Number(_0x1e1d80[_0x8ff1('0x27')][_0x8ff1('0x53')][_0x3b0fb9]),'ChatQueueId':Number(_0x1e1d80[_0x8ff1('0x29')]['id'])});}}else{socket['emit']('userChatQueue:remove',{'UserId':Number(_0x1e1d80['query'][_0x8ff1('0x53')]),'ChatQueueId':Number(_0x1e1d80['params']['id'])});}});}})[_0x8ff1('0x16')](respondWithStatusCode(_0x56f850,null))['catch'](handleError(_0x56f850,null));};exports['getAgents']=function(_0x30999a,_0x4e24a0){var _0x5c02f1={};var _0x16fc1b={};var _0x410bc7;var _0x579b0b;return db[_0x8ff1('0x20')]['findOne']({'where':{'id':_0x30999a['params']['id']}})[_0x8ff1('0x16')](handleEntityNotFound(_0x4e24a0,null))['then'](function(_0x345280){if(_0x345280){_0x410bc7=_0x345280;_0x16fc1b[_0x8ff1('0x2a')]=_[_0x8ff1('0x2b')](db[_0x8ff1('0x75')][_0x8ff1('0x21')]);_0x16fc1b['query']=_[_0x8ff1('0x2b')](_0x30999a['query']);_0x16fc1b[_0x8ff1('0x40')]=_[_0x8ff1('0x2d')](_0x16fc1b['model'],_0x16fc1b[_0x8ff1('0x27')]);_0x5c02f1[_0x8ff1('0x2c')]=_[_0x8ff1('0x2d')](_0x16fc1b['model'],qs[_0x8ff1('0x2e')](_0x30999a[_0x8ff1('0x27')][_0x8ff1('0x2e')]));_0x5c02f1[_0x8ff1('0x2c')]=_0x5c02f1[_0x8ff1('0x2c')][_0x8ff1('0x2f')]?_0x5c02f1[_0x8ff1('0x2c')]:_0x16fc1b['model'];_0x5c02f1[_0x8ff1('0x42')]=qs[_0x8ff1('0x43')](_0x30999a[_0x8ff1('0x27')]['sort']);_0x5c02f1[_0x8ff1('0x25')]=qs['filters'](_[_0x8ff1('0x44')](_0x30999a[_0x8ff1('0x27')],_0x16fc1b[_0x8ff1('0x40')]));if(_0x30999a[_0x8ff1('0x27')][_0x8ff1('0x45')]){_0x5c02f1[_0x8ff1('0x25')]=_[_0x8ff1('0x31')](_0x5c02f1[_0x8ff1('0x25')],{'$or':_['map'](_0x5c02f1[_0x8ff1('0x2c')],function(_0x109c26){var _0x5631f7={};_0x5631f7[_0x109c26]={'$like':'%'+_0x30999a[_0x8ff1('0x27')][_0x8ff1('0x45')]+'%'};return _0x5631f7;})});}_0x5c02f1=_['merge']({},_0x5c02f1,_0x30999a[_0x8ff1('0x32')]);return _0x410bc7[_0x8ff1('0x76')](_0x5c02f1);}})[_0x8ff1('0x16')](function(_0x4b0002){if(_0x4b0002){_0x579b0b=_0x4b0002[_0x8ff1('0x2f')];if(!_0x30999a['query'][_0x8ff1('0x51')](_0x8ff1('0x41'))){_0x5c02f1[_0x8ff1('0x13')]=qs[_0x8ff1('0x13')](_0x30999a[_0x8ff1('0x27')][_0x8ff1('0x13')]);_0x5c02f1[_0x8ff1('0x10')]=qs['offset'](_0x30999a[_0x8ff1('0x27')][_0x8ff1('0x10')]);}return _0x410bc7['getAgents'](_0x5c02f1);}})[_0x8ff1('0x16')](function(_0x5422cc){if(_0x5422cc){return _0x5422cc?{'count':_0x579b0b,'rows':_0x5422cc}:null;}})[_0x8ff1('0x16')](respondWithResult(_0x4e24a0,null))[_0x8ff1('0x28')](handleError(_0x4e24a0,null));};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js
index 027ec62..8fcfe3e 100644
--- a/server/api/chatQueue/chatQueue.events.js
+++ b/server/api/chatQueue/chatQueue.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0f3c=['exports','events','../../mysqldb','update','remove','emit','hook'];(function(_0x34ca44,_0xc10a82){var _0xcb3f34=function(_0x45f09f){while(--_0x45f09f){_0x34ca44['push'](_0x34ca44['shift']());}};_0xcb3f34(++_0xc10a82);}(_0x0f3c,0x189));var _0xc0f3=function(_0x177405,_0x101922){_0x177405=_0x177405-0x0;var _0x7b025f=_0x0f3c[_0x177405];return _0x7b025f;};'use strict';var EventEmitter=require(_0xc0f3('0x0'));var ChatQueue=require(_0xc0f3('0x1'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xc0f3('0x2'),'afterDestroy':_0xc0f3('0x3')};function emitEvent(_0xa6a874){return function(_0x2d1f5d,_0x1be43d,_0x279717){ChatQueueEvents[_0xc0f3('0x4')](_0xa6a874+':'+_0x2d1f5d['id'],_0x2d1f5d);ChatQueueEvents[_0xc0f3('0x4')](_0xa6a874,_0x2d1f5d);_0x279717(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0xc0f3('0x5')](e,emitEvent(event));}}module[_0xc0f3('0x6')]=ChatQueueEvents;
\ No newline at end of file
+var _0xcdb5=['hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners','save','update','emit'];(function(_0x273f88,_0x5d4150){var _0x177ca1=function(_0xf46ec4){while(--_0xf46ec4){_0x273f88['push'](_0x273f88['shift']());}};_0x177ca1(++_0x5d4150);}(_0xcdb5,0xb3));var _0x5cdb=function(_0x46d68b,_0x154971){_0x46d68b=_0x46d68b-0x0;var _0x3a7893=_0xcdb5[_0x46d68b];return _0x3a7893;};'use strict';var EventEmitter=require('events');var ChatQueue=require(_0x5cdb('0x0'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x5cdb('0x1')](0x0);var events={'afterCreate':_0x5cdb('0x2'),'afterUpdate':_0x5cdb('0x3'),'afterDestroy':'remove'};function emitEvent(_0x5d6371){return function(_0x375b30,_0xbc1d73,_0x12e89e){ChatQueueEvents[_0x5cdb('0x4')](_0x5d6371+':'+_0x375b30['id'],_0x375b30);ChatQueueEvents[_0x5cdb('0x4')](_0x5d6371,_0x375b30);_0x12e89e(null);};}for(var e in events){if(events[_0x5cdb('0x5')](e)){var event=events[e];ChatQueue[_0x5cdb('0x6')](e,emitEvent(event));}}module[_0x5cdb('0x7')]=ChatQueueEvents;
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js
index 97fad0a..d2b435b 100644
--- a/server/api/chatQueue/chatQueue.model.js
+++ b/server/api/chatQueue/chatQueue.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2b74=['define','chat_queues','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./chatQueue.attributes','exports'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2b74,0x115));var _0x42b7=function(_0x45eb29,_0x309e77){_0x45eb29=_0x45eb29-0x0;var _0x2339af=_0x2b74[_0x45eb29];return _0x2339af;};'use strict';var _=require('lodash');var util=require(_0x42b7('0x0'));var logger=require(_0x42b7('0x1'))('api');var moment=require('moment');var BPromise=require(_0x42b7('0x2'));var rp=require(_0x42b7('0x3'));var fs=require('fs');var path=require(_0x42b7('0x4'));var rimraf=require(_0x42b7('0x5'));var config=require(_0x42b7('0x6'));var attributes=require(_0x42b7('0x7'));module[_0x42b7('0x8')]=function(_0x38544e,_0x1cc24f){return _0x38544e[_0x42b7('0x9')]('ChatQueue',attributes,{'tableName':_0x42b7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1c49=['bluebird','request-promise','path','../../config/environment','./chatQueue.attributes','exports','ChatQueue','util','../../config/logger'];(function(_0x4edcd3,_0x58c471){var _0x356fb7=function(_0x5f566d){while(--_0x5f566d){_0x4edcd3['push'](_0x4edcd3['shift']());}};_0x356fb7(++_0x58c471);}(_0x1c49,0x1db));var _0x91c4=function(_0x1893da,_0x2d0c72){_0x1893da=_0x1893da-0x0;var _0x2becec=_0x1c49[_0x1893da];return _0x2becec;};'use strict';var _=require('lodash');var util=require(_0x91c4('0x0'));var logger=require(_0x91c4('0x1'))('api');var moment=require('moment');var BPromise=require(_0x91c4('0x2'));var rp=require(_0x91c4('0x3'));var fs=require('fs');var path=require(_0x91c4('0x4'));var rimraf=require('rimraf');var config=require(_0x91c4('0x5'));var attributes=require(_0x91c4('0x6'));module[_0x91c4('0x7')]=function(_0x492ee5,_0x327ac2){return _0x492ee5['define'](_0x91c4('0x8'),attributes,{'tableName':'chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.rpc.js b/server/api/chatQueue/chatQueue.rpc.js
index aac6887..f13731a 100644
--- a/server/api/chatQueue/chatQueue.rpc.js
+++ b/server/api/chatQueue/chatQueue.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x53aa=['where','attributes','limit','include','map','model','ShowChatQueue','find','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','register','request','then','info','ChatQueue,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','GetChatQueue','ChatQueue','findAll','options'];(function(_0x1a8469,_0x2ffccf){var _0x19c2dd=function(_0x5e18c1){while(--_0x5e18c1){_0x1a8469['push'](_0x1a8469['shift']());}};_0x19c2dd(++_0x2ffccf);}(_0x53aa,0x167));var _0xa53a=function(_0x3070dc,_0x40cf11){_0x3070dc=_0x3070dc-0x0;var _0x431489=_0x53aa[_0x3070dc];return _0x431489;};'use strict';var _=require(_0xa53a('0x0'));var util=require(_0xa53a('0x1'));var moment=require(_0xa53a('0x2'));var BPromise=require(_0xa53a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa53a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa53a('0x5'))(_0xa53a('0x6'));var config=require(_0xa53a('0x7'));var jayson=require(_0xa53a('0x8'));var client=jayson[_0xa53a('0x9')]['http']({'port':0x232a});config[_0xa53a('0xa')]=_[_0xa53a('0xb')](config['redis'],{'host':_0xa53a('0xc'),'port':0x18eb});var socket=require(_0xa53a('0xd'))(new Redis(config[_0xa53a('0xa')]));require('./chatQueue.socket')[_0xa53a('0xe')](socket);function respondWithRpcPromise(_0x5785a9,_0x422fb3,_0x1a79a1){return new BPromise(function(_0x40bd10,_0x5d1e46){return client[_0xa53a('0xf')](_0x5785a9,_0x1a79a1)[_0xa53a('0x10')](function(_0x18eba9){logger[_0xa53a('0x11')](_0xa53a('0x12'),_0x422fb3,'request\x20sent');logger[_0xa53a('0x13')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x422fb3,_0xa53a('0x14'),JSON[_0xa53a('0x15')](_0x18eba9));if(_0x18eba9[_0xa53a('0x16')]){if(_0x18eba9[_0xa53a('0x16')][_0xa53a('0x17')]===0x1f4){logger[_0xa53a('0x16')](_0xa53a('0x12'),_0x422fb3,_0x18eba9[_0xa53a('0x16')][_0xa53a('0x18')]);return _0x5d1e46(_0x18eba9[_0xa53a('0x16')][_0xa53a('0x18')]);}logger[_0xa53a('0x16')]('ChatQueue,\x20%s,\x20%s',_0x422fb3,_0x18eba9[_0xa53a('0x16')][_0xa53a('0x18')]);return _0x40bd10(_0x18eba9['error'][_0xa53a('0x18')]);}else{logger[_0xa53a('0x11')](_0xa53a('0x12'),_0x422fb3,_0xa53a('0x14'));_0x40bd10(_0x18eba9[_0xa53a('0x19')][_0xa53a('0x18')]);}})[_0xa53a('0x1a')](function(_0x344350){logger[_0xa53a('0x16')](_0xa53a('0x12'),_0x422fb3,_0x344350);_0x5d1e46(_0x344350);});});}exports[_0xa53a('0x1b')]=function(_0x1a50bd){var _0x2311ba=this;return new Promise(function(_0xaecd04,_0x584c4e){return db[_0xa53a('0x1c')][_0xa53a('0x1d')]({'raw':_0x1a50bd['options']?_0x1a50bd[_0xa53a('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x1a50bd[_0xa53a('0x1e')]?_0x1a50bd[_0xa53a('0x1e')][_0xa53a('0x1f')]||null:null,'attributes':_0x1a50bd[_0xa53a('0x1e')]?_0x1a50bd[_0xa53a('0x1e')][_0xa53a('0x20')]||null:null,'limit':_0x1a50bd['options']?_0x1a50bd[_0xa53a('0x1e')][_0xa53a('0x21')]||null:null,'include':_0x1a50bd['options']?_0x1a50bd[_0xa53a('0x1e')][_0xa53a('0x22')]?_[_0xa53a('0x23')](_0x1a50bd[_0xa53a('0x1e')][_0xa53a('0x22')],function(_0x401aae){return{'model':db[_0x401aae[_0xa53a('0x24')]],'as':_0x401aae['as'],'attributes':_0x401aae['attributes'],'include':_0x401aae['include']?_[_0xa53a('0x23')](_0x401aae[_0xa53a('0x22')],function(_0x512d96){return{'model':db[_0x512d96[_0xa53a('0x24')]],'as':_0x512d96['as'],'attributes':_0x512d96[_0xa53a('0x20')],'include':_0x512d96[_0xa53a('0x22')]?_[_0xa53a('0x23')](_0x512d96[_0xa53a('0x22')],function(_0x1e796b){return{'model':db[_0x1e796b['model']],'as':_0x1e796b['as'],'attributes':_0x1e796b[_0xa53a('0x20')]};}):[]};}):[]};}):[]:[]})[_0xa53a('0x10')](function(_0xde3502){logger['info']('GetChatQueue',_0x1a50bd);logger[_0xa53a('0x13')](_0xa53a('0x1b'),_0x1a50bd,JSON[_0xa53a('0x15')](_0xde3502));_0xaecd04(_0xde3502);})['catch'](function(_0x2d78eb){logger[_0xa53a('0x16')](_0xa53a('0x1b'),_0x2d78eb[_0xa53a('0x18')],_0x1a50bd);_0x584c4e(_0x2311ba['error'](0x1f4,_0x2d78eb['message']));});});};exports[_0xa53a('0x25')]=function(_0x25d4f3){var _0x22d998=this;return new Promise(function(_0x315dc6,_0x3461ae){return db[_0xa53a('0x1c')][_0xa53a('0x26')]({'raw':_0x25d4f3[_0xa53a('0x1e')]?_0x25d4f3[_0xa53a('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x25d4f3[_0xa53a('0x1e')]?_0x25d4f3['options'][_0xa53a('0x1f')]||null:null,'attributes':_0x25d4f3[_0xa53a('0x1e')]?_0x25d4f3[_0xa53a('0x1e')][_0xa53a('0x20')]||null:null,'include':_0x25d4f3[_0xa53a('0x1e')]?_0x25d4f3[_0xa53a('0x1e')][_0xa53a('0x22')]?_[_0xa53a('0x23')](_0x25d4f3[_0xa53a('0x1e')]['include'],function(_0x351860){return{'model':db[_0x351860['model']],'as':_0x351860['as'],'attributes':_0x351860['attributes'],'include':_0x351860[_0xa53a('0x22')]?_[_0xa53a('0x23')](_0x351860[_0xa53a('0x22')],function(_0x4993df){return{'model':db[_0x4993df[_0xa53a('0x24')]],'as':_0x4993df['as'],'attributes':_0x4993df['attributes'],'include':_0x4993df[_0xa53a('0x22')]?_[_0xa53a('0x23')](_0x4993df['include'],function(_0x295898){return{'model':db[_0x295898[_0xa53a('0x24')]],'as':_0x295898['as'],'attributes':_0x295898[_0xa53a('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x109276){logger[_0xa53a('0x11')]('ShowChatQueue',_0x25d4f3);logger[_0xa53a('0x13')](_0xa53a('0x25'),_0x25d4f3,JSON[_0xa53a('0x15')](_0x109276));_0x315dc6(_0x109276);})[_0xa53a('0x1a')](function(_0x13dc01){logger['error'](_0xa53a('0x25'),_0x13dc01[_0xa53a('0x18')],_0x25d4f3);_0x3461ae(_0x22d998['error'](0x1f4,_0x13dc01[_0xa53a('0x18')]));});});};
\ No newline at end of file
+var _0x0561=['../../config/environment','jayson/promise','client','http','redis','localhost','./chatQueue.socket','register','then','ChatQueue,\x20%s,\x20%s','request\x20sent','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ChatQueue','findAll','options','raw','attributes','limit','include','map','model','info','GetChatQueue','debug','ShowChatQueue','find','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0x509f97,_0x442414){var _0x18bbef=function(_0x4787c5){while(--_0x4787c5){_0x509f97['push'](_0x509f97['shift']());}};_0x18bbef(++_0x442414);}(_0x0561,0x1e4));var _0x1056=function(_0x364a38,_0x481053){_0x364a38=_0x364a38-0x0;var _0x1d7639=_0x0561[_0x364a38];return _0x1d7639;};'use strict';var _=require(_0x1056('0x0'));var util=require(_0x1056('0x1'));var moment=require(_0x1056('0x2'));var BPromise=require(_0x1056('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1056('0x4'));var db=require(_0x1056('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1056('0x6'))(_0x1056('0x7'));var config=require(_0x1056('0x8'));var jayson=require(_0x1056('0x9'));var client=jayson[_0x1056('0xa')][_0x1056('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0x1056('0xc')],{'host':_0x1056('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1056('0xc')]));require(_0x1056('0xe'))[_0x1056('0xf')](socket);function respondWithRpcPromise(_0x1da779,_0x298a3b,_0x2a421c){return new BPromise(function(_0x49a386,_0x20bafa){return client['request'](_0x1da779,_0x2a421c)[_0x1056('0x10')](function(_0x235af6){logger['info'](_0x1056('0x11'),_0x298a3b,_0x1056('0x12'));logger['debug'](_0x1056('0x13'),_0x298a3b,_0x1056('0x12'),JSON[_0x1056('0x14')](_0x235af6));if(_0x235af6[_0x1056('0x15')]){if(_0x235af6[_0x1056('0x15')][_0x1056('0x16')]===0x1f4){logger[_0x1056('0x15')](_0x1056('0x11'),_0x298a3b,_0x235af6['error'][_0x1056('0x17')]);return _0x20bafa(_0x235af6[_0x1056('0x15')][_0x1056('0x17')]);}logger[_0x1056('0x15')](_0x1056('0x11'),_0x298a3b,_0x235af6[_0x1056('0x15')][_0x1056('0x17')]);return _0x49a386(_0x235af6[_0x1056('0x15')][_0x1056('0x17')]);}else{logger['info'](_0x1056('0x11'),_0x298a3b,_0x1056('0x12'));_0x49a386(_0x235af6[_0x1056('0x18')][_0x1056('0x17')]);}})[_0x1056('0x19')](function(_0x3ac20d){logger[_0x1056('0x15')]('ChatQueue,\x20%s,\x20%s',_0x298a3b,_0x3ac20d);_0x20bafa(_0x3ac20d);});});}exports['GetChatQueue']=function(_0x2df1be){var _0x470ce3=this;return new Promise(function(_0x3a6229,_0x33d0af){return db[_0x1056('0x1a')][_0x1056('0x1b')]({'raw':_0x2df1be[_0x1056('0x1c')]?_0x2df1be[_0x1056('0x1c')][_0x1056('0x1d')]===undefined?!![]:![]:!![],'where':_0x2df1be[_0x1056('0x1c')]?_0x2df1be[_0x1056('0x1c')]['where']||null:null,'attributes':_0x2df1be[_0x1056('0x1c')]?_0x2df1be[_0x1056('0x1c')][_0x1056('0x1e')]||null:null,'limit':_0x2df1be[_0x1056('0x1c')]?_0x2df1be['options'][_0x1056('0x1f')]||null:null,'include':_0x2df1be['options']?_0x2df1be[_0x1056('0x1c')][_0x1056('0x20')]?_[_0x1056('0x21')](_0x2df1be['options'][_0x1056('0x20')],function(_0x54d1c1){return{'model':db[_0x54d1c1[_0x1056('0x22')]],'as':_0x54d1c1['as'],'attributes':_0x54d1c1[_0x1056('0x1e')],'include':_0x54d1c1[_0x1056('0x20')]?_['map'](_0x54d1c1['include'],function(_0x439cd2){return{'model':db[_0x439cd2[_0x1056('0x22')]],'as':_0x439cd2['as'],'attributes':_0x439cd2[_0x1056('0x1e')],'include':_0x439cd2[_0x1056('0x20')]?_[_0x1056('0x21')](_0x439cd2[_0x1056('0x20')],function(_0x242a75){return{'model':db[_0x242a75[_0x1056('0x22')]],'as':_0x242a75['as'],'attributes':_0x242a75[_0x1056('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x1056('0x10')](function(_0x33b06f){logger[_0x1056('0x23')](_0x1056('0x24'),_0x2df1be);logger[_0x1056('0x25')](_0x1056('0x24'),_0x2df1be,JSON[_0x1056('0x14')](_0x33b06f));_0x3a6229(_0x33b06f);})[_0x1056('0x19')](function(_0x1c3e30){logger[_0x1056('0x15')]('GetChatQueue',_0x1c3e30[_0x1056('0x17')],_0x2df1be);_0x33d0af(_0x470ce3[_0x1056('0x15')](0x1f4,_0x1c3e30[_0x1056('0x17')]));});});};exports[_0x1056('0x26')]=function(_0x491434){var _0x53edda=this;return new Promise(function(_0x142436,_0x25020e){return db[_0x1056('0x1a')][_0x1056('0x27')]({'raw':_0x491434[_0x1056('0x1c')]?_0x491434[_0x1056('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x491434[_0x1056('0x1c')]?_0x491434[_0x1056('0x1c')][_0x1056('0x28')]||null:null,'attributes':_0x491434[_0x1056('0x1c')]?_0x491434['options'][_0x1056('0x1e')]||null:null,'include':_0x491434[_0x1056('0x1c')]?_0x491434[_0x1056('0x1c')][_0x1056('0x20')]?_[_0x1056('0x21')](_0x491434['options']['include'],function(_0x29eb77){return{'model':db[_0x29eb77[_0x1056('0x22')]],'as':_0x29eb77['as'],'attributes':_0x29eb77[_0x1056('0x1e')],'include':_0x29eb77[_0x1056('0x20')]?_[_0x1056('0x21')](_0x29eb77[_0x1056('0x20')],function(_0x5d2173){return{'model':db[_0x5d2173[_0x1056('0x22')]],'as':_0x5d2173['as'],'attributes':_0x5d2173['attributes'],'include':_0x5d2173[_0x1056('0x20')]?_[_0x1056('0x21')](_0x5d2173[_0x1056('0x20')],function(_0x1557de){return{'model':db[_0x1557de['model']],'as':_0x1557de['as'],'attributes':_0x1557de[_0x1056('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x1056('0x10')](function(_0x1c5d68){logger[_0x1056('0x23')](_0x1056('0x26'),_0x491434);logger[_0x1056('0x25')]('ShowChatQueue',_0x491434,JSON[_0x1056('0x14')](_0x1c5d68));_0x142436(_0x1c5d68);})['catch'](function(_0x22f390){logger[_0x1056('0x15')](_0x1056('0x26'),_0x22f390[_0x1056('0x17')],_0x491434);_0x25020e(_0x53edda[_0x1056('0x15')](0x1f4,_0x22f390['message']));});});};
\ No newline at end of file
diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js
index 4303af0..d66e297 100644
--- a/server/api/chatQueue/chatQueue.socket.js
+++ b/server/api/chatQueue/chatQueue.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9bde=['chatQueue:','save','update','emit','removeListener','register','length'];(function(_0x4ef734,_0x5826d){var _0x33a7cb=function(_0x127a2b){while(--_0x127a2b){_0x4ef734['push'](_0x4ef734['shift']());}};_0x33a7cb(++_0x5826d);}(_0x9bde,0xe1));var _0xe9bd=function(_0x53ff2e,_0x4aa0c7){_0x53ff2e=_0x53ff2e-0x0;var _0x1cfc81=_0x9bde[_0x53ff2e];return _0x1cfc81;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=[_0xe9bd('0x0'),'remove',_0xe9bd('0x1')];function createListener(_0x4c63ca,_0x51786f){return function(_0x3005aa){_0x51786f[_0xe9bd('0x2')](_0x4c63ca,_0x3005aa);};}function removeListener(_0x1c1b34,_0x10822d){return function(){ChatQueueEvents[_0xe9bd('0x3')](_0x1c1b34,_0x10822d);};}exports[_0xe9bd('0x4')]=function(_0x4fd7b8){for(var _0x4763e9=0x0,_0x5f18fe=events[_0xe9bd('0x5')];_0x4763e9<_0x5f18fe;_0x4763e9++){var _0xa66ae2=events[_0x4763e9];var _0x2d5c75=createListener(_0xe9bd('0x6')+_0xa66ae2,_0x4fd7b8);ChatQueueEvents['on'](_0xa66ae2,_0x2d5c75);}};
\ No newline at end of file
+var _0x0ba7=['emit','removeListener','register','length','chatQueue:','./chatQueue.events','remove','update'];(function(_0x2021b1,_0x3dcce0){var _0xd691=function(_0x1fe0e8){while(--_0x1fe0e8){_0x2021b1['push'](_0x2021b1['shift']());}};_0xd691(++_0x3dcce0);}(_0x0ba7,0x16d));var _0x70ba=function(_0x1141f8,_0x57e107){_0x1141f8=_0x1141f8-0x0;var _0x5e5091=_0x0ba7[_0x1141f8];return _0x5e5091;};'use strict';var ChatQueueEvents=require(_0x70ba('0x0'));var events=['save',_0x70ba('0x1'),_0x70ba('0x2')];function createListener(_0xadfc69,_0x42d93c){return function(_0x5e5368){_0x42d93c[_0x70ba('0x3')](_0xadfc69,_0x5e5368);};}function removeListener(_0x3e20ab,_0x3cb2e3){return function(){ChatQueueEvents[_0x70ba('0x4')](_0x3e20ab,_0x3cb2e3);};}exports[_0x70ba('0x5')]=function(_0x3f9877){for(var _0x17a00c=0x0,_0x2d5a16=events[_0x70ba('0x6')];_0x17a00c<_0x2d5a16;_0x17a00c++){var _0x1185cb=events[_0x17a00c];var _0x1a968b=createListener(_0x70ba('0x7')+_0x1185cb,_0x3f9877);ChatQueueEvents['on'](_0x1185cb,_0x1a968b);}};
\ No newline at end of file
diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js
index 92345e9..359aa6e 100644
--- a/server/api/chatQueue/index.js
+++ b/server/api/chatQueue/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x3e74=['../../config/environment','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getMembers','/:id/teams','getTeams','getAgents','post','addTeams','addAgents','put','delete','removeTeams','/:id/users','removeAgents','exports','multer','path','connect-timeout','express','../../components/auth/service'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x3e74,0x175));var _0x43e7=function(_0x3e9e57,_0x28a34c){_0x3e9e57=_0x3e9e57-0x0;var _0xf7c9fd=_0x3e74[_0x3e9e57];return _0xf7c9fd;};'use strict';var multer=require(_0x43e7('0x0'));var util=require('util');var path=require(_0x43e7('0x1'));var timeout=require(_0x43e7('0x2'));var express=require(_0x43e7('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x43e7('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x43e7('0x5'));var controller=require(_0x43e7('0x6'));router[_0x43e7('0x7')]('/',auth[_0x43e7('0x8')](),controller[_0x43e7('0x9')]);router['get'](_0x43e7('0xa'),auth[_0x43e7('0x8')](),controller[_0x43e7('0xb')]);router[_0x43e7('0x7')](_0x43e7('0xc'),auth['isAuthenticated'](),controller[_0x43e7('0xd')]);router['get']('/:id/members',auth[_0x43e7('0x8')](),controller[_0x43e7('0xe')]);router['get'](_0x43e7('0xf'),auth['isAuthenticated'](),controller[_0x43e7('0x10')]);router[_0x43e7('0x7')]('/:id/users',auth[_0x43e7('0x8')](),controller[_0x43e7('0x11')]);router[_0x43e7('0x12')]('/',auth[_0x43e7('0x8')](),controller['create']);router['post'](_0x43e7('0xf'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x13')]);router['post']('/:id/users',auth[_0x43e7('0x8')](),controller[_0x43e7('0x14')]);router[_0x43e7('0x15')](_0x43e7('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x43e7('0x16')](_0x43e7('0xc'),auth[_0x43e7('0x8')](),controller['destroy']);router['delete'](_0x43e7('0xf'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x17')]);router[_0x43e7('0x16')](_0x43e7('0x18'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x19')]);module[_0x43e7('0x1a')]=router;
\ No newline at end of file
+var _0x5fc3=['update','delete','destroy','removeTeams','removeAgents','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./chatQueue.controller','get','isAuthenticated','describe','/:id','show','getMembers','/:id/teams','/:id/users','post','create','addTeams','put'];(function(_0xa8883,_0x1f107f){var _0x479426=function(_0x4e56b9){while(--_0x4e56b9){_0xa8883['push'](_0xa8883['shift']());}};_0x479426(++_0x1f107f);}(_0x5fc3,0xa8));var _0x35fc=function(_0x4c9380,_0x2fefc0){_0x4c9380=_0x4c9380-0x0;var _0x49a523=_0x5fc3[_0x4c9380];return _0x49a523;};'use strict';var multer=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var path=require('path');var timeout=require(_0x35fc('0x2'));var express=require(_0x35fc('0x3'));var router=express[_0x35fc('0x4')]();var fs_extra=require(_0x35fc('0x5'));var auth=require(_0x35fc('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x35fc('0x7'));var controller=require(_0x35fc('0x8'));router[_0x35fc('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x35fc('0x9')]('/describe',auth[_0x35fc('0xa')](),controller[_0x35fc('0xb')]);router[_0x35fc('0x9')](_0x35fc('0xc'),auth[_0x35fc('0xa')](),controller[_0x35fc('0xd')]);router[_0x35fc('0x9')]('/:id/members',auth[_0x35fc('0xa')](),controller[_0x35fc('0xe')]);router['get'](_0x35fc('0xf'),auth[_0x35fc('0xa')](),controller['getTeams']);router[_0x35fc('0x9')](_0x35fc('0x10'),auth['isAuthenticated'](),controller['getAgents']);router[_0x35fc('0x11')]('/',auth['isAuthenticated'](),controller[_0x35fc('0x12')]);router[_0x35fc('0x11')](_0x35fc('0xf'),auth[_0x35fc('0xa')](),controller[_0x35fc('0x13')]);router['post']('/:id/users',auth['isAuthenticated'](),controller['addAgents']);router[_0x35fc('0x14')](_0x35fc('0xc'),auth[_0x35fc('0xa')](),controller[_0x35fc('0x15')]);router[_0x35fc('0x16')](_0x35fc('0xc'),auth['isAuthenticated'](),controller[_0x35fc('0x17')]);router[_0x35fc('0x16')]('/:id/teams',auth[_0x35fc('0xa')](),controller[_0x35fc('0x18')]);router[_0x35fc('0x16')]('/:id/users',auth[_0x35fc('0xa')](),controller[_0x35fc('0x19')]);module[_0x35fc('0x1a')]=router;
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js
index 3ffde6c..e98d2e8 100644
--- a/server/api/chatQueueReport/chatQueueReport.attributes.js
+++ b/server/api/chatQueueReport/chatQueueReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x02b2=['STRING','DATE','moment','sequelize','exports'];(function(_0x56e311,_0x110a84){var _0x1f6451=function(_0x3f2c8f){while(--_0x3f2c8f){_0x56e311['push'](_0x56e311['shift']());}};_0x1f6451(++_0x110a84);}(_0x02b2,0x1b5));var _0x202b=function(_0x282fc6,_0x255c25){_0x282fc6=_0x282fc6-0x0;var _0x132425=_0x02b2[_0x282fc6];return _0x132425;};'use strict';var moment=require(_0x202b('0x0'));var Sequelize=require(_0x202b('0x1'));module[_0x202b('0x2')]={'uniqueid':{'type':Sequelize[_0x202b('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x202b('0x3')]},'joinAt':{'type':Sequelize[_0x202b('0x4')]},'leaveAt':{'type':Sequelize[_0x202b('0x4')]},'acceptAt':{'type':Sequelize[_0x202b('0x4')]},'exitAt':{'type':Sequelize[_0x202b('0x4')]},'reason':{'type':Sequelize[_0x202b('0x3')]}};
\ No newline at end of file
+var _0x3516=['DATE','sequelize','exports','STRING'];(function(_0x5e54b0,_0x126ac2){var _0x1c1ecd=function(_0x35f556){while(--_0x35f556){_0x5e54b0['push'](_0x5e54b0['shift']());}};_0x1c1ecd(++_0x126ac2);}(_0x3516,0xc9));var _0x6351=function(_0x4be499,_0x59e32e){_0x4be499=_0x4be499-0x0;var _0x4b96de=_0x3516[_0x4be499];return _0x4b96de;};'use strict';var moment=require('moment');var Sequelize=require(_0x6351('0x0'));module[_0x6351('0x1')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0x6351('0x2')]},'joinAt':{'type':Sequelize[_0x6351('0x3')]},'leaveAt':{'type':Sequelize[_0x6351('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x6351('0x3')]},'reason':{'type':Sequelize[_0x6351('0x2')]}};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js
index 6a06aec..56a5be8 100644
--- a/server/api/chatQueueReport/chatQueueReport.controller.js
+++ b/server/api/chatQueueReport/chatQueueReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0e76=['util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','sendStatus','end','json','limit','count','offset','status','set','Content-Range','reject','update','then','destroy','error','stack','name','send','index','ChatQueueReport','fieldName','type','key','model','map','keys','filters','intersection','query','attributes','fields','order','sort','filter','merge','where','VIRTUAL','options','includeAll','include','catch','show','params','rawAttributes','find','body','describe','eml-format','fast-json-patch','moment','bluebird','mustache'];(function(_0x16f775,_0x45b10f){var _0x17d9e2=function(_0x3d2ccf){while(--_0x3d2ccf){_0x16f775['push'](_0x16f775['shift']());}};_0x17d9e2(++_0x45b10f);}(_0x0e76,0xc4));var _0x60e7=function(_0x4d6624,_0x78b606){_0x4d6624=_0x4d6624-0x0;var _0x5dbb01=_0x0e76[_0x4d6624];return _0x5dbb01;};'use strict';var emlformat=require(_0x60e7('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x60e7('0x1'));var rp=require('request-promise');var moment=require(_0x60e7('0x2'));var BPromise=require(_0x60e7('0x3'));var Mustache=require(_0x60e7('0x4'));var util=require(_0x60e7('0x5'));var path=require(_0x60e7('0x6'));var sox=require('sox');var csv=require(_0x60e7('0x7'));var ejs=require(_0x60e7('0x8'));var fs=require('fs');var fs_extra=require(_0x60e7('0x9'));var _=require(_0x60e7('0xa'));var squel=require(_0x60e7('0xb'));var crypto=require(_0x60e7('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x60e7('0xd'));var toCsv=require(_0x60e7('0x7'));var querystring=require(_0x60e7('0xe'));var Papa=require('papaparse');var Redis=require(_0x60e7('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x60e7('0x10'));var as=require(_0x60e7('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x60e7('0x12'))('api');var utils=require(_0x60e7('0x13'));var config=require(_0x60e7('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3d43cd,_0x274959){_0x274959=_0x274959||0xcc;return function(_0x243280){if(_0x243280){return _0x3d43cd[_0x60e7('0x15')](_0x274959);}return _0x3d43cd['status'](_0x274959)[_0x60e7('0x16')]();};}function respondWithResult(_0x4ff2fe,_0x1d4c68){_0x1d4c68=_0x1d4c68||0xc8;return function(_0x1d97a5){if(_0x1d97a5){return _0x4ff2fe['status'](_0x1d4c68)[_0x60e7('0x17')](_0x1d97a5);}};}function respondWithFilteredResult(_0x589b22,_0x25bcd9){return function(_0x388cd8){if(_0x388cd8){var _0xbe8f55=typeof _0x25bcd9['offset']==='undefined'&&typeof _0x25bcd9[_0x60e7('0x18')]==='undefined';var _0x22c978=_0x388cd8[_0x60e7('0x19')];var _0x2a136a=_0xbe8f55?0x0:_0x25bcd9[_0x60e7('0x1a')];var _0x54a701=_0xbe8f55?_0x388cd8[_0x60e7('0x19')]:_0x25bcd9['offset']+_0x25bcd9[_0x60e7('0x18')];var _0x128ef1;if(_0x54a701>=_0x22c978){_0x54a701=_0x22c978;_0x128ef1=0xc8;}else{_0x128ef1=0xce;}_0x589b22[_0x60e7('0x1b')](_0x128ef1);return _0x589b22[_0x60e7('0x1c')](_0x60e7('0x1d'),_0x2a136a+'-'+_0x54a701+'/'+_0x22c978)[_0x60e7('0x17')](_0x388cd8);}return null;};}function patchUpdates(_0x2c602d){return function(_0x878467){try{jsonpatch['apply'](_0x878467,_0x2c602d,!![]);}catch(_0x3dfbce){return BPromise[_0x60e7('0x1e')](_0x3dfbce);}return _0x878467['save']();};}function saveUpdates(_0x3841f2,_0x507a9b){return function(_0x3d8a3b){if(_0x3d8a3b){return _0x3d8a3b[_0x60e7('0x1f')](_0x3841f2)[_0x60e7('0x20')](function(_0x334bd9){return _0x334bd9;});}return null;};}function removeEntity(_0x40c7b0,_0x4258a2){return function(_0x54e17b){if(_0x54e17b){return _0x54e17b[_0x60e7('0x21')]()[_0x60e7('0x20')](function(){_0x40c7b0[_0x60e7('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4a0605,_0x3ecb2e){return function(_0x34da5e){if(!_0x34da5e){_0x4a0605[_0x60e7('0x15')](0x194);}return _0x34da5e;};}function handleError(_0xda9aa1,_0x598fb2){_0x598fb2=_0x598fb2||0x1f4;return function(_0x3c8084){logger[_0x60e7('0x22')](_0x3c8084[_0x60e7('0x23')]);if(_0x3c8084[_0x60e7('0x24')]){delete _0x3c8084[_0x60e7('0x24')];}_0xda9aa1['status'](_0x598fb2)[_0x60e7('0x25')](_0x3c8084);};}exports[_0x60e7('0x26')]=function(_0x24896b,_0xebd04c){var _0x9f4c09={},_0x311c17={},_0x532ab2={'count':0x0,'rows':[]};var _0xdc50fe=_['map'](db[_0x60e7('0x27')]['rawAttributes'],function(_0xdd5824){return{'name':_0xdd5824[_0x60e7('0x28')],'type':_0xdd5824[_0x60e7('0x29')][_0x60e7('0x2a')]};});_0x311c17[_0x60e7('0x2b')]=_[_0x60e7('0x2c')](_0xdc50fe,_0x60e7('0x24'));_0x311c17['query']=_[_0x60e7('0x2d')](_0x24896b['query']);_0x311c17[_0x60e7('0x2e')]=_[_0x60e7('0x2f')](_0x311c17[_0x60e7('0x2b')],_0x311c17[_0x60e7('0x30')]);_0x9f4c09[_0x60e7('0x31')]=_[_0x60e7('0x2f')](_0x311c17[_0x60e7('0x2b')],qs[_0x60e7('0x32')](_0x24896b['query'][_0x60e7('0x32')]));_0x9f4c09['attributes']=_0x9f4c09[_0x60e7('0x31')]['length']?_0x9f4c09['attributes']:_0x311c17['model'];if(!_0x24896b['query']['hasOwnProperty']('nolimit')){_0x9f4c09['limit']=qs[_0x60e7('0x18')](_0x24896b['query'][_0x60e7('0x18')]);_0x9f4c09[_0x60e7('0x1a')]=qs[_0x60e7('0x1a')](_0x24896b[_0x60e7('0x30')][_0x60e7('0x1a')]);}_0x9f4c09[_0x60e7('0x33')]=qs[_0x60e7('0x34')](_0x24896b[_0x60e7('0x30')][_0x60e7('0x34')]);_0x9f4c09['where']=qs[_0x60e7('0x2e')](_['pick'](_0x24896b[_0x60e7('0x30')],_0x311c17[_0x60e7('0x2e')]),_0xdc50fe);if(_0x24896b[_0x60e7('0x30')][_0x60e7('0x35')]){_0x9f4c09['where']=_[_0x60e7('0x36')](_0x9f4c09[_0x60e7('0x37')],{'$or':_[_0x60e7('0x2c')](_0xdc50fe,function(_0x1747e3){if(_0x1747e3[_0x60e7('0x29')]!==_0x60e7('0x38')){var _0x4c48f3={};_0x4c48f3[_0x1747e3[_0x60e7('0x24')]]={'$like':'%'+_0x24896b[_0x60e7('0x30')][_0x60e7('0x35')]+'%'};return _0x4c48f3;}})});}_0x9f4c09=_[_0x60e7('0x36')]({},_0x9f4c09,_0x24896b[_0x60e7('0x39')]);var _0x388187={'where':_0x9f4c09[_0x60e7('0x37')]};return db[_0x60e7('0x27')][_0x60e7('0x19')](_0x388187)[_0x60e7('0x20')](function(_0x2b949f){_0x532ab2[_0x60e7('0x19')]=_0x2b949f;if(_0x24896b[_0x60e7('0x30')][_0x60e7('0x3a')]){_0x9f4c09[_0x60e7('0x3b')]=[{'all':!![]}];}return db['ChatQueueReport']['findAll'](_0x9f4c09);})[_0x60e7('0x20')](function(_0x2899c0){_0x532ab2['rows']=_0x2899c0;return _0x532ab2;})[_0x60e7('0x20')](respondWithFilteredResult(_0xebd04c,_0x9f4c09))[_0x60e7('0x3c')](handleError(_0xebd04c,null));};exports[_0x60e7('0x3d')]=function(_0x2ec96e,_0x5dc8ce){var _0x16df05={'raw':!![],'where':{'id':_0x2ec96e[_0x60e7('0x3e')]['id']}},_0x186552={};_0x186552[_0x60e7('0x2b')]=_['keys'](db[_0x60e7('0x27')][_0x60e7('0x3f')]);_0x186552[_0x60e7('0x30')]=_[_0x60e7('0x2d')](_0x2ec96e[_0x60e7('0x30')]);_0x186552[_0x60e7('0x2e')]=_[_0x60e7('0x2f')](_0x186552[_0x60e7('0x2b')],_0x186552['query']);_0x16df05[_0x60e7('0x31')]=_[_0x60e7('0x2f')](_0x186552[_0x60e7('0x2b')],qs['fields'](_0x2ec96e[_0x60e7('0x30')][_0x60e7('0x32')]));_0x16df05['attributes']=_0x16df05[_0x60e7('0x31')]['length']?_0x16df05[_0x60e7('0x31')]:_0x186552['model'];if(_0x2ec96e[_0x60e7('0x30')]['includeAll']){_0x16df05[_0x60e7('0x3b')]=[{'all':!![]}];}_0x16df05=_[_0x60e7('0x36')]({},_0x16df05,_0x2ec96e[_0x60e7('0x39')]);return db[_0x60e7('0x27')][_0x60e7('0x40')](_0x16df05)[_0x60e7('0x20')](handleEntityNotFound(_0x5dc8ce,null))[_0x60e7('0x20')](respondWithResult(_0x5dc8ce,null))[_0x60e7('0x3c')](handleError(_0x5dc8ce,null));};exports['create']=function(_0x16762a,_0x46fe16){return db['ChatQueueReport']['create'](_0x16762a[_0x60e7('0x41')],{})['then'](respondWithResult(_0x46fe16,0xc9))[_0x60e7('0x3c')](handleError(_0x46fe16,null));};exports['update']=function(_0x59fef9,_0x52911b){if(_0x59fef9[_0x60e7('0x41')]['id']){delete _0x59fef9[_0x60e7('0x41')]['id'];}return db['ChatQueueReport']['find']({'where':{'id':_0x59fef9['params']['id']}})[_0x60e7('0x20')](handleEntityNotFound(_0x52911b,null))[_0x60e7('0x20')](saveUpdates(_0x59fef9[_0x60e7('0x41')],null))[_0x60e7('0x20')](respondWithResult(_0x52911b,null))[_0x60e7('0x3c')](handleError(_0x52911b,null));};exports[_0x60e7('0x21')]=function(_0x2c574d,_0x1a334d){return db['ChatQueueReport']['find']({'where':{'id':_0x2c574d[_0x60e7('0x3e')]['id']}})['then'](handleEntityNotFound(_0x1a334d,null))[_0x60e7('0x20')](removeEntity(_0x1a334d,null))[_0x60e7('0x3c')](handleError(_0x1a334d,null));};exports[_0x60e7('0x42')]=function(_0x13e25e,_0x4cd92c){return db['ChatQueueReport']['describe']()['then'](respondWithResult(_0x4cd92c,null))[_0x60e7('0x3c')](handleError(_0x4cd92c,null));};
\ No newline at end of file
+var _0x9fd4=['../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','index','map','ChatQueueReport','rawAttributes','type','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','merge','include','findAll','rows','catch','params','includeAll','options','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x38a7ac,_0x45514b){var _0x53061a=function(_0x1d2469){while(--_0x1d2469){_0x38a7ac['push'](_0x38a7ac['shift']());}};_0x53061a(++_0x45514b);}(_0x9fd4,0x16c));var _0x49fd=function(_0x24ecff,_0x5f0aca){_0x24ecff=_0x24ecff-0x0;var _0x38984c=_0x9fd4[_0x24ecff];return _0x38984c;};'use strict';var emlformat=require(_0x49fd('0x0'));var rimraf=require(_0x49fd('0x1'));var zipdir=require(_0x49fd('0x2'));var jsonpatch=require(_0x49fd('0x3'));var rp=require(_0x49fd('0x4'));var moment=require(_0x49fd('0x5'));var BPromise=require(_0x49fd('0x6'));var Mustache=require(_0x49fd('0x7'));var util=require(_0x49fd('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x49fd('0x9'));var ejs=require(_0x49fd('0xa'));var fs=require('fs');var fs_extra=require(_0x49fd('0xb'));var _=require(_0x49fd('0xc'));var squel=require('squel');var crypto=require(_0x49fd('0xd'));var jsforce=require(_0x49fd('0xe'));var deskjs=require(_0x49fd('0xf'));var toCsv=require(_0x49fd('0x9'));var querystring=require(_0x49fd('0x10'));var Papa=require('papaparse');var Redis=require(_0x49fd('0x11'));var authService=require(_0x49fd('0x12'));var qs=require(_0x49fd('0x13'));var as=require(_0x49fd('0x14'));var hardwareService=require(_0x49fd('0x15'));var logger=require(_0x49fd('0x16'))(_0x49fd('0x17'));var utils=require('../../config/utils');var config=require(_0x49fd('0x18'));var licenseUtil=require(_0x49fd('0x19'));var db=require(_0x49fd('0x1a'))['db'];function respondWithStatusCode(_0x40d1b0,_0x15dabd){_0x15dabd=_0x15dabd||0xcc;return function(_0x206bd8){if(_0x206bd8){return _0x40d1b0[_0x49fd('0x1b')](_0x15dabd);}return _0x40d1b0[_0x49fd('0x1c')](_0x15dabd)[_0x49fd('0x1d')]();};}function respondWithResult(_0x652890,_0x157b09){_0x157b09=_0x157b09||0xc8;return function(_0x44c18c){if(_0x44c18c){return _0x652890[_0x49fd('0x1c')](_0x157b09)[_0x49fd('0x1e')](_0x44c18c);}};}function respondWithFilteredResult(_0x264ab1,_0x201109){return function(_0x2859f2){if(_0x2859f2){var _0x3ca675=typeof _0x201109[_0x49fd('0x1f')]===_0x49fd('0x20')&&typeof _0x201109[_0x49fd('0x21')]===_0x49fd('0x20');var _0x320fe5=_0x2859f2[_0x49fd('0x22')];var _0xb55d24=_0x3ca675?0x0:_0x201109[_0x49fd('0x1f')];var _0x598793=_0x3ca675?_0x2859f2[_0x49fd('0x22')]:_0x201109[_0x49fd('0x1f')]+_0x201109['limit'];var _0x5c323a;if(_0x598793>=_0x320fe5){_0x598793=_0x320fe5;_0x5c323a=0xc8;}else{_0x5c323a=0xce;}_0x264ab1[_0x49fd('0x1c')](_0x5c323a);return _0x264ab1['set'](_0x49fd('0x23'),_0xb55d24+'-'+_0x598793+'/'+_0x320fe5)[_0x49fd('0x1e')](_0x2859f2);}return null;};}function patchUpdates(_0x599315){return function(_0xf7efcf){try{jsonpatch[_0x49fd('0x24')](_0xf7efcf,_0x599315,!![]);}catch(_0x5ae3bc){return BPromise[_0x49fd('0x25')](_0x5ae3bc);}return _0xf7efcf[_0x49fd('0x26')]();};}function saveUpdates(_0x2e1c40,_0x290f59){return function(_0x20fa0d){if(_0x20fa0d){return _0x20fa0d[_0x49fd('0x27')](_0x2e1c40)['then'](function(_0x46019d){return _0x46019d;});}return null;};}function removeEntity(_0xd43815,_0x8f202b){return function(_0x4bf811){if(_0x4bf811){return _0x4bf811[_0x49fd('0x28')]()[_0x49fd('0x29')](function(){_0xd43815[_0x49fd('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x597161,_0x497469){return function(_0x13c5a8){if(!_0x13c5a8){_0x597161[_0x49fd('0x1b')](0x194);}return _0x13c5a8;};}function handleError(_0x4ec190,_0x302ab2){_0x302ab2=_0x302ab2||0x1f4;return function(_0x9587b9){logger[_0x49fd('0x2a')](_0x9587b9[_0x49fd('0x2b')]);if(_0x9587b9[_0x49fd('0x2c')]){delete _0x9587b9['name'];}_0x4ec190[_0x49fd('0x1c')](_0x302ab2)['send'](_0x9587b9);};}exports[_0x49fd('0x2d')]=function(_0x89badc,_0x54acb5){var _0x203038={},_0x2c8568={},_0x23374c={'count':0x0,'rows':[]};var _0x43826f=_[_0x49fd('0x2e')](db[_0x49fd('0x2f')][_0x49fd('0x30')],function(_0x242203){return{'name':_0x242203['fieldName'],'type':_0x242203[_0x49fd('0x31')]['key']};});_0x2c8568[_0x49fd('0x32')]=_['map'](_0x43826f,_0x49fd('0x2c'));_0x2c8568[_0x49fd('0x33')]=_[_0x49fd('0x34')](_0x89badc['query']);_0x2c8568['filters']=_['intersection'](_0x2c8568[_0x49fd('0x32')],_0x2c8568[_0x49fd('0x33')]);_0x203038['attributes']=_[_0x49fd('0x35')](_0x2c8568['model'],qs['fields'](_0x89badc[_0x49fd('0x33')][_0x49fd('0x36')]));_0x203038[_0x49fd('0x37')]=_0x203038[_0x49fd('0x37')][_0x49fd('0x38')]?_0x203038['attributes']:_0x2c8568['model'];if(!_0x89badc[_0x49fd('0x33')][_0x49fd('0x39')](_0x49fd('0x3a'))){_0x203038[_0x49fd('0x21')]=qs['limit'](_0x89badc[_0x49fd('0x33')][_0x49fd('0x21')]);_0x203038[_0x49fd('0x1f')]=qs[_0x49fd('0x1f')](_0x89badc[_0x49fd('0x33')][_0x49fd('0x1f')]);}_0x203038[_0x49fd('0x3b')]=qs[_0x49fd('0x3c')](_0x89badc[_0x49fd('0x33')][_0x49fd('0x3c')]);_0x203038[_0x49fd('0x3d')]=qs['filters'](_[_0x49fd('0x3e')](_0x89badc[_0x49fd('0x33')],_0x2c8568[_0x49fd('0x3f')]),_0x43826f);if(_0x89badc[_0x49fd('0x33')][_0x49fd('0x40')]){_0x203038[_0x49fd('0x3d')]=_[_0x49fd('0x41')](_0x203038[_0x49fd('0x3d')],{'$or':_[_0x49fd('0x2e')](_0x43826f,function(_0x4a1856){if(_0x4a1856[_0x49fd('0x31')]!=='VIRTUAL'){var _0x46e84c={};_0x46e84c[_0x4a1856[_0x49fd('0x2c')]]={'$like':'%'+_0x89badc['query'][_0x49fd('0x40')]+'%'};return _0x46e84c;}})});}_0x203038=_[_0x49fd('0x41')]({},_0x203038,_0x89badc['options']);var _0x1f9a65={'where':_0x203038['where']};return db['ChatQueueReport']['count'](_0x1f9a65)[_0x49fd('0x29')](function(_0x32982e){_0x23374c[_0x49fd('0x22')]=_0x32982e;if(_0x89badc[_0x49fd('0x33')]['includeAll']){_0x203038[_0x49fd('0x42')]=[{'all':!![]}];}return db[_0x49fd('0x2f')][_0x49fd('0x43')](_0x203038);})[_0x49fd('0x29')](function(_0x115c5a){_0x23374c[_0x49fd('0x44')]=_0x115c5a;return _0x23374c;})[_0x49fd('0x29')](respondWithFilteredResult(_0x54acb5,_0x203038))[_0x49fd('0x45')](handleError(_0x54acb5,null));};exports['show']=function(_0x255a73,_0x2c8ab1){var _0x4dce94={'raw':!![],'where':{'id':_0x255a73[_0x49fd('0x46')]['id']}},_0x3be41b={};_0x3be41b['model']=_[_0x49fd('0x34')](db['ChatQueueReport'][_0x49fd('0x30')]);_0x3be41b[_0x49fd('0x33')]=_[_0x49fd('0x34')](_0x255a73[_0x49fd('0x33')]);_0x3be41b['filters']=_['intersection'](_0x3be41b[_0x49fd('0x32')],_0x3be41b['query']);_0x4dce94[_0x49fd('0x37')]=_[_0x49fd('0x35')](_0x3be41b[_0x49fd('0x32')],qs[_0x49fd('0x36')](_0x255a73['query'][_0x49fd('0x36')]));_0x4dce94[_0x49fd('0x37')]=_0x4dce94[_0x49fd('0x37')][_0x49fd('0x38')]?_0x4dce94[_0x49fd('0x37')]:_0x3be41b[_0x49fd('0x32')];if(_0x255a73[_0x49fd('0x33')][_0x49fd('0x47')]){_0x4dce94[_0x49fd('0x42')]=[{'all':!![]}];}_0x4dce94=_[_0x49fd('0x41')]({},_0x4dce94,_0x255a73[_0x49fd('0x48')]);return db[_0x49fd('0x2f')][_0x49fd('0x49')](_0x4dce94)[_0x49fd('0x29')](handleEntityNotFound(_0x2c8ab1,null))['then'](respondWithResult(_0x2c8ab1,null))['catch'](handleError(_0x2c8ab1,null));};exports[_0x49fd('0x4a')]=function(_0xa3518f,_0x42287e){return db[_0x49fd('0x2f')]['create'](_0xa3518f[_0x49fd('0x4b')],{})[_0x49fd('0x29')](respondWithResult(_0x42287e,0xc9))['catch'](handleError(_0x42287e,null));};exports[_0x49fd('0x27')]=function(_0x270360,_0xaac56f){if(_0x270360[_0x49fd('0x4b')]['id']){delete _0x270360[_0x49fd('0x4b')]['id'];}return db[_0x49fd('0x2f')][_0x49fd('0x49')]({'where':{'id':_0x270360[_0x49fd('0x46')]['id']}})[_0x49fd('0x29')](handleEntityNotFound(_0xaac56f,null))[_0x49fd('0x29')](saveUpdates(_0x270360[_0x49fd('0x4b')],null))['then'](respondWithResult(_0xaac56f,null))[_0x49fd('0x45')](handleError(_0xaac56f,null));};exports[_0x49fd('0x28')]=function(_0x32694b,_0x263cf3){return db[_0x49fd('0x2f')][_0x49fd('0x49')]({'where':{'id':_0x32694b['params']['id']}})['then'](handleEntityNotFound(_0x263cf3,null))[_0x49fd('0x29')](removeEntity(_0x263cf3,null))[_0x49fd('0x45')](handleError(_0x263cf3,null));};exports[_0x49fd('0x4c')]=function(_0x5c34c0,_0x31783f){return db[_0x49fd('0x2f')]['describe']()['then'](respondWithResult(_0x31783f,null))['catch'](handleError(_0x31783f,null));};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js
index deb8c7b..26ced51 100644
--- a/server/api/chatQueueReport/chatQueueReport.model.js
+++ b/server/api/chatQueueReport/chatQueueReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x757a=['report_chat_queue','uniqueid','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define'];(function(_0x29173b,_0x31c7f6){var _0xb3f709=function(_0x5f0ce4){while(--_0x5f0ce4){_0x29173b['push'](_0x29173b['shift']());}};_0xb3f709(++_0x31c7f6);}(_0x757a,0xde));var _0xa757=function(_0x29c3e3,_0x5a9636){_0x29c3e3=_0x29c3e3-0x0;var _0x3973b6=_0x757a[_0x29c3e3];return _0x3973b6;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('ChatQueueReport',attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[{'name':_0xa757('0xa'),'fields':[_0xa757('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb7e7=['../../config/logger','moment','request-promise','rimraf','../../config/environment','./chatQueueReport.attributes','define','ChatQueueReport','uniqueid','lodash'];(function(_0x310047,_0x13ebf5){var _0x2d3769=function(_0x403af6){while(--_0x403af6){_0x310047['push'](_0x310047['shift']());}};_0x2d3769(++_0x13ebf5);}(_0xb7e7,0x121));var _0x7b7e=function(_0x468b0f,_0x408566){_0x468b0f=_0x468b0f-0x0;var _0x3e74d9=_0xb7e7[_0x468b0f];return _0x3e74d9;};'use strict';var _=require(_0x7b7e('0x0'));var util=require('util');var logger=require(_0x7b7e('0x1'))('api');var moment=require(_0x7b7e('0x2'));var BPromise=require('bluebird');var rp=require(_0x7b7e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7b7e('0x4'));var config=require(_0x7b7e('0x5'));var attributes=require(_0x7b7e('0x6'));module['exports']=function(_0x53ed64,_0x333fa4){return _0x53ed64[_0x7b7e('0x7')](_0x7b7e('0x8'),attributes,{'tableName':'report_chat_queue','paranoid':![],'indexes':[{'name':_0x7b7e('0x9'),'fields':[_0x7b7e('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js
index 06c8913..e46ec4e 100644
--- a/server/api/chatQueueReport/chatQueueReport.rpc.js
+++ b/server/api/chatQueueReport/chatQueueReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x2739=['message','result','catch','CreateChatQueueReport','ChatQueueReport','create','options','then','UpdateChatQueueReport','update','raw','where','attributes','limit','info','lodash','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2739,0x8b));var _0x9273=function(_0x1acbea,_0x52c5b5){_0x1acbea=_0x1acbea-0x0;var _0x5e790a=_0x2739[_0x1acbea];return _0x5e790a;};'use strict';var _=require(_0x9273('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9273('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9273('0x2'));var logger=require(_0x9273('0x3'))('rpc');var config=require(_0x9273('0x4'));var jayson=require(_0x9273('0x5'));var client=jayson[_0x9273('0x6')][_0x9273('0x7')]({'port':0x232a});function respondWithRpcPromise(_0xfe2742,_0x2f56cb,_0x63aa14){return new BPromise(function(_0x5287b2,_0x82109d){return client[_0x9273('0x8')](_0xfe2742,_0x63aa14)['then'](function(_0x538c6f){logger['info'](_0x9273('0x9'),_0x2f56cb,_0x9273('0xa'));logger[_0x9273('0xb')](_0x9273('0xc'),_0x2f56cb,_0x9273('0xa'),JSON[_0x9273('0xd')](_0x538c6f));if(_0x538c6f[_0x9273('0xe')]){if(_0x538c6f[_0x9273('0xe')][_0x9273('0xf')]===0x1f4){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x2f56cb,_0x538c6f[_0x9273('0xe')][_0x9273('0x10')]);return _0x82109d(_0x538c6f[_0x9273('0xe')]['message']);}logger[_0x9273('0xe')]('ChatQueueReport,\x20%s,\x20%s',_0x2f56cb,_0x538c6f['error'][_0x9273('0x10')]);return _0x5287b2(_0x538c6f[_0x9273('0xe')][_0x9273('0x10')]);}else{logger['info'](_0x9273('0x9'),_0x2f56cb,_0x9273('0xa'));_0x5287b2(_0x538c6f[_0x9273('0x11')][_0x9273('0x10')]);}})[_0x9273('0x12')](function(_0x19cfa7){logger[_0x9273('0xe')](_0x9273('0x9'),_0x2f56cb,_0x19cfa7);_0x82109d(_0x19cfa7);});});}exports[_0x9273('0x13')]=function(_0x541da4){var _0x3f555a=this;return new Promise(function(_0x4f33df,_0x399cf4){return db[_0x9273('0x14')][_0x9273('0x15')](_0x541da4['body'],{'raw':_0x541da4['options']?_0x541da4[_0x9273('0x16')]['raw']===undefined?!![]:![]:!![]})[_0x9273('0x17')](function(_0xf612c5){logger['info']('CreateChatQueueReport',_0x541da4);logger[_0x9273('0xb')](_0x9273('0x13'),_0x541da4,JSON[_0x9273('0xd')](_0xf612c5));_0x4f33df(_0xf612c5);})['catch'](function(_0x5cbf21){logger[_0x9273('0xe')](_0x9273('0x13'),_0x5cbf21[_0x9273('0x10')],_0x541da4);_0x399cf4(_0x3f555a[_0x9273('0xe')](0x1f4,_0x5cbf21[_0x9273('0x10')]));});});};exports[_0x9273('0x18')]=function(_0x17b6f4){var _0x2632a5=this;return new Promise(function(_0x28131e,_0x4f42f2){return db[_0x9273('0x14')][_0x9273('0x19')](_0x17b6f4['body'],{'raw':_0x17b6f4[_0x9273('0x16')]?_0x17b6f4[_0x9273('0x16')][_0x9273('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x17b6f4[_0x9273('0x16')]?_0x17b6f4[_0x9273('0x16')][_0x9273('0x1b')]||null:null,'attributes':_0x17b6f4['options']?_0x17b6f4[_0x9273('0x16')][_0x9273('0x1c')]||null:null,'limit':_0x17b6f4[_0x9273('0x16')]?_0x17b6f4['options'][_0x9273('0x1d')]||null:null})[_0x9273('0x17')](function(_0x1dd207){logger[_0x9273('0x1e')](_0x9273('0x18'),_0x17b6f4);logger[_0x9273('0xb')](_0x9273('0x18'),_0x17b6f4,JSON[_0x9273('0xd')](_0x1dd207));_0x28131e(_0x1dd207);})[_0x9273('0x12')](function(_0x255424){logger[_0x9273('0xe')](_0x9273('0x18'),_0x255424[_0x9273('0x10')],_0x17b6f4);_0x4f42f2(_0x2632a5[_0x9273('0xe')](0x1f4,_0x255424[_0x9273('0x10')]));});});};
\ No newline at end of file
+var _0x0b70=['message','info','result','catch','CreateChatQueueReport','create','options','raw','stringify','ChatQueueReport','update','body','where','attributes','limit','UpdateChatQueueReport','debug','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','error'];(function(_0x1108a6,_0x4e95d1){var _0x16f052=function(_0xea5be9){while(--_0xea5be9){_0x1108a6['push'](_0x1108a6['shift']());}};_0x16f052(++_0x4e95d1);}(_0x0b70,0x192));var _0x00b7=function(_0x864d71,_0x29fc0e){_0x864d71=_0x864d71-0x0;var _0x16995b=_0x0b70[_0x864d71];return _0x16995b;};'use strict';var _=require(_0x00b7('0x0'));var util=require(_0x00b7('0x1'));var moment=require(_0x00b7('0x2'));var BPromise=require(_0x00b7('0x3'));var rs=require(_0x00b7('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x00b7('0x5'))['db'];var utils=require(_0x00b7('0x6'));var logger=require(_0x00b7('0x7'))(_0x00b7('0x8'));var config=require(_0x00b7('0x9'));var jayson=require(_0x00b7('0xa'));var client=jayson[_0x00b7('0xb')][_0x00b7('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x21b2d8,_0x503c52,_0x351fc5){return new BPromise(function(_0x227f71,_0x1334bd){return client['request'](_0x21b2d8,_0x351fc5)[_0x00b7('0xd')](function(_0x39d23b){logger['info'](_0x00b7('0xe'),_0x503c52,_0x00b7('0xf'));logger['debug'](_0x00b7('0x10'),_0x503c52,_0x00b7('0xf'),JSON['stringify'](_0x39d23b));if(_0x39d23b[_0x00b7('0x11')]){if(_0x39d23b[_0x00b7('0x11')]['code']===0x1f4){logger[_0x00b7('0x11')]('ChatQueueReport,\x20%s,\x20%s',_0x503c52,_0x39d23b[_0x00b7('0x11')]['message']);return _0x1334bd(_0x39d23b[_0x00b7('0x11')][_0x00b7('0x12')]);}logger['error'](_0x00b7('0xe'),_0x503c52,_0x39d23b['error'][_0x00b7('0x12')]);return _0x227f71(_0x39d23b['error'][_0x00b7('0x12')]);}else{logger[_0x00b7('0x13')](_0x00b7('0xe'),_0x503c52,_0x00b7('0xf'));_0x227f71(_0x39d23b[_0x00b7('0x14')][_0x00b7('0x12')]);}})[_0x00b7('0x15')](function(_0x24ec85){logger[_0x00b7('0x11')](_0x00b7('0xe'),_0x503c52,_0x24ec85);_0x1334bd(_0x24ec85);});});}exports[_0x00b7('0x16')]=function(_0x12cff7){var _0xbe4568=this;return new Promise(function(_0x5bb64e,_0x5b3aa3){return db['ChatQueueReport'][_0x00b7('0x17')](_0x12cff7['body'],{'raw':_0x12cff7[_0x00b7('0x18')]?_0x12cff7[_0x00b7('0x18')][_0x00b7('0x19')]===undefined?!![]:![]:!![]})[_0x00b7('0xd')](function(_0x2829e3){logger[_0x00b7('0x13')](_0x00b7('0x16'),_0x12cff7);logger['debug'](_0x00b7('0x16'),_0x12cff7,JSON[_0x00b7('0x1a')](_0x2829e3));_0x5bb64e(_0x2829e3);})['catch'](function(_0x245c2e){logger[_0x00b7('0x11')](_0x00b7('0x16'),_0x245c2e[_0x00b7('0x12')],_0x12cff7);_0x5b3aa3(_0xbe4568['error'](0x1f4,_0x245c2e[_0x00b7('0x12')]));});});};exports['UpdateChatQueueReport']=function(_0x2ae06c){var _0x4b1960=this;return new Promise(function(_0x51db13,_0x2fcb3b){return db[_0x00b7('0x1b')][_0x00b7('0x1c')](_0x2ae06c[_0x00b7('0x1d')],{'raw':_0x2ae06c[_0x00b7('0x18')]?_0x2ae06c[_0x00b7('0x18')][_0x00b7('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2ae06c[_0x00b7('0x18')]?_0x2ae06c['options'][_0x00b7('0x1e')]||null:null,'attributes':_0x2ae06c[_0x00b7('0x18')]?_0x2ae06c[_0x00b7('0x18')][_0x00b7('0x1f')]||null:null,'limit':_0x2ae06c['options']?_0x2ae06c[_0x00b7('0x18')][_0x00b7('0x20')]||null:null})[_0x00b7('0xd')](function(_0x434387){logger[_0x00b7('0x13')](_0x00b7('0x21'),_0x2ae06c);logger[_0x00b7('0x22')](_0x00b7('0x21'),_0x2ae06c,JSON['stringify'](_0x434387));_0x51db13(_0x434387);})['catch'](function(_0x411142){logger[_0x00b7('0x11')](_0x00b7('0x21'),_0x411142[_0x00b7('0x12')],_0x2ae06c);_0x2fcb3b(_0x4b1960[_0x00b7('0x11')](0x1f4,_0x411142[_0x00b7('0x12')]));});});};
\ No newline at end of file
diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js
index 2e3d112..839bc08 100644
--- a/server/api/chatQueueReport/index.js
+++ b/server/api/chatQueueReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x7f85=['../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','index','/describe','describe','show','isAuthenticated','create','/:id','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x47631c,_0x39f5ca){var _0x773db2=function(_0x1dfbbb){while(--_0x1dfbbb){_0x47631c['push'](_0x47631c['shift']());}};_0x773db2(++_0x39f5ca);}(_0x7f85,0x173));var _0x57f8=function(_0x361b7e,_0x2d6399){_0x361b7e=_0x361b7e-0x0;var _0x37448e=_0x7f85[_0x361b7e];return _0x37448e;};'use strict';var multer=require(_0x57f8('0x0'));var util=require(_0x57f8('0x1'));var path=require(_0x57f8('0x2'));var timeout=require(_0x57f8('0x3'));var express=require(_0x57f8('0x4'));var router=express[_0x57f8('0x5')]();var fs_extra=require(_0x57f8('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x57f8('0x7'));var config=require(_0x57f8('0x8'));var controller=require(_0x57f8('0x9'));router[_0x57f8('0xa')]('/',auth['isAuthenticated'](),controller[_0x57f8('0xb')]);router['get'](_0x57f8('0xc'),auth['isAuthenticated'](),controller[_0x57f8('0xd')]);router[_0x57f8('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x57f8('0xe')]);router['post']('/',auth[_0x57f8('0xf')](),controller[_0x57f8('0x10')]);router['put'](_0x57f8('0x11'),auth[_0x57f8('0xf')](),controller[_0x57f8('0x12')]);router[_0x57f8('0x13')](_0x57f8('0x11'),auth[_0x57f8('0xf')](),controller['destroy']);module[_0x57f8('0x14')]=router;
\ No newline at end of file
+var _0x91e0=['./chatQueueReport.controller','get','index','/describe','isAuthenticated','describe','show','post','create','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra'];(function(_0x106dd8,_0x5e9554){var _0x2b9d96=function(_0x100192){while(--_0x100192){_0x106dd8['push'](_0x106dd8['shift']());}};_0x2b9d96(++_0x5e9554);}(_0x91e0,0x18a));var _0x091e=function(_0x200124,_0x4d3921){_0x200124=_0x200124-0x0;var _0x231e13=_0x91e0[_0x200124];return _0x231e13;};'use strict';var multer=require(_0x091e('0x0'));var util=require(_0x091e('0x1'));var path=require(_0x091e('0x2'));var timeout=require(_0x091e('0x3'));var express=require('express');var router=express[_0x091e('0x4')]();var fs_extra=require(_0x091e('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x091e('0x6'));router[_0x091e('0x7')]('/',auth['isAuthenticated'](),controller[_0x091e('0x8')]);router[_0x091e('0x7')](_0x091e('0x9'),auth[_0x091e('0xa')](),controller[_0x091e('0xb')]);router[_0x091e('0x7')]('/:id',auth[_0x091e('0xa')](),controller[_0x091e('0xc')]);router[_0x091e('0xd')]('/',auth[_0x091e('0xa')](),controller[_0x091e('0xe')]);router['put'](_0x091e('0xf'),auth['isAuthenticated'](),controller[_0x091e('0x10')]);router[_0x091e('0x11')](_0x091e('0xf'),auth[_0x091e('0xa')](),controller[_0x091e('0x12')]);module[_0x091e('0x13')]=router;
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js
index b850717..5f33f6b 100644
--- a/server/api/chatTransferReport/chatTransferReport.attributes.js
+++ b/server/api/chatTransferReport/chatTransferReport.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa9e0=['account','queue','DATE','NOW','moment','sequelize','exports'];(function(_0x783834,_0x38c810){var _0x22055f=function(_0x6a6998){while(--_0x6a6998){_0x783834['push'](_0x783834['shift']());}};_0x22055f(++_0x38c810);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0xa9e0[_0x4baae2];return _0x1a2285;};'use strict';var moment=require(_0x0a9e('0x0'));var Sequelize=require(_0x0a9e('0x1'));module[_0x0a9e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x3'),'agent',_0x0a9e('0x4')),'allowNull':![],'defaultValue':_0x0a9e('0x4')},'transferredAt':{'type':Sequelize[_0x0a9e('0x5')],'allowNull':![],'defaultValue':Sequelize[_0x0a9e('0x6')]}};
\ No newline at end of file
+var _0xb43b=['DATE','NOW','moment','sequelize','STRING','ENUM','account','queue'];(function(_0x2e4aa2,_0x11956a){var _0x5e6092=function(_0x4c12c2){while(--_0x4c12c2){_0x2e4aa2['push'](_0x2e4aa2['shift']());}};_0x5e6092(++_0x11956a);}(_0xb43b,0x1b2));var _0xbb43=function(_0x431152,_0x311883){_0x431152=_0x431152-0x0;var _0x3fe0e0=_0xb43b[_0x431152];return _0x3fe0e0;};'use strict';var moment=require(_0xbb43('0x0'));var Sequelize=require(_0xbb43('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xbb43('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xbb43('0x3')](_0xbb43('0x4'),'agent',_0xbb43('0x5')),'allowNull':![],'defaultValue':_0xbb43('0x5')},'transferredAt':{'type':Sequelize[_0xbb43('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xbb43('0x7')]}};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js
index fb5bfe9..b10a3cd 100644
--- a/server/api/chatTransferReport/chatTransferReport.controller.js
+++ b/server/api/chatTransferReport/chatTransferReport.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xad29=['nolimit','order','sort','where','filter','merge','options','includeAll','include','findAll','rows','find','catch','body','params','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','name','index','map','ChatTransferReport','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xad29,0xe7));var _0x9ad2=function(_0x552c27,_0x478dc2){_0x552c27=_0x552c27-0x0;var _0x2a0922=_0xad29[_0x552c27];return _0x2a0922;};'use strict';var emlformat=require(_0x9ad2('0x0'));var rimraf=require(_0x9ad2('0x1'));var zipdir=require(_0x9ad2('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9ad2('0x3'));var moment=require(_0x9ad2('0x4'));var BPromise=require(_0x9ad2('0x5'));var Mustache=require(_0x9ad2('0x6'));var util=require(_0x9ad2('0x7'));var path=require(_0x9ad2('0x8'));var sox=require(_0x9ad2('0x9'));var csv=require(_0x9ad2('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9ad2('0xb'));var _=require(_0x9ad2('0xc'));var squel=require('squel');var crypto=require(_0x9ad2('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x9ad2('0xa'));var querystring=require(_0x9ad2('0xe'));var Papa=require(_0x9ad2('0xf'));var Redis=require(_0x9ad2('0x10'));var authService=require(_0x9ad2('0x11'));var qs=require(_0x9ad2('0x12'));var as=require(_0x9ad2('0x13'));var hardwareService=require(_0x9ad2('0x14'));var logger=require('../../config/logger')(_0x9ad2('0x15'));var utils=require(_0x9ad2('0x16'));var config=require(_0x9ad2('0x17'));var licenseUtil=require(_0x9ad2('0x18'));var db=require(_0x9ad2('0x19'))['db'];function respondWithStatusCode(_0x166857,_0x14abfa){_0x14abfa=_0x14abfa||0xcc;return function(_0xe78ede){if(_0xe78ede){return _0x166857[_0x9ad2('0x1a')](_0x14abfa);}return _0x166857['status'](_0x14abfa)[_0x9ad2('0x1b')]();};}function respondWithResult(_0x3db5a7,_0x3540ad){_0x3540ad=_0x3540ad||0xc8;return function(_0xc135c8){if(_0xc135c8){return _0x3db5a7[_0x9ad2('0x1c')](_0x3540ad)[_0x9ad2('0x1d')](_0xc135c8);}};}function respondWithFilteredResult(_0x3af1a0,_0x741154){return function(_0x2fa845){if(_0x2fa845){var _0x268c5f=typeof _0x741154[_0x9ad2('0x1e')]===_0x9ad2('0x1f')&&typeof _0x741154[_0x9ad2('0x20')]===_0x9ad2('0x1f');var _0x380620=_0x2fa845[_0x9ad2('0x21')];var _0x57b72c=_0x268c5f?0x0:_0x741154[_0x9ad2('0x1e')];var _0x4fc3af=_0x268c5f?_0x2fa845['count']:_0x741154[_0x9ad2('0x1e')]+_0x741154[_0x9ad2('0x20')];var _0x16492b;if(_0x4fc3af>=_0x380620){_0x4fc3af=_0x380620;_0x16492b=0xc8;}else{_0x16492b=0xce;}_0x3af1a0[_0x9ad2('0x1c')](_0x16492b);return _0x3af1a0[_0x9ad2('0x22')](_0x9ad2('0x23'),_0x57b72c+'-'+_0x4fc3af+'/'+_0x380620)[_0x9ad2('0x1d')](_0x2fa845);}return null;};}function patchUpdates(_0x4d5045){return function(_0x471eca){try{jsonpatch['apply'](_0x471eca,_0x4d5045,!![]);}catch(_0x99e30e){return BPromise[_0x9ad2('0x24')](_0x99e30e);}return _0x471eca[_0x9ad2('0x25')]();};}function saveUpdates(_0x54514f,_0x2933a1){return function(_0x425e56){if(_0x425e56){return _0x425e56[_0x9ad2('0x26')](_0x54514f)[_0x9ad2('0x27')](function(_0x591563){return _0x591563;});}return null;};}function removeEntity(_0x3514fe,_0x4a5684){return function(_0x276edc){if(_0x276edc){return _0x276edc[_0x9ad2('0x28')]()[_0x9ad2('0x27')](function(){_0x3514fe[_0x9ad2('0x1c')](0xcc)[_0x9ad2('0x1b')]();});}};}function handleEntityNotFound(_0x31b299,_0x602795){return function(_0x2c030a){if(!_0x2c030a){_0x31b299[_0x9ad2('0x1a')](0x194);}return _0x2c030a;};}function handleError(_0xcbaca6,_0x65b942){_0x65b942=_0x65b942||0x1f4;return function(_0x573aaf){logger['error'](_0x573aaf['stack']);if(_0x573aaf[_0x9ad2('0x29')]){delete _0x573aaf[_0x9ad2('0x29')];}_0xcbaca6[_0x9ad2('0x1c')](_0x65b942)['send'](_0x573aaf);};}exports[_0x9ad2('0x2a')]=function(_0x4131dc,_0x302cce){var _0x58e079={},_0x300e69={},_0x63d608={'count':0x0,'rows':[]};var _0x390ffe=_[_0x9ad2('0x2b')](db[_0x9ad2('0x2c')][_0x9ad2('0x2d')],function(_0x2a93fe){return{'name':_0x2a93fe[_0x9ad2('0x2e')],'type':_0x2a93fe[_0x9ad2('0x2f')]['key']};});_0x300e69[_0x9ad2('0x30')]=_['map'](_0x390ffe,_0x9ad2('0x29'));_0x300e69[_0x9ad2('0x31')]=_[_0x9ad2('0x32')](_0x4131dc[_0x9ad2('0x31')]);_0x300e69[_0x9ad2('0x33')]=_[_0x9ad2('0x34')](_0x300e69[_0x9ad2('0x30')],_0x300e69[_0x9ad2('0x31')]);_0x58e079[_0x9ad2('0x35')]=_['intersection'](_0x300e69[_0x9ad2('0x30')],qs[_0x9ad2('0x36')](_0x4131dc[_0x9ad2('0x31')][_0x9ad2('0x36')]));_0x58e079[_0x9ad2('0x35')]=_0x58e079['attributes'][_0x9ad2('0x37')]?_0x58e079[_0x9ad2('0x35')]:_0x300e69[_0x9ad2('0x30')];if(!_0x4131dc['query'][_0x9ad2('0x38')](_0x9ad2('0x39'))){_0x58e079[_0x9ad2('0x20')]=qs[_0x9ad2('0x20')](_0x4131dc[_0x9ad2('0x31')][_0x9ad2('0x20')]);_0x58e079[_0x9ad2('0x1e')]=qs['offset'](_0x4131dc[_0x9ad2('0x31')][_0x9ad2('0x1e')]);}_0x58e079[_0x9ad2('0x3a')]=qs[_0x9ad2('0x3b')](_0x4131dc[_0x9ad2('0x31')][_0x9ad2('0x3b')]);_0x58e079[_0x9ad2('0x3c')]=qs[_0x9ad2('0x33')](_['pick'](_0x4131dc[_0x9ad2('0x31')],_0x300e69['filters']),_0x390ffe);if(_0x4131dc[_0x9ad2('0x31')][_0x9ad2('0x3d')]){_0x58e079[_0x9ad2('0x3c')]=_[_0x9ad2('0x3e')](_0x58e079[_0x9ad2('0x3c')],{'$or':_[_0x9ad2('0x2b')](_0x390ffe,function(_0x41d941){if(_0x41d941['type']!=='VIRTUAL'){var _0xab1bc3={};_0xab1bc3[_0x41d941[_0x9ad2('0x29')]]={'$like':'%'+_0x4131dc['query']['filter']+'%'};return _0xab1bc3;}})});}_0x58e079=_[_0x9ad2('0x3e')]({},_0x58e079,_0x4131dc[_0x9ad2('0x3f')]);var _0x1bb92f={'where':_0x58e079[_0x9ad2('0x3c')]};return db[_0x9ad2('0x2c')][_0x9ad2('0x21')](_0x1bb92f)['then'](function(_0x446d44){_0x63d608[_0x9ad2('0x21')]=_0x446d44;if(_0x4131dc[_0x9ad2('0x31')][_0x9ad2('0x40')]){_0x58e079[_0x9ad2('0x41')]=[{'all':!![]}];}return db['ChatTransferReport'][_0x9ad2('0x42')](_0x58e079);})[_0x9ad2('0x27')](function(_0x1ff8ba){_0x63d608[_0x9ad2('0x43')]=_0x1ff8ba;return _0x63d608;})['then'](respondWithFilteredResult(_0x302cce,_0x58e079))['catch'](handleError(_0x302cce,null));};exports['show']=function(_0x104535,_0x4518b7){var _0xb1f06b={'raw':!![],'where':{'id':_0x104535['params']['id']}},_0x315328={};_0x315328['model']=_['keys'](db[_0x9ad2('0x2c')][_0x9ad2('0x2d')]);_0x315328[_0x9ad2('0x31')]=_[_0x9ad2('0x32')](_0x104535['query']);_0x315328[_0x9ad2('0x33')]=_['intersection'](_0x315328['model'],_0x315328['query']);_0xb1f06b[_0x9ad2('0x35')]=_['intersection'](_0x315328[_0x9ad2('0x30')],qs[_0x9ad2('0x36')](_0x104535[_0x9ad2('0x31')][_0x9ad2('0x36')]));_0xb1f06b[_0x9ad2('0x35')]=_0xb1f06b['attributes'][_0x9ad2('0x37')]?_0xb1f06b[_0x9ad2('0x35')]:_0x315328[_0x9ad2('0x30')];if(_0x104535[_0x9ad2('0x31')][_0x9ad2('0x40')]){_0xb1f06b['include']=[{'all':!![]}];}_0xb1f06b=_[_0x9ad2('0x3e')]({},_0xb1f06b,_0x104535[_0x9ad2('0x3f')]);return db['ChatTransferReport'][_0x9ad2('0x44')](_0xb1f06b)[_0x9ad2('0x27')](handleEntityNotFound(_0x4518b7,null))[_0x9ad2('0x27')](respondWithResult(_0x4518b7,null))[_0x9ad2('0x45')](handleError(_0x4518b7,null));};exports['create']=function(_0x5c72e8,_0x441577){return db[_0x9ad2('0x2c')]['create'](_0x5c72e8[_0x9ad2('0x46')],{})[_0x9ad2('0x27')](respondWithResult(_0x441577,0xc9))['catch'](handleError(_0x441577,null));};exports[_0x9ad2('0x26')]=function(_0x54370d,_0xddb0d0){if(_0x54370d[_0x9ad2('0x46')]['id']){delete _0x54370d[_0x9ad2('0x46')]['id'];}return db[_0x9ad2('0x2c')][_0x9ad2('0x44')]({'where':{'id':_0x54370d[_0x9ad2('0x47')]['id']}})[_0x9ad2('0x27')](handleEntityNotFound(_0xddb0d0,null))[_0x9ad2('0x27')](saveUpdates(_0x54370d[_0x9ad2('0x46')],null))['then'](respondWithResult(_0xddb0d0,null))['catch'](handleError(_0xddb0d0,null));};exports[_0x9ad2('0x28')]=function(_0x22d2c8,_0x32c68c){return db[_0x9ad2('0x2c')]['find']({'where':{'id':_0x22d2c8[_0x9ad2('0x47')]['id']}})[_0x9ad2('0x27')](handleEntityNotFound(_0x32c68c,null))[_0x9ad2('0x27')](removeEntity(_0x32c68c,null))['catch'](handleError(_0x32c68c,null));};exports['describe']=function(_0x5b0039,_0x3a78e9){return db[_0x9ad2('0x2c')]['describe']()[_0x9ad2('0x27')](respondWithResult(_0x3a78e9,null))[_0x9ad2('0x45')](handleError(_0x3a78e9,null));};
\ No newline at end of file
+var _0xbfeb=['../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','ChatTransferReport','rawAttributes','type','key','model','map','keys','query','attributes','intersection','fields','length','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','merge','options','includeAll','include','findAll','rows','params','find','create','body','catch','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils'];(function(_0x4d6941,_0x1329da){var _0x35543d=function(_0x25e8ec){while(--_0x25e8ec){_0x4d6941['push'](_0x4d6941['shift']());}};_0x35543d(++_0x1329da);}(_0xbfeb,0x1c3));var _0xbbfe=function(_0x20ce28,_0x5195fb){_0x20ce28=_0x20ce28-0x0;var _0x58d983=_0xbfeb[_0x20ce28];return _0x58d983;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbbfe('0x0'));var zipdir=require(_0xbbfe('0x1'));var jsonpatch=require(_0xbbfe('0x2'));var rp=require(_0xbbfe('0x3'));var moment=require('moment');var BPromise=require(_0xbbfe('0x4'));var Mustache=require(_0xbbfe('0x5'));var util=require(_0xbbfe('0x6'));var path=require(_0xbbfe('0x7'));var sox=require(_0xbbfe('0x8'));var csv=require(_0xbbfe('0x9'));var ejs=require(_0xbbfe('0xa'));var fs=require('fs');var fs_extra=require(_0xbbfe('0xb'));var _=require(_0xbbfe('0xc'));var squel=require(_0xbbfe('0xd'));var crypto=require(_0xbbfe('0xe'));var jsforce=require(_0xbbfe('0xf'));var deskjs=require(_0xbbfe('0x10'));var toCsv=require('to-csv');var querystring=require(_0xbbfe('0x11'));var Papa=require('papaparse');var Redis=require(_0xbbfe('0x12'));var authService=require(_0xbbfe('0x13'));var qs=require(_0xbbfe('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xbbfe('0x15'))('api');var utils=require(_0xbbfe('0x16'));var config=require(_0xbbfe('0x17'));var licenseUtil=require(_0xbbfe('0x18'));var db=require(_0xbbfe('0x19'))['db'];function respondWithStatusCode(_0x90c2a7,_0x2776bb){_0x2776bb=_0x2776bb||0xcc;return function(_0x1b5c79){if(_0x1b5c79){return _0x90c2a7[_0xbbfe('0x1a')](_0x2776bb);}return _0x90c2a7['status'](_0x2776bb)[_0xbbfe('0x1b')]();};}function respondWithResult(_0x599bc9,_0x4abde4){_0x4abde4=_0x4abde4||0xc8;return function(_0x2a3760){if(_0x2a3760){return _0x599bc9[_0xbbfe('0x1c')](_0x4abde4)[_0xbbfe('0x1d')](_0x2a3760);}};}function respondWithFilteredResult(_0x3dea50,_0x47af44){return function(_0x547c15){if(_0x547c15){var _0x5d5bd2=typeof _0x47af44[_0xbbfe('0x1e')]===_0xbbfe('0x1f')&&typeof _0x47af44[_0xbbfe('0x20')]===_0xbbfe('0x1f');var _0x1f6a2a=_0x547c15[_0xbbfe('0x21')];var _0x2325df=_0x5d5bd2?0x0:_0x47af44[_0xbbfe('0x1e')];var _0x52de01=_0x5d5bd2?_0x547c15[_0xbbfe('0x21')]:_0x47af44[_0xbbfe('0x1e')]+_0x47af44[_0xbbfe('0x20')];var _0x3bdda6;if(_0x52de01>=_0x1f6a2a){_0x52de01=_0x1f6a2a;_0x3bdda6=0xc8;}else{_0x3bdda6=0xce;}_0x3dea50[_0xbbfe('0x1c')](_0x3bdda6);return _0x3dea50[_0xbbfe('0x22')](_0xbbfe('0x23'),_0x2325df+'-'+_0x52de01+'/'+_0x1f6a2a)[_0xbbfe('0x1d')](_0x547c15);}return null;};}function patchUpdates(_0x5013ff){return function(_0x33ca6d){try{jsonpatch[_0xbbfe('0x24')](_0x33ca6d,_0x5013ff,!![]);}catch(_0xeff19){return BPromise[_0xbbfe('0x25')](_0xeff19);}return _0x33ca6d[_0xbbfe('0x26')]();};}function saveUpdates(_0x4f1f7d,_0x2ae5bb){return function(_0x3661cc){if(_0x3661cc){return _0x3661cc[_0xbbfe('0x27')](_0x4f1f7d)[_0xbbfe('0x28')](function(_0x50aee1){return _0x50aee1;});}return null;};}function removeEntity(_0x4ccf81,_0x702f6b){return function(_0x5e40b6){if(_0x5e40b6){return _0x5e40b6[_0xbbfe('0x29')]()[_0xbbfe('0x28')](function(){_0x4ccf81['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4c4c70,_0x3cd7a3){return function(_0x5a741b){if(!_0x5a741b){_0x4c4c70[_0xbbfe('0x1a')](0x194);}return _0x5a741b;};}function handleError(_0x3351ba,_0x2c1b94){_0x2c1b94=_0x2c1b94||0x1f4;return function(_0x4c3120){logger[_0xbbfe('0x2a')](_0x4c3120[_0xbbfe('0x2b')]);if(_0x4c3120[_0xbbfe('0x2c')]){delete _0x4c3120[_0xbbfe('0x2c')];}_0x3351ba['status'](_0x2c1b94)[_0xbbfe('0x2d')](_0x4c3120);};}exports[_0xbbfe('0x2e')]=function(_0x56c2f8,_0x4ba369){var _0x138edf={},_0x1d8109={},_0x89e6d0={'count':0x0,'rows':[]};var _0x5e7c85=_['map'](db[_0xbbfe('0x2f')][_0xbbfe('0x30')],function(_0x531399){return{'name':_0x531399['fieldName'],'type':_0x531399[_0xbbfe('0x31')][_0xbbfe('0x32')]};});_0x1d8109[_0xbbfe('0x33')]=_[_0xbbfe('0x34')](_0x5e7c85,_0xbbfe('0x2c'));_0x1d8109['query']=_[_0xbbfe('0x35')](_0x56c2f8[_0xbbfe('0x36')]);_0x1d8109['filters']=_['intersection'](_0x1d8109['model'],_0x1d8109[_0xbbfe('0x36')]);_0x138edf[_0xbbfe('0x37')]=_[_0xbbfe('0x38')](_0x1d8109[_0xbbfe('0x33')],qs[_0xbbfe('0x39')](_0x56c2f8[_0xbbfe('0x36')][_0xbbfe('0x39')]));_0x138edf['attributes']=_0x138edf[_0xbbfe('0x37')][_0xbbfe('0x3a')]?_0x138edf[_0xbbfe('0x37')]:_0x1d8109['model'];if(!_0x56c2f8[_0xbbfe('0x36')]['hasOwnProperty'](_0xbbfe('0x3b'))){_0x138edf[_0xbbfe('0x20')]=qs[_0xbbfe('0x20')](_0x56c2f8[_0xbbfe('0x36')][_0xbbfe('0x20')]);_0x138edf[_0xbbfe('0x1e')]=qs[_0xbbfe('0x1e')](_0x56c2f8['query'][_0xbbfe('0x1e')]);}_0x138edf[_0xbbfe('0x3c')]=qs[_0xbbfe('0x3d')](_0x56c2f8['query'][_0xbbfe('0x3d')]);_0x138edf['where']=qs[_0xbbfe('0x3e')](_[_0xbbfe('0x3f')](_0x56c2f8[_0xbbfe('0x36')],_0x1d8109[_0xbbfe('0x3e')]),_0x5e7c85);if(_0x56c2f8[_0xbbfe('0x36')][_0xbbfe('0x40')]){_0x138edf['where']=_['merge'](_0x138edf[_0xbbfe('0x41')],{'$or':_[_0xbbfe('0x34')](_0x5e7c85,function(_0xc2d7a6){if(_0xc2d7a6[_0xbbfe('0x31')]!==_0xbbfe('0x42')){var _0x11e4f8={};_0x11e4f8[_0xc2d7a6[_0xbbfe('0x2c')]]={'$like':'%'+_0x56c2f8[_0xbbfe('0x36')]['filter']+'%'};return _0x11e4f8;}})});}_0x138edf=_[_0xbbfe('0x43')]({},_0x138edf,_0x56c2f8[_0xbbfe('0x44')]);var _0xef3023={'where':_0x138edf[_0xbbfe('0x41')]};return db[_0xbbfe('0x2f')][_0xbbfe('0x21')](_0xef3023)[_0xbbfe('0x28')](function(_0x48b63a){_0x89e6d0['count']=_0x48b63a;if(_0x56c2f8['query'][_0xbbfe('0x45')]){_0x138edf[_0xbbfe('0x46')]=[{'all':!![]}];}return db[_0xbbfe('0x2f')][_0xbbfe('0x47')](_0x138edf);})[_0xbbfe('0x28')](function(_0x2aec06){_0x89e6d0[_0xbbfe('0x48')]=_0x2aec06;return _0x89e6d0;})[_0xbbfe('0x28')](respondWithFilteredResult(_0x4ba369,_0x138edf))['catch'](handleError(_0x4ba369,null));};exports['show']=function(_0x34ac7f,_0x48df43){var _0x5cf895={'raw':!![],'where':{'id':_0x34ac7f[_0xbbfe('0x49')]['id']}},_0x6b76b={};_0x6b76b[_0xbbfe('0x33')]=_['keys'](db[_0xbbfe('0x2f')][_0xbbfe('0x30')]);_0x6b76b[_0xbbfe('0x36')]=_[_0xbbfe('0x35')](_0x34ac7f['query']);_0x6b76b[_0xbbfe('0x3e')]=_[_0xbbfe('0x38')](_0x6b76b[_0xbbfe('0x33')],_0x6b76b[_0xbbfe('0x36')]);_0x5cf895[_0xbbfe('0x37')]=_['intersection'](_0x6b76b[_0xbbfe('0x33')],qs[_0xbbfe('0x39')](_0x34ac7f[_0xbbfe('0x36')][_0xbbfe('0x39')]));_0x5cf895[_0xbbfe('0x37')]=_0x5cf895[_0xbbfe('0x37')][_0xbbfe('0x3a')]?_0x5cf895[_0xbbfe('0x37')]:_0x6b76b['model'];if(_0x34ac7f[_0xbbfe('0x36')][_0xbbfe('0x45')]){_0x5cf895[_0xbbfe('0x46')]=[{'all':!![]}];}_0x5cf895=_[_0xbbfe('0x43')]({},_0x5cf895,_0x34ac7f['options']);return db[_0xbbfe('0x2f')][_0xbbfe('0x4a')](_0x5cf895)[_0xbbfe('0x28')](handleEntityNotFound(_0x48df43,null))[_0xbbfe('0x28')](respondWithResult(_0x48df43,null))['catch'](handleError(_0x48df43,null));};exports[_0xbbfe('0x4b')]=function(_0x5502d,_0x5e7fc9){return db['ChatTransferReport']['create'](_0x5502d[_0xbbfe('0x4c')],{})['then'](respondWithResult(_0x5e7fc9,0xc9))['catch'](handleError(_0x5e7fc9,null));};exports[_0xbbfe('0x27')]=function(_0x2c7949,_0x32bcc5){if(_0x2c7949[_0xbbfe('0x4c')]['id']){delete _0x2c7949[_0xbbfe('0x4c')]['id'];}return db[_0xbbfe('0x2f')][_0xbbfe('0x4a')]({'where':{'id':_0x2c7949[_0xbbfe('0x49')]['id']}})[_0xbbfe('0x28')](handleEntityNotFound(_0x32bcc5,null))[_0xbbfe('0x28')](saveUpdates(_0x2c7949[_0xbbfe('0x4c')],null))[_0xbbfe('0x28')](respondWithResult(_0x32bcc5,null))[_0xbbfe('0x4d')](handleError(_0x32bcc5,null));};exports[_0xbbfe('0x29')]=function(_0x1a6fc3,_0x4ce098){return db['ChatTransferReport'][_0xbbfe('0x4a')]({'where':{'id':_0x1a6fc3['params']['id']}})['then'](handleEntityNotFound(_0x4ce098,null))[_0xbbfe('0x28')](removeEntity(_0x4ce098,null))['catch'](handleError(_0x4ce098,null));};exports[_0xbbfe('0x4e')]=function(_0x4d2cf4,_0x94b7bc){return db[_0xbbfe('0x2f')][_0xbbfe('0x4e')]()[_0xbbfe('0x28')](respondWithResult(_0x94b7bc,null))[_0xbbfe('0x4d')](handleError(_0x94b7bc,null));};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js
index 023484d..beda081 100644
--- a/server/api/chatTransferReport/chatTransferReport.model.js
+++ b/server/api/chatTransferReport/chatTransferReport.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac2a=['request-promise','path','exports','define','uniqueid','lodash','util','../../config/logger','moment','bluebird'];(function(_0x3312a3,_0x3f9cdb){var _0x262560=function(_0x51880a){while(--_0x51880a){_0x3312a3['push'](_0x3312a3['shift']());}};_0x262560(++_0x3f9cdb);}(_0xac2a,0x1b3));var _0xaac2=function(_0x1fb3d2,_0x21c700){_0x1fb3d2=_0x1fb3d2-0x0;var _0x8aef6c=_0xac2a[_0x1fb3d2];return _0x8aef6c;};'use strict';var _=require(_0xaac2('0x0'));var util=require(_0xaac2('0x1'));var logger=require(_0xaac2('0x2'))('api');var moment=require(_0xaac2('0x3'));var BPromise=require(_0xaac2('0x4'));var rp=require(_0xaac2('0x5'));var fs=require('fs');var path=require(_0xaac2('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./chatTransferReport.attributes');module[_0xaac2('0x7')]=function(_0x441372,_0x1c90d4){return _0x441372[_0xaac2('0x8')]('ChatTransferReport',attributes,{'tableName':'report_chat_transfer','paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xaac2('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xc8a5=['./chatTransferReport.attributes','define','ChatTransferReport','report_chat_transfer','uniqueid','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x7c27bb,_0x3c704d){var _0x341722=function(_0x497050){while(--_0x497050){_0x7c27bb['push'](_0x7c27bb['shift']());}};_0x341722(++_0x3c704d);}(_0xc8a5,0x17e));var _0x5c8a=function(_0x2376d1,_0x38eec4){_0x2376d1=_0x2376d1-0x0;var _0x443759=_0xc8a5[_0x2376d1];return _0x443759;};'use strict';var _=require('lodash');var util=require(_0x5c8a('0x0'));var logger=require(_0x5c8a('0x1'))('api');var moment=require(_0x5c8a('0x2'));var BPromise=require(_0x5c8a('0x3'));var rp=require(_0x5c8a('0x4'));var fs=require('fs');var path=require(_0x5c8a('0x5'));var rimraf=require(_0x5c8a('0x6'));var config=require(_0x5c8a('0x7'));var attributes=require(_0x5c8a('0x8'));module['exports']=function(_0x4d1901,_0x4d0045){return _0x4d1901[_0x5c8a('0x9')](_0x5c8a('0xa'),attributes,{'tableName':_0x5c8a('0xb'),'paranoid':![],'indexes':[{'name':_0x5c8a('0xc'),'fields':[_0x5c8a('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js
index 27cd6a1..448ca6b 100644
--- a/server/api/chatTransferReport/chatTransferReport.rpc.js
+++ b/server/api/chatTransferReport/chatTransferReport.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9b26=['../../config/logger','rpc','../../config/environment','info','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x51f077,_0x2705f7){var _0x50e2c3=function(_0x17b488){while(--_0x17b488){_0x51f077['push'](_0x51f077['shift']());}};_0x50e2c3(++_0x2705f7);}(_0x9b26,0x6d));var _0x69b2=function(_0x5dc489,_0x1d3f9f){_0x5dc489=_0x5dc489-0x0;var _0x482ba1=_0x9b26[_0x5dc489];return _0x482ba1;};'use strict';var _=require(_0x69b2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x69b2('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x69b2('0x2'));var db=require(_0x69b2('0x3'))['db'];var utils=require(_0x69b2('0x4'));var logger=require(_0x69b2('0x5'))(_0x69b2('0x6'));var config=require(_0x69b2('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x536e47,_0x149072,_0x4bda45){return new BPromise(function(_0xb8ff13,_0x207a99){return client['request'](_0x536e47,_0x4bda45)['then'](function(_0x17e973){logger[_0x69b2('0x8')](_0x69b2('0x9'),_0x149072,_0x69b2('0xa'));logger[_0x69b2('0xb')](_0x69b2('0xc'),_0x149072,_0x69b2('0xa'),JSON[_0x69b2('0xd')](_0x17e973));if(_0x17e973[_0x69b2('0xe')]){if(_0x17e973[_0x69b2('0xe')][_0x69b2('0xf')]===0x1f4){logger[_0x69b2('0xe')]('ChatTransferReport,\x20%s,\x20%s',_0x149072,_0x17e973['error'][_0x69b2('0x10')]);return _0x207a99(_0x17e973[_0x69b2('0xe')][_0x69b2('0x10')]);}logger[_0x69b2('0xe')](_0x69b2('0x9'),_0x149072,_0x17e973[_0x69b2('0xe')][_0x69b2('0x10')]);return _0xb8ff13(_0x17e973[_0x69b2('0xe')][_0x69b2('0x10')]);}else{logger['info']('ChatTransferReport,\x20%s,\x20%s',_0x149072,_0x69b2('0xa'));_0xb8ff13(_0x17e973[_0x69b2('0x11')][_0x69b2('0x10')]);}})[_0x69b2('0x12')](function(_0x1bd865){logger[_0x69b2('0xe')](_0x69b2('0x9'),_0x149072,_0x1bd865);_0x207a99(_0x1bd865);});});}
\ No newline at end of file
+var _0x0462=['result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','http','request','info','ChatTransferReport,\x20%s,\x20%s','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent'];(function(_0x1990b7,_0x337a64){var _0x4d5ef2=function(_0x1088c1){while(--_0x1088c1){_0x1990b7['push'](_0x1990b7['shift']());}};_0x4d5ef2(++_0x337a64);}(_0x0462,0x86));var _0x2046=function(_0x3e466e,_0x1e8bee){_0x3e466e=_0x3e466e-0x0;var _0x13fee9=_0x0462[_0x3e466e];return _0x13fee9;};'use strict';var _=require(_0x2046('0x0'));var util=require('util');var moment=require(_0x2046('0x1'));var BPromise=require(_0x2046('0x2'));var rs=require(_0x2046('0x3'));var fs=require('fs');var Redis=require(_0x2046('0x4'));var db=require(_0x2046('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x2046('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x2046('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2eb883,_0x49611b,_0x25f120){return new BPromise(function(_0x33eb7f,_0x1ab0b1){return client[_0x2046('0x8')](_0x2eb883,_0x25f120)['then'](function(_0x58e526){logger[_0x2046('0x9')](_0x2046('0xa'),_0x49611b,'request\x20sent');logger[_0x2046('0xb')](_0x2046('0xc'),_0x49611b,'request\x20sent',JSON[_0x2046('0xd')](_0x58e526));if(_0x58e526['error']){if(_0x58e526[_0x2046('0xe')][_0x2046('0xf')]===0x1f4){logger[_0x2046('0xe')](_0x2046('0xa'),_0x49611b,_0x58e526[_0x2046('0xe')][_0x2046('0x10')]);return _0x1ab0b1(_0x58e526[_0x2046('0xe')][_0x2046('0x10')]);}logger[_0x2046('0xe')](_0x2046('0xa'),_0x49611b,_0x58e526[_0x2046('0xe')][_0x2046('0x10')]);return _0x33eb7f(_0x58e526[_0x2046('0xe')][_0x2046('0x10')]);}else{logger[_0x2046('0x9')](_0x2046('0xa'),_0x49611b,_0x2046('0x11'));_0x33eb7f(_0x58e526[_0x2046('0x12')][_0x2046('0x10')]);}})['catch'](function(_0x453cd4){logger[_0x2046('0xe')](_0x2046('0xa'),_0x49611b,_0x453cd4);_0x1ab0b1(_0x453cd4);});});}
\ No newline at end of file
diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js
index 60c863a..2771cbf 100644
--- a/server/api/chatTransferReport/index.js
+++ b/server/api/chatTransferReport/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf54a=['Router','fs-extra','../../components/auth/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','create','put','delete','destroy','exports','multer','util','path'];(function(_0x4a563b,_0x36f42d){var _0x2935ef=function(_0x32593f){while(--_0x32593f){_0x4a563b['push'](_0x4a563b['shift']());}};_0x2935ef(++_0x36f42d);}(_0xf54a,0x75));var _0xaf54=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf54a[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xaf54('0x0'));var util=require(_0xaf54('0x1'));var path=require(_0xaf54('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xaf54('0x3')]();var fs_extra=require(_0xaf54('0x4'));var auth=require(_0xaf54('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xaf54('0x6'));var controller=require(_0xaf54('0x7'));router[_0xaf54('0x8')]('/',auth[_0xaf54('0x9')](),controller[_0xaf54('0xa')]);router[_0xaf54('0x8')](_0xaf54('0xb'),auth[_0xaf54('0x9')](),controller[_0xaf54('0xc')]);router[_0xaf54('0x8')](_0xaf54('0xd'),auth[_0xaf54('0x9')](),controller[_0xaf54('0xe')]);router['post']('/',auth[_0xaf54('0x9')](),controller[_0xaf54('0xf')]);router[_0xaf54('0x10')]('/:id',auth[_0xaf54('0x9')](),controller['update']);router[_0xaf54('0x11')](_0xaf54('0xd'),auth['isAuthenticated'](),controller[_0xaf54('0x12')]);module[_0xaf54('0x13')]=router;
\ No newline at end of file
+var _0xe08e=['update','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post','create','put'];(function(_0x27365b,_0x4c5a02){var _0x57b5f7=function(_0x33d14d){while(--_0x33d14d){_0x27365b['push'](_0x27365b['shift']());}};_0x57b5f7(++_0x4c5a02);}(_0xe08e,0x1a5));var _0xee08=function(_0x52ae8e,_0x51a3b2){_0x52ae8e=_0x52ae8e-0x0;var _0x44c8d1=_0xe08e[_0x52ae8e];return _0x44c8d1;};'use strict';var multer=require(_0xee08('0x0'));var util=require('util');var path=require(_0xee08('0x1'));var timeout=require(_0xee08('0x2'));var express=require(_0xee08('0x3'));var router=express[_0xee08('0x4')]();var fs_extra=require(_0xee08('0x5'));var auth=require(_0xee08('0x6'));var interaction=require(_0xee08('0x7'));var config=require(_0xee08('0x8'));var controller=require(_0xee08('0x9'));router[_0xee08('0xa')]('/',auth[_0xee08('0xb')](),controller['index']);router[_0xee08('0xa')](_0xee08('0xc'),auth[_0xee08('0xb')](),controller[_0xee08('0xd')]);router[_0xee08('0xa')](_0xee08('0xe'),auth[_0xee08('0xb')](),controller[_0xee08('0xf')]);router[_0xee08('0x10')]('/',auth[_0xee08('0xb')](),controller[_0xee08('0x11')]);router[_0xee08('0x12')]('/:id',auth[_0xee08('0xb')](),controller[_0xee08('0x13')]);router['delete'](_0xee08('0xe'),auth['isAuthenticated'](),controller[_0xee08('0x14')]);module[_0xee08('0x15')]=router;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js
index a05ed70..3fe25fa 100644
--- a/server/api/chatWebsite/chatWebsite.attributes.js
+++ b/server/api/chatWebsite/chatWebsite.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xac83=['star','thumb','stringify','input','text','name','getDataValue','onlineForm','parse','setDataValue','textarea','Comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','website_alias','CHAT','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','address','email','#011F6A','#ffffff','INTEGER','BOOLEAN','rounded','squared','We\x20are\x20here!','Send','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Skip','Feedback','ENUM'];(function(_0x4ef677,_0x22beb1){var _0x430cc8=function(_0x2389ab){while(--_0x2389ab){_0x4ef677['push'](_0x4ef677['shift']());}};_0x430cc8(++_0x22beb1);}(_0xac83,0x180));var _0x3ac8=function(_0x494f7f,_0x34a09b){_0x494f7f=_0x494f7f-0x0;var _0x18ebe4=_0xac83[_0x494f7f];return _0x18ebe4;};'use strict';var Sequelize=require(_0x3ac8('0x0'));var rs=require(_0x3ac8('0x1'));module[_0x3ac8('0x2')]={'name':{'type':Sequelize[_0x3ac8('0x3')],'allowNull':![]},'address':{'type':Sequelize[_0x3ac8('0x3')],'allowNull':![],'unique':_0x3ac8('0x4')},'description':{'type':Sequelize[_0x3ac8('0x3')]},'mapKey':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x5')},'mapKeyOffline':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0x5')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize['STRING'],'defaultValue':'Agent'},'customerAlias':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x3ac8('0x3')],'allowNull':![],'defaultValue':_0x3ac8('0x6'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x3ac8('0x3')],'allowNull':![],'defaultValue':_0x3ac8('0x6'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x3ac8('0x7'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x3ac8('0x7'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x3ac8('0x8')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x3ac8('0x3')]},'animation':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM'](_0x3ac8('0xa'),_0x3ac8('0xb')),'defaultValue':'rounded'},'header_online':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0xc')},'start_chat_button':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':'Chat'},'offline_chat_button':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0xd')},'header_offline':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0xe')},'download_transcript':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x3ac8('0x8')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0xf')},'defaultWhiteLabel':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x3ac8('0x10')]},'closingQuestion':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x11')},'formSubmitSuccessMessage':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x12')},'formSubmitFailureMessage':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x13')},'noteTitle':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x14')},'placeholderMessage':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':'Type\x20a\x20message'},'closingMessage':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':'Thanks\x20you\x20for\x20your\x20time!'},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0xd')},'skipMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0x15')},'conditionAgreement':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x16')},'ratingType':{'type':Sequelize[_0x3ac8('0x17')](_0x3ac8('0x18'),_0x3ac8('0x19')),'defaultValue':_0x3ac8('0x18')},'ratingStarsNumber':{'type':Sequelize[_0x3ac8('0x8')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x3ac8('0x10')],'defaultValue':function(){return JSON[_0x3ac8('0x1a')]({'items':[{'type':_0x3ac8('0x1b'),'variable':null,'config':{'placeholder':'name','type':_0x3ac8('0x1c'),'required':!![]},'props':{'title':_0x3ac8('0x1d'),'helpText':''}},{'type':_0x3ac8('0x1b'),'props':{'title':_0x3ac8('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0x3ac8('0x5'),'type':_0x3ac8('0x5')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x3ac8('0x1e')](_0x3ac8('0x1f'))?JSON[_0x3ac8('0x20')](this['getDataValue'](_0x3ac8('0x1f'))):{};},'set':function(_0x561292){return this[_0x3ac8('0x21')](_0x3ac8('0x1f'),JSON['stringify'](_0x561292));}},'offlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0x3ac8('0x1a')]({'items':[{'type':_0x3ac8('0x1b'),'props':{'title':_0x3ac8('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0x3ac8('0x5'),'type':_0x3ac8('0x5')},'variable':null},{'type':_0x3ac8('0x22'),'config':{'placeholder':_0x3ac8('0x23')},'props':{'title':_0x3ac8('0x23'),'helpText':'Leave\x20your\x20comments'}}],'fromKey':0x0});},'get':function(){return this['getDataValue'](_0x3ac8('0x24'))?JSON['parse'](this[_0x3ac8('0x1e')](_0x3ac8('0x24'))):{};},'set':function(_0x4313a8){return this['setDataValue'](_0x3ac8('0x24'),JSON[_0x3ac8('0x1a')](_0x4313a8));}},'token':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':function(){return rs[_0x3ac8('0x25')]();}},'autoclose':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x3ac8('0x3')]},'forwardOffline':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x3ac8('0x3')]},'waitingTitle':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0x26')},'waitingMessage':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x27')},'offlineMessageSubject':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x28')},'offlineMessageBody':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0x29')},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x2a')},'skipUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x3ac8('0x15')},'sendUnmanaged':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0xd')},'enableCustomerAttachment':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x3ac8('0x10')]},'showAgentAvatar':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x3ac8('0x3')]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x3ac8('0x2b');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x2c')},'waitForTheAssignedAgent':{'type':Sequelize[_0x3ac8('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x3ac8('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize[_0x3ac8('0x8')],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x2d')},'messagesAlignment':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':'alternate'},'defaultTitle':{'type':Sequelize[_0x3ac8('0x3')]},'customerAvatar':{'type':Sequelize[_0x3ac8('0x10')]},'showCustomerAvatar':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x3ac8('0x8')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x3ac8('0x3')],'allowNull':![],'defaultValue':'#fafafa','validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x3ac8('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':_0x3ac8('0x2e')},'systemAvatar':{'type':Sequelize[_0x3ac8('0x10')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x3ac8('0x8')],'comment':_0x3ac8('0x2f')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x3ac8('0x30'),'set':function(_0x86e165){if(!_0x86e165)this[_0x3ac8('0x21')]('mandatoryDispositionPauseId',null);this[_0x3ac8('0x21')](_0x3ac8('0x31'),_0x86e165);}},'vidaooEscalation':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x3ac8('0x3')]},'vidaooTopic':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'Generated\x20by\x20XCALLY\x20Motion'},'vidaooNote':{'type':Sequelize[_0x3ac8('0x3')],'defaultValue':function(){return _0x3ac8('0x32');}},'vidaooMetadata':{'type':Sequelize[_0x3ac8('0x10')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x3ac8('0x9')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x3ac8('0x10')]}};
\ No newline at end of file
+var _0xd427=['website_alias','CHAT','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','address','email','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN','ENUM','rounded','squared','We\x20are\x20here!','Chat','Send','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Note','Thanks\x20you\x20for\x20your\x20time!','Feedback','star','thumb','stringify','input','name','text','getDataValue','onlineForm','setDataValue','textarea','Comments','Leave\x20your\x20comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','New\x20offline\x20message\x20from\x20websiteName','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Skip','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}'];(function(_0x1cdc19,_0x148d8c){var _0x269b10=function(_0x29536d){while(--_0x29536d){_0x1cdc19['push'](_0x1cdc19['shift']());}};_0x269b10(++_0x148d8c);}(_0xd427,0x153));var _0x7d42=function(_0xcfa9b0,_0x134b25){_0xcfa9b0=_0xcfa9b0-0x0;var _0x504109=_0xd427[_0xcfa9b0];return _0x504109;};'use strict';var Sequelize=require(_0x7d42('0x0'));var rs=require(_0x7d42('0x1'));module[_0x7d42('0x2')]={'name':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![]},'address':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![],'unique':_0x7d42('0x4')},'description':{'type':Sequelize[_0x7d42('0x3')]},'mapKey':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x5')},'mapKeyOffline':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x5')},'key':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x6')},'customerAlias':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7d42('0x7'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![],'defaultValue':_0x7d42('0x7'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![],'defaultValue':_0x7d42('0x8'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![],'defaultValue':'#ffffff','validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x7d42('0x9')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x7d42('0x3')]},'animation':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x7d42('0xb')](_0x7d42('0xc'),_0x7d42('0xd')),'defaultValue':_0x7d42('0xc')},'header_online':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0xe')},'start_chat_button':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0xf')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x7d42('0x10')},'header_offline':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x11')},'download_transcript':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x7d42('0x9')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize['STRING'],'defaultValue':_0x7d42('0x12')},'defaultWhiteLabel':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x7d42('0x13')]},'closingQuestion':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x14')},'formSubmitSuccessMessage':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x15')},'formSubmitFailureMessage':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x16')},'placeholderMessage':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'Type\x20a\x20message'},'closingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x7d42('0x17')},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0x7d42('0x10')},'skipMessageButton':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'Skip'},'conditionAgreement':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x18')},'ratingType':{'type':Sequelize[_0x7d42('0xb')](_0x7d42('0x19'),_0x7d42('0x1a')),'defaultValue':_0x7d42('0x19')},'ratingStarsNumber':{'type':Sequelize[_0x7d42('0x9')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x7d42('0x13')],'defaultValue':function(){return JSON[_0x7d42('0x1b')]({'items':[{'type':_0x7d42('0x1c'),'variable':null,'config':{'placeholder':_0x7d42('0x1d'),'type':_0x7d42('0x1e'),'required':!![]},'props':{'title':_0x7d42('0x1d'),'helpText':''}},{'type':_0x7d42('0x1c'),'props':{'title':_0x7d42('0x5'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x7d42('0x5')},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue']('onlineForm')?JSON['parse'](this[_0x7d42('0x1f')](_0x7d42('0x20'))):{};},'set':function(_0x44fc89){return this[_0x7d42('0x21')](_0x7d42('0x20'),JSON[_0x7d42('0x1b')](_0x44fc89));}},'offlineForm':{'type':Sequelize[_0x7d42('0x13')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':'input','props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0x7d42('0x5'),'type':_0x7d42('0x5')},'variable':null},{'type':_0x7d42('0x22'),'config':{'placeholder':_0x7d42('0x23')},'props':{'title':_0x7d42('0x23'),'helpText':_0x7d42('0x24')}}],'fromKey':0x0});},'get':function(){return this[_0x7d42('0x1f')](_0x7d42('0x25'))?JSON['parse'](this['getDataValue']('offlineForm')):{};},'set':function(_0x3fc5ba){return this['setDataValue'](_0x7d42('0x25'),JSON['stringify'](_0x3fc5ba));}},'token':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':function(){return rs[_0x7d42('0x26')]();}},'autoclose':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x7d42('0x3')]},'forwardOffline':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize['STRING']},'waitingTitle':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x27')},'waitingMessage':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x28')},'offlineMessageSubject':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x29')},'offlineMessageBody':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x2a')},'enableUnmanagedNote':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x2b')},'skipUnmanaged':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x2c')},'sendUnmanaged':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'Send'},'enableCustomerAttachment':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x7d42('0x13')]},'showAgentAvatar':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x7d42('0x3')]},'notificationTemplate':{'type':Sequelize[_0x7d42('0x13')],'defaultValue':function(){return _0x7d42('0x2d');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x2e')},'waitForTheAssignedAgent':{'type':Sequelize[_0x7d42('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x7d42('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x2f')},'messagesAlignment':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':'alternate'},'defaultTitle':{'type':Sequelize[_0x7d42('0x3')]},'customerAvatar':{'type':Sequelize[_0x7d42('0x13')]},'showCustomerAvatar':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x7d42('0x3')],'allowNull':![],'defaultValue':_0x7d42('0x30'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x7d42('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x7d42('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':_0x7d42('0x31')},'systemAvatar':{'type':Sequelize[_0x7d42('0x13')]},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':_0x7d42('0x32')},'mandatoryDisposition':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![],'comment':_0x7d42('0x33'),'set':function(_0x26b9ac){if(!_0x26b9ac)this['setDataValue'](_0x7d42('0x34'),null);this['setDataValue']('mandatoryDisposition',_0x26b9ac);}},'vidaooEscalation':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x7d42('0x3')]},'vidaooTopic':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7d42('0x35')},'vidaooNote':{'type':Sequelize[_0x7d42('0x3')],'defaultValue':function(){return _0x7d42('0x36');}},'vidaooMetadata':{'type':Sequelize[_0x7d42('0x13')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x7d42('0xa')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize['TEXT']}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js
index a46314c..c4d4e71 100644
--- a/server/api/chatWebsite/chatWebsite.controller.js
+++ b/server/api/chatWebsite/chatWebsite.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbff2=['message','result','catch','end','json','offset','undefined','limit','count','status','destroy','get','ChatWebsites','UserProfileResource','sendStatus','stack','name','Command','getSnippet','format','timezone','interval','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','inspect','No\x20timezone','map','Interval','Intervals','all','some','user-agent-parser','setUA','user-agent','getResult','customerIp','x-forwarded-for','first','split','lastName','x-real-port','referer','browser','%s\x20%s','version','unknown','device','model','%s\x20%s\x20%s','vendor','type','Pause','ChatWebsite','rawAttributes','key','keys','query','filters','intersection','attributes','fields','length','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','rows','params','includeAll','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','Disposition','getDispositions','findOne','order','removeDispositions','ChatWebsiteId','CannedAnswer','getAnswers','hasOwnProperty','nolimit','removeAnswers','ids','sitepic','filename','addAvatar','agentAvatar','file','addSystemAvatar','systemAvatar','getLogo','root','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense','custom','isNil','existsSync','join','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','getCustomerAvatar','customerAvatar','showCustomerAvatar','getSystemAvatar','server/files/images/avatars/system_avatar.png','notify','chat','CmContact','Sequelize','ValidationError','difference','updatedAt','CompanyId','ListId','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','from','CmList','List','Contacts','DESC','Applications','Chat\x20Website\x20with\x20id\x20%s\x20not\x20found','spread','account','applications','priority','asc','defaults','contact','headers','threadId','ChatInteraction','externalUrl','ContactId','interaction','firstName','messageId','created','autoclose','push','close','unmanaged','*,*,*,*','AttachmentId','User','UserId','unshift','agent','waitForTheAssignedAgent','forcedOwnership','queueId','ChatQueue','queue','waitForTheAssignedQueue','Start','startRouting','offline','files','no\x20available\x20attributes','createdAt','send','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKeyOffline','MailAccount','findOrCreate','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','render','toPairs','offlineMessageBody','originalname','mimetype','server','attachments','offline-chat','basename','openNewInteraction','sequelize','MailServerOut','CloudProvider','Smtp','forwardOfflineAddress','getSmtpOptions','SendMail','sendMail','email','offlineMessageSubject','MailAccountId','subjectOffline','toPairsIn','mapValues','Chat','NotifyMailAccount','notifyMail','remove','addInteraction','omit','Contact','Owner','fullname','internal','Tag','color','tag','virtual','increment','chatLicenseExceeded','URL','address','origin','3.6.0','x-real-ip','connection','remoteAddress','replace','labelText','textColor','textButtonColor','color_button','backgroundColor','hideWhenOffline','IntervalId','transaction','ISOLATION_LEVELS','READ_COMMITTED','ChatApplication','bulkCreate','findAndCountAll','getApplications','addProactiveActions','chatProactiveAction','getProactiveActions','ChatProactiveAction','online','false','offlineForm','items','fromKey','ChatOfflineMessage','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','util','path','ejs','fs-extra','lodash','querystring','html-to-text','ioredis','url','../../components/parsers/qs','../../errors/api','APIOutOfIntervalError','APINotFoundError','../../mysqldb','localhost','redis','./chatWebsite.socket','client','http','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0xf4b27e,_0x525244){var _0x42166d=function(_0x102790){while(--_0x102790){_0xf4b27e['push'](_0xf4b27e['shift']());}};_0x42166d(++_0x525244);}(_0xbff2,0x10e));var _0x2bff=function(_0x20c764,_0x940bff){_0x20c764=_0x20c764-0x0;var _0xf2c5eb=_0xbff2[_0x20c764];return _0xf2c5eb;};'use strict';var Mustache=require(_0x2bff('0x0'));var util=require(_0x2bff('0x1'));var path=require(_0x2bff('0x2'));var ejs=require(_0x2bff('0x3'));var fs=require('fs');var fs_extra=require(_0x2bff('0x4'));var _=require(_0x2bff('0x5'));var querystring=require(_0x2bff('0x6'));var htmlToText=require(_0x2bff('0x7'));var Redis=require(_0x2bff('0x8'));var jayson=require('jayson/promise');var url=require(_0x2bff('0x9'));var qs=require(_0x2bff('0xa'));var logger=require('../../config/logger')('api');var config=require('../../config/environment');var APIOutOfIntervalError=require(_0x2bff('0xb'))[_0x2bff('0xc')];var APINotFoundError=require('../../errors/api')[_0x2bff('0xd')];var APIHandleError=require('../../errors/api')['handleError'];var db=require(_0x2bff('0xe'))['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x2bff('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2bff('0x10')]));require(_0x2bff('0x11'))['register'](socket);var client=jayson[_0x2bff('0x12')][_0x2bff('0x13')]({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});var client9003=jayson[_0x2bff('0x12')][_0x2bff('0x13')]({'port':0x232b});var client9001=jayson['client'][_0x2bff('0x13')]({'port':0x2329});function respondWithRpcPromise(_0x2af98f,_0x48f9f8,_0x3d3e90,_0x3e8399){return new Promise(function(_0x430fd0,_0x46a93c){var _0x5cf3c1=_0x3e8399||client;return _0x5cf3c1[_0x2bff('0x14')](_0x2af98f,_0x3d3e90)[_0x2bff('0x15')](function(_0x25f978){logger[_0x2bff('0x16')](_0x2bff('0x17'),_0x48f9f8,_0x2bff('0x18'));logger['debug'](_0x2bff('0x19'),_0x48f9f8,_0x2bff('0x18'),JSON[_0x2bff('0x1a')](_0x25f978));if(_0x25f978['error']){if(_0x25f978[_0x2bff('0x1b')][_0x2bff('0x1c')]===0x1f4){logger['error'](_0x2bff('0x17'),_0x48f9f8,_0x25f978[_0x2bff('0x1b')][_0x2bff('0x1d')]);return _0x46a93c(_0x25f978['error']['message']);}logger[_0x2bff('0x1b')](_0x2bff('0x17'),_0x48f9f8,_0x25f978['error'][_0x2bff('0x1d')]);return _0x430fd0(_0x25f978['error']['message']);}else{logger[_0x2bff('0x16')](_0x2bff('0x17'),_0x48f9f8,_0x2bff('0x18'));_0x430fd0(_0x25f978[_0x2bff('0x1e')][_0x2bff('0x1d')]);}})[_0x2bff('0x1f')](function(_0x33ab51){logger[_0x2bff('0x1b')](_0x2bff('0x17'),_0x48f9f8,_0x33ab51);_0x46a93c(_0x33ab51);});});}function respondWithStatusCode(_0x42c9c2,_0x3b3a66){_0x3b3a66=_0x3b3a66||0xcc;return function(_0x3ecb73){if(_0x3ecb73){return _0x42c9c2['sendStatus'](_0x3b3a66);}return _0x42c9c2['status'](_0x3b3a66)[_0x2bff('0x20')]();};}function respondWithResult(_0x314717,_0x4c6a91){_0x4c6a91=_0x4c6a91||0xc8;return function(_0x170a8f){if(_0x170a8f){return _0x314717['status'](_0x4c6a91)[_0x2bff('0x21')](_0x170a8f);}};}function respondWithFilteredResult(_0x59147b,_0x23dcd6){return function(_0x235523){if(_0x235523){var _0x551a59=typeof _0x23dcd6[_0x2bff('0x22')]===_0x2bff('0x23')&&typeof _0x23dcd6[_0x2bff('0x24')]===_0x2bff('0x23');var _0x2204ad=_0x235523[_0x2bff('0x25')];var _0x5a93fa=_0x551a59?0x0:_0x23dcd6['offset'];var _0x5e8c69=_0x551a59?_0x235523[_0x2bff('0x25')]:_0x23dcd6[_0x2bff('0x22')]+_0x23dcd6[_0x2bff('0x24')];var _0x35eaf2;if(_0x5e8c69>=_0x2204ad){_0x5e8c69=_0x2204ad;_0x35eaf2=0xc8;}else{_0x35eaf2=0xce;}_0x59147b[_0x2bff('0x26')](_0x35eaf2);return _0x59147b['set']('Content-Range',_0x5a93fa+'-'+_0x5e8c69+'/'+_0x2204ad)['json'](_0x235523);}return null;};}function saveUpdates(_0x180aa6){return function(_0x502efb){if(_0x502efb){return _0x502efb['update'](_0x180aa6)['then'](function(_0x3713ff){return _0x3713ff;});}return null;};}function removeEntity(_0x273acf){return function(_0x339156){if(_0x339156){return _0x339156[_0x2bff('0x27')]()[_0x2bff('0x15')](function(){var _0x2f74c4=_0x339156[_0x2bff('0x28')]({'plain':!![]});var _0x33fa97=_0x2bff('0x29');return db[_0x2bff('0x2a')][_0x2bff('0x27')]({'where':{'type':_0x33fa97,'resourceId':_0x2f74c4['id']}})[_0x2bff('0x15')](function(){return _0x339156;});})[_0x2bff('0x15')](function(){_0x273acf[_0x2bff('0x26')](0xcc)['end']();});}};}function handleEntityNotFound(_0x14df84){return function(_0x17657c){if(!_0x17657c){_0x14df84[_0x2bff('0x2b')](0x194);}return _0x17657c;};}function handleError(_0x4c4fb4,_0x3ec81a){_0x3ec81a=_0x3ec81a||0x1f4;return function(_0x4a5dad){logger[_0x2bff('0x1b')](_0x4a5dad[_0x2bff('0x2c')]);if(_0x4a5dad[_0x2bff('0x2d')]){delete _0x4a5dad[_0x2bff('0x2d')];}_0x4c4fb4[_0x2bff('0x26')](_0x3ec81a)['send'](_0x4a5dad);};}function iftimePromise(_0x1150c4,_0x192c93){return respondWithRpcPromise(_0x2bff('0x2e'),_0x2bff('0x2f'),{'command':_0x192c93['timezone']?util[_0x2bff('0x30')]('iftime\x20%s,%s',_0x1150c4['interval'],_0x192c93[_0x2bff('0x31')]):util['format']('iftime\x20%s',_0x1150c4[_0x2bff('0x32')])},client9002)[_0x2bff('0x15')](function(_0x317958){var _0x25e2cc=_0x317958&&_0x317958['indexOf'](_0x2bff('0x33'))>=0x0?!![]:![];logger[_0x2bff('0x16')](_0x2bff('0x34'),_0x192c93['id'],_0x1150c4['id'],_0x1150c4['interval'],_0x25e2cc?_0x2bff('0x35'):_0x2bff('0x36'),_0x192c93[_0x2bff('0x31')]?_0x192c93[_0x2bff('0x31')]:'No\x20timezone');return _0x25e2cc;})[_0x2bff('0x1f')](function(_0x42a764){logger['error'](_0x2bff('0x34'),_0x192c93['id'],_0x1150c4['id'],_0x1150c4[_0x2bff('0x32')],util[_0x2bff('0x37')](_0x42a764,{'showHidden':![],'depth':null}),_0x192c93[_0x2bff('0x31')]?_0x192c93[_0x2bff('0x31')]:_0x2bff('0x38'));return![];});}function checkWebsiteIntervals(_0x2a2ba0){var _0x30ff26=_[_0x2bff('0x39')](_0x2a2ba0[_0x2bff('0x3a')][_0x2bff('0x3b')],function(_0x24217b){var _0xf4396e=_0x24217b[_0x2bff('0x28')]({'plain':!![]});return iftimePromise(_0xf4396e,_0x2a2ba0);});return Promise[_0x2bff('0x3c')](_0x30ff26)[_0x2bff('0x15')](function(_0x1c53c2){return _[_0x2bff('0x3d')](_0x1c53c2);});}function createInteractionObject(_0x14be36,_0x1369a9,_0x390762,_0x54cd71){var _0x243e55=require(_0x2bff('0x3e'));var _0x1f52c4=new _0x243e55();var _0x1284f8=_0x1f52c4[_0x2bff('0x3f')](_0x390762[_0x2bff('0x40')])[_0x2bff('0x41')]();var _0x396f19=_0x1369a9[_0x2bff('0x42')];if(_0x390762['cf-connecting-ip']){_0x396f19=_0x390762['cf-connecting-ip'];}else if(_0x390762[_0x2bff('0x43')]){_0x396f19=_[_0x2bff('0x44')](_0x390762[_0x2bff('0x43')][_0x2bff('0x45')](','));}return{'ContactId':_0x54cd71['id'],'ChatWebsiteId':_0x14be36,'from':(_0x54cd71['firstName']||'')+'\x20'+(_0x54cd71[_0x2bff('0x46')]||''),'customerIp':_0x396f19,'customerPort':_0x390762[_0x2bff('0x47')]?_0x390762[_0x2bff('0x47')]:null,'referer':_0x1369a9[_0x2bff('0x48')],'browserName':_0x1284f8[_0x2bff('0x49')]['name']&&_0x1284f8[_0x2bff('0x49')]['version']?util[_0x2bff('0x30')](_0x2bff('0x4a'),_0x1284f8[_0x2bff('0x49')][_0x2bff('0x2d')],_0x1284f8['browser']['version']):'unknown','browserVersion':_0x1284f8['browser'][_0x2bff('0x4b')]||_0x2bff('0x4c'),'osName':util[_0x2bff('0x30')]('%s\x20%s',_0x1284f8['os'][_0x2bff('0x2d')],_0x1284f8['os'][_0x2bff('0x4b')]),'osVersion':_0x1284f8['os'][_0x2bff('0x4b')],'deviceModel':_0x1284f8[_0x2bff('0x4d')][_0x2bff('0x4e')]&&_0x1284f8[_0x2bff('0x4d')]['vendor']?util[_0x2bff('0x30')](_0x2bff('0x4f'),_0x1284f8[_0x2bff('0x4d')][_0x2bff('0x4e')],_0x1284f8[_0x2bff('0x4d')][_0x2bff('0x50')],_0x1284f8[_0x2bff('0x4d')]['type']):null,'deviceVendor':_0x1284f8[_0x2bff('0x4d')]['vendor'],'deviceType':_0x1284f8[_0x2bff('0x4d')][_0x2bff('0x51')],'formData':JSON[_0x2bff('0x1a')](_0x1369a9)};}exports['index']=function(_0x9ea4fc,_0x4c82e7){var _0x5d12cc={'include':[{'model':db[_0x2bff('0x52')],'as':'mandatoryDispositionPause'}]},_0x21ec1f={},_0x298308={'count':0x0,'rows':[]};var _0x125c22=_['map'](db[_0x2bff('0x53')][_0x2bff('0x54')],function(_0x5a8dfa){return{'name':_0x5a8dfa['fieldName'],'type':_0x5a8dfa[_0x2bff('0x51')][_0x2bff('0x55')]};});_0x21ec1f[_0x2bff('0x4e')]=_[_0x2bff('0x39')](_0x125c22,_0x2bff('0x2d'));_0x21ec1f['query']=_[_0x2bff('0x56')](_0x9ea4fc[_0x2bff('0x57')]);_0x21ec1f[_0x2bff('0x58')]=_[_0x2bff('0x59')](_0x21ec1f['model'],_0x21ec1f[_0x2bff('0x57')]);_0x5d12cc[_0x2bff('0x5a')]=_[_0x2bff('0x59')](_0x21ec1f['model'],qs[_0x2bff('0x5b')](_0x9ea4fc[_0x2bff('0x57')]['fields']));_0x5d12cc[_0x2bff('0x5a')]=_0x5d12cc[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0x5d12cc['attributes']:_0x21ec1f['model'];if(!_0x9ea4fc[_0x2bff('0x57')]['hasOwnProperty']('nolimit')){_0x5d12cc[_0x2bff('0x24')]=qs[_0x2bff('0x24')](_0x9ea4fc[_0x2bff('0x57')]['limit']);_0x5d12cc[_0x2bff('0x22')]=qs[_0x2bff('0x22')](_0x9ea4fc[_0x2bff('0x57')][_0x2bff('0x22')]);}_0x5d12cc['order']=qs[_0x2bff('0x5d')](_0x9ea4fc[_0x2bff('0x57')][_0x2bff('0x5d')]);_0x5d12cc['where']=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x9ea4fc[_0x2bff('0x57')],_0x21ec1f['filters']),_0x125c22);if(_0x9ea4fc[_0x2bff('0x57')][_0x2bff('0x5f')]){_0x5d12cc[_0x2bff('0x60')]=_[_0x2bff('0x61')](_0x5d12cc['where'],{'$or':_[_0x2bff('0x39')](_0x125c22,function(_0x564642){if(_0x564642['type']!==_0x2bff('0x62')){var _0x261863={};_0x261863[_0x564642[_0x2bff('0x2d')]]={'$like':'%'+_0x9ea4fc[_0x2bff('0x57')][_0x2bff('0x5f')]+'%'};return _0x261863;}})});}_0x5d12cc=_[_0x2bff('0x61')]({},_0x5d12cc,_0x9ea4fc[_0x2bff('0x63')]);var _0x465a67={'where':_0x5d12cc[_0x2bff('0x60')]};return db['ChatWebsite']['count'](_0x465a67)['then'](function(_0x3e8bc8){_0x298308['count']=_0x3e8bc8;if(_0x9ea4fc[_0x2bff('0x57')]['includeAll']){_0x5d12cc[_0x2bff('0x64')]=[{'all':!![]}];}return db[_0x2bff('0x53')][_0x2bff('0x65')](_0x5d12cc);})[_0x2bff('0x15')](function(_0x428e7a){_0x298308[_0x2bff('0x66')]=_0x428e7a;return _0x298308;})['then'](respondWithFilteredResult(_0x4c82e7,_0x5d12cc))['catch'](handleError(_0x4c82e7,null));};exports['show']=function(_0x39111b,_0x23b383){var _0x4040a6={'raw':![],'where':{'id':_0x39111b[_0x2bff('0x67')]['id']},'include':[{'model':db[_0x2bff('0x52')],'as':'mandatoryDispositionPause'}]},_0x2a29a5={};_0x2a29a5['model']=_['keys'](db['ChatWebsite'][_0x2bff('0x54')]);_0x2a29a5['query']=_['keys'](_0x39111b['query']);_0x2a29a5[_0x2bff('0x58')]=_[_0x2bff('0x59')](_0x2a29a5[_0x2bff('0x4e')],_0x2a29a5[_0x2bff('0x57')]);_0x4040a6[_0x2bff('0x5a')]=_[_0x2bff('0x59')](_0x2a29a5[_0x2bff('0x4e')],qs[_0x2bff('0x5b')](_0x39111b['query']['fields']));_0x4040a6[_0x2bff('0x5a')]=_0x4040a6[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0x4040a6[_0x2bff('0x5a')]:_0x2a29a5[_0x2bff('0x4e')];if(_0x39111b[_0x2bff('0x57')][_0x2bff('0x68')]){_0x4040a6[_0x2bff('0x64')]=[{'all':!![]}];}_0x4040a6=_['merge']({},_0x4040a6,_0x39111b[_0x2bff('0x63')]);return db[_0x2bff('0x53')]['find'](_0x4040a6)[_0x2bff('0x15')](handleEntityNotFound(_0x23b383,null))[_0x2bff('0x15')](respondWithResult(_0x23b383,null))[_0x2bff('0x1f')](handleError(_0x23b383,null));};exports[_0x2bff('0x69')]=function(_0x4ca979,_0x5c2e39){return db[_0x2bff('0x53')][_0x2bff('0x69')](_0x4ca979[_0x2bff('0x6a')],{})[_0x2bff('0x15')](function(_0x11afef){var _0xec052c=_0x4ca979[_0x2bff('0x6b')]['get']({'plain':!![]});if(!_0xec052c)throw new Error(_0x2bff('0x6c'));if(_0xec052c['role']===_0x2bff('0x6b')){var _0x50561e=_0x11afef['get']({'plain':!![]});var _0x34b4e9=_0x2bff('0x29');return db[_0x2bff('0x6d')][_0x2bff('0x6e')]({'where':{'name':_0x34b4e9,'userProfileId':_0xec052c[_0x2bff('0x6f')]},'raw':!![]})[_0x2bff('0x15')](function(_0x25ce6d){if(_0x25ce6d&&_0x25ce6d[_0x2bff('0x70')]===0x0){return db[_0x2bff('0x2a')][_0x2bff('0x69')]({'name':_0x50561e['name'],'resourceId':_0x50561e['id'],'type':_0x25ce6d[_0x2bff('0x2d')],'sectionId':_0x25ce6d['id']},{})[_0x2bff('0x15')](function(){return _0x11afef;});}else{return _0x11afef;}})[_0x2bff('0x1f')](function(_0x47f859){logger[_0x2bff('0x1b')](_0x2bff('0x71'),_0x47f859);throw _0x47f859;});}return _0x11afef;})['then'](respondWithResult(_0x5c2e39,0xc9))[_0x2bff('0x1f')](handleError(_0x5c2e39,null));};exports['update']=function(_0x212a71,_0x3c8dd8){if(_0x212a71['body']['id']){delete _0x212a71[_0x2bff('0x6a')]['id'];}return db['ChatWebsite']['find']({'where':{'id':_0x212a71[_0x2bff('0x67')]['id']},'include':[{'model':db[_0x2bff('0x52')],'as':'mandatoryDispositionPause'}]})[_0x2bff('0x15')](handleEntityNotFound(_0x3c8dd8,null))[_0x2bff('0x15')](saveUpdates(_0x212a71['body'],null))['then'](respondWithResult(_0x3c8dd8,null))[_0x2bff('0x1f')](handleError(_0x3c8dd8,null));};exports['destroy']=function(_0x5a3fd3,_0x289f40){return db[_0x2bff('0x53')]['find']({'where':{'id':_0x5a3fd3[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x289f40,null))[_0x2bff('0x15')](removeEntity(_0x289f40,null))[_0x2bff('0x1f')](handleError(_0x289f40,null));};exports['describe']=function(_0x20c1d3,_0x40c2b3){return db[_0x2bff('0x53')][_0x2bff('0x72')]()[_0x2bff('0x15')](respondWithResult(_0x40c2b3,null))['catch'](handleError(_0x40c2b3,null));};exports['addDisposition']=function(_0x4d9edf,_0x3f2639){if(_0x4d9edf['body']['id']){delete _0x4d9edf[_0x2bff('0x6a')]['id'];}return db[_0x2bff('0x53')]['find']({'where':{'id':_0x4d9edf[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x3f2639,null))['then'](function(_0x2751e9){if(_0x2751e9){_0x4d9edf['body']['ChatWebsiteId']=_0x2751e9['id'];return db[_0x2bff('0x73')]['create'](_0x4d9edf['body']);}})[_0x2bff('0x15')](respondWithResult(_0x3f2639,null))[_0x2bff('0x1f')](handleError(_0x3f2639,null));};exports[_0x2bff('0x74')]=function(_0x495113,_0x2dcb75){var _0xd2bdac={'raw':![],'where':{}};var _0x4e1919={};var _0x163e0f={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x2bff('0x75')]({'where':{'id':_0x495113[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x2dcb75,null))[_0x2bff('0x15')](function(_0x4d2a26){if(_0x4d2a26){_0x4e1919['model']=_[_0x2bff('0x56')](db[_0x2bff('0x73')][_0x2bff('0x54')]);_0x4e1919[_0x2bff('0x57')]=_[_0x2bff('0x56')](_0x495113[_0x2bff('0x57')]);_0x4e1919[_0x2bff('0x58')]=_['intersection'](_0x4e1919[_0x2bff('0x4e')],_0x4e1919[_0x2bff('0x57')]);_0xd2bdac['attributes']=_[_0x2bff('0x59')](_0x4e1919[_0x2bff('0x4e')],qs[_0x2bff('0x5b')](_0x495113[_0x2bff('0x57')][_0x2bff('0x5b')]));_0xd2bdac[_0x2bff('0x5a')]=_0xd2bdac[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0xd2bdac[_0x2bff('0x5a')]:_0x4e1919['model'];if(!_0x495113[_0x2bff('0x57')]['hasOwnProperty']('nolimit')){_0xd2bdac['limit']=qs[_0x2bff('0x24')](_0x495113['query'][_0x2bff('0x24')]);_0xd2bdac[_0x2bff('0x22')]=qs[_0x2bff('0x22')](_0x495113[_0x2bff('0x57')][_0x2bff('0x22')]);}_0xd2bdac[_0x2bff('0x76')]=qs[_0x2bff('0x5d')](_0x495113[_0x2bff('0x57')][_0x2bff('0x5d')]);_0xd2bdac[_0x2bff('0x60')]=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x495113[_0x2bff('0x57')],_0x4e1919[_0x2bff('0x58')]));_0xd2bdac[_0x2bff('0x60')]['ChatWebsiteId']=_0x4d2a26['id'];if(_0x495113[_0x2bff('0x57')][_0x2bff('0x5f')]){_0xd2bdac[_0x2bff('0x60')]=_[_0x2bff('0x61')](_0xd2bdac[_0x2bff('0x60')],{'$or':_[_0x2bff('0x39')](_0xd2bdac['attributes'],function(_0x41ac8){var _0x90afd5={};_0x90afd5[_0x41ac8]={'$like':'%'+_0x495113['query'][_0x2bff('0x5f')]+'%'};return _0x90afd5;})});}_0xd2bdac=_[_0x2bff('0x61')]({},_0xd2bdac,_0x495113['options']);return db['Disposition'][_0x2bff('0x25')]({'where':_0xd2bdac[_0x2bff('0x60')]})[_0x2bff('0x15')](function(_0x39b988){_0x163e0f[_0x2bff('0x25')]=_0x39b988;if(_0x495113[_0x2bff('0x57')][_0x2bff('0x68')]){_0xd2bdac[_0x2bff('0x64')]=[{'all':!![]}];}return db[_0x2bff('0x73')]['findAll'](_0xd2bdac);})[_0x2bff('0x15')](function(_0x2da863){_0x163e0f[_0x2bff('0x66')]=_0x2da863;return _0x163e0f;});}})[_0x2bff('0x15')](respondWithFilteredResult(_0x2dcb75,_0xd2bdac))[_0x2bff('0x1f')](handleError(_0x2dcb75,null));};exports[_0x2bff('0x77')]=function(_0x48e44a,_0x2179bf){return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x48e44a[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x2179bf,null))[_0x2bff('0x15')](function(_0x1f6e8c){if(_0x1f6e8c){return _0x1f6e8c['removeDispositions'](_0x48e44a[_0x2bff('0x57')]['ids']);}})[_0x2bff('0x15')](respondWithStatusCode(_0x2179bf,null))[_0x2bff('0x1f')](handleError(_0x2179bf,null));};exports['addAnswer']=function(_0x3cb156,_0x1c78b1){if(_0x3cb156[_0x2bff('0x6a')]['id']){delete _0x3cb156[_0x2bff('0x6a')]['id'];}return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x3cb156[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x1c78b1,null))[_0x2bff('0x15')](function(_0x10ae75){if(_0x10ae75){_0x3cb156['body'][_0x2bff('0x78')]=_0x10ae75['id'];return db[_0x2bff('0x79')][_0x2bff('0x69')](_0x3cb156[_0x2bff('0x6a')]);}})['then'](respondWithResult(_0x1c78b1,null))[_0x2bff('0x1f')](handleError(_0x1c78b1,null));};exports[_0x2bff('0x7a')]=function(_0x92e93,_0x23d30b){var _0x3f3856={'raw':![],'where':{}};var _0x5920ad={};var _0x4ca62a={'count':0x0,'rows':[]};return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x92e93['params']['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x23d30b,null))[_0x2bff('0x15')](function(_0x17ef3f){if(_0x17ef3f){_0x5920ad[_0x2bff('0x4e')]=_['keys'](db[_0x2bff('0x79')]['rawAttributes']);_0x5920ad['query']=_[_0x2bff('0x56')](_0x92e93[_0x2bff('0x57')]);_0x5920ad['filters']=_[_0x2bff('0x59')](_0x5920ad[_0x2bff('0x4e')],_0x5920ad[_0x2bff('0x57')]);_0x3f3856[_0x2bff('0x5a')]=_[_0x2bff('0x59')](_0x5920ad[_0x2bff('0x4e')],qs[_0x2bff('0x5b')](_0x92e93[_0x2bff('0x57')][_0x2bff('0x5b')]));_0x3f3856[_0x2bff('0x5a')]=_0x3f3856[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0x3f3856[_0x2bff('0x5a')]:_0x5920ad[_0x2bff('0x4e')];if(!_0x92e93[_0x2bff('0x57')][_0x2bff('0x7b')](_0x2bff('0x7c'))){_0x3f3856[_0x2bff('0x24')]=qs['limit'](_0x92e93[_0x2bff('0x57')][_0x2bff('0x24')]);_0x3f3856['offset']=qs[_0x2bff('0x22')](_0x92e93[_0x2bff('0x57')]['offset']);}_0x3f3856[_0x2bff('0x76')]=qs[_0x2bff('0x5d')](_0x92e93['query'][_0x2bff('0x5d')]);_0x3f3856[_0x2bff('0x60')]=qs[_0x2bff('0x58')](_['pick'](_0x92e93[_0x2bff('0x57')],_0x5920ad['filters']));_0x3f3856[_0x2bff('0x60')]['ChatWebsiteId']=_0x17ef3f['id'];if(_0x92e93['query']['filter']){_0x3f3856[_0x2bff('0x60')]=_[_0x2bff('0x61')](_0x3f3856[_0x2bff('0x60')],{'$or':_[_0x2bff('0x39')](_0x3f3856[_0x2bff('0x5a')],function(_0x2db529){var _0x2c31a3={};_0x2c31a3[_0x2db529]={'$like':'%'+_0x92e93[_0x2bff('0x57')]['filter']+'%'};return _0x2c31a3;})});}_0x3f3856=_[_0x2bff('0x61')]({},_0x3f3856,_0x92e93[_0x2bff('0x63')]);return db['CannedAnswer'][_0x2bff('0x25')]({'where':_0x3f3856[_0x2bff('0x60')]})[_0x2bff('0x15')](function(_0x25046a){_0x4ca62a[_0x2bff('0x25')]=_0x25046a;if(_0x92e93[_0x2bff('0x57')][_0x2bff('0x68')]){_0x3f3856[_0x2bff('0x64')]=[{'all':!![]}];}return db[_0x2bff('0x79')][_0x2bff('0x65')](_0x3f3856);})['then'](function(_0x28c337){_0x4ca62a['rows']=_0x28c337;return _0x4ca62a;});}})['then'](respondWithFilteredResult(_0x23d30b,_0x3f3856))[_0x2bff('0x1f')](handleError(_0x23d30b,null));};exports['removeAnswers']=function(_0x1a7fbb,_0x20f82e){return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x1a7fbb[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x20f82e,null))['then'](function(_0x628300){if(_0x628300){return _0x628300[_0x2bff('0x7d')](_0x1a7fbb['query'][_0x2bff('0x7e')]);}})['then'](respondWithStatusCode(_0x20f82e,null))['catch'](handleError(_0x20f82e,null));};exports['addLogo']=function(_0x203d0c,_0x1112a0){_0x203d0c[_0x2bff('0x6a')][_0x2bff('0x7f')]=_0x203d0c['file'][_0x2bff('0x80')];return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x203d0c['params']['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x1112a0,null))[_0x2bff('0x15')](saveUpdates(_0x203d0c[_0x2bff('0x6a')],null))['then'](respondWithResult(_0x1112a0,null))[_0x2bff('0x1f')](handleError(_0x1112a0,null));};exports[_0x2bff('0x81')]=function(_0x37f61e,_0x13a2be){_0x37f61e[_0x2bff('0x6a')][_0x2bff('0x82')]=_0x37f61e[_0x2bff('0x83')][_0x2bff('0x80')];return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x37f61e[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x13a2be,null))['then'](saveUpdates(_0x37f61e['body'],null))[_0x2bff('0x15')](respondWithResult(_0x13a2be,null))[_0x2bff('0x1f')](handleError(_0x13a2be,null));};exports['addCustomerAvatar']=function(_0x476152,_0x16d47c){_0x476152[_0x2bff('0x6a')]['customerAvatar']=_0x476152[_0x2bff('0x83')]['filename'];return db['ChatWebsite'][_0x2bff('0x6e')]({'where':{'id':_0x476152[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x16d47c,null))[_0x2bff('0x15')](saveUpdates(_0x476152[_0x2bff('0x6a')],null))[_0x2bff('0x15')](respondWithResult(_0x16d47c,null))[_0x2bff('0x1f')](handleError(_0x16d47c,null));};exports[_0x2bff('0x84')]=function(_0x7be39e,_0x286c0d){_0x7be39e[_0x2bff('0x6a')][_0x2bff('0x85')]=_0x7be39e[_0x2bff('0x83')][_0x2bff('0x80')];return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x7be39e[_0x2bff('0x67')]['id']}})['then'](handleEntityNotFound(_0x286c0d,null))[_0x2bff('0x15')](saveUpdates(_0x7be39e[_0x2bff('0x6a')],null))[_0x2bff('0x15')](respondWithResult(_0x286c0d,null))[_0x2bff('0x1f')](handleError(_0x286c0d,null));};exports[_0x2bff('0x86')]=function(_0x5be965,_0x99c3b2){var _0x4cc1b3=path['join'](config[_0x2bff('0x87')],_0x2bff('0x88'));var _0x302c6d={'where':{'id':_0x5be965['params']['id']},'attributes':['id',_0x2bff('0x7f')],'raw':!![]};var _0x1e2d4f=![];return require(_0x2bff('0x89'))[_0x2bff('0x8a')]()['then'](function(_0x5742c5){if(_0x5742c5){_0x1e2d4f=_0x5742c5[_0x2bff('0x8b')];}})[_0x2bff('0x15')](function(){return db[_0x2bff('0x53')][_0x2bff('0x6e')](_0x302c6d);})[_0x2bff('0x15')](handleEntityNotFound(_0x99c3b2,null))[_0x2bff('0x15')](function(_0x1883e4){if(_0x1883e4){if(!_[_0x2bff('0x8c')](_0x1883e4['sitepic'])){if(fs[_0x2bff('0x8d')](path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x8f'),_0x1883e4[_0x2bff('0x7f')]))&&_0x1e2d4f){_0x4cc1b3=path[_0x2bff('0x8e')](config['root'],_0x2bff('0x8f'),_0x1883e4[_0x2bff('0x7f')]);}}return _0x99c3b2[_0x2bff('0x90')](_0x4cc1b3);}})[_0x2bff('0x1f')](handleError(_0x99c3b2,null));};exports[_0x2bff('0x91')]=function(_0x6d3362,_0x45c77d){var _0x5c68de=path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x92'));var _0xaaf628={'where':{'id':_0x6d3362[_0x2bff('0x67')]['id']},'attributes':['id','agentAvatar'],'raw':!![]};return db[_0x2bff('0x53')][_0x2bff('0x6e')](_0xaaf628)[_0x2bff('0x15')](handleEntityNotFound(_0x45c77d,null))['then'](function(_0x2684eb){if(_0x2684eb){if(!_['isNil'](_0x2684eb[_0x2bff('0x82')])){if(fs[_0x2bff('0x8d')](path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x93'),_0x2684eb[_0x2bff('0x82')]))){_0x5c68de=path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x93'),_0x2684eb[_0x2bff('0x82')]);}}return _0x45c77d[_0x2bff('0x90')](_0x5c68de);}})[_0x2bff('0x1f')](handleError(_0x45c77d,null));};exports[_0x2bff('0x94')]=function(_0x5b7cb2,_0x28ff35){var _0x22d0f4=path[_0x2bff('0x8e')](config[_0x2bff('0x87')],'server/files/images/avatars/customer_avatar.png');var _0x492eb4={'where':{'id':_0x5b7cb2['params']['id']},'attributes':['id',_0x2bff('0x95'),_0x2bff('0x96')],'raw':!![]};return db[_0x2bff('0x53')][_0x2bff('0x6e')](_0x492eb4)[_0x2bff('0x15')](handleEntityNotFound(_0x28ff35,null))[_0x2bff('0x15')](function(_0xc6967e){if(_0xc6967e){if(!_[_0x2bff('0x8c')](_0xc6967e[_0x2bff('0x95')])){if(fs['existsSync'](path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x93'),_0xc6967e['customerAvatar']))&&_0xc6967e[_0x2bff('0x96')]){_0x22d0f4=path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x93'),_0xc6967e['customerAvatar']);}}return _0x28ff35[_0x2bff('0x90')](_0x22d0f4);}})[_0x2bff('0x1f')](handleError(_0x28ff35,null));};exports[_0x2bff('0x97')]=function(_0x4b6604,_0x437df5){var _0xb7d8a4=path['join'](config['root'],_0x2bff('0x98'));var _0x229ef7={'where':{'id':_0x4b6604[_0x2bff('0x67')]['id']},'attributes':['id',_0x2bff('0x85')],'raw':!![]};return db[_0x2bff('0x53')][_0x2bff('0x6e')](_0x229ef7)[_0x2bff('0x15')](handleEntityNotFound(_0x437df5,null))['then'](function(_0x1ae266){if(_0x1ae266){if(!_[_0x2bff('0x8c')](_0x1ae266[_0x2bff('0x85')])){if(fs['existsSync'](path[_0x2bff('0x8e')](config['root'],'server/files/images/avatars/',_0x1ae266[_0x2bff('0x85')]))){_0xb7d8a4=path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0x93'),_0x1ae266[_0x2bff('0x85')]);}}return _0x437df5[_0x2bff('0x90')](_0xb7d8a4);}})[_0x2bff('0x1f')](handleError(_0x437df5,null));};exports[_0x2bff('0x99')]=function(_0x57b296,_0x38bd71){var _0x364aae={'body':_0x57b296['body'],'channel':_0x2bff('0x9a')};var _0x4c28f1=[];var _0x1ca298=[];var _0x10f82f={};var _0x3fe972=![];return db[_0x2bff('0x9b')][_0x2bff('0x72')]()['then'](function(_0x1d339a){if(!_0x1d339a){throw new db[(_0x2bff('0x9c'))][(_0x2bff('0x9d'))]('no\x20available\x20attributes');}_0x4c28f1=_['difference'](_[_0x2bff('0x56')](_0x1d339a),['createdAt','updatedAt']);_0x1ca298=_[_0x2bff('0x9e')](_[_0x2bff('0x56')](_0x1d339a),['createdAt',_0x2bff('0x9f'),_0x2bff('0xa0'),_0x2bff('0xa1')]);if(_0x57b296[_0x2bff('0x6a')]['id']){delete _0x57b296[_0x2bff('0x6a')]['id'];}if(_[_0x2bff('0x8c')](_0x57b296[_0x2bff('0x6a')]['from'])){throw new db['Sequelize'][(_0x2bff('0x9d'))]('from\x20is\x20mandatory');}if(_[_0x2bff('0x8c')](_0x57b296['body'][_0x2bff('0x6a')])||_0x57b296[_0x2bff('0x6a')]['body']===''){throw new db[(_0x2bff('0x9c'))][(_0x2bff('0x9d'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x2bff('0x8c')](_0x57b296[_0x2bff('0x6a')][_0x2bff('0xa2')])){throw new db[(_0x2bff('0x9c'))]['ValidationError']('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x1ca298);}if(!_[_0x2bff('0xa3')](_0x1ca298,_0x57b296[_0x2bff('0x6a')][_0x2bff('0xa2')])){throw new db['Sequelize'][(_0x2bff('0x9d'))](_0x2bff('0xa4')+_0x1ca298);}_0x10f82f[_0x57b296[_0x2bff('0x6a')][_0x2bff('0xa2')]]=_0x57b296[_0x2bff('0x6a')][_0x2bff('0xa5')];})[_0x2bff('0x15')](function(){return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x57b296[_0x2bff('0x67')]['id']},'include':[{'model':db[_0x2bff('0xa6')],'as':_0x2bff('0xa7'),'include':[{'model':db[_0x2bff('0x9b')],'as':_0x2bff('0xa8'),'where':_0x10f82f,'limit':0x1,'order':[[_0x2bff('0x9f'),_0x2bff('0xa9')]]}]},{'model':db['ChatApplication'],'as':_0x2bff('0xaa')},{'model':db['Interval'],'as':_0x2bff('0x3a'),'include':[{'model':db[_0x2bff('0x3a')],'as':_0x2bff('0x3b'),'attributes':['id','interval'],'raw':!![]}]}]});})[_0x2bff('0x15')](function(_0x33c7b4){if(!_0x33c7b4)throw new APINotFoundError(util[_0x2bff('0x30')](_0x2bff('0xab'),_0x57b296[_0x2bff('0x67')]['id']));if(!_0x33c7b4[_0x2bff('0x3a')]||!_0x33c7b4[_0x2bff('0x3a')][_0x2bff('0x3b')])return[_0x33c7b4,!![]];return[_0x33c7b4,checkWebsiteIntervals(_0x33c7b4)];})[_0x2bff('0xac')](function(_0x90e90f,_0x217740){if(!_0x217740)throw new APIOutOfIntervalError();if(!_0x90e90f['List'])return;_0x364aae[_0x2bff('0xad')]=_0x90e90f;_0x364aae['list']=_0x90e90f[_0x2bff('0xa7')];_0x364aae[_0x2bff('0xae')]=_['orderBy'](_0x90e90f[_0x2bff('0xaa')],[_0x2bff('0xaf')],[_0x2bff('0xb0')]);if(_0x364aae[_0x2bff('0xad')][_0x2bff('0xaa')]){delete _0x364aae[_0x2bff('0xad')]['Applications'];}if(_0x364aae['account']['List']&&_0x364aae['account'][_0x2bff('0xa7')]['Contacts'][_0x2bff('0x5c')]){return _0x364aae[_0x2bff('0xad')][_0x2bff('0xa7')][_0x2bff('0xa8')][0x0];}var _0x4b69d8=_[_0x2bff('0xb1')](_0x57b296[_0x2bff('0x6a')],{'firstName':_0x57b296['body'][_0x2bff('0xa5')],'ListId':_0x90e90f[_0x2bff('0xa1')]});_0x4b69d8[_0x57b296[_0x2bff('0x6a')][_0x2bff('0xa2')]]=_0x57b296[_0x2bff('0x6a')]['from'];return db[_0x2bff('0x9b')]['create'](_0x4b69d8,{'fields':_0x4c28f1,'raw':!![]});})[_0x2bff('0x15')](function(_0x3000c5){_0x364aae[_0x2bff('0xb2')]=_0x3000c5;var _0x3b131d=createInteractionObject(_0x57b296[_0x2bff('0x67')]['id'],_0x57b296[_0x2bff('0x6a')],_0x57b296[_0x2bff('0xb3')],_0x3000c5);var _0x3c5e05={'ChatWebsiteId':_0x57b296['params']['id'],'closed':![]};if(_0x57b296['body'][_0x2bff('0xb4')]){_0x3c5e05[_0x2bff('0xb4')]=_0x57b296['body'][_0x2bff('0xb4')];return db[_0x2bff('0xb5')][_0x2bff('0x6e')]({'where':_0x3c5e05})['then'](function(_0x4b2137){if(_0x4b2137){_0x3fe972=!![];return _0x4b2137;}_0x3b131d[_0x2bff('0xb4')]=_0x57b296[_0x2bff('0x6a')][_0x2bff('0xb4')];_0x3b131d['externalUrl']=_0x57b296[_0x2bff('0x6a')][_0x2bff('0xb6')];return db['ChatInteraction'][_0x2bff('0x69')](_0x3b131d);});}_0x3c5e05[_0x2bff('0xb7')]=_0x3000c5['id'];if(_0x57b296[_0x2bff('0x6a')]['interaction']&&_0x57b296['body'][_0x2bff('0xb8')]['id']){_0x3c5e05['id']=_0x57b296['body'][_0x2bff('0xb8')]['id'];return db[_0x2bff('0xb5')]['find']({'where':_0x3c5e05})[_0x2bff('0x15')](function(_0x8f1149){if(_0x8f1149){_0x3fe972=!![];return _0x8f1149;}return db[_0x2bff('0xb5')][_0x2bff('0x69')](_0x3b131d);});}return db[_0x2bff('0xb5')][_0x2bff('0x69')](_0x3b131d);})[_0x2bff('0x15')](function(_0x5239d0){if(!_0x3fe972)return _0x5239d0;var _0x43c38b={'from':(_0x364aae[_0x2bff('0xb2')][_0x2bff('0xb9')]||'')+'\x20'+(_0x364aae[_0x2bff('0xb2')][_0x2bff('0x46')]||'')};if(_0x57b296[_0x2bff('0x6a')][_0x2bff('0xb4')]&&_0x57b296['body'][_0x2bff('0xba')]&&_0x57b296[_0x2bff('0x6a')][_0x2bff('0xb4')]!=_0x57b296[_0x2bff('0x6a')][_0x2bff('0xba')]){_0x43c38b[_0x2bff('0xb4')]=_0x57b296['body'][_0x2bff('0xba')];}return _0x5239d0['update'](_0x43c38b);})[_0x2bff('0x15')](function(_0x5c4c6a){_0x364aae[_0x2bff('0xb8')]=_0x5c4c6a[_0x2bff('0x28')]({'plain':!![]});_0x364aae[_0x2bff('0xb8')][_0x2bff('0xbb')]=!_0x3fe972;if(_0x364aae[_0x2bff('0xb8')][_0x2bff('0xbb')]){if(_0x364aae['account'][_0x2bff('0xbc')]){_0x364aae[_0x2bff('0xae')][_0x2bff('0xbd')]({'id':0x0,'priority':_0x364aae[_0x2bff('0xae')][_0x2bff('0x5c')]+0x1,'app':_0x2bff('0xbe'),'appdata':_0x2bff('0xbf'),'interval':_0x2bff('0xc0')});}}return db['ChatMessage'][_0x2bff('0x69')]({'body':_0x57b296['body'][_0x2bff('0x6a')],'ChatWebsiteId':_0x57b296[_0x2bff('0x67')]['id'],'ChatInteractionId':_0x5c4c6a['id'],'direction':'in','ContactId':_0x364aae[_0x2bff('0xb2')]['id'],'AttachmentId':_0x57b296['body'][_0x2bff('0xc1')]});})['then'](function(_0x4d7ecf){_0x364aae[_0x2bff('0x1d')]=_0x4d7ecf;if(!_0x364aae[_0x2bff('0xb8')]['UserId']){return;}return db[_0x2bff('0xc2')][_0x2bff('0x6e')]({'attributes':['id',_0x2bff('0x2d')],'where':{'id':_0x364aae[_0x2bff('0xb8')][_0x2bff('0xc3')]}});})[_0x2bff('0x15')](function(_0x9e5373){if(_0x9e5373){_0x364aae[_0x2bff('0xae')][_0x2bff('0xc4')]({'id':0x0,'priority':0x0,'app':_0x2bff('0xc5'),'appdata':_0x9e5373[_0x2bff('0x2d')]+','+(_0x364aae[_0x2bff('0xad')][_0x2bff('0xc6')]||0xa),'interval':_0x2bff('0xc0')});_0x364aae[_0x2bff('0xc7')]=!![];}if(!_0x364aae[_0x2bff('0xb8')][_0x2bff('0xc8')]){return;}return db[_0x2bff('0xc9')][_0x2bff('0x6e')]({'attributes':['id',_0x2bff('0x2d')],'where':{'id':_0x364aae['interaction']['queueId']}});})['then'](function(_0x507153){if(_0x507153){_0x364aae[_0x2bff('0xae')][_0x2bff('0xc4')]({'id':0x0,'priority':0x1,'app':_0x2bff('0xca'),'appdata':_0x507153[_0x2bff('0x2d')]+','+(_0x364aae['account'][_0x2bff('0xcb')]||0x12c),'interval':_0x2bff('0xc0')});}return respondWithRpcPromise(_0x2bff('0xcc'),_0x2bff('0xcd'),_0x364aae);})['then'](function(_0x2f92d8){respondWithRpcPromise('EventManager','EventManager',{'event':_0x2bff('0x99'),'message':_0x2f92d8},client9002);return _0x2f92d8;})[_0x2bff('0x15')](respondWithResult(_0x38bd71,null))[_0x2bff('0x1f')](APIHandleError(_0x38bd71));};exports[_0x2bff('0xce')]=function(_0x245c21,_0x51523e){var _0x4d3c3a,_0x35da45,_0x233f90;var _0x1256bb=[];var _0x547e90={};var _0xe8a7c9=_0x245c21[_0x2bff('0xcf')]||[];var _0xc0a20d=[];var _0x3a984f;return db['CmContact'][_0x2bff('0x72')]()[_0x2bff('0x15')](function(_0x76c09a){if(!_0x76c09a){throw new db[(_0x2bff('0x9c'))][(_0x2bff('0x9d'))](_0x2bff('0xd0'));}_0x1256bb=_[_0x2bff('0x9e')](_[_0x2bff('0x56')](_0x76c09a),[_0x2bff('0xd1'),_0x2bff('0x9f'),_0x2bff('0xa0'),'ListId']);if(_0x245c21[_0x2bff('0x6a')]['id']){delete _0x245c21[_0x2bff('0x6a')]['id'];}if(_[_0x2bff('0x8c')](_0x245c21['body'][_0x2bff('0xa5')])){throw _0x51523e['status'](0x1f4)[_0x2bff('0xd2')](new db['Sequelize'][(_0x2bff('0x9d'))]('from\x20is\x20mandatory'));}if(_['isNil'](_0x245c21[_0x2bff('0x6a')][_0x2bff('0x6a')])||_0x245c21['body']['body']===''){throw _0x51523e[_0x2bff('0x26')](0x1f4)[_0x2bff('0xd2')](new db[(_0x2bff('0x9c'))][(_0x2bff('0x9d'))](_0x2bff('0xd3')));}if(_[_0x2bff('0x8c')](_0x245c21[_0x2bff('0x6a')]['mapKeyOffline'])){throw _0x51523e['status'](0x1f4)[_0x2bff('0xd2')](new db[(_0x2bff('0x9c'))][(_0x2bff('0x9d'))](_0x2bff('0xd4')+_0x1256bb));}if(!_[_0x2bff('0xa3')](_0x1256bb,_0x245c21[_0x2bff('0x6a')][_0x2bff('0xd5')])){throw _0x51523e[_0x2bff('0x26')](0x1f4)[_0x2bff('0xd2')](new db[(_0x2bff('0x9c'))][(_0x2bff('0x9d'))]('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x1256bb));}_0x547e90[_0x245c21[_0x2bff('0x6a')][_0x2bff('0xd5')]]=_0x245c21[_0x2bff('0x6a')][_0x2bff('0xa5')];})[_0x2bff('0x15')](function(){return db['ChatWebsite']['find']({'where':{'id':_0x245c21[_0x2bff('0x67')]['id']},'include':[{'model':db[_0x2bff('0xa6')],'as':'List'},{'model':db[_0x2bff('0xd6')],'as':_0x2bff('0xd6')}]});})['then'](handleEntityNotFound(_0x51523e,null))['then'](function(_0x55ea5c){if(_0x55ea5c&&_0x55ea5c[_0x2bff('0xa7')]){_0x35da45=_0x55ea5c;var _0x34b276=_[_0x2bff('0xb1')](_0x245c21[_0x2bff('0x6a')],{'firstName':_0x245c21[_0x2bff('0x6a')][_0x2bff('0xa5')],'phone':_0x245c21[_0x2bff('0x6a')][_0x2bff('0xa5')],'ListId':_0x55ea5c['ListId']});_0x34b276[_0x245c21[_0x2bff('0x6a')][_0x2bff('0xd5')]]=_0x245c21['body'][_0x2bff('0xa5')];return db[_0x2bff('0x9b')][_0x2bff('0xd7')]({'where':_0x547e90,'defaults':_0x34b276});}})[_0x2bff('0xac')](function(_0x840292){if(_0x840292){_0x233f90=_0x840292;var _0xd7a0b4=fs[_0x2bff('0xd8')](path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0xd9')),_0x2bff('0xda'));var _0x25316e=ejs[_0x2bff('0xdb')](_0xd7a0b4,{'body':_[_0x2bff('0xdc')](_0x245c21[_0x2bff('0x6a')][_0x2bff('0x6a')]),'bodyTitle':_0x35da45[_0x2bff('0xdd')]});return db['ChatOfflineMessage']['create']({'body':_0x25316e,'plainBody':htmlToText['fromString'](_0x25316e),'ContactId':_0x840292['id'],'ChatWebsiteId':_0x35da45['id']});}})[_0x2bff('0x15')](function(_0x30dae9){_0x3a984f=_0x30dae9;if(_0xe8a7c9[_0x2bff('0x5c')]){var _0x99cb66=_0xe8a7c9['map'](function(_0x147810){return{'name':_0x147810[_0x2bff('0xde')],'basename':_0x147810[_0x2bff('0x80')],'type':_0x147810[_0x2bff('0xdf')],'ChatOfflineMessageId':_0x30dae9['id']};});_0xc0a20d=_0x99cb66[_0x2bff('0x39')](_0x106487=>{var _0x8016e={'filename':_0x106487[_0x2bff('0x2d')],'path':path[_0x2bff('0x8e')](config[_0x2bff('0x87')],_0x2bff('0xe0'),_0x2bff('0xcf'),_0x2bff('0xe1'),_0x2bff('0xe2'),_0x106487[_0x2bff('0xe3')])};return _0x8016e;});if(!_0x35da45[_0x2bff('0xe4')]){return db[_0x2bff('0xe5')]['transaction'](function(_0xde922c){return db['Attachment']['bulkCreate'](_0x99cb66,{'transaction':_0xde922c});});}}})['then'](function(){if(_0x3a984f){_0x4d3c3a=_0x3a984f;return db[_0x2bff('0xd6')][_0x2bff('0x75')]({'where':{'service':!![]},'include':[{'model':db[_0x2bff('0xe6')],'as':'Smtp','raw':!![],'include':[{'model':db[_0x2bff('0xe7')],'as':_0x2bff('0xe7'),'raw':!![]}]}]});}})[_0x2bff('0x15')](function(_0x2407fd){if(_0x2407fd&&_0x2407fd[_0x2bff('0xe8')]&&_0x35da45['forwardOffline']&&_0x35da45[_0x2bff('0xe9')]){var _0x32820a=_0x2407fd[_0x2bff('0xea')]();return respondWithRpcPromise(_0x2bff('0xeb'),_0x2bff('0xec'),{'account':_0x32820a,'message':{'from':util[_0x2bff('0x30')]('\x22%s\x22\x20<%s>',_0x2407fd[_0x2bff('0x2d')],_0x2407fd[_0x2bff('0xed')]||_0x2407fd[_0x2bff('0xe8')][_0x2bff('0x6b')]),'to':_0x35da45['forwardOfflineAddress'],'subject':_0x35da45[_0x2bff('0xee')],'html':_0x4d3c3a[_0x2bff('0x6a')],'attachments':_0xc0a20d}},client9003)[_0x2bff('0x15')](function(){return _0x4d3c3a;})[_0x2bff('0x1f')](function(_0x21c3b9){logger[_0x2bff('0x1b')](_0x21c3b9);});}})[_0x2bff('0x15')](function(){if(_0x35da45&&_0x35da45['openNewInteraction']&&_0x35da45[_0x2bff('0xef')]){var _0x5bdb9c=[];if(_0xe8a7c9[_0x2bff('0x5c')]){_0x5bdb9c=_0xe8a7c9[_0x2bff('0x39')](function(_0x481182){return{'name':_0x481182[_0x2bff('0xde')],'basename':_0x481182[_0x2bff('0x80')],'type':_0x481182[_0x2bff('0xdf')],'ChatOfflineMessageId':_0x3a984f['id']};});}var _0x353eb0;if(!_['isNil'](_0x35da45[_0x2bff('0xf0')])){var _0x343928=_['map'](_0x245c21['body'],function(_0x1125d5){return _0x1125d5;});var _0x31cfdd=_[_0x2bff('0xf1')](_0x343928)[0x0];var _0xe56304=_[_0x2bff('0xf2')](_0x31cfdd,function(_0x53c058){return _0x53c058;});_0x353eb0=_0xe56304[0x1][_0x35da45['subjectOffline']];}var _0x317a4f={'from':_0x233f90[_0x2bff('0xed')],'firstName':_0x233f90[_0x2bff('0xb9')],'lastName':_0x233f90[_0x2bff('0x46')],'mapKey':_0x2bff('0xed'),'message':{'from':_0x233f90[_0x2bff('0xed')],'to':_0x35da45[_0x2bff('0xd6')]['email'],'cc':'','subject':_[_0x2bff('0x8c')](_0x353eb0)?_0x35da45[_0x2bff('0xee')]:_0x353eb0,'messageId':'','sentAt':new Date(),'attach':_0x5bdb9c[_0x2bff('0x5c')],'attachments':_0x5bdb9c,'originChannel':_0x2bff('0xf3'),'ChatWebsiteId':_0x35da45['id'],'ChatOfflineMessageId':_0x4d3c3a['id'],'originTo':_0x35da45[_0x2bff('0xd6')][_0x2bff('0xed')]},'body':_0x4d3c3a[_0x2bff('0x6a')]};var _0x120186={'account':{'id':_0x35da45[_0x2bff('0xef')]},'body':_0x317a4f,'log':_0x2bff('0xf4')};return respondWithRpcPromise(_0x2bff('0xf4'),_0x2bff('0xf5'),_0x120186,client9001)[_0x2bff('0x15')](function(){return _0x4d3c3a;})[_0x2bff('0x1f')](function(_0x1dd021){logger[_0x2bff('0x1b')](_0x1dd021);});}return;})[_0x2bff('0x15')](function(){if(_0x4d3c3a){return _0x4d3c3a;}})[_0x2bff('0x15')](respondWithResult(_0x51523e,null))['catch'](function(){for(var _0xd05e0b of _0xe8a7c9){var _0x4be99e=path['join'](config['root'],_0x2bff('0xe0'),_0x2bff('0xcf'),_0x2bff('0xe1'),_0x2bff('0xe2'),_0xd05e0b['filename']);fs_extra[_0x2bff('0xf6')](_0x4be99e)[_0x2bff('0x1f')](function(_0x5b62fc){logger['error']('Could\x20not\x20remove\x20attachment\x20file',_0x4be99e,_0x5b62fc);});}});};exports[_0x2bff('0xf7')]=function(_0x969cdd,_0x5351bc){return db[_0x2bff('0xb5')]['find']({'where':{'id':_0x969cdd[_0x2bff('0x67')]['id']}})['then'](handleEntityNotFound(_0x5351bc,null))[_0x2bff('0x15')](function(_0x4b4e9a){if(_0x4b4e9a){return _0x4b4e9a[_0x2bff('0xf7')](_0x969cdd['body']['ids'],_[_0x2bff('0xf8')](_0x969cdd[_0x2bff('0x6a')],[_0x2bff('0x7e'),'id'])||{});}})[_0x2bff('0x15')](respondWithResult(_0x5351bc,null))[_0x2bff('0x1f')](handleError(_0x5351bc,null));};exports['getInteractions']=function(_0x3c138d,_0x2e6e4b){var _0x2ae31a={'raw':![],'where':{}};var _0x16e837={};var _0x137e70={'count':0x0,'rows':[]};return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x3c138d['params']['id']}})['then'](handleEntityNotFound(_0x2e6e4b,null))[_0x2bff('0x15')](function(_0x4ba82e){if(_0x4ba82e){_0x16e837[_0x2bff('0x4e')]=_[_0x2bff('0x56')](db[_0x2bff('0xb5')][_0x2bff('0x54')]);_0x16e837[_0x2bff('0x57')]=_[_0x2bff('0x56')](_0x3c138d[_0x2bff('0x57')]);_0x16e837['filters']=_[_0x2bff('0x59')](_0x16e837[_0x2bff('0x4e')],_0x16e837[_0x2bff('0x57')]);_0x2ae31a['attributes']=_['intersection'](_0x16e837[_0x2bff('0x4e')],qs[_0x2bff('0x5b')](_0x3c138d[_0x2bff('0x57')]['fields']));_0x2ae31a[_0x2bff('0x5a')]=_0x2ae31a['attributes'][_0x2bff('0x5c')]?_0x2ae31a[_0x2bff('0x5a')]:_0x16e837['model'];if(!_0x3c138d[_0x2bff('0x57')][_0x2bff('0x7b')](_0x2bff('0x7c'))){_0x2ae31a[_0x2bff('0x24')]=qs['limit'](_0x3c138d['query'][_0x2bff('0x24')]);_0x2ae31a['offset']=qs[_0x2bff('0x22')](_0x3c138d[_0x2bff('0x57')]['offset']);}_0x2ae31a[_0x2bff('0x76')]=qs[_0x2bff('0x5d')](_0x3c138d[_0x2bff('0x57')][_0x2bff('0x5d')]);_0x2ae31a['where']=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x3c138d[_0x2bff('0x57')],_0x16e837[_0x2bff('0x58')]));_0x2ae31a[_0x2bff('0x60')]['ChatWebsiteId']=_0x4ba82e['id'];if(_0x3c138d[_0x2bff('0x57')]['filter']){_0x2ae31a[_0x2bff('0x60')]=_['merge'](_0x2ae31a[_0x2bff('0x60')],{'$or':_['map'](_0x2ae31a[_0x2bff('0x5a')],function(_0x50ed9e){var _0xda666f={};_0xda666f[_0x50ed9e]={'$like':'%'+_0x3c138d[_0x2bff('0x57')][_0x2bff('0x5f')]+'%'};return _0xda666f;})});}_0x2ae31a=_[_0x2bff('0x61')]({},_0x2ae31a,_0x3c138d['options']);return db[_0x2bff('0xb5')]['count']({'where':_0x2ae31a['where']})[_0x2bff('0x15')](function(_0x1cb33c){_0x137e70[_0x2bff('0x25')]=_0x1cb33c;if(_0x3c138d[_0x2bff('0x57')][_0x2bff('0x68')]){_0x2ae31a[_0x2bff('0x64')]=[{'model':db[_0x2bff('0x9b')],'as':_0x2bff('0xf9'),'required':![]},{'model':db['User'],'as':_0x2bff('0xfa'),'attributes':[_0x2bff('0x2d'),_0x2bff('0xfb'),_0x2bff('0xfc')],'required':![]},{'model':db[_0x2bff('0xfd')],'as':'Tags','attributes':['id',_0x2bff('0x2d'),_0x2bff('0xfe')],'where':_0x3c138d[_0x2bff('0x57')]['tag']?{'id':_0x3c138d[_0x2bff('0x57')][_0x2bff('0xff')]}:undefined,'required':_0x3c138d[_0x2bff('0x57')][_0x2bff('0xff')]?!![]:![]}];}return db['ChatInteraction'][_0x2bff('0x65')](_0x2ae31a);})[_0x2bff('0x15')](function(_0x33a47c){_0x137e70[_0x2bff('0x66')]=_0x33a47c;return _0x137e70;});}})[_0x2bff('0x15')](respondWithFilteredResult(_0x2e6e4b,_0x2ae31a))[_0x2bff('0x1f')](handleError(_0x2e6e4b,null));};exports[_0x2bff('0x2f')]=function(_0x22a79a,_0x42aaea){var _0x2d6540=0x0;var _0x441712=0x0;var _0x519bac=![];var _0x2f3623;var _0x3e911d;return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x22a79a[_0x2bff('0x67')]['id']},'include':[{'model':db[_0x2bff('0x3a')],'as':_0x2bff('0x3a'),'include':[{'model':db['Interval'],'as':'Intervals','attributes':['id',_0x2bff('0x32')]}]}]})[_0x2bff('0x15')](handleEntityNotFound(_0x42aaea,null))[_0x2bff('0x15')](function(_0x45785d){if(_0x45785d){_0x2f3623=_0x45785d;return _0x45785d['getProactiveActions']({'raw':!![]});}})[_0x2bff('0x15')](function(_0x1f4aa5){if(_0x2f3623){if(_0x1f4aa5){_0x3e911d=_0x1f4aa5;}}return require('../../config/license/util')[_0x2bff('0x8a')]();})['then'](function(_0x514e2f){if(_0x514e2f){_0x441712=_0x514e2f[_0x2bff('0x100')];_0x519bac=_0x514e2f[_0x2bff('0x8b')];}})[_0x2bff('0x15')](function(){return db[_0x2bff('0xb5')][_0x2bff('0x25')]({'where':{'closed':![]}});})[_0x2bff('0x15')](function(_0x1bbe97){_0x2d6540=_0x1bbe97;if(_0x441712&&_0x1bbe97>_0x441712){return db['License']['findOne']({'where':{'id':0x1}})[_0x2bff('0x15')](function(_0x3beac8){if(_0x3beac8){_0x3beac8[_0x2bff('0x101')](_0x2bff('0x102'));}});}})[_0x2bff('0x15')](function(){if(!_0x2f3623[_0x2bff('0x3a')]||!_0x2f3623['Interval'][_0x2bff('0x3b')])return!![];return checkWebsiteIntervals(_0x2f3623);})['then'](function(_0x29b888){var _0x22810e=fs[_0x2bff('0xd8')](path[_0x2bff('0x8e')](config[_0x2bff('0x87')],'server/files/chat/iframe.ejs'),_0x2bff('0xda'));var _0x4aff0c=new url[(_0x2bff('0x103'))](_0x2f3623[_0x2bff('0x104')])[_0x2bff('0x105')];var _0x55aab5=_0x2bff('0x106');var _0x5cdec4=![];var _0x143684={'chatVersion':_0x55aab5,'chatWebsiteAddressOrigin':_0x4aff0c,'remote':_0x2f3623['remote'],'query':querystring[_0x2bff('0x1a')](_[_0x2bff('0x61')](_0x2f3623[_0x2bff('0x28')]({'plain':!![]}),{'customerIp':_0x22a79a['headers'][_0x2bff('0x43')]||_0x22a79a['headers'][_0x2bff('0x107')]||_0x22a79a[_0x2bff('0x108')][_0x2bff('0x109')]||_0x22a79a['ip'],'referer':_0x22a79a[_0x2bff('0xb3')]['referer'],'openedInteractions':_0x2d6540,'maxInteractions':_0x441712,'virtual':_0x519bac['virtual'],'online':_0x29b888,'custom':_0x519bac}))[_0x2bff('0x10a')](/'/g,'\x5c\x27')};_0x42aaea[_0x2bff('0xd2')](ejs[_0x2bff('0xdb')](Mustache[_0x2bff('0xdb')](_0x22810e,_0x143684),{'proactiveActions':_0x3e911d,'alignment':_0x2f3623['alignment'],'verticalAlignment':_0x2f3623['verticalAlignment'],'div_color':_0x2f3623[_0x2bff('0xfe')],'labelText':_0x2f3623[_0x2bff('0x10b')],'text_color':_0x2f3623[_0x2bff('0x10c')],'text_button_color':_0x2f3623[_0x2bff('0x10d')],'button_color':_0x2f3623[_0x2bff('0x10e')],'background_color':_0x2f3623[_0x2bff('0x10f')],'hideWhenOffline':_0x2f3623[_0x2bff('0x110')],'intervalId':_0x2f3623[_0x2bff('0x111')],'isDevelopment':_0x5cdec4,'chatVersion':_0x55aab5}));})['catch'](handleError(_0x42aaea,null));};exports['addApplications']=function(_0x440667,_0x10b6f8){var _0x2da60c=_0x440667[_0x2bff('0x67')]['id'];var _0x28f352=_0x440667['body'];var _0x371dba=0xc8;var _0x184410=null;return db[_0x2bff('0xe5')][_0x2bff('0x112')]({'isolationLevel':db[_0x2bff('0xe5')]['Transaction'][_0x2bff('0x113')][_0x2bff('0x114')]},function(_0x4042f8){return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x2da60c},'transaction':_0x4042f8})[_0x2bff('0x15')](function(_0x1259b9){if(_0x1259b9){return db[_0x2bff('0x115')]['destroy']({'where':{'ChatWebsiteId':_0x2da60c},'transaction':_0x4042f8})['then'](function(){var _0x51b87f=_[_0x2bff('0x39')](_0x28f352,function(_0x2a0298){_0x2a0298['ChatWebsiteId']=_0x2da60c;return _0x2a0298;});return db['ChatApplication'][_0x2bff('0x116')](_0x51b87f,{'transaction':_0x4042f8});});}else{_0x371dba=0x194;_0x184410=[];}});})['then'](function(){if(_0x371dba!==0x194){return db[_0x2bff('0x115')][_0x2bff('0x117')]({'where':{'ChatWebsiteId':_0x2da60c},'order':_0x2bff('0xaf')})[_0x2bff('0x15')](function(_0x4ed5fd){_0x184410=_0x4ed5fd;});}})[_0x2bff('0x1f')](function(_0x4b06e6){_0x371dba=0x1f4;logger[_0x2bff('0x1b')](_0x4b06e6[_0x2bff('0x2c')]);if(_0x4b06e6[_0x2bff('0x2d')]){delete _0x4b06e6['name'];}_0x184410=_0x4b06e6;})['finally'](function(){if(_0x184410===null){_0x10b6f8['sendStatus'](_0x371dba);}else{if(_0x371dba===0x1f4){_0x10b6f8[_0x2bff('0x26')](_0x371dba)[_0x2bff('0xd2')](_0x184410);}else{_0x10b6f8[_0x2bff('0x26')](_0x371dba)[_0x2bff('0x21')](_0x184410);}}});};exports[_0x2bff('0x118')]=function(_0x539578,_0x5938b1){var _0x3bf140={};var _0x18b821={};var _0x327090;var _0x25afc8;return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x539578[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x5938b1,null))[_0x2bff('0x15')](function(_0xd793c2){if(_0xd793c2){_0x327090=_0xd793c2;_0x18b821[_0x2bff('0x4e')]=_[_0x2bff('0x56')](db[_0x2bff('0x115')]['rawAttributes']);_0x18b821['query']=_[_0x2bff('0x56')](_0x539578[_0x2bff('0x57')]);_0x18b821['filters']=_[_0x2bff('0x59')](_0x18b821[_0x2bff('0x4e')],_0x18b821['query']);_0x3bf140[_0x2bff('0x5a')]=_['intersection'](_0x18b821[_0x2bff('0x4e')],qs[_0x2bff('0x5b')](_0x539578[_0x2bff('0x57')][_0x2bff('0x5b')]));_0x3bf140[_0x2bff('0x5a')]=_0x3bf140[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0x3bf140[_0x2bff('0x5a')]:_0x18b821[_0x2bff('0x4e')];_0x3bf140[_0x2bff('0x76')]=qs[_0x2bff('0x5d')](_0x539578[_0x2bff('0x57')]['sort']);_0x3bf140['where']=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x539578['query'],_0x18b821['filters']));if(_0x539578[_0x2bff('0x57')][_0x2bff('0x5f')]){_0x3bf140[_0x2bff('0x60')]=_[_0x2bff('0x61')](_0x3bf140[_0x2bff('0x60')],{'$or':_['map'](_0x3bf140[_0x2bff('0x5a')],function(_0x2b0c29){var _0x522ad7={};_0x522ad7[_0x2b0c29]={'$like':'%'+_0x539578[_0x2bff('0x57')]['filter']+'%'};return _0x522ad7;})});}_0x3bf140=_[_0x2bff('0x61')]({},_0x3bf140,_0x539578[_0x2bff('0x63')]);return _0x327090[_0x2bff('0x118')](_0x3bf140);}})[_0x2bff('0x15')](function(_0x29c307){if(_0x29c307){_0x25afc8=_0x29c307[_0x2bff('0x5c')];if(!_0x539578[_0x2bff('0x57')][_0x2bff('0x7b')](_0x2bff('0x7c'))){_0x3bf140[_0x2bff('0x24')]=qs[_0x2bff('0x24')](_0x539578['query'][_0x2bff('0x24')]);_0x3bf140[_0x2bff('0x22')]=qs['offset'](_0x539578[_0x2bff('0x57')][_0x2bff('0x22')]);}return _0x327090[_0x2bff('0x118')](_0x3bf140);}})['then'](function(_0x1a2f5a){if(_0x1a2f5a){return _0x1a2f5a?{'count':_0x25afc8,'rows':_0x1a2f5a}:null;}})['then'](respondWithResult(_0x5938b1,null))['catch'](handleError(_0x5938b1,null));};exports[_0x2bff('0x119')]=function(_0x59ec93,_0x4d4748){return db[_0x2bff('0x11a')][_0x2bff('0x6e')]({'where':{'id':_0x59ec93['params']['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x4d4748,null))['then'](function(_0x8d0a59){if(_0x8d0a59){return _0x8d0a59[_0x2bff('0x119')](_0x59ec93[_0x2bff('0x6a')][_0x2bff('0x7e')],_[_0x2bff('0xf8')](_0x59ec93[_0x2bff('0x6a')],[_0x2bff('0x7e'),'id'])||{});}})[_0x2bff('0x15')](respondWithResult(_0x4d4748,null))[_0x2bff('0x1f')](handleError(_0x4d4748,null));};exports[_0x2bff('0x11b')]=function(_0x38efa4,_0x16182c){var _0x1df7cb={};var _0x2d71cf={};var _0x4a576f;var _0x4932cd;return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x38efa4[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x16182c,null))[_0x2bff('0x15')](function(_0x25bc13){if(_0x25bc13){_0x4a576f=_0x25bc13;_0x2d71cf[_0x2bff('0x4e')]=_[_0x2bff('0x56')](db[_0x2bff('0x11c')]['rawAttributes']);_0x2d71cf[_0x2bff('0x57')]=_[_0x2bff('0x56')](_0x38efa4[_0x2bff('0x57')]);_0x2d71cf['filters']=_[_0x2bff('0x59')](_0x2d71cf[_0x2bff('0x4e')],_0x2d71cf[_0x2bff('0x57')]);_0x1df7cb[_0x2bff('0x5a')]=_[_0x2bff('0x59')](_0x2d71cf[_0x2bff('0x4e')],qs['fields'](_0x38efa4['query']['fields']));_0x1df7cb[_0x2bff('0x5a')]=_0x1df7cb[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0x1df7cb[_0x2bff('0x5a')]:_0x2d71cf[_0x2bff('0x4e')];_0x1df7cb[_0x2bff('0x76')]=qs[_0x2bff('0x5d')](_0x38efa4['query'][_0x2bff('0x5d')]);_0x1df7cb['where']=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x38efa4[_0x2bff('0x57')],_0x2d71cf['filters']));if(_0x38efa4[_0x2bff('0x57')]['filter']){_0x1df7cb[_0x2bff('0x60')]=_[_0x2bff('0x61')](_0x1df7cb['where'],{'$or':_['map'](_0x1df7cb[_0x2bff('0x5a')],function(_0x26ba85){var _0x2e7789={};_0x2e7789[_0x26ba85]={'$like':'%'+_0x38efa4['query']['filter']+'%'};return _0x2e7789;})});}_0x1df7cb=_[_0x2bff('0x61')]({},_0x1df7cb,_0x38efa4[_0x2bff('0x63')]);return _0x4a576f['getProactiveActions'](_0x1df7cb);}})['then'](function(_0x31e97b){if(_0x31e97b){_0x4932cd=_0x31e97b[_0x2bff('0x5c')];if(!_0x38efa4[_0x2bff('0x57')]['hasOwnProperty'](_0x2bff('0x7c'))){_0x1df7cb[_0x2bff('0x24')]=qs[_0x2bff('0x24')](_0x38efa4['query']['limit']);_0x1df7cb[_0x2bff('0x22')]=qs['offset'](_0x38efa4[_0x2bff('0x57')]['offset']);}return _0x4a576f['getProactiveActions'](_0x1df7cb);}})[_0x2bff('0x15')](function(_0x150a44){if(_0x150a44){return _0x150a44?{'count':_0x4932cd,'rows':_0x150a44}:null;}})['then'](respondWithResult(_0x16182c,null))['catch'](handleError(_0x16182c,null));};exports['getFields']=function(_0x3bfeda,_0x845aa6){var _0x337c03=_0x3bfeda['query'][_0x2bff('0x11d')]===_0x2bff('0x11e')?_0x2bff('0x11f'):'onlineForm';return db['ChatWebsite']['find']({'attributes':['id',_0x337c03],'where':{'id':_0x3bfeda[_0x2bff('0x67')]['id']}})['then'](handleEntityNotFound(_0x845aa6,null))['then'](function(_0xdfb139){if(_0xdfb139){var _0x8eea5d=_0xdfb139[_0x337c03];var _0x55a0b4=_0x8eea5d&&_0x8eea5d[_0x2bff('0x120')]?_0x8eea5d[_0x2bff('0x120')]:[];_0x845aa6['send']({'fromKey':_[_0x2bff('0x8c')](_0x8eea5d[_0x2bff('0x121')])?undefined:_0x8eea5d['fromKey'],'count':_0x55a0b4[_0x2bff('0x5c')],'rows':_0x55a0b4});}})[_0x2bff('0x1f')](handleError(_0x845aa6,null));};exports['getOfflineMessages']=function(_0x29f677,_0x4ea39f){var _0x40c93c={'raw':![],'where':{}};var _0x246d30={};var _0x1325f0={'count':0x0,'rows':[]};return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x29f677[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x4ea39f,null))[_0x2bff('0x15')](function(_0x8fb2c8){if(_0x8fb2c8){_0x246d30[_0x2bff('0x4e')]=_['keys'](db[_0x2bff('0x122')]['rawAttributes']);_0x246d30[_0x2bff('0x57')]=_[_0x2bff('0x56')](_0x29f677[_0x2bff('0x57')]);_0x246d30[_0x2bff('0x58')]=_[_0x2bff('0x59')](_0x246d30[_0x2bff('0x4e')],_0x246d30[_0x2bff('0x57')]);_0x40c93c[_0x2bff('0x5a')]=_[_0x2bff('0x59')](_0x246d30['model'],qs[_0x2bff('0x5b')](_0x29f677[_0x2bff('0x57')][_0x2bff('0x5b')]));_0x40c93c['attributes']=_0x40c93c['attributes'][_0x2bff('0x5c')]?_0x40c93c[_0x2bff('0x5a')]:_0x246d30['model'];if(!_0x29f677['query'][_0x2bff('0x7b')](_0x2bff('0x7c'))){_0x40c93c[_0x2bff('0x24')]=qs[_0x2bff('0x24')](_0x29f677[_0x2bff('0x57')][_0x2bff('0x24')]);_0x40c93c['offset']=qs[_0x2bff('0x22')](_0x29f677[_0x2bff('0x57')][_0x2bff('0x22')]);}_0x40c93c[_0x2bff('0x76')]=qs[_0x2bff('0x5d')](_0x29f677[_0x2bff('0x57')][_0x2bff('0x5d')]);_0x40c93c[_0x2bff('0x60')]=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x29f677[_0x2bff('0x57')],_0x246d30[_0x2bff('0x58')]));_0x40c93c['where'][_0x2bff('0x78')]=_0x8fb2c8['id'];if(_0x29f677['query'][_0x2bff('0x5f')]){_0x40c93c[_0x2bff('0x60')]=_[_0x2bff('0x61')](_0x40c93c[_0x2bff('0x60')],{'$or':_['map'](_0x40c93c[_0x2bff('0x5a')],function(_0x580f80){var _0x18ff45={};_0x18ff45[_0x580f80]={'$like':'%'+_0x29f677[_0x2bff('0x57')]['filter']+'%'};return _0x18ff45;})});}_0x40c93c=_[_0x2bff('0x61')]({},_0x40c93c,_0x29f677[_0x2bff('0x63')]);return db[_0x2bff('0x122')][_0x2bff('0x25')]({'where':_0x40c93c[_0x2bff('0x60')]})['then'](function(_0x587d24){_0x1325f0[_0x2bff('0x25')]=_0x587d24;if(_0x29f677[_0x2bff('0x57')]['includeAll']){_0x40c93c['include']=[{'all':!![]}];}else{_0x40c93c[_0x2bff('0x64')]=[{'model':db[_0x2bff('0x9b')],'as':_0x2bff('0xf9'),'required':![]},{'model':db['Attachment'],'as':_0x2bff('0x123'),'required':![]}];}return db[_0x2bff('0x122')][_0x2bff('0x65')](_0x40c93c);})['then'](function(_0x1dcde5){_0x1325f0[_0x2bff('0x66')]=_0x1dcde5;return _0x1325f0;});}})[_0x2bff('0x15')](respondWithFilteredResult(_0x4ea39f,_0x40c93c))[_0x2bff('0x1f')](handleError(_0x4ea39f,null));};exports['addAgents']=function(_0x2b5442,_0x1c3d2f){return db[_0x2bff('0x53')]['find']({'where':{'id':_0x2b5442[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x1c3d2f,null))[_0x2bff('0x15')](function(_0xec859f){if(_0xec859f){return _0xec859f[_0x2bff('0x124')](_0x2b5442['body'][_0x2bff('0x7e')],_[_0x2bff('0xf8')](_0x2b5442[_0x2bff('0x6a')],[_0x2bff('0x7e'),'id'])||{})[_0x2bff('0xac')](function(_0x4e30af){for(var _0x3515fd=0x0;_0x3515fd<_0x2b5442['body'][_0x2bff('0x7e')][_0x2bff('0x5c')];_0x3515fd+=0x1){socket[_0x2bff('0x125')](_0x2bff('0x126'),{'UserId':Number(_0x2b5442[_0x2bff('0x6a')]['ids'][_0x3515fd]),'ChatWebsiteId':Number(_0x2b5442[_0x2bff('0x67')]['id'])});}return _0x4e30af;});}})[_0x2bff('0x15')](respondWithResult(_0x1c3d2f,null))[_0x2bff('0x1f')](handleError(_0x1c3d2f,null));};exports[_0x2bff('0x127')]=function(_0x261ea2,_0x3edfb9){return db[_0x2bff('0x53')][_0x2bff('0x6e')]({'where':{'id':_0x261ea2[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x3edfb9,null))[_0x2bff('0x15')](function(_0x466d87){if(_0x466d87){return _0x466d87[_0x2bff('0x127')](_0x261ea2['query']['ids'])[_0x2bff('0x15')](function(){if(_[_0x2bff('0x128')](_0x261ea2[_0x2bff('0x57')][_0x2bff('0x7e')])){for(var _0xd00ccc=0x0;_0xd00ccc<_0x261ea2[_0x2bff('0x57')][_0x2bff('0x7e')][_0x2bff('0x5c')];_0xd00ccc+=0x1){socket[_0x2bff('0x125')]('userChatWebsite:remove',{'UserId':Number(_0x261ea2['query']['ids'][_0xd00ccc]),'ChatWebsiteId':Number(_0x261ea2[_0x2bff('0x67')]['id'])});}}else{socket[_0x2bff('0x125')](_0x2bff('0x129'),{'UserId':Number(_0x261ea2[_0x2bff('0x57')]['ids']),'ChatWebsiteId':Number(_0x261ea2['params']['id'])});}});}})[_0x2bff('0x15')](respondWithStatusCode(_0x3edfb9,null))[_0x2bff('0x1f')](handleError(_0x3edfb9,null));};exports[_0x2bff('0x12a')]=function(_0x54ba2a,_0x252b49){var _0x2c6aad={};var _0x1e710b={};var _0x494710;var _0x3200e2;return db[_0x2bff('0x53')][_0x2bff('0x75')]({'where':{'id':_0x54ba2a[_0x2bff('0x67')]['id']}})[_0x2bff('0x15')](handleEntityNotFound(_0x252b49,null))[_0x2bff('0x15')](function(_0x3bfa5b){if(_0x3bfa5b){_0x494710=_0x3bfa5b;_0x1e710b[_0x2bff('0x4e')]=_[_0x2bff('0x56')](db[_0x2bff('0xc2')][_0x2bff('0x54')]);_0x1e710b[_0x2bff('0x57')]=_[_0x2bff('0x56')](_0x54ba2a[_0x2bff('0x57')]);_0x1e710b[_0x2bff('0x58')]=_[_0x2bff('0x59')](_0x1e710b[_0x2bff('0x4e')],_0x1e710b[_0x2bff('0x57')]);_0x2c6aad['attributes']=_['intersection'](_0x1e710b[_0x2bff('0x4e')],qs['fields'](_0x54ba2a[_0x2bff('0x57')][_0x2bff('0x5b')]));_0x2c6aad[_0x2bff('0x5a')]=_0x2c6aad[_0x2bff('0x5a')][_0x2bff('0x5c')]?_0x2c6aad[_0x2bff('0x5a')]:_0x1e710b['model'];_0x2c6aad['order']=qs[_0x2bff('0x5d')](_0x54ba2a[_0x2bff('0x57')][_0x2bff('0x5d')]);_0x2c6aad[_0x2bff('0x60')]=qs[_0x2bff('0x58')](_[_0x2bff('0x5e')](_0x54ba2a['query'],_0x1e710b['filters']));if(_0x54ba2a[_0x2bff('0x57')][_0x2bff('0x5f')]){_0x2c6aad[_0x2bff('0x60')]=_['merge'](_0x2c6aad['where'],{'$or':_[_0x2bff('0x39')](_0x2c6aad['attributes'],function(_0x2b91c0){var _0x2280af={};_0x2280af[_0x2b91c0]={'$like':'%'+_0x54ba2a[_0x2bff('0x57')][_0x2bff('0x5f')]+'%'};return _0x2280af;})});}_0x2c6aad=_[_0x2bff('0x61')]({},_0x2c6aad,_0x54ba2a[_0x2bff('0x63')]);return _0x494710[_0x2bff('0x12a')](_0x2c6aad);}})['then'](function(_0x312cbb){if(_0x312cbb){_0x3200e2=_0x312cbb[_0x2bff('0x5c')];if(!_0x54ba2a[_0x2bff('0x57')][_0x2bff('0x7b')](_0x2bff('0x7c'))){_0x2c6aad[_0x2bff('0x24')]=qs[_0x2bff('0x24')](_0x54ba2a['query']['limit']);_0x2c6aad[_0x2bff('0x22')]=qs['offset'](_0x54ba2a[_0x2bff('0x57')]['offset']);}return _0x494710[_0x2bff('0x12a')](_0x2c6aad);}})[_0x2bff('0x15')](function(_0x20460d){if(_0x20460d){return _0x20460d?{'count':_0x3200e2,'rows':_0x20460d}:null;}})[_0x2bff('0x15')](respondWithResult(_0x252b49,null))[_0x2bff('0x1f')](handleError(_0x252b49,null));};
\ No newline at end of file
+var _0x8d30=['notify','chat','ValidationError','no\x20available\x20attributes','createdAt','updatedAt','difference','ListId','from','Sequelize','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','List','DESC','Applications','Chat\x20Website\x20with\x20id\x20%s\x20not\x20found','spread','account','list','priority','asc','Contacts','CmContact','contact','headers','threadId','ChatInteraction','externalUrl','ContactId','interaction','firstName','messageId','created','autoclose','applications','push','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','waitForTheAssignedAgent','forcedOwnership','queueId','queue','waitForTheAssignedQueue','Start','EventManager','files','CompanyId','from\x20is\x20mandatory','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','server/files/templates/chatOfflineMessage.ejs','utf8','ChatOfflineMessage','fromString','originalname','mimetype','server','attachments','offline-chat','basename','openNewInteraction','transaction','Attachment','bulkCreate','MailServerOut','CloudProvider','forwardOffline','forwardOfflineAddress','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','email','Smtp','offlineMessageSubject','MailAccountId','subjectOffline','toPairsIn','mapValues','lastName','Chat','NotifyMailAccount','notifyMail','addInteraction','omit','getInteractions','Contact','User','Owner','Tag','Tags','color','tag','getProactiveActions','License','chatLicenseExceeded','readFileSync','server/files/chat/iframe.ejs','URL','address','3.5.0','remote','x-real-ip','connection','remoteAddress','virtual','replace','render','alignment','verticalAlignment','labelText','textColor','color_button','backgroundColor','hideWhenOffline','addApplications','sequelize','Transaction','READ_COMMITTED','ChatApplication','findAndCountAll','sendStatus','getApplications','addProactiveActions','chatProactiveAction','ChatProactiveAction','online','false','offlineForm','items','fromKey','getOfflineMessages','Attachments','addAgents','userChatWebsite:save','removeAgents','isArray','emit','userChatWebsite:remove','getAgents','mustache','util','path','ejs','fs-extra','querystring','html-to-text','ioredis','jayson/promise','url','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../errors/api','APIOutOfIntervalError','APINotFoundError','handleError','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','client','http','request','then','info','ChatWebsite,\x20%s,\x20%s','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','status','end','json','undefined','count','offset','limit','set','Content-Range','update','destroy','get','UserProfileResource','stack','name','send','Command','getSnippet','timezone','format','interval','indexOf','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','OFFLINE','No\x20timezone','map','Interval','Intervals','all','some','user-agent-parser','setUA','user-agent','getResult','customerIp','cf-connecting-ip','x-forwarded-for','x-real-port','referer','browser','version','%s\x20%s','unknown','device','model','vendor','%s\x20%s\x20%s','type','index','Pause','ChatWebsite','rawAttributes','fieldName','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','show','mandatoryDispositionPause','keys','length','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','params','describe','ChatWebsiteId','Disposition','getDispositions','findAll','removeDispositions','ids','CannedAnswer','findOne','addLogo','sitepic','addAvatar','filename','customerAvatar','file','addSystemAvatar','getLogo','join','root','../../config/license/util','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','agentAvatar','server/files/images/avatars/','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','getSystemAvatar','server/files/images/avatars/system_avatar.png'];(function(_0x187266,_0x3f99df){var _0x1a83bc=function(_0x189626){while(--_0x189626){_0x187266['push'](_0x187266['shift']());}};_0x1a83bc(++_0x3f99df);}(_0x8d30,0x93));var _0x08d3=function(_0x1c0991,_0x4f22d2){_0x1c0991=_0x1c0991-0x0;var _0x5034de=_0x8d30[_0x1c0991];return _0x5034de;};'use strict';var Mustache=require(_0x08d3('0x0'));var util=require(_0x08d3('0x1'));var path=require(_0x08d3('0x2'));var ejs=require(_0x08d3('0x3'));var fs=require('fs');var fs_extra=require(_0x08d3('0x4'));var _=require('lodash');var querystring=require(_0x08d3('0x5'));var htmlToText=require(_0x08d3('0x6'));var Redis=require(_0x08d3('0x7'));var jayson=require(_0x08d3('0x8'));var url=require(_0x08d3('0x9'));var qs=require(_0x08d3('0xa'));var logger=require(_0x08d3('0xb'))(_0x08d3('0xc'));var config=require(_0x08d3('0xd'));var APIOutOfIntervalError=require(_0x08d3('0xe'))[_0x08d3('0xf')];var APINotFoundError=require(_0x08d3('0xe'))[_0x08d3('0x10')];var APIHandleError=require(_0x08d3('0xe'))[_0x08d3('0x11')];var db=require(_0x08d3('0x12'))['db'];config[_0x08d3('0x13')]=_[_0x08d3('0x14')](config[_0x08d3('0x13')],{'host':_0x08d3('0x15'),'port':0x18eb});var socket=require(_0x08d3('0x16'))(new Redis(config[_0x08d3('0x13')]));require(_0x08d3('0x17'))[_0x08d3('0x18')](socket);var client=jayson[_0x08d3('0x19')][_0x08d3('0x1a')]({'port':0x232c});var client9002=jayson['client'][_0x08d3('0x1a')]({'port':0x232a});var client9003=jayson[_0x08d3('0x19')][_0x08d3('0x1a')]({'port':0x232b});var client9001=jayson['client'][_0x08d3('0x1a')]({'port':0x2329});function respondWithRpcPromise(_0x4ecd69,_0x4b82ea,_0x5f0d72,_0x5549e5){return new Promise(function(_0x5c101e,_0xedf1e8){var _0x4733bb=_0x5549e5||client;return _0x4733bb[_0x08d3('0x1b')](_0x4ecd69,_0x5f0d72)[_0x08d3('0x1c')](function(_0x44ed8b){logger[_0x08d3('0x1d')](_0x08d3('0x1e'),_0x4b82ea,'request\x20sent');logger[_0x08d3('0x1f')](_0x08d3('0x20'),_0x4b82ea,'request\x20sent',JSON[_0x08d3('0x21')](_0x44ed8b));if(_0x44ed8b[_0x08d3('0x22')]){if(_0x44ed8b[_0x08d3('0x22')]['code']===0x1f4){logger[_0x08d3('0x22')]('ChatWebsite,\x20%s,\x20%s',_0x4b82ea,_0x44ed8b[_0x08d3('0x22')][_0x08d3('0x23')]);return _0xedf1e8(_0x44ed8b[_0x08d3('0x22')][_0x08d3('0x23')]);}logger['error'](_0x08d3('0x1e'),_0x4b82ea,_0x44ed8b[_0x08d3('0x22')][_0x08d3('0x23')]);return _0x5c101e(_0x44ed8b[_0x08d3('0x22')][_0x08d3('0x23')]);}else{logger[_0x08d3('0x1d')](_0x08d3('0x1e'),_0x4b82ea,_0x08d3('0x24'));_0x5c101e(_0x44ed8b[_0x08d3('0x25')]['message']);}})[_0x08d3('0x26')](function(_0x5b4348){logger[_0x08d3('0x22')]('ChatWebsite,\x20%s,\x20%s',_0x4b82ea,_0x5b4348);_0xedf1e8(_0x5b4348);});});}function respondWithStatusCode(_0x4a8058,_0x57ae54){_0x57ae54=_0x57ae54||0xcc;return function(_0x5f22c4){if(_0x5f22c4){return _0x4a8058['sendStatus'](_0x57ae54);}return _0x4a8058[_0x08d3('0x27')](_0x57ae54)[_0x08d3('0x28')]();};}function respondWithResult(_0x463a16,_0x3edcd0){_0x3edcd0=_0x3edcd0||0xc8;return function(_0x19921b){if(_0x19921b){return _0x463a16[_0x08d3('0x27')](_0x3edcd0)[_0x08d3('0x29')](_0x19921b);}};}function respondWithFilteredResult(_0x4ea7f1,_0x24f590){return function(_0x4d9681){if(_0x4d9681){var _0x30ab8d=typeof _0x24f590['offset']===_0x08d3('0x2a')&&typeof _0x24f590['limit']===_0x08d3('0x2a');var _0x557139=_0x4d9681[_0x08d3('0x2b')];var _0x3798dd=_0x30ab8d?0x0:_0x24f590[_0x08d3('0x2c')];var _0xd92b70=_0x30ab8d?_0x4d9681[_0x08d3('0x2b')]:_0x24f590[_0x08d3('0x2c')]+_0x24f590[_0x08d3('0x2d')];var _0x3207bb;if(_0xd92b70>=_0x557139){_0xd92b70=_0x557139;_0x3207bb=0xc8;}else{_0x3207bb=0xce;}_0x4ea7f1[_0x08d3('0x27')](_0x3207bb);return _0x4ea7f1[_0x08d3('0x2e')](_0x08d3('0x2f'),_0x3798dd+'-'+_0xd92b70+'/'+_0x557139)[_0x08d3('0x29')](_0x4d9681);}return null;};}function saveUpdates(_0x59dc8d){return function(_0x4bc672){if(_0x4bc672){return _0x4bc672[_0x08d3('0x30')](_0x59dc8d)['then'](function(_0x265309){return _0x265309;});}return null;};}function removeEntity(_0x1d6286){return function(_0x5b3198){if(_0x5b3198){return _0x5b3198[_0x08d3('0x31')]()[_0x08d3('0x1c')](function(){var _0x1fae02=_0x5b3198[_0x08d3('0x32')]({'plain':!![]});var _0x57b0b9='ChatWebsites';return db[_0x08d3('0x33')]['destroy']({'where':{'type':_0x57b0b9,'resourceId':_0x1fae02['id']}})['then'](function(){return _0x5b3198;});})[_0x08d3('0x1c')](function(){_0x1d6286[_0x08d3('0x27')](0xcc)['end']();});}};}function handleEntityNotFound(_0x231f0d){return function(_0x578fdb){if(!_0x578fdb){_0x231f0d['sendStatus'](0x194);}return _0x578fdb;};}function handleError(_0x51cf76,_0x3dd370){_0x3dd370=_0x3dd370||0x1f4;return function(_0x31d8c6){logger[_0x08d3('0x22')](_0x31d8c6[_0x08d3('0x34')]);if(_0x31d8c6[_0x08d3('0x35')]){delete _0x31d8c6[_0x08d3('0x35')];}_0x51cf76['status'](_0x3dd370)[_0x08d3('0x36')](_0x31d8c6);};}function iftimePromise(_0x35ed8a,_0xf48fa9){return respondWithRpcPromise(_0x08d3('0x37'),_0x08d3('0x38'),{'command':_0xf48fa9[_0x08d3('0x39')]?util[_0x08d3('0x3a')]('iftime\x20%s,%s',_0x35ed8a[_0x08d3('0x3b')],_0xf48fa9['timezone']):util[_0x08d3('0x3a')]('iftime\x20%s',_0x35ed8a[_0x08d3('0x3b')])},client9002)[_0x08d3('0x1c')](function(_0x556224){var _0x2f5104=_0x556224&&_0x556224[_0x08d3('0x3c')](_0x08d3('0x3d'))>=0x0?!![]:![];logger[_0x08d3('0x1d')](_0x08d3('0x3e'),_0xf48fa9['id'],_0x35ed8a['id'],_0x35ed8a[_0x08d3('0x3b')],_0x2f5104?'ONLINE':_0x08d3('0x3f'),_0xf48fa9[_0x08d3('0x39')]?_0xf48fa9[_0x08d3('0x39')]:_0x08d3('0x40'));return _0x2f5104;})[_0x08d3('0x26')](function(_0x2e0a4c){logger['error'](_0x08d3('0x3e'),_0xf48fa9['id'],_0x35ed8a['id'],_0x35ed8a[_0x08d3('0x3b')],util['inspect'](_0x2e0a4c,{'showHidden':![],'depth':null}),_0xf48fa9[_0x08d3('0x39')]?_0xf48fa9['timezone']:_0x08d3('0x40'));return![];});}function checkWebsiteIntervals(_0x166db4){var _0x3a5e4f=_[_0x08d3('0x41')](_0x166db4[_0x08d3('0x42')][_0x08d3('0x43')],function(_0x2b731d){var _0x2cb7bd=_0x2b731d[_0x08d3('0x32')]({'plain':!![]});return iftimePromise(_0x2cb7bd,_0x166db4);});return Promise[_0x08d3('0x44')](_0x3a5e4f)['then'](function(_0x3708f0){return _[_0x08d3('0x45')](_0x3708f0);});}function createInteractionObject(_0x2f06b0,_0xf23318,_0x354671,_0x4af142){var _0x36a706=require(_0x08d3('0x46'));var _0x18ac0d=new _0x36a706();var _0x40fde0=_0x18ac0d[_0x08d3('0x47')](_0x354671[_0x08d3('0x48')])[_0x08d3('0x49')]();var _0x15f09d=_0xf23318[_0x08d3('0x4a')];if(_0x354671['cf-connecting-ip']){_0x15f09d=_0x354671[_0x08d3('0x4b')];}else if(_0x354671[_0x08d3('0x4c')]){_0x15f09d=_['first'](_0x354671[_0x08d3('0x4c')]['split'](','));}return{'ContactId':_0x4af142['id'],'ChatWebsiteId':_0x2f06b0,'from':(_0x4af142['firstName']||'')+'\x20'+(_0x4af142['lastName']||''),'customerIp':_0x15f09d,'customerPort':_0x354671[_0x08d3('0x4d')]?_0x354671[_0x08d3('0x4d')]:null,'referer':_0xf23318[_0x08d3('0x4e')],'browserName':_0x40fde0[_0x08d3('0x4f')][_0x08d3('0x35')]&&_0x40fde0[_0x08d3('0x4f')][_0x08d3('0x50')]?util[_0x08d3('0x3a')](_0x08d3('0x51'),_0x40fde0[_0x08d3('0x4f')][_0x08d3('0x35')],_0x40fde0[_0x08d3('0x4f')][_0x08d3('0x50')]):'unknown','browserVersion':_0x40fde0[_0x08d3('0x4f')]['version']||_0x08d3('0x52'),'osName':util[_0x08d3('0x3a')](_0x08d3('0x51'),_0x40fde0['os'][_0x08d3('0x35')],_0x40fde0['os'][_0x08d3('0x50')]),'osVersion':_0x40fde0['os']['version'],'deviceModel':_0x40fde0[_0x08d3('0x53')][_0x08d3('0x54')]&&_0x40fde0['device'][_0x08d3('0x55')]?util[_0x08d3('0x3a')](_0x08d3('0x56'),_0x40fde0[_0x08d3('0x53')][_0x08d3('0x54')],_0x40fde0['device'][_0x08d3('0x55')],_0x40fde0[_0x08d3('0x53')][_0x08d3('0x57')]):null,'deviceVendor':_0x40fde0[_0x08d3('0x53')][_0x08d3('0x55')],'deviceType':_0x40fde0[_0x08d3('0x53')][_0x08d3('0x57')],'formData':JSON[_0x08d3('0x21')](_0xf23318)};}exports[_0x08d3('0x58')]=function(_0x494abe,_0x1856b1){var _0x52c641={'include':[{'model':db[_0x08d3('0x59')],'as':'mandatoryDispositionPause'}]},_0x232958={},_0x4986b4={'count':0x0,'rows':[]};var _0x294607=_[_0x08d3('0x41')](db[_0x08d3('0x5a')][_0x08d3('0x5b')],function(_0x1a6345){return{'name':_0x1a6345[_0x08d3('0x5c')],'type':_0x1a6345['type']['key']};});_0x232958[_0x08d3('0x54')]=_[_0x08d3('0x41')](_0x294607,_0x08d3('0x35'));_0x232958[_0x08d3('0x5d')]=_['keys'](_0x494abe[_0x08d3('0x5d')]);_0x232958[_0x08d3('0x5e')]=_[_0x08d3('0x5f')](_0x232958[_0x08d3('0x54')],_0x232958[_0x08d3('0x5d')]);_0x52c641[_0x08d3('0x60')]=_[_0x08d3('0x5f')](_0x232958[_0x08d3('0x54')],qs[_0x08d3('0x61')](_0x494abe[_0x08d3('0x5d')][_0x08d3('0x61')]));_0x52c641[_0x08d3('0x60')]=_0x52c641[_0x08d3('0x60')]['length']?_0x52c641['attributes']:_0x232958[_0x08d3('0x54')];if(!_0x494abe[_0x08d3('0x5d')][_0x08d3('0x62')](_0x08d3('0x63'))){_0x52c641[_0x08d3('0x2d')]=qs['limit'](_0x494abe[_0x08d3('0x5d')][_0x08d3('0x2d')]);_0x52c641[_0x08d3('0x2c')]=qs[_0x08d3('0x2c')](_0x494abe['query'][_0x08d3('0x2c')]);}_0x52c641[_0x08d3('0x64')]=qs['sort'](_0x494abe[_0x08d3('0x5d')][_0x08d3('0x65')]);_0x52c641[_0x08d3('0x66')]=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x494abe['query'],_0x232958[_0x08d3('0x5e')]),_0x294607);if(_0x494abe['query'][_0x08d3('0x68')]){_0x52c641['where']=_[_0x08d3('0x69')](_0x52c641['where'],{'$or':_[_0x08d3('0x41')](_0x294607,function(_0x148571){if(_0x148571['type']!==_0x08d3('0x6a')){var _0x53073b={};_0x53073b[_0x148571['name']]={'$like':'%'+_0x494abe[_0x08d3('0x5d')][_0x08d3('0x68')]+'%'};return _0x53073b;}})});}_0x52c641=_['merge']({},_0x52c641,_0x494abe[_0x08d3('0x6b')]);var _0x2f55cc={'where':_0x52c641[_0x08d3('0x66')]};return db['ChatWebsite']['count'](_0x2f55cc)['then'](function(_0x37560f){_0x4986b4['count']=_0x37560f;if(_0x494abe[_0x08d3('0x5d')][_0x08d3('0x6c')]){_0x52c641[_0x08d3('0x6d')]=[{'all':!![]}];}return db[_0x08d3('0x5a')]['findAll'](_0x52c641);})[_0x08d3('0x1c')](function(_0x158bc7){_0x4986b4[_0x08d3('0x6e')]=_0x158bc7;return _0x4986b4;})['then'](respondWithFilteredResult(_0x1856b1,_0x52c641))[_0x08d3('0x26')](handleError(_0x1856b1,null));};exports[_0x08d3('0x6f')]=function(_0x414b2f,_0x1ddca0){var _0x2a5a2c={'raw':![],'where':{'id':_0x414b2f['params']['id']},'include':[{'model':db[_0x08d3('0x59')],'as':_0x08d3('0x70')}]},_0x411ff7={};_0x411ff7[_0x08d3('0x54')]=_['keys'](db[_0x08d3('0x5a')]['rawAttributes']);_0x411ff7['query']=_[_0x08d3('0x71')](_0x414b2f['query']);_0x411ff7['filters']=_[_0x08d3('0x5f')](_0x411ff7[_0x08d3('0x54')],_0x411ff7[_0x08d3('0x5d')]);_0x2a5a2c[_0x08d3('0x60')]=_[_0x08d3('0x5f')](_0x411ff7[_0x08d3('0x54')],qs['fields'](_0x414b2f['query'][_0x08d3('0x61')]));_0x2a5a2c[_0x08d3('0x60')]=_0x2a5a2c[_0x08d3('0x60')][_0x08d3('0x72')]?_0x2a5a2c[_0x08d3('0x60')]:_0x411ff7['model'];if(_0x414b2f[_0x08d3('0x5d')]['includeAll']){_0x2a5a2c[_0x08d3('0x6d')]=[{'all':!![]}];}_0x2a5a2c=_['merge']({},_0x2a5a2c,_0x414b2f[_0x08d3('0x6b')]);return db[_0x08d3('0x5a')][_0x08d3('0x73')](_0x2a5a2c)[_0x08d3('0x1c')](handleEntityNotFound(_0x1ddca0,null))[_0x08d3('0x1c')](respondWithResult(_0x1ddca0,null))['catch'](handleError(_0x1ddca0,null));};exports[_0x08d3('0x74')]=function(_0x4ca214,_0x2b9018){return db[_0x08d3('0x5a')][_0x08d3('0x74')](_0x4ca214[_0x08d3('0x75')],{})['then'](function(_0x22c55d){var _0x616fa7=_0x4ca214[_0x08d3('0x76')][_0x08d3('0x32')]({'plain':!![]});if(!_0x616fa7)throw new Error(_0x08d3('0x77'));if(_0x616fa7['role']==='user'){var _0x317232=_0x22c55d[_0x08d3('0x32')]({'plain':!![]});var _0x404e3c='ChatWebsites';return db[_0x08d3('0x78')][_0x08d3('0x73')]({'where':{'name':_0x404e3c,'userProfileId':_0x616fa7[_0x08d3('0x79')]},'raw':!![]})['then'](function(_0x45aa5f){if(_0x45aa5f&&_0x45aa5f[_0x08d3('0x7a')]===0x0){return db[_0x08d3('0x33')][_0x08d3('0x74')]({'name':_0x317232[_0x08d3('0x35')],'resourceId':_0x317232['id'],'type':_0x45aa5f['name'],'sectionId':_0x45aa5f['id']},{})[_0x08d3('0x1c')](function(){return _0x22c55d;});}else{return _0x22c55d;}})[_0x08d3('0x26')](function(_0x3242a2){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3242a2);throw _0x3242a2;});}return _0x22c55d;})[_0x08d3('0x1c')](respondWithResult(_0x2b9018,0xc9))[_0x08d3('0x26')](handleError(_0x2b9018,null));};exports['update']=function(_0x124eda,_0x58cf9a){if(_0x124eda[_0x08d3('0x75')]['id']){delete _0x124eda[_0x08d3('0x75')]['id'];}return db['ChatWebsite'][_0x08d3('0x73')]({'where':{'id':_0x124eda['params']['id']},'include':[{'model':db[_0x08d3('0x59')],'as':'mandatoryDispositionPause'}]})['then'](handleEntityNotFound(_0x58cf9a,null))[_0x08d3('0x1c')](saveUpdates(_0x124eda['body'],null))[_0x08d3('0x1c')](respondWithResult(_0x58cf9a,null))['catch'](handleError(_0x58cf9a,null));};exports['destroy']=function(_0x3e32cd,_0x4394d8){return db[_0x08d3('0x5a')]['find']({'where':{'id':_0x3e32cd[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x4394d8,null))[_0x08d3('0x1c')](removeEntity(_0x4394d8,null))['catch'](handleError(_0x4394d8,null));};exports[_0x08d3('0x7c')]=function(_0x3adff8,_0x37ea10){return db[_0x08d3('0x5a')][_0x08d3('0x7c')]()[_0x08d3('0x1c')](respondWithResult(_0x37ea10,null))['catch'](handleError(_0x37ea10,null));};exports['addDisposition']=function(_0x3acefb,_0x5de304){if(_0x3acefb[_0x08d3('0x75')]['id']){delete _0x3acefb[_0x08d3('0x75')]['id'];}return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0x3acefb['params']['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x5de304,null))[_0x08d3('0x1c')](function(_0x542b57){if(_0x542b57){_0x3acefb['body'][_0x08d3('0x7d')]=_0x542b57['id'];return db[_0x08d3('0x7e')]['create'](_0x3acefb[_0x08d3('0x75')]);}})['then'](respondWithResult(_0x5de304,null))[_0x08d3('0x26')](handleError(_0x5de304,null));};exports[_0x08d3('0x7f')]=function(_0x5a44da,_0x8a77c4){var _0x19ddc9={'raw':![],'where':{}};var _0x55ec91={};var _0x1d3751={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x5a44da['params']['id']}})['then'](handleEntityNotFound(_0x8a77c4,null))['then'](function(_0x1dcc21){if(_0x1dcc21){_0x55ec91['model']=_['keys'](db['Disposition']['rawAttributes']);_0x55ec91[_0x08d3('0x5d')]=_['keys'](_0x5a44da[_0x08d3('0x5d')]);_0x55ec91[_0x08d3('0x5e')]=_[_0x08d3('0x5f')](_0x55ec91[_0x08d3('0x54')],_0x55ec91[_0x08d3('0x5d')]);_0x19ddc9[_0x08d3('0x60')]=_[_0x08d3('0x5f')](_0x55ec91[_0x08d3('0x54')],qs['fields'](_0x5a44da[_0x08d3('0x5d')][_0x08d3('0x61')]));_0x19ddc9['attributes']=_0x19ddc9[_0x08d3('0x60')][_0x08d3('0x72')]?_0x19ddc9[_0x08d3('0x60')]:_0x55ec91['model'];if(!_0x5a44da[_0x08d3('0x5d')][_0x08d3('0x62')]('nolimit')){_0x19ddc9[_0x08d3('0x2d')]=qs[_0x08d3('0x2d')](_0x5a44da[_0x08d3('0x5d')]['limit']);_0x19ddc9[_0x08d3('0x2c')]=qs[_0x08d3('0x2c')](_0x5a44da[_0x08d3('0x5d')]['offset']);}_0x19ddc9[_0x08d3('0x64')]=qs[_0x08d3('0x65')](_0x5a44da[_0x08d3('0x5d')]['sort']);_0x19ddc9[_0x08d3('0x66')]=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x5a44da[_0x08d3('0x5d')],_0x55ec91[_0x08d3('0x5e')]));_0x19ddc9[_0x08d3('0x66')][_0x08d3('0x7d')]=_0x1dcc21['id'];if(_0x5a44da['query']['filter']){_0x19ddc9[_0x08d3('0x66')]=_[_0x08d3('0x69')](_0x19ddc9[_0x08d3('0x66')],{'$or':_[_0x08d3('0x41')](_0x19ddc9[_0x08d3('0x60')],function(_0x2e8828){var _0x554420={};_0x554420[_0x2e8828]={'$like':'%'+_0x5a44da[_0x08d3('0x5d')][_0x08d3('0x68')]+'%'};return _0x554420;})});}_0x19ddc9=_[_0x08d3('0x69')]({},_0x19ddc9,_0x5a44da[_0x08d3('0x6b')]);return db[_0x08d3('0x7e')][_0x08d3('0x2b')]({'where':_0x19ddc9[_0x08d3('0x66')]})['then'](function(_0x209fe8){_0x1d3751[_0x08d3('0x2b')]=_0x209fe8;if(_0x5a44da['query'][_0x08d3('0x6c')]){_0x19ddc9[_0x08d3('0x6d')]=[{'all':!![]}];}return db[_0x08d3('0x7e')][_0x08d3('0x80')](_0x19ddc9);})['then'](function(_0xa049b9){_0x1d3751[_0x08d3('0x6e')]=_0xa049b9;return _0x1d3751;});}})[_0x08d3('0x1c')](respondWithFilteredResult(_0x8a77c4,_0x19ddc9))['catch'](handleError(_0x8a77c4,null));};exports[_0x08d3('0x81')]=function(_0x5f2018,_0x263f2e){return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0x5f2018[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x263f2e,null))['then'](function(_0x9d1e3f){if(_0x9d1e3f){return _0x9d1e3f[_0x08d3('0x81')](_0x5f2018['query'][_0x08d3('0x82')]);}})[_0x08d3('0x1c')](respondWithStatusCode(_0x263f2e,null))[_0x08d3('0x26')](handleError(_0x263f2e,null));};exports['addAnswer']=function(_0x8ab885,_0x1f5a45){if(_0x8ab885['body']['id']){delete _0x8ab885[_0x08d3('0x75')]['id'];}return db[_0x08d3('0x5a')]['find']({'where':{'id':_0x8ab885[_0x08d3('0x7b')]['id']}})['then'](handleEntityNotFound(_0x1f5a45,null))[_0x08d3('0x1c')](function(_0x37d6e7){if(_0x37d6e7){_0x8ab885[_0x08d3('0x75')][_0x08d3('0x7d')]=_0x37d6e7['id'];return db[_0x08d3('0x83')][_0x08d3('0x74')](_0x8ab885[_0x08d3('0x75')]);}})[_0x08d3('0x1c')](respondWithResult(_0x1f5a45,null))[_0x08d3('0x26')](handleError(_0x1f5a45,null));};exports['getAnswers']=function(_0x18ec6d,_0x14be2c){var _0x7df3ee={'raw':![],'where':{}};var _0x3c61ee={};var _0x47ba0d={'count':0x0,'rows':[]};return db[_0x08d3('0x5a')][_0x08d3('0x84')]({'where':{'id':_0x18ec6d['params']['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x14be2c,null))[_0x08d3('0x1c')](function(_0x5ab7cc){if(_0x5ab7cc){_0x3c61ee['model']=_[_0x08d3('0x71')](db['CannedAnswer'][_0x08d3('0x5b')]);_0x3c61ee[_0x08d3('0x5d')]=_[_0x08d3('0x71')](_0x18ec6d['query']);_0x3c61ee[_0x08d3('0x5e')]=_[_0x08d3('0x5f')](_0x3c61ee['model'],_0x3c61ee[_0x08d3('0x5d')]);_0x7df3ee['attributes']=_['intersection'](_0x3c61ee['model'],qs[_0x08d3('0x61')](_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x61')]));_0x7df3ee[_0x08d3('0x60')]=_0x7df3ee[_0x08d3('0x60')][_0x08d3('0x72')]?_0x7df3ee['attributes']:_0x3c61ee[_0x08d3('0x54')];if(!_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x62')](_0x08d3('0x63'))){_0x7df3ee[_0x08d3('0x2d')]=qs[_0x08d3('0x2d')](_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x2d')]);_0x7df3ee[_0x08d3('0x2c')]=qs[_0x08d3('0x2c')](_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x2c')]);}_0x7df3ee['order']=qs[_0x08d3('0x65')](_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x65')]);_0x7df3ee[_0x08d3('0x66')]=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x18ec6d[_0x08d3('0x5d')],_0x3c61ee['filters']));_0x7df3ee[_0x08d3('0x66')][_0x08d3('0x7d')]=_0x5ab7cc['id'];if(_0x18ec6d['query'][_0x08d3('0x68')]){_0x7df3ee['where']=_[_0x08d3('0x69')](_0x7df3ee[_0x08d3('0x66')],{'$or':_[_0x08d3('0x41')](_0x7df3ee[_0x08d3('0x60')],function(_0x3a069e){var _0x40e771={};_0x40e771[_0x3a069e]={'$like':'%'+_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x68')]+'%'};return _0x40e771;})});}_0x7df3ee=_[_0x08d3('0x69')]({},_0x7df3ee,_0x18ec6d['options']);return db['CannedAnswer'][_0x08d3('0x2b')]({'where':_0x7df3ee[_0x08d3('0x66')]})['then'](function(_0x4b345c){_0x47ba0d['count']=_0x4b345c;if(_0x18ec6d[_0x08d3('0x5d')][_0x08d3('0x6c')]){_0x7df3ee['include']=[{'all':!![]}];}return db[_0x08d3('0x83')][_0x08d3('0x80')](_0x7df3ee);})['then'](function(_0x31c3c7){_0x47ba0d[_0x08d3('0x6e')]=_0x31c3c7;return _0x47ba0d;});}})[_0x08d3('0x1c')](respondWithFilteredResult(_0x14be2c,_0x7df3ee))[_0x08d3('0x26')](handleError(_0x14be2c,null));};exports['removeAnswers']=function(_0x288747,_0x5c595){return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0x288747[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x5c595,null))[_0x08d3('0x1c')](function(_0x376738){if(_0x376738){return _0x376738['removeAnswers'](_0x288747[_0x08d3('0x5d')][_0x08d3('0x82')]);}})[_0x08d3('0x1c')](respondWithStatusCode(_0x5c595,null))[_0x08d3('0x26')](handleError(_0x5c595,null));};exports[_0x08d3('0x85')]=function(_0x439bc4,_0x5b0a8d){_0x439bc4[_0x08d3('0x75')][_0x08d3('0x86')]=_0x439bc4['file']['filename'];return db['ChatWebsite']['find']({'where':{'id':_0x439bc4[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x5b0a8d,null))[_0x08d3('0x1c')](saveUpdates(_0x439bc4[_0x08d3('0x75')],null))[_0x08d3('0x1c')](respondWithResult(_0x5b0a8d,null))[_0x08d3('0x26')](handleError(_0x5b0a8d,null));};exports[_0x08d3('0x87')]=function(_0x1f84c3,_0x1419f4){_0x1f84c3[_0x08d3('0x75')]['agentAvatar']=_0x1f84c3['file'][_0x08d3('0x88')];return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0x1f84c3[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x1419f4,null))[_0x08d3('0x1c')](saveUpdates(_0x1f84c3[_0x08d3('0x75')],null))[_0x08d3('0x1c')](respondWithResult(_0x1419f4,null))[_0x08d3('0x26')](handleError(_0x1419f4,null));};exports['addCustomerAvatar']=function(_0x5a3bcc,_0x377869){_0x5a3bcc[_0x08d3('0x75')][_0x08d3('0x89')]=_0x5a3bcc[_0x08d3('0x8a')][_0x08d3('0x88')];return db['ChatWebsite'][_0x08d3('0x73')]({'where':{'id':_0x5a3bcc[_0x08d3('0x7b')]['id']}})['then'](handleEntityNotFound(_0x377869,null))[_0x08d3('0x1c')](saveUpdates(_0x5a3bcc['body'],null))['then'](respondWithResult(_0x377869,null))[_0x08d3('0x26')](handleError(_0x377869,null));};exports[_0x08d3('0x8b')]=function(_0x560303,_0x3c8f5e){_0x560303[_0x08d3('0x75')]['systemAvatar']=_0x560303[_0x08d3('0x8a')][_0x08d3('0x88')];return db[_0x08d3('0x5a')]['find']({'where':{'id':_0x560303[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x3c8f5e,null))[_0x08d3('0x1c')](saveUpdates(_0x560303[_0x08d3('0x75')],null))[_0x08d3('0x1c')](respondWithResult(_0x3c8f5e,null))['catch'](handleError(_0x3c8f5e,null));};exports[_0x08d3('0x8c')]=function(_0x14bb8c,_0x1a73b6){var _0x2eed6a=path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],'server/files/images/logos/default_logo.svg');var _0x42240a={'where':{'id':_0x14bb8c['params']['id']},'attributes':['id',_0x08d3('0x86')],'raw':!![]};var _0x5c038f=![];return require(_0x08d3('0x8f'))[_0x08d3('0x90')]()['then'](function(_0x27682c){if(_0x27682c){_0x5c038f=_0x27682c[_0x08d3('0x91')];}})[_0x08d3('0x1c')](function(){return db['ChatWebsite']['find'](_0x42240a);})[_0x08d3('0x1c')](handleEntityNotFound(_0x1a73b6,null))[_0x08d3('0x1c')](function(_0x3ab231){if(_0x3ab231){if(!_[_0x08d3('0x92')](_0x3ab231[_0x08d3('0x86')])){if(fs[_0x08d3('0x93')](path['join'](config[_0x08d3('0x8e')],_0x08d3('0x94'),_0x3ab231[_0x08d3('0x86')]))&&_0x5c038f){_0x2eed6a=path['join'](config['root'],_0x08d3('0x94'),_0x3ab231['sitepic']);}}return _0x1a73b6[_0x08d3('0x95')](_0x2eed6a);}})[_0x08d3('0x26')](handleError(_0x1a73b6,null));};exports[_0x08d3('0x96')]=function(_0x2e02ba,_0xcc972f){var _0x103456=path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],_0x08d3('0x97'));var _0x2075bd={'where':{'id':_0x2e02ba['params']['id']},'attributes':['id',_0x08d3('0x98')],'raw':!![]};return db[_0x08d3('0x5a')][_0x08d3('0x73')](_0x2075bd)[_0x08d3('0x1c')](handleEntityNotFound(_0xcc972f,null))[_0x08d3('0x1c')](function(_0x1db16b){if(_0x1db16b){if(!_[_0x08d3('0x92')](_0x1db16b['agentAvatar'])){if(fs[_0x08d3('0x93')](path['join'](config[_0x08d3('0x8e')],'server/files/images/avatars/',_0x1db16b['agentAvatar']))){_0x103456=path[_0x08d3('0x8d')](config['root'],_0x08d3('0x99'),_0x1db16b['agentAvatar']);}}return _0xcc972f[_0x08d3('0x95')](_0x103456);}})[_0x08d3('0x26')](handleError(_0xcc972f,null));};exports[_0x08d3('0x9a')]=function(_0x4d7994,_0x1c2ca1){var _0x105d12=path[_0x08d3('0x8d')](config['root'],_0x08d3('0x9b'));var _0x149f00={'where':{'id':_0x4d7994[_0x08d3('0x7b')]['id']},'attributes':['id','customerAvatar',_0x08d3('0x9c')],'raw':!![]};return db[_0x08d3('0x5a')][_0x08d3('0x73')](_0x149f00)[_0x08d3('0x1c')](handleEntityNotFound(_0x1c2ca1,null))[_0x08d3('0x1c')](function(_0x4f15e9){if(_0x4f15e9){if(!_[_0x08d3('0x92')](_0x4f15e9[_0x08d3('0x89')])){if(fs[_0x08d3('0x93')](path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],_0x08d3('0x99'),_0x4f15e9[_0x08d3('0x89')]))&&_0x4f15e9[_0x08d3('0x9c')]){_0x105d12=path['join'](config[_0x08d3('0x8e')],_0x08d3('0x99'),_0x4f15e9['customerAvatar']);}}return _0x1c2ca1[_0x08d3('0x95')](_0x105d12);}})[_0x08d3('0x26')](handleError(_0x1c2ca1,null));};exports[_0x08d3('0x9d')]=function(_0x3f5343,_0x555cd8){var _0x56437f=path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],_0x08d3('0x9e'));var _0x16ff18={'where':{'id':_0x3f5343[_0x08d3('0x7b')]['id']},'attributes':['id','systemAvatar'],'raw':!![]};return db['ChatWebsite'][_0x08d3('0x73')](_0x16ff18)['then'](handleEntityNotFound(_0x555cd8,null))[_0x08d3('0x1c')](function(_0x21f3f6){if(_0x21f3f6){if(!_['isNil'](_0x21f3f6['systemAvatar'])){if(fs[_0x08d3('0x93')](path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],_0x08d3('0x99'),_0x21f3f6['systemAvatar']))){_0x56437f=path['join'](config[_0x08d3('0x8e')],_0x08d3('0x99'),_0x21f3f6['systemAvatar']);}}return _0x555cd8[_0x08d3('0x95')](_0x56437f);}})[_0x08d3('0x26')](handleError(_0x555cd8,null));};exports[_0x08d3('0x9f')]=function(_0x1bc677,_0x37c326){var _0x1e37e2={'body':_0x1bc677[_0x08d3('0x75')],'channel':_0x08d3('0xa0')};var _0x1d4281=[];var _0x802ab3=[];var _0x3a7f2b={};var _0x323cf0=![];return db['CmContact']['describe']()[_0x08d3('0x1c')](function(_0x2ad3db){if(!_0x2ad3db){throw new db['Sequelize'][(_0x08d3('0xa1'))](_0x08d3('0xa2'));}_0x1d4281=_['difference'](_[_0x08d3('0x71')](_0x2ad3db),[_0x08d3('0xa3'),_0x08d3('0xa4')]);_0x802ab3=_[_0x08d3('0xa5')](_['keys'](_0x2ad3db),[_0x08d3('0xa3'),_0x08d3('0xa4'),'CompanyId',_0x08d3('0xa6')]);if(_0x1bc677[_0x08d3('0x75')]['id']){delete _0x1bc677[_0x08d3('0x75')]['id'];}if(_[_0x08d3('0x92')](_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa7')])){throw new db['Sequelize'][(_0x08d3('0xa1'))]('from\x20is\x20mandatory');}if(_[_0x08d3('0x92')](_0x1bc677[_0x08d3('0x75')][_0x08d3('0x75')])||_0x1bc677[_0x08d3('0x75')][_0x08d3('0x75')]===''){throw new db[(_0x08d3('0xa8'))][(_0x08d3('0xa1'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_['isNil'](_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa9')])){throw new db[(_0x08d3('0xa8'))][(_0x08d3('0xa1'))](_0x08d3('0xaa')+_0x802ab3);}if(!_[_0x08d3('0xab')](_0x802ab3,_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa9')])){throw new db['Sequelize'][(_0x08d3('0xa1'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x802ab3);}_0x3a7f2b[_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa9')]]=_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa7')];})[_0x08d3('0x1c')](function(){return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0x1bc677['params']['id']},'include':[{'model':db[_0x08d3('0xac')],'as':_0x08d3('0xad'),'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x3a7f2b,'limit':0x1,'order':[[_0x08d3('0xa4'),_0x08d3('0xae')]]}]},{'model':db['ChatApplication'],'as':_0x08d3('0xaf')},{'model':db[_0x08d3('0x42')],'as':'Interval','include':[{'model':db[_0x08d3('0x42')],'as':'Intervals','attributes':['id','interval'],'raw':!![]}]}]});})['then'](function(_0x4d5efa){if(!_0x4d5efa)throw new APINotFoundError(util[_0x08d3('0x3a')](_0x08d3('0xb0'),_0x1bc677[_0x08d3('0x7b')]['id']));if(!_0x4d5efa['Interval']||!_0x4d5efa[_0x08d3('0x42')][_0x08d3('0x43')])return[_0x4d5efa,!![]];return[_0x4d5efa,checkWebsiteIntervals(_0x4d5efa)];})[_0x08d3('0xb1')](function(_0x2b8e02,_0x506930){if(!_0x506930)throw new APIOutOfIntervalError();if(!_0x2b8e02[_0x08d3('0xad')])return;_0x1e37e2[_0x08d3('0xb2')]=_0x2b8e02;_0x1e37e2[_0x08d3('0xb3')]=_0x2b8e02['List'];_0x1e37e2['applications']=_['orderBy'](_0x2b8e02[_0x08d3('0xaf')],[_0x08d3('0xb4')],[_0x08d3('0xb5')]);if(_0x1e37e2['account'][_0x08d3('0xaf')]){delete _0x1e37e2['account'][_0x08d3('0xaf')];}if(_0x1e37e2['account']['List']&&_0x1e37e2[_0x08d3('0xb2')][_0x08d3('0xad')][_0x08d3('0xb6')]['length']){return _0x1e37e2[_0x08d3('0xb2')]['List']['Contacts'][0x0];}var _0x4ff55c=_[_0x08d3('0x14')](_0x1bc677['body'],{'firstName':_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa7')],'ListId':_0x2b8e02[_0x08d3('0xa6')]});_0x4ff55c[_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa9')]]=_0x1bc677[_0x08d3('0x75')][_0x08d3('0xa7')];return db[_0x08d3('0xb7')][_0x08d3('0x74')](_0x4ff55c,{'fields':_0x1d4281,'raw':!![]});})[_0x08d3('0x1c')](function(_0x15dd5){_0x1e37e2[_0x08d3('0xb8')]=_0x15dd5;var _0x4aecc1=createInteractionObject(_0x1bc677[_0x08d3('0x7b')]['id'],_0x1bc677['body'],_0x1bc677[_0x08d3('0xb9')],_0x15dd5);var _0x331603={'ChatWebsiteId':_0x1bc677[_0x08d3('0x7b')]['id'],'closed':![]};if(_0x1bc677[_0x08d3('0x75')]['threadId']){_0x331603[_0x08d3('0xba')]=_0x1bc677[_0x08d3('0x75')][_0x08d3('0xba')];return db[_0x08d3('0xbb')][_0x08d3('0x73')]({'where':_0x331603})[_0x08d3('0x1c')](function(_0x30066f){if(_0x30066f){_0x323cf0=!![];return _0x30066f;}_0x4aecc1[_0x08d3('0xba')]=_0x1bc677[_0x08d3('0x75')][_0x08d3('0xba')];_0x4aecc1[_0x08d3('0xbc')]=_0x1bc677[_0x08d3('0x75')][_0x08d3('0xbc')];return db[_0x08d3('0xbb')]['create'](_0x4aecc1);});}_0x331603[_0x08d3('0xbd')]=_0x15dd5['id'];if(_0x1bc677[_0x08d3('0x75')][_0x08d3('0xbe')]&&_0x1bc677[_0x08d3('0x75')]['interaction']['id']){_0x331603['id']=_0x1bc677['body']['interaction']['id'];return db[_0x08d3('0xbb')][_0x08d3('0x73')]({'where':_0x331603})[_0x08d3('0x1c')](function(_0x31e3b4){if(_0x31e3b4){_0x323cf0=!![];return _0x31e3b4;}return db[_0x08d3('0xbb')][_0x08d3('0x74')](_0x4aecc1);});}return db[_0x08d3('0xbb')][_0x08d3('0x74')](_0x4aecc1);})['then'](function(_0x1fa0cb){if(!_0x323cf0)return _0x1fa0cb;var _0x4433cd={'from':(_0x1e37e2[_0x08d3('0xb8')][_0x08d3('0xbf')]||'')+'\x20'+(_0x1e37e2[_0x08d3('0xb8')]['lastName']||'')};if(_0x1bc677[_0x08d3('0x75')][_0x08d3('0xba')]&&_0x1bc677[_0x08d3('0x75')][_0x08d3('0xc0')]&&_0x1bc677[_0x08d3('0x75')][_0x08d3('0xba')]!=_0x1bc677['body'][_0x08d3('0xc0')]){_0x4433cd[_0x08d3('0xba')]=_0x1bc677[_0x08d3('0x75')][_0x08d3('0xc0')];}return _0x1fa0cb[_0x08d3('0x30')](_0x4433cd);})[_0x08d3('0x1c')](function(_0xc6c9db){_0x1e37e2['interaction']=_0xc6c9db[_0x08d3('0x32')]({'plain':!![]});_0x1e37e2['interaction'][_0x08d3('0xc1')]=!_0x323cf0;if(_0x1e37e2[_0x08d3('0xbe')][_0x08d3('0xc1')]){if(_0x1e37e2['account'][_0x08d3('0xc2')]){_0x1e37e2[_0x08d3('0xc3')][_0x08d3('0xc4')]({'id':0x0,'priority':_0x1e37e2[_0x08d3('0xc3')][_0x08d3('0x72')]+0x1,'app':'close','appdata':_0x08d3('0xc5'),'interval':_0x08d3('0xc6')});}}return db[_0x08d3('0xc7')][_0x08d3('0x74')]({'body':_0x1bc677['body'][_0x08d3('0x75')],'ChatWebsiteId':_0x1bc677[_0x08d3('0x7b')]['id'],'ChatInteractionId':_0xc6c9db['id'],'direction':'in','ContactId':_0x1e37e2['contact']['id'],'AttachmentId':_0x1bc677['body'][_0x08d3('0xc8')]});})[_0x08d3('0x1c')](function(_0xb47765){_0x1e37e2['message']=_0xb47765;if(!_0x1e37e2[_0x08d3('0xbe')][_0x08d3('0xc9')]){return;}return db['User'][_0x08d3('0x73')]({'attributes':['id',_0x08d3('0x35')],'where':{'id':_0x1e37e2['interaction'][_0x08d3('0xc9')]}});})[_0x08d3('0x1c')](function(_0x202f76){if(_0x202f76){_0x1e37e2[_0x08d3('0xc3')]['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x202f76[_0x08d3('0x35')]+','+(_0x1e37e2[_0x08d3('0xb2')][_0x08d3('0xca')]||0xa),'interval':'*,*,*,*'});_0x1e37e2[_0x08d3('0xcb')]=!![];}if(!_0x1e37e2['interaction'][_0x08d3('0xcc')]){return;}return db['ChatQueue'][_0x08d3('0x73')]({'attributes':['id',_0x08d3('0x35')],'where':{'id':_0x1e37e2[_0x08d3('0xbe')][_0x08d3('0xcc')]}});})[_0x08d3('0x1c')](function(_0x9ce6eb){if(_0x9ce6eb){_0x1e37e2['applications']['unshift']({'id':0x0,'priority':0x1,'app':_0x08d3('0xcd'),'appdata':_0x9ce6eb[_0x08d3('0x35')]+','+(_0x1e37e2[_0x08d3('0xb2')][_0x08d3('0xce')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x08d3('0xcf'),'startRouting',_0x1e37e2);})[_0x08d3('0x1c')](function(_0x200611){respondWithRpcPromise(_0x08d3('0xd0'),_0x08d3('0xd0'),{'event':_0x08d3('0x9f'),'message':_0x200611},client9002);return _0x200611;})[_0x08d3('0x1c')](respondWithResult(_0x37c326,null))[_0x08d3('0x26')](APIHandleError(_0x37c326));};exports['offline']=function(_0xed2cf4,_0x34f8ef){var _0x1f2531,_0x13699b,_0x5b7cca;var _0xfe0e46=[];var _0x125a19={};var _0x143b7b=_0xed2cf4[_0x08d3('0xd1')]||[];var _0x1eff1e=[];var _0x357528;return db[_0x08d3('0xb7')][_0x08d3('0x7c')]()[_0x08d3('0x1c')](function(_0x4eab15){if(!_0x4eab15){throw new db[(_0x08d3('0xa8'))][(_0x08d3('0xa1'))](_0x08d3('0xa2'));}_0xfe0e46=_[_0x08d3('0xa5')](_[_0x08d3('0x71')](_0x4eab15),[_0x08d3('0xa3'),_0x08d3('0xa4'),_0x08d3('0xd2'),_0x08d3('0xa6')]);if(_0xed2cf4['body']['id']){delete _0xed2cf4[_0x08d3('0x75')]['id'];}if(_['isNil'](_0xed2cf4['body'][_0x08d3('0xa7')])){throw _0x34f8ef[_0x08d3('0x27')](0x1f4)[_0x08d3('0x36')](new db[(_0x08d3('0xa8'))][(_0x08d3('0xa1'))](_0x08d3('0xd3')));}if(_[_0x08d3('0x92')](_0xed2cf4['body'][_0x08d3('0x75')])||_0xed2cf4[_0x08d3('0x75')][_0x08d3('0x75')]===''){throw _0x34f8ef[_0x08d3('0x27')](0x1f4)[_0x08d3('0x36')](new db[(_0x08d3('0xa8'))][(_0x08d3('0xa1'))]('body\x20is\x20mandatory\x20and\x20not\x20empty'));}if(_[_0x08d3('0x92')](_0xed2cf4[_0x08d3('0x75')]['mapKeyOffline'])){throw _0x34f8ef[_0x08d3('0x27')](0x1f4)[_0x08d3('0x36')](new db['Sequelize'][(_0x08d3('0xa1'))]('mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0xfe0e46));}if(!_[_0x08d3('0xab')](_0xfe0e46,_0xed2cf4[_0x08d3('0x75')][_0x08d3('0xd4')])){throw _0x34f8ef[_0x08d3('0x27')](0x1f4)[_0x08d3('0x36')](new db[(_0x08d3('0xa8'))][(_0x08d3('0xa1'))](_0x08d3('0xd5')+_0xfe0e46));}_0x125a19[_0xed2cf4['body'][_0x08d3('0xd4')]]=_0xed2cf4[_0x08d3('0x75')][_0x08d3('0xa7')];})[_0x08d3('0x1c')](function(){return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0xed2cf4[_0x08d3('0x7b')]['id']},'include':[{'model':db[_0x08d3('0xac')],'as':_0x08d3('0xad')},{'model':db[_0x08d3('0xd6')],'as':_0x08d3('0xd6')}]});})[_0x08d3('0x1c')](handleEntityNotFound(_0x34f8ef,null))['then'](function(_0x464740){if(_0x464740&&_0x464740[_0x08d3('0xad')]){_0x13699b=_0x464740;var _0x49773d=_[_0x08d3('0x14')](_0xed2cf4[_0x08d3('0x75')],{'firstName':_0xed2cf4[_0x08d3('0x75')][_0x08d3('0xa7')],'phone':_0xed2cf4[_0x08d3('0x75')][_0x08d3('0xa7')],'ListId':_0x464740[_0x08d3('0xa6')]});_0x49773d[_0xed2cf4['body'][_0x08d3('0xd4')]]=_0xed2cf4['body']['from'];return db[_0x08d3('0xb7')][_0x08d3('0xd7')]({'where':_0x125a19,'defaults':_0x49773d});}})[_0x08d3('0xb1')](function(_0x2c038c){if(_0x2c038c){_0x5b7cca=_0x2c038c;var _0x3f6882=fs['readFileSync'](path['join'](config[_0x08d3('0x8e')],_0x08d3('0xd8')),_0x08d3('0xd9'));var _0x1012d3=ejs['render'](_0x3f6882,{'body':_['toPairs'](_0xed2cf4[_0x08d3('0x75')][_0x08d3('0x75')]),'bodyTitle':_0x13699b['offlineMessageBody']});return db[_0x08d3('0xda')][_0x08d3('0x74')]({'body':_0x1012d3,'plainBody':htmlToText[_0x08d3('0xdb')](_0x1012d3),'ContactId':_0x2c038c['id'],'ChatWebsiteId':_0x13699b['id']});}})[_0x08d3('0x1c')](function(_0x3b1dc7){_0x357528=_0x3b1dc7;if(_0x143b7b['length']){var _0x3b7b33=_0x143b7b[_0x08d3('0x41')](function(_0x2a951e){return{'name':_0x2a951e[_0x08d3('0xdc')],'basename':_0x2a951e['filename'],'type':_0x2a951e[_0x08d3('0xdd')],'ChatOfflineMessageId':_0x3b1dc7['id']};});_0x1eff1e=_0x3b7b33[_0x08d3('0x41')](_0x16e146=>{var _0x16042d={'filename':_0x16e146[_0x08d3('0x35')],'path':path[_0x08d3('0x8d')](config['root'],_0x08d3('0xde'),_0x08d3('0xd1'),_0x08d3('0xdf'),_0x08d3('0xe0'),_0x16e146[_0x08d3('0xe1')])};return _0x16042d;});if(!_0x13699b[_0x08d3('0xe2')]){return db['sequelize'][_0x08d3('0xe3')](function(_0x4ce318){return db[_0x08d3('0xe4')][_0x08d3('0xe5')](_0x3b7b33,{'transaction':_0x4ce318});});}}})[_0x08d3('0x1c')](function(){if(_0x357528){_0x1f2531=_0x357528;return db[_0x08d3('0xd6')]['findOne']({'where':{'service':!![]},'include':[{'model':db[_0x08d3('0xe6')],'as':'Smtp','raw':!![],'include':[{'model':db[_0x08d3('0xe7')],'as':_0x08d3('0xe7'),'raw':!![]}]}]});}})['then'](function(_0x17832c){if(_0x17832c&&_0x17832c['Smtp']&&_0x13699b[_0x08d3('0xe8')]&&_0x13699b[_0x08d3('0xe9')]){var _0x2b575b=_0x17832c[_0x08d3('0xea')]();return respondWithRpcPromise(_0x08d3('0xeb'),_0x08d3('0xec'),{'account':_0x2b575b,'message':{'from':util[_0x08d3('0x3a')](_0x08d3('0xed'),_0x17832c[_0x08d3('0x35')],_0x17832c[_0x08d3('0xee')]||_0x17832c[_0x08d3('0xef')]['user']),'to':_0x13699b[_0x08d3('0xe9')],'subject':_0x13699b[_0x08d3('0xf0')],'html':_0x1f2531[_0x08d3('0x75')],'attachments':_0x1eff1e}},client9003)['then'](function(){return _0x1f2531;})['catch'](function(_0x175066){logger[_0x08d3('0x22')](_0x175066);});}})['then'](function(){if(_0x13699b&&_0x13699b['openNewInteraction']&&_0x13699b[_0x08d3('0xf1')]){var _0xd52a6b=[];if(_0x143b7b[_0x08d3('0x72')]){_0xd52a6b=_0x143b7b['map'](function(_0x2081b2){return{'name':_0x2081b2[_0x08d3('0xdc')],'basename':_0x2081b2[_0x08d3('0x88')],'type':_0x2081b2['mimetype'],'ChatOfflineMessageId':_0x357528['id']};});}var _0x1b7c2e;if(!_['isNil'](_0x13699b[_0x08d3('0xf2')])){var _0x23e802=_[_0x08d3('0x41')](_0xed2cf4[_0x08d3('0x75')],function(_0x2877e1){return _0x2877e1;});var _0x45c03a=_[_0x08d3('0xf3')](_0x23e802)[0x0];var _0x5d1615=_[_0x08d3('0xf4')](_0x45c03a,function(_0x3ec93b){return _0x3ec93b;});_0x1b7c2e=_0x5d1615[0x1][_0x13699b[_0x08d3('0xf2')]];}var _0x305e59={'from':_0x5b7cca[_0x08d3('0xee')],'firstName':_0x5b7cca[_0x08d3('0xbf')],'lastName':_0x5b7cca[_0x08d3('0xf5')],'mapKey':_0x08d3('0xee'),'message':{'from':_0x5b7cca['email'],'to':_0x13699b[_0x08d3('0xd6')]['email'],'cc':'','subject':_[_0x08d3('0x92')](_0x1b7c2e)?_0x13699b['offlineMessageSubject']:_0x1b7c2e,'messageId':'','sentAt':new Date(),'attach':_0xd52a6b['length'],'attachments':_0xd52a6b,'originChannel':_0x08d3('0xf6'),'ChatWebsiteId':_0x13699b['id'],'ChatOfflineMessageId':_0x1f2531['id'],'originTo':_0x13699b[_0x08d3('0xd6')][_0x08d3('0xee')]},'body':_0x1f2531[_0x08d3('0x75')]};var _0x26365a={'account':{'id':_0x13699b[_0x08d3('0xf1')]},'body':_0x305e59,'log':'NotifyMailAccount'};return respondWithRpcPromise(_0x08d3('0xf7'),_0x08d3('0xf8'),_0x26365a,client9001)[_0x08d3('0x1c')](function(){return _0x1f2531;})[_0x08d3('0x26')](function(_0x1ee303){logger[_0x08d3('0x22')](_0x1ee303);});}return;})['then'](function(){if(_0x1f2531){return _0x1f2531;}})[_0x08d3('0x1c')](respondWithResult(_0x34f8ef,null))[_0x08d3('0x26')](function(){for(var _0x52c7e3 of _0x143b7b){var _0x61deb0=path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],_0x08d3('0xde'),_0x08d3('0xd1'),_0x08d3('0xdf'),_0x08d3('0xe0'),_0x52c7e3['filename']);fs_extra['remove'](_0x61deb0)[_0x08d3('0x26')](function(_0x5af1f6){logger[_0x08d3('0x22')]('Could\x20not\x20remove\x20attachment\x20file',_0x61deb0,_0x5af1f6);});}});};exports[_0x08d3('0xf9')]=function(_0x1aacae,_0x498d77){return db[_0x08d3('0xbb')][_0x08d3('0x73')]({'where':{'id':_0x1aacae[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x498d77,null))[_0x08d3('0x1c')](function(_0x3fbff0){if(_0x3fbff0){return _0x3fbff0[_0x08d3('0xf9')](_0x1aacae['body']['ids'],_[_0x08d3('0xfa')](_0x1aacae[_0x08d3('0x75')],[_0x08d3('0x82'),'id'])||{});}})[_0x08d3('0x1c')](respondWithResult(_0x498d77,null))[_0x08d3('0x26')](handleError(_0x498d77,null));};exports[_0x08d3('0xfb')]=function(_0x1560e6,_0x5f2f34){var _0x59c274={'raw':![],'where':{}};var _0x12f88e={};var _0x122b4f={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x08d3('0x84')]({'where':{'id':_0x1560e6[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x5f2f34,null))[_0x08d3('0x1c')](function(_0x529de8){if(_0x529de8){_0x12f88e[_0x08d3('0x54')]=_[_0x08d3('0x71')](db[_0x08d3('0xbb')]['rawAttributes']);_0x12f88e[_0x08d3('0x5d')]=_[_0x08d3('0x71')](_0x1560e6[_0x08d3('0x5d')]);_0x12f88e[_0x08d3('0x5e')]=_['intersection'](_0x12f88e[_0x08d3('0x54')],_0x12f88e['query']);_0x59c274[_0x08d3('0x60')]=_['intersection'](_0x12f88e[_0x08d3('0x54')],qs[_0x08d3('0x61')](_0x1560e6['query'][_0x08d3('0x61')]));_0x59c274[_0x08d3('0x60')]=_0x59c274[_0x08d3('0x60')]['length']?_0x59c274[_0x08d3('0x60')]:_0x12f88e[_0x08d3('0x54')];if(!_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x62')](_0x08d3('0x63'))){_0x59c274[_0x08d3('0x2d')]=qs[_0x08d3('0x2d')](_0x1560e6['query'][_0x08d3('0x2d')]);_0x59c274[_0x08d3('0x2c')]=qs['offset'](_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x2c')]);}_0x59c274[_0x08d3('0x64')]=qs['sort'](_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x65')]);_0x59c274[_0x08d3('0x66')]=qs['filters'](_[_0x08d3('0x67')](_0x1560e6['query'],_0x12f88e[_0x08d3('0x5e')]));_0x59c274[_0x08d3('0x66')]['ChatWebsiteId']=_0x529de8['id'];if(_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x68')]){_0x59c274[_0x08d3('0x66')]=_['merge'](_0x59c274['where'],{'$or':_['map'](_0x59c274[_0x08d3('0x60')],function(_0x48a3d2){var _0x2b573b={};_0x2b573b[_0x48a3d2]={'$like':'%'+_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x68')]+'%'};return _0x2b573b;})});}_0x59c274=_['merge']({},_0x59c274,_0x1560e6['options']);return db[_0x08d3('0xbb')][_0x08d3('0x2b')]({'where':_0x59c274[_0x08d3('0x66')]})[_0x08d3('0x1c')](function(_0x42f13e){_0x122b4f[_0x08d3('0x2b')]=_0x42f13e;if(_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x6c')]){_0x59c274[_0x08d3('0x6d')]=[{'model':db[_0x08d3('0xb7')],'as':_0x08d3('0xfc'),'required':![]},{'model':db[_0x08d3('0xfd')],'as':_0x08d3('0xfe'),'attributes':[_0x08d3('0x35'),'fullname','internal'],'required':![]},{'model':db[_0x08d3('0xff')],'as':_0x08d3('0x100'),'attributes':['id','name',_0x08d3('0x101')],'where':_0x1560e6['query'][_0x08d3('0x102')]?{'id':_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x102')]}:undefined,'required':_0x1560e6[_0x08d3('0x5d')][_0x08d3('0x102')]?!![]:![]}];}return db[_0x08d3('0xbb')][_0x08d3('0x80')](_0x59c274);})[_0x08d3('0x1c')](function(_0x13ae6f){_0x122b4f[_0x08d3('0x6e')]=_0x13ae6f;return _0x122b4f;});}})['then'](respondWithFilteredResult(_0x5f2f34,_0x59c274))['catch'](handleError(_0x5f2f34,null));};exports[_0x08d3('0x38')]=function(_0x1ff54a,_0x2827cd){var _0x37ec7e=0x0;var _0x4a60ae=0x0;var _0x109cff=![];var _0x5241b4;var _0x3712ff;return db['ChatWebsite'][_0x08d3('0x73')]({'where':{'id':_0x1ff54a[_0x08d3('0x7b')]['id']},'include':[{'model':db['Interval'],'as':_0x08d3('0x42'),'include':[{'model':db[_0x08d3('0x42')],'as':_0x08d3('0x43'),'attributes':['id',_0x08d3('0x3b')]}]}]})['then'](handleEntityNotFound(_0x2827cd,null))[_0x08d3('0x1c')](function(_0x8fd2c6){if(_0x8fd2c6){_0x5241b4=_0x8fd2c6;return _0x8fd2c6[_0x08d3('0x103')]({'raw':!![]});}})[_0x08d3('0x1c')](function(_0x34bbe3){if(_0x5241b4){if(_0x34bbe3){_0x3712ff=_0x34bbe3;}}return require(_0x08d3('0x8f'))[_0x08d3('0x90')]();})[_0x08d3('0x1c')](function(_0x561371){if(_0x561371){_0x4a60ae=_0x561371['virtual'];_0x109cff=_0x561371[_0x08d3('0x91')];}})[_0x08d3('0x1c')](function(){return db['ChatInteraction'][_0x08d3('0x2b')]({'where':{'closed':![]}});})[_0x08d3('0x1c')](function(_0x48730b){_0x37ec7e=_0x48730b;if(_0x4a60ae&&_0x48730b>_0x4a60ae){return db[_0x08d3('0x104')][_0x08d3('0x84')]({'where':{'id':0x1}})[_0x08d3('0x1c')](function(_0xfbdd60){if(_0xfbdd60){_0xfbdd60['increment'](_0x08d3('0x105'));}});}})[_0x08d3('0x1c')](function(){if(!_0x5241b4[_0x08d3('0x42')]||!_0x5241b4[_0x08d3('0x42')][_0x08d3('0x43')])return!![];return checkWebsiteIntervals(_0x5241b4);})[_0x08d3('0x1c')](function(_0x1ae52f){var _0x16c7db=fs[_0x08d3('0x106')](path[_0x08d3('0x8d')](config[_0x08d3('0x8e')],_0x08d3('0x107')),_0x08d3('0xd9'));var _0x36d990=new url[(_0x08d3('0x108'))](_0x5241b4[_0x08d3('0x109')])['origin'];var _0x60e757=_0x08d3('0x10a');var _0x2b0643=![];var _0x986d5={'chatVersion':_0x60e757,'chatWebsiteAddressOrigin':_0x36d990,'remote':_0x5241b4[_0x08d3('0x10b')],'query':querystring['stringify'](_[_0x08d3('0x69')](_0x5241b4['get']({'plain':!![]}),{'customerIp':_0x1ff54a[_0x08d3('0xb9')][_0x08d3('0x4c')]||_0x1ff54a[_0x08d3('0xb9')][_0x08d3('0x10c')]||_0x1ff54a[_0x08d3('0x10d')][_0x08d3('0x10e')]||_0x1ff54a['ip'],'referer':_0x1ff54a['headers'][_0x08d3('0x4e')],'openedInteractions':_0x37ec7e,'maxInteractions':_0x4a60ae,'virtual':_0x109cff[_0x08d3('0x10f')],'online':_0x1ae52f,'custom':_0x109cff}))[_0x08d3('0x110')](/'/g,'\x5c\x27')};_0x2827cd[_0x08d3('0x36')](ejs[_0x08d3('0x111')](Mustache['render'](_0x16c7db,_0x986d5),{'proactiveActions':_0x3712ff,'alignment':_0x5241b4[_0x08d3('0x112')],'verticalAlignment':_0x5241b4[_0x08d3('0x113')],'div_color':_0x5241b4[_0x08d3('0x101')],'labelText':_0x5241b4[_0x08d3('0x114')],'text_color':_0x5241b4[_0x08d3('0x115')],'text_button_color':_0x5241b4['textButtonColor'],'button_color':_0x5241b4[_0x08d3('0x116')],'background_color':_0x5241b4[_0x08d3('0x117')],'hideWhenOffline':_0x5241b4[_0x08d3('0x118')],'intervalId':_0x5241b4['IntervalId'],'isDevelopment':_0x2b0643,'chatVersion':_0x60e757}));})[_0x08d3('0x26')](handleError(_0x2827cd,null));};exports[_0x08d3('0x119')]=function(_0x165d7f,_0x215b67){var _0x15c16c=_0x165d7f[_0x08d3('0x7b')]['id'];var _0x3fd5d3=_0x165d7f[_0x08d3('0x75')];var _0x8b31e1=0xc8;var _0x31815e=null;return db[_0x08d3('0x11a')][_0x08d3('0xe3')]({'isolationLevel':db[_0x08d3('0x11a')][_0x08d3('0x11b')]['ISOLATION_LEVELS'][_0x08d3('0x11c')]},function(_0x2763df){return db[_0x08d3('0x5a')][_0x08d3('0x84')]({'where':{'id':_0x15c16c},'transaction':_0x2763df})[_0x08d3('0x1c')](function(_0x45337b){if(_0x45337b){return db[_0x08d3('0x11d')][_0x08d3('0x31')]({'where':{'ChatWebsiteId':_0x15c16c},'transaction':_0x2763df})[_0x08d3('0x1c')](function(){var _0x749c59=_['map'](_0x3fd5d3,function(_0x3172d9){_0x3172d9['ChatWebsiteId']=_0x15c16c;return _0x3172d9;});return db[_0x08d3('0x11d')][_0x08d3('0xe5')](_0x749c59,{'transaction':_0x2763df});});}else{_0x8b31e1=0x194;_0x31815e=[];}});})[_0x08d3('0x1c')](function(){if(_0x8b31e1!==0x194){return db[_0x08d3('0x11d')][_0x08d3('0x11e')]({'where':{'ChatWebsiteId':_0x15c16c},'order':_0x08d3('0xb4')})['then'](function(_0x892718){_0x31815e=_0x892718;});}})[_0x08d3('0x26')](function(_0x5c188c){_0x8b31e1=0x1f4;logger[_0x08d3('0x22')](_0x5c188c['stack']);if(_0x5c188c['name']){delete _0x5c188c[_0x08d3('0x35')];}_0x31815e=_0x5c188c;})['finally'](function(){if(_0x31815e===null){_0x215b67[_0x08d3('0x11f')](_0x8b31e1);}else{if(_0x8b31e1===0x1f4){_0x215b67['status'](_0x8b31e1)['send'](_0x31815e);}else{_0x215b67[_0x08d3('0x27')](_0x8b31e1)[_0x08d3('0x29')](_0x31815e);}}});};exports[_0x08d3('0x120')]=function(_0x22c4d4,_0x1abcd8){var _0x337a1b={};var _0x3f0f6d={};var _0x46ec8b;var _0x21adac;return db[_0x08d3('0x5a')][_0x08d3('0x84')]({'where':{'id':_0x22c4d4['params']['id']}})['then'](handleEntityNotFound(_0x1abcd8,null))[_0x08d3('0x1c')](function(_0x590f54){if(_0x590f54){_0x46ec8b=_0x590f54;_0x3f0f6d['model']=_[_0x08d3('0x71')](db['ChatApplication'][_0x08d3('0x5b')]);_0x3f0f6d[_0x08d3('0x5d')]=_[_0x08d3('0x71')](_0x22c4d4['query']);_0x3f0f6d['filters']=_[_0x08d3('0x5f')](_0x3f0f6d[_0x08d3('0x54')],_0x3f0f6d['query']);_0x337a1b['attributes']=_[_0x08d3('0x5f')](_0x3f0f6d[_0x08d3('0x54')],qs['fields'](_0x22c4d4[_0x08d3('0x5d')][_0x08d3('0x61')]));_0x337a1b[_0x08d3('0x60')]=_0x337a1b['attributes'][_0x08d3('0x72')]?_0x337a1b['attributes']:_0x3f0f6d[_0x08d3('0x54')];_0x337a1b[_0x08d3('0x64')]=qs[_0x08d3('0x65')](_0x22c4d4[_0x08d3('0x5d')][_0x08d3('0x65')]);_0x337a1b['where']=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x22c4d4[_0x08d3('0x5d')],_0x3f0f6d[_0x08d3('0x5e')]));if(_0x22c4d4[_0x08d3('0x5d')][_0x08d3('0x68')]){_0x337a1b[_0x08d3('0x66')]=_['merge'](_0x337a1b[_0x08d3('0x66')],{'$or':_[_0x08d3('0x41')](_0x337a1b[_0x08d3('0x60')],function(_0x3a44e5){var _0x27c65d={};_0x27c65d[_0x3a44e5]={'$like':'%'+_0x22c4d4[_0x08d3('0x5d')]['filter']+'%'};return _0x27c65d;})});}_0x337a1b=_[_0x08d3('0x69')]({},_0x337a1b,_0x22c4d4[_0x08d3('0x6b')]);return _0x46ec8b['getApplications'](_0x337a1b);}})[_0x08d3('0x1c')](function(_0x24f001){if(_0x24f001){_0x21adac=_0x24f001[_0x08d3('0x72')];if(!_0x22c4d4[_0x08d3('0x5d')]['hasOwnProperty'](_0x08d3('0x63'))){_0x337a1b['limit']=qs['limit'](_0x22c4d4[_0x08d3('0x5d')][_0x08d3('0x2d')]);_0x337a1b['offset']=qs[_0x08d3('0x2c')](_0x22c4d4[_0x08d3('0x5d')][_0x08d3('0x2c')]);}return _0x46ec8b[_0x08d3('0x120')](_0x337a1b);}})['then'](function(_0x3581fa){if(_0x3581fa){return _0x3581fa?{'count':_0x21adac,'rows':_0x3581fa}:null;}})['then'](respondWithResult(_0x1abcd8,null))['catch'](handleError(_0x1abcd8,null));};exports[_0x08d3('0x121')]=function(_0x40d9db,_0x49d01a){return db[_0x08d3('0x122')][_0x08d3('0x73')]({'where':{'id':_0x40d9db['params']['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x49d01a,null))[_0x08d3('0x1c')](function(_0x1a654f){if(_0x1a654f){return _0x1a654f[_0x08d3('0x121')](_0x40d9db[_0x08d3('0x75')]['ids'],_[_0x08d3('0xfa')](_0x40d9db[_0x08d3('0x75')],['ids','id'])||{});}})[_0x08d3('0x1c')](respondWithResult(_0x49d01a,null))[_0x08d3('0x26')](handleError(_0x49d01a,null));};exports[_0x08d3('0x103')]=function(_0x2f468a,_0x1d9094){var _0x20d8da={};var _0x3d2ef2={};var _0x5207dd;var _0x209d1d;return db[_0x08d3('0x5a')][_0x08d3('0x84')]({'where':{'id':_0x2f468a[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x1d9094,null))[_0x08d3('0x1c')](function(_0xa61386){if(_0xa61386){_0x5207dd=_0xa61386;_0x3d2ef2[_0x08d3('0x54')]=_[_0x08d3('0x71')](db[_0x08d3('0x123')][_0x08d3('0x5b')]);_0x3d2ef2[_0x08d3('0x5d')]=_[_0x08d3('0x71')](_0x2f468a[_0x08d3('0x5d')]);_0x3d2ef2['filters']=_[_0x08d3('0x5f')](_0x3d2ef2['model'],_0x3d2ef2[_0x08d3('0x5d')]);_0x20d8da[_0x08d3('0x60')]=_[_0x08d3('0x5f')](_0x3d2ef2[_0x08d3('0x54')],qs[_0x08d3('0x61')](_0x2f468a['query'][_0x08d3('0x61')]));_0x20d8da['attributes']=_0x20d8da[_0x08d3('0x60')]['length']?_0x20d8da[_0x08d3('0x60')]:_0x3d2ef2[_0x08d3('0x54')];_0x20d8da[_0x08d3('0x64')]=qs[_0x08d3('0x65')](_0x2f468a['query']['sort']);_0x20d8da['where']=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x2f468a[_0x08d3('0x5d')],_0x3d2ef2['filters']));if(_0x2f468a['query'][_0x08d3('0x68')]){_0x20d8da[_0x08d3('0x66')]=_['merge'](_0x20d8da[_0x08d3('0x66')],{'$or':_[_0x08d3('0x41')](_0x20d8da['attributes'],function(_0x10c857){var _0x49dc6f={};_0x49dc6f[_0x10c857]={'$like':'%'+_0x2f468a[_0x08d3('0x5d')]['filter']+'%'};return _0x49dc6f;})});}_0x20d8da=_['merge']({},_0x20d8da,_0x2f468a[_0x08d3('0x6b')]);return _0x5207dd[_0x08d3('0x103')](_0x20d8da);}})[_0x08d3('0x1c')](function(_0x136c59){if(_0x136c59){_0x209d1d=_0x136c59[_0x08d3('0x72')];if(!_0x2f468a['query'][_0x08d3('0x62')](_0x08d3('0x63'))){_0x20d8da['limit']=qs[_0x08d3('0x2d')](_0x2f468a[_0x08d3('0x5d')][_0x08d3('0x2d')]);_0x20d8da[_0x08d3('0x2c')]=qs[_0x08d3('0x2c')](_0x2f468a[_0x08d3('0x5d')]['offset']);}return _0x5207dd[_0x08d3('0x103')](_0x20d8da);}})[_0x08d3('0x1c')](function(_0x5507f6){if(_0x5507f6){return _0x5507f6?{'count':_0x209d1d,'rows':_0x5507f6}:null;}})[_0x08d3('0x1c')](respondWithResult(_0x1d9094,null))[_0x08d3('0x26')](handleError(_0x1d9094,null));};exports['getFields']=function(_0x5ab8a7,_0x41d384){var _0x36890b=_0x5ab8a7[_0x08d3('0x5d')][_0x08d3('0x124')]===_0x08d3('0x125')?_0x08d3('0x126'):'onlineForm';return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'attributes':['id',_0x36890b],'where':{'id':_0x5ab8a7[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x41d384,null))['then'](function(_0x11acff){if(_0x11acff){var _0x503cd7=_0x11acff[_0x36890b];var _0x4bf395=_0x503cd7&&_0x503cd7[_0x08d3('0x127')]?_0x503cd7[_0x08d3('0x127')]:[];_0x41d384[_0x08d3('0x36')]({'fromKey':_[_0x08d3('0x92')](_0x503cd7[_0x08d3('0x128')])?undefined:_0x503cd7['fromKey'],'count':_0x4bf395[_0x08d3('0x72')],'rows':_0x4bf395});}})[_0x08d3('0x26')](handleError(_0x41d384,null));};exports[_0x08d3('0x129')]=function(_0x3c4c44,_0x79ba17){var _0x21afe8={'raw':![],'where':{}};var _0x34ad40={};var _0x44455d={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x3c4c44[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x79ba17,null))[_0x08d3('0x1c')](function(_0xd3aa76){if(_0xd3aa76){_0x34ad40['model']=_[_0x08d3('0x71')](db[_0x08d3('0xda')]['rawAttributes']);_0x34ad40[_0x08d3('0x5d')]=_['keys'](_0x3c4c44[_0x08d3('0x5d')]);_0x34ad40[_0x08d3('0x5e')]=_[_0x08d3('0x5f')](_0x34ad40[_0x08d3('0x54')],_0x34ad40['query']);_0x21afe8[_0x08d3('0x60')]=_[_0x08d3('0x5f')](_0x34ad40[_0x08d3('0x54')],qs[_0x08d3('0x61')](_0x3c4c44[_0x08d3('0x5d')][_0x08d3('0x61')]));_0x21afe8[_0x08d3('0x60')]=_0x21afe8[_0x08d3('0x60')][_0x08d3('0x72')]?_0x21afe8['attributes']:_0x34ad40[_0x08d3('0x54')];if(!_0x3c4c44[_0x08d3('0x5d')][_0x08d3('0x62')](_0x08d3('0x63'))){_0x21afe8['limit']=qs['limit'](_0x3c4c44[_0x08d3('0x5d')]['limit']);_0x21afe8['offset']=qs[_0x08d3('0x2c')](_0x3c4c44[_0x08d3('0x5d')]['offset']);}_0x21afe8[_0x08d3('0x64')]=qs['sort'](_0x3c4c44['query'][_0x08d3('0x65')]);_0x21afe8['where']=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x3c4c44['query'],_0x34ad40[_0x08d3('0x5e')]));_0x21afe8['where']['ChatWebsiteId']=_0xd3aa76['id'];if(_0x3c4c44[_0x08d3('0x5d')][_0x08d3('0x68')]){_0x21afe8['where']=_['merge'](_0x21afe8[_0x08d3('0x66')],{'$or':_[_0x08d3('0x41')](_0x21afe8[_0x08d3('0x60')],function(_0x15cae0){var _0x1fcb3b={};_0x1fcb3b[_0x15cae0]={'$like':'%'+_0x3c4c44[_0x08d3('0x5d')]['filter']+'%'};return _0x1fcb3b;})});}_0x21afe8=_[_0x08d3('0x69')]({},_0x21afe8,_0x3c4c44[_0x08d3('0x6b')]);return db[_0x08d3('0xda')]['count']({'where':_0x21afe8[_0x08d3('0x66')]})['then'](function(_0x40b620){_0x44455d[_0x08d3('0x2b')]=_0x40b620;if(_0x3c4c44[_0x08d3('0x5d')][_0x08d3('0x6c')]){_0x21afe8[_0x08d3('0x6d')]=[{'all':!![]}];}else{_0x21afe8[_0x08d3('0x6d')]=[{'model':db['CmContact'],'as':'Contact','required':![]},{'model':db['Attachment'],'as':_0x08d3('0x12a'),'required':![]}];}return db[_0x08d3('0xda')]['findAll'](_0x21afe8);})['then'](function(_0x3c19e0){_0x44455d['rows']=_0x3c19e0;return _0x44455d;});}})[_0x08d3('0x1c')](respondWithFilteredResult(_0x79ba17,_0x21afe8))[_0x08d3('0x26')](handleError(_0x79ba17,null));};exports[_0x08d3('0x12b')]=function(_0xa5fb58,_0x52a292){return db[_0x08d3('0x5a')][_0x08d3('0x73')]({'where':{'id':_0xa5fb58[_0x08d3('0x7b')]['id']}})[_0x08d3('0x1c')](handleEntityNotFound(_0x52a292,null))['then'](function(_0x356a95){if(_0x356a95){return _0x356a95[_0x08d3('0x12b')](_0xa5fb58[_0x08d3('0x75')]['ids'],_['omit'](_0xa5fb58['body'],[_0x08d3('0x82'),'id'])||{})[_0x08d3('0xb1')](function(_0x494218){for(var _0x403750=0x0;_0x403750<_0xa5fb58[_0x08d3('0x75')]['ids'][_0x08d3('0x72')];_0x403750+=0x1){socket['emit'](_0x08d3('0x12c'),{'UserId':Number(_0xa5fb58[_0x08d3('0x75')][_0x08d3('0x82')][_0x403750]),'ChatWebsiteId':Number(_0xa5fb58[_0x08d3('0x7b')]['id'])});}return _0x494218;});}})[_0x08d3('0x1c')](respondWithResult(_0x52a292,null))['catch'](handleError(_0x52a292,null));};exports[_0x08d3('0x12d')]=function(_0x51a2f0,_0x11caf8){return db[_0x08d3('0x5a')]['find']({'where':{'id':_0x51a2f0[_0x08d3('0x7b')]['id']}})['then'](handleEntityNotFound(_0x11caf8,null))[_0x08d3('0x1c')](function(_0x27f659){if(_0x27f659){return _0x27f659['removeAgents'](_0x51a2f0['query'][_0x08d3('0x82')])['then'](function(){if(_[_0x08d3('0x12e')](_0x51a2f0['query']['ids'])){for(var _0x35912c=0x0;_0x35912c<_0x51a2f0[_0x08d3('0x5d')][_0x08d3('0x82')][_0x08d3('0x72')];_0x35912c+=0x1){socket[_0x08d3('0x12f')](_0x08d3('0x130'),{'UserId':Number(_0x51a2f0[_0x08d3('0x5d')][_0x08d3('0x82')][_0x35912c]),'ChatWebsiteId':Number(_0x51a2f0[_0x08d3('0x7b')]['id'])});}}else{socket['emit'](_0x08d3('0x130'),{'UserId':Number(_0x51a2f0['query'][_0x08d3('0x82')]),'ChatWebsiteId':Number(_0x51a2f0['params']['id'])});}});}})[_0x08d3('0x1c')](respondWithStatusCode(_0x11caf8,null))['catch'](handleError(_0x11caf8,null));};exports[_0x08d3('0x131')]=function(_0x315c56,_0x250082){var _0x3bf4dd={};var _0x1c76d7={};var _0x30e42d;var _0x3bd68f;return db[_0x08d3('0x5a')]['findOne']({'where':{'id':_0x315c56['params']['id']}})['then'](handleEntityNotFound(_0x250082,null))['then'](function(_0x201a31){if(_0x201a31){_0x30e42d=_0x201a31;_0x1c76d7[_0x08d3('0x54')]=_[_0x08d3('0x71')](db[_0x08d3('0xfd')][_0x08d3('0x5b')]);_0x1c76d7['query']=_[_0x08d3('0x71')](_0x315c56['query']);_0x1c76d7[_0x08d3('0x5e')]=_[_0x08d3('0x5f')](_0x1c76d7['model'],_0x1c76d7['query']);_0x3bf4dd['attributes']=_[_0x08d3('0x5f')](_0x1c76d7['model'],qs['fields'](_0x315c56[_0x08d3('0x5d')][_0x08d3('0x61')]));_0x3bf4dd[_0x08d3('0x60')]=_0x3bf4dd[_0x08d3('0x60')][_0x08d3('0x72')]?_0x3bf4dd[_0x08d3('0x60')]:_0x1c76d7[_0x08d3('0x54')];_0x3bf4dd[_0x08d3('0x64')]=qs[_0x08d3('0x65')](_0x315c56[_0x08d3('0x5d')][_0x08d3('0x65')]);_0x3bf4dd[_0x08d3('0x66')]=qs[_0x08d3('0x5e')](_[_0x08d3('0x67')](_0x315c56[_0x08d3('0x5d')],_0x1c76d7['filters']));if(_0x315c56['query'][_0x08d3('0x68')]){_0x3bf4dd[_0x08d3('0x66')]=_[_0x08d3('0x69')](_0x3bf4dd[_0x08d3('0x66')],{'$or':_[_0x08d3('0x41')](_0x3bf4dd['attributes'],function(_0x3a1d20){var _0x318f29={};_0x318f29[_0x3a1d20]={'$like':'%'+_0x315c56[_0x08d3('0x5d')][_0x08d3('0x68')]+'%'};return _0x318f29;})});}_0x3bf4dd=_[_0x08d3('0x69')]({},_0x3bf4dd,_0x315c56[_0x08d3('0x6b')]);return _0x30e42d[_0x08d3('0x131')](_0x3bf4dd);}})[_0x08d3('0x1c')](function(_0x1e8a8c){if(_0x1e8a8c){_0x3bd68f=_0x1e8a8c[_0x08d3('0x72')];if(!_0x315c56['query'][_0x08d3('0x62')]('nolimit')){_0x3bf4dd[_0x08d3('0x2d')]=qs[_0x08d3('0x2d')](_0x315c56[_0x08d3('0x5d')][_0x08d3('0x2d')]);_0x3bf4dd[_0x08d3('0x2c')]=qs[_0x08d3('0x2c')](_0x315c56['query'][_0x08d3('0x2c')]);}return _0x30e42d['getAgents'](_0x3bf4dd);}})['then'](function(_0x10a0f0){if(_0x10a0f0){return _0x10a0f0?{'count':_0x3bd68f,'rows':_0x10a0f0}:null;}})['then'](respondWithResult(_0x250082,null))[_0x08d3('0x26')](handleError(_0x250082,null));};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js
index 97d8b88..797901b 100644
--- a/server/api/chatWebsite/chatWebsite.events.js
+++ b/server/api/chatWebsite/chatWebsite.events.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9c5a=['hook','events','../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x4d62ef,_0x48684c){var _0x5bcdd0=function(_0x4e2cbd){while(--_0x4e2cbd){_0x4d62ef['push'](_0x4d62ef['shift']());}};_0x5bcdd0(++_0x48684c);}(_0x9c5a,0x1c3));var _0xa9c5=function(_0xa7181e,_0x40196d){_0xa7181e=_0xa7181e-0x0;var _0xfe038=_0x9c5a[_0xa7181e];return _0xfe038;};'use strict';var EventEmitter=require(_0xa9c5('0x0'));var ChatWebsite=require(_0xa9c5('0x1'))['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xa9c5('0x2')](0x0);var events={'afterCreate':_0xa9c5('0x3'),'afterUpdate':_0xa9c5('0x4'),'afterDestroy':_0xa9c5('0x5')};function emitEvent(_0x4f5552){return function(_0x2acfaf,_0x3051b1,_0x4e9403){ChatWebsiteEvents[_0xa9c5('0x6')](_0x4f5552+':'+_0x2acfaf['id'],_0x2acfaf);ChatWebsiteEvents['emit'](_0x4f5552,_0x2acfaf);_0x4e9403(null);};}for(var e in events){if(events[_0xa9c5('0x7')](e)){var event=events[e];ChatWebsite[_0xa9c5('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;
\ No newline at end of file
+var _0x089f=['ChatWebsite','setMaxListeners','save','update','emit','hasOwnProperty','exports','../../mysqldb'];(function(_0x4871e5,_0x510f48){var _0x1be1f4=function(_0x12e1e7){while(--_0x12e1e7){_0x4871e5['push'](_0x4871e5['shift']());}};_0x1be1f4(++_0x510f48);}(_0x089f,0x1c7));var _0xf089=function(_0x27ea5c,_0xff0465){_0x27ea5c=_0x27ea5c-0x0;var _0x597132=_0x089f[_0x27ea5c];return _0x597132;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0xf089('0x0'))['db'][_0xf089('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xf089('0x2')](0x0);var events={'afterCreate':_0xf089('0x3'),'afterUpdate':_0xf089('0x4'),'afterDestroy':'remove'};function emitEvent(_0x2b7602){return function(_0x3195ed,_0x250428,_0x5ea026){ChatWebsiteEvents[_0xf089('0x5')](_0x2b7602+':'+_0x3195ed['id'],_0x3195ed);ChatWebsiteEvents[_0xf089('0x5')](_0x2b7602,_0x3195ed);_0x5ea026(null);};}for(var e in events){if(events[_0xf089('0x6')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0xf089('0x7')]=ChatWebsiteEvents;
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js
index 232eb58..3589d19 100644
--- a/server/api/chatWebsite/chatWebsite.model.js
+++ b/server/api/chatWebsite/chatWebsite.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x954c=['bluebird','request-promise','path','rimraf','../../config/environment','./chatWebsite.attributes','exports','define','lodash','util','api','moment'];(function(_0x247d68,_0x2bc004){var _0x56f5ce=function(_0x625206){while(--_0x625206){_0x247d68['push'](_0x247d68['shift']());}};_0x56f5ce(++_0x2bc004);}(_0x954c,0xc8));var _0xc954=function(_0x4f3e66,_0x5770b4){_0x4f3e66=_0x4f3e66-0x0;var _0x46aa77=_0x954c[_0x4f3e66];return _0x46aa77;};'use strict';var _=require(_0xc954('0x0'));var util=require(_0xc954('0x1'));var logger=require('../../config/logger')(_0xc954('0x2'));var moment=require(_0xc954('0x3'));var BPromise=require(_0xc954('0x4'));var rp=require(_0xc954('0x5'));var fs=require('fs');var path=require(_0xc954('0x6'));var rimraf=require(_0xc954('0x7'));var config=require(_0xc954('0x8'));var attributes=require(_0xc954('0x9'));module[_0xc954('0xa')]=function(_0x25da4f,_0xc7f72c){return _0x25da4f[_0xc954('0xb')]('ChatWebsite',attributes,{'tableName':'chat_websites','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4b24=['define','chat_websites','util','api','moment','bluebird','request-promise','../../config/environment','./chatWebsite.attributes','exports'];(function(_0x1949c5,_0x5af6ef){var _0xa3cf73=function(_0x2b297e){while(--_0x2b297e){_0x1949c5['push'](_0x1949c5['shift']());}};_0xa3cf73(++_0x5af6ef);}(_0x4b24,0x1c4));var _0x44b2=function(_0x55d693,_0x54f541){_0x55d693=_0x55d693-0x0;var _0x3613b1=_0x4b24[_0x55d693];return _0x3613b1;};'use strict';var _=require('lodash');var util=require(_0x44b2('0x0'));var logger=require('../../config/logger')(_0x44b2('0x1'));var moment=require(_0x44b2('0x2'));var BPromise=require(_0x44b2('0x3'));var rp=require(_0x44b2('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x44b2('0x5'));var attributes=require(_0x44b2('0x6'));module[_0x44b2('0x7')]=function(_0x49dfb7,_0x1fc1dc){return _0x49dfb7[_0x44b2('0x8')]('ChatWebsite',attributes,{'tableName':_0x44b2('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.rpc.js b/server/api/chatWebsite/chatWebsite.rpc.js
index ec6d72c..e4025f7 100644
--- a/server/api/chatWebsite/chatWebsite.rpc.js
+++ b/server/api/chatWebsite/chatWebsite.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xada8=['../../mysqldb','rpc','../../config/environment','jayson/promise','client','redis','socket.io-emitter','./chatWebsite.socket','request','then','info','request\x20sent','stringify','error','code','message','ChatWebsite,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis'];(function(_0x467e51,_0x1aeca6){var _0x4b12b8=function(_0x8ae57a){while(--_0x8ae57a){_0x467e51['push'](_0x467e51['shift']());}};_0x4b12b8(++_0x1aeca6);}(_0xada8,0x14b));var _0x8ada=function(_0x41e316,_0x38ebcb){_0x41e316=_0x41e316-0x0;var _0x494aef=_0xada8[_0x41e316];return _0x494aef;};'use strict';var _=require(_0x8ada('0x0'));var util=require(_0x8ada('0x1'));var moment=require('moment');var BPromise=require(_0x8ada('0x2'));var rs=require(_0x8ada('0x3'));var fs=require('fs');var Redis=require(_0x8ada('0x4'));var db=require(_0x8ada('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8ada('0x6'));var config=require(_0x8ada('0x7'));var jayson=require(_0x8ada('0x8'));var client=jayson[_0x8ada('0x9')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x8ada('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x8ada('0xb'))(new Redis(config[_0x8ada('0xa')]));require(_0x8ada('0xc'))['register'](socket);function respondWithRpcPromise(_0x10a066,_0x1e18ab,_0x4f4002){return new BPromise(function(_0x57da7a,_0xbc1059){return client[_0x8ada('0xd')](_0x10a066,_0x4f4002)[_0x8ada('0xe')](function(_0x13a7a0){logger[_0x8ada('0xf')]('ChatWebsite,\x20%s,\x20%s',_0x1e18ab,_0x8ada('0x10'));logger['debug']('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x1e18ab,'request\x20sent',JSON[_0x8ada('0x11')](_0x13a7a0));if(_0x13a7a0[_0x8ada('0x12')]){if(_0x13a7a0[_0x8ada('0x12')][_0x8ada('0x13')]===0x1f4){logger[_0x8ada('0x12')]('ChatWebsite,\x20%s,\x20%s',_0x1e18ab,_0x13a7a0[_0x8ada('0x12')]['message']);return _0xbc1059(_0x13a7a0[_0x8ada('0x12')][_0x8ada('0x14')]);}logger['error'](_0x8ada('0x15'),_0x1e18ab,_0x13a7a0[_0x8ada('0x12')]['message']);return _0x57da7a(_0x13a7a0['error'][_0x8ada('0x14')]);}else{logger['info'](_0x8ada('0x15'),_0x1e18ab,'request\x20sent');_0x57da7a(_0x13a7a0[_0x8ada('0x16')][_0x8ada('0x14')]);}})[_0x8ada('0x17')](function(_0x31189f){logger[_0x8ada('0x12')]('ChatWebsite,\x20%s,\x20%s',_0x1e18ab,_0x31189f);_0xbc1059(_0x31189f);});});}
\ No newline at end of file
+var _0x7a91=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','./chatWebsite.socket','register','then','info','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatWebsite,\x20%s,\x20%s','result','catch'];(function(_0x27685e,_0x845417){var _0x224a6f=function(_0x24bd2b){while(--_0x24bd2b){_0x27685e['push'](_0x27685e['shift']());}};_0x224a6f(++_0x845417);}(_0x7a91,0x1ee));var _0x17a9=function(_0x54a154,_0x1e6a06){_0x54a154=_0x54a154-0x0;var _0x25d7ca=_0x7a91[_0x54a154];return _0x25d7ca;};'use strict';var _=require('lodash');var util=require(_0x17a9('0x0'));var moment=require(_0x17a9('0x1'));var BPromise=require(_0x17a9('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x17a9('0x3'));var db=require(_0x17a9('0x4'))['db'];var utils=require(_0x17a9('0x5'));var logger=require(_0x17a9('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x17a9('0x7'));var client=jayson[_0x17a9('0x8')][_0x17a9('0x9')]({'port':0x232a});config[_0x17a9('0xa')]=_[_0x17a9('0xb')](config[_0x17a9('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x17a9('0xa')]));require(_0x17a9('0xc'))[_0x17a9('0xd')](socket);function respondWithRpcPromise(_0x219b91,_0x50f9a2,_0x18b695){return new BPromise(function(_0xd63e46,_0x196769){return client['request'](_0x219b91,_0x18b695)[_0x17a9('0xe')](function(_0x2cf328){logger[_0x17a9('0xf')]('ChatWebsite,\x20%s,\x20%s',_0x50f9a2,_0x17a9('0x10'));logger[_0x17a9('0x11')](_0x17a9('0x12'),_0x50f9a2,'request\x20sent',JSON[_0x17a9('0x13')](_0x2cf328));if(_0x2cf328[_0x17a9('0x14')]){if(_0x2cf328[_0x17a9('0x14')][_0x17a9('0x15')]===0x1f4){logger[_0x17a9('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x50f9a2,_0x2cf328['error']['message']);return _0x196769(_0x2cf328[_0x17a9('0x14')][_0x17a9('0x16')]);}logger['error'](_0x17a9('0x17'),_0x50f9a2,_0x2cf328[_0x17a9('0x14')][_0x17a9('0x16')]);return _0xd63e46(_0x2cf328[_0x17a9('0x14')]['message']);}else{logger[_0x17a9('0xf')](_0x17a9('0x17'),_0x50f9a2,_0x17a9('0x10'));_0xd63e46(_0x2cf328[_0x17a9('0x18')][_0x17a9('0x16')]);}})[_0x17a9('0x19')](function(_0x1bd8c0){logger[_0x17a9('0x14')]('ChatWebsite,\x20%s,\x20%s',_0x50f9a2,_0x1bd8c0);_0x196769(_0x1bd8c0);});});}
\ No newline at end of file
diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js
index a887774..45da014 100644
--- a/server/api/chatWebsite/chatWebsite.socket.js
+++ b/server/api/chatWebsite/chatWebsite.socket.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xbd80=['save','remove','removeListener','length','./chatWebsite.events'];(function(_0xf1ea4a,_0x371699){var _0x3a2c01=function(_0x503b2d){while(--_0x503b2d){_0xf1ea4a['push'](_0xf1ea4a['shift']());}};_0x3a2c01(++_0x371699);}(_0xbd80,0xf4));var _0x0bd8=function(_0x5eaea6,_0x5dd93b){_0x5eaea6=_0x5eaea6-0x0;var _0x4a0695=_0xbd80[_0x5eaea6];return _0x4a0695;};'use strict';var ChatWebsiteEvents=require(_0x0bd8('0x0'));var events=[_0x0bd8('0x1'),_0x0bd8('0x2'),'update'];function createListener(_0x6b4c2a,_0x1b5fca){return function(_0x21dc22){_0x1b5fca['emit'](_0x6b4c2a,_0x21dc22);};}function removeListener(_0x194913,_0x301d71){return function(){ChatWebsiteEvents[_0x0bd8('0x3')](_0x194913,_0x301d71);};}exports['register']=function(_0x5ba391){for(var _0x43a70c=0x0,_0xa3b6c9=events[_0x0bd8('0x4')];_0x43a70c<_0xa3b6c9;_0x43a70c++){var _0x3c596b=events[_0x43a70c];var _0x758642=createListener('chatWebsite:'+_0x3c596b,_0x5ba391);ChatWebsiteEvents['on'](_0x3c596b,_0x758642);}};
\ No newline at end of file
+var _0x8d97=['removeListener','register','save','remove'];(function(_0x1850ba,_0x55e013){var _0x2045e8=function(_0x5a5b09){while(--_0x5a5b09){_0x1850ba['push'](_0x1850ba['shift']());}};_0x2045e8(++_0x55e013);}(_0x8d97,0x19a));var _0x78d9=function(_0x5df44c,_0x4cefec){_0x5df44c=_0x5df44c-0x0;var _0x4a93e8=_0x8d97[_0x5df44c];return _0x4a93e8;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=[_0x78d9('0x0'),_0x78d9('0x1'),'update'];function createListener(_0x55a87b,_0x3e2164){return function(_0x2a8a6a){_0x3e2164['emit'](_0x55a87b,_0x2a8a6a);};}function removeListener(_0x69b67e,_0x1d2300){return function(){ChatWebsiteEvents[_0x78d9('0x2')](_0x69b67e,_0x1d2300);};}exports[_0x78d9('0x3')]=function(_0x4b00a1){for(var _0x15b401=0x0,_0x1ac037=events['length'];_0x15b401<_0x1ac037;_0x15b401++){var _0x4ab41a=events[_0x15b401];var _0x5a5d15=createListener('chatWebsite:'+_0x4ab41a,_0x4b00a1);ChatWebsiteEvents['on'](_0x4ab41a,_0x5a5d15);}};
\ No newline at end of file
diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js
index bff0988..b1ee63b 100644
--- a/server/api/chatWebsite/index.js
+++ b/server/api/chatWebsite/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf4be=['addApplications','addProactiveActions','/:id/users','put','update','destroy','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatWebsite.controller','isAuthenticated','index','get','/describe','describe','/:id','/:id/dispositions','getAnswers','/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','getInteractions','getSnippet','getApplications','/:id/proactive_actions','getProactiveActions','getOfflineMessages','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','diskStorage','root','format','%s-%s','originalname','single','addLogo','join','server/files/images/avatars/','now','addAvatar','file','addCustomerAvatar','addSystemAvatar','notify','server/files','offline-chat','ensureDir','replace','extname','/:id/offline','any','offline','addInteraction','/:id/applications'];(function(_0x1e059f,_0x4d49f9){var _0x352098=function(_0x5325cd){while(--_0x5325cd){_0x1e059f['push'](_0x1e059f['shift']());}};_0x352098(++_0x4d49f9);}(_0xf4be,0xa1));var _0xef4b=function(_0x1932cc,_0x253440){_0x1932cc=_0x1932cc-0x0;var _0x46ee54=_0xf4be[_0x1932cc];return _0x46ee54;};'use strict';var multer=require(_0xef4b('0x0'));var util=require(_0xef4b('0x1'));var path=require(_0xef4b('0x2'));var timeout=require(_0xef4b('0x3'));var express=require(_0xef4b('0x4'));var router=express[_0xef4b('0x5')]();var fs_extra=require(_0xef4b('0x6'));var auth=require(_0xef4b('0x7'));var interaction=require(_0xef4b('0x8'));var config=require(_0xef4b('0x9'));var controller=require(_0xef4b('0xa'));router['get']('/',auth[_0xef4b('0xb')](),controller[_0xef4b('0xc')]);router[_0xef4b('0xd')](_0xef4b('0xe'),auth[_0xef4b('0xb')](),controller[_0xef4b('0xf')]);router[_0xef4b('0xd')](_0xef4b('0x10'),auth[_0xef4b('0xb')](),controller['show']);router[_0xef4b('0xd')](_0xef4b('0x11'),auth['isAuthenticated'](),controller['getDispositions']);router[_0xef4b('0xd')]('/:id/canned_answers',auth[_0xef4b('0xb')](),controller[_0xef4b('0x12')]);router[_0xef4b('0xd')](_0xef4b('0x13'),controller[_0xef4b('0x14')]);router['get'](_0xef4b('0x15'),controller[_0xef4b('0x16')]);router[_0xef4b('0xd')](_0xef4b('0x17'),controller[_0xef4b('0x18')]);router[_0xef4b('0xd')](_0xef4b('0x19'),controller[_0xef4b('0x1a')]);router[_0xef4b('0xd')](_0xef4b('0x1b'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x1c')]);router[_0xef4b('0xd')]('/:id/snippet',controller[_0xef4b('0x1d')]);router[_0xef4b('0xd')]('/:id/applications',auth[_0xef4b('0xb')](),controller[_0xef4b('0x1e')]);router[_0xef4b('0xd')](_0xef4b('0x1f'),auth['isAuthenticated'](),controller[_0xef4b('0x20')]);router['get']('/:id/fields',controller['getFields']);router[_0xef4b('0xd')]('/:id/offline_messages',auth[_0xef4b('0xb')](),controller[_0xef4b('0x21')]);router[_0xef4b('0xd')]('/:id/users',auth[_0xef4b('0xb')](),controller[_0xef4b('0x22')]);router[_0xef4b('0x23')]('/',auth[_0xef4b('0xb')](),controller['create']);router[_0xef4b('0x23')](_0xef4b('0x11'),auth['isAuthenticated'](),controller[_0xef4b('0x24')]);router[_0xef4b('0x23')](_0xef4b('0x25'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x26')]);var upload=multer({'storage':multer[_0xef4b('0x27')]({'destination':function(_0x358529,_0x114894,_0x4b4876){_0x4b4876(null,path['join'](config[_0xef4b('0x28')],'server/files/images/logos/'));},'filename':function(_0x12dde9,_0x2d7a3,_0x24baad){_0x24baad(null,util[_0xef4b('0x29')](_0xef4b('0x2a'),Date['now'](),_0x2d7a3[_0xef4b('0x2b')]));}})});router[_0xef4b('0x23')](_0xef4b('0x13'),upload[_0xef4b('0x2c')]('file'),controller[_0xef4b('0x2d')]);var upload=multer({'storage':multer[_0xef4b('0x27')]({'destination':function(_0x33df43,_0x4a515a,_0x4036ea){_0x4036ea(null,path[_0xef4b('0x2e')](config[_0xef4b('0x28')],_0xef4b('0x2f')));},'filename':function(_0x154740,_0x323c12,_0x458bfa){_0x458bfa(null,util[_0xef4b('0x29')](_0xef4b('0x2a'),Date[_0xef4b('0x30')](),_0x323c12[_0xef4b('0x2b')]));}})});router[_0xef4b('0x23')](_0xef4b('0x15'),upload['single']('file'),controller[_0xef4b('0x31')]);var upload=multer({'storage':multer[_0xef4b('0x27')]({'destination':function(_0x45ec73,_0x55b603,_0x23c4f3){_0x23c4f3(null,path['join'](config['root'],_0xef4b('0x2f')));},'filename':function(_0x167b70,_0x5b6528,_0x5bdf14){_0x5bdf14(null,util[_0xef4b('0x29')]('%s-%s',Date[_0xef4b('0x30')](),_0x5b6528[_0xef4b('0x2b')]));}})});router['post'](_0xef4b('0x17'),upload[_0xef4b('0x2c')](_0xef4b('0x32')),controller[_0xef4b('0x33')]);var upload=multer({'storage':multer[_0xef4b('0x27')]({'destination':function(_0x413ca3,_0x2781f7,_0x277a01){_0x277a01(null,path[_0xef4b('0x2e')](config[_0xef4b('0x28')],_0xef4b('0x2f')));},'filename':function(_0x148957,_0x275b12,_0x1e1150){_0x1e1150(null,util[_0xef4b('0x29')]('%s-%s',Date[_0xef4b('0x30')](),_0x275b12[_0xef4b('0x2b')]));}})});router[_0xef4b('0x23')](_0xef4b('0x19'),upload[_0xef4b('0x2c')]('file'),controller[_0xef4b('0x34')]);router[_0xef4b('0x23')]('/:id/notify',controller[_0xef4b('0x35')]);const offlineUploadMulter=multer({'storage':multer[_0xef4b('0x27')]({'destination':function(_0x4696f5,_0x198ba8,_0xa68faa){const _0x9b6eb2=path[_0xef4b('0x2e')](config['root'],_0xef4b('0x36'),'attachments',_0xef4b('0x37'));fs_extra[_0xef4b('0x38')](_0x9b6eb2,function(){_0xa68faa(null,_0x9b6eb2);});},'filename':function(_0x42708c,_0x2414a9,_0x251db7){const _0x2ff50d=_0x2414a9[_0xef4b('0x2b')][_0xef4b('0x39')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x7052a9=path[_0xef4b('0x3a')](_0x2ff50d);const _0x77493c=Date[_0xef4b('0x30')]()+'-'+_0x2ff50d[_0xef4b('0x39')](_0x7052a9,'')+_0x7052a9;_0x251db7(null,_0x77493c);}})});router['post'](_0xef4b('0x3b'),offlineUploadMulter[_0xef4b('0x3c')](),controller[_0xef4b('0x3d')]);router[_0xef4b('0x23')](_0xef4b('0x1b'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x3e')]);router[_0xef4b('0x23')](_0xef4b('0x3f'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x40')]);router[_0xef4b('0x23')](_0xef4b('0x1f'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x41')]);router[_0xef4b('0x23')](_0xef4b('0x42'),auth[_0xef4b('0xb')](),controller['addAgents']);router[_0xef4b('0x43')](_0xef4b('0x10'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x44')]);router['delete'](_0xef4b('0x10'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x45')]);router[_0xef4b('0x46')](_0xef4b('0x11'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x47')]);router[_0xef4b('0x46')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xef4b('0x48')]);router[_0xef4b('0x46')](_0xef4b('0x42'),auth[_0xef4b('0xb')](),controller[_0xef4b('0x49')]);module[_0xef4b('0x4a')]=router;
\ No newline at end of file
+var _0x416a=['/:id/canned_answers','getAnswers','/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','/:id/system_avatar','getSystemAvatar','/:id/interactions','/:id/snippet','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','getFields','/:id/offline_messages','/:id/users','getAgents','post','create','addDisposition','addAnswer','diskStorage','join','root','server/files/images/logos/','format','originalname','single','file','server/files/images/avatars/','%s-%s','now','addAvatar','addSystemAvatar','/:id/notify','notify','attachments','ensureDir','replace','extname','/:id/offline','any','offline','addInteraction','addApplications','addProactiveActions','addAgents','/:id','delete','destroy','removeDispositions','removeAnswers','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatWebsite.controller','get','index','isAuthenticated','describe','show','/:id/dispositions','getDispositions'];(function(_0x24ba5f,_0x2e3ea4){var _0x2bd111=function(_0x206e5f){while(--_0x206e5f){_0x24ba5f['push'](_0x24ba5f['shift']());}};_0x2bd111(++_0x2e3ea4);}(_0x416a,0x153));var _0xa416=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x416a[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xa416('0x0'));var util=require(_0xa416('0x1'));var path=require('path');var timeout=require(_0xa416('0x2'));var express=require(_0xa416('0x3'));var router=express[_0xa416('0x4')]();var fs_extra=require(_0xa416('0x5'));var auth=require(_0xa416('0x6'));var interaction=require(_0xa416('0x7'));var config=require('../../config/environment');var controller=require(_0xa416('0x8'));router[_0xa416('0x9')]('/',auth['isAuthenticated'](),controller[_0xa416('0xa')]);router[_0xa416('0x9')]('/describe',auth[_0xa416('0xb')](),controller[_0xa416('0xc')]);router[_0xa416('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xa416('0xd')]);router[_0xa416('0x9')](_0xa416('0xe'),auth[_0xa416('0xb')](),controller[_0xa416('0xf')]);router[_0xa416('0x9')](_0xa416('0x10'),auth[_0xa416('0xb')](),controller[_0xa416('0x11')]);router[_0xa416('0x9')](_0xa416('0x12'),controller[_0xa416('0x13')]);router['get'](_0xa416('0x14'),controller[_0xa416('0x15')]);router[_0xa416('0x9')](_0xa416('0x16'),controller['getCustomerAvatar']);router[_0xa416('0x9')](_0xa416('0x17'),controller[_0xa416('0x18')]);router['get'](_0xa416('0x19'),auth[_0xa416('0xb')](),controller['getInteractions']);router[_0xa416('0x9')](_0xa416('0x1a'),controller['getSnippet']);router[_0xa416('0x9')](_0xa416('0x1b'),auth['isAuthenticated'](),controller[_0xa416('0x1c')]);router['get'](_0xa416('0x1d'),auth[_0xa416('0xb')](),controller[_0xa416('0x1e')]);router[_0xa416('0x9')]('/:id/fields',controller[_0xa416('0x1f')]);router[_0xa416('0x9')](_0xa416('0x20'),auth[_0xa416('0xb')](),controller['getOfflineMessages']);router[_0xa416('0x9')](_0xa416('0x21'),auth[_0xa416('0xb')](),controller[_0xa416('0x22')]);router[_0xa416('0x23')]('/',auth['isAuthenticated'](),controller[_0xa416('0x24')]);router[_0xa416('0x23')](_0xa416('0xe'),auth[_0xa416('0xb')](),controller[_0xa416('0x25')]);router[_0xa416('0x23')](_0xa416('0x10'),auth[_0xa416('0xb')](),controller[_0xa416('0x26')]);var upload=multer({'storage':multer[_0xa416('0x27')]({'destination':function(_0x22fc45,_0x3af7ed,_0x1b1d8d){_0x1b1d8d(null,path[_0xa416('0x28')](config[_0xa416('0x29')],_0xa416('0x2a')));},'filename':function(_0x2f8b96,_0x2dd7d8,_0x15d149){_0x15d149(null,util[_0xa416('0x2b')]('%s-%s',Date['now'](),_0x2dd7d8[_0xa416('0x2c')]));}})});router[_0xa416('0x23')]('/:id/logo',upload[_0xa416('0x2d')](_0xa416('0x2e')),controller['addLogo']);var upload=multer({'storage':multer[_0xa416('0x27')]({'destination':function(_0x2ca280,_0x49e643,_0xdef077){_0xdef077(null,path['join'](config[_0xa416('0x29')],_0xa416('0x2f')));},'filename':function(_0x1112c1,_0x8154ee,_0xb2c568){_0xb2c568(null,util['format'](_0xa416('0x30'),Date[_0xa416('0x31')](),_0x8154ee[_0xa416('0x2c')]));}})});router[_0xa416('0x23')](_0xa416('0x14'),upload[_0xa416('0x2d')](_0xa416('0x2e')),controller[_0xa416('0x32')]);var upload=multer({'storage':multer[_0xa416('0x27')]({'destination':function(_0x3b6a82,_0x3eef8b,_0x215e2d){_0x215e2d(null,path[_0xa416('0x28')](config[_0xa416('0x29')],'server/files/images/avatars/'));},'filename':function(_0x3622e0,_0x1cb3c1,_0x2c910f){_0x2c910f(null,util[_0xa416('0x2b')](_0xa416('0x30'),Date[_0xa416('0x31')](),_0x1cb3c1[_0xa416('0x2c')]));}})});router[_0xa416('0x23')](_0xa416('0x16'),upload[_0xa416('0x2d')]('file'),controller['addCustomerAvatar']);var upload=multer({'storage':multer[_0xa416('0x27')]({'destination':function(_0xbcda99,_0x26cf9d,_0x3cbd0a){_0x3cbd0a(null,path[_0xa416('0x28')](config['root'],_0xa416('0x2f')));},'filename':function(_0x21189a,_0x4fd792,_0x45f4d7){_0x45f4d7(null,util[_0xa416('0x2b')](_0xa416('0x30'),Date[_0xa416('0x31')](),_0x4fd792[_0xa416('0x2c')]));}})});router[_0xa416('0x23')](_0xa416('0x17'),upload[_0xa416('0x2d')](_0xa416('0x2e')),controller[_0xa416('0x33')]);router[_0xa416('0x23')](_0xa416('0x34'),controller[_0xa416('0x35')]);const offlineUploadMulter=multer({'storage':multer[_0xa416('0x27')]({'destination':function(_0x2964ad,_0x1129ed,_0x131dd6){const _0x2bb8e0=path[_0xa416('0x28')](config[_0xa416('0x29')],'server/files',_0xa416('0x36'),'offline-chat');fs_extra[_0xa416('0x37')](_0x2bb8e0,function(){_0x131dd6(null,_0x2bb8e0);});},'filename':function(_0x3e97ab,_0x51b42d,_0x491403){const _0x2747ac=_0x51b42d[_0xa416('0x2c')][_0xa416('0x38')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x19117b=path[_0xa416('0x39')](_0x2747ac);const _0x199faf=Date[_0xa416('0x31')]()+'-'+_0x2747ac['replace'](_0x19117b,'')+_0x19117b;_0x491403(null,_0x199faf);}})});router[_0xa416('0x23')](_0xa416('0x3a'),offlineUploadMulter[_0xa416('0x3b')](),controller[_0xa416('0x3c')]);router[_0xa416('0x23')](_0xa416('0x19'),auth['isAuthenticated'](),controller[_0xa416('0x3d')]);router[_0xa416('0x23')]('/:id/applications',auth[_0xa416('0xb')](),controller[_0xa416('0x3e')]);router['post'](_0xa416('0x1d'),auth[_0xa416('0xb')](),controller[_0xa416('0x3f')]);router[_0xa416('0x23')](_0xa416('0x21'),auth['isAuthenticated'](),controller[_0xa416('0x40')]);router['put'](_0xa416('0x41'),auth[_0xa416('0xb')](),controller['update']);router[_0xa416('0x42')](_0xa416('0x41'),auth[_0xa416('0xb')](),controller[_0xa416('0x43')]);router[_0xa416('0x42')](_0xa416('0xe'),auth[_0xa416('0xb')](),controller[_0xa416('0x44')]);router[_0xa416('0x42')](_0xa416('0x10'),auth[_0xa416('0xb')](),controller[_0xa416('0x45')]);router[_0xa416('0x42')](_0xa416('0x21'),auth[_0xa416('0xb')](),controller['removeAgents']);module[_0xa416('0x46')]=router;
\ No newline at end of file
diff --git a/server/api/client-side-logs.js b/server/api/client-side-logs.js
index fb79de7..71ada1c 100644
--- a/server/api/client-side-logs.js
+++ b/server/api/client-side-logs.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x650c=['../config/environment','env','production','app','client-side-logger','expressEndpoint','/client-logs','use','isAuthenticated','exports','beaver-logger/server'];(function(_0x433f08,_0x3d915b){var _0x253741=function(_0x406547){while(--_0x406547){_0x433f08['push'](_0x433f08['shift']());}};_0x253741(++_0x3d915b);}(_0x650c,0xf1));var _0xc650=function(_0x4e7dd7,_0x3e7134){_0x4e7dd7=_0x4e7dd7-0x0;var _0x4f4461=_0x650c[_0x4e7dd7];return _0x4f4461;};var beaverLogger=require(_0xc650('0x0'));var express=require('express');var auth=require('../components/auth/service');var config=require(_0xc650('0x1'));var router=express['Router']();var isProduction=config[_0xc650('0x2')]===_0xc650('0x3')||![];function clientSideLogs(_0x2b4c31,_0x160fd9,_0x29d8c4){var _0x557f4a=_0x2b4c31[_0xc650('0x4')]['get'](_0xc650('0x5'));if(!_0x557f4a){throw new Error('Client-Side\x20logger\x20not\x20found!');}return beaverLogger[_0xc650('0x6')]({'uri':_0xc650('0x7'),'logger':_0x557f4a,'enableCors':!isProduction})(_0x2b4c31,_0x160fd9,_0x29d8c4);}router[_0xc650('0x8')](auth[_0xc650('0x9')](),clientSideLogs);module[_0xc650('0xa')]=router;
\ No newline at end of file
+var _0xeecb=['Client-Side\x20logger\x20not\x20found!','/client-logs','use','exports','beaver-logger/server','express','../config/environment','Router','env','production','get'];(function(_0x5ce020,_0x5c0e73){var _0x50919c=function(_0x1249ae){while(--_0x1249ae){_0x5ce020['push'](_0x5ce020['shift']());}};_0x50919c(++_0x5c0e73);}(_0xeecb,0x7d));var _0xbeec=function(_0x1c53e1,_0x2f11a8){_0x1c53e1=_0x1c53e1-0x0;var _0x1f5b1f=_0xeecb[_0x1c53e1];return _0x1f5b1f;};var beaverLogger=require(_0xbeec('0x0'));var express=require(_0xbeec('0x1'));var auth=require('../components/auth/service');var config=require(_0xbeec('0x2'));var router=express[_0xbeec('0x3')]();var isProduction=config[_0xbeec('0x4')]===_0xbeec('0x5')||![];function clientSideLogs(_0x33987b,_0x49a382,_0x1ed48d){var _0x3846fb=_0x33987b['app'][_0xbeec('0x6')]('client-side-logger');if(!_0x3846fb){throw new Error(_0xbeec('0x7'));}return beaverLogger['expressEndpoint']({'uri':_0xbeec('0x8'),'logger':_0x3846fb,'enableCors':!isProduction})(_0x33987b,_0x49a382,_0x1ed48d);}router[_0xbeec('0x9')](auth['isAuthenticated'](),clientSideLogs);module[_0xbeec('0xa')]=router;
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js
index fa71eda..aadd995 100644
--- a/server/api/cloudProvider/cloudProvider.attributes.js
+++ b/server/api/cloudProvider/cloudProvider.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x098f=['MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20client_secret','MicrosoftAzure\x20=>\x20access_token','TEXT','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports','STRING','ENUM','AmazonAWS','Google','MicrosoftAzure','Outlook365','Dynamics365','MicrosoftAzure\x20=>\x20client_id'];(function(_0x1a9302,_0x13ce80){var _0x4d79f0=function(_0x104240){while(--_0x104240){_0x1a9302['push'](_0x1a9302['shift']());}};_0x4d79f0(++_0x13ce80);}(_0x098f,0x1c7));var _0xf098=function(_0x1ad188,_0x48b9ab){_0x1ad188=_0x1ad188-0x0;var _0x5742ac=_0x098f[_0x1ad188];return _0x5742ac;};'use strict';var Sequelize=require(_0xf098('0x0'));module[_0xf098('0x1')]={'name':{'type':Sequelize[_0xf098('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0xf098('0x3')](_0xf098('0x4'),_0xf098('0x5'),_0xf098('0x6')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0xf098('0x3')](_0xf098('0x7'),_0xf098('0x8'))},'data1':{'type':Sequelize[_0xf098('0x2')],'comment':_0xf098('0x9')},'data2':{'type':Sequelize[_0xf098('0x2')],'comment':_0xf098('0xa')},'data3':{'type':Sequelize[_0xf098('0x2')],'comment':_0xf098('0xb')},'data4':{'type':Sequelize[_0xf098('0x2')],'comment':'MicrosoftAzure\x20=>\x20redirect_uri'},'data5':{'type':Sequelize['TEXT'],'comment':_0xf098('0xc')},'data6':{'type':Sequelize[_0xf098('0xd')],'comment':'MicrosoftAzure\x20=>\x20refresh_token'},'data7':{'type':Sequelize[_0xf098('0xd')],'comment':_0xf098('0xe')}};
\ No newline at end of file
+var _0xb0be=['MicrosoftAzure','Outlook365','Dynamics365','MicrosoftAzure\x20=>\x20client_id','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports','STRING','ENUM'];(function(_0x843f74,_0x12ddbe){var _0x318cea=function(_0x467dcd){while(--_0x467dcd){_0x843f74['push'](_0x843f74['shift']());}};_0x318cea(++_0x12ddbe);}(_0xb0be,0x15a));var _0xeb0b=function(_0x3a924a,_0x5b8ed3){_0x3a924a=_0x3a924a-0x0;var _0x144b03=_0xb0be[_0x3a924a];return _0x144b03;};'use strict';var Sequelize=require(_0xeb0b('0x0'));module[_0xeb0b('0x1')]={'name':{'type':Sequelize[_0xeb0b('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0xeb0b('0x3')]('AmazonAWS','Google',_0xeb0b('0x4')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0xeb0b('0x3')](_0xeb0b('0x5'),_0xeb0b('0x6'))},'data1':{'type':Sequelize[_0xeb0b('0x2')],'comment':_0xeb0b('0x7')},'data2':{'type':Sequelize['STRING'],'comment':_0xeb0b('0x8')},'data3':{'type':Sequelize[_0xeb0b('0x2')],'comment':'MicrosoftAzure\x20=>\x20client_secret'},'data4':{'type':Sequelize['STRING'],'comment':_0xeb0b('0x9')},'data5':{'type':Sequelize[_0xeb0b('0xa')],'comment':_0xeb0b('0xb')},'data6':{'type':Sequelize[_0xeb0b('0xa')],'comment':_0xeb0b('0xc')},'data7':{'type':Sequelize[_0xeb0b('0xa')],'comment':_0xeb0b('0xd')}};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js
index 5ee0dda..3b78c68 100644
--- a/server/api/cloudProvider/cloudProvider.controller.js
+++ b/server/api/cloudProvider/cloudProvider.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xf8b4=['data5','startRefreshInterval','microsoftAuthorization:success','emit','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','message','stringify','lodash','../../components/parsers/qs','../../components/encryptor','../../config/logger','api','../../mysqldb','redis','localhost','socket.io-emitter','sendStatus','status','json','undefined','limit','count','offset','set','destroy','then','end','error','stack','name','send','padEnd','slice','index','map','CloudProvider','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','nolimit','sort','where','pick','filters','merge','VIRTUAL','options','includeAll','include','findAll','decryptString','data3','show','params','length','find','service','MicrosoftAzure','catch','create','body','Service\x20parameter\x20not\x20specified','join','update','encryptString','oauth2MicrosoftAuthorize','findOne','user','oauth2MicrosoftCallback','get','Invalid\x20state\x20parameter','parse','state','ascii','isValidIdToken','id_token','oauth2Claims','Unable\x20to\x20validate\x20id_token','del','getOauth2MicrosoftAccessToken','code','access_token','data6','refresh_token'];(function(_0x80d733,_0x266211){var _0x435868=function(_0x2ae0f0){while(--_0x2ae0f0){_0x80d733['push'](_0x80d733['shift']());}};_0x435868(++_0x266211);}(_0xf8b4,0x1d4));var _0x4f8b=function(_0x398e6f,_0x12af3b){_0x398e6f=_0x398e6f-0x0;var _0xb0b189=_0xf8b4[_0x398e6f];return _0xb0b189;};'use strict';var _=require(_0x4f8b('0x0'));var Redis=require('ioredis');var qs=require(_0x4f8b('0x1'));var encryptor=require(_0x4f8b('0x2'));var config=require('../../config/environment');var logger=require(_0x4f8b('0x3'))(_0x4f8b('0x4'));var db=require(_0x4f8b('0x5'))['db'];var oauth=require('./cloudProvider.oauth');config['redis']=_['defaults'](config[_0x4f8b('0x6')],{'host':_0x4f8b('0x7'),'port':0x18eb});var socket=require(_0x4f8b('0x8'))(new Redis(config['redis']));var redis=new Redis(config[_0x4f8b('0x6')]);function respondWithStatusCode(_0x223c6c,_0x25d13b){_0x25d13b=_0x25d13b||0xcc;return function(_0x97d742){if(_0x97d742){return _0x223c6c[_0x4f8b('0x9')](_0x25d13b);}return _0x223c6c[_0x4f8b('0xa')](_0x25d13b)['end']();};}function respondWithResult(_0x4948a3,_0x12bede){_0x12bede=_0x12bede||0xc8;return function(_0xd6be55){if(_0xd6be55){return _0x4948a3[_0x4f8b('0xa')](_0x12bede)[_0x4f8b('0xb')](_0xd6be55);}};}function respondWithFilteredResult(_0x5e4ba2,_0x337867){return function(_0x3469f8){if(_0x3469f8){var _0x8abeb2=typeof _0x337867['offset']===_0x4f8b('0xc')&&typeof _0x337867[_0x4f8b('0xd')]==='undefined';var _0x48be8d=_0x3469f8[_0x4f8b('0xe')];var _0x58435c=_0x8abeb2?0x0:_0x337867[_0x4f8b('0xf')];var _0x139d11=_0x8abeb2?_0x3469f8[_0x4f8b('0xe')]:_0x337867[_0x4f8b('0xf')]+_0x337867[_0x4f8b('0xd')];var _0x45f1ac;if(_0x139d11>=_0x48be8d){_0x139d11=_0x48be8d;_0x45f1ac=0xc8;}else{_0x45f1ac=0xce;}_0x5e4ba2[_0x4f8b('0xa')](_0x45f1ac);return _0x5e4ba2[_0x4f8b('0x10')]('Content-Range',_0x58435c+'-'+_0x139d11+'/'+_0x48be8d)[_0x4f8b('0xb')](_0x3469f8);}return null;};}function saveUpdates(_0x20b360){return function(_0x1046b2){if(_0x1046b2){return _0x1046b2['update'](_0x20b360)['then'](function(_0x4222c4){return _0x4222c4;});}return null;};}function removeEntity(_0x4b75cb){return function(_0x4d3494){if(_0x4d3494){return _0x4d3494[_0x4f8b('0x11')]()[_0x4f8b('0x12')](function(){_0x4b75cb[_0x4f8b('0xa')](0xcc)[_0x4f8b('0x13')]();});}};}function handleEntityNotFound(_0x21d1da){return function(_0x38f218){if(!_0x38f218){_0x21d1da['sendStatus'](0x194);}return _0x38f218;};}function handleError(_0x51c504,_0x141779){_0x141779=_0x141779||0x1f4;return function(_0x356616){logger[_0x4f8b('0x14')](_0x356616[_0x4f8b('0x15')]);if(_0x356616[_0x4f8b('0x16')]){delete _0x356616['name'];}_0x51c504[_0x4f8b('0xa')](_0x141779)[_0x4f8b('0x17')](_0x356616);};}function maskClientSecret(_0x2da326){return _[_0x4f8b('0x18')](_0x2da326[_0x4f8b('0x19')](0x0,0x3),0x14,'*');}exports[_0x4f8b('0x1a')]=function(_0x2ce973,_0x5d395f){var _0x541912={},_0x16615d={},_0x57fdba={'count':0x0,'rows':[]};var _0x3f0254=_[_0x4f8b('0x1b')](db[_0x4f8b('0x1c')][_0x4f8b('0x1d')],function(_0x57f49f){return{'name':_0x57f49f[_0x4f8b('0x1e')],'type':_0x57f49f[_0x4f8b('0x1f')][_0x4f8b('0x20')]};});_0x16615d[_0x4f8b('0x21')]=_[_0x4f8b('0x1b')](_0x3f0254,'name');_0x16615d['query']=_[_0x4f8b('0x22')](_0x2ce973[_0x4f8b('0x23')]);_0x16615d['filters']=_[_0x4f8b('0x24')](_0x16615d[_0x4f8b('0x21')],_0x16615d['query']);_0x541912[_0x4f8b('0x25')]=_['intersection'](_0x16615d['model'],qs[_0x4f8b('0x26')](_0x2ce973[_0x4f8b('0x23')][_0x4f8b('0x26')]));_0x541912[_0x4f8b('0x25')]=_0x541912[_0x4f8b('0x25')]['length']?_0x541912['attributes']:_0x16615d[_0x4f8b('0x21')];if(!_0x2ce973[_0x4f8b('0x23')]['hasOwnProperty'](_0x4f8b('0x27'))){_0x541912[_0x4f8b('0xd')]=qs['limit'](_0x2ce973['query']['limit']);_0x541912['offset']=qs['offset'](_0x2ce973[_0x4f8b('0x23')]['offset']);}_0x541912['order']=qs[_0x4f8b('0x28')](_0x2ce973[_0x4f8b('0x23')]['sort']);_0x541912[_0x4f8b('0x29')]=qs['filters'](_[_0x4f8b('0x2a')](_0x2ce973[_0x4f8b('0x23')],_0x16615d[_0x4f8b('0x2b')]),_0x3f0254);if(_0x2ce973[_0x4f8b('0x23')]['filter']){_0x541912[_0x4f8b('0x29')]=_[_0x4f8b('0x2c')](_0x541912[_0x4f8b('0x29')],{'$or':_[_0x4f8b('0x1b')](_0x3f0254,function(_0x1e17e1){if(_0x1e17e1[_0x4f8b('0x1f')]!==_0x4f8b('0x2d')){var _0x2b1f9f={};_0x2b1f9f[_0x1e17e1['name']]={'$like':'%'+_0x2ce973[_0x4f8b('0x23')]['filter']+'%'};return _0x2b1f9f;}})});}_0x541912=_[_0x4f8b('0x2c')]({},_0x541912,_0x2ce973[_0x4f8b('0x2e')]);var _0x677581={'where':_0x541912[_0x4f8b('0x29')]};return db[_0x4f8b('0x1c')][_0x4f8b('0xe')](_0x677581)[_0x4f8b('0x12')](function(_0x42d2de){_0x57fdba[_0x4f8b('0xe')]=_0x42d2de;if(_0x2ce973[_0x4f8b('0x23')][_0x4f8b('0x2f')]){_0x541912[_0x4f8b('0x30')]=[{'all':!![]}];}return db[_0x4f8b('0x1c')][_0x4f8b('0x31')](_0x541912);})[_0x4f8b('0x12')](function(_0x33bdba){_0x57fdba['rows']=_[_0x4f8b('0x1b')](_0x33bdba,function(_0x15c3b8){if(_0x15c3b8['service']==='MicrosoftAzure'){var _0x3039e2=encryptor[_0x4f8b('0x32')](_0x15c3b8[_0x4f8b('0x33')]);_0x15c3b8['data3']=maskClientSecret(_0x3039e2);}return _0x15c3b8;});return _0x57fdba;})[_0x4f8b('0x12')](respondWithFilteredResult(_0x5d395f,_0x541912))['catch'](handleError(_0x5d395f,null));};exports[_0x4f8b('0x34')]=function(_0x591603,_0x492b94){var _0x1bc1be={'raw':!![],'where':{'id':_0x591603[_0x4f8b('0x35')]['id']}},_0x254abd={};_0x254abd[_0x4f8b('0x21')]=_['keys'](db[_0x4f8b('0x1c')][_0x4f8b('0x1d')]);_0x254abd['query']=_[_0x4f8b('0x22')](_0x591603[_0x4f8b('0x23')]);_0x254abd[_0x4f8b('0x2b')]=_[_0x4f8b('0x24')](_0x254abd['model'],_0x254abd['query']);_0x1bc1be[_0x4f8b('0x25')]=_[_0x4f8b('0x24')](_0x254abd[_0x4f8b('0x21')],qs[_0x4f8b('0x26')](_0x591603[_0x4f8b('0x23')][_0x4f8b('0x26')]));_0x1bc1be[_0x4f8b('0x25')]=_0x1bc1be['attributes'][_0x4f8b('0x36')]?_0x1bc1be['attributes']:_0x254abd['model'];if(_0x591603[_0x4f8b('0x23')][_0x4f8b('0x2f')]){_0x1bc1be[_0x4f8b('0x30')]=[{'all':!![]}];}_0x1bc1be=_['merge']({},_0x1bc1be,_0x591603[_0x4f8b('0x2e')]);return db[_0x4f8b('0x1c')][_0x4f8b('0x37')](_0x1bc1be)[_0x4f8b('0x12')](handleEntityNotFound(_0x492b94,null))['then'](function(_0x936af6){if(_0x936af6[_0x4f8b('0x38')]===_0x4f8b('0x39')){var _0x53b0dc=encryptor[_0x4f8b('0x32')](_0x936af6[_0x4f8b('0x33')]);_0x936af6['data3']=maskClientSecret(_0x53b0dc);}return _0x936af6;})['then'](respondWithResult(_0x492b94,null))[_0x4f8b('0x3a')](handleError(_0x492b94,null));};exports[_0x4f8b('0x3b')]=function(_0x1d8c69,_0x5a653a){if(!_0x1d8c69[_0x4f8b('0x3c')][_0x4f8b('0x16')])throw new Error('Name\x20parameter\x20not\x20specified');if(!_0x1d8c69[_0x4f8b('0x3c')][_0x4f8b('0x38')])throw new Error(_0x4f8b('0x3d'));var _0x266198=db[_0x4f8b('0x1c')]['rawAttributes'][_0x4f8b('0x38')]['values'];if(!_0x266198['includes'](_0x1d8c69[_0x4f8b('0x3c')][_0x4f8b('0x38')]))throw new Error('Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20'+_0x266198[_0x4f8b('0x3e')](',\x20'));if(_0x1d8c69[_0x4f8b('0x3c')]['service']===_0x4f8b('0x39')&&_0x1d8c69[_0x4f8b('0x3c')][_0x4f8b('0x33')]){_0x1d8c69[_0x4f8b('0x3c')][_0x4f8b('0x33')]=encryptor['encryptString'](_0x1d8c69[_0x4f8b('0x3c')][_0x4f8b('0x33')]);}return db[_0x4f8b('0x1c')][_0x4f8b('0x3b')](_0x1d8c69[_0x4f8b('0x3c')],{})[_0x4f8b('0x12')](respondWithResult(_0x5a653a,0xc9))[_0x4f8b('0x3a')](handleError(_0x5a653a,null));};exports[_0x4f8b('0x3f')]=function(_0x8f2254,_0x13de44){if(_0x8f2254['body']['id']){delete _0x8f2254[_0x4f8b('0x3c')]['id'];}return db[_0x4f8b('0x1c')]['find']({'where':{'id':_0x8f2254[_0x4f8b('0x35')]['id']}})['then'](handleEntityNotFound(_0x13de44,null))[_0x4f8b('0x12')](function(_0x387321){if(_0x387321[_0x4f8b('0x38')]===_0x4f8b('0x39')&&_0x8f2254[_0x4f8b('0x3c')][_0x4f8b('0x33')]){_0x8f2254[_0x4f8b('0x3c')][_0x4f8b('0x33')]=encryptor[_0x4f8b('0x40')](_0x8f2254[_0x4f8b('0x3c')][_0x4f8b('0x33')]);}return _0x387321;})['then'](saveUpdates(_0x8f2254[_0x4f8b('0x3c')],null))[_0x4f8b('0x12')](respondWithResult(_0x13de44,null))[_0x4f8b('0x3a')](handleError(_0x13de44,null));};exports['destroy']=function(_0x72d8b1,_0x2cafdc){return db[_0x4f8b('0x1c')]['find']({'where':{'id':_0x72d8b1[_0x4f8b('0x35')]['id']}})[_0x4f8b('0x12')](handleEntityNotFound(_0x2cafdc,null))[_0x4f8b('0x12')](removeEntity(_0x2cafdc,null))['catch'](handleError(_0x2cafdc,null));};exports[_0x4f8b('0x41')]=function(_0x2df79c,_0x4ad4d8){return db['CloudProvider'][_0x4f8b('0x42')]({'where':{'id':_0x2df79c['params']['id']},'raw':!![]})[_0x4f8b('0x12')](function(_0x4c79f2){if(!_0x4c79f2)return _0x4ad4d8[_0x4f8b('0x9')](0x194);return{'url':oauth['generateMicrosoftAuthorizationUrl'](_0x4c79f2,_0x2df79c[_0x4f8b('0x43')]['id'])};})['then'](respondWithResult(_0x4ad4d8,null))[_0x4f8b('0x3a')](handleError(_0x4ad4d8,null));};exports[_0x4f8b('0x44')]=function(_0x17afe1,_0xaa716e){var _0x34e8e9=_0x17afe1[_0x4f8b('0x3c')];var _0x329c1e;var _0xdf989a;if(_0x34e8e9[_0x4f8b('0x14')])throw _0x34e8e9;redis[_0x4f8b('0x45')](_0x34e8e9['state'])[_0x4f8b('0x12')](function(_0x1860fd){if(!_0x1860fd)throw new Error(_0x4f8b('0x46'));_0x329c1e=JSON[_0x4f8b('0x47')](_0x1860fd);var _0x2c00bd=Buffer['from'](_0x34e8e9[_0x4f8b('0x48')],'base64')['toString'](_0x4f8b('0x49'));_0xdf989a=JSON[_0x4f8b('0x47')](_0x2c00bd);if(!oauth[_0x4f8b('0x4a')](_0x34e8e9[_0x4f8b('0x4b')],_0x329c1e[_0x4f8b('0x4c')]))throw new Error(_0x4f8b('0x4d'));redis[_0x4f8b('0x4e')](_0x34e8e9[_0x4f8b('0x48')]);return oauth[_0x4f8b('0x4f')](_0x34e8e9[_0x4f8b('0x50')],_0x329c1e);})[_0x4f8b('0x12')](function(_0x4e556f){_0x329c1e['data5']=_0x4e556f[_0x4f8b('0x51')];_0x329c1e[_0x4f8b('0x52')]=_0x4e556f[_0x4f8b('0x53')];return db['CloudProvider'][_0x4f8b('0x3f')]({'data5':_0x329c1e[_0x4f8b('0x54')],'data6':_0x329c1e[_0x4f8b('0x52')]},{'where':{'id':_0x329c1e['id']}});})[_0x4f8b('0x12')](function(){oauth[_0x4f8b('0x55')](_0x329c1e);socket['emit'](_0x4f8b('0x56'),{'id':_0xdf989a['id']});return;})[_0x4f8b('0x12')](respondWithStatusCode(_0xaa716e,null))[_0x4f8b('0x3a')](function(_0x4e28a0){if(_0xdf989a){socket[_0x4f8b('0x57')](_0x4f8b('0x58'),{'id':_0xdf989a['id']});}if(!_0x329c1e){logger[_0x4f8b('0x14')](_0x4f8b('0x59'),_0x4e28a0);return _0xaa716e[_0x4f8b('0xa')](0x1f4)[_0x4f8b('0x17')](_0x4e28a0[_0x4f8b('0x5a')]);}logger[_0x4f8b('0x14')]('Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s',_0x329c1e['id'],JSON[_0x4f8b('0x5b')](_0x4e28a0));});};
\ No newline at end of file
+var _0x00d2=['send','slice','index','map','CloudProvider','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','order','sort','where','pick','filter','VIRTUAL','options','then','includeAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','rawAttributes','merge','find','create','body','Name\x20parameter\x20not\x20specified','Service\x20parameter\x20not\x20specified','values','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','encryptString','params','oauth2MicrosoftAuthorize','findOne','generateMicrosoftAuthorizationUrl','oauth2MicrosoftCallback','Invalid\x20state\x20parameter','parse','from','state','ascii','isValidIdToken','id_token','Unable\x20to\x20validate\x20id_token','code','data5','access_token','data6','refresh_token','startRefreshInterval','emit','microsoftAuthorization:success','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','lodash','ioredis','../../components/encryptor','../../config/environment','../../config/logger','../../mysqldb','./cloudProvider.oauth','defaults','redis','localhost','socket.io-emitter','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','destroy','error','name'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x00d2,0xa1));var _0x200d=function(_0x482914,_0x3fe08e){_0x482914=_0x482914-0x0;var _0x151f6a=_0x00d2[_0x482914];return _0x151f6a;};'use strict';var _=require(_0x200d('0x0'));var Redis=require(_0x200d('0x1'));var qs=require('../../components/parsers/qs');var encryptor=require(_0x200d('0x2'));var config=require(_0x200d('0x3'));var logger=require(_0x200d('0x4'))('api');var db=require(_0x200d('0x5'))['db'];var oauth=require(_0x200d('0x6'));config['redis']=_[_0x200d('0x7')](config[_0x200d('0x8')],{'host':_0x200d('0x9'),'port':0x18eb});var socket=require(_0x200d('0xa'))(new Redis(config[_0x200d('0x8')]));var redis=new Redis(config[_0x200d('0x8')]);function respondWithStatusCode(_0x4259fa,_0xda0ea0){_0xda0ea0=_0xda0ea0||0xcc;return function(_0x5487db){if(_0x5487db){return _0x4259fa[_0x200d('0xb')](_0xda0ea0);}return _0x4259fa[_0x200d('0xc')](_0xda0ea0)[_0x200d('0xd')]();};}function respondWithResult(_0x498069,_0x27285a){_0x27285a=_0x27285a||0xc8;return function(_0x18df37){if(_0x18df37){return _0x498069['status'](_0x27285a)[_0x200d('0xe')](_0x18df37);}};}function respondWithFilteredResult(_0x434d45,_0x27ab2b){return function(_0x395587){if(_0x395587){var _0x3ff6dd=typeof _0x27ab2b[_0x200d('0xf')]===_0x200d('0x10')&&typeof _0x27ab2b[_0x200d('0x11')]===_0x200d('0x10');var _0x17f107=_0x395587[_0x200d('0x12')];var _0x5a9dc8=_0x3ff6dd?0x0:_0x27ab2b[_0x200d('0xf')];var _0x5d0f93=_0x3ff6dd?_0x395587[_0x200d('0x12')]:_0x27ab2b[_0x200d('0xf')]+_0x27ab2b[_0x200d('0x11')];var _0x4e15f9;if(_0x5d0f93>=_0x17f107){_0x5d0f93=_0x17f107;_0x4e15f9=0xc8;}else{_0x4e15f9=0xce;}_0x434d45[_0x200d('0xc')](_0x4e15f9);return _0x434d45[_0x200d('0x13')](_0x200d('0x14'),_0x5a9dc8+'-'+_0x5d0f93+'/'+_0x17f107)[_0x200d('0xe')](_0x395587);}return null;};}function saveUpdates(_0x487eec){return function(_0x5345d1){if(_0x5345d1){return _0x5345d1[_0x200d('0x15')](_0x487eec)['then'](function(_0xb09e05){return _0xb09e05;});}return null;};}function removeEntity(_0x5ab8d6){return function(_0x85da1){if(_0x85da1){return _0x85da1[_0x200d('0x16')]()['then'](function(){_0x5ab8d6[_0x200d('0xc')](0xcc)[_0x200d('0xd')]();});}};}function handleEntityNotFound(_0x5be150){return function(_0x544989){if(!_0x544989){_0x5be150['sendStatus'](0x194);}return _0x544989;};}function handleError(_0x3ad1ab,_0x383b23){_0x383b23=_0x383b23||0x1f4;return function(_0x2e5d74){logger[_0x200d('0x17')](_0x2e5d74['stack']);if(_0x2e5d74[_0x200d('0x18')]){delete _0x2e5d74[_0x200d('0x18')];}_0x3ad1ab[_0x200d('0xc')](_0x383b23)[_0x200d('0x19')](_0x2e5d74);};}function maskClientSecret(_0x20bc8a){return _['padEnd'](_0x20bc8a[_0x200d('0x1a')](0x0,0x3),0x14,'*');}exports[_0x200d('0x1b')]=function(_0x37e8df,_0xb8bc55){var _0x34ce03={},_0x43e0a9={},_0x4f99fd={'count':0x0,'rows':[]};var _0x50f98a=_[_0x200d('0x1c')](db[_0x200d('0x1d')]['rawAttributes'],function(_0x1fe4fd){return{'name':_0x1fe4fd[_0x200d('0x1e')],'type':_0x1fe4fd[_0x200d('0x1f')][_0x200d('0x20')]};});_0x43e0a9[_0x200d('0x21')]=_[_0x200d('0x1c')](_0x50f98a,'name');_0x43e0a9[_0x200d('0x22')]=_[_0x200d('0x23')](_0x37e8df[_0x200d('0x22')]);_0x43e0a9[_0x200d('0x24')]=_['intersection'](_0x43e0a9[_0x200d('0x21')],_0x43e0a9['query']);_0x34ce03['attributes']=_[_0x200d('0x25')](_0x43e0a9[_0x200d('0x21')],qs[_0x200d('0x26')](_0x37e8df[_0x200d('0x22')]['fields']));_0x34ce03['attributes']=_0x34ce03[_0x200d('0x27')][_0x200d('0x28')]?_0x34ce03[_0x200d('0x27')]:_0x43e0a9[_0x200d('0x21')];if(!_0x37e8df[_0x200d('0x22')]['hasOwnProperty']('nolimit')){_0x34ce03[_0x200d('0x11')]=qs[_0x200d('0x11')](_0x37e8df[_0x200d('0x22')][_0x200d('0x11')]);_0x34ce03[_0x200d('0xf')]=qs['offset'](_0x37e8df[_0x200d('0x22')][_0x200d('0xf')]);}_0x34ce03[_0x200d('0x29')]=qs['sort'](_0x37e8df[_0x200d('0x22')][_0x200d('0x2a')]);_0x34ce03[_0x200d('0x2b')]=qs['filters'](_[_0x200d('0x2c')](_0x37e8df[_0x200d('0x22')],_0x43e0a9[_0x200d('0x24')]),_0x50f98a);if(_0x37e8df[_0x200d('0x22')][_0x200d('0x2d')]){_0x34ce03[_0x200d('0x2b')]=_['merge'](_0x34ce03['where'],{'$or':_[_0x200d('0x1c')](_0x50f98a,function(_0x33d34c){if(_0x33d34c[_0x200d('0x1f')]!==_0x200d('0x2e')){var _0x269a69={};_0x269a69[_0x33d34c[_0x200d('0x18')]]={'$like':'%'+_0x37e8df[_0x200d('0x22')]['filter']+'%'};return _0x269a69;}})});}_0x34ce03=_['merge']({},_0x34ce03,_0x37e8df[_0x200d('0x2f')]);var _0x7495f0={'where':_0x34ce03[_0x200d('0x2b')]};return db[_0x200d('0x1d')][_0x200d('0x12')](_0x7495f0)[_0x200d('0x30')](function(_0x5bb5d1){_0x4f99fd[_0x200d('0x12')]=_0x5bb5d1;if(_0x37e8df[_0x200d('0x22')][_0x200d('0x31')]){_0x34ce03['include']=[{'all':!![]}];}return db['CloudProvider']['findAll'](_0x34ce03);})[_0x200d('0x30')](function(_0x53adb4){_0x4f99fd[_0x200d('0x32')]=_[_0x200d('0x1c')](_0x53adb4,function(_0x229f6f){if(_0x229f6f[_0x200d('0x33')]===_0x200d('0x34')){var _0x357156=encryptor[_0x200d('0x35')](_0x229f6f[_0x200d('0x36')]);_0x229f6f[_0x200d('0x36')]=maskClientSecret(_0x357156);}return _0x229f6f;});return _0x4f99fd;})[_0x200d('0x30')](respondWithFilteredResult(_0xb8bc55,_0x34ce03))[_0x200d('0x37')](handleError(_0xb8bc55,null));};exports[_0x200d('0x38')]=function(_0x4798fc,_0x6a05d6){var _0x2444b2={'raw':!![],'where':{'id':_0x4798fc['params']['id']}},_0x31da2c={};_0x31da2c[_0x200d('0x21')]=_[_0x200d('0x23')](db['CloudProvider'][_0x200d('0x39')]);_0x31da2c[_0x200d('0x22')]=_[_0x200d('0x23')](_0x4798fc[_0x200d('0x22')]);_0x31da2c[_0x200d('0x24')]=_[_0x200d('0x25')](_0x31da2c[_0x200d('0x21')],_0x31da2c[_0x200d('0x22')]);_0x2444b2[_0x200d('0x27')]=_[_0x200d('0x25')](_0x31da2c[_0x200d('0x21')],qs[_0x200d('0x26')](_0x4798fc[_0x200d('0x22')][_0x200d('0x26')]));_0x2444b2[_0x200d('0x27')]=_0x2444b2[_0x200d('0x27')][_0x200d('0x28')]?_0x2444b2[_0x200d('0x27')]:_0x31da2c[_0x200d('0x21')];if(_0x4798fc[_0x200d('0x22')][_0x200d('0x31')]){_0x2444b2['include']=[{'all':!![]}];}_0x2444b2=_[_0x200d('0x3a')]({},_0x2444b2,_0x4798fc[_0x200d('0x2f')]);return db[_0x200d('0x1d')][_0x200d('0x3b')](_0x2444b2)['then'](handleEntityNotFound(_0x6a05d6,null))[_0x200d('0x30')](function(_0x5d9af3){if(_0x5d9af3[_0x200d('0x33')]===_0x200d('0x34')){var _0x4d8bcd=encryptor['decryptString'](_0x5d9af3[_0x200d('0x36')]);_0x5d9af3['data3']=maskClientSecret(_0x4d8bcd);}return _0x5d9af3;})[_0x200d('0x30')](respondWithResult(_0x6a05d6,null))['catch'](handleError(_0x6a05d6,null));};exports[_0x200d('0x3c')]=function(_0x53598a,_0x2a1301){if(!_0x53598a[_0x200d('0x3d')][_0x200d('0x18')])throw new Error(_0x200d('0x3e'));if(!_0x53598a[_0x200d('0x3d')]['service'])throw new Error(_0x200d('0x3f'));var _0x7c09a7=db[_0x200d('0x1d')][_0x200d('0x39')][_0x200d('0x33')][_0x200d('0x40')];if(!_0x7c09a7[_0x200d('0x41')](_0x53598a[_0x200d('0x3d')]['service']))throw new Error(_0x200d('0x42')+_0x7c09a7['join'](',\x20'));if(_0x53598a['body'][_0x200d('0x33')]===_0x200d('0x34')&&_0x53598a[_0x200d('0x3d')][_0x200d('0x36')]){_0x53598a[_0x200d('0x3d')]['data3']=encryptor[_0x200d('0x43')](_0x53598a[_0x200d('0x3d')][_0x200d('0x36')]);}return db[_0x200d('0x1d')][_0x200d('0x3c')](_0x53598a[_0x200d('0x3d')],{})[_0x200d('0x30')](respondWithResult(_0x2a1301,0xc9))[_0x200d('0x37')](handleError(_0x2a1301,null));};exports[_0x200d('0x15')]=function(_0x37a4ad,_0x454cf1){if(_0x37a4ad[_0x200d('0x3d')]['id']){delete _0x37a4ad[_0x200d('0x3d')]['id'];}return db[_0x200d('0x1d')]['find']({'where':{'id':_0x37a4ad[_0x200d('0x44')]['id']}})[_0x200d('0x30')](handleEntityNotFound(_0x454cf1,null))[_0x200d('0x30')](function(_0x3e8c2d){if(_0x3e8c2d[_0x200d('0x33')]===_0x200d('0x34')&&_0x37a4ad['body']['data3']){_0x37a4ad[_0x200d('0x3d')][_0x200d('0x36')]=encryptor[_0x200d('0x43')](_0x37a4ad['body'][_0x200d('0x36')]);}return _0x3e8c2d;})['then'](saveUpdates(_0x37a4ad[_0x200d('0x3d')],null))[_0x200d('0x30')](respondWithResult(_0x454cf1,null))[_0x200d('0x37')](handleError(_0x454cf1,null));};exports[_0x200d('0x16')]=function(_0x1bfb83,_0x49c39a){return db[_0x200d('0x1d')]['find']({'where':{'id':_0x1bfb83[_0x200d('0x44')]['id']}})[_0x200d('0x30')](handleEntityNotFound(_0x49c39a,null))[_0x200d('0x30')](removeEntity(_0x49c39a,null))['catch'](handleError(_0x49c39a,null));};exports[_0x200d('0x45')]=function(_0x2509e4,_0x5da0b7){return db['CloudProvider'][_0x200d('0x46')]({'where':{'id':_0x2509e4[_0x200d('0x44')]['id']},'raw':!![]})[_0x200d('0x30')](function(_0x1909f8){if(!_0x1909f8)return _0x5da0b7['sendStatus'](0x194);return{'url':oauth[_0x200d('0x47')](_0x1909f8,_0x2509e4['user']['id'])};})[_0x200d('0x30')](respondWithResult(_0x5da0b7,null))['catch'](handleError(_0x5da0b7,null));};exports[_0x200d('0x48')]=function(_0x11217d,_0x341d5b){var _0x2531a8=_0x11217d['body'];var _0x5cb7b0;var _0x28cc7a;if(_0x2531a8[_0x200d('0x17')])throw _0x2531a8;redis['get'](_0x2531a8['state'])[_0x200d('0x30')](function(_0x4275cc){if(!_0x4275cc)throw new Error(_0x200d('0x49'));_0x5cb7b0=JSON[_0x200d('0x4a')](_0x4275cc);var _0x43d5ad=Buffer[_0x200d('0x4b')](_0x2531a8[_0x200d('0x4c')],'base64')['toString'](_0x200d('0x4d'));_0x28cc7a=JSON[_0x200d('0x4a')](_0x43d5ad);if(!oauth[_0x200d('0x4e')](_0x2531a8[_0x200d('0x4f')],_0x5cb7b0['oauth2Claims']))throw new Error(_0x200d('0x50'));redis['del'](_0x2531a8['state']);return oauth['getOauth2MicrosoftAccessToken'](_0x2531a8[_0x200d('0x51')],_0x5cb7b0);})[_0x200d('0x30')](function(_0x35d280){_0x5cb7b0[_0x200d('0x52')]=_0x35d280[_0x200d('0x53')];_0x5cb7b0[_0x200d('0x54')]=_0x35d280[_0x200d('0x55')];return db[_0x200d('0x1d')]['update']({'data5':_0x5cb7b0[_0x200d('0x52')],'data6':_0x5cb7b0['data6']},{'where':{'id':_0x5cb7b0['id']}});})['then'](function(){oauth[_0x200d('0x56')](_0x5cb7b0);socket[_0x200d('0x57')](_0x200d('0x58'),{'id':_0x28cc7a['id']});return;})['then'](respondWithStatusCode(_0x341d5b,null))['catch'](function(_0x108deb){if(_0x28cc7a){socket['emit'](_0x200d('0x59'),{'id':_0x28cc7a['id']});}if(!_0x5cb7b0){logger[_0x200d('0x17')](_0x200d('0x5a'),_0x108deb);return _0x341d5b[_0x200d('0xc')](0x1f4)['send'](_0x108deb[_0x200d('0x5b')]);}logger[_0x200d('0x17')](_0x200d('0x5c'),_0x5cb7b0['id'],JSON['stringify'](_0x108deb));});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js
index 2c20a1b..a414fb5 100644
--- a/server/api/cloudProvider/cloudProvider.model.js
+++ b/server/api/cloudProvider/cloudProvider.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x4b16=['bluebird','path','rimraf','../../config/environment','exports','define','util','../../config/logger','api','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4b16,0x1dc));var _0x64b1=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x4b16[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var util=require(_0x64b1('0x0'));var logger=require(_0x64b1('0x1'))(_0x64b1('0x2'));var moment=require(_0x64b1('0x3'));var BPromise=require(_0x64b1('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x64b1('0x5'));var rimraf=require(_0x64b1('0x6'));var config=require(_0x64b1('0x7'));var attributes=require('./cloudProvider.attributes');module[_0x64b1('0x8')]=function(_0x15479a,_0x5bef82){return _0x15479a[_0x64b1('0x9')]('CloudProvider',attributes,{'tableName':'cloud_providers','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5008=['bluebird','request-promise','path','../../config/environment','./cloudProvider.attributes','exports','util','../../config/logger','api','moment'];(function(_0x32faa6,_0x231c1f){var _0x1526dd=function(_0x53627b){while(--_0x53627b){_0x32faa6['push'](_0x32faa6['shift']());}};_0x1526dd(++_0x231c1f);}(_0x5008,0x1f0));var _0x8500=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0x5008[_0x32d457];return _0x338386;};'use strict';var _=require('lodash');var util=require(_0x8500('0x0'));var logger=require(_0x8500('0x1'))(_0x8500('0x2'));var moment=require(_0x8500('0x3'));var BPromise=require(_0x8500('0x4'));var rp=require(_0x8500('0x5'));var fs=require('fs');var path=require(_0x8500('0x6'));var rimraf=require('rimraf');var config=require(_0x8500('0x7'));var attributes=require(_0x8500('0x8'));module[_0x8500('0x9')]=function(_0xc1eee1,_0x49907b){return _0xc1eee1['define']('CloudProvider',attributes,{'tableName':'cloud_providers','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.oauth.js b/server/api/cloudProvider/cloudProvider.oauth.js
index 3fc7b2f..eecc831 100644
--- a/server/api/cloudProvider/cloudProvider.oauth.js
+++ b/server/api/cloudProvider/cloudProvider.oauth.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x90b4=['util','../../components/encryptor','../../config/environment','api','../../config/schedule/cloud-provider','../../mysqldb','redis','localhost','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','openid','profile','email','offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','/authorize','/token','map','type','Dynamics365','push','/.default','join','replace','{TENANT_ID}','data2','code','id_token','stringify','base64','toString','hex','client_id','data1','response_type','redirect_uri','response_mode','scope','nonce','login','key','value','oauth2Claims','set','payload','iss','issuer','aud','audience','unix','resolve','CloudProvider','refresh_token','data6','data4','decryptString','data3','then','data5','catch','authorization_code','POST','intervals','all','inspect','error','exports','lodash','crypto','ioredis','request-promise'];(function(_0x5bf691,_0x5d34c9){var _0x1be7ab=function(_0x4b5d01){while(--_0x4b5d01){_0x5bf691['push'](_0x5bf691['shift']());}};_0x1be7ab(++_0x5d34c9);}(_0x90b4,0xd4));var _0x490b=function(_0x5bd418,_0x3991f8){_0x5bd418=_0x5bd418-0x0;var _0x10f4f0=_0x90b4[_0x5bd418];return _0x10f4f0;};'use strict';var _=require(_0x490b('0x0'));var crypto=require(_0x490b('0x1'));var jwt=require('jsonwebtoken');var moment=require('moment');var Redis=require(_0x490b('0x2'));var rp=require(_0x490b('0x3'));var util=require(_0x490b('0x4'));var encryptor=require(_0x490b('0x5'));var config=require(_0x490b('0x6'));var logger=require('../../config/logger')(_0x490b('0x7'));var schedule=require(_0x490b('0x8'));var db=require(_0x490b('0x9'))['db'];config[_0x490b('0xa')]=_['defaults'](config['redis'],{'host':_0x490b('0xb'),'port':0x18eb});var redis=new Redis(config['redis']);var MICROSOFT_AUTH_URL=_0x490b('0xc');var AZURE_AUTH_SCOPES={'Outlook365':[_0x490b('0xd'),_0x490b('0xe'),_0x490b('0xf'),_0x490b('0x10'),_0x490b('0x11'),_0x490b('0x12'),_0x490b('0x13')],'Dynamics365':[_0x490b('0xd'),_0x490b('0x10')]};var MICROSOFT_AUTH_ENDPOINT=_0x490b('0x14');var MICROSOFT_TOKEN_ENDPOINT=_0x490b('0x15');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x145c42){var _0x13520e=_[_0x490b('0x16')](AZURE_AUTH_SCOPES[_0x145c42[_0x490b('0x17')]]);if(_0x145c42[_0x490b('0x17')]===_0x490b('0x18'))_0x13520e[_0x490b('0x19')](_0x145c42['data7']+_0x490b('0x1a'));return _0x13520e[_0x490b('0x1b')]('\x20');}function getAccessTokenScope(_0x52e55d){if(_0x52e55d[_0x490b('0x17')]==='Outlook365')return _0x490b('0x11');if(_0x52e55d[_0x490b('0x17')]==='Dynamics365')return _0x52e55d['data7']+_0x490b('0x1a');}function generateMicrosoftAuthorizationUrl(_0x1b53b1,_0x1456b2){var _0x22faa6=MICROSOFT_AUTH_URL[_0x490b('0x1c')](_0x490b('0x1d'),_0x1b53b1[_0x490b('0x1e')]);var _0x47d164=[_0x490b('0x1f'),_0x490b('0x20')];var _0x72e73=Buffer['from'](JSON[_0x490b('0x21')]({'id':_0x1456b2}))['toString'](_0x490b('0x22'));var _0x360b28=crypto['randomBytes'](0x10)[_0x490b('0x23')](_0x490b('0x24'));var _0x1b2e83=getAuthorizationScopes(_0x1b53b1);var _0x49c81a=[{'key':_0x490b('0x25'),'value':_0x1b53b1[_0x490b('0x26')]},{'key':_0x490b('0x27'),'value':encodeURIComponent(_0x47d164[_0x490b('0x1b')]('\x20'))},{'key':_0x490b('0x28'),'value':_0x1b53b1['data4']},{'key':_0x490b('0x29'),'value':'form_post'},{'key':_0x490b('0x2a'),'value':encodeURIComponent(_0x1b2e83)},{'key':'state','value':_0x72e73},{'key':_0x490b('0x2b'),'value':_0x360b28},{'key':'prompt','value':_0x490b('0x2c')}];var _0x323a9a=_0x22faa6+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0x490b('0x16')](_0x49c81a,function(_0x38477a){return _0x38477a[_0x490b('0x2d')]+'='+_0x38477a[_0x490b('0x2e')];})[_0x490b('0x1b')]('&');_0x1b53b1[_0x490b('0x2f')]={'issuer':_0x22faa6[_0x490b('0x1c')]('oauth2/',''),'audience':_0x1b53b1[_0x490b('0x26')],'state':_0x72e73,'nonce':_0x360b28};redis[_0x490b('0x30')](_0x72e73,JSON[_0x490b('0x21')](_0x1b53b1));return _0x323a9a;}function isValidIdToken(_0x8f10d8,_0x2903e3){try{var _0x19577d=jwt['decode'](_0x8f10d8,{'complete':!![]});var _0x4f3804=_0x19577d[_0x490b('0x31')];if(_0x4f3804[_0x490b('0x32')]!==_0x2903e3[_0x490b('0x33')])return![];if(_0x4f3804[_0x490b('0x34')]!==_0x2903e3[_0x490b('0x35')])return![];if(_0x4f3804['nonce']!==_0x2903e3['nonce'])return![];if(moment()['isAfter'](moment[_0x490b('0x36')](_0x4f3804['exp'])))return![];return!![];}catch(_0x6d2ab2){throw _0x6d2ab2;}}function refreshOauth2MicrosoftAccessToken(_0x578775){return Promise[_0x490b('0x37')]()['then'](function(){if(_0x578775['data3'])return _0x578775;return db[_0x490b('0x38')]['findOne']({'where':{'id':_0x578775['id']},'raw':!![]});})['then'](function(_0xf6e531){var _0x997116={'grant_type':_0x490b('0x39'),'refresh_token':_0xf6e531[_0x490b('0x3a')],'scope':getAccessTokenScope(_0xf6e531),'redirect_uri':_0xf6e531[_0x490b('0x3b')],'client_id':_0xf6e531[_0x490b('0x26')],'client_secret':encryptor[_0x490b('0x3c')](_0xf6e531[_0x490b('0x3d')])};var _0x80124a={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x490b('0x1c')]('{TENANT_ID}',_0xf6e531[_0x490b('0x1e')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x997116,'json':!![]};return rp(_0x80124a);})[_0x490b('0x3e')](function(_0x1be07e){_0x578775[_0x490b('0x3f')]=_0x1be07e['access_token'];_0x578775[_0x490b('0x3a')]=_0x1be07e[_0x490b('0x39')];return db['CloudProvider']['update']({'data5':_0x578775[_0x490b('0x3f')],'data6':_0x578775[_0x490b('0x3a')]},{'where':{'id':_0x578775['id']}});})[_0x490b('0x3e')](function(){return _0x578775;})[_0x490b('0x40')](function(_0x2af881){logger['error']('Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s',_0x578775['id'],_0x2af881);});}function getOauth2MicrosoftAccessToken(_0x7d9e52,_0xe74340){var _0x3da2d2={'grant_type':_0x490b('0x41'),'code':_0x7d9e52,'scope':getAccessTokenScope(_0xe74340),'redirect_uri':_0xe74340['data4'],'client_id':_0xe74340[_0x490b('0x26')],'client_secret':encryptor['decryptString'](_0xe74340[_0x490b('0x3d')])};var _0x418b85={'method':_0x490b('0x42'),'uri':MICROSOFT_AUTH_URL['replace'](_0x490b('0x1d'),_0xe74340[_0x490b('0x1e')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x3da2d2,'json':!![]};return rp(_0x418b85);}function startRefreshInterval(_0x436cbe){var _0x31d73b=schedule[_0x490b('0x43')];if(_0x31d73b[_0x436cbe['id']])clearInterval(_0x31d73b[_0x436cbe['id']]);_0x31d73b[_0x436cbe['id']]=setInterval(refreshOauth2MicrosoftAccessToken['bind'](this,{'id':_0x436cbe['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule['intervals']=_0x31d73b;}function startAllRefreshIntervals(){return db['CloudProvider']['findAll']({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x490b('0x3e')](function(_0x5ce3e0){var _0x4f9b6f=_0x5ce3e0[_0x490b('0x16')](function(_0x31dd00){return refreshOauth2MicrosoftAccessToken(_0x31dd00)['then'](function(_0x171666){startRefreshInterval(_0x171666);});});return Promise[_0x490b('0x44')](_0x4f9b6f);})[_0x490b('0x40')](function(_0x9d2914){var _0x12bba3=_0x9d2914?util[_0x490b('0x45')](_0x9d2914,{'showHidden':![],'depth':null}):'';logger[_0x490b('0x46')]('[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s',_0x12bba3);});}module[_0x490b('0x47')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
+var _0x2a8b=['refresh_token','data6','POST','error','authorization_code','bind','intervals','findAll','map','all','catch','inspect','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','moment','ioredis','request-promise','util','../../components/encryptor','../../config/environment','../../config/logger','api','../../config/schedule/cloud-provider','../../mysqldb','redis','defaults','localhost','openid','profile','email','offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','/authorize','type','Dynamics365','push','/.default','join','replace','{TENANT_ID}','data2','id_token','from','stringify','toString','hex','client_id','response_type','redirect_uri','data4','scope','state','prompt','login','key','value','oauth2Claims','data1','set','decode','payload','iss','issuer','aud','audience','nonce','isAfter','unix','exp','resolve','then','data3','CloudProvider','findOne'];(function(_0x106c2f,_0x3fab19){var _0x55e64c=function(_0x18d61a){while(--_0x18d61a){_0x106c2f['push'](_0x106c2f['shift']());}};_0x55e64c(++_0x3fab19);}(_0x2a8b,0xf5));var _0xb2a8=function(_0x47b58b,_0x41a189){_0x47b58b=_0x47b58b-0x0;var _0x46bebe=_0x2a8b[_0x47b58b];return _0x46bebe;};'use strict';var _=require(_0xb2a8('0x0'));var crypto=require('crypto');var jwt=require('jsonwebtoken');var moment=require(_0xb2a8('0x1'));var Redis=require(_0xb2a8('0x2'));var rp=require(_0xb2a8('0x3'));var util=require(_0xb2a8('0x4'));var encryptor=require(_0xb2a8('0x5'));var config=require(_0xb2a8('0x6'));var logger=require(_0xb2a8('0x7'))(_0xb2a8('0x8'));var schedule=require(_0xb2a8('0x9'));var db=require(_0xb2a8('0xa'))['db'];config[_0xb2a8('0xb')]=_[_0xb2a8('0xc')](config[_0xb2a8('0xb')],{'host':_0xb2a8('0xd'),'port':0x18eb});var redis=new Redis(config[_0xb2a8('0xb')]);var MICROSOFT_AUTH_URL='https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0';var AZURE_AUTH_SCOPES={'Outlook365':[_0xb2a8('0xe'),_0xb2a8('0xf'),_0xb2a8('0x10'),_0xb2a8('0x11'),_0xb2a8('0x12'),_0xb2a8('0x13'),_0xb2a8('0x14')],'Dynamics365':[_0xb2a8('0xe'),_0xb2a8('0x11')]};var MICROSOFT_AUTH_ENDPOINT=_0xb2a8('0x15');var MICROSOFT_TOKEN_ENDPOINT='/token';var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x45b63d){var _0x55ba53=_['map'](AZURE_AUTH_SCOPES[_0x45b63d[_0xb2a8('0x16')]]);if(_0x45b63d[_0xb2a8('0x16')]===_0xb2a8('0x17'))_0x55ba53[_0xb2a8('0x18')](_0x45b63d['data7']+_0xb2a8('0x19'));return _0x55ba53[_0xb2a8('0x1a')]('\x20');}function getAccessTokenScope(_0x3c4930){if(_0x3c4930[_0xb2a8('0x16')]==='Outlook365')return _0xb2a8('0x12');if(_0x3c4930[_0xb2a8('0x16')]===_0xb2a8('0x17'))return _0x3c4930['data7']+'/.default';}function generateMicrosoftAuthorizationUrl(_0x1367ff,_0x5270fe){var _0x15054d=MICROSOFT_AUTH_URL[_0xb2a8('0x1b')](_0xb2a8('0x1c'),_0x1367ff[_0xb2a8('0x1d')]);var _0x3745bd=['code',_0xb2a8('0x1e')];var _0x304edb=Buffer[_0xb2a8('0x1f')](JSON[_0xb2a8('0x20')]({'id':_0x5270fe}))[_0xb2a8('0x21')]('base64');var _0x5764b0=crypto['randomBytes'](0x10)[_0xb2a8('0x21')](_0xb2a8('0x22'));var _0x15bf03=getAuthorizationScopes(_0x1367ff);var _0x3c9b0d=[{'key':_0xb2a8('0x23'),'value':_0x1367ff['data1']},{'key':_0xb2a8('0x24'),'value':encodeURIComponent(_0x3745bd[_0xb2a8('0x1a')]('\x20'))},{'key':_0xb2a8('0x25'),'value':_0x1367ff[_0xb2a8('0x26')]},{'key':'response_mode','value':'form_post'},{'key':_0xb2a8('0x27'),'value':encodeURIComponent(_0x15bf03)},{'key':_0xb2a8('0x28'),'value':_0x304edb},{'key':'nonce','value':_0x5764b0},{'key':_0xb2a8('0x29'),'value':_0xb2a8('0x2a')}];var _0x3e89eb=_0x15054d+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0x3c9b0d,function(_0x5ae88e){return _0x5ae88e[_0xb2a8('0x2b')]+'='+_0x5ae88e[_0xb2a8('0x2c')];})['join']('&');_0x1367ff[_0xb2a8('0x2d')]={'issuer':_0x15054d['replace']('oauth2/',''),'audience':_0x1367ff[_0xb2a8('0x2e')],'state':_0x304edb,'nonce':_0x5764b0};redis[_0xb2a8('0x2f')](_0x304edb,JSON[_0xb2a8('0x20')](_0x1367ff));return _0x3e89eb;}function isValidIdToken(_0x412e40,_0x8e0df4){try{var _0x34d534=jwt[_0xb2a8('0x30')](_0x412e40,{'complete':!![]});var _0x30d295=_0x34d534[_0xb2a8('0x31')];if(_0x30d295[_0xb2a8('0x32')]!==_0x8e0df4[_0xb2a8('0x33')])return![];if(_0x30d295[_0xb2a8('0x34')]!==_0x8e0df4[_0xb2a8('0x35')])return![];if(_0x30d295[_0xb2a8('0x36')]!==_0x8e0df4[_0xb2a8('0x36')])return![];if(moment()[_0xb2a8('0x37')](moment[_0xb2a8('0x38')](_0x30d295[_0xb2a8('0x39')])))return![];return!![];}catch(_0x2a198c){throw _0x2a198c;}}function refreshOauth2MicrosoftAccessToken(_0x30ba95){return Promise[_0xb2a8('0x3a')]()[_0xb2a8('0x3b')](function(){if(_0x30ba95[_0xb2a8('0x3c')])return _0x30ba95;return db[_0xb2a8('0x3d')][_0xb2a8('0x3e')]({'where':{'id':_0x30ba95['id']},'raw':!![]});})[_0xb2a8('0x3b')](function(_0x5d2aa5){var _0x4b210c={'grant_type':_0xb2a8('0x3f'),'refresh_token':_0x5d2aa5[_0xb2a8('0x40')],'scope':getAccessTokenScope(_0x5d2aa5),'redirect_uri':_0x5d2aa5['data4'],'client_id':_0x5d2aa5['data1'],'client_secret':encryptor['decryptString'](_0x5d2aa5[_0xb2a8('0x3c')])};var _0x3e33d3={'method':_0xb2a8('0x41'),'uri':MICROSOFT_AUTH_URL[_0xb2a8('0x1b')](_0xb2a8('0x1c'),_0x5d2aa5[_0xb2a8('0x1d')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x4b210c,'json':!![]};return rp(_0x3e33d3);})[_0xb2a8('0x3b')](function(_0x252b7f){_0x30ba95['data5']=_0x252b7f['access_token'];_0x30ba95[_0xb2a8('0x40')]=_0x252b7f[_0xb2a8('0x3f')];return db[_0xb2a8('0x3d')]['update']({'data5':_0x30ba95['data5'],'data6':_0x30ba95[_0xb2a8('0x40')]},{'where':{'id':_0x30ba95['id']}});})[_0xb2a8('0x3b')](function(){return _0x30ba95;})['catch'](function(_0xf70ec5){logger[_0xb2a8('0x42')]('Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s',_0x30ba95['id'],_0xf70ec5);});}function getOauth2MicrosoftAccessToken(_0x42c626,_0x4eff8b){var _0x3f64d0={'grant_type':_0xb2a8('0x43'),'code':_0x42c626,'scope':getAccessTokenScope(_0x4eff8b),'redirect_uri':_0x4eff8b[_0xb2a8('0x26')],'client_id':_0x4eff8b[_0xb2a8('0x2e')],'client_secret':encryptor['decryptString'](_0x4eff8b[_0xb2a8('0x3c')])};var _0x44a05b={'method':_0xb2a8('0x41'),'uri':MICROSOFT_AUTH_URL[_0xb2a8('0x1b')]('{TENANT_ID}',_0x4eff8b[_0xb2a8('0x1d')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x3f64d0,'json':!![]};return rp(_0x44a05b);}function startRefreshInterval(_0x2a7922){var _0x111b9e=schedule['intervals'];if(_0x111b9e[_0x2a7922['id']])clearInterval(_0x111b9e[_0x2a7922['id']]);_0x111b9e[_0x2a7922['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0xb2a8('0x44')](this,{'id':_0x2a7922['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0xb2a8('0x45')]=_0x111b9e;}function startAllRefreshIntervals(){return db[_0xb2a8('0x3d')][_0xb2a8('0x46')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0xb2a8('0x3b')](function(_0x2fcf41){var _0x53497c=_0x2fcf41[_0xb2a8('0x47')](function(_0x49bda1){return refreshOauth2MicrosoftAccessToken(_0x49bda1)[_0xb2a8('0x3b')](function(_0x3af8cf){startRefreshInterval(_0x3af8cf);});});return Promise[_0xb2a8('0x48')](_0x53497c);})[_0xb2a8('0x49')](function(_0x82398f){var _0x83ed01=_0x82398f?util[_0xb2a8('0x4a')](_0x82398f,{'showHidden':![],'depth':null}):'';logger[_0xb2a8('0x42')](_0xb2a8('0x4b'),_0x83ed01);});}module[_0xb2a8('0x4c')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
diff --git a/server/api/cloudProvider/cloudProvider.rpc.js b/server/api/cloudProvider/cloudProvider.rpc.js
index 47b3fb5..84d7372 100644
--- a/server/api/cloudProvider/cloudProvider.rpc.js
+++ b/server/api/cloudProvider/cloudProvider.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xdaa8=['client','request','then','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','../../config/environment','jayson/promise'];(function(_0x1100ec,_0x4c97b1){var _0x9d4dee=function(_0x2bf8a9){while(--_0x2bf8a9){_0x1100ec['push'](_0x1100ec['shift']());}};_0x9d4dee(++_0x4c97b1);}(_0xdaa8,0xe4));var _0x8daa=function(_0x219e3d,_0x5e287e){_0x219e3d=_0x219e3d-0x0;var _0x28474c=_0xdaa8[_0x219e3d];return _0x28474c;};'use strict';var _=require(_0x8daa('0x0'));var util=require(_0x8daa('0x1'));var moment=require(_0x8daa('0x2'));var BPromise=require(_0x8daa('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x8daa('0x4'));var jayson=require(_0x8daa('0x5'));var client=jayson[_0x8daa('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4e8116,_0x1f5a97,_0x48bf41){return new BPromise(function(_0x41de3e,_0x2df1a0){return client[_0x8daa('0x7')](_0x4e8116,_0x48bf41)[_0x8daa('0x8')](function(_0x207291){logger['info'](_0x8daa('0x9'),_0x1f5a97,_0x8daa('0xa'));logger[_0x8daa('0xb')](_0x8daa('0xc'),_0x1f5a97,_0x8daa('0xa'),JSON[_0x8daa('0xd')](_0x207291));if(_0x207291[_0x8daa('0xe')]){if(_0x207291[_0x8daa('0xe')][_0x8daa('0xf')]===0x1f4){logger[_0x8daa('0xe')](_0x8daa('0x9'),_0x1f5a97,_0x207291['error'][_0x8daa('0x10')]);return _0x2df1a0(_0x207291[_0x8daa('0xe')][_0x8daa('0x10')]);}logger['error'](_0x8daa('0x9'),_0x1f5a97,_0x207291['error'][_0x8daa('0x10')]);return _0x41de3e(_0x207291[_0x8daa('0xe')][_0x8daa('0x10')]);}else{logger['info'](_0x8daa('0x9'),_0x1f5a97,_0x8daa('0xa'));_0x41de3e(_0x207291['result']['message']);}})[_0x8daa('0x11')](function(_0x2fc822){logger[_0x8daa('0xe')](_0x8daa('0x9'),_0x1f5a97,_0x2fc822);_0x2df1a0(_0x2fc822);});});}
\ No newline at end of file
+var _0x2d07=['../../config/logger','rpc','../../config/environment','jayson/promise','http','info','CloudProvider,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x2d07,0x13a));var _0x72d0=function(_0x4ae625,_0xf396d0){_0x4ae625=_0x4ae625-0x0;var _0x31accf=_0x2d07[_0x4ae625];return _0x31accf;};'use strict';var _=require(_0x72d0('0x0'));var util=require(_0x72d0('0x1'));var moment=require('moment');var BPromise=require(_0x72d0('0x2'));var rs=require(_0x72d0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x72d0('0x4'))['db'];var utils=require(_0x72d0('0x5'));var logger=require(_0x72d0('0x6'))(_0x72d0('0x7'));var config=require(_0x72d0('0x8'));var jayson=require(_0x72d0('0x9'));var client=jayson['client'][_0x72d0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xdad2db,_0x2a4100,_0x47a826){return new BPromise(function(_0x4f2c34,_0x6d0ff6){return client['request'](_0xdad2db,_0x47a826)['then'](function(_0x5db523){logger[_0x72d0('0xb')](_0x72d0('0xc'),_0x2a4100,_0x72d0('0xd'));logger[_0x72d0('0xe')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x2a4100,'request\x20sent',JSON['stringify'](_0x5db523));if(_0x5db523[_0x72d0('0xf')]){if(_0x5db523[_0x72d0('0xf')][_0x72d0('0x10')]===0x1f4){logger[_0x72d0('0xf')](_0x72d0('0xc'),_0x2a4100,_0x5db523['error'][_0x72d0('0x11')]);return _0x6d0ff6(_0x5db523[_0x72d0('0xf')][_0x72d0('0x11')]);}logger['error'](_0x72d0('0xc'),_0x2a4100,_0x5db523[_0x72d0('0xf')][_0x72d0('0x11')]);return _0x4f2c34(_0x5db523[_0x72d0('0xf')][_0x72d0('0x11')]);}else{logger[_0x72d0('0xb')]('CloudProvider,\x20%s,\x20%s',_0x2a4100,_0x72d0('0xd'));_0x4f2c34(_0x5db523[_0x72d0('0x12')][_0x72d0('0x11')]);}})[_0x72d0('0x13')](function(_0x2a761c){logger[_0x72d0('0xf')](_0x72d0('0xc'),_0x2a4100,_0x2a761c);_0x6d0ff6(_0x2a761c);});});}
\ No newline at end of file
diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js
index 9606091..2c10406 100644
--- a/server/api/cloudProvider/index.js
+++ b/server/api/cloudProvider/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x5f2f=['exports','express','Router','../../components/auth/service','./cloudProvider.controller','get','isAuthenticated','index','show','post','create','put','/:id','update','delete','destroy','/:id/oauth2/microsoft/authorize/','oauth2MicrosoftAuthorize','oauth2MicrosoftCallback'];(function(_0x3f1710,_0x3877a2){var _0x528458=function(_0x4b5d0f){while(--_0x4b5d0f){_0x3f1710['push'](_0x3f1710['shift']());}};_0x528458(++_0x3877a2);}(_0x5f2f,0x73));var _0xf5f2=function(_0x369adf,_0x1e4428){_0x369adf=_0x369adf-0x0;var _0x164b44=_0x5f2f[_0x369adf];return _0x164b44;};'use strict';var express=require(_0xf5f2('0x0'));var router=express[_0xf5f2('0x1')]();var auth=require(_0xf5f2('0x2'));var controller=require(_0xf5f2('0x3'));router[_0xf5f2('0x4')]('/',auth[_0xf5f2('0x5')](),controller[_0xf5f2('0x6')]);router[_0xf5f2('0x4')]('/:id',auth['isAuthenticated'](),controller[_0xf5f2('0x7')]);router[_0xf5f2('0x8')]('/',auth[_0xf5f2('0x5')](),controller[_0xf5f2('0x9')]);router[_0xf5f2('0xa')](_0xf5f2('0xb'),auth['isAuthenticated'](),controller[_0xf5f2('0xc')]);router[_0xf5f2('0xd')](_0xf5f2('0xb'),auth['isAuthenticated'](),controller[_0xf5f2('0xe')]);router[_0xf5f2('0x4')](_0xf5f2('0xf'),auth['isAuthenticated'](),controller[_0xf5f2('0x10')]);router['post']('/oauth2/microsoft/callback',controller[_0xf5f2('0x11')]);module[_0xf5f2('0x12')]=router;
\ No newline at end of file
+var _0xadb5=['put','update','delete','destroy','/:id/oauth2/microsoft/authorize/','/oauth2/microsoft/callback','oauth2MicrosoftCallback','exports','Router','./cloudProvider.controller','get','isAuthenticated','/:id','post','create'];(function(_0x52847f,_0x539b02){var _0x461d3a=function(_0x4f6479){while(--_0x4f6479){_0x52847f['push'](_0x52847f['shift']());}};_0x461d3a(++_0x539b02);}(_0xadb5,0xad));var _0x5adb=function(_0x17ad64,_0x4e0726){_0x17ad64=_0x17ad64-0x0;var _0x50ca52=_0xadb5[_0x17ad64];return _0x50ca52;};'use strict';var express=require('express');var router=express[_0x5adb('0x0')]();var auth=require('../../components/auth/service');var controller=require(_0x5adb('0x1'));router[_0x5adb('0x2')]('/',auth[_0x5adb('0x3')](),controller['index']);router[_0x5adb('0x2')](_0x5adb('0x4'),auth[_0x5adb('0x3')](),controller['show']);router[_0x5adb('0x5')]('/',auth[_0x5adb('0x3')](),controller[_0x5adb('0x6')]);router[_0x5adb('0x7')](_0x5adb('0x4'),auth[_0x5adb('0x3')](),controller[_0x5adb('0x8')]);router[_0x5adb('0x9')](_0x5adb('0x4'),auth[_0x5adb('0x3')](),controller[_0x5adb('0xa')]);router[_0x5adb('0x2')](_0x5adb('0xb'),auth[_0x5adb('0x3')](),controller['oauth2MicrosoftAuthorize']);router['post'](_0x5adb('0xc'),controller[_0x5adb('0xd')]);module[_0x5adb('0xe')]=router;
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js
index 542cf9f..d0cfcfc 100644
--- a/server/api/cmCompany/cmCompany.attributes.js
+++ b/server/api/cmCompany/cmCompany.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xa33b=['sequelize','exports','STRING','name'];(function(_0x423836,_0x2d438d){var _0x1d9500=function(_0x805dd0){while(--_0x805dd0){_0x423836['push'](_0x423836['shift']());}};_0x1d9500(++_0x2d438d);}(_0xa33b,0x68));var _0xba33=function(_0x17b6e3,_0x4522ed){_0x17b6e3=_0x17b6e3-0x0;var _0x3906f3=_0xa33b[_0x17b6e3];return _0x3906f3;};'use strict';var Sequelize=require(_0xba33('0x0'));module[_0xba33('0x1')]={'name':{'type':Sequelize[_0xba33('0x2')],'unique':_0xba33('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xba33('0x2')]},'companyId':{'type':Sequelize[_0xba33('0x2')]},'website':{'type':Sequelize[_0xba33('0x2')]},'phone':{'type':Sequelize[_0xba33('0x2')]},'fax':{'type':Sequelize[_0xba33('0x2')]},'type':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0xba33('0x2')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0xba33('0x2')]},'country':{'type':Sequelize[_0xba33('0x2')]},'email':{'type':Sequelize[_0xba33('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xba33('0x2')]},'sStreet':{'type':Sequelize[_0xba33('0x2')]},'sPostalCode':{'type':Sequelize[_0xba33('0x2')]},'sCity':{'type':Sequelize[_0xba33('0x2')]},'sCountry':{'type':Sequelize[_0xba33('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x5ccc=['name','exports','STRING'];(function(_0x186a5b,_0x4b724b){var _0x158931=function(_0x511c1b){while(--_0x511c1b){_0x186a5b['push'](_0x186a5b['shift']());}};_0x158931(++_0x4b724b);}(_0x5ccc,0xc4));var _0xc5cc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5ccc[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0xc5cc('0x0')]={'name':{'type':Sequelize[_0xc5cc('0x1')],'unique':_0xc5cc('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xc5cc('0x1')]},'companyId':{'type':Sequelize[_0xc5cc('0x1')]},'website':{'type':Sequelize[_0xc5cc('0x1')]},'phone':{'type':Sequelize[_0xc5cc('0x1')]},'fax':{'type':Sequelize[_0xc5cc('0x1')]},'type':{'type':Sequelize[_0xc5cc('0x1')]},'street':{'type':Sequelize[_0xc5cc('0x1')]},'postalCode':{'type':Sequelize[_0xc5cc('0x1')]},'city':{'type':Sequelize[_0xc5cc('0x1')]},'country':{'type':Sequelize[_0xc5cc('0x1')]},'email':{'type':Sequelize[_0xc5cc('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0xc5cc('0x1')]},'sStreet':{'type':Sequelize[_0xc5cc('0x1')]},'sPostalCode':{'type':Sequelize['STRING']},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xc5cc('0x1')]}};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js
index 8b74ded..91923d1 100644
--- a/server/api/cmCompany/cmCompany.controller.js
+++ b/server/api/cmCompany/cmCompany.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x9e8d=['merge','map','filter','options','include','CmCompany','findAll','rows','catch','show','params','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','CmContact','addContacts','ids','getContacts','pick','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','fs-extra','lodash','squel','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','json','apply','reject','save','then','get','Companies','UserProfileResource','destroy','name','send','index','describe','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters'];(function(_0x1fe0b5,_0x2d5ddc){var _0x14ee7c=function(_0x5103cc){while(--_0x5103cc){_0x1fe0b5['push'](_0x1fe0b5['shift']());}};_0x14ee7c(++_0x2d5ddc);}(_0x9e8d,0x11d));var _0xd9e8=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x9e8d[_0x311c35];return _0x5cc50c;};'use strict';var emlformat=require(_0xd9e8('0x0'));var rimraf=require(_0xd9e8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd9e8('0x2'));var rp=require('request-promise');var moment=require(_0xd9e8('0x3'));var BPromise=require(_0xd9e8('0x4'));var Mustache=require(_0xd9e8('0x5'));var util=require(_0xd9e8('0x6'));var path=require(_0xd9e8('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd9e8('0x8'));var _=require(_0xd9e8('0x9'));var squel=require(_0xd9e8('0xa'));var crypto=require('crypto');var jsforce=require(_0xd9e8('0xb'));var deskjs=require(_0xd9e8('0xc'));var toCsv=require(_0xd9e8('0xd'));var querystring=require('querystring');var Papa=require(_0xd9e8('0xe'));var Redis=require(_0xd9e8('0xf'));var authService=require(_0xd9e8('0x10'));var qs=require(_0xd9e8('0x11'));var as=require(_0xd9e8('0x12'));var hardwareService=require(_0xd9e8('0x13'));var logger=require(_0xd9e8('0x14'))(_0xd9e8('0x15'));var utils=require(_0xd9e8('0x16'));var config=require(_0xd9e8('0x17'));var licenseUtil=require(_0xd9e8('0x18'));var db=require(_0xd9e8('0x19'))['db'];function respondWithStatusCode(_0x296e7e,_0x255a84){_0x255a84=_0x255a84||0xcc;return function(_0x5db990){if(_0x5db990){return _0x296e7e[_0xd9e8('0x1a')](_0x255a84);}return _0x296e7e[_0xd9e8('0x1b')](_0x255a84)[_0xd9e8('0x1c')]();};}function respondWithResult(_0x262a62,_0x3e1948){_0x3e1948=_0x3e1948||0xc8;return function(_0x1f8573){if(_0x1f8573){return _0x262a62[_0xd9e8('0x1b')](_0x3e1948)['json'](_0x1f8573);}};}function respondWithFilteredResult(_0x2daea7,_0xf35f7){return function(_0x5fc99a){if(_0x5fc99a){var _0x452df0=typeof _0xf35f7[_0xd9e8('0x1d')]===_0xd9e8('0x1e')&&typeof _0xf35f7['limit']===_0xd9e8('0x1e');var _0x30f90c=_0x5fc99a['count'];var _0x24b160=_0x452df0?0x0:_0xf35f7[_0xd9e8('0x1d')];var _0x25f8e2=_0x452df0?_0x5fc99a[_0xd9e8('0x1f')]:_0xf35f7[_0xd9e8('0x1d')]+_0xf35f7[_0xd9e8('0x20')];var _0x444ea3;if(_0x25f8e2>=_0x30f90c){_0x25f8e2=_0x30f90c;_0x444ea3=0xc8;}else{_0x444ea3=0xce;}_0x2daea7['status'](_0x444ea3);return _0x2daea7['set']('Content-Range',_0x24b160+'-'+_0x25f8e2+'/'+_0x30f90c)[_0xd9e8('0x21')](_0x5fc99a);}return null;};}function patchUpdates(_0x4a8f68){return function(_0x2bbe5e){try{jsonpatch[_0xd9e8('0x22')](_0x2bbe5e,_0x4a8f68,!![]);}catch(_0xae273b){return BPromise[_0xd9e8('0x23')](_0xae273b);}return _0x2bbe5e[_0xd9e8('0x24')]();};}function saveUpdates(_0x4bc41e,_0x56ca9a){return function(_0x404bab){if(_0x404bab){return _0x404bab['update'](_0x4bc41e)[_0xd9e8('0x25')](function(_0x778724){return _0x778724;});}return null;};}function removeEntity(_0x177644,_0x5c84c8){return function(_0x1953c8){if(_0x1953c8){return _0x1953c8['destroy']()[_0xd9e8('0x25')](function(){var _0x41c3e7=_0x1953c8[_0xd9e8('0x26')]({'plain':!![]});var _0x4272bd=_0xd9e8('0x27');return db[_0xd9e8('0x28')][_0xd9e8('0x29')]({'where':{'type':_0x4272bd,'resourceId':_0x41c3e7['id']}})[_0xd9e8('0x25')](function(){return _0x1953c8;});})['then'](function(){_0x177644[_0xd9e8('0x1b')](0xcc)[_0xd9e8('0x1c')]();});}};}function handleEntityNotFound(_0x29dec4,_0x2cd68e){return function(_0x2bfbeb){if(!_0x2bfbeb){_0x29dec4[_0xd9e8('0x1a')](0x194);}return _0x2bfbeb;};}function handleError(_0x10b980,_0x48c939){_0x48c939=_0x48c939||0x1f4;return function(_0x21965e){logger['error'](_0x21965e['stack']);if(_0x21965e[_0xd9e8('0x2a')]){delete _0x21965e['name'];}_0x10b980[_0xd9e8('0x1b')](_0x48c939)[_0xd9e8('0x2b')](_0x21965e);};}exports[_0xd9e8('0x2c')]=function(_0x4fb3fb,_0x421ac3){var _0x3587bf={},_0x1825c4={},_0x3d712d={'count':0x0,'rows':[]};return db['CmCompany'][_0xd9e8('0x2d')]()[_0xd9e8('0x25')](function(_0x983d9d){_0x1825c4[_0xd9e8('0x2e')]=_['keys'](_0x983d9d);_0x1825c4['query']=_[_0xd9e8('0x2f')](_0x4fb3fb[_0xd9e8('0x30')]);_0x1825c4['filters']=_[_0xd9e8('0x31')](_0x1825c4[_0xd9e8('0x2e')],_0x1825c4[_0xd9e8('0x30')]);_0x3587bf[_0xd9e8('0x32')]=_['intersection'](_0x1825c4['model'],qs['fields'](_0x4fb3fb['query'][_0xd9e8('0x33')]));_0x3587bf['attributes']=_0x3587bf[_0xd9e8('0x32')][_0xd9e8('0x34')]?_0x3587bf[_0xd9e8('0x32')]:_0x1825c4[_0xd9e8('0x2e')];if(!_0x4fb3fb[_0xd9e8('0x30')][_0xd9e8('0x35')](_0xd9e8('0x36'))){_0x3587bf[_0xd9e8('0x20')]=qs['limit'](_0x4fb3fb['query'][_0xd9e8('0x20')]);_0x3587bf['offset']=qs[_0xd9e8('0x1d')](_0x4fb3fb[_0xd9e8('0x30')][_0xd9e8('0x1d')]);}_0x3587bf[_0xd9e8('0x37')]=qs[_0xd9e8('0x38')](_0x4fb3fb[_0xd9e8('0x30')][_0xd9e8('0x38')]);_0x3587bf[_0xd9e8('0x39')]=qs[_0xd9e8('0x3a')](_['pick'](_0x4fb3fb['query'],_0x1825c4[_0xd9e8('0x3a')]),_0x983d9d);if(_0x4fb3fb[_0xd9e8('0x30')]['filter']){_0x3587bf['where']=_[_0xd9e8('0x3b')](_0x3587bf[_0xd9e8('0x39')],{'$or':_[_0xd9e8('0x3c')](_0x3587bf[_0xd9e8('0x32')],function(_0x58f3f0){var _0x5e1070={};_0x5e1070[_0x58f3f0]={'$like':'%'+_0x4fb3fb['query'][_0xd9e8('0x3d')]+'%'};return _0x5e1070;})});}_0x3587bf=_[_0xd9e8('0x3b')]({},_0x3587bf,_0x4fb3fb[_0xd9e8('0x3e')]);var _0x54b8be={'where':_0x3587bf['where']};return db['CmCompany'][_0xd9e8('0x1f')](_0x54b8be)[_0xd9e8('0x25')](function(_0x4acf14){_0x3d712d[_0xd9e8('0x1f')]=_0x4acf14;if(_0x4fb3fb[_0xd9e8('0x30')]['includeAll']){_0x3587bf[_0xd9e8('0x3f')]=[{'all':!![]}];}return db[_0xd9e8('0x40')][_0xd9e8('0x41')](_0x3587bf);})['then'](function(_0x5be945){_0x3d712d[_0xd9e8('0x42')]=_0x5be945;return _0x3d712d;})[_0xd9e8('0x25')](respondWithFilteredResult(_0x421ac3,_0x3587bf))[_0xd9e8('0x43')](handleError(_0x421ac3,null));})[_0xd9e8('0x43')](handleError(_0x421ac3,null));};exports[_0xd9e8('0x44')]=function(_0x4c835b,_0x274a06){var _0x5b1e96={'raw':![],'where':{'id':_0x4c835b[_0xd9e8('0x45')]['id']}},_0x26b769={};_0x26b769['model']=_[_0xd9e8('0x2f')](db[_0xd9e8('0x40')][_0xd9e8('0x46')]);_0x26b769[_0xd9e8('0x30')]=_['keys'](_0x4c835b[_0xd9e8('0x30')]);_0x26b769[_0xd9e8('0x3a')]=_['intersection'](_0x26b769[_0xd9e8('0x2e')],_0x26b769[_0xd9e8('0x30')]);_0x5b1e96['attributes']=_['intersection'](_0x26b769[_0xd9e8('0x2e')],qs[_0xd9e8('0x33')](_0x4c835b['query'][_0xd9e8('0x33')]));_0x5b1e96[_0xd9e8('0x32')]=_0x5b1e96[_0xd9e8('0x32')][_0xd9e8('0x34')]?_0x5b1e96[_0xd9e8('0x32')]:_0x26b769[_0xd9e8('0x2e')];if(_0x4c835b['query']['includeAll']){_0x5b1e96[_0xd9e8('0x3f')]=[{'all':!![]}];}_0x5b1e96=_[_0xd9e8('0x3b')]({},_0x5b1e96,_0x4c835b['options']);return db[_0xd9e8('0x40')][_0xd9e8('0x47')](_0x5b1e96)['then'](handleEntityNotFound(_0x274a06,null))[_0xd9e8('0x25')](respondWithResult(_0x274a06,null))['catch'](handleError(_0x274a06,null));};exports['create']=function(_0x5a3fd0,_0x5a4ec5){return db[_0xd9e8('0x40')][_0xd9e8('0x48')](_0x5a3fd0[_0xd9e8('0x49')],{})[_0xd9e8('0x25')](function(_0xeb1bd7){var _0x4c7dd0=_0x5a3fd0[_0xd9e8('0x4a')][_0xd9e8('0x26')]({'plain':!![]});if(!_0x4c7dd0)throw new Error(_0xd9e8('0x4b'));if(_0x4c7dd0['role']===_0xd9e8('0x4a')){var _0x5733ad=_0xeb1bd7[_0xd9e8('0x26')]({'plain':!![]});var _0x5d6a30='Companies';return db[_0xd9e8('0x4c')][_0xd9e8('0x47')]({'where':{'name':_0x5d6a30,'userProfileId':_0x4c7dd0['userProfileId']},'raw':!![]})[_0xd9e8('0x25')](function(_0x38c550){if(_0x38c550&&_0x38c550[_0xd9e8('0x4d')]===0x0){return db['UserProfileResource']['create']({'name':_0x5733ad[_0xd9e8('0x2a')],'resourceId':_0x5733ad['id'],'type':_0x38c550[_0xd9e8('0x2a')],'sectionId':_0x38c550['id']},{})[_0xd9e8('0x25')](function(){return _0xeb1bd7;});}else{return _0xeb1bd7;}})['catch'](function(_0x333ce4){logger[_0xd9e8('0x4e')](_0xd9e8('0x4f'),_0x333ce4);throw _0x333ce4;});}return _0xeb1bd7;})['then'](respondWithResult(_0x5a4ec5,0xc9))[_0xd9e8('0x43')](handleError(_0x5a4ec5,null));};exports[_0xd9e8('0x50')]=function(_0x5d95be,_0x28dc02){if(_0x5d95be[_0xd9e8('0x49')]['id']){delete _0x5d95be[_0xd9e8('0x49')]['id'];}return db[_0xd9e8('0x40')][_0xd9e8('0x47')]({'where':{'id':_0x5d95be[_0xd9e8('0x45')]['id']}})[_0xd9e8('0x25')](handleEntityNotFound(_0x28dc02,null))[_0xd9e8('0x25')](saveUpdates(_0x5d95be[_0xd9e8('0x49')],null))[_0xd9e8('0x25')](respondWithResult(_0x28dc02,null))['catch'](handleError(_0x28dc02,null));};exports['destroy']=function(_0x8abb1c,_0x440d2e){return db[_0xd9e8('0x40')]['find']({'where':{'id':_0x8abb1c[_0xd9e8('0x45')]['id']}})[_0xd9e8('0x25')](handleEntityNotFound(_0x440d2e,null))[_0xd9e8('0x25')](removeEntity(_0x440d2e,null))[_0xd9e8('0x43')](handleError(_0x440d2e,null));};exports[_0xd9e8('0x2d')]=function(_0x5ca157,_0x45ad6d){return db[_0xd9e8('0x40')][_0xd9e8('0x2d')]()[_0xd9e8('0x25')](respondWithResult(_0x45ad6d,null))[_0xd9e8('0x43')](handleError(_0x45ad6d,null));};exports['addContacts']=function(_0x50bd1b,_0x5a5ac3,_0xd08bde){return db[_0xd9e8('0x51')][_0xd9e8('0x47')]({'where':{'id':_0x50bd1b[_0xd9e8('0x45')]['id']}})[_0xd9e8('0x25')](handleEntityNotFound(_0x5a5ac3,null))[_0xd9e8('0x25')](function(_0x5e80c7){if(_0x5e80c7){return _0x5e80c7[_0xd9e8('0x52')](_0x50bd1b['body'][_0xd9e8('0x53')],_['omit'](_0x50bd1b[_0xd9e8('0x49')],[_0xd9e8('0x53'),'id'])||{});}})['then'](respondWithResult(_0x5a5ac3,null))['catch'](handleError(_0x5a5ac3,null));};exports[_0xd9e8('0x54')]=function(_0x2317d2,_0x8a65a6,_0xc87c4b){var _0x3f2291={};var _0x5f3afb={};var _0x2973ce;var _0x44250f;return db[_0xd9e8('0x40')]['findOne']({'where':{'id':_0x2317d2[_0xd9e8('0x45')]['id']}})[_0xd9e8('0x25')](handleEntityNotFound(_0x8a65a6,null))['then'](function(_0x39c03e){if(_0x39c03e){_0x2973ce=_0x39c03e;_0x5f3afb[_0xd9e8('0x2e')]=_[_0xd9e8('0x2f')](db['CmContact'][_0xd9e8('0x46')]);_0x5f3afb['query']=_[_0xd9e8('0x2f')](_0x2317d2[_0xd9e8('0x30')]);_0x5f3afb[_0xd9e8('0x3a')]=_[_0xd9e8('0x31')](_0x5f3afb[_0xd9e8('0x2e')],_0x5f3afb[_0xd9e8('0x30')]);_0x3f2291[_0xd9e8('0x32')]=_[_0xd9e8('0x31')](_0x5f3afb[_0xd9e8('0x2e')],qs['fields'](_0x2317d2[_0xd9e8('0x30')][_0xd9e8('0x33')]));_0x3f2291['attributes']=_0x3f2291[_0xd9e8('0x32')]['length']?_0x3f2291[_0xd9e8('0x32')]:_0x5f3afb[_0xd9e8('0x2e')];_0x3f2291[_0xd9e8('0x37')]=qs[_0xd9e8('0x38')](_0x2317d2['query']['sort']);_0x3f2291[_0xd9e8('0x39')]=qs[_0xd9e8('0x3a')](_[_0xd9e8('0x55')](_0x2317d2[_0xd9e8('0x30')],_0x5f3afb[_0xd9e8('0x3a')]));if(_0x2317d2['query'][_0xd9e8('0x3d')]){_0x3f2291[_0xd9e8('0x39')]=_['merge'](_0x3f2291[_0xd9e8('0x39')],{'$or':_[_0xd9e8('0x3c')](_0x3f2291[_0xd9e8('0x32')],function(_0x4f2877){var _0xf1569a={};_0xf1569a[_0x4f2877]={'$like':'%'+_0x2317d2[_0xd9e8('0x30')][_0xd9e8('0x3d')]+'%'};return _0xf1569a;})});}_0x3f2291=_['merge']({},_0x3f2291,_0x2317d2[_0xd9e8('0x3e')]);return _0x2973ce[_0xd9e8('0x54')](_0x3f2291);}})[_0xd9e8('0x25')](function(_0x81e34c){if(_0x81e34c){_0x44250f=_0x81e34c[_0xd9e8('0x34')];if(!_0x2317d2[_0xd9e8('0x30')]['hasOwnProperty'](_0xd9e8('0x36'))){_0x3f2291['limit']=qs[_0xd9e8('0x20')](_0x2317d2[_0xd9e8('0x30')]['limit']);_0x3f2291[_0xd9e8('0x1d')]=qs[_0xd9e8('0x1d')](_0x2317d2[_0xd9e8('0x30')]['offset']);}return _0x2973ce[_0xd9e8('0x54')](_0x3f2291);}})[_0xd9e8('0x25')](function(_0x210c41){if(_0x210c41){return _0x210c41?{'count':_0x44250f,'rows':_0x210c41}:null;}})[_0xd9e8('0x25')](respondWithResult(_0x8a65a6,null))[_0xd9e8('0x43')](handleError(_0x8a65a6,null));};
\ No newline at end of file
+var _0x9ffc=['jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','apply','reject','save','update','then','name','send','index','describe','query','keys','intersection','model','attributes','fields','hasOwnProperty','order','sort','filters','pick','filter','where','map','merge','options','CmCompany','includeAll','include','findAll','rows','catch','show','rawAttributes','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','destroy','addContacts','CmContact','ids','omit','findOne','length','getContacts','nolimit','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto'];(function(_0x2cac1b,_0x331205){var _0x6f5edc=function(_0x545f62){while(--_0x545f62){_0x2cac1b['push'](_0x2cac1b['shift']());}};_0x6f5edc(++_0x331205);}(_0x9ffc,0xff));var _0xc9ff=function(_0x5ef161,_0x27d16c){_0x5ef161=_0x5ef161-0x0;var _0x1c6e9e=_0x9ffc[_0x5ef161];return _0x1c6e9e;};'use strict';var emlformat=require(_0xc9ff('0x0'));var rimraf=require(_0xc9ff('0x1'));var zipdir=require(_0xc9ff('0x2'));var jsonpatch=require(_0xc9ff('0x3'));var rp=require('request-promise');var moment=require(_0xc9ff('0x4'));var BPromise=require(_0xc9ff('0x5'));var Mustache=require(_0xc9ff('0x6'));var util=require(_0xc9ff('0x7'));var path=require('path');var sox=require(_0xc9ff('0x8'));var csv=require(_0xc9ff('0x9'));var ejs=require(_0xc9ff('0xa'));var fs=require('fs');var fs_extra=require(_0xc9ff('0xb'));var _=require(_0xc9ff('0xc'));var squel=require(_0xc9ff('0xd'));var crypto=require(_0xc9ff('0xe'));var jsforce=require(_0xc9ff('0xf'));var deskjs=require(_0xc9ff('0x10'));var toCsv=require(_0xc9ff('0x9'));var querystring=require('querystring');var Papa=require(_0xc9ff('0x11'));var Redis=require(_0xc9ff('0x12'));var authService=require(_0xc9ff('0x13'));var qs=require(_0xc9ff('0x14'));var as=require(_0xc9ff('0x15'));var hardwareService=require(_0xc9ff('0x16'));var logger=require(_0xc9ff('0x17'))(_0xc9ff('0x18'));var utils=require(_0xc9ff('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0xc9ff('0x1a'));var db=require(_0xc9ff('0x1b'))['db'];function respondWithStatusCode(_0x1f64f1,_0x5e2aa7){_0x5e2aa7=_0x5e2aa7||0xcc;return function(_0xee9fd0){if(_0xee9fd0){return _0x1f64f1[_0xc9ff('0x1c')](_0x5e2aa7);}return _0x1f64f1[_0xc9ff('0x1d')](_0x5e2aa7)[_0xc9ff('0x1e')]();};}function respondWithResult(_0x42779b,_0x26598c){_0x26598c=_0x26598c||0xc8;return function(_0x37b79e){if(_0x37b79e){return _0x42779b[_0xc9ff('0x1d')](_0x26598c)[_0xc9ff('0x1f')](_0x37b79e);}};}function respondWithFilteredResult(_0x5693b7,_0x42c9c9){return function(_0x44ed3b){if(_0x44ed3b){var _0x77bece=typeof _0x42c9c9[_0xc9ff('0x20')]==='undefined'&&typeof _0x42c9c9[_0xc9ff('0x21')]===_0xc9ff('0x22');var _0x4ef4fa=_0x44ed3b[_0xc9ff('0x23')];var _0x13cc08=_0x77bece?0x0:_0x42c9c9[_0xc9ff('0x20')];var _0x51ec28=_0x77bece?_0x44ed3b[_0xc9ff('0x23')]:_0x42c9c9[_0xc9ff('0x20')]+_0x42c9c9[_0xc9ff('0x21')];var _0x26ff2d;if(_0x51ec28>=_0x4ef4fa){_0x51ec28=_0x4ef4fa;_0x26ff2d=0xc8;}else{_0x26ff2d=0xce;}_0x5693b7['status'](_0x26ff2d);return _0x5693b7[_0xc9ff('0x24')]('Content-Range',_0x13cc08+'-'+_0x51ec28+'/'+_0x4ef4fa)[_0xc9ff('0x1f')](_0x44ed3b);}return null;};}function patchUpdates(_0x2c26ed){return function(_0x351cd8){try{jsonpatch[_0xc9ff('0x25')](_0x351cd8,_0x2c26ed,!![]);}catch(_0x4380f1){return BPromise[_0xc9ff('0x26')](_0x4380f1);}return _0x351cd8[_0xc9ff('0x27')]();};}function saveUpdates(_0x140e5b,_0x410bb9){return function(_0xc5b8f4){if(_0xc5b8f4){return _0xc5b8f4[_0xc9ff('0x28')](_0x140e5b)['then'](function(_0x3eb707){return _0x3eb707;});}return null;};}function removeEntity(_0x2df0a8,_0x33a599){return function(_0x420565){if(_0x420565){return _0x420565['destroy']()[_0xc9ff('0x29')](function(){var _0x438000=_0x420565['get']({'plain':!![]});var _0x48d449='Companies';return db['UserProfileResource']['destroy']({'where':{'type':_0x48d449,'resourceId':_0x438000['id']}})[_0xc9ff('0x29')](function(){return _0x420565;});})[_0xc9ff('0x29')](function(){_0x2df0a8[_0xc9ff('0x1d')](0xcc)[_0xc9ff('0x1e')]();});}};}function handleEntityNotFound(_0x517d5e,_0x22930c){return function(_0x37b474){if(!_0x37b474){_0x517d5e[_0xc9ff('0x1c')](0x194);}return _0x37b474;};}function handleError(_0x4c4af6,_0x50ad20){_0x50ad20=_0x50ad20||0x1f4;return function(_0x528016){logger['error'](_0x528016['stack']);if(_0x528016[_0xc9ff('0x2a')]){delete _0x528016[_0xc9ff('0x2a')];}_0x4c4af6['status'](_0x50ad20)[_0xc9ff('0x2b')](_0x528016);};}exports[_0xc9ff('0x2c')]=function(_0x49e3b7,_0x1f08af){var _0x52dec6={},_0xbaa739={},_0x430e30={'count':0x0,'rows':[]};return db['CmCompany'][_0xc9ff('0x2d')]()[_0xc9ff('0x29')](function(_0x23076d){_0xbaa739['model']=_['keys'](_0x23076d);_0xbaa739[_0xc9ff('0x2e')]=_[_0xc9ff('0x2f')](_0x49e3b7['query']);_0xbaa739['filters']=_[_0xc9ff('0x30')](_0xbaa739[_0xc9ff('0x31')],_0xbaa739[_0xc9ff('0x2e')]);_0x52dec6[_0xc9ff('0x32')]=_[_0xc9ff('0x30')](_0xbaa739[_0xc9ff('0x31')],qs[_0xc9ff('0x33')](_0x49e3b7[_0xc9ff('0x2e')][_0xc9ff('0x33')]));_0x52dec6[_0xc9ff('0x32')]=_0x52dec6[_0xc9ff('0x32')]['length']?_0x52dec6[_0xc9ff('0x32')]:_0xbaa739[_0xc9ff('0x31')];if(!_0x49e3b7[_0xc9ff('0x2e')][_0xc9ff('0x34')]('nolimit')){_0x52dec6[_0xc9ff('0x21')]=qs[_0xc9ff('0x21')](_0x49e3b7['query'][_0xc9ff('0x21')]);_0x52dec6['offset']=qs[_0xc9ff('0x20')](_0x49e3b7[_0xc9ff('0x2e')][_0xc9ff('0x20')]);}_0x52dec6[_0xc9ff('0x35')]=qs[_0xc9ff('0x36')](_0x49e3b7[_0xc9ff('0x2e')]['sort']);_0x52dec6['where']=qs[_0xc9ff('0x37')](_[_0xc9ff('0x38')](_0x49e3b7['query'],_0xbaa739['filters']),_0x23076d);if(_0x49e3b7[_0xc9ff('0x2e')][_0xc9ff('0x39')]){_0x52dec6[_0xc9ff('0x3a')]=_['merge'](_0x52dec6[_0xc9ff('0x3a')],{'$or':_[_0xc9ff('0x3b')](_0x52dec6[_0xc9ff('0x32')],function(_0x360252){var _0x29219e={};_0x29219e[_0x360252]={'$like':'%'+_0x49e3b7['query'][_0xc9ff('0x39')]+'%'};return _0x29219e;})});}_0x52dec6=_[_0xc9ff('0x3c')]({},_0x52dec6,_0x49e3b7[_0xc9ff('0x3d')]);var _0x4946e8={'where':_0x52dec6[_0xc9ff('0x3a')]};return db[_0xc9ff('0x3e')]['count'](_0x4946e8)[_0xc9ff('0x29')](function(_0x3b1bf7){_0x430e30[_0xc9ff('0x23')]=_0x3b1bf7;if(_0x49e3b7[_0xc9ff('0x2e')][_0xc9ff('0x3f')]){_0x52dec6[_0xc9ff('0x40')]=[{'all':!![]}];}return db[_0xc9ff('0x3e')][_0xc9ff('0x41')](_0x52dec6);})[_0xc9ff('0x29')](function(_0x335e71){_0x430e30[_0xc9ff('0x42')]=_0x335e71;return _0x430e30;})[_0xc9ff('0x29')](respondWithFilteredResult(_0x1f08af,_0x52dec6))[_0xc9ff('0x43')](handleError(_0x1f08af,null));})[_0xc9ff('0x43')](handleError(_0x1f08af,null));};exports[_0xc9ff('0x44')]=function(_0x158d8c,_0xf6e5dd){var _0x495f9a={'raw':![],'where':{'id':_0x158d8c['params']['id']}},_0x36a203={};_0x36a203[_0xc9ff('0x31')]=_[_0xc9ff('0x2f')](db[_0xc9ff('0x3e')][_0xc9ff('0x45')]);_0x36a203['query']=_[_0xc9ff('0x2f')](_0x158d8c['query']);_0x36a203[_0xc9ff('0x37')]=_[_0xc9ff('0x30')](_0x36a203['model'],_0x36a203[_0xc9ff('0x2e')]);_0x495f9a[_0xc9ff('0x32')]=_[_0xc9ff('0x30')](_0x36a203[_0xc9ff('0x31')],qs[_0xc9ff('0x33')](_0x158d8c['query'][_0xc9ff('0x33')]));_0x495f9a[_0xc9ff('0x32')]=_0x495f9a[_0xc9ff('0x32')]['length']?_0x495f9a[_0xc9ff('0x32')]:_0x36a203['model'];if(_0x158d8c[_0xc9ff('0x2e')]['includeAll']){_0x495f9a[_0xc9ff('0x40')]=[{'all':!![]}];}_0x495f9a=_[_0xc9ff('0x3c')]({},_0x495f9a,_0x158d8c[_0xc9ff('0x3d')]);return db['CmCompany']['find'](_0x495f9a)['then'](handleEntityNotFound(_0xf6e5dd,null))[_0xc9ff('0x29')](respondWithResult(_0xf6e5dd,null))[_0xc9ff('0x43')](handleError(_0xf6e5dd,null));};exports['create']=function(_0x2d99f9,_0x463a17){return db[_0xc9ff('0x3e')][_0xc9ff('0x46')](_0x2d99f9['body'],{})[_0xc9ff('0x29')](function(_0x37a299){var _0xae7443=_0x2d99f9[_0xc9ff('0x47')]['get']({'plain':!![]});if(!_0xae7443)throw new Error(_0xc9ff('0x48'));if(_0xae7443[_0xc9ff('0x49')]==='user'){var _0x57ed76=_0x37a299['get']({'plain':!![]});var _0x417c53='Companies';return db[_0xc9ff('0x4a')][_0xc9ff('0x4b')]({'where':{'name':_0x417c53,'userProfileId':_0xae7443['userProfileId']},'raw':!![]})[_0xc9ff('0x29')](function(_0x2de48c){if(_0x2de48c&&_0x2de48c[_0xc9ff('0x4c')]===0x0){return db[_0xc9ff('0x4d')]['create']({'name':_0x57ed76[_0xc9ff('0x2a')],'resourceId':_0x57ed76['id'],'type':_0x2de48c[_0xc9ff('0x2a')],'sectionId':_0x2de48c['id']},{})['then'](function(){return _0x37a299;});}else{return _0x37a299;}})[_0xc9ff('0x43')](function(_0x3bcbec){logger['error'](_0xc9ff('0x4e'),_0x3bcbec);throw _0x3bcbec;});}return _0x37a299;})[_0xc9ff('0x29')](respondWithResult(_0x463a17,0xc9))[_0xc9ff('0x43')](handleError(_0x463a17,null));};exports[_0xc9ff('0x28')]=function(_0xc8d80f,_0x108b76){if(_0xc8d80f['body']['id']){delete _0xc8d80f[_0xc9ff('0x4f')]['id'];}return db[_0xc9ff('0x3e')][_0xc9ff('0x4b')]({'where':{'id':_0xc8d80f[_0xc9ff('0x50')]['id']}})['then'](handleEntityNotFound(_0x108b76,null))[_0xc9ff('0x29')](saveUpdates(_0xc8d80f[_0xc9ff('0x4f')],null))[_0xc9ff('0x29')](respondWithResult(_0x108b76,null))[_0xc9ff('0x43')](handleError(_0x108b76,null));};exports[_0xc9ff('0x51')]=function(_0x18ab8a,_0x4d3707){return db[_0xc9ff('0x3e')][_0xc9ff('0x4b')]({'where':{'id':_0x18ab8a[_0xc9ff('0x50')]['id']}})['then'](handleEntityNotFound(_0x4d3707,null))[_0xc9ff('0x29')](removeEntity(_0x4d3707,null))[_0xc9ff('0x43')](handleError(_0x4d3707,null));};exports[_0xc9ff('0x2d')]=function(_0x4434e8,_0x46a62a){return db[_0xc9ff('0x3e')][_0xc9ff('0x2d')]()['then'](respondWithResult(_0x46a62a,null))[_0xc9ff('0x43')](handleError(_0x46a62a,null));};exports[_0xc9ff('0x52')]=function(_0x2ece29,_0x20b0aa,_0x5e6f3b){return db[_0xc9ff('0x53')]['find']({'where':{'id':_0x2ece29['params']['id']}})[_0xc9ff('0x29')](handleEntityNotFound(_0x20b0aa,null))['then'](function(_0x3e2a9c){if(_0x3e2a9c){return _0x3e2a9c[_0xc9ff('0x52')](_0x2ece29['body'][_0xc9ff('0x54')],_[_0xc9ff('0x55')](_0x2ece29[_0xc9ff('0x4f')],[_0xc9ff('0x54'),'id'])||{});}})[_0xc9ff('0x29')](respondWithResult(_0x20b0aa,null))[_0xc9ff('0x43')](handleError(_0x20b0aa,null));};exports['getContacts']=function(_0xc9fa47,_0x1e268c,_0xd05a65){var _0x4761c0={};var _0x17c963={};var _0x277947;var _0x527dab;return db['CmCompany'][_0xc9ff('0x56')]({'where':{'id':_0xc9fa47[_0xc9ff('0x50')]['id']}})[_0xc9ff('0x29')](handleEntityNotFound(_0x1e268c,null))['then'](function(_0x2808a1){if(_0x2808a1){_0x277947=_0x2808a1;_0x17c963[_0xc9ff('0x31')]=_[_0xc9ff('0x2f')](db[_0xc9ff('0x53')][_0xc9ff('0x45')]);_0x17c963[_0xc9ff('0x2e')]=_[_0xc9ff('0x2f')](_0xc9fa47['query']);_0x17c963[_0xc9ff('0x37')]=_[_0xc9ff('0x30')](_0x17c963[_0xc9ff('0x31')],_0x17c963['query']);_0x4761c0['attributes']=_[_0xc9ff('0x30')](_0x17c963[_0xc9ff('0x31')],qs[_0xc9ff('0x33')](_0xc9fa47['query'][_0xc9ff('0x33')]));_0x4761c0['attributes']=_0x4761c0[_0xc9ff('0x32')][_0xc9ff('0x57')]?_0x4761c0[_0xc9ff('0x32')]:_0x17c963[_0xc9ff('0x31')];_0x4761c0[_0xc9ff('0x35')]=qs[_0xc9ff('0x36')](_0xc9fa47[_0xc9ff('0x2e')][_0xc9ff('0x36')]);_0x4761c0[_0xc9ff('0x3a')]=qs[_0xc9ff('0x37')](_[_0xc9ff('0x38')](_0xc9fa47[_0xc9ff('0x2e')],_0x17c963[_0xc9ff('0x37')]));if(_0xc9fa47[_0xc9ff('0x2e')]['filter']){_0x4761c0[_0xc9ff('0x3a')]=_[_0xc9ff('0x3c')](_0x4761c0['where'],{'$or':_['map'](_0x4761c0[_0xc9ff('0x32')],function(_0x5e3a65){var _0x2150ef={};_0x2150ef[_0x5e3a65]={'$like':'%'+_0xc9fa47['query']['filter']+'%'};return _0x2150ef;})});}_0x4761c0=_[_0xc9ff('0x3c')]({},_0x4761c0,_0xc9fa47[_0xc9ff('0x3d')]);return _0x277947[_0xc9ff('0x58')](_0x4761c0);}})['then'](function(_0x21a420){if(_0x21a420){_0x527dab=_0x21a420[_0xc9ff('0x57')];if(!_0xc9fa47[_0xc9ff('0x2e')]['hasOwnProperty'](_0xc9ff('0x59'))){_0x4761c0[_0xc9ff('0x21')]=qs[_0xc9ff('0x21')](_0xc9fa47['query'][_0xc9ff('0x21')]);_0x4761c0['offset']=qs[_0xc9ff('0x20')](_0xc9fa47['query'][_0xc9ff('0x20')]);}return _0x277947['getContacts'](_0x4761c0);}})[_0xc9ff('0x29')](function(_0x392230){if(_0x392230){return _0x392230?{'count':_0x527dab,'rows':_0x392230}:null;}})[_0xc9ff('0x29')](respondWithResult(_0x1e268c,null))[_0xc9ff('0x43')](handleError(_0x1e268c,null));};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js
index 629fa40..d409c5a 100644
--- a/server/api/cmCompany/cmCompany.model.js
+++ b/server/api/cmCompany/cmCompany.model.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xfe49=['../../config/logger','api','bluebird','request-promise','path','../../config/environment','exports','define','CmCompany','lodash','util'];(function(_0x1719e2,_0x31d2ab){var _0xe57b79=function(_0x3d6a4e){while(--_0x3d6a4e){_0x1719e2['push'](_0x1719e2['shift']());}};_0xe57b79(++_0x31d2ab);}(_0xfe49,0x1b6));var _0x9fe4=function(_0x332606,_0xb754ed){_0x332606=_0x332606-0x0;var _0x19736e=_0xfe49[_0x332606];return _0x19736e;};'use strict';var _=require(_0x9fe4('0x0'));var util=require(_0x9fe4('0x1'));var logger=require(_0x9fe4('0x2'))(_0x9fe4('0x3'));var moment=require('moment');var BPromise=require(_0x9fe4('0x4'));var rp=require(_0x9fe4('0x5'));var fs=require('fs');var path=require(_0x9fe4('0x6'));var rimraf=require('rimraf');var config=require(_0x9fe4('0x7'));var attributes=require('./cmCompany.attributes');module[_0x9fe4('0x8')]=function(_0x33aa39,_0x33f5c9){return _0x33aa39[_0x9fe4('0x9')](_0x9fe4('0xa'),attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xac77=['bluebird','../../config/environment','./cmCompany.attributes','exports','CmCompany','cm_companies','lodash','util','api','moment'];(function(_0x26ceb8,_0x15ec89){var _0x45fb32=function(_0x2f9495){while(--_0x2f9495){_0x26ceb8['push'](_0x26ceb8['shift']());}};_0x45fb32(++_0x15ec89);}(_0xac77,0x7e));var _0x7ac7=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xac77[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0x7ac7('0x0'));var util=require(_0x7ac7('0x1'));var logger=require('../../config/logger')(_0x7ac7('0x2'));var moment=require(_0x7ac7('0x3'));var BPromise=require(_0x7ac7('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7ac7('0x5'));var attributes=require(_0x7ac7('0x6'));module[_0x7ac7('0x7')]=function(_0x2d4dbf,_0x4af4fa){return _0x2d4dbf['define'](_0x7ac7('0x8'),attributes,{'tableName':_0x7ac7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
diff --git a/server/api/cmCompany/cmCompany.rpc.js b/server/api/cmCompany/cmCompany.rpc.js
index 759168b..29535ac 100644
--- a/server/api/cmCompany/cmCompany.rpc.js
+++ b/server/api/cmCompany/cmCompany.rpc.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x71d5=['randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','CmCompany,\x20%s,\x20%s','message','result','catch','lodash','util','moment'];(function(_0x15c421,_0x6366f7){var _0x5e5ed5=function(_0x206e66){while(--_0x206e66){_0x15c421['push'](_0x15c421['shift']());}};_0x5e5ed5(++_0x6366f7);}(_0x71d5,0x18d));var _0x571d=function(_0xe86606,_0x2804a3){_0xe86606=_0xe86606-0x0;var _0x7cbd97=_0x71d5[_0xe86606];return _0x7cbd97;};'use strict';var _=require(_0x571d('0x0'));var util=require(_0x571d('0x1'));var moment=require(_0x571d('0x2'));var BPromise=require('bluebird');var rs=require(_0x571d('0x3'));var fs=require('fs');var Redis=require(_0x571d('0x4'));var db=require(_0x571d('0x5'))['db'];var utils=require(_0x571d('0x6'));var logger=require('../../config/logger')(_0x571d('0x7'));var config=require(_0x571d('0x8'));var jayson=require(_0x571d('0x9'));var client=jayson[_0x571d('0xa')][_0x571d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x117a1d,_0x57a47a,_0x474589){return new BPromise(function(_0x401d25,_0x42cf4f){return client[_0x571d('0xc')](_0x117a1d,_0x474589)[_0x571d('0xd')](function(_0x23ded4){logger[_0x571d('0xe')]('CmCompany,\x20%s,\x20%s',_0x57a47a,_0x571d('0xf'));logger[_0x571d('0x10')](_0x571d('0x11'),_0x57a47a,_0x571d('0xf'),JSON[_0x571d('0x12')](_0x23ded4));if(_0x23ded4['error']){if(_0x23ded4[_0x571d('0x13')][_0x571d('0x14')]===0x1f4){logger['error'](_0x571d('0x15'),_0x57a47a,_0x23ded4[_0x571d('0x13')][_0x571d('0x16')]);return _0x42cf4f(_0x23ded4['error'][_0x571d('0x16')]);}logger[_0x571d('0x13')](_0x571d('0x15'),_0x57a47a,_0x23ded4['error']['message']);return _0x401d25(_0x23ded4[_0x571d('0x13')][_0x571d('0x16')]);}else{logger[_0x571d('0xe')]('CmCompany,\x20%s,\x20%s',_0x57a47a,'request\x20sent');_0x401d25(_0x23ded4[_0x571d('0x17')][_0x571d('0x16')]);}})[_0x571d('0x18')](function(_0x12a94a){logger['error']('CmCompany,\x20%s,\x20%s',_0x57a47a,_0x12a94a);_0x42cf4f(_0x12a94a);});});}
\ No newline at end of file
+var _0xbbfe=['jayson/promise','client','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','message','result','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x599b54,_0x36c509){var _0xde3221=function(_0x26bfca){while(--_0x26bfca){_0x599b54['push'](_0x599b54['shift']());}};_0xde3221(++_0x36c509);}(_0xbbfe,0x76));var _0xebbf=function(_0x4dde1e,_0x50c73e){_0x4dde1e=_0x4dde1e-0x0;var _0x4bc064=_0xbbfe[_0x4dde1e];return _0x4bc064;};'use strict';var _=require('lodash');var util=require(_0xebbf('0x0'));var moment=require('moment');var BPromise=require(_0xebbf('0x1'));var rs=require(_0xebbf('0x2'));var fs=require('fs');var Redis=require(_0xebbf('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xebbf('0x4'));var logger=require(_0xebbf('0x5'))(_0xebbf('0x6'));var config=require(_0xebbf('0x7'));var jayson=require(_0xebbf('0x8'));var client=jayson[_0xebbf('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x42c0f0,_0x1ae7f2,_0x498936){return new BPromise(function(_0x4426f7,_0x5c9bec){return client[_0xebbf('0xa')](_0x42c0f0,_0x498936)[_0xebbf('0xb')](function(_0x1fd839){logger[_0xebbf('0xc')](_0xebbf('0xd'),_0x1ae7f2,_0xebbf('0xe'));logger[_0xebbf('0xf')](_0xebbf('0x10'),_0x1ae7f2,'request\x20sent',JSON[_0xebbf('0x11')](_0x1fd839));if(_0x1fd839[_0xebbf('0x12')]){if(_0x1fd839[_0xebbf('0x12')]['code']===0x1f4){logger['error'](_0xebbf('0xd'),_0x1ae7f2,_0x1fd839[_0xebbf('0x12')][_0xebbf('0x13')]);return _0x5c9bec(_0x1fd839[_0xebbf('0x12')][_0xebbf('0x13')]);}logger['error'](_0xebbf('0xd'),_0x1ae7f2,_0x1fd839[_0xebbf('0x12')]['message']);return _0x4426f7(_0x1fd839['error']['message']);}else{logger[_0xebbf('0xc')](_0xebbf('0xd'),_0x1ae7f2,_0xebbf('0xe'));_0x4426f7(_0x1fd839[_0xebbf('0x14')]['message']);}})['catch'](function(_0x2e3615){logger['error'](_0xebbf('0xd'),_0x1ae7f2,_0x2e3615);_0x5c9bec(_0x2e3615);});});}
\ No newline at end of file
diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js
index aa6a907..8b8daee 100644
--- a/server/api/cmCompany/index.js
+++ b/server/api/cmCompany/index.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x0913=['addContacts','put','update','delete','/:id','destroy','exports','multer','util','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','show','/:id/contacts','getContacts','post','create'];(function(_0x503817,_0x3e41e6){var _0x3cdb5b=function(_0x18d283){while(--_0x18d283){_0x503817['push'](_0x503817['shift']());}};_0x3cdb5b(++_0x3e41e6);}(_0x0913,0x1a5));var _0x3091=function(_0x3efd26,_0xcdb922){_0x3efd26=_0x3efd26-0x0;var _0x490209=_0x0913[_0x3efd26];return _0x490209;};'use strict';var multer=require(_0x3091('0x0'));var util=require(_0x3091('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x3091('0x2'));var auth=require(_0x3091('0x3'));var interaction=require(_0x3091('0x4'));var config=require(_0x3091('0x5'));var controller=require('./cmCompany.controller');router[_0x3091('0x6')]('/',auth[_0x3091('0x7')](),controller[_0x3091('0x8')]);router[_0x3091('0x6')](_0x3091('0x9'),auth['isAuthenticated'](),controller[_0x3091('0xa')]);router[_0x3091('0x6')]('/:id',auth['isAuthenticated'](),controller[_0x3091('0xb')]);router['get'](_0x3091('0xc'),auth[_0x3091('0x7')](),controller[_0x3091('0xd')]);router[_0x3091('0xe')]('/',auth[_0x3091('0x7')](),controller[_0x3091('0xf')]);router[_0x3091('0xe')]('/:id/contacts',auth['isAuthenticated'](),controller[_0x3091('0x10')]);router[_0x3091('0x11')]('/:id',auth[_0x3091('0x7')](),controller[_0x3091('0x12')]);router[_0x3091('0x13')](_0x3091('0x14'),auth[_0x3091('0x7')](),controller[_0x3091('0x15')]);module[_0x3091('0x16')]=router;
\ No newline at end of file
+var _0xdfd2=['./cmCompany.controller','get','/describe','isAuthenticated','/:id','show','/:id/contacts','getContacts','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../config/environment'];(function(_0x59d89e,_0x55edf5){var _0x554e93=function(_0x3d40bc){while(--_0x3d40bc){_0x59d89e['push'](_0x59d89e['shift']());}};_0x554e93(++_0x55edf5);}(_0xdfd2,0xf6));var _0x2dfd=function(_0x23de40,_0x3ca209){_0x23de40=_0x23de40-0x0;var _0x34660c=_0xdfd2[_0x23de40];return _0x34660c;};'use strict';var multer=require(_0x2dfd('0x0'));var util=require('util');var path=require(_0x2dfd('0x1'));var timeout=require(_0x2dfd('0x2'));var express=require('express');var router=express[_0x2dfd('0x3')]();var fs_extra=require(_0x2dfd('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x2dfd('0x5'));var controller=require(_0x2dfd('0x6'));router[_0x2dfd('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x2dfd('0x7')](_0x2dfd('0x8'),auth[_0x2dfd('0x9')](),controller['describe']);router[_0x2dfd('0x7')](_0x2dfd('0xa'),auth[_0x2dfd('0x9')](),controller[_0x2dfd('0xb')]);router[_0x2dfd('0x7')](_0x2dfd('0xc'),auth['isAuthenticated'](),controller[_0x2dfd('0xd')]);router[_0x2dfd('0xe')]('/',auth[_0x2dfd('0x9')](),controller[_0x2dfd('0xf')]);router[_0x2dfd('0xe')](_0x2dfd('0xc'),auth['isAuthenticated'](),controller['addContacts']);router[_0x2dfd('0x10')]('/:id',auth[_0x2dfd('0x9')](),controller[_0x2dfd('0x11')]);router[_0x2dfd('0x12')](_0x2dfd('0xa'),auth[_0x2dfd('0x9')](),controller[_0x2dfd('0x13')]);module[_0x2dfd('0x14')]=router;
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js
index dcd2b4a..1524792 100644
--- a/server/api/cmContact/cmContact.attributes.js
+++ b/server/api/cmContact/cmContact.attributes.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0xc509=['lodash','sequelize','exports','STRING','INTEGER','UNSIGNED','DATE'];(function(_0x5871a3,_0x5e9b24){var _0x52b7a9=function(_0x1fe38c){while(--_0x1fe38c){_0x5871a3['push'](_0x5871a3['shift']());}};_0x52b7a9(++_0x5e9b24);}(_0xc509,0x188));var _0x9c50=function(_0x788728,_0xeb5e4e){_0x788728=_0x788728-0x0;var _0x46bd2b=_0xc509[_0x788728];return _0x46bd2b;};'use strict';var _=require(_0x9c50('0x0'));var Sequelize=require(_0x9c50('0x1'));module[_0x9c50('0x2')]={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize[_0x9c50('0x3')]},'street':{'type':Sequelize[_0x9c50('0x3')]},'postalCode':{'type':Sequelize[_0x9c50('0x3')]},'city':{'type':Sequelize[_0x9c50('0x3')]},'country':{'type':Sequelize[_0x9c50('0x3')]},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize[_0x9c50('0x3')]},'mobile':{'type':Sequelize[_0x9c50('0x3')]},'fax':{'type':Sequelize[_0x9c50('0x3')]},'email':{'type':Sequelize[_0x9c50('0x3')]},'url':{'type':Sequelize[_0x9c50('0x3')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize[_0x9c50('0x3')]},'skype':{'type':Sequelize[_0x9c50('0x3')]},'teams':{'type':Sequelize[_0x9c50('0x3')]},'viber':{'type':Sequelize[_0x9c50('0x3')]},'line':{'type':Sequelize[_0x9c50('0x3')]},'wechat':{'type':Sequelize[_0x9c50('0x3')]},'telegram':{'type':Sequelize['STRING']},'UserId':{'type':Sequelize[_0x9c50('0x4')]},'AdditionalPhones':{'type':Sequelize[_0x9c50('0x3')]},'priority':{'type':Sequelize[_0x9c50('0x4')](0x2)[_0x9c50('0x5')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x9c50('0x6')],'defaultValue':Sequelize['NOW']},'dialTimezone':{'type':Sequelize['STRING']},'utcOffset':{'type':Sequelize[_0x9c50('0x4')]}};
\ No newline at end of file
+var _0x817d=['sequelize','STRING','TEXT','INTEGER','UNSIGNED'];(function(_0x1347f8,_0x233feb){var _0x218368=function(_0x3f4ca3){while(--_0x3f4ca3){_0x1347f8['push'](_0x1347f8['shift']());}};_0x218368(++_0x233feb);}(_0x817d,0x13b));var _0xd817=function(_0x26cc5e,_0x3c4b40){_0x26cc5e=_0x26cc5e-0x0;var _0x220b28=_0x817d[_0x26cc5e];return _0x220b28;};'use strict';var _=require('lodash');var Sequelize=require(_0xd817('0x0'));module['exports']={'firstName':{'type':Sequelize[_0xd817('0x1')],'allowNull':![]},'lastName':{'type':Sequelize[_0xd817('0x1')]},'street':{'type':Sequelize[_0xd817('0x1')]},'postalCode':{'type':Sequelize[_0xd817('0x1')]},'city':{'type':Sequelize[_0xd817('0x1')]},'country':{'type':Sequelize[_0xd817('0x1')]},'dateOfBirth':{'type':Sequelize[_0xd817('0x1')]},'description':{'type':Sequelize[_0xd817('0x2')]},'phone':{'type':Sequelize[_0xd817('0x1')]},'mobile':{'type':Sequelize[_0xd817('0x1')]},'fax':{'type':Sequelize[_0xd817('0x1')]},'email':{'type':Sequelize['STRING']},'url':{'type':Sequelize[_0xd817('0x1')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize[_0xd817('0x1')]},'twitter':{'type':Sequelize[_0xd817('0x1')]},'skype':{'type':Sequelize[_0xd817('0x1')]},'teams':{'type':Sequelize[_0xd817('0x1')]},'viber':{'type':Sequelize[_0xd817('0x1')]},'line':{'type':Sequelize['STRING']},'wechat':{'type':Sequelize[_0xd817('0x1')]},'telegram':{'type':Sequelize[_0xd817('0x1')]},'UserId':{'type':Sequelize[_0xd817('0x3')]},'AdditionalPhones':{'type':Sequelize[_0xd817('0x1')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0xd817('0x4')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':Sequelize['NOW']},'dialTimezone':{'type':Sequelize[_0xd817('0x1')]},'utcOffset':{'type':Sequelize[_0xd817('0x3')]}};
\ No newline at end of file
diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js
index 5257ab5..8f133f5 100644
--- a/server/api/cmContact/cmContact.controller.js
+++ b/server/api/cmContact/cmContact.controller.js
@@ -15,4 +15,4 @@
// * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
// * *
// *************************************************************************
-var _0x29d9=['VoiceCallReport','ChatQueueReport','FaxQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappInteraction','WhatsappQueueReport','join','isNil','dialTimezone','utcOffset','timezones','additionalPhones','bulkCreate','each','duplicates','where','$or','spread','contact','show','color','tag','Phones','ItemType','sequelize','literal','Phones.OrderBy','ListId','push','omit','map','format','cf_%d','$and','isEmpty','table','cm_contacts','setFields','toParam','text','values','phone','getTags','findOne','model','Tag','rawAttributes','filters','intersection','attributes','fields','order','sort','pick','filter','options','nolimit','setTags','ids','all','ContactItemType','OrderBy','items','item_types','ItemTypeId','description','CmContactHasItem','contact\x20phone\x20exists','PHONE','item','`ItemType`.OrderBy','ItemType.OrderBy','CmHopperAdditionalPhone','getAdditionalPhones','duplicateAdditionalPhones','fromContactId','CmContactId','toContactId','rescheduleAdditionalPhones','hopperId','getHoppers','merge','includeAll','include','rows','getHopperHistories','ContactId','getHopperFinals','getJscriptySessions','uploadCsv','No\x20ListId\x20specified','binding_keys','No\x20association\x20values\x20specified!','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','split','binding_values','Incorrect\x20binding\x20parameters\x20passed!','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','file','chmodSync','0777','../../components/import/cm/csv','CompanyId','socket_timestamp','File\x20uploaded\x20correctly!','upload','User','agent','binding','fork','../../components/import/cm/csv2','stringify','message','start\x20child\x20process\x20correctly!','pid','exit','error\x20child\x20process','child_process','../../components/import/cm/csvUpdates','getJourney','mail','chat','sms','openchannel','fax','whatsapp','-createdAt','resolve','channel','includes','toLowerCase','Invalid\x20channel','range','parse','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','Invalid\x20date\x20for\x20range\x20to\x20filter','Invalid\x20createdAt\x20filter','source','destination','starttime','endtime','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','DESC','findAndCountAll','startCase','Account','closed','disposition','secondDisposition','Owner','customerIp','customerPort','deviceModel','osName','ratingMessage','ratingType','referer','subject','substatus','externalUrl','threadId','flatten','sortBy','reverse','slice','moment','util','path','papaparse','ioredis','../../config/logger','api','../../config/environment/shared','redis','localhost','./cmContact.socket','register','status','json','offset','limit','undefined','count','set','Content-Range','update','then','end','error','stack','name','send','index','findAll','user','catch','CmContact','find','params','describe','tags','keys','startsWith','cf_','columnName','displayName','query','analytics','CmCustomField','length','alias','custom','type','info','Custom\x20field\x20%s\x20not\x20found\x20on\x20cm_contacts\x20table','hasOwnProperty','body','from','get','isArray','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','destroy','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatMessage','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','SmsMessage','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmHopperFinal','CmHopperHistory'];(function(_0x59da69,_0x4b0c79){var _0x55c515=function(_0x47d83a){while(--_0x47d83a){_0x59da69['push'](_0x59da69['shift']());}};_0x55c515(++_0x4b0c79);}(_0x29d9,0xb2));var _0x929d=function(_0x38c5c6,_0x459b80){_0x38c5c6=_0x38c5c6-0x0;var _0x2e56d2=_0x29d9[_0x38c5c6];return _0x2e56d2;};'use strict';var moment=require(_0x929d('0x0'));var BPromise=require('bluebird');var util=require(_0x929d('0x1'));var path=require(_0x929d('0x2'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var Papa=require(_0x929d('0x3'));var Redis=require(_0x929d('0x4'));var contacts=require('../../components/contacts');var qs=require('../../components/parsers/qs');var logger=require(_0x929d('0x5'))(_0x929d('0x6'));var config=require('../../config/environment');var shared=require(_0x929d('0x7'));var db=require('../../mysqldb')['db'];config[_0x929d('0x8')]=_['defaults'](config[_0x929d('0x8')],{'host':_0x929d('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x929d('0x8')]));require(_0x929d('0xa'))[_0x929d('0xb')](socket);function respondWithResult(_0x11a4de,_0x4f672f){_0x4f672f=_0x4f672f||0xc8;return function(_0x2306ca){if(_0x2306ca){return _0x11a4de[_0x929d('0xc')](_0x4f672f)[_0x929d('0xd')](_0x2306ca);}};}function respondWithFilteredResult(_0x4fd9b9,_0x1497ae){return function(_0x3997c3){if(_0x3997c3){var _0x489a21=typeof _0x1497ae[_0x929d('0xe')]==='undefined'&&typeof _0x1497ae[_0x929d('0xf')]===_0x929d('0x10');var _0x161ce8=_0x3997c3[_0x929d('0x11')];var _0x2cb95c=_0x489a21?0x0:_0x1497ae[_0x929d('0xe')];var _0x4ce15b=_0x489a21?_0x3997c3[_0x929d('0x11')]:_0x1497ae[_0x929d('0xe')]+_0x1497ae['limit'];var _0x210fbd;if(_0x4ce15b>=_0x161ce8){_0x4ce15b=_0x161ce8;_0x210fbd=0xc8;}else{_0x210fbd=0xce;}_0x4fd9b9[_0x929d('0xc')](_0x210fbd);return _0x4fd9b9[_0x929d('0x12')](_0x929d('0x13'),_0x2cb95c+'-'+_0x4ce15b+'/'+_0x161ce8)['json'](_0x3997c3);}return null;};}function saveUpdates(_0xcca929){return function(_0x33d3d9){if(_0x33d3d9){return _0x33d3d9[_0x929d('0x14')](_0xcca929)['then'](function(_0x13fac5){return _0x13fac5;});}return null;};}function removeEntity(_0x1cd900){return function(_0x30cb55){if(_0x30cb55){return _0x30cb55['destroy']()[_0x929d('0x15')](function(){_0x1cd900['status'](0xcc)[_0x929d('0x16')]();});}};}function handleEntityNotFound(_0x4d593e){return function(_0x26095e){if(!_0x26095e){_0x4d593e['sendStatus'](0x194);}return _0x26095e;};}function handleError(_0x486034,_0x56ac4f){_0x56ac4f=_0x56ac4f||0x1f4;return function(_0x317417){logger[_0x929d('0x17')](_0x317417[_0x929d('0x18')]);if(_0x317417['name']){delete _0x317417[_0x929d('0x19')];}_0x486034[_0x929d('0xc')](_0x56ac4f)[_0x929d('0x1a')](_0x317417);};}exports[_0x929d('0x1b')]=function(_0x2bcb7a,_0x175660){var _0x5e10d6={};return contacts['describe']()[_0x929d('0x15')](function(_0x6d1f56){_0x5e10d6=qs['getOptions'](_0x6d1f56,_0x2bcb7a);return contacts[_0x929d('0x1c')](_0x2bcb7a['query'],_0x2bcb7a[_0x929d('0x1d')],_0x5e10d6,_0x6d1f56);})[_0x929d('0x15')](respondWithFilteredResult(_0x175660,_0x5e10d6))[_0x929d('0x1e')](handleError(_0x175660,null));};exports['destroy']=function(_0x5c8908,_0x391a2c){return db[_0x929d('0x1f')][_0x929d('0x20')]({'where':{'id':_0x5c8908[_0x929d('0x21')]['id']}})[_0x929d('0x15')](handleEntityNotFound(_0x391a2c,null))[_0x929d('0x15')](removeEntity(_0x391a2c,null))['catch'](handleError(_0x391a2c,null));};exports[_0x929d('0x22')]=function(_0x3bce7b,_0x2f64f9){return db[_0x929d('0x1f')][_0x929d('0x22')]()[_0x929d('0x15')](function(_0x30883a){delete _0x30883a[_0x929d('0x23')];for(var _0x2b8214=0x0;_0x2b8214
','generateXOAuth2Token','user=','utf-8','toString','base64','lodash','moment','randomstring','util','node-tnef','../../../config/logger','head','address','anonymous','generate','value','name','indexOf','split','length','slice','join','isEmpty','@xcally.com','html','test'];(function(_0x2718c7,_0x5a1636){var _0x59d89c=function(_0x4d4f49){while(--_0x4d4f49){_0x2718c7['push'](_0x2718c7['shift']());}};_0x59d89c(++_0x5a1636);}(_0x6f49,0x18f));var _0x96f4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6f49[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x96f4('0x0'));var moment=require(_0x96f4('0x1'));var random=require(_0x96f4('0x2'));var fs=require('fs');var path=require('path');var util=require(_0x96f4('0x3'));var tnef=require(_0x96f4('0x4'));var logger=require(_0x96f4('0x5'))('email');var config=require('../../../config/environment');function getAddress(_0xe512df){var _0x45d8d1=_[_0x96f4('0x6')](_0xe512df['value']);return _0x45d8d1&&_0x45d8d1['address']?_0x45d8d1[_0x96f4('0x7')]:_0x96f4('0x8')+random[_0x96f4('0x9')](0x6)+'@xcally.com';}function getFirstName(_0x42aced){var _0x3ea670=_[_0x96f4('0x6')](_0x42aced[_0x96f4('0xa')]);if(_0x3ea670&&_0x3ea670['name']){if(_0x3ea670[_0x96f4('0xb')]==_0x3ea670['address']){return _0x3ea670[_0x96f4('0xb')]['substring'](0x0,_0x3ea670[_0x96f4('0xb')][_0x96f4('0xc')]('@'));}var _0x33221f=_0x3ea670[_0x96f4('0xb')][_0x96f4('0xd')](/\s+/);return _0x33221f[_0x96f4('0xe')]>0x1?_0x33221f[_0x96f4('0xf')](0x0,-0x1)[_0x96f4('0x10')]('\x20'):_0x3ea670[_0x96f4('0xb')];}return'Anonymous';}function getLastName(_0x253807){var _0x1c6d28=_[_0x96f4('0x6')](_0x253807[_0x96f4('0xa')]);if(_0x1c6d28&&_0x1c6d28[_0x96f4('0xb')]){var _0x3e7316=_0x1c6d28[_0x96f4('0xb')][_0x96f4('0xd')](/\s+/);return _0x3e7316['length']>0x1?_0x3e7316['pop']():'';}return'';}function getMails(_0x451d3d,_0x4ab719){var _0x3b30c2='';for(var _0x531197=0x0;_0x531197<_0x4ab719[_0x96f4('0xa')][_0x96f4('0xe')];_0x531197+=0x1){if(_0x4ab719[_0x96f4('0xa')][_0x531197][_0x96f4('0x7')]!==_0x451d3d){if(!_[_0x96f4('0x11')](_0x3b30c2)){_0x3b30c2+=',';}_0x3b30c2+=_0x4ab719[_0x96f4('0xa')][_0x531197][_0x96f4('0xb')]||_0x4ab719[_0x96f4('0xa')][_0x531197][_0x96f4('0x7')]||'';_0x3b30c2+='\x20<';_0x3b30c2+=_0x4ab719[_0x96f4('0xa')][_0x531197][_0x96f4('0x7')]?_0x4ab719[_0x96f4('0xa')][_0x531197][_0x96f4('0x7')]:_0x96f4('0x8')+random[_0x96f4('0x9')](0x6)+_0x96f4('0x12');_0x3b30c2+='>';}}return _0x3b30c2;}function parseEmail(_0x1baf3b,_0x1b8f4d,_0x3a57a4){if(_0x1b8f4d[_0x96f4('0x13')]){var _0x3c332b=/