Built motion from commit e1cfd85d6.|1.0.31
[motion.git] / server / config / integrations / freshdesk.js
index 6409b0b..787aa6e 100644 (file)
@@ -1 +1 @@
-var _0xc557=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x61\x70\x69\x4B\x65\x79","\x3A\x58","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65\x20","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x73\x20\x66\x6F\x75\x6E\x64\x20\x28","\x29\x2E\x20\x46\x69\x6E\x64\x20\x77\x69\x74\x68\x20\x6E\x61\x6D\x65\x3A\x20","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6D\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x3F\x70\x68\x6F\x6E\x65\x3D","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x20\x77\x69\x74\x68\x20\x6D\x6F\x62\x69\x6C\x65\x20","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x3F\x6D\x6F\x62\x69\x6C\x65\x3D","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x20\x28\x70\x68\x6F\x6E\x65\x29\x3A\x20","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x28\x70\x68\x6F\x6E\x65\x29\x3A\x20","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x72\x65\x61\x74\x65\x20\x6E\x65\x77\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20","\x64\x65\x62\x75\x67","\x50\x4F\x53\x54","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x70\x68\x6F\x6E\x65","\x6D\x6F\x62\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x25\x73\x2E\x20\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x66\x72\x6F\x6D\x20\x4D\x6F\x74\x69\x6F\x6E\x2E","\x65\x6D\x61\x69\x6C","\x25\x73\x40\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6D","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x72\x65\x61\x74\x65\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x77\x69\x74\x68\x20\x69\x64\x20\x20","\x72\x65\x73\x70\x6F\x6E\x64\x65\x72\x5F\x69\x64","\x72\x65\x71\x75\x65\x73\x74\x65\x72\x5F\x69\x64","\x73\x6F\x75\x72\x63\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x73\x74\x61\x74\x75\x73","\x73\x75\x62\x6A\x65\x63\x74","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72\x20","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x74\x61\x67\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x74\x69\x63\x6B\x65\x74\x73","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x3C\x62\x72\x3E","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x54\x61\x67\x73","\x6D\x61\x70","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x75\x72\x6C","\x2F\x68\x65\x6C\x70\x64\x65\x73\x6B\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x74\x6F","\x63\x72\x65\x61\x74\x65","\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A\x20","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x5E\x5C\x2F\x7C\x5C\x2F\x24","\x67","\x63\x61\x6C\x6C","\x73\x6C\x69\x63\x65","\x72\x65\x70\x6C\x61\x63\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc557[0];var _=require(_0xc557[1]);var util=require(_0xc557[2]);var moment=require(_0xc557[3]);var rp=require(_0xc557[4]);var logger=require(_0xc557[6])(_0xc557[5]);var FreshdeskIntegration=require(_0xc557[8])[_0xc557[7]];var IntConfiguration=require(_0xc557[8])[_0xc557[9]];var ReportIntegration=require(_0xc557[8])[_0xc557[10]];var VoiceQueue=require(_0xc557[8])[_0xc557[11]];var VoiceExtension=require(_0xc557[8])[_0xc557[12]];var Agent=require(_0xc557[8])[_0xc557[13]];function Freshdesk(){logger[_0xc557[15]](_0xc557[14])}Freshdesk[_0xc557[17]][_0xc557[16]]= function(_0x122exd,_0x122exe,_0x122exf,_0x122ex10,_0x122ex11,_0x122ex12,_0x122ex13){var _0x122ex14={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,ticketId:undefined,recordEnable:false,serverUrl:undefined};if(!_0x122exd||  !_0x122exe){logger[_0xc557[19]](_0xc557[18]);return};IntConfiguration[_0xc557[22]]({where:{id:_0x122exe,AccountId:_0x122exd},include:[{all:true,include:[{all:true}]}]})[_0xc557[21]](handleEntityNotFound())[_0xc557[21]](handleConnection(_0x122ex14))[_0xc557[21]](searchMotionAgent(_0x122exf,_0x122ex11))[_0xc557[21]](handleMotionAgent(_0x122ex14))[_0xc557[21]](searchQueue(_0x122ex11))[_0xc557[21]](handleQueueRecordings(_0x122ex14,_0x122ex11))[_0xc557[21]](searchRoute(_0x122ex11))[_0xc557[21]](handleOutboundRecordings(_0x122ex14,_0x122ex11))[_0xc557[21]](searchAgent(_0x122ex14))[_0xc557[21]](handleAgent(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10))[_0xc557[21]](searchAdmin(_0x122ex14))[_0xc557[21]](handleAdmin(_0x122ex14))[_0xc557[21]](searchContact(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10))[_0xc557[21]](searchContactMobile(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10))[_0xc557[21]](handleContact(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10))[_0xc557[21]](createContact(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10))[_0xc557[21]](handleCreateContact(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10))[_0xc557[21]](ticketCreation(_0x122ex14,_0x122ex11,_0x122ex12,_0x122exf,_0x122ex10))[_0xc557[21]](handleTicketDisplay(_0x122ex14))[_0xc557[21]](handleReportIntegration(_0x122ex14,_0x122exf,_0x122ex11,_0x122exd,_0x122ex13,_0x122ex10))[_0xc557[21]](handleEnd(_0x122ex14))[_0xc557[20]](handleError(_0x122ex14,_0x122exf,_0x122ex11,_0x122exd))};function handleEntityNotFound(){return function(_0x122ex16){return _0x122ex16?_0x122ex16:null}}function handleConnection(_0x122ex14){return function(_0x122ex18){var _0x122ex19=getAccountConfiguration(_0x122ex18.FreshdeskAccount);_0x122ex14[_0xc557[23]]= _0x122ex18;_0x122ex14[_0xc557[24]]= _0x122ex19[_0xc557[24]];_0x122ex14[_0xc557[25]]= _0x122ex19[_0xc557[25]];_0x122ex14[_0xc557[26]]= _0x122ex18[_0xc557[28]][_0xc557[27]][_0xc557[26]];_0x122ex14[_0xc557[29]]= _0x122ex18[_0xc557[27]][_0xc557[29]]}}function getAccountConfiguration(_0x122ex1b){var _0x122ex1c={uri:stripTrailingSlash(_0x122ex1b[_0xc557[30]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc557[31],"\x41\x63\x63\x65\x70\x74":_0xc557[31]}};_0x122ex1c[_0xc557[25]][_0xc557[32]]= _0xc557[33]+  new Buffer(_0x122ex1b[_0xc557[35]]+ _0xc557[36]).toString(_0xc557[34]);return _0x122ex1c}function searchMotionAgent(_0x122exf,_0x122ex11){return function(){var _0x122ex1e=getAgentSearchPropertyFromChannel(_0x122exf);if(_0x122ex11[_0xc557[37]](_0x122ex1e)){return Agent[_0xc557[41]](_0xc557[40])[_0xc557[39]]({where:{name:getValueFromPropertyName(_0x122ex11,_0x122ex1e)},attributes:[_0xc557[38]]})};return}}function handleMotionAgent(_0x122ex14){return function(_0x122ex20){if(_0x122ex20&& _0x122ex20[_0xc557[38]]){_0x122ex14[_0xc557[42]]= _0x122ex20[_0xc557[38]]};return}}function searchQueue(_0x122ex11){return function(){if(_0x122ex11[_0xc557[43]]){return VoiceQueue[_0xc557[39]]({where:{name:_0x122ex11[_0xc557[43]]},attributes:[_0xc557[44],_0xc557[45]]})}else {return}}}function handleQueueRecordings(_0x122ex14,_0x122ex11){return function(_0x122ex23){if(_0x122ex11[_0xc557[43]]){if(_0x122ex23&& _0x122ex23[_0xc557[45]]){logger[_0xc557[15]](_0xc557[46]+ _0x122ex23[_0xc557[44]]);_0x122ex14[_0xc557[47]]= true}else {_0x122ex14[_0xc557[47]]= false;logger[_0xc557[15]](_0xc557[48])}};return}}function searchRoute(_0x122ex11){return function(){if(_0x122ex11[_0xc557[49]]){return VoiceExtension[_0xc557[39]]({where:{id:_0x122ex11[_0xc557[49]]},attributes:[_0xc557[50],_0xc557[51]]})}else {return}}}function handleOutboundRecordings(_0x122ex14,_0x122ex11){return function(_0x122ex26){if(_0x122ex11[_0xc557[49]]){if(_0x122ex26&& _0x122ex26[_0xc557[51]]){logger[_0xc557[15]](_0xc557[52]+ _0x122ex26[_0xc557[50]]);_0x122ex14[_0xc557[47]]= true}else {_0x122ex14[_0xc557[47]]= false;logger[_0xc557[15]](_0xc557[53])}};return}}function searchAgent(_0x122ex14){return function(){if(_0x122ex14[_0xc557[42]]){return rp({uri:join_url(_0x122ex14[_0xc557[24]],_0xc557[54]),headers:_0x122ex14[_0xc557[25]],json:true})}};return}function getAgentSearchPropertyFromChannel(_0x122exf){var _0x122ex29=_0xc557[55];if(_0x122exf){switch(_0x122exf){case _0xc557[57]:_0x122ex29= _0xc557[56];break;default:_0x122ex29= _0xc557[56];logger[_0xc557[19]](_0xc557[58]+ _0x122exf)}};return _0x122ex29}function getValueFromPropertyName(_0x122ex11,_0x122ex29,_0x122ex14){if(_0x122ex29=== _0xc557[59]){if(_0x122ex14&& _0x122ex14[_0xc557[47]]&& _0x122ex14[_0xc557[26]]){return util[_0xc557[62]](_0xc557[60],stripTrailingSlash(_0x122ex14[_0xc557[26]]),_0x122ex11[_0xc557[61]])}else {return null}}else {return _[_0xc557[63]](_0x122ex11,_0x122ex29)}}function handleAgent(_0x122ex14,_0x122exf,_0x122ex2c,_0x122ex10){return function(_0x122ex11){if(_0x122ex11&& _0x122ex11[_0xc557[64]]> 0){logger[_0xc557[15]](_0xc557[65]+ _0x122ex11[_0xc557[64]]+ _0xc557[66]+ _0x122ex14[_0xc557[42]]);_0x122ex14[_0xc557[40]]= getMatchObject(_0x122ex11,_0xc557[44],_0x122ex14[_0xc557[42]]);return _0x122ex14[_0xc557[40]]}else {logger[_0xc557[15]](_0xc557[67]);return}}}function getMatchObject(_0x122ex2e,_0x122ex29,_0x122ex2f){var _0x122ex30=_[_0xc557[22]](_0x122ex2e,function(_0x122ex31){if(_0x122ex31[_0xc557[68]][_0x122ex29]=== _0x122ex2f){return _0x122ex31}});return _0x122ex30}function searchAdmin(_0x122ex14){return function(){if(_0x122ex14[_0xc557[40]]){return};logger[_0xc557[15]](_0xc557[69]+ _0x122ex14[_0xc557[42]]+ _0xc557[70]);return rp({uri:join_url(_0x122ex14[_0xc557[24]],_0xc557[71]),headers:_0x122ex14[_0xc557[25]],json:true})}}function handleAdmin(_0x122ex14){return function(_0x122ex11){if(!_0x122ex11){return};_0x122ex14[_0xc557[40]]= _0x122ex11;return _0x122ex14[_0xc557[40]]}}function searchContact(_0x122ex14,_0x122exf,_0x122ex11,_0x122ex10){return function(){var _0x122ex35=getValueFromPropertyName(_0x122ex11,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10),_0x122ex14);logger[_0xc557[15]](_0xc557[72]+ _0x122ex35);return rp({uri:join_url(_0x122ex14[_0xc557[24]],_0xc557[73]+ _0x122ex35),headers:_0x122ex14[_0xc557[25]],json:true})}}function searchContactMobile(_0x122ex14,_0x122exf,_0x122ex2c,_0x122ex10){return function(_0x122ex11){if(_0x122ex11&& _0x122ex11[_0xc557[64]]> 0){return _0x122ex11};var _0x122ex37=getValueFromPropertyName(_0x122ex2c,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10),_0x122ex14);logger[_0xc557[15]](_0xc557[74]+ _0x122ex37);return rp({uri:join_url(_0x122ex14[_0xc557[24]],_0xc557[75]+ _0x122ex37),headers:_0x122ex14[_0xc557[25]],json:true})}}function getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10){var _0x122ex29=_0xc557[55];if(_0x122exf){switch(_0x122exf){case _0xc557[57]:if(_0x122ex10=== _0xc557[76]){_0x122ex29= _0xc557[77]}else {if(_0x122ex10=== _0xc557[43]){_0x122ex29= _0xc557[78]}};break;default:_0x122ex29= _0xc557[78];logger[_0xc557[19]](_0xc557[58]+ _0x122exf)}};return _0x122ex29}function getEndUserNamePropertyFromChannel(_0x122exf,_0x122ex10){var _0x122ex29=_0xc557[55];if(_0x122exf){switch(_0x122exf){case _0xc557[57]:if(_0x122ex10=== _0xc557[76]){_0x122ex29= _0xc557[79]}else {if(_0x122ex10=== _0xc557[43]){_0x122ex29= _0xc557[80]}};break;default:_0x122ex29= _0xc557[80];logger[_0xc557[19]](_0xc557[58]+ _0x122exf)}};return _0x122ex29}function handleContact(_0x122ex14,_0x122exf,_0x122ex2c,_0x122ex10){return function(_0x122ex11){if(!_0x122ex11){return};var _0x122ex3b=getValueFromPropertyName(_0x122ex2c,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10));if(_0x122ex11[_0xc557[64]]> 0){logger[_0xc557[15]](_0xc557[81]+ _0x122ex3b);_0x122ex14[_0xc557[82]]= _0x122ex11[0];return _0x122ex14[_0xc557[82]]};logger[_0xc557[15]](_0xc557[83]+ _0x122ex3b);return}}function createContact(_0x122ex14,_0x122exf,_0x122ex2c,_0x122ex10){return function(_0x122ex11){if(!_0x122ex11){logger[_0xc557[15]](_0xc557[84]+ getValueFromPropertyName(_0x122ex2c,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10)));logger[_0xc557[85]](getJsonForContactCreation(_0x122exf,_0x122ex2c,_0x122ex10));var _0x122ex3d={method:_0xc557[86],uri:join_url(_0x122ex14[_0xc557[24]],_0xc557[87]),headers:_0x122ex14[_0xc557[25]],body:getJsonForContactCreation(_0x122exf,_0x122ex2c,_0x122ex10),json:true};return rp(_0x122ex3d)};return}}function getJsonForContactCreation(_0x122exf,_0x122ex11,_0x122ex10){var _0x122ex3f={};switch(_0x122exf){case _0xc557[57]:if(_0x122ex10=== _0xc557[43]){if(isValidName(_0x122ex11[_0xc557[80]])){_0x122ex3f[_0xc557[44]]= getValueFromPropertyName(_0x122ex11,getEndUserNamePropertyFromChannel(_0x122exf,_0x122ex10))}else {_0x122ex3f[_0xc557[44]]= util[_0xc557[62]](_0xc557[88],getValueFromPropertyName(_0x122ex11,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10)))}}else {if(_0x122ex10=== _0xc557[76]){if(isValidName(_0x122ex11[_0xc557[79]])){_0x122ex3f[_0xc557[44]]= getValueFromPropertyName(_0x122ex11,getEndUserNamePropertyFromChannel(_0x122exf,_0x122ex10))}else {_0x122ex3f[_0xc557[44]]= util[_0xc557[62]](_0xc557[88],getValueFromPropertyName(_0x122ex11,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10)))}}};_0x122ex3f[_0xc557[89]]= getValueFromPropertyName(_0x122ex11,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10));_0x122ex3f[_0xc557[90]]= getValueFromPropertyName(_0x122ex11,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10));_0x122ex3f[_0xc557[91]]= util[_0xc557[62]](_0xc557[92],getValueFromPropertyName(_0x122ex11,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10)));_0x122ex3f[_0xc557[93]]= util[_0xc557[62]](_0xc557[94],getValueFromPropertyName(_0x122ex11,_0xc557[61]));break;default:console[_0xc557[19]](_0xc557[95],_0x122exf)};return _0x122ex3f}function isValidName(_0x122ex41){return _0x122ex41&& _0x122ex41!== _0xc557[96]}function handleCreateContact(_0x122ex14,_0x122exf,_0x122ex2c,_0x122ex10){return function(_0x122ex11){if(_0x122ex11){_0x122ex14[_0xc557[82]]= _0x122ex11};return}}function ticketCreation(_0x122ex14,_0x122ex2c,_0x122ex12,_0x122exf,_0x122ex10){return function(){logger[_0xc557[15]](_0xc557[97]+ _0x122ex14[_0xc557[82]][_0xc557[50]]);var _0x122ex41=util[_0xc557[62]](_0xc557[88],getValueFromPropertyName(_0x122ex2c,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10)));var _0x122ex35=getValueFromPropertyName(_0x122ex2c,getEndUserSearchPropertyFromChannel(_0x122exf,_0x122ex10));var _0x122ex44={};_0x122ex44[_0xc557[98]]= _0x122ex14[_0xc557[40]][_0xc557[50]];_0x122ex44[_0xc557[99]]= _0x122ex14[_0xc557[82]][_0xc557[50]];_0x122ex44[_0xc557[44]]= (_0x122ex41|| _0x122ex35);_0x122ex44[_0xc557[89]]= (_0x122ex35|| _0x122ex41);_0x122ex44[_0xc557[100]]= 3;_0x122ex44[_0xc557[101]]= 1;_0x122ex44[_0xc557[102]]= 2;_0x122ex44[_0xc557[103]]= createSubjectFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12);if(!_0x122ex44[_0xc557[103]]){_0x122ex44[_0xc557[103]]= _0xc557[104]+ (_0x122ex35|| _0x122ex41)};_0x122ex44[_0xc557[91]]= createDescriptionFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12);if(!_0x122ex44[_0xc557[91]]){_0x122ex44[_0xc557[91]]= _0xc557[104]+ (_0x122ex35|| _0x122ex41)};var _0x122ex45=createFieldsFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12);if(_0x122ex45[_0xc557[64]]> 0){_[_0xc557[106]](_0x122ex45,function(_0x122ex46){_0x122ex44[_0x122ex46[_0xc557[50]]]= _0x122ex46[_0xc557[105]]})};var _0x122ex47=createCustomFieldsFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12);if(_0x122ex47[_0xc557[64]]> 0){_0x122ex44[_0xc557[107]]= {};_[_0xc557[106]](_0x122ex47,function(_0x122ex46){var _0x122ex48=_0x122ex46[_0xc557[50]];_0x122ex44[_0xc557[107]][_0x122ex48]= _0x122ex46[_0xc557[105]]})};var _0x122ex49=createTagsFromConfiguration(_0x122ex14);if(_0x122ex49[_0xc557[64]]> 0){_0x122ex44[_0xc557[108]]= _0x122ex49};logger[_0xc557[85]](_0x122ex44);var _0x122ex3d={method:_0xc557[86],uri:join_url(_0x122ex14[_0xc557[24]],_0xc557[109]),headers:_0x122ex14[_0xc557[25]],body:_0x122ex44,json:true};return rp(_0x122ex3d)}}function createSubjectFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12){var _0x122ex4b=_0xc557[55];var _0x122ex4c=[];if(_0x122ex14[_0xc557[23]][_0xc557[110]][_0xc557[64]]> 0){var _0x122ex4d=_[_0xc557[111]](_0x122ex14[_0xc557[23]].Subject,[_0xc557[50]]);_[_0xc557[106]](_0x122ex4d,function(_0x122ex4e){if(_0x122ex4e[_0xc557[112]]=== _0xc557[113]){_0x122ex4c[_0xc557[115]](_0x122ex4e[_0xc557[114]])}else {if(_0x122ex4e[_0xc557[112]]=== _0xc557[116]&& _0x122ex4e[_0xc557[117]]){var _0x122ex3b=getValueFromPropertyName(_0x122ex2c,_0x122ex4e[_0xc557[117]],_0x122ex14);if(_0x122ex3b){_0x122ex4c[_0xc557[115]](_0x122ex3b.toString())}}else {if(_0x122ex4e[_0xc557[112]]=== _0xc557[118]&& _0x122ex4e[_0xc557[119]]&& _0x122ex4e[_0xc557[119]][_0xc557[44]]){_0x122ex12[_0x122ex4e[_0xc557[119]][_0xc557[44]]]&& _0x122ex4c[_0xc557[115]](_0x122ex12[_0x122ex4e[_0xc557[119]][_0xc557[44]]].toString())}}}});_0x122ex4b= _0x122ex4c[_0xc557[121]](_0xc557[120])};return _0x122ex4b}function createDescriptionFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12){var _0x122ex50=_0xc557[55];var _0x122ex4c=[];if(_0x122ex14[_0xc557[23]][_0xc557[122]][_0xc557[64]]> 0){var _0x122ex51=_[_0xc557[111]](_0x122ex14[_0xc557[23]].Description,[_0xc557[50]]);_[_0xc557[106]](_0x122ex51,function(_0x122ex4e){if(_0x122ex4e[_0xc557[112]]=== _0xc557[113]){_0x122ex4c[_0xc557[115]](_0x122ex4e[_0xc557[114]])}else {if(_0x122ex4e[_0xc557[112]]=== _0xc557[123]){if(_0x122ex4e[_0xc557[124]]=== _0xc557[113]&& _0x122ex4e[_0xc557[125]]){_0x122ex4c[_0xc557[115]](util[_0xc557[62]](_0xc557[126],_0x122ex4e[_0xc557[125]],_0x122ex4e[_0xc557[127]]))}else {if(_0x122ex4e[_0xc557[124]]=== _0xc557[116]&& _0x122ex4e[_0xc557[117]]&& _0x122ex4e[_0xc557[125]]){var _0x122ex3b=getValueFromPropertyName(_0x122ex2c,_0x122ex4e[_0xc557[117]],_0x122ex14);if(_0x122ex3b){_0x122ex4c[_0xc557[115]](util[_0xc557[62]](_0xc557[126],_0x122ex4e[_0xc557[125]],_0x122ex3b.toString()))}}else {if(_0x122ex4e[_0xc557[124]]=== _0xc557[118]&& _0x122ex4e[_0xc557[119]]&& _0x122ex4e[_0xc557[119]][_0xc557[44]]&& _0x122ex4e[_0xc557[125]]){_0x122ex12[_0x122ex4e[_0xc557[119]][_0xc557[44]]]&& _0x122ex4c[_0xc557[115]](util[_0xc557[62]](_0xc557[126],_0x122ex4e[_0xc557[125]],_0x122ex12[_0x122ex4e[_0xc557[119]][_0xc557[44]]]))}}}}}});_0x122ex50= _0x122ex4c[_0xc557[121]](_0xc557[128])};return _0x122ex50}function createFieldsFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12){var _0x122ex45=[];var _0x122ex53=[];if(_0x122ex14[_0xc557[23]][_0xc557[129]][_0xc557[64]]> 0){_0x122ex45= _[_0xc557[130]](_0x122ex14[_0xc557[23]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xc557[106]](_0x122ex45,function(_0x122ex46){if(_0x122ex46[_0xc557[112]]=== _0xc557[113]&& _0x122ex46[_0xc557[131]]){_0x122ex53[_0xc557[115]]({id:_0x122ex46[_0xc557[131]],value:_0x122ex46[_0xc557[114]]})}else {if(_0x122ex46[_0xc557[112]]=== _0xc557[116]&& _0x122ex46[_0xc557[117]]&& _0x122ex46[_0xc557[131]]){var _0x122ex3b=getValueFromPropertyName(_0x122ex2c,_0x122ex46[_0xc557[117]],_0x122ex14);if(_0x122ex3b){_0x122ex53[_0xc557[115]]({id:_0x122ex46[_0xc557[131]],value:_0x122ex3b.toString()})}}else {if(_0x122ex46[_0xc557[112]]=== _0xc557[118]&& _0x122ex46[_0xc557[131]]&& _0x122ex46[_0xc557[119]]&& _0x122ex46[_0xc557[119]][_0xc557[44]]){_0x122ex12[_0x122ex46[_0xc557[119]][_0xc557[44]]]&& _0x122ex53[_0xc557[115]]({id:_0x122ex46[_0xc557[131]],value:_0x122ex12[_0x122ex46[_0xc557[119]][_0xc557[44]]].toString()})}}}})};return _0x122ex53}function createCustomFieldsFromConfiguration(_0x122ex14,_0x122ex2c,_0x122ex12){var _0x122ex47=[];var _0x122ex53=[];if(_0x122ex14[_0xc557[23]][_0xc557[129]][_0xc557[64]]> 0){_0x122ex47= _[_0xc557[130]](_0x122ex14[_0xc557[23]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xc557[106]](_0x122ex47,function(_0x122ex46){if(_0x122ex46[_0xc557[112]]=== _0xc557[113]&& _0x122ex46[_0xc557[131]]){_0x122ex53[_0xc557[115]]({id:_0x122ex46[_0xc557[131]],value:_0x122ex46[_0xc557[114]]})}else {if(_0x122ex46[_0xc557[112]]=== _0xc557[116]&& _0x122ex46[_0xc557[117]]&& _0x122ex46[_0xc557[131]]){var _0x122ex3b=getValueFromPropertyName(_0x122ex2c,_0x122ex46[_0xc557[117]],_0x122ex14);if(_0x122ex3b){_0x122ex53[_0xc557[115]]({id:_0x122ex46[_0xc557[131]],value:_0x122ex3b.toString()})}}else {if(_0x122ex46[_0xc557[112]]=== _0xc557[118]&& _0x122ex46[_0xc557[131]]&& _0x122ex46[_0xc557[119]]&& _0x122ex46[_0xc557[119]][_0xc557[44]]){_0x122ex12[_0x122ex46[_0xc557[119]][_0xc557[44]]]&& _0x122ex53[_0xc557[115]]({id:_0x122ex46[_0xc557[131]],value:_0x122ex12[_0x122ex46[_0xc557[119]][_0xc557[44]]].toString()})}}}})};return _0x122ex53}function createTagsFromConfiguration(_0x122ex14){var _0x122ex49=[];if(_0x122ex14[_0xc557[23]][_0xc557[132]][_0xc557[64]]> 0){_0x122ex49= _[_0xc557[133]](_0x122ex14[_0xc557[23]].Tags,_0xc557[44])};return _0x122ex49}function handleTicketDisplay(_0x122ex14){return function(_0x122ex11){if(_0x122ex11&& _0x122ex11[_0xc557[50]]){logger[_0xc557[15]](_0xc557[134]+ _0x122ex11[_0xc557[50]]);_0x122ex14[_0xc557[135]]= _0x122ex11[_0xc557[50]];return};return}}function handleReportIntegration(_0x122ex14,_0x122exf,_0x122ex11,_0x122exd,_0x122ex13,_0x122ex10){return function(){delete _0x122ex11[_0xc557[50]];_0x122ex11[_0xc557[136]]= _0xc557[137];_0x122ex11[_0xc557[138]]= _0x122exf;_0x122ex11[_0xc557[139]]= _0xc557[140];_0x122ex11[_0xc557[135]]= _0x122ex14[_0xc557[135]];_0x122ex11[_0xc557[141]]= _0x122exd;_0x122ex11[_0xc557[142]]= _0x122ex10;_0x122ex11[_0xc557[143]]= join_url(_0x122ex14[_0xc557[24]],_0xc557[144]+ _0x122ex14[_0xc557[135]]);_0x122ex13[_0xc557[148]](util[_0xc557[62]](_0xc557[147],_0x122ex11[_0xc557[56]]))[_0xc557[146]](_0xc557[145],_0x122ex11);return ReportIntegration[_0xc557[149]](_0x122ex11)}}function handleEnd(_0x122ex14,_0x122ex11,_0x122exf){return function(){logger[_0xc557[85]](util[_0xc557[62]](_0xc557[150],_0x122ex14[_0xc557[135]],_0x122ex14[_0xc557[40]][_0xc557[68]][_0xc557[44]]));_0x122ex14= undefined;return}}function handleDebug(_0x122ex14){return function(){logger[_0xc557[85]](_0x122ex14);return}}function handleError(_0x122ex14,_0x122exf,_0x122ex11,_0x122exd){return function(_0x122ex5b){logger[_0xc557[19]](_0xc557[151]);logger[_0xc557[19]](_0xc557[152]+ _0x122ex5b[_0xc557[153]]);logger[_0xc557[19]](_0xc557[154]+ _0x122ex5b[_0xc557[155]]);_0x122ex14= undefined;delete _0x122ex11[_0xc557[50]];_0x122ex11[_0xc557[136]]= _0xc557[137];_0x122ex11[_0xc557[138]]= _0x122exf;_0x122ex11[_0xc557[139]]= _0xc557[156];_0x122ex11[_0xc557[141]]= _0x122exd;ReportIntegration[_0xc557[149]](_0x122ex11)[_0xc557[21]](function(){return})[_0xc557[20]](function(_0x122ex5b){logger[_0xc557[19]](_0xc557[157]);return})}}function stripTrailingSlash(_0x122ex5d){if(_0x122ex5d[_0xc557[158]](-1) === _0xc557[159]){return _0x122ex5d[_0xc557[158]](0,_0x122ex5d[_0xc557[64]]- 1)};return _0x122ex5d}function join_url(){var _0x122ex5f= new RegExp(_0xc557[160],_0xc557[161]);var _0x122ex60=Array[_0xc557[17]][_0xc557[163]][_0xc557[162]](arguments);return _0x122ex60[_0xc557[133]](function(_0x122ex61){return _0x122ex61[_0xc557[164]](_0x122ex5f,_0xc557[55])})[_0xc557[121]](_0xc557[159])}module[_0xc557[165]]= Freshdesk
\ No newline at end of file
+var _0x71e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x69\x6E\x66\x6F","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x61\x70\x69\x4B\x65\x79","\x3A\x58","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65\x20","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x73\x20\x66\x6F\x75\x6E\x64\x20\x28","\x29\x2E\x20\x46\x69\x6E\x64\x20\x77\x69\x74\x68\x20\x6E\x61\x6D\x65\x3A\x20","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x63\x6F\x6E\x74\x61\x63\x74","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6D\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x3F\x70\x68\x6F\x6E\x65\x3D","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x20\x77\x69\x74\x68\x20\x6D\x6F\x62\x69\x6C\x65\x20","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x3F\x6D\x6F\x62\x69\x6C\x65\x3D","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x20\x28\x70\x68\x6F\x6E\x65\x29\x3A\x20","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x28\x70\x68\x6F\x6E\x65\x29\x3A\x20","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x72\x65\x61\x74\x65\x20\x6E\x65\x77\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x77\x69\x74\x68\x20\x70\x68\x6F\x6E\x65\x20","\x64\x65\x62\x75\x67","\x50\x4F\x53\x54","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x70\x68\x6F\x6E\x65","\x6D\x6F\x62\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x25\x73\x2E\x20\x4F\x72\x69\x67\x69\x6E\x61\x74\x65\x20\x66\x72\x6F\x6D\x20\x4D\x6F\x74\x69\x6F\x6E\x2E","\x65\x6D\x61\x69\x6C","\x25\x73\x40\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6D","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x43\x72\x65\x61\x74\x65\x20\x74\x69\x63\x6B\x65\x74\x20\x74\x6F\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x77\x69\x74\x68\x20\x69\x64\x20\x20","\x72\x65\x73\x70\x6F\x6E\x64\x65\x72\x5F\x69\x64","\x72\x65\x71\x75\x65\x73\x74\x65\x72\x5F\x69\x64","\x73\x6F\x75\x72\x63\x65","\x70\x72\x69\x6F\x72\x69\x74\x79","\x73\x74\x61\x74\x75\x73","\x73\x75\x62\x6A\x65\x63\x74","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72\x20","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x74\x61\x67\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x74\x69\x63\x6B\x65\x74\x73","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x6B\x65\x79","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x3C\x62\x72\x3E","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x54\x61\x67\x73","\x6D\x61\x70","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x73\x75\x62\x74\x79\x70\x65\x43\x68\x61\x6E\x6E\x65\x6C","\x75\x72\x6C","\x2F\x68\x65\x6C\x70\x64\x65\x73\x6B\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x74\x6F","\x63\x72\x65\x61\x74\x65","\x54\x69\x63\x6B\x65\x74\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A\x20","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x5E\x5C\x2F\x7C\x5C\x2F\x24","\x67","\x63\x61\x6C\x6C","\x73\x6C\x69\x63\x65","\x72\x65\x70\x6C\x61\x63\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x71e0[0];var _=require(_0x71e0[1]);var util=require(_0x71e0[2]);var moment=require(_0x71e0[3]);var rp=require(_0x71e0[4]);var logger=require(_0x71e0[6])(_0x71e0[5]);var FreshdeskIntegration=require(_0x71e0[8])[_0x71e0[7]];var IntConfiguration=require(_0x71e0[8])[_0x71e0[9]];var ReportIntegration=require(_0x71e0[8])[_0x71e0[10]];var VoiceQueue=require(_0x71e0[8])[_0x71e0[11]];var VoiceExtension=require(_0x71e0[8])[_0x71e0[12]];var Agent=require(_0x71e0[8])[_0x71e0[13]];function Freshdesk(){logger[_0x71e0[15]](_0x71e0[14])}Freshdesk[_0x71e0[17]][_0x71e0[16]]= function(_0x19f8xd,_0x19f8xe,_0x19f8xf,_0x19f8x10,_0x19f8x11,_0x19f8x12,_0x19f8x13){var _0x19f8x14={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,ticketId:undefined,recordEnable:false,serverUrl:undefined};if(!_0x19f8xd||  !_0x19f8xe){logger[_0x71e0[19]](_0x71e0[18]);return};IntConfiguration[_0x71e0[22]]({where:{id:_0x19f8xe,AccountId:_0x19f8xd},include:[{all:true,include:[{all:true}]}]})[_0x71e0[21]](handleEntityNotFound())[_0x71e0[21]](handleConnection(_0x19f8x14))[_0x71e0[21]](searchMotionAgent(_0x19f8xf,_0x19f8x11))[_0x71e0[21]](handleMotionAgent(_0x19f8x14))[_0x71e0[21]](searchQueue(_0x19f8x11))[_0x71e0[21]](handleQueueRecordings(_0x19f8x14,_0x19f8x11))[_0x71e0[21]](searchRoute(_0x19f8x11))[_0x71e0[21]](handleOutboundRecordings(_0x19f8x14,_0x19f8x11))[_0x71e0[21]](searchAgent(_0x19f8x14))[_0x71e0[21]](handleAgent(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10))[_0x71e0[21]](searchAdmin(_0x19f8x14))[_0x71e0[21]](handleAdmin(_0x19f8x14))[_0x71e0[21]](searchContact(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10))[_0x71e0[21]](searchContactMobile(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10))[_0x71e0[21]](handleContact(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10))[_0x71e0[21]](createContact(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10))[_0x71e0[21]](handleCreateContact(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10))[_0x71e0[21]](ticketCreation(_0x19f8x14,_0x19f8x11,_0x19f8x12,_0x19f8xf,_0x19f8x10))[_0x71e0[21]](handleTicketDisplay(_0x19f8x14))[_0x71e0[21]](handleReportIntegration(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8xd,_0x19f8x13,_0x19f8x10))[_0x71e0[21]](handleEnd(_0x19f8x14))[_0x71e0[20]](handleError(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8xd))};function handleEntityNotFound(){return function(_0x19f8x16){return _0x19f8x16?_0x19f8x16:null}}function handleConnection(_0x19f8x14){return function(_0x19f8x18){var _0x19f8x19=getAccountConfiguration(_0x19f8x18.FreshdeskAccount);_0x19f8x14[_0x71e0[23]]= _0x19f8x18;_0x19f8x14[_0x71e0[24]]= _0x19f8x19[_0x71e0[24]];_0x19f8x14[_0x71e0[25]]= _0x19f8x19[_0x71e0[25]];_0x19f8x14[_0x71e0[26]]= _0x19f8x18[_0x71e0[28]][_0x71e0[27]][_0x71e0[26]];_0x19f8x14[_0x71e0[29]]= _0x19f8x18[_0x71e0[27]][_0x71e0[29]]}}function getAccountConfiguration(_0x19f8x1b){var _0x19f8x1c={uri:stripTrailingSlash(_0x19f8x1b[_0x71e0[30]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x71e0[31],"\x41\x63\x63\x65\x70\x74":_0x71e0[31]}};_0x19f8x1c[_0x71e0[25]][_0x71e0[32]]= _0x71e0[33]+  new Buffer(_0x19f8x1b[_0x71e0[35]]+ _0x71e0[36]).toString(_0x71e0[34]);return _0x19f8x1c}function searchMotionAgent(_0x19f8xf,_0x19f8x11){return function(){var _0x19f8x1e=getAgentSearchPropertyFromChannel(_0x19f8xf);if(_0x19f8x11[_0x71e0[37]](_0x19f8x1e)){return Agent[_0x71e0[41]](_0x71e0[40])[_0x71e0[39]]({where:{name:getValueFromPropertyName(_0x19f8x11,_0x19f8x1e)},attributes:[_0x71e0[38]]})};return}}function handleMotionAgent(_0x19f8x14){return function(_0x19f8x20){if(_0x19f8x20&& _0x19f8x20[_0x71e0[38]]){_0x19f8x14[_0x71e0[42]]= _0x19f8x20[_0x71e0[38]]};return}}function searchQueue(_0x19f8x11){return function(){if(_0x19f8x11[_0x71e0[43]]){return VoiceQueue[_0x71e0[39]]({where:{name:_0x19f8x11[_0x71e0[43]]},attributes:[_0x71e0[44],_0x71e0[45]]})}else {return}}}function handleQueueRecordings(_0x19f8x14,_0x19f8x11){return function(_0x19f8x23){if(_0x19f8x11[_0x71e0[43]]){if(_0x19f8x23&& _0x19f8x23[_0x71e0[45]]){logger[_0x71e0[15]](_0x71e0[46]+ _0x19f8x23[_0x71e0[44]]);_0x19f8x14[_0x71e0[47]]= true}else {_0x19f8x14[_0x71e0[47]]= false;logger[_0x71e0[15]](_0x71e0[48])}};return}}function searchRoute(_0x19f8x11){return function(){if(_0x19f8x11[_0x71e0[49]]){return VoiceExtension[_0x71e0[39]]({where:{id:_0x19f8x11[_0x71e0[49]]},attributes:[_0x71e0[50],_0x71e0[51]]})}else {return}}}function handleOutboundRecordings(_0x19f8x14,_0x19f8x11){return function(_0x19f8x26){if(_0x19f8x11[_0x71e0[49]]){if(_0x19f8x26&& _0x19f8x26[_0x71e0[51]]){logger[_0x71e0[15]](_0x71e0[52]+ _0x19f8x26[_0x71e0[50]]);_0x19f8x14[_0x71e0[47]]= true}else {_0x19f8x14[_0x71e0[47]]= false;logger[_0x71e0[15]](_0x71e0[53])}};return}}function searchAgent(_0x19f8x14){return function(){if(_0x19f8x14[_0x71e0[42]]){return rp({uri:join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[54]),headers:_0x19f8x14[_0x71e0[25]],json:true})}};return}function getAgentSearchPropertyFromChannel(_0x19f8xf){var _0x19f8x29=_0x71e0[55];if(_0x19f8xf){switch(_0x19f8xf){case _0x71e0[57]:_0x19f8x29= _0x71e0[56];break;default:_0x19f8x29= _0x71e0[56];logger[_0x71e0[19]](_0x71e0[58]+ _0x19f8xf)}};return _0x19f8x29}function getValueFromPropertyName(_0x19f8x11,_0x19f8x29,_0x19f8x14){if(_0x19f8x29=== _0x71e0[59]){if(_0x19f8x14&& _0x19f8x14[_0x71e0[47]]&& _0x19f8x14[_0x71e0[26]]){return util[_0x71e0[62]](_0x71e0[60],stripTrailingSlash(_0x19f8x14[_0x71e0[26]]),_0x19f8x11[_0x71e0[61]])}else {return null}}else {return _[_0x71e0[63]](_0x19f8x11,_0x19f8x29)}}function handleAgent(_0x19f8x14,_0x19f8xf,_0x19f8x2c,_0x19f8x10){return function(_0x19f8x11){if(_0x19f8x11&& _0x19f8x11[_0x71e0[64]]> 0){logger[_0x71e0[15]](_0x71e0[65]+ _0x19f8x11[_0x71e0[64]]+ _0x71e0[66]+ _0x19f8x14[_0x71e0[42]]);_0x19f8x14[_0x71e0[40]]= getMatchObject(_0x19f8x11,_0x71e0[44],_0x19f8x14[_0x71e0[42]]);return _0x19f8x14[_0x71e0[40]]}else {logger[_0x71e0[15]](_0x71e0[67]);return}}}function getMatchObject(_0x19f8x2e,_0x19f8x29,_0x19f8x2f){var _0x19f8x30=_[_0x71e0[22]](_0x19f8x2e,function(_0x19f8x31){if(_0x19f8x31[_0x71e0[68]][_0x19f8x29]=== _0x19f8x2f){return _0x19f8x31}});return _0x19f8x30}function searchAdmin(_0x19f8x14){return function(){if(_0x19f8x14[_0x71e0[40]]){return};logger[_0x71e0[15]](_0x71e0[69]+ _0x19f8x14[_0x71e0[42]]+ _0x71e0[70]);return rp({uri:join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[71]),headers:_0x19f8x14[_0x71e0[25]],json:true})}}function handleAdmin(_0x19f8x14){return function(_0x19f8x11){if(!_0x19f8x11){return};_0x19f8x14[_0x71e0[40]]= _0x19f8x11;return _0x19f8x14[_0x71e0[40]]}}function searchContact(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8x10){return function(){var _0x19f8x35=getValueFromPropertyName(_0x19f8x11,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10),_0x19f8x14);logger[_0x71e0[15]](_0x71e0[72]+ _0x19f8x35);return rp({uri:join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[73]+ _0x19f8x35),headers:_0x19f8x14[_0x71e0[25]],json:true})}}function searchContactMobile(_0x19f8x14,_0x19f8xf,_0x19f8x2c,_0x19f8x10){return function(_0x19f8x11){if(_0x19f8x11&& _0x19f8x11[_0x71e0[64]]> 0){return _0x19f8x11};var _0x19f8x37=getValueFromPropertyName(_0x19f8x2c,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10),_0x19f8x14);logger[_0x71e0[15]](_0x71e0[74]+ _0x19f8x37);return rp({uri:join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[75]+ _0x19f8x37),headers:_0x19f8x14[_0x71e0[25]],json:true})}}function getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10){var _0x19f8x29=_0x71e0[55];if(_0x19f8xf){switch(_0x19f8xf){case _0x71e0[57]:if(_0x19f8x10=== _0x71e0[76]){_0x19f8x29= _0x71e0[77]}else {if(_0x19f8x10=== _0x71e0[43]){_0x19f8x29= _0x71e0[78]}};break;default:_0x19f8x29= _0x71e0[78];logger[_0x71e0[19]](_0x71e0[58]+ _0x19f8xf)}};return _0x19f8x29}function getEndUserNamePropertyFromChannel(_0x19f8xf,_0x19f8x10){var _0x19f8x29=_0x71e0[55];if(_0x19f8xf){switch(_0x19f8xf){case _0x71e0[57]:if(_0x19f8x10=== _0x71e0[76]){_0x19f8x29= _0x71e0[79]}else {if(_0x19f8x10=== _0x71e0[43]){_0x19f8x29= _0x71e0[80]}};break;default:_0x19f8x29= _0x71e0[80];logger[_0x71e0[19]](_0x71e0[58]+ _0x19f8xf)}};return _0x19f8x29}function handleContact(_0x19f8x14,_0x19f8xf,_0x19f8x2c,_0x19f8x10){return function(_0x19f8x11){if(!_0x19f8x11){return};var _0x19f8x3b=getValueFromPropertyName(_0x19f8x2c,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10));if(_0x19f8x11[_0x71e0[64]]> 0){logger[_0x71e0[15]](_0x71e0[81]+ _0x19f8x3b);_0x19f8x14[_0x71e0[82]]= _0x19f8x11[0];return _0x19f8x14[_0x71e0[82]]};logger[_0x71e0[15]](_0x71e0[83]+ _0x19f8x3b);return}}function createContact(_0x19f8x14,_0x19f8xf,_0x19f8x2c,_0x19f8x10){return function(_0x19f8x11){if(!_0x19f8x11){logger[_0x71e0[15]](_0x71e0[84]+ getValueFromPropertyName(_0x19f8x2c,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10)));logger[_0x71e0[85]](getJsonForContactCreation(_0x19f8xf,_0x19f8x2c,_0x19f8x10));var _0x19f8x3d={method:_0x71e0[86],uri:join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[87]),headers:_0x19f8x14[_0x71e0[25]],body:getJsonForContactCreation(_0x19f8xf,_0x19f8x2c,_0x19f8x10),json:true};return rp(_0x19f8x3d)};return}}function getJsonForContactCreation(_0x19f8xf,_0x19f8x11,_0x19f8x10){var _0x19f8x3f={};switch(_0x19f8xf){case _0x71e0[57]:if(_0x19f8x10=== _0x71e0[43]){if(isValidName(_0x19f8x11[_0x71e0[80]])){_0x19f8x3f[_0x71e0[44]]= getValueFromPropertyName(_0x19f8x11,getEndUserNamePropertyFromChannel(_0x19f8xf,_0x19f8x10))}else {_0x19f8x3f[_0x71e0[44]]= util[_0x71e0[62]](_0x71e0[88],getValueFromPropertyName(_0x19f8x11,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10)))}}else {if(_0x19f8x10=== _0x71e0[76]){if(isValidName(_0x19f8x11[_0x71e0[79]])){_0x19f8x3f[_0x71e0[44]]= getValueFromPropertyName(_0x19f8x11,getEndUserNamePropertyFromChannel(_0x19f8xf,_0x19f8x10))}else {_0x19f8x3f[_0x71e0[44]]= util[_0x71e0[62]](_0x71e0[88],getValueFromPropertyName(_0x19f8x11,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10)))}}};_0x19f8x3f[_0x71e0[89]]= getValueFromPropertyName(_0x19f8x11,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10));_0x19f8x3f[_0x71e0[90]]= getValueFromPropertyName(_0x19f8x11,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10));_0x19f8x3f[_0x71e0[91]]= util[_0x71e0[62]](_0x71e0[92],getValueFromPropertyName(_0x19f8x11,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10)));_0x19f8x3f[_0x71e0[93]]= util[_0x71e0[62]](_0x71e0[94],getValueFromPropertyName(_0x19f8x11,_0x71e0[61]));break;default:console[_0x71e0[19]](_0x71e0[95],_0x19f8xf)};return _0x19f8x3f}function isValidName(_0x19f8x41){return _0x19f8x41&& _0x19f8x41!== _0x71e0[96]}function handleCreateContact(_0x19f8x14,_0x19f8xf,_0x19f8x2c,_0x19f8x10){return function(_0x19f8x11){if(_0x19f8x11){_0x19f8x14[_0x71e0[82]]= _0x19f8x11};return}}function ticketCreation(_0x19f8x14,_0x19f8x2c,_0x19f8x12,_0x19f8xf,_0x19f8x10){return function(){logger[_0x71e0[15]](_0x71e0[97]+ _0x19f8x14[_0x71e0[82]][_0x71e0[50]]);var _0x19f8x41=util[_0x71e0[62]](_0x71e0[88],getValueFromPropertyName(_0x19f8x2c,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10)));var _0x19f8x35=getValueFromPropertyName(_0x19f8x2c,getEndUserSearchPropertyFromChannel(_0x19f8xf,_0x19f8x10));var _0x19f8x44={};_0x19f8x44[_0x71e0[98]]= _0x19f8x14[_0x71e0[40]][_0x71e0[50]];_0x19f8x44[_0x71e0[99]]= _0x19f8x14[_0x71e0[82]][_0x71e0[50]];_0x19f8x44[_0x71e0[44]]= (_0x19f8x41|| _0x19f8x35);_0x19f8x44[_0x71e0[89]]= (_0x19f8x35|| _0x19f8x41);_0x19f8x44[_0x71e0[100]]= 3;_0x19f8x44[_0x71e0[101]]= 1;_0x19f8x44[_0x71e0[102]]= 2;_0x19f8x44[_0x71e0[103]]= createSubjectFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12);if(!_0x19f8x44[_0x71e0[103]]){_0x19f8x44[_0x71e0[103]]= _0x71e0[104]+ (_0x19f8x35|| _0x19f8x41)};_0x19f8x44[_0x71e0[91]]= createDescriptionFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12);if(!_0x19f8x44[_0x71e0[91]]){_0x19f8x44[_0x71e0[91]]= _0x71e0[104]+ (_0x19f8x35|| _0x19f8x41)};var _0x19f8x45=createFieldsFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12);if(_0x19f8x45[_0x71e0[64]]> 0){_[_0x71e0[106]](_0x19f8x45,function(_0x19f8x46){_0x19f8x44[_0x19f8x46[_0x71e0[50]]]= _0x19f8x46[_0x71e0[105]]})};var _0x19f8x47=createCustomFieldsFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12);if(_0x19f8x47[_0x71e0[64]]> 0){_0x19f8x44[_0x71e0[107]]= {};_[_0x71e0[106]](_0x19f8x47,function(_0x19f8x46){var _0x19f8x48=_0x19f8x46[_0x71e0[50]];_0x19f8x44[_0x71e0[107]][_0x19f8x48]= _0x19f8x46[_0x71e0[105]]})};var _0x19f8x49=createTagsFromConfiguration(_0x19f8x14);if(_0x19f8x49[_0x71e0[64]]> 0){_0x19f8x44[_0x71e0[108]]= _0x19f8x49};logger[_0x71e0[85]](_0x19f8x44);var _0x19f8x3d={method:_0x71e0[86],uri:join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[109]),headers:_0x19f8x14[_0x71e0[25]],body:_0x19f8x44,json:true};return rp(_0x19f8x3d)}}function createSubjectFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12){var _0x19f8x4b=_0x71e0[55];var _0x19f8x4c=[];if(_0x19f8x14[_0x71e0[23]][_0x71e0[110]][_0x71e0[64]]> 0){var _0x19f8x4d=_[_0x71e0[111]](_0x19f8x14[_0x71e0[23]].Subject,[_0x71e0[50]]);_[_0x71e0[106]](_0x19f8x4d,function(_0x19f8x4e){if(_0x19f8x4e[_0x71e0[112]]=== _0x71e0[113]){_0x19f8x4c[_0x71e0[115]](_0x19f8x4e[_0x71e0[114]])}else {if(_0x19f8x4e[_0x71e0[112]]=== _0x71e0[116]&& _0x19f8x4e[_0x71e0[117]]){var _0x19f8x3b=getValueFromPropertyName(_0x19f8x2c,_0x19f8x4e[_0x71e0[117]],_0x19f8x14);if(_0x19f8x3b){_0x19f8x4c[_0x71e0[115]](_0x19f8x3b.toString())}}else {if(_0x19f8x4e[_0x71e0[112]]=== _0x71e0[118]&& _0x19f8x4e[_0x71e0[119]]&& _0x19f8x4e[_0x71e0[119]][_0x71e0[44]]){_0x19f8x12[_0x19f8x4e[_0x71e0[119]][_0x71e0[44]]]&& _0x19f8x4c[_0x71e0[115]](_0x19f8x12[_0x19f8x4e[_0x71e0[119]][_0x71e0[44]]].toString())}}}});_0x19f8x4b= _0x19f8x4c[_0x71e0[121]](_0x71e0[120])};return _0x19f8x4b}function createDescriptionFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12){var _0x19f8x50=_0x71e0[55];var _0x19f8x4c=[];if(_0x19f8x14[_0x71e0[23]][_0x71e0[122]][_0x71e0[64]]> 0){var _0x19f8x51=_[_0x71e0[111]](_0x19f8x14[_0x71e0[23]].Description,[_0x71e0[50]]);_[_0x71e0[106]](_0x19f8x51,function(_0x19f8x4e){if(_0x19f8x4e[_0x71e0[112]]=== _0x71e0[113]){_0x19f8x4c[_0x71e0[115]](_0x19f8x4e[_0x71e0[114]])}else {if(_0x19f8x4e[_0x71e0[112]]=== _0x71e0[123]){if(_0x19f8x4e[_0x71e0[124]]=== _0x71e0[113]&& _0x19f8x4e[_0x71e0[125]]){_0x19f8x4c[_0x71e0[115]](util[_0x71e0[62]](_0x71e0[126],_0x19f8x4e[_0x71e0[125]],_0x19f8x4e[_0x71e0[127]]))}else {if(_0x19f8x4e[_0x71e0[124]]=== _0x71e0[116]&& _0x19f8x4e[_0x71e0[117]]&& _0x19f8x4e[_0x71e0[125]]){var _0x19f8x3b=getValueFromPropertyName(_0x19f8x2c,_0x19f8x4e[_0x71e0[117]],_0x19f8x14);if(_0x19f8x3b){_0x19f8x4c[_0x71e0[115]](util[_0x71e0[62]](_0x71e0[126],_0x19f8x4e[_0x71e0[125]],_0x19f8x3b.toString()))}}else {if(_0x19f8x4e[_0x71e0[124]]=== _0x71e0[118]&& _0x19f8x4e[_0x71e0[119]]&& _0x19f8x4e[_0x71e0[119]][_0x71e0[44]]&& _0x19f8x4e[_0x71e0[125]]){_0x19f8x12[_0x19f8x4e[_0x71e0[119]][_0x71e0[44]]]&& _0x19f8x4c[_0x71e0[115]](util[_0x71e0[62]](_0x71e0[126],_0x19f8x4e[_0x71e0[125]],_0x19f8x12[_0x19f8x4e[_0x71e0[119]][_0x71e0[44]]]))}}}}}});_0x19f8x50= _0x19f8x4c[_0x71e0[121]](_0x71e0[128])};return _0x19f8x50}function createFieldsFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12){var _0x19f8x45=[];var _0x19f8x53=[];if(_0x19f8x14[_0x71e0[23]][_0x71e0[129]][_0x71e0[64]]> 0){_0x19f8x45= _[_0x71e0[130]](_0x19f8x14[_0x71e0[23]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x71e0[106]](_0x19f8x45,function(_0x19f8x46){if(_0x19f8x46[_0x71e0[112]]=== _0x71e0[113]&& _0x19f8x46[_0x71e0[131]]){_0x19f8x53[_0x71e0[115]]({id:_0x19f8x46[_0x71e0[131]],value:_0x19f8x46[_0x71e0[114]]})}else {if(_0x19f8x46[_0x71e0[112]]=== _0x71e0[116]&& _0x19f8x46[_0x71e0[117]]&& _0x19f8x46[_0x71e0[131]]){var _0x19f8x3b=getValueFromPropertyName(_0x19f8x2c,_0x19f8x46[_0x71e0[117]],_0x19f8x14);if(_0x19f8x3b){_0x19f8x53[_0x71e0[115]]({id:_0x19f8x46[_0x71e0[131]],value:_0x19f8x3b.toString()})}}else {if(_0x19f8x46[_0x71e0[112]]=== _0x71e0[118]&& _0x19f8x46[_0x71e0[131]]&& _0x19f8x46[_0x71e0[119]]&& _0x19f8x46[_0x71e0[119]][_0x71e0[44]]){_0x19f8x12[_0x19f8x46[_0x71e0[119]][_0x71e0[44]]]&& _0x19f8x53[_0x71e0[115]]({id:_0x19f8x46[_0x71e0[131]],value:_0x19f8x12[_0x19f8x46[_0x71e0[119]][_0x71e0[44]]].toString()})}}}})};return _0x19f8x53}function createCustomFieldsFromConfiguration(_0x19f8x14,_0x19f8x2c,_0x19f8x12){var _0x19f8x47=[];var _0x19f8x53=[];if(_0x19f8x14[_0x71e0[23]][_0x71e0[129]][_0x71e0[64]]> 0){_0x19f8x47= _[_0x71e0[130]](_0x19f8x14[_0x71e0[23]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x71e0[106]](_0x19f8x47,function(_0x19f8x46){if(_0x19f8x46[_0x71e0[112]]=== _0x71e0[113]&& _0x19f8x46[_0x71e0[131]]){_0x19f8x53[_0x71e0[115]]({id:_0x19f8x46[_0x71e0[131]],value:_0x19f8x46[_0x71e0[114]]})}else {if(_0x19f8x46[_0x71e0[112]]=== _0x71e0[116]&& _0x19f8x46[_0x71e0[117]]&& _0x19f8x46[_0x71e0[131]]){var _0x19f8x3b=getValueFromPropertyName(_0x19f8x2c,_0x19f8x46[_0x71e0[117]],_0x19f8x14);if(_0x19f8x3b){_0x19f8x53[_0x71e0[115]]({id:_0x19f8x46[_0x71e0[131]],value:_0x19f8x3b.toString()})}}else {if(_0x19f8x46[_0x71e0[112]]=== _0x71e0[118]&& _0x19f8x46[_0x71e0[131]]&& _0x19f8x46[_0x71e0[119]]&& _0x19f8x46[_0x71e0[119]][_0x71e0[44]]){_0x19f8x12[_0x19f8x46[_0x71e0[119]][_0x71e0[44]]]&& _0x19f8x53[_0x71e0[115]]({id:_0x19f8x46[_0x71e0[131]],value:_0x19f8x12[_0x19f8x46[_0x71e0[119]][_0x71e0[44]]].toString()})}}}})};return _0x19f8x53}function createTagsFromConfiguration(_0x19f8x14){var _0x19f8x49=[];if(_0x19f8x14[_0x71e0[23]][_0x71e0[132]][_0x71e0[64]]> 0){_0x19f8x49= _[_0x71e0[133]](_0x19f8x14[_0x71e0[23]].Tags,_0x71e0[44])};return _0x19f8x49}function handleTicketDisplay(_0x19f8x14){return function(_0x19f8x11){if(_0x19f8x11&& _0x19f8x11[_0x71e0[50]]){logger[_0x71e0[15]](_0x71e0[134]+ _0x19f8x11[_0x71e0[50]]);_0x19f8x14[_0x71e0[135]]= _0x19f8x11[_0x71e0[50]];return};return}}function handleReportIntegration(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8xd,_0x19f8x13,_0x19f8x10){return function(){delete _0x19f8x11[_0x71e0[50]];_0x19f8x11[_0x71e0[136]]= _0x71e0[137];_0x19f8x11[_0x71e0[138]]= _0x19f8xf;_0x19f8x11[_0x71e0[139]]= _0x71e0[140];_0x19f8x11[_0x71e0[135]]= _0x19f8x14[_0x71e0[135]];_0x19f8x11[_0x71e0[141]]= _0x19f8xd;_0x19f8x11[_0x71e0[142]]= _0x19f8x10;_0x19f8x11[_0x71e0[143]]= join_url(_0x19f8x14[_0x71e0[24]],_0x71e0[144]+ _0x19f8x14[_0x71e0[135]]);_0x19f8x13[_0x71e0[148]](util[_0x71e0[62]](_0x71e0[147],_0x19f8x11[_0x71e0[56]]))[_0x71e0[146]](_0x71e0[145],_0x19f8x11);return ReportIntegration[_0x71e0[149]](_0x19f8x11)}}function handleEnd(_0x19f8x14,_0x19f8x11,_0x19f8xf){return function(){logger[_0x71e0[85]](util[_0x71e0[62]](_0x71e0[150],_0x19f8x14[_0x71e0[135]],_0x19f8x14[_0x71e0[40]][_0x71e0[68]][_0x71e0[44]]));_0x19f8x14= undefined;return}}function handleDebug(_0x19f8x14){return function(){logger[_0x71e0[85]](_0x19f8x14);return}}function handleError(_0x19f8x14,_0x19f8xf,_0x19f8x11,_0x19f8xd){return function(_0x19f8x5b){logger[_0x71e0[19]](_0x71e0[151]);logger[_0x71e0[19]](_0x71e0[152]+ _0x19f8x5b[_0x71e0[153]]);logger[_0x71e0[19]](_0x71e0[154]+ _0x19f8x5b[_0x71e0[155]]);_0x19f8x14= undefined;delete _0x19f8x11[_0x71e0[50]];_0x19f8x11[_0x71e0[136]]= _0x71e0[137];_0x19f8x11[_0x71e0[138]]= _0x19f8xf;_0x19f8x11[_0x71e0[139]]= _0x71e0[156];_0x19f8x11[_0x71e0[141]]= _0x19f8xd;ReportIntegration[_0x71e0[149]](_0x19f8x11)[_0x71e0[21]](function(){return})[_0x71e0[20]](function(_0x19f8x5b){logger[_0x71e0[19]](_0x71e0[157]);return})}}function stripTrailingSlash(_0x19f8x5d){if(_0x19f8x5d[_0x71e0[158]](-1) === _0x71e0[159]){return _0x19f8x5d[_0x71e0[158]](0,_0x19f8x5d[_0x71e0[64]]- 1)};return _0x19f8x5d}function join_url(){var _0x19f8x5f= new RegExp(_0x71e0[160],_0x71e0[161]);var _0x19f8x60=Array[_0x71e0[17]][_0x71e0[163]][_0x71e0[162]](arguments);return _0x19f8x60[_0x71e0[133]](function(_0x19f8x61){return _0x19f8x61[_0x71e0[164]](_0x19f8x5f,_0x71e0[55])})[_0x71e0[121]](_0x71e0[159])}module[_0x71e0[165]]= Freshdesk
\ No newline at end of file