1 var _0x5315=["\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x72\x65\x71\x75\x65\x73\x74","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\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","\x53\x75\x67\x61\x72\x63\x72\x6D\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","\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","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x75\x72\x69","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x4C\x41\x49\x4E","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6C\x6F\x67\x69\x6E","\x4A\x53\x4F\x4E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x50\x4F\x53\x54","\x64\x65\x62\x75\x67","\x69\x64","\x73\x65\x73\x73\x69\x6F\x6E\x49\x44","\x61\x64\x6D\x69\x6E","\x76\x61\x6C\x75\x65","\x75\x73\x65\x72\x5F\x69\x64","\x6E\x61\x6D\x65\x5F\x76\x61\x6C\x75\x65\x5F\x6C\x69\x73\x74","\x75\x73\x65\x72\x5F\x6E\x61\x6D\x65","\x41\x63\x63\x6F\x75\x6E\x74\x20\x25\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64","\x66\x6F\x72\x6D\x61\x74","\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","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\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","\x72\x65\x73\x75\x6C\x74","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\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","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\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","\x72\x65\x63\x6F\x72\x64","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\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","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\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","\x67\x65\x74\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x66\x6F","\x63\x68\x61\x72\x41\x74","\x76\x65\x72\x73\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x56\x65\x72\x73\x69\x6F\x6E","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x67\x65\x74\x5F\x65\x6E\x74\x72\x79\x5F\x6C\x69\x73\x74","\x45\x6D\x70\x6C\x6F\x79\x65\x65\x73","\x49\x4E\x53\x54\x52\x20\x28\x20\x43\x4F\x4E\x43\x41\x54\x28\x75\x73\x65\x72\x73\x2E\x66\x69\x72\x73\x74\x5F\x6E\x61\x6D\x65\x2C\x27\x20\x27\x2C\x20\x75\x73\x65\x72\x73\x2E\x6C\x61\x73\x74\x5F\x6E\x61\x6D\x65\x29\x2C\x20\x22\x25\x73\x22\x29\x20\x3E\x20\x30","\x30","\x6C\x65\x6E\x67\x74\x68","\x65\x6E\x74\x72\x79\x5F\x6C\x69\x73\x74","\x72\x65\x73\x75\x6C\x74\x5F\x63\x6F\x75\x6E\x74","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x41\x67\x65\x6E\x74\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","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x64\x65\x66\x61\x75\x6C\x74\x4D\x61\x70\x70\x69\x6E\x67","\x43\x6F\x6E\x74\x61\x63\x74\x73","\x6D\x61\x70\x70\x69\x6E\x67\x4D\x6F\x64\x75\x6C\x65","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x25\x73\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A\x20\x25\x73","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x53\x6B\x69\x70\x70\x65\x64\x20\x73\x65\x61\x72\x63\x68\x20\x69\x6E\x20\x43\x75\x73\x74\x6F\x6D\x20\x4D\x61\x70\x70\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x25\x73\x20\x66\x6F\x75\x6E\x64\x3A\x20\x25\x73","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x25\x73\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A\x20\x25\x73","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A\x20\x25\x73","\x63\x6F\x6E\x74\x61\x63\x74\x73\x2E\x25\x73\x20\x3D\x20\x22\x25\x73\x22","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x53\x6B\x69\x70\x70\x65\x64\x20\x73\x65\x61\x72\x63\x68\x20\x69\x6E\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6D\x6F\x64\x75\x6C\x65\x3A\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x6D\x61\x70\x70\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x20\x6F\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x61\x6C\x72\x65\x64\x79\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x43\x75\x73\x74\x6F\x6D\x20\x4D\x61\x70\x70\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65","\x6D\x61\x70\x70\x69\x6E\x67\x46\x69\x65\x6C\x64\x73","\x68\x65\x61\x64","\x5F\x63","\x65\x6E\x64\x73\x57\x69\x74\x68","\x25\x73\x2E\x25\x73\x20\x3D\x20\x22\x25\x73\x22","\x74\x6F\x4C\x6F\x77\x65\x72","\x5F\x63\x73\x74\x6D","\x20\x4F\x52\x20\x25\x73\x2E\x25\x73\x20\x3D\x20\x22\x25\x73\x22","\x70\x68\x6F\x6E\x65\x5F\x68\x6F\x6D\x65","\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","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A\x20\x25\x73","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x73\x65\x74\x5F\x65\x6E\x74\x72\x79","\x66\x69\x72\x73\x74\x5F\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x63\x72\x65\x61\x74\x65\x64\x3A","\x61\x73\x73\x69\x67\x6E\x65\x64\x5F\x75\x73\x65\x72\x5F\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x5F\x62\x79","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x61\x74\x65\x5F\x73\x74\x61\x72\x74","\x54","\x20","\x72\x65\x70\x6C\x61\x63\x65","\x73\x6C\x69\x63\x65","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x64\x75\x72\x61\x74\x69\x6F\x6E\x5F\x68\x6F\x75\x72\x73","\x64\x75\x72\x61\x74\x69\x6F\x6E\x5F\x6D\x69\x6E\x75\x74\x65\x73","\x31\x35","\x70\x61\x72\x65\x6E\x74\x5F\x69\x64","\x70\x61\x72\x65\x6E\x74\x5F\x74\x79\x70\x65","\x6D\x6F\x64\x75\x6C\x65","\x70\x61\x72\x65\x6E\x74\x5F\x6E\x61\x6D\x65","\x66\x6F\x72\x45\x61\x63\x68","\x43\x61\x6C\x6C\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","\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","\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","\x0A","\x46\x69\x65\x6C\x64","\x69\x64\x46\x69\x65\x6C\x64","\x63\x61\x6C\x6C","\x75\x72\x6C","\x25\x73\x2F\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x3F\x61\x63\x74\x69\x6F\x6E\x3D\x61\x6A\x61\x78\x75\x69\x23\x61\x6A\x61\x78\x55\x49\x4C\x6F\x63\x3D\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x25\x33\x46\x6D\x6F\x64\x75\x6C\x65\x25\x33\x44\x43\x61\x6C\x6C\x73\x25\x32\x36\x61\x63\x74\x69\x6F\x6E\x25\x33\x44\x45\x64\x69\x74\x56\x69\x65\x77\x25\x32\x36\x72\x65\x63\x6F\x72\x64\x25\x33\x44\x25\x73","\x25\x73\x2F\x23\x62\x77\x63\x2F\x69\x6E\x64\x65\x78\x2E\x70\x68\x70\x3F\x6D\x6F\x64\x75\x6C\x65\x3D\x43\x61\x6C\x6C\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x45\x64\x69\x74\x56\x69\x65\x77\x26\x72\x65\x63\x6F\x72\x64\x3D\x25\x73","\x73\x65\x74\x5F\x72\x65\x6C\x61\x74\x69\x6F\x6E\x73\x68\x69\x70","\x75\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65\x64","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x61\x6C\x6C\x20\x25\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x61\x6C\x6C\x20\x25\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x74\x68\x65\x20\x63\x6F\x6E\x74\x61\x63\x74\x20\x25\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x75\x67\x61\x72\x63\x72\x6D","\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","\x74\x69\x63\x6B\x65\x74\x49\x64","\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","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x75\x67\x61\x72\x63\x72\x6D","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x74\x6F","\x63\x72\x65\x61\x74\x65","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x43\x61\x6C\x6C\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\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x63\x61\x6C\x6C\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x75\x67\x61\x72\x63\x72\x6D\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","\x70\x61\x72\x73\x65","\x66\x69\x72\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x5315[0]);var util=require(_0x5315[1]);var rp=require(_0x5315[2]);var request=require(_0x5315[3]);var logger=require(_0x5315[5])(_0x5315[4]);var SugarcrmConfiguration=require(_0x5315[7])[_0x5315[6]];var ReportIntegration=require(_0x5315[7])[_0x5315[8]];var VoiceQueue=require(_0x5315[7])[_0x5315[9]];var VoiceExtension=require(_0x5315[7])[_0x5315[10]];var Agent=require(_0x5315[7])[_0x5315[11]];function Sugarcrm(){logger[_0x5315[13]](_0x5315[12])}Sugarcrm[_0x5315[15]][_0x5315[14]]= function(_0x81a6xc,_0x81a6xd,_0x81a6xe,_0x81a6xf,_0x81a6x10,_0x81a6x11,_0x81a6x12){var _0x81a6x13={uri:undefined,agent:undefined,enduser:undefined,call:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined,sessionID:undefined,admin:undefined,serverVersion:undefined};if(!_0x81a6xc|| !_0x81a6xd){logger[_0x5315[17]](_0x5315[16]);return};SugarcrmConfiguration[_0x5315[20]]({where:{id:_0x81a6xd,AccountId:_0x81a6xc},include:[{all:true,include:[{all:true}]}]})[_0x5315[19]](handleEntityNotFound())[_0x5315[19]](handleConnection(_0x81a6x13))[_0x5315[19]](handleLogin(_0x81a6x13))[_0x5315[19]](searchMotionAgent(_0x81a6xe,_0x81a6x10))[_0x5315[19]](handleMotionAgent(_0x81a6x13))[_0x5315[19]](searchQueue(_0x81a6x10))[_0x5315[19]](handleQueueRecordings(_0x81a6x13,_0x81a6x10))[_0x5315[19]](searchRoute(_0x81a6x10))[_0x5315[19]](handleOutboundRecordings(_0x81a6x13,_0x81a6x10))[_0x5315[19]](getServerInfo(_0x81a6x13))[_0x5315[19]](handleServerInfo(_0x81a6x13))[_0x5315[19]](searchAgent(_0x81a6x13))[_0x5315[19]](handleAgent(_0x81a6x13))[_0x5315[19]](handleAdmin(_0x81a6x13))[_0x5315[19]](searchEndUserWithDefaultMapping(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf))[_0x5315[19]](handleEndUserWithDefaultMapping(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf))[_0x5315[19]](searchEndUser(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf))[_0x5315[19]](handleEndUser(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf))[_0x5315[19]](endUserCreation(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf))[_0x5315[19]](handleEndUserCreation(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf))[_0x5315[19]](callCreation(_0x81a6x13,_0x81a6x10,_0x81a6x11))[_0x5315[19]](handleCallAgentAssociation(_0x81a6x13))[_0x5315[19]](handleCallContactAssociation(_0x81a6x13))[_0x5315[19]](handleReportIntegration(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xc,_0x81a6x12,_0x81a6xf))[_0x5315[19]](handleEnd(_0x81a6x13))[_0x5315[18]](handleError(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xc))};function handleEntityNotFound(){return function(_0x81a6x15){if(!_0x81a6x15){return null};return _0x81a6x15}}function handleConnection(_0x81a6x13){return function(_0x81a6x17){_0x81a6x13[_0x5315[21]]= _0x81a6x17;_0x81a6x13[_0x5315[22]]= _0x81a6x17[_0x5315[24]][_0x5315[23]];_0x81a6x13[_0x5315[25]]= stripTrailingSlash(_0x81a6x17[_0x5315[24]][_0x5315[26]])+ _0x5315[27];var _0x81a6x18={user_auth:{"\x75\x73\x65\x72\x5F\x6E\x61\x6D\x65":_0x81a6x17[_0x5315[24]][_0x5315[28]],"\x70\x61\x73\x73\x77\x6F\x72\x64":_0x81a6x17[_0x5315[24]][_0x5315[29]],encryption:_0x5315[30]},application:_0x5315[31]};var _0x81a6x10={method:_0x5315[32],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]](_0x81a6x18)};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x10})}}function handleLogin(_0x81a6x13){return function(_0x81a6x10){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x10[_0x5315[37]]){_0x81a6x13[_0x5315[38]]= _0x81a6x10[_0x5315[37]];_0x81a6x13[_0x5315[39]]= {id:_0x81a6x10[_0x5315[42]][_0x5315[41]][_0x5315[40]],name:_0x81a6x10[_0x5315[42]][_0x5315[43]][_0x5315[40]]};return};throw new Error(util[_0x5315[45]](_0x5315[44],_0x81a6x13[_0x5315[21]][_0x5315[24]][_0x5315[37]]))}}function searchMotionAgent(_0x81a6xe,_0x81a6x10){return function(){var _0x81a6x1b=getAgentSearchPropertyFromChannel(_0x81a6xe);if(_0x81a6x10[_0x5315[46]](_0x81a6x1b)){return Agent[_0x5315[50]](_0x5315[49])[_0x5315[48]]({where:{name:getValueFromPropertyName(_0x81a6x10,_0x81a6x1b)},attributes:[_0x5315[47]]})};return}}function handleMotionAgent(_0x81a6x13){return function(_0x81a6x1d){if(_0x81a6x1d&& _0x81a6x1d[_0x5315[47]]){_0x81a6x13[_0x5315[51]]= _0x81a6x1d[_0x5315[47]]};return}}function getAgentSearchPropertyFromChannel(_0x81a6xe){var _0x81a6x1f=_0x5315[52];if(_0x81a6xe){switch(_0x81a6xe){case _0x5315[54]:_0x81a6x1f= _0x5315[53];break;default:_0x81a6x1f= _0x5315[53];logger[_0x5315[17]](_0x5315[55],_0x81a6xe)}};return _0x81a6x1f}function getValueFromPropertyName(_0x81a6x10,_0x81a6x1f,_0x81a6x13){if(_0x81a6x1f=== _0x5315[56]){if(_0x81a6x13&& _0x81a6x13[_0x5315[57]]&& _0x81a6x13[_0x5315[22]]){return util[_0x5315[45]](_0x5315[58],stripTrailingSlash(_0x81a6x13[_0x5315[22]]),_0x81a6x10[_0x5315[59]])}else {return null}}else {return _[_0x5315[60]](_0x81a6x10,_0x81a6x1f)}}function searchQueue(_0x81a6x10){return function(){if(_0x81a6x10[_0x5315[61]]){return VoiceQueue[_0x5315[48]]({where:{name:_0x81a6x10[_0x5315[61]]},attributes:[_0x5315[62],_0x5315[63]]})}else {return}}}function handleQueueRecordings(_0x81a6x13,_0x81a6x10){return function(_0x81a6x23){if(_0x81a6x10[_0x5315[61]]){if(_0x81a6x23&& _0x81a6x23[_0x5315[63]]){logger[_0x5315[13]](_0x5315[64],_0x81a6x23[_0x5315[62]]);_0x81a6x13[_0x5315[57]]= true}else {_0x81a6x13[_0x5315[57]]= false;logger[_0x5315[13]](_0x5315[65])}};return}}function searchRoute(_0x81a6x10){return function(){if(_0x81a6x10[_0x5315[66]]){return VoiceExtension[_0x5315[48]]({where:{id:_0x81a6x10[_0x5315[66]]},attributes:[_0x5315[37],_0x5315[67]]})}else {return}}}function handleOutboundRecordings(_0x81a6x13,_0x81a6x10){return function(_0x81a6x26){if(_0x81a6x10[_0x5315[66]]){if(_0x81a6x26&& _0x81a6x26[_0x5315[67]]){logger[_0x5315[13]](_0x5315[68],_0x81a6x26[_0x5315[37]]);_0x81a6x13[_0x5315[57]]= true}else {_0x81a6x13[_0x5315[57]]= false;logger[_0x5315[13]](_0x5315[69])}};return}}function getServerInfo(_0x81a6x13){return function(){var _0x81a6x10={method:_0x5315[70],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]]})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x10})}}function handleServerInfo(_0x81a6x13){return function(_0x81a6x10){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);var _0x81a6x29=_0x81a6x10[_0x5315[72]][_0x5315[71]](0);if(_0x81a6x29){_0x81a6x13[_0x5315[73]]= parseInt(_0x81a6x29)}else {_0x81a6x13[_0x5315[73]]= 6};return}}function searchAgent(_0x81a6x13){return function(){if(_0x81a6x13[_0x5315[51]]){logger[_0x5315[13]](_0x5315[74],_0x81a6x13[_0x5315[51]]);var _0x81a6x10={method:_0x5315[75],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:_0x5315[76],query:util[_0x5315[45]](_0x5315[77],_0x81a6x13[_0x5315[51]]),order_by:_0x5315[52],offset:_0x5315[78],select_fields:[_0x5315[37],_0x5315[62]],link_name_to_fields_array:[],max_results:-1,deleted:_0x5315[78]})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x10})}};return}function handleAgent(_0x81a6x13){return function(_0x81a6x10){if(_0x81a6x10){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x10[_0x5315[80]][_0x5315[79]]> 0&& _0x81a6x10[_0x5315[81]]> 0){logger[_0x5315[13]](_0x5315[82],_0x81a6x13[_0x5315[51]]);var _0x81a6x2c=getMatchObject(_0x81a6x10[_0x5315[80]],_0x5315[62],_0x5315[40],_0x81a6x13[_0x5315[51]]);_0x81a6x13[_0x5315[49]]= {id:_0x81a6x2c[_0x5315[42]][_0x5315[37]][_0x5315[40]],name:_0x81a6x2c[_0x5315[42]][_0x5315[62]][_0x5315[40]]};return _0x81a6x13[_0x5315[49]]};return};return}}function handleAdmin(_0x81a6x13){return function(_0x81a6x10){if(_0x81a6x10){return};logger[_0x5315[13]](_0x5315[83]);_0x81a6x13[_0x5315[49]]= _0x81a6x13[_0x5315[39]];logger[_0x5315[13]](_0x5315[84]);return}}function getEndUserSearchModule(_0x81a6x13){return _0x81a6x13[_0x5315[21]][_0x5315[85]]?_0x5315[86]:_0x81a6x13[_0x5315[21]][_0x5315[87]]}function searchEndUserWithDefaultMapping(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf){return function(){if(!_0x81a6x13[_0x5315[21]][_0x5315[85]]&& _0x81a6x13[_0x5315[21]][_0x5315[87]]){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[88],getEndUserSearchModule(_0x81a6x13),getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))));var _0x81a6x30={method:_0x5315[75],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:getEndUserSearchModule(_0x81a6x13),query:getEndUserSearchQuery(_0x81a6x13,_0x81a6x10,_0x81a6xe,_0x81a6xf),order_by:_0x5315[52],offset:_0x5315[78],select_fields:[_0x5315[37],_0x5315[62]],link_name_to_fields_array:[],max_results:-1,deleted:_0x5315[78]})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x30})};logger[_0x5315[36]](util[_0x5315[45]](_0x5315[89]));return}}function handleEndUserWithDefaultMapping(_0x81a6x13,_0x81a6xe,_0x81a6x32,_0x81a6xf){return function(_0x81a6x10){if(!_0x81a6x13[_0x5315[21]][_0x5315[85]]&& _0x81a6x13[_0x5315[21]][_0x5315[87]] && _0x81a6x10){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x10[_0x5315[80]][_0x5315[79]]> 0&& _0x81a6x10[_0x5315[81]]> 0){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[90],getEndUserSearchModule(_0x81a6x13),getValueFromPropertyName(_0x81a6x32,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))));_0x81a6x13[_0x5315[91]]= {id:_0x81a6x10[_0x5315[80]][0][_0x5315[42]][_0x5315[37]][_0x5315[40]],name:_0x81a6x10[_0x5315[80]][0][_0x5315[42]][_0x5315[62]][_0x5315[40]],module:getEndUserSearchModule(_0x81a6x13)}}else {logger[_0x5315[13]](util[_0x5315[45]](_0x5315[92],getEndUserSearchModule(_0x81a6x13),getValueFromPropertyName(_0x81a6x32,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))))}};return}}function searchEndUser(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf){return function(){if(_0x81a6x13[_0x5315[21]][_0x5315[85]]|| !_0x81a6x13[_0x5315[21]][_0x5315[87]]|| !_0x81a6x13[_0x5315[91]]){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[93],getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))));var _0x81a6x30={method:_0x5315[75],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:_0x5315[86],query:util[_0x5315[45]](_0x5315[94],getEndUserSearchQueryFromChannel(_0x81a6xe),getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))),order_by:_0x5315[52],offset:_0x5315[78],select_fields:[_0x5315[37],_0x5315[62]],link_name_to_fields_array:[],max_results:-1,deleted:_0x5315[78]})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x30})};logger[_0x5315[36]](util[_0x5315[45]](_0x5315[95]));return}}function getEndUserSearchQuery(_0x81a6x13,_0x81a6x10,_0x81a6xe,_0x81a6xf){var _0x81a6x35;var _0x81a6x36=_[_0x5315[97]](_0x81a6x13[_0x5315[21]][_0x5315[96]]);if(_[_0x5315[99]](_0x81a6x36,_0x5315[98])){_0x81a6x35= util[_0x5315[45]](_0x5315[100],_[_0x5315[101]](_0x81a6x13[_0x5315[21]][_0x5315[87]])+ _0x5315[102],_0x81a6x36,getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)))}else {_0x81a6x35= util[_0x5315[45]](_0x5315[100],_[_0x5315[101]](_0x81a6x13[_0x5315[21]][_0x5315[87]]),_0x81a6x36,getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)))};if(_0x81a6x13[_0x5315[21]][_0x5315[96]][_0x5315[79]]> 1){for(var _0x81a6x37=1;_0x81a6x37< _0x81a6x13[_0x5315[21]][_0x5315[96]][_0x5315[79]];_0x81a6x37++){var _0x81a6x38=_0x81a6x13[_0x5315[21]][_0x5315[96]][_0x81a6x37];if(_[_0x5315[99]](_0x81a6x36,_0x5315[98])){_0x81a6x35+= util[_0x5315[45]](_0x5315[103],_[_0x5315[101]](_0x81a6x13[_0x5315[21]][_0x5315[87]])+ _0x5315[102],_0x81a6x38,getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)))}else {_0x81a6x35+= util[_0x5315[45]](_0x5315[103],_[_0x5315[101]](_0x81a6x13[_0x5315[21]][_0x5315[87]]),_0x81a6x38,getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)))}}};return _0x81a6x35}function getEndUserSearchQueryFromChannel(_0x81a6xe){var _0x81a6x1f=_0x5315[52];if(_0x81a6xe){switch(_0x81a6xe){case _0x5315[54]:_0x81a6x1f= _0x5315[104];break;default:_0x81a6x1f= _0x5315[104];logger[_0x5315[17]](_0x5315[55],_0x81a6xe)}};return _0x81a6x1f}function getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf){var _0x81a6x1f=_0x5315[52];if(_0x81a6xe){switch(_0x81a6xe){case _0x5315[54]:if(_0x81a6xf=== _0x5315[105]){_0x81a6x1f= _0x5315[106]}else {if(_0x81a6xf=== _0x5315[61]){_0x81a6x1f= _0x5315[107]}};break;default:_0x81a6x1f= _0x5315[107];logger[_0x5315[17]](_0x5315[55],_0x81a6xe)}};return _0x81a6x1f}function handleEndUser(_0x81a6x13,_0x81a6xe,_0x81a6x32,_0x81a6xf){return function(_0x81a6x10){if(_0x81a6x13[_0x5315[21]][_0x5315[85]]|| !_0x81a6x13[_0x5315[21]][_0x5315[87]]|| !_0x81a6x13[_0x5315[91]]){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x10[_0x5315[80]][_0x5315[79]]> 0&& _0x81a6x10[_0x5315[81]]> 0){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[108],getValueFromPropertyName(_0x81a6x32,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))));_0x81a6x13[_0x5315[91]]= {id:_0x81a6x10[_0x5315[80]][0][_0x5315[42]][_0x5315[37]][_0x5315[40]],name:_0x81a6x10[_0x5315[80]][0][_0x5315[42]][_0x5315[62]][_0x5315[40]],module:_0x5315[86]}}};return _0x81a6x13[_0x5315[91]]}}function endUserCreation(_0x81a6x13,_0x81a6xe,_0x81a6x32,_0x81a6xf){return function(_0x81a6x10){if(_0x81a6x10){return};logger[_0x5315[13]](_0x5315[109],getValueFromPropertyName(_0x81a6x32,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)));var _0x81a6x30={method:_0x5315[110],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:_0x5315[86],name_value_list:getArrayForEndUserCreation(_0x81a6x13,_0x81a6xe,_0x81a6x32,_0x81a6xf)})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x30})}}function getEndUserCreatePhone(_0x81a6x13){return _[_0x5315[97]](_0x81a6x13[_0x5315[21]][_0x5315[96]])}function getArrayForEndUserCreation(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xf){var _0x81a6x3f=[];switch(_0x81a6xe){case _0x5315[54]:var _0x81a6x40={name:_0x5315[111]};if(_0x81a6xf=== _0x5315[61]){if(isValidName(_0x81a6x10[_0x5315[112]])){_0x81a6x40[_0x5315[40]]= getValueFromPropertyName(_0x81a6x10,getEndUserNamePropertyFromChannel(_0x81a6xe,_0x81a6xf))}else {_0x81a6x40[_0x5315[40]]= util[_0x5315[45]](_0x5315[113],getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)))}}else {if(_0x81a6xf=== _0x5315[105]){if(isValidName(_0x81a6x10[_0x5315[114]])){_0x81a6x40[_0x5315[40]]= getValueFromPropertyName(_0x81a6x10,getEndUserNamePropertyFromChannel(_0x81a6xe,_0x81a6xf))}else {_0x81a6x40[_0x5315[40]]= util[_0x5315[45]](_0x5315[113],getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)))}}};_0x81a6x3f[_0x5315[115]](_0x81a6x40);_0x81a6x3f[_0x5315[115]]({name:getEndUserSearchQueryFromChannel(_0x81a6xe),value:getValueFromPropertyName(_0x81a6x10,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf))});break;default:logger[_0x5315[17]](_0x5315[55],_0x81a6xe)};return _0x81a6x3f}function isValidName(_0x81a6x42){return _0x81a6x42&& _0x81a6x42!== _0x5315[116]}function getEndUserNamePropertyFromChannel(_0x81a6xe,_0x81a6xf){var _0x81a6x1f=_0x5315[52];if(_0x81a6xe){switch(_0x81a6xe){case _0x5315[54]:if(_0x81a6xf=== _0x5315[105]){_0x81a6x1f= _0x5315[114]}else {if(_0x81a6xf=== _0x5315[61]){_0x81a6x1f= _0x5315[112]}};break;default:_0x81a6x1f= _0x5315[112];logger[_0x5315[17]](_0x5315[55],_0x81a6xe)}};return _0x81a6x1f}function handleEndUserCreation(_0x81a6x13,_0x81a6xe,_0x81a6x32,_0x81a6xf){return function(_0x81a6x10){if(!_0x81a6x10){return};_0x81a6x10= handleWsResponse(_0x81a6x10);if(_0x81a6x10[_0x5315[37]]){logger[_0x5315[13]](_0x5315[117],getValueFromPropertyName(_0x81a6x32,getEndUserSearchPropertyFromChannel(_0x81a6xe,_0x81a6xf)));var _0x81a6x45=getEndUserSearchQueryFromChannel(_0x81a6xe);_0x81a6x13[_0x5315[91]]= {id:_0x81a6x10[_0x5315[37]],name:_0x81a6x10[_0x5315[80]][_0x81a6x45][_0x5315[40]],module:_0x5315[86]}};return}}function callCreation(_0x81a6x13,_0x81a6x32,_0x81a6x11){return function(){var _0x81a6x47= new Date();var _0x81a6x48=[{name:_0x5315[62],value:createSubjectFromConfiguration(_0x81a6x13,_0x81a6x32,_0x81a6x11)},{name:_0x5315[118],value:_0x81a6x13[_0x5315[49]][_0x5315[37]]},{name:_0x5315[119],value:_0x81a6x13[_0x5315[49]][_0x5315[37]]},{name:_0x5315[120],value:createDescriptionFromConfiguration(_0x81a6x13,_0x81a6x32,_0x81a6x11)},{name:_0x5315[121],value:_0x81a6x47[_0x5315[126]]()[_0x5315[125]](0,19)[_0x5315[124]](_0x5315[122],_0x5315[123])},{name:_0x5315[127],value:_0x5315[78]},{name:_0x5315[128],value:_0x5315[129]},{name:_0x5315[130],value:_0x81a6x13[_0x5315[91]][_0x5315[37]]},{name:_0x5315[131],value:_0x81a6x13[_0x5315[91]][_0x5315[132]]},{name:_0x5315[133],value:_0x81a6x13[_0x5315[91]][_0x5315[62]]}];var _0x81a6x49=createCustomFieldsFromConfiguration(_0x81a6x13,_0x81a6x32,_0x81a6x11);if(_0x81a6x49[_0x5315[79]]> 0){_[_0x5315[134]](_0x81a6x49,function(_0x81a6x4a){_0x81a6x48[_0x5315[115]]({name:_0x81a6x4a[_0x5315[37]],value:_0x81a6x4a[_0x5315[40]]})})};var _0x81a6x30={method:_0x5315[110],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:_0x5315[135],name_value_list:_0x81a6x48})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x30})}}function createSubjectFromConfiguration(_0x81a6x13,_0x81a6x32,_0x81a6x11){var _0x81a6x4c=_0x5315[52];var _0x81a6x4d=[];if(_0x81a6x13[_0x5315[21]][_0x5315[136]][_0x5315[79]]> 0){var _0x81a6x4e=_[_0x5315[137]](_0x81a6x13[_0x5315[21]].Subject,[_0x5315[37]]);_[_0x5315[134]](_0x81a6x4e,function(_0x81a6x4f){if(_0x81a6x4f[_0x5315[138]]=== _0x5315[139]){_0x81a6x4d[_0x5315[115]](_0x81a6x4f[_0x5315[140]])}else {if(_0x81a6x4f[_0x5315[138]]=== _0x5315[141]&& _0x81a6x4f[_0x5315[142]]){var _0x81a6x50=getValueFromPropertyName(_0x81a6x32,_0x81a6x4f[_0x5315[142]],_0x81a6x13);if(_0x81a6x50){_0x81a6x4d[_0x5315[115]](_0x81a6x50.toString())}}else {if(_0x81a6x4f[_0x5315[138]]=== _0x5315[143]&& _0x81a6x4f[_0x5315[144]]&& _0x81a6x4f[_0x5315[144]][_0x5315[62]]){_0x81a6x11[_0x81a6x4f[_0x5315[144]][_0x5315[62]]]&& _0x81a6x4d[_0x5315[115]](_0x81a6x11[_0x81a6x4f[_0x5315[144]][_0x5315[62]]].toString())}}}});_0x81a6x4c= _0x81a6x4d[_0x5315[145]](_0x5315[123])};return _0x81a6x4c}function createDescriptionFromConfiguration(_0x81a6x13,_0x81a6x32,_0x81a6x11){var _0x81a6x52=_0x5315[52];var _0x81a6x4d=[];if(_0x81a6x13[_0x5315[21]][_0x5315[146]][_0x5315[79]]> 0){var _0x81a6x53=_[_0x5315[137]](_0x81a6x13[_0x5315[21]].Description,[_0x5315[37]]);_[_0x5315[134]](_0x81a6x53,function(_0x81a6x4f){if(_0x81a6x4f[_0x5315[138]]=== _0x5315[139]){_0x81a6x4d[_0x5315[115]](_0x81a6x4f[_0x5315[140]])}else {if(_0x81a6x4f[_0x5315[138]]=== _0x5315[147]){if(_0x81a6x4f[_0x5315[148]]=== _0x5315[139]&& _0x81a6x4f[_0x5315[149]]){_0x81a6x4d[_0x5315[115]](util[_0x5315[45]](_0x5315[150],_0x81a6x4f[_0x5315[149]],_0x81a6x4f[_0x5315[151]]))}else {if(_0x81a6x4f[_0x5315[148]]=== _0x5315[141]&& _0x81a6x4f[_0x5315[142]]&& _0x81a6x4f[_0x5315[149]]){var _0x81a6x50=getValueFromPropertyName(_0x81a6x32,_0x81a6x4f[_0x5315[142]],_0x81a6x13);if(_0x81a6x50){_0x81a6x4d[_0x5315[115]](util[_0x5315[45]](_0x5315[150],_0x81a6x4f[_0x5315[149]],_0x81a6x50.toString()))}}else {if(_0x81a6x4f[_0x5315[148]]=== _0x5315[143]&& _0x81a6x4f[_0x5315[144]]&& _0x81a6x4f[_0x5315[144]][_0x5315[62]]&& _0x81a6x4f[_0x5315[149]]){_0x81a6x11[_0x81a6x4f[_0x5315[144]][_0x5315[62]]]&& _0x81a6x4d[_0x5315[115]](util[_0x5315[45]](_0x5315[150],_0x81a6x4f[_0x5315[149]],_0x81a6x11[_0x81a6x4f[_0x5315[144]][_0x5315[62]]]))}}}}}});_0x81a6x52= _0x81a6x4d[_0x5315[145]](_0x5315[152])};return _0x81a6x52}function createCustomFieldsFromConfiguration(_0x81a6x13,_0x81a6x32,_0x81a6x11){var _0x81a6x55=[];var _0x81a6x56=[];if(_0x81a6x13[_0x5315[21]][_0x5315[153]][_0x5315[79]]> 0){_0x81a6x55= _0x81a6x13[_0x5315[21]][_0x5315[153]];_[_0x5315[134]](_0x81a6x55,function(_0x81a6x4a){if(_0x81a6x4a[_0x5315[138]]=== _0x5315[139]&& _0x81a6x4a[_0x5315[154]]){_0x81a6x56[_0x5315[115]]({id:_0x81a6x4a[_0x5315[154]],value:_0x81a6x4a[_0x5315[140]]})}else {if(_0x81a6x4a[_0x5315[138]]=== _0x5315[141]&& _0x81a6x4a[_0x5315[142]]&& _0x81a6x4a[_0x5315[154]]){var _0x81a6x50=getValueFromPropertyName(_0x81a6x32,_0x81a6x4a[_0x5315[142]],_0x81a6x13);if(_0x81a6x50){_0x81a6x56[_0x5315[115]]({id:_0x81a6x4a[_0x5315[154]],value:_0x81a6x50.toString()})}}else {if(_0x81a6x4a[_0x5315[138]]=== _0x5315[143]&& _0x81a6x4a[_0x5315[154]]&& _0x81a6x4a[_0x5315[144]]&& _0x81a6x4a[_0x5315[144]][_0x5315[62]]){_0x81a6x11[_0x81a6x4a[_0x5315[144]][_0x5315[62]]]&& _0x81a6x56[_0x5315[115]]({id:_0x81a6x4a[_0x5315[154]],value:_0x81a6x11[_0x81a6x4a[_0x5315[144]][_0x5315[62]]].toString()})}}}})};return _0x81a6x56}function handleCallAgentAssociation(_0x81a6x13){return function(_0x81a6x10){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x10[_0x5315[37]]){_0x81a6x13[_0x5315[155]]= {id:_0x81a6x10[_0x5315[37]]};if(_0x81a6x13[_0x5315[73]]<= 6){_0x81a6x13[_0x5315[155]][_0x5315[156]]= util[_0x5315[45]](_0x5315[157],stripTrailingSlash(_0x81a6x13[_0x5315[21]][_0x5315[24]][_0x5315[26]]),_0x81a6x10[_0x5315[37]])}else {_0x81a6x13[_0x5315[155]][_0x5315[156]]= util[_0x5315[45]](_0x5315[158],stripTrailingSlash(_0x81a6x13[_0x5315[21]][_0x5315[24]][_0x5315[26]]),_0x81a6x10[_0x5315[37]])}};var _0x81a6x30={method:_0x5315[159],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:_0x5315[135],module_id:_0x81a6x13[_0x5315[155]][_0x5315[37]],link_field_name:_0x5315[160],related_ids:[_0x81a6x13[_0x5315[49]][_0x5315[37]]]})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x30})}}function handleCallContactAssociation(_0x81a6x13){return function(_0x81a6x10){_0x81a6x10= handleWsResponse(_0x81a6x10);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x10[_0x5315[161]]>= 1){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[162],_0x81a6x13[_0x5315[155]][_0x5315[37]],_0x81a6x13[_0x5315[49]][_0x5315[37]]))};var _0x81a6x30={method:_0x5315[159],input_type:_0x5315[33],response_type:_0x5315[33],rest_data:JSON[_0x5315[34]]({session:_0x81a6x13[_0x5315[38]],module_name:_0x5315[135],module_id:_0x81a6x13[_0x5315[155]][_0x5315[37]],link_field_name:_[_0x5315[101]](_0x81a6x13[_0x5315[91]][_0x5315[132]]),related_ids:[_0x81a6x13[_0x5315[91]][_0x5315[37]]]})};return rp({method:_0x5315[35],uri:_0x81a6x13[_0x5315[25]],form:_0x81a6x30})}}function handleReportIntegration(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xc,_0x81a6x12,_0x81a6xf){return function(_0x81a6x5a){_0x81a6x5a= handleWsResponse(_0x81a6x5a);logger[_0x5315[36]](_0x81a6x10);if(_0x81a6x5a[_0x5315[161]]>= 1){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[163],_0x81a6x13[_0x5315[155]][_0x5315[37]],_0x81a6x13[_0x5315[91]][_0x5315[37]]))};delete _0x81a6x10[_0x5315[37]];delete _0x81a6x10[_0x5315[164]];delete _0x81a6x10[_0x5315[165]];_0x81a6x10[_0x5315[166]]= _0x5315[167];_0x81a6x10[_0x5315[168]]= _0x81a6xe;_0x81a6x10[_0x5315[169]]= _0x5315[170];_0x81a6x10[_0x5315[171]]= _0x81a6x13[_0x5315[155]][_0x5315[37]];_0x81a6x10[_0x5315[156]]= _0x81a6x13[_0x5315[155]][_0x5315[156]];_0x81a6x10[_0x5315[172]]= _0x81a6xc;_0x81a6x10[_0x5315[173]]= _0x81a6xf;_0x81a6x12[_0x5315[177]](util[_0x5315[45]](_0x5315[176],_0x81a6x10[_0x5315[53]]))[_0x5315[175]](_0x5315[174],_0x81a6x10);return ReportIntegration[_0x5315[178]](_0x81a6x10)}}function handleEnd(_0x81a6x13){return function(_0x81a6x10){logger[_0x5315[13]](util[_0x5315[45]](_0x5315[179],_0x81a6x13[_0x5315[155]][_0x5315[37]],_0x81a6x13[_0x5315[49]][_0x5315[37]]));_0x81a6x13= undefined;return}}function handleError(_0x81a6x13,_0x81a6xe,_0x81a6x10,_0x81a6xc){return function(_0x81a6x5d){logger[_0x5315[17]](_0x5315[180]);logger[_0x5315[17]](_0x5315[181],_0x81a6x5d[_0x5315[182]]);logger[_0x5315[17]](_0x5315[183],_0x81a6x5d[_0x5315[184]]);_0x81a6x13= undefined;delete _0x81a6x10[_0x5315[37]];delete _0x81a6x10[_0x5315[164]];delete _0x81a6x10[_0x5315[165]];_0x81a6x10[_0x5315[166]]= _0x5315[167];_0x81a6x10[_0x5315[168]]= _0x81a6xe;_0x81a6x10[_0x5315[169]]= _0x5315[185];_0x81a6x10[_0x5315[172]]= _0x81a6xc;ReportIntegration[_0x5315[178]](_0x81a6x10)[_0x5315[18]](function(_0x81a6x5d){logger[_0x5315[17]](_0x5315[186]);return})}}function stripTrailingSlash(_0x81a6x5f){if(_0x81a6x5f[_0x5315[187]](-1) === _0x5315[188]){return _0x81a6x5f[_0x5315[187]](0,_0x81a6x5f[_0x5315[79]]- 1)};return _0x81a6x5f}function handleWsResponse(_0x81a6x10){return JSON[_0x5315[189]](_0x81a6x10)}function getMatchObject(_0x81a6x62,_0x81a6x1f,_0x81a6x63,_0x81a6x64){var _0x81a6x65=_[_0x5315[20]](_0x81a6x62,function(_0x81a6x66){return _0x81a6x66[_0x5315[42]][_0x81a6x1f][_0x81a6x63]== _0x81a6x64});if(_0x81a6x65){return _0x81a6x65};return _[_0x5315[190]](_0x81a6x62)}module[_0x5315[191]]= Sugarcrm