Built motion from commit daed1922e.|1.0.22
[motion.git] / server / config / integrations / freshdesk.js
1 var _0x49a6=["\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"];_0x49a6[0];var _=require(_0x49a6[1]);var util=require(_0x49a6[2]);var moment=require(_0x49a6[3]);var rp=require(_0x49a6[4]);var logger=require(_0x49a6[6])(_0x49a6[5]);var FreshdeskIntegration=require(_0x49a6[8])[_0x49a6[7]];var IntConfiguration=require(_0x49a6[8])[_0x49a6[9]];var ReportIntegration=require(_0x49a6[8])[_0x49a6[10]];var VoiceQueue=require(_0x49a6[8])[_0x49a6[11]];var VoiceExtension=require(_0x49a6[8])[_0x49a6[12]];var Agent=require(_0x49a6[8])[_0x49a6[13]];function Freshdesk(){logger[_0x49a6[15]](_0x49a6[14])}Freshdesk[_0x49a6[17]][_0x49a6[16]]= function(_0xff9bxd,_0xff9bxe,_0xff9bxf,_0xff9bx10,_0xff9bx11,_0xff9bx12,_0xff9bx13){var _0xff9bx14={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,ticketId:undefined,recordEnable:false,serverUrl:undefined};if(!_0xff9bxd||  !_0xff9bxe){logger[_0x49a6[19]](_0x49a6[18]);return};IntConfiguration[_0x49a6[22]]({where:{id:_0xff9bxe,AccountId:_0xff9bxd},include:[{all:true,include:[{all:true}]}]})[_0x49a6[21]](handleEntityNotFound())[_0x49a6[21]](handleConnection(_0xff9bx14))[_0x49a6[21]](searchMotionAgent(_0xff9bxf,_0xff9bx11))[_0x49a6[21]](handleMotionAgent(_0xff9bx14))[_0x49a6[21]](searchQueue(_0xff9bx11))[_0x49a6[21]](handleQueueRecordings(_0xff9bx14,_0xff9bx11))[_0x49a6[21]](searchRoute(_0xff9bx11))[_0x49a6[21]](handleOutboundRecordings(_0xff9bx14,_0xff9bx11))[_0x49a6[21]](searchAgent(_0xff9bx14))[_0x49a6[21]](handleAgent(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10))[_0x49a6[21]](searchAdmin(_0xff9bx14))[_0x49a6[21]](handleAdmin(_0xff9bx14))[_0x49a6[21]](searchContact(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10))[_0x49a6[21]](searchContactMobile(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10))[_0x49a6[21]](handleContact(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10))[_0x49a6[21]](createContact(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10))[_0x49a6[21]](handleCreateContact(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10))[_0x49a6[21]](ticketCreation(_0xff9bx14,_0xff9bx11,_0xff9bx12,_0xff9bxf,_0xff9bx10))[_0x49a6[21]](handleTicketDisplay(_0xff9bx14))[_0x49a6[21]](handleReportIntegration(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bxd,_0xff9bx13,_0xff9bx10))[_0x49a6[21]](handleEnd(_0xff9bx14))[_0x49a6[20]](handleError(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bxd))};function handleEntityNotFound(){return function(_0xff9bx16){return _0xff9bx16?_0xff9bx16:null}}function handleConnection(_0xff9bx14){return function(_0xff9bx18){var _0xff9bx19=getAccountConfiguration(_0xff9bx18.FreshdeskAccount);_0xff9bx14[_0x49a6[23]]= _0xff9bx18;_0xff9bx14[_0x49a6[24]]= _0xff9bx19[_0x49a6[24]];_0xff9bx14[_0x49a6[25]]= _0xff9bx19[_0x49a6[25]];_0xff9bx14[_0x49a6[26]]= _0xff9bx18[_0x49a6[28]][_0x49a6[27]][_0x49a6[26]];_0xff9bx14[_0x49a6[29]]= _0xff9bx18[_0x49a6[27]][_0x49a6[29]]}}function getAccountConfiguration(_0xff9bx1b){var _0xff9bx1c={uri:stripTrailingSlash(_0xff9bx1b[_0x49a6[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":_0x49a6[31],"\x41\x63\x63\x65\x70\x74":_0x49a6[31]}};_0xff9bx1c[_0x49a6[25]][_0x49a6[32]]= _0x49a6[33]+  new Buffer(_0xff9bx1b[_0x49a6[35]]+ _0x49a6[36]).toString(_0x49a6[34]);return _0xff9bx1c}function searchMotionAgent(_0xff9bxf,_0xff9bx11){return function(){var _0xff9bx1e=getAgentSearchPropertyFromChannel(_0xff9bxf);if(_0xff9bx11[_0x49a6[37]](_0xff9bx1e)){return Agent[_0x49a6[41]](_0x49a6[40])[_0x49a6[39]]({where:{name:getValueFromPropertyName(_0xff9bx11,_0xff9bx1e)},attributes:[_0x49a6[38]]})};return}}function handleMotionAgent(_0xff9bx14){return function(_0xff9bx20){if(_0xff9bx20&& _0xff9bx20[_0x49a6[38]]){_0xff9bx14[_0x49a6[42]]= _0xff9bx20[_0x49a6[38]]};return}}function searchQueue(_0xff9bx11){return function(){if(_0xff9bx11[_0x49a6[43]]){return VoiceQueue[_0x49a6[39]]({where:{name:_0xff9bx11[_0x49a6[43]]},attributes:[_0x49a6[44],_0x49a6[45]]})}else {return}}}function handleQueueRecordings(_0xff9bx14,_0xff9bx11){return function(_0xff9bx23){if(_0xff9bx11[_0x49a6[43]]){if(_0xff9bx23&& _0xff9bx23[_0x49a6[45]]){logger[_0x49a6[15]](_0x49a6[46]+ _0xff9bx23[_0x49a6[44]]);_0xff9bx14[_0x49a6[47]]= true}else {_0xff9bx14[_0x49a6[47]]= false;logger[_0x49a6[15]](_0x49a6[48])}};return}}function searchRoute(_0xff9bx11){return function(){if(_0xff9bx11[_0x49a6[49]]){return VoiceExtension[_0x49a6[39]]({where:{id:_0xff9bx11[_0x49a6[49]]},attributes:[_0x49a6[50],_0x49a6[51]]})}else {return}}}function handleOutboundRecordings(_0xff9bx14,_0xff9bx11){return function(_0xff9bx26){if(_0xff9bx11[_0x49a6[49]]){if(_0xff9bx26&& _0xff9bx26[_0x49a6[51]]){logger[_0x49a6[15]](_0x49a6[52]+ _0xff9bx26[_0x49a6[50]]);_0xff9bx14[_0x49a6[47]]= true}else {_0xff9bx14[_0x49a6[47]]= false;logger[_0x49a6[15]](_0x49a6[53])}};return}}function searchAgent(_0xff9bx14){return function(){if(_0xff9bx14[_0x49a6[42]]){return rp({uri:join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[54]),headers:_0xff9bx14[_0x49a6[25]],json:true})}};return}function getAgentSearchPropertyFromChannel(_0xff9bxf){var _0xff9bx29=_0x49a6[55];if(_0xff9bxf){switch(_0xff9bxf){case _0x49a6[57]:_0xff9bx29= _0x49a6[56];break;default:_0xff9bx29= _0x49a6[56];logger[_0x49a6[19]](_0x49a6[58]+ _0xff9bxf)}};return _0xff9bx29}function getValueFromPropertyName(_0xff9bx11,_0xff9bx29,_0xff9bx14){if(_0xff9bx29=== _0x49a6[59]){if(_0xff9bx14&& _0xff9bx14[_0x49a6[47]]&& _0xff9bx14[_0x49a6[26]]){return util[_0x49a6[62]](_0x49a6[60],stripTrailingSlash(_0xff9bx14[_0x49a6[26]]),_0xff9bx11[_0x49a6[61]])}else {return null}}else {return _[_0x49a6[63]](_0xff9bx11,_0xff9bx29)}}function handleAgent(_0xff9bx14,_0xff9bxf,_0xff9bx2c,_0xff9bx10){return function(_0xff9bx11){if(_0xff9bx11&& _0xff9bx11[_0x49a6[64]]> 0){logger[_0x49a6[15]](_0x49a6[65]+ _0xff9bx11[_0x49a6[64]]+ _0x49a6[66]+ _0xff9bx14[_0x49a6[42]]);_0xff9bx14[_0x49a6[40]]= getMatchObject(_0xff9bx11,_0x49a6[44],_0xff9bx14[_0x49a6[42]]);return _0xff9bx14[_0x49a6[40]]}else {logger[_0x49a6[15]](_0x49a6[67]);return}}}function getMatchObject(_0xff9bx2e,_0xff9bx29,_0xff9bx2f){var _0xff9bx30=_[_0x49a6[22]](_0xff9bx2e,function(_0xff9bx31){if(_0xff9bx31[_0x49a6[68]][_0xff9bx29]=== _0xff9bx2f){return _0xff9bx31}});return _0xff9bx30}function searchAdmin(_0xff9bx14){return function(){if(_0xff9bx14[_0x49a6[40]]){return};logger[_0x49a6[15]](_0x49a6[69]+ _0xff9bx14[_0x49a6[42]]+ _0x49a6[70]);return rp({uri:join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[71]),headers:_0xff9bx14[_0x49a6[25]],json:true})}}function handleAdmin(_0xff9bx14){return function(_0xff9bx11){if(!_0xff9bx11){return};_0xff9bx14[_0x49a6[40]]= _0xff9bx11;return _0xff9bx14[_0x49a6[40]]}}function searchContact(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bx10){return function(){var _0xff9bx35=getValueFromPropertyName(_0xff9bx11,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10),_0xff9bx14);logger[_0x49a6[15]](_0x49a6[72]+ _0xff9bx35);return rp({uri:join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[73]+ _0xff9bx35),headers:_0xff9bx14[_0x49a6[25]],json:true})}}function searchContactMobile(_0xff9bx14,_0xff9bxf,_0xff9bx2c,_0xff9bx10){return function(_0xff9bx11){if(_0xff9bx11&& _0xff9bx11[_0x49a6[64]]> 0){return _0xff9bx11};var _0xff9bx37=getValueFromPropertyName(_0xff9bx2c,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10),_0xff9bx14);logger[_0x49a6[15]](_0x49a6[74]+ _0xff9bx37);return rp({uri:join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[75]+ _0xff9bx37),headers:_0xff9bx14[_0x49a6[25]],json:true})}}function getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10){var _0xff9bx29=_0x49a6[55];if(_0xff9bxf){switch(_0xff9bxf){case _0x49a6[57]:if(_0xff9bx10=== _0x49a6[76]){_0xff9bx29= _0x49a6[77]}else {if(_0xff9bx10=== _0x49a6[43]){_0xff9bx29= _0x49a6[78]}};break;default:_0xff9bx29= _0x49a6[78];logger[_0x49a6[19]](_0x49a6[58]+ _0xff9bxf)}};return _0xff9bx29}function getEndUserNamePropertyFromChannel(_0xff9bxf,_0xff9bx10){var _0xff9bx29=_0x49a6[55];if(_0xff9bxf){switch(_0xff9bxf){case _0x49a6[57]:if(_0xff9bx10=== _0x49a6[76]){_0xff9bx29= _0x49a6[79]}else {if(_0xff9bx10=== _0x49a6[43]){_0xff9bx29= _0x49a6[80]}};break;default:_0xff9bx29= _0x49a6[80];logger[_0x49a6[19]](_0x49a6[58]+ _0xff9bxf)}};return _0xff9bx29}function handleContact(_0xff9bx14,_0xff9bxf,_0xff9bx2c,_0xff9bx10){return function(_0xff9bx11){if(!_0xff9bx11){return};var _0xff9bx3b=getValueFromPropertyName(_0xff9bx2c,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10));if(_0xff9bx11[_0x49a6[64]]> 0){logger[_0x49a6[15]](_0x49a6[81]+ _0xff9bx3b);_0xff9bx14[_0x49a6[82]]= _0xff9bx11[0];return _0xff9bx14[_0x49a6[82]]};logger[_0x49a6[15]](_0x49a6[83]+ _0xff9bx3b);return}}function createContact(_0xff9bx14,_0xff9bxf,_0xff9bx2c,_0xff9bx10){return function(_0xff9bx11){if(!_0xff9bx11){logger[_0x49a6[15]](_0x49a6[84]+ getValueFromPropertyName(_0xff9bx2c,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10)));logger[_0x49a6[85]](getJsonForContactCreation(_0xff9bxf,_0xff9bx2c,_0xff9bx10));var _0xff9bx3d={method:_0x49a6[86],uri:join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[87]),headers:_0xff9bx14[_0x49a6[25]],body:getJsonForContactCreation(_0xff9bxf,_0xff9bx2c,_0xff9bx10),json:true};return rp(_0xff9bx3d)};return}}function getJsonForContactCreation(_0xff9bxf,_0xff9bx11,_0xff9bx10){var _0xff9bx3f={};switch(_0xff9bxf){case _0x49a6[57]:if(_0xff9bx10=== _0x49a6[43]){if(isValidName(_0xff9bx11[_0x49a6[80]])){_0xff9bx3f[_0x49a6[44]]= getValueFromPropertyName(_0xff9bx11,getEndUserNamePropertyFromChannel(_0xff9bxf,_0xff9bx10))}else {_0xff9bx3f[_0x49a6[44]]= util[_0x49a6[62]](_0x49a6[88],getValueFromPropertyName(_0xff9bx11,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10)))}}else {if(_0xff9bx10=== _0x49a6[76]){if(isValidName(_0xff9bx11[_0x49a6[79]])){_0xff9bx3f[_0x49a6[44]]= getValueFromPropertyName(_0xff9bx11,getEndUserNamePropertyFromChannel(_0xff9bxf,_0xff9bx10))}else {_0xff9bx3f[_0x49a6[44]]= util[_0x49a6[62]](_0x49a6[88],getValueFromPropertyName(_0xff9bx11,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10)))}}};_0xff9bx3f[_0x49a6[89]]= getValueFromPropertyName(_0xff9bx11,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10));_0xff9bx3f[_0x49a6[90]]= getValueFromPropertyName(_0xff9bx11,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10));_0xff9bx3f[_0x49a6[91]]= util[_0x49a6[62]](_0x49a6[92],getValueFromPropertyName(_0xff9bx11,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10)));_0xff9bx3f[_0x49a6[93]]= util[_0x49a6[62]](_0x49a6[94],getValueFromPropertyName(_0xff9bx11,_0x49a6[61]));break;default:console[_0x49a6[19]](_0x49a6[95],_0xff9bxf)};return _0xff9bx3f}function isValidName(_0xff9bx41){return _0xff9bx41&& _0xff9bx41!== _0x49a6[96]}function handleCreateContact(_0xff9bx14,_0xff9bxf,_0xff9bx2c,_0xff9bx10){return function(_0xff9bx11){if(_0xff9bx11){_0xff9bx14[_0x49a6[82]]= _0xff9bx11};return}}function ticketCreation(_0xff9bx14,_0xff9bx2c,_0xff9bx12,_0xff9bxf,_0xff9bx10){return function(){logger[_0x49a6[15]](_0x49a6[97]+ _0xff9bx14[_0x49a6[82]][_0x49a6[50]]);var _0xff9bx41=util[_0x49a6[62]](_0x49a6[88],getValueFromPropertyName(_0xff9bx2c,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10)));var _0xff9bx35=getValueFromPropertyName(_0xff9bx2c,getEndUserSearchPropertyFromChannel(_0xff9bxf,_0xff9bx10));var _0xff9bx44={};_0xff9bx44[_0x49a6[98]]= _0xff9bx14[_0x49a6[40]][_0x49a6[50]];_0xff9bx44[_0x49a6[99]]= _0xff9bx14[_0x49a6[82]][_0x49a6[50]];_0xff9bx44[_0x49a6[44]]= (_0xff9bx41|| _0xff9bx35);_0xff9bx44[_0x49a6[89]]= (_0xff9bx35|| _0xff9bx41);_0xff9bx44[_0x49a6[100]]= 3;_0xff9bx44[_0x49a6[101]]= 1;_0xff9bx44[_0x49a6[102]]= 2;_0xff9bx44[_0x49a6[103]]= createSubjectFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12);if(!_0xff9bx44[_0x49a6[103]]){_0xff9bx44[_0x49a6[103]]= _0x49a6[104]+ (_0xff9bx35|| _0xff9bx41)};_0xff9bx44[_0x49a6[91]]= createDescriptionFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12);if(!_0xff9bx44[_0x49a6[91]]){_0xff9bx44[_0x49a6[91]]= _0x49a6[104]+ (_0xff9bx35|| _0xff9bx41)};var _0xff9bx45=createFieldsFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12);if(_0xff9bx45[_0x49a6[64]]> 0){_[_0x49a6[106]](_0xff9bx45,function(_0xff9bx46){_0xff9bx44[_0xff9bx46[_0x49a6[50]]]= _0xff9bx46[_0x49a6[105]]})};var _0xff9bx47=createCustomFieldsFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12);if(_0xff9bx47[_0x49a6[64]]> 0){_0xff9bx44[_0x49a6[107]]= {};_[_0x49a6[106]](_0xff9bx47,function(_0xff9bx46){var _0xff9bx48=_0xff9bx46[_0x49a6[50]];_0xff9bx44[_0x49a6[107]][_0xff9bx48]= _0xff9bx46[_0x49a6[105]]})};var _0xff9bx49=createTagsFromConfiguration(_0xff9bx14);if(_0xff9bx49[_0x49a6[64]]> 0){_0xff9bx44[_0x49a6[108]]= _0xff9bx49};logger[_0x49a6[85]](_0xff9bx44);var _0xff9bx3d={method:_0x49a6[86],uri:join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[109]),headers:_0xff9bx14[_0x49a6[25]],body:_0xff9bx44,json:true};return rp(_0xff9bx3d)}}function createSubjectFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12){var _0xff9bx4b=_0x49a6[55];var _0xff9bx4c=[];if(_0xff9bx14[_0x49a6[23]][_0x49a6[110]][_0x49a6[64]]> 0){var _0xff9bx4d=_[_0x49a6[111]](_0xff9bx14[_0x49a6[23]].Subject,[_0x49a6[50]]);_[_0x49a6[106]](_0xff9bx4d,function(_0xff9bx4e){if(_0xff9bx4e[_0x49a6[112]]=== _0x49a6[113]){_0xff9bx4c[_0x49a6[115]](_0xff9bx4e[_0x49a6[114]])}else {if(_0xff9bx4e[_0x49a6[112]]=== _0x49a6[116]&& _0xff9bx4e[_0x49a6[117]]){var _0xff9bx3b=getValueFromPropertyName(_0xff9bx2c,_0xff9bx4e[_0x49a6[117]],_0xff9bx14);if(_0xff9bx3b){_0xff9bx4c[_0x49a6[115]](_0xff9bx3b.toString())}}else {if(_0xff9bx4e[_0x49a6[112]]=== _0x49a6[118]&& _0xff9bx4e[_0x49a6[119]]&& _0xff9bx4e[_0x49a6[119]][_0x49a6[44]]){_0xff9bx12[_0xff9bx4e[_0x49a6[119]][_0x49a6[44]]]&& _0xff9bx4c[_0x49a6[115]](_0xff9bx12[_0xff9bx4e[_0x49a6[119]][_0x49a6[44]]].toString())}}}});_0xff9bx4b= _0xff9bx4c[_0x49a6[121]](_0x49a6[120])};return _0xff9bx4b}function createDescriptionFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12){var _0xff9bx50=_0x49a6[55];var _0xff9bx4c=[];if(_0xff9bx14[_0x49a6[23]][_0x49a6[122]][_0x49a6[64]]> 0){var _0xff9bx51=_[_0x49a6[111]](_0xff9bx14[_0x49a6[23]].Description,[_0x49a6[50]]);_[_0x49a6[106]](_0xff9bx51,function(_0xff9bx4e){if(_0xff9bx4e[_0x49a6[112]]=== _0x49a6[113]){_0xff9bx4c[_0x49a6[115]](_0xff9bx4e[_0x49a6[114]])}else {if(_0xff9bx4e[_0x49a6[112]]=== _0x49a6[123]){if(_0xff9bx4e[_0x49a6[124]]=== _0x49a6[113]&& _0xff9bx4e[_0x49a6[125]]){_0xff9bx4c[_0x49a6[115]](util[_0x49a6[62]](_0x49a6[126],_0xff9bx4e[_0x49a6[125]],_0xff9bx4e[_0x49a6[127]]))}else {if(_0xff9bx4e[_0x49a6[124]]=== _0x49a6[116]&& _0xff9bx4e[_0x49a6[117]]&& _0xff9bx4e[_0x49a6[125]]){var _0xff9bx3b=getValueFromPropertyName(_0xff9bx2c,_0xff9bx4e[_0x49a6[117]],_0xff9bx14);if(_0xff9bx3b){_0xff9bx4c[_0x49a6[115]](util[_0x49a6[62]](_0x49a6[126],_0xff9bx4e[_0x49a6[125]],_0xff9bx3b.toString()))}}else {if(_0xff9bx4e[_0x49a6[124]]=== _0x49a6[118]&& _0xff9bx4e[_0x49a6[119]]&& _0xff9bx4e[_0x49a6[119]][_0x49a6[44]]&& _0xff9bx4e[_0x49a6[125]]){_0xff9bx12[_0xff9bx4e[_0x49a6[119]][_0x49a6[44]]]&& _0xff9bx4c[_0x49a6[115]](util[_0x49a6[62]](_0x49a6[126],_0xff9bx4e[_0x49a6[125]],_0xff9bx12[_0xff9bx4e[_0x49a6[119]][_0x49a6[44]]]))}}}}}});_0xff9bx50= _0xff9bx4c[_0x49a6[121]](_0x49a6[128])};return _0xff9bx50}function createFieldsFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12){var _0xff9bx45=[];var _0xff9bx53=[];if(_0xff9bx14[_0x49a6[23]][_0x49a6[129]][_0x49a6[64]]> 0){_0xff9bx45= _[_0x49a6[130]](_0xff9bx14[_0x49a6[23]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x49a6[106]](_0xff9bx45,function(_0xff9bx46){if(_0xff9bx46[_0x49a6[112]]=== _0x49a6[113]&& _0xff9bx46[_0x49a6[131]]){_0xff9bx53[_0x49a6[115]]({id:_0xff9bx46[_0x49a6[131]],value:_0xff9bx46[_0x49a6[114]]})}else {if(_0xff9bx46[_0x49a6[112]]=== _0x49a6[116]&& _0xff9bx46[_0x49a6[117]]&& _0xff9bx46[_0x49a6[131]]){var _0xff9bx3b=getValueFromPropertyName(_0xff9bx2c,_0xff9bx46[_0x49a6[117]],_0xff9bx14);if(_0xff9bx3b){_0xff9bx53[_0x49a6[115]]({id:_0xff9bx46[_0x49a6[131]],value:_0xff9bx3b.toString()})}}else {if(_0xff9bx46[_0x49a6[112]]=== _0x49a6[118]&& _0xff9bx46[_0x49a6[131]]&& _0xff9bx46[_0x49a6[119]]&& _0xff9bx46[_0x49a6[119]][_0x49a6[44]]){_0xff9bx12[_0xff9bx46[_0x49a6[119]][_0x49a6[44]]]&& _0xff9bx53[_0x49a6[115]]({id:_0xff9bx46[_0x49a6[131]],value:_0xff9bx12[_0xff9bx46[_0x49a6[119]][_0x49a6[44]]].toString()})}}}})};return _0xff9bx53}function createCustomFieldsFromConfiguration(_0xff9bx14,_0xff9bx2c,_0xff9bx12){var _0xff9bx47=[];var _0xff9bx53=[];if(_0xff9bx14[_0x49a6[23]][_0x49a6[129]][_0x49a6[64]]> 0){_0xff9bx47= _[_0x49a6[130]](_0xff9bx14[_0x49a6[23]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x49a6[106]](_0xff9bx47,function(_0xff9bx46){if(_0xff9bx46[_0x49a6[112]]=== _0x49a6[113]&& _0xff9bx46[_0x49a6[131]]){_0xff9bx53[_0x49a6[115]]({id:_0xff9bx46[_0x49a6[131]],value:_0xff9bx46[_0x49a6[114]]})}else {if(_0xff9bx46[_0x49a6[112]]=== _0x49a6[116]&& _0xff9bx46[_0x49a6[117]]&& _0xff9bx46[_0x49a6[131]]){var _0xff9bx3b=getValueFromPropertyName(_0xff9bx2c,_0xff9bx46[_0x49a6[117]],_0xff9bx14);if(_0xff9bx3b){_0xff9bx53[_0x49a6[115]]({id:_0xff9bx46[_0x49a6[131]],value:_0xff9bx3b.toString()})}}else {if(_0xff9bx46[_0x49a6[112]]=== _0x49a6[118]&& _0xff9bx46[_0x49a6[131]]&& _0xff9bx46[_0x49a6[119]]&& _0xff9bx46[_0x49a6[119]][_0x49a6[44]]){_0xff9bx12[_0xff9bx46[_0x49a6[119]][_0x49a6[44]]]&& _0xff9bx53[_0x49a6[115]]({id:_0xff9bx46[_0x49a6[131]],value:_0xff9bx12[_0xff9bx46[_0x49a6[119]][_0x49a6[44]]].toString()})}}}})};return _0xff9bx53}function createTagsFromConfiguration(_0xff9bx14){var _0xff9bx49=[];if(_0xff9bx14[_0x49a6[23]][_0x49a6[132]][_0x49a6[64]]> 0){_0xff9bx49= _[_0x49a6[133]](_0xff9bx14[_0x49a6[23]].Tags,_0x49a6[44])};return _0xff9bx49}function handleTicketDisplay(_0xff9bx14){return function(_0xff9bx11){if(_0xff9bx11&& _0xff9bx11[_0x49a6[50]]){logger[_0x49a6[15]](_0x49a6[134]+ _0xff9bx11[_0x49a6[50]]);_0xff9bx14[_0x49a6[135]]= _0xff9bx11[_0x49a6[50]];return};return}}function handleReportIntegration(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bxd,_0xff9bx13,_0xff9bx10){return function(){delete _0xff9bx11[_0x49a6[50]];_0xff9bx11[_0x49a6[136]]= _0x49a6[137];_0xff9bx11[_0x49a6[138]]= _0xff9bxf;_0xff9bx11[_0x49a6[139]]= _0x49a6[140];_0xff9bx11[_0x49a6[135]]= _0xff9bx14[_0x49a6[135]];_0xff9bx11[_0x49a6[141]]= _0xff9bxd;_0xff9bx11[_0x49a6[142]]= _0xff9bx10;_0xff9bx11[_0x49a6[143]]= join_url(_0xff9bx14[_0x49a6[24]],_0x49a6[144]+ _0xff9bx14[_0x49a6[135]]);_0xff9bx13[_0x49a6[148]](util[_0x49a6[62]](_0x49a6[147],_0xff9bx11[_0x49a6[56]]))[_0x49a6[146]](_0x49a6[145],_0xff9bx11);return ReportIntegration[_0x49a6[149]](_0xff9bx11)}}function handleEnd(_0xff9bx14,_0xff9bx11,_0xff9bxf){return function(){logger[_0x49a6[85]](util[_0x49a6[62]](_0x49a6[150],_0xff9bx14[_0x49a6[135]],_0xff9bx14[_0x49a6[40]][_0x49a6[68]][_0x49a6[44]]));_0xff9bx14= undefined;return}}function handleDebug(_0xff9bx14){return function(){logger[_0x49a6[85]](_0xff9bx14);return}}function handleError(_0xff9bx14,_0xff9bxf,_0xff9bx11,_0xff9bxd){return function(_0xff9bx5b){logger[_0x49a6[19]](_0x49a6[151]);logger[_0x49a6[19]](_0x49a6[152]+ _0xff9bx5b[_0x49a6[153]]);logger[_0x49a6[19]](_0x49a6[154]+ _0xff9bx5b[_0x49a6[155]]);_0xff9bx14= undefined;delete _0xff9bx11[_0x49a6[50]];_0xff9bx11[_0x49a6[136]]= _0x49a6[137];_0xff9bx11[_0x49a6[138]]= _0xff9bxf;_0xff9bx11[_0x49a6[139]]= _0x49a6[156];_0xff9bx11[_0x49a6[141]]= _0xff9bxd;ReportIntegration[_0x49a6[149]](_0xff9bx11)[_0x49a6[21]](function(){return})[_0x49a6[20]](function(_0xff9bx5b){logger[_0x49a6[19]](_0x49a6[157]);return})}}function stripTrailingSlash(_0xff9bx5d){if(_0xff9bx5d[_0x49a6[158]](-1) === _0x49a6[159]){return _0xff9bx5d[_0x49a6[158]](0,_0xff9bx5d[_0x49a6[64]]- 1)};return _0xff9bx5d}function join_url(){var _0xff9bx5f= new RegExp(_0x49a6[160],_0x49a6[161]);var _0xff9bx60=Array[_0x49a6[17]][_0x49a6[163]][_0x49a6[162]](arguments);return _0xff9bx60[_0x49a6[133]](function(_0xff9bx61){return _0xff9bx61[_0x49a6[164]](_0xff9bx5f,_0x49a6[55])})[_0x49a6[121]](_0x49a6[159])}module[_0x49a6[165]]= Freshdesk