Built motion from commit fe7020c.|0.0.69
[motion.git] / server / config / integrations / zendesk.js
index ac4df1f..8fff394 100644 (file)
@@ -1 +1 @@
-var _0x897a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x5A\x65\x6E\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","\x5A\x65\x6E\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","\x5A\x65\x6E\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","\x6C\x6F\x67","\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","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\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","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\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","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\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\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\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","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x69\x64","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\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","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\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","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\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\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\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","\x65\x78\x70\x6F\x72\x74\x73"];_0x897a[0];var _=require(_0x897a[1]);var util=require(_0x897a[2]);var rp=require(_0x897a[3]);var ZendeskIntegration=require(_0x897a[5])[_0x897a[4]];var ZendeskConfiguration=require(_0x897a[5])[_0x897a[6]];var ReportIntegration=require(_0x897a[5])[_0x897a[7]];function Zendesk(){console[_0x897a[9]](_0x897a[8])}Zendesk[_0x897a[11]][_0x897a[10]]=function(_0x4f8dx8,_0x4f8dx9,_0x4f8dxa,_0x4f8dxb,_0x4f8dxc){var _0x4f8dxd={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined};if(!_0x4f8dx8|| !_0x4f8dx9){console[_0x897a[13]](_0x897a[12]);return};ZendeskConfiguration[_0x897a[16]]({where:{id:_0x4f8dx9,AccountId:_0x4f8dx8},include:[{all:true,include:[{all:true}]}]})[_0x897a[15]](handleEntityNotFound())[_0x897a[15]](handleConnection(_0x4f8dxd))[_0x897a[15]](searchAgent(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb))[_0x897a[15]](handleAgent(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb))[_0x897a[15]](searchAdmin(_0x4f8dxd))[_0x897a[15]](handleAdmin(_0x4f8dxd))[_0x897a[15]](searchEndUser(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb))[_0x897a[15]](handleEndUser(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb))[_0x897a[15]](endUserCreation(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb))[_0x897a[15]](handleEndUserCreation(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb))[_0x897a[15]](ticketCreation(_0x4f8dxd,_0x4f8dxb,_0x4f8dxc))[_0x897a[15]](handleTicketDisplay(_0x4f8dxd))[_0x897a[15]](handleReportIntegration(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb,_0x4f8dx8))[_0x897a[15]](handleEnd(_0x4f8dxd))[_0x897a[14]](handleError(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb,_0x4f8dx8))};function handleEntityNotFound(){return function(_0x4f8dxf){if(!_0x4f8dxf){return null};return _0x4f8dxf}}function handleConnection(_0x4f8dxd){return function(_0x4f8dx11){var _0x4f8dx12=getAccountConfiguration(_0x4f8dx11.ZendeskAccount);_0x4f8dxd[_0x897a[17]]=_0x4f8dx11;_0x4f8dxd[_0x897a[18]]=_0x4f8dx12[_0x897a[18]];_0x4f8dxd[_0x897a[19]]=_0x4f8dx12[_0x897a[19]]}}function getAccountConfiguration(_0x4f8dx14){var _0x4f8dx15={uri:stripTrailingSlash(_0x4f8dx14[_0x897a[20]]),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":_0x897a[21],"\x41\x63\x63\x65\x70\x74":_0x897a[21]}};var _0x4f8dx16=_0x4f8dx14[_0x897a[22]];if(_0x4f8dx14[_0x897a[23]]===_0x897a[24]){_0x4f8dx16=_0x4f8dx16+_0x897a[25]+_0x4f8dx14[_0x897a[24]]}else {if(_0x4f8dx14[_0x897a[23]]===_0x897a[26]){_0x4f8dx16=_0x4f8dx16+_0x897a[27]+_0x4f8dx14[_0x897a[26]]}};_0x4f8dx15[_0x897a[19]][_0x897a[28]]=_0x897a[29]+ new Buffer(_0x4f8dx16).toString(_0x897a[30]);return _0x4f8dx15}function searchAgent(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb){return function(){console[_0x897a[9]](_0x897a[31],getValueFromPropertyName(_0x4f8dxb,getAgentSearchPropertyFromChannel(_0x4f8dxa)));return rp({uri:_0x4f8dxd[_0x897a[18]]+_0x897a[32],qs:{"\x71\x75\x65\x72\x79":util[_0x897a[34]](_0x897a[33],getValueFromPropertyName(_0x4f8dxb,getAgentSearchPropertyFromChannel(_0x4f8dxa)))},headers:_0x4f8dxd[_0x897a[19]],json:true})}}function getAgentSearchPropertyFromChannel(_0x4f8dxa){var _0x4f8dx19=_0x897a[35];if(_0x4f8dxa){switch(_0x4f8dxa){case _0x897a[37]:_0x4f8dx19=_0x897a[36];break;default:_0x4f8dx19=_0x897a[36];console[_0x897a[13]](_0x897a[38],_0x4f8dxa)}};return _0x4f8dx19}function getValueFromPropertyName(_0x4f8dxb,_0x4f8dx19){return _[_0x897a[39]](_0x4f8dxb,_0x4f8dx19)}function handleAgent(_0x4f8dxd,_0x4f8dxa,_0x4f8dx1c){return function(_0x4f8dxb){if(_0x4f8dxb[_0x897a[41]][_0x897a[40]]>0&&_0x4f8dxb[_0x897a[42]]>0){console[_0x897a[9]](_0x897a[43],getValueFromPropertyName(_0x4f8dx1c,getAgentSearchPropertyFromChannel(_0x4f8dxa)));_0x4f8dxd[_0x897a[44]]=getMatchObject(_0x4f8dxb[_0x897a[41]],_0x897a[45],getValueFromPropertyName(_0x4f8dx1c,getAgentSearchPropertyFromChannel(_0x4f8dxa)));return _0x4f8dxd[_0x897a[44]]};return}}function getMatchObject(_0x4f8dx1e,_0x4f8dx19,_0x4f8dx1f){var _0x4f8dx20=_[_0x897a[16]](_0x4f8dx1e,{property:_0x4f8dx1f});if(_0x4f8dx20){return _0x4f8dx20};return _[_0x897a[46]](_0x4f8dx1e)}function searchAdmin(_0x4f8dxd){return function(_0x4f8dxb){if(_0x4f8dxb){return};console[_0x897a[9]](_0x897a[47]);return rp({uri:_0x4f8dxd[_0x897a[18]]+_0x897a[48],headers:_0x4f8dxd[_0x897a[19]],json:true})}}function handleAdmin(_0x4f8dxd){return function(_0x4f8dxb){if(!_0x4f8dxb){return};if(_0x4f8dxb[_0x897a[49]]){console[_0x897a[9]](_0x897a[50]);_0x4f8dxd[_0x897a[44]]=_0x4f8dxb[_0x897a[49]]};return}}function searchEndUser(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb){return function(){console[_0x897a[9]](_0x897a[51],getValueFromPropertyName(_0x4f8dxb,getEndUserSearchPropertyFromChannel(_0x4f8dxa)));return rp({uri:_0x4f8dxd[_0x897a[18]]+_0x897a[32],qs:{"\x71\x75\x65\x72\x79":util[_0x897a[34]](_0x897a[52],getEndUserSearchQueryFromChannel(_0x4f8dxa),getValueFromPropertyName(_0x4f8dxb,getEndUserSearchPropertyFromChannel(_0x4f8dxa)))},headers:_0x4f8dxd[_0x897a[19]],json:true})}}function getEndUserSearchQueryFromChannel(_0x4f8dxa){var _0x4f8dx19=_0x897a[35];if(_0x4f8dxa){switch(_0x4f8dxa){case _0x897a[37]:_0x4f8dx19=_0x897a[53];break;default:_0x4f8dx19=_0x897a[53];console[_0x897a[13]](_0x897a[38],_0x4f8dxa)}};return _0x4f8dx19}function getEndUserSearchPropertyFromChannel(_0x4f8dxa){var _0x4f8dx19=_0x897a[35];if(_0x4f8dxa){switch(_0x4f8dxa){case _0x897a[37]:_0x4f8dx19=_0x897a[54];break;default:_0x4f8dx19=_0x897a[54];console[_0x897a[13]](_0x897a[38],_0x4f8dxa)}};return _0x4f8dx19}function getEndUserNamePropertyFromChannel(_0x4f8dxa){var _0x4f8dx19=_0x897a[35];if(_0x4f8dxa){switch(_0x4f8dxa){case _0x897a[37]:_0x4f8dx19=_0x897a[55];break;default:_0x4f8dx19=_0x897a[55];console[_0x897a[13]](_0x897a[38],_0x4f8dxa)}};return _0x4f8dx19}function handleEndUser(_0x4f8dxd,_0x4f8dxa,_0x4f8dx1c){return function(_0x4f8dxb){if(_0x4f8dxb[_0x897a[41]][_0x897a[40]]>0&&_0x4f8dxb[_0x897a[42]]>0){console[_0x897a[9]](_0x897a[56],getValueFromPropertyName(_0x4f8dx1c,getEndUserSearchPropertyFromChannel(_0x4f8dxa)));_0x4f8dxd[_0x897a[57]]=_0x4f8dxb[_0x897a[41]][0];return _0x4f8dxd[_0x897a[57]]};return}}function endUserCreation(_0x4f8dxd,_0x4f8dxa,_0x4f8dx1c){return function(_0x4f8dxb){if(_0x4f8dxb){return};console[_0x897a[9]](_0x897a[58],getValueFromPropertyName(_0x4f8dx1c,getEndUserSearchPropertyFromChannel(_0x4f8dxa)));console[_0x897a[9]](getJsonForEndUserCreation(_0x4f8dxa,_0x4f8dx1c));return rp({uri:_0x4f8dxd[_0x897a[18]]+_0x897a[59],method:_0x897a[60],body:{user:getJsonForEndUserCreation(_0x4f8dxa,_0x4f8dx1c)},headers:_0x4f8dxd[_0x897a[19]],json:true})}}function getJsonForEndUserCreation(_0x4f8dxa,_0x4f8dxb){var _0x4f8dx2a={role:_0x897a[61]};switch(_0x4f8dxa){case _0x897a[37]:if(_0x4f8dxb[_0x897a[55]]){_0x4f8dx2a[_0x897a[45]]=getValueFromPropertyName(_0x4f8dxb,getEndUserNamePropertyFromChannel(_0x4f8dxa))}else {_0x4f8dx2a[_0x897a[45]]=util[_0x897a[34]](_0x897a[62],getValueFromPropertyName(_0x4f8dxb,getAgentSearchPropertyFromChannel(_0x4f8dxa)))};_0x4f8dx2a[_0x897a[53]]=getValueFromPropertyName(_0x4f8dxb,getEndUserSearchPropertyFromChannel(_0x4f8dxa));break;default:console[_0x897a[13]](_0x897a[38],_0x4f8dxa)};return _0x4f8dx2a}function handleEndUserCreation(_0x4f8dxd,_0x4f8dxa,_0x4f8dx1c){return function(_0x4f8dxb){if(!_0x4f8dxb){return};if(_0x4f8dxb[_0x897a[49]]){console[_0x897a[9]](_0x897a[63],getValueFromPropertyName(_0x4f8dx1c,getEndUserSearchPropertyFromChannel(_0x4f8dxa)));_0x4f8dxd[_0x897a[57]]=_0x4f8dxb[_0x897a[49]]};return}}function ticketCreation(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc){return function(){var _0x4f8dx2d={requester_id:_0x4f8dxd[_0x897a[44]][_0x897a[64]],submitter_id:_0x4f8dxd[_0x897a[57]][_0x897a[64]],assignee_id:_0x4f8dxd[_0x897a[57]][_0x897a[64]],tags:createTagsFromConfiguration(_0x4f8dxd),subject:createSubjectFromConfiguration(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc),description:createDescriptionFromConfiguration(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc),custom_fields:createCustomFieldsFromConfiguration(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc)};var _0x4f8dx2e=createFieldsFromConfiguration(_0x4f8dxd);if(_0x4f8dx2e[_0x897a[40]]>0){_[_0x897a[66]](_0x4f8dx2e,function(_0x4f8dx2f){_0x4f8dx2d[_0x4f8dx2f[_0x897a[64]]]=_0x4f8dx2f[_0x897a[65]]})};console[_0x897a[9]](_0x897a[67],_0x4f8dx2d);return rp({uri:_0x4f8dxd[_0x897a[18]]+_0x897a[68],method:_0x897a[60],body:{ticket:_0x4f8dx2d},headers:_0x4f8dxd[_0x897a[19]],json:true})}}function createTagsFromConfiguration(_0x4f8dxd){var _0x4f8dx31=[];if(_0x4f8dxd[_0x897a[17]][_0x897a[69]][_0x897a[40]]>0){_0x4f8dx31=_[_0x897a[70]](_0x4f8dxd[_0x897a[17]].Tags,_0x897a[45])};return _0x4f8dx31}function createSubjectFromConfiguration(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc){var _0x4f8dx33=_0x897a[35];var _0x4f8dx34=[];if(_0x4f8dxd[_0x897a[17]][_0x897a[71]][_0x897a[40]]>0){var _0x4f8dx35=_[_0x897a[72]](_0x4f8dxd[_0x897a[17]].Subject,[_0x897a[64]]);_[_0x897a[66]](_0x4f8dx35,function(_0x4f8dx36){if(_0x4f8dx36[_0x897a[73]]===_0x897a[74]){_0x4f8dx34[_0x897a[76]](_0x4f8dx36[_0x897a[75]])}else {if(_0x4f8dx36[_0x897a[73]]===_0x897a[77]&&_0x4f8dx36[_0x897a[78]]){var _0x4f8dx37=getValueFromPropertyName(_0x4f8dx1c,_0x4f8dx36[_0x897a[78]]);if(_0x4f8dx37){_0x4f8dx34[_0x897a[76]](_0x4f8dx37.toString())}}else {if(_0x4f8dx36[_0x897a[73]]===_0x897a[79]){var _0x4f8dx38=_[_0x897a[16]](_0x4f8dxc,{"\x6E\x61\x6D\x65":_0x4f8dx36[_0x897a[80]][_0x897a[45]]});if(_0x4f8dx38){_0x4f8dx34[_0x897a[76]](_0x4f8dx38[_0x897a[65]].toString())}}}}});_0x4f8dx33=_0x4f8dx34[_0x897a[82]](_0x897a[81])};return _0x4f8dx33}function createDescriptionFromConfiguration(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc){var _0x4f8dx3a=_0x897a[35];var _0x4f8dx34=[];if(_0x4f8dxd[_0x897a[17]][_0x897a[83]][_0x897a[40]]>0){var _0x4f8dx3b=_[_0x897a[72]](_0x4f8dxd[_0x897a[17]].Description,[_0x897a[64]]);_[_0x897a[66]](_0x4f8dx3b,function(_0x4f8dx36){if(_0x4f8dx36[_0x897a[73]]===_0x897a[74]){_0x4f8dx34[_0x897a[76]](_0x4f8dx36[_0x897a[75]])}else {if(_0x4f8dx36[_0x897a[73]]===_0x897a[84]){if(_0x4f8dx36[_0x897a[85]]===_0x897a[74]){_0x4f8dx34[_0x897a[76]](util[_0x897a[34]](_0x897a[86],_0x4f8dx36[_0x897a[87]],_0x4f8dx36[_0x897a[88]]))}else {if(_0x4f8dx36[_0x897a[85]]===_0x897a[77]&&_0x4f8dx36[_0x897a[78]]){var _0x4f8dx37=getValueFromPropertyName(_0x4f8dx1c,_0x4f8dx36[_0x897a[78]]);if(_0x4f8dx37){_0x4f8dx34[_0x897a[76]](util[_0x897a[34]](_0x897a[86],_0x4f8dx36[_0x897a[87]],_0x4f8dx37.toString()))}}else {if(_0x4f8dx36[_0x897a[85]]===_0x897a[79]){var _0x4f8dx38=_[_0x897a[16]](_0x4f8dxc,{"\x6E\x61\x6D\x65":_0x4f8dx36[_0x897a[80]][_0x897a[45]]});if(_0x4f8dx38){_0x4f8dx34[_0x897a[76]](util[_0x897a[34]](_0x897a[86],_0x4f8dx36[_0x897a[87]],_0x4f8dx38[_0x897a[65]].toString()))}}}}}}});_0x4f8dx3a=_0x4f8dx34[_0x897a[82]](_0x897a[89])};return _0x4f8dx3a}function createCustomFieldsFromConfiguration(_0x4f8dxd,_0x4f8dx1c,_0x4f8dxc){var _0x4f8dx3d=[];var _0x4f8dx3e=[];if(_0x4f8dxd[_0x897a[17]][_0x897a[90]][_0x897a[40]]>0){_0x4f8dx3d=_[_0x897a[91]](_0x4f8dxd[_0x897a[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0x897a[66]](_0x4f8dx3d,function(_0x4f8dx2f){if(_0x4f8dx2f[_0x897a[73]]===_0x897a[74]){_0x4f8dx3e[_0x897a[76]]({id:_0x4f8dx2f[_0x897a[92]],value:_0x4f8dx2f[_0x897a[75]]})}else {if(_0x4f8dx2f[_0x897a[73]]===_0x897a[77]){var _0x4f8dx37=getValueFromPropertyName(_0x4f8dx1c,_0x4f8dx2f[_0x897a[78]]);if(_0x4f8dx37){_0x4f8dx3e[_0x897a[76]]({id:_0x4f8dx2f[_0x897a[92]],value:_0x4f8dx37.toString()})}}else {if(_0x4f8dx2f[_0x897a[73]]===_0x897a[79]){var _0x4f8dx38=_[_0x897a[16]](_0x4f8dxc,{"\x6E\x61\x6D\x65":_0x4f8dx2f[_0x897a[80]][_0x897a[45]]});if(_0x4f8dx38){_0x4f8dx3e[_0x897a[76]]({id:_0x4f8dx2f[_0x897a[92]],value:_0x4f8dx38[_0x897a[65]].toString()})}}}}})};return _0x4f8dx3e}function createFieldsFromConfiguration(_0x4f8dxd){var _0x4f8dx2e=[];var _0x4f8dx3e=[];if(_0x4f8dxd[_0x897a[17]][_0x897a[90]][_0x897a[40]]>0){_0x4f8dx2e=_[_0x897a[91]](_0x4f8dxd[_0x897a[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0x897a[66]](_0x4f8dx2e,function(_0x4f8dx2f){if(_0x4f8dx2f[_0x897a[73]]===_0x897a[74]){_0x4f8dx3e[_0x897a[76]]({id:_0x4f8dx2f[_0x897a[93]],value:_0x4f8dx2f[_0x897a[75]]})}})};return _0x4f8dx3e}function handleTicketDisplay(_0x4f8dxd){return function(_0x4f8dxb){if(_0x4f8dxb[_0x897a[94]]){console[_0x897a[9]](_0x897a[95]);_0x4f8dxd[_0x897a[94]]=_0x4f8dxb[_0x897a[94]];var _0x4f8dx41=util[_0x897a[34]](_0x897a[96],_0x4f8dxd[_0x897a[44]][_0x897a[64]],_0x4f8dxd[_0x897a[94]][_0x897a[64]]);return rp({uri:_0x4f8dxd[_0x897a[18]]+_0x4f8dx41,method:_0x897a[60],headers:_0x4f8dxd[_0x897a[19]],json:true})};return}}function handleReportIntegration(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb,_0x4f8dx8){return function(){_0x4f8dxb=_0x4f8dxb[_0x897a[97]];delete _0x4f8dxb[_0x897a[64]];_0x4f8dxb[_0x897a[98]]=_0x897a[99];_0x4f8dxb[_0x897a[100]]=_0x4f8dxa;_0x4f8dxb[_0x897a[101]]=_0x897a[102];_0x4f8dxb[_0x897a[103]]=_0x4f8dxd[_0x897a[94]][_0x897a[64]];_0x4f8dxb[_0x897a[104]]=_0x4f8dx8;return ReportIntegration[_0x897a[105]](_0x4f8dxb)}}function handleEnd(_0x4f8dxd,_0x4f8dxb,_0x4f8dxa){return function(){console[_0x897a[9]](util[_0x897a[34]](_0x897a[106],_0x4f8dxd[_0x897a[94]][_0x897a[64]],_0x4f8dxd[_0x897a[44]][_0x897a[64]]));_0x4f8dxd=undefined;return}}function handleError(_0x4f8dxd,_0x4f8dxa,_0x4f8dxb,_0x4f8dx8){return function(_0x4f8dx45){console[_0x897a[13]](_0x897a[107]);console[_0x897a[13]](_0x897a[108],_0x4f8dx45[_0x897a[109]]);console[_0x897a[13]](_0x897a[110],_0x4f8dx45[_0x897a[111]]);_0x4f8dxd=undefined;delete _0x4f8dxb[_0x897a[64]];_0x4f8dxb=_0x4f8dxb[_0x897a[97]];_0x4f8dxb[_0x897a[98]]=_0x897a[99];_0x4f8dxb[_0x897a[100]]=_0x4f8dxa;_0x4f8dxb[_0x897a[101]]=_0x897a[112];_0x4f8dxb[_0x897a[104]]=_0x4f8dx8;ReportIntegration[_0x897a[105]](_0x4f8dxb)[_0x897a[15]](function(){return})[_0x897a[14]](function(_0x4f8dx45){console[_0x897a[13]](_0x897a[113]);return})}}function stripTrailingSlash(_0x4f8dx47){if(_0x4f8dx47[_0x897a[114]](-1)===_0x897a[115]){return _0x4f8dx47[_0x897a[114]](0,_0x4f8dx47[_0x897a[40]]-1)};return _0x4f8dx47}module[_0x897a[116]]=Zendesk
\ No newline at end of file
+var _0xc3ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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","\x5A\x65\x6E\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","\x5A\x65\x6E\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","\x5A\x65\x6E\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","\x6C\x6F\x67","\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","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\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","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\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","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\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\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\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","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x64\x65\x73\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x69\x64","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\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","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\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","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\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\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\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","\x65\x78\x70\x6F\x72\x74\x73"];_0xc3ac[0];var _=require(_0xc3ac[1]);var util=require(_0xc3ac[2]);var rp=require(_0xc3ac[3]);var ZendeskIntegration=require(_0xc3ac[5])[_0xc3ac[4]];var ZendeskConfiguration=require(_0xc3ac[5])[_0xc3ac[6]];var ReportIntegration=require(_0xc3ac[5])[_0xc3ac[7]];function Zendesk(){console[_0xc3ac[9]](_0xc3ac[8])}Zendesk[_0xc3ac[11]][_0xc3ac[10]]=function(_0xa0c3x8,_0xa0c3x9,_0xa0c3xa,_0xa0c3xb,_0xa0c3xc){var _0xa0c3xd={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined};if(!_0xa0c3x8|| !_0xa0c3x9){console[_0xc3ac[13]](_0xc3ac[12]);return};ZendeskConfiguration[_0xc3ac[16]]({where:{id:_0xa0c3x9,AccountId:_0xa0c3x8},include:[{all:true,include:[{all:true}]}]})[_0xc3ac[15]](handleEntityNotFound())[_0xc3ac[15]](handleConnection(_0xa0c3xd))[_0xc3ac[15]](searchAgent(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb))[_0xc3ac[15]](handleAgent(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb))[_0xc3ac[15]](searchAdmin(_0xa0c3xd))[_0xc3ac[15]](handleAdmin(_0xa0c3xd))[_0xc3ac[15]](searchEndUser(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb))[_0xc3ac[15]](handleEndUser(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb))[_0xc3ac[15]](endUserCreation(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb))[_0xc3ac[15]](handleEndUserCreation(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb))[_0xc3ac[15]](ticketCreation(_0xa0c3xd,_0xa0c3xb,_0xa0c3xc))[_0xc3ac[15]](handleTicketDisplay(_0xa0c3xd))[_0xc3ac[15]](handleReportIntegration(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb,_0xa0c3x8))[_0xc3ac[15]](handleEnd(_0xa0c3xd))[_0xc3ac[14]](handleError(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb,_0xa0c3x8))};function handleEntityNotFound(){return function(_0xa0c3xf){if(!_0xa0c3xf){return null};return _0xa0c3xf}}function handleConnection(_0xa0c3xd){return function(_0xa0c3x11){var _0xa0c3x12=getAccountConfiguration(_0xa0c3x11.ZendeskAccount);_0xa0c3xd[_0xc3ac[17]]=_0xa0c3x11;_0xa0c3xd[_0xc3ac[18]]=_0xa0c3x12[_0xc3ac[18]];_0xa0c3xd[_0xc3ac[19]]=_0xa0c3x12[_0xc3ac[19]]}}function getAccountConfiguration(_0xa0c3x14){var _0xa0c3x15={uri:stripTrailingSlash(_0xa0c3x14[_0xc3ac[20]]),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":_0xc3ac[21],"\x41\x63\x63\x65\x70\x74":_0xc3ac[21]}};var _0xa0c3x16=_0xa0c3x14[_0xc3ac[22]];if(_0xa0c3x14[_0xc3ac[23]]===_0xc3ac[24]){_0xa0c3x16=_0xa0c3x16+_0xc3ac[25]+_0xa0c3x14[_0xc3ac[24]]}else {if(_0xa0c3x14[_0xc3ac[23]]===_0xc3ac[26]){_0xa0c3x16=_0xa0c3x16+_0xc3ac[27]+_0xa0c3x14[_0xc3ac[26]]}};_0xa0c3x15[_0xc3ac[19]][_0xc3ac[28]]=_0xc3ac[29]+ new Buffer(_0xa0c3x16).toString(_0xc3ac[30]);return _0xa0c3x15}function searchAgent(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb){return function(){console[_0xc3ac[9]](_0xc3ac[31],getValueFromPropertyName(_0xa0c3xb,getAgentSearchPropertyFromChannel(_0xa0c3xa)));return rp({uri:_0xa0c3xd[_0xc3ac[18]]+_0xc3ac[32],qs:{"\x71\x75\x65\x72\x79":util[_0xc3ac[34]](_0xc3ac[33],getValueFromPropertyName(_0xa0c3xb,getAgentSearchPropertyFromChannel(_0xa0c3xa)))},headers:_0xa0c3xd[_0xc3ac[19]],json:true})}}function getAgentSearchPropertyFromChannel(_0xa0c3xa){var _0xa0c3x19=_0xc3ac[35];if(_0xa0c3xa){switch(_0xa0c3xa){case _0xc3ac[37]:_0xa0c3x19=_0xc3ac[36];break;default:_0xa0c3x19=_0xc3ac[36];console[_0xc3ac[13]](_0xc3ac[38],_0xa0c3xa)}};return _0xa0c3x19}function getValueFromPropertyName(_0xa0c3xb,_0xa0c3x19){return _[_0xc3ac[39]](_0xa0c3xb,_0xa0c3x19)}function handleAgent(_0xa0c3xd,_0xa0c3xa,_0xa0c3x1c){return function(_0xa0c3xb){if(_0xa0c3xb[_0xc3ac[41]][_0xc3ac[40]]>0&&_0xa0c3xb[_0xc3ac[42]]>0){console[_0xc3ac[9]](_0xc3ac[43],getValueFromPropertyName(_0xa0c3x1c,getAgentSearchPropertyFromChannel(_0xa0c3xa)));_0xa0c3xd[_0xc3ac[44]]=getMatchObject(_0xa0c3xb[_0xc3ac[41]],_0xc3ac[45],getValueFromPropertyName(_0xa0c3x1c,getAgentSearchPropertyFromChannel(_0xa0c3xa)));return _0xa0c3xd[_0xc3ac[44]]};return}}function getMatchObject(_0xa0c3x1e,_0xa0c3x19,_0xa0c3x1f){var _0xa0c3x20=_[_0xc3ac[16]](_0xa0c3x1e,{property:_0xa0c3x1f});if(_0xa0c3x20){return _0xa0c3x20};return _[_0xc3ac[46]](_0xa0c3x1e)}function searchAdmin(_0xa0c3xd){return function(_0xa0c3xb){if(_0xa0c3xb){return};console[_0xc3ac[9]](_0xc3ac[47]);return rp({uri:_0xa0c3xd[_0xc3ac[18]]+_0xc3ac[48],headers:_0xa0c3xd[_0xc3ac[19]],json:true})}}function handleAdmin(_0xa0c3xd){return function(_0xa0c3xb){if(!_0xa0c3xb){return};if(_0xa0c3xb[_0xc3ac[49]]){console[_0xc3ac[9]](_0xc3ac[50]);_0xa0c3xd[_0xc3ac[44]]=_0xa0c3xb[_0xc3ac[49]]};return}}function searchEndUser(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb){return function(){console[_0xc3ac[9]](_0xc3ac[51],getValueFromPropertyName(_0xa0c3xb,getEndUserSearchPropertyFromChannel(_0xa0c3xa)));return rp({uri:_0xa0c3xd[_0xc3ac[18]]+_0xc3ac[32],qs:{"\x71\x75\x65\x72\x79":util[_0xc3ac[34]](_0xc3ac[52],getEndUserSearchQueryFromChannel(_0xa0c3xa),getValueFromPropertyName(_0xa0c3xb,getEndUserSearchPropertyFromChannel(_0xa0c3xa)))},headers:_0xa0c3xd[_0xc3ac[19]],json:true})}}function getEndUserSearchQueryFromChannel(_0xa0c3xa){var _0xa0c3x19=_0xc3ac[35];if(_0xa0c3xa){switch(_0xa0c3xa){case _0xc3ac[37]:_0xa0c3x19=_0xc3ac[53];break;default:_0xa0c3x19=_0xc3ac[53];console[_0xc3ac[13]](_0xc3ac[38],_0xa0c3xa)}};return _0xa0c3x19}function getEndUserSearchPropertyFromChannel(_0xa0c3xa){var _0xa0c3x19=_0xc3ac[35];if(_0xa0c3xa){switch(_0xa0c3xa){case _0xc3ac[37]:_0xa0c3x19=_0xc3ac[54];break;default:_0xa0c3x19=_0xc3ac[54];console[_0xc3ac[13]](_0xc3ac[38],_0xa0c3xa)}};return _0xa0c3x19}function getEndUserNamePropertyFromChannel(_0xa0c3xa){var _0xa0c3x19=_0xc3ac[35];if(_0xa0c3xa){switch(_0xa0c3xa){case _0xc3ac[37]:_0xa0c3x19=_0xc3ac[55];break;default:_0xa0c3x19=_0xc3ac[55];console[_0xc3ac[13]](_0xc3ac[38],_0xa0c3xa)}};return _0xa0c3x19}function handleEndUser(_0xa0c3xd,_0xa0c3xa,_0xa0c3x1c){return function(_0xa0c3xb){if(_0xa0c3xb[_0xc3ac[41]][_0xc3ac[40]]>0&&_0xa0c3xb[_0xc3ac[42]]>0){console[_0xc3ac[9]](_0xc3ac[56],getValueFromPropertyName(_0xa0c3x1c,getEndUserSearchPropertyFromChannel(_0xa0c3xa)));_0xa0c3xd[_0xc3ac[57]]=_0xa0c3xb[_0xc3ac[41]][0];return _0xa0c3xd[_0xc3ac[57]]};return}}function endUserCreation(_0xa0c3xd,_0xa0c3xa,_0xa0c3x1c){return function(_0xa0c3xb){if(_0xa0c3xb){return};console[_0xc3ac[9]](_0xc3ac[58],getValueFromPropertyName(_0xa0c3x1c,getEndUserSearchPropertyFromChannel(_0xa0c3xa)));console[_0xc3ac[9]](getJsonForEndUserCreation(_0xa0c3xa,_0xa0c3x1c));return rp({uri:_0xa0c3xd[_0xc3ac[18]]+_0xc3ac[59],method:_0xc3ac[60],body:{user:getJsonForEndUserCreation(_0xa0c3xa,_0xa0c3x1c)},headers:_0xa0c3xd[_0xc3ac[19]],json:true})}}function getJsonForEndUserCreation(_0xa0c3xa,_0xa0c3xb){var _0xa0c3x2a={role:_0xc3ac[61]};switch(_0xa0c3xa){case _0xc3ac[37]:if(_0xa0c3xb[_0xc3ac[55]]){_0xa0c3x2a[_0xc3ac[45]]=getValueFromPropertyName(_0xa0c3xb,getEndUserNamePropertyFromChannel(_0xa0c3xa))}else {_0xa0c3x2a[_0xc3ac[45]]=util[_0xc3ac[34]](_0xc3ac[62],getValueFromPropertyName(_0xa0c3xb,getAgentSearchPropertyFromChannel(_0xa0c3xa)))};_0xa0c3x2a[_0xc3ac[53]]=getValueFromPropertyName(_0xa0c3xb,getEndUserSearchPropertyFromChannel(_0xa0c3xa));break;default:console[_0xc3ac[13]](_0xc3ac[38],_0xa0c3xa)};return _0xa0c3x2a}function handleEndUserCreation(_0xa0c3xd,_0xa0c3xa,_0xa0c3x1c){return function(_0xa0c3xb){if(!_0xa0c3xb){return};if(_0xa0c3xb[_0xc3ac[49]]){console[_0xc3ac[9]](_0xc3ac[63],getValueFromPropertyName(_0xa0c3x1c,getEndUserSearchPropertyFromChannel(_0xa0c3xa)));_0xa0c3xd[_0xc3ac[57]]=_0xa0c3xb[_0xc3ac[49]]};return}}function ticketCreation(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc){return function(){var _0xa0c3x2d={requester_id:_0xa0c3xd[_0xc3ac[44]][_0xc3ac[64]],submitter_id:_0xa0c3xd[_0xc3ac[57]][_0xc3ac[64]],assignee_id:_0xa0c3xd[_0xc3ac[57]][_0xc3ac[64]],tags:createTagsFromConfiguration(_0xa0c3xd),subject:createSubjectFromConfiguration(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc),description:createDescriptionFromConfiguration(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc),custom_fields:createCustomFieldsFromConfiguration(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc)};var _0xa0c3x2e=createFieldsFromConfiguration(_0xa0c3xd);if(_0xa0c3x2e[_0xc3ac[40]]>0){_[_0xc3ac[66]](_0xa0c3x2e,function(_0xa0c3x2f){_0xa0c3x2d[_0xa0c3x2f[_0xc3ac[64]]]=_0xa0c3x2f[_0xc3ac[65]]})};console[_0xc3ac[9]](_0xc3ac[67],_0xa0c3x2d);return rp({uri:_0xa0c3xd[_0xc3ac[18]]+_0xc3ac[68],method:_0xc3ac[60],body:{ticket:_0xa0c3x2d},headers:_0xa0c3xd[_0xc3ac[19]],json:true})}}function createTagsFromConfiguration(_0xa0c3xd){var _0xa0c3x31=[];if(_0xa0c3xd[_0xc3ac[17]][_0xc3ac[69]][_0xc3ac[40]]>0){_0xa0c3x31=_[_0xc3ac[70]](_0xa0c3xd[_0xc3ac[17]].Tags,_0xc3ac[45])};return _0xa0c3x31}function createSubjectFromConfiguration(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc){var _0xa0c3x33=_0xc3ac[35];var _0xa0c3x34=[];if(_0xa0c3xd[_0xc3ac[17]][_0xc3ac[71]][_0xc3ac[40]]>0){var _0xa0c3x35=_[_0xc3ac[72]](_0xa0c3xd[_0xc3ac[17]].Subject,[_0xc3ac[64]]);_[_0xc3ac[66]](_0xa0c3x35,function(_0xa0c3x36){if(_0xa0c3x36[_0xc3ac[73]]===_0xc3ac[74]){_0xa0c3x34[_0xc3ac[76]](_0xa0c3x36[_0xc3ac[75]])}else {if(_0xa0c3x36[_0xc3ac[73]]===_0xc3ac[77]&&_0xa0c3x36[_0xc3ac[78]]){var _0xa0c3x37=getValueFromPropertyName(_0xa0c3x1c,_0xa0c3x36[_0xc3ac[78]]);if(_0xa0c3x37){_0xa0c3x34[_0xc3ac[76]](_0xa0c3x37.toString())}}else {if(_0xa0c3x36[_0xc3ac[73]]===_0xc3ac[79]){var _0xa0c3x38=_[_0xc3ac[16]](_0xa0c3xc,{"\x6E\x61\x6D\x65":_0xa0c3x36[_0xc3ac[80]][_0xc3ac[45]]});if(_0xa0c3x38){_0xa0c3x34[_0xc3ac[76]](_0xa0c3x38[_0xc3ac[65]].toString())}}}}});_0xa0c3x33=_0xa0c3x34[_0xc3ac[82]](_0xc3ac[81])};return _0xa0c3x33}function createDescriptionFromConfiguration(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc){var _0xa0c3x3a=_0xc3ac[35];var _0xa0c3x34=[];if(_0xa0c3xd[_0xc3ac[17]][_0xc3ac[83]][_0xc3ac[40]]>0){var _0xa0c3x3b=_[_0xc3ac[72]](_0xa0c3xd[_0xc3ac[17]].Description,[_0xc3ac[64]]);_[_0xc3ac[66]](_0xa0c3x3b,function(_0xa0c3x36){if(_0xa0c3x36[_0xc3ac[73]]===_0xc3ac[74]){_0xa0c3x34[_0xc3ac[76]](_0xa0c3x36[_0xc3ac[75]])}else {if(_0xa0c3x36[_0xc3ac[73]]===_0xc3ac[84]){if(_0xa0c3x36[_0xc3ac[85]]===_0xc3ac[74]){_0xa0c3x34[_0xc3ac[76]](util[_0xc3ac[34]](_0xc3ac[86],_0xa0c3x36[_0xc3ac[87]],_0xa0c3x36[_0xc3ac[88]]))}else {if(_0xa0c3x36[_0xc3ac[85]]===_0xc3ac[77]&&_0xa0c3x36[_0xc3ac[78]]){var _0xa0c3x37=getValueFromPropertyName(_0xa0c3x1c,_0xa0c3x36[_0xc3ac[78]]);if(_0xa0c3x37){_0xa0c3x34[_0xc3ac[76]](util[_0xc3ac[34]](_0xc3ac[86],_0xa0c3x36[_0xc3ac[87]],_0xa0c3x37.toString()))}}else {if(_0xa0c3x36[_0xc3ac[85]]===_0xc3ac[79]){var _0xa0c3x38=_[_0xc3ac[16]](_0xa0c3xc,{"\x6E\x61\x6D\x65":_0xa0c3x36[_0xc3ac[80]][_0xc3ac[45]]});if(_0xa0c3x38){_0xa0c3x34[_0xc3ac[76]](util[_0xc3ac[34]](_0xc3ac[86],_0xa0c3x36[_0xc3ac[87]],_0xa0c3x38[_0xc3ac[65]].toString()))}}}}}}});_0xa0c3x3a=_0xa0c3x34[_0xc3ac[82]](_0xc3ac[89])};return _0xa0c3x3a}function createCustomFieldsFromConfiguration(_0xa0c3xd,_0xa0c3x1c,_0xa0c3xc){var _0xa0c3x3d=[];var _0xa0c3x3e=[];if(_0xa0c3xd[_0xc3ac[17]][_0xc3ac[90]][_0xc3ac[40]]>0){_0xa0c3x3d=_[_0xc3ac[91]](_0xa0c3xd[_0xc3ac[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xc3ac[66]](_0xa0c3x3d,function(_0xa0c3x2f){if(_0xa0c3x2f[_0xc3ac[73]]===_0xc3ac[74]){_0xa0c3x3e[_0xc3ac[76]]({id:_0xa0c3x2f[_0xc3ac[92]],value:_0xa0c3x2f[_0xc3ac[75]]})}else {if(_0xa0c3x2f[_0xc3ac[73]]===_0xc3ac[77]){var _0xa0c3x37=getValueFromPropertyName(_0xa0c3x1c,_0xa0c3x2f[_0xc3ac[78]]);if(_0xa0c3x37){_0xa0c3x3e[_0xc3ac[76]]({id:_0xa0c3x2f[_0xc3ac[92]],value:_0xa0c3x37.toString()})}}else {if(_0xa0c3x2f[_0xc3ac[73]]===_0xc3ac[79]){var _0xa0c3x38=_[_0xc3ac[16]](_0xa0c3xc,{"\x6E\x61\x6D\x65":_0xa0c3x2f[_0xc3ac[80]][_0xc3ac[45]]});if(_0xa0c3x38){_0xa0c3x3e[_0xc3ac[76]]({id:_0xa0c3x2f[_0xc3ac[92]],value:_0xa0c3x38[_0xc3ac[65]].toString()})}}}}})};return _0xa0c3x3e}function createFieldsFromConfiguration(_0xa0c3xd){var _0xa0c3x2e=[];var _0xa0c3x3e=[];if(_0xa0c3xd[_0xc3ac[17]][_0xc3ac[90]][_0xc3ac[40]]>0){_0xa0c3x2e=_[_0xc3ac[91]](_0xa0c3xd[_0xc3ac[17]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xc3ac[66]](_0xa0c3x2e,function(_0xa0c3x2f){if(_0xa0c3x2f[_0xc3ac[73]]===_0xc3ac[74]){_0xa0c3x3e[_0xc3ac[76]]({id:_0xa0c3x2f[_0xc3ac[93]],value:_0xa0c3x2f[_0xc3ac[75]]})}})};return _0xa0c3x3e}function handleTicketDisplay(_0xa0c3xd){return function(_0xa0c3xb){if(_0xa0c3xb[_0xc3ac[94]]){console[_0xc3ac[9]](_0xc3ac[95]);_0xa0c3xd[_0xc3ac[94]]=_0xa0c3xb[_0xc3ac[94]];var _0xa0c3x41=util[_0xc3ac[34]](_0xc3ac[96],_0xa0c3xd[_0xc3ac[44]][_0xc3ac[64]],_0xa0c3xd[_0xc3ac[94]][_0xc3ac[64]]);return rp({uri:_0xa0c3xd[_0xc3ac[18]]+_0xa0c3x41,method:_0xc3ac[60],headers:_0xa0c3xd[_0xc3ac[19]],json:true})};return}}function handleReportIntegration(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb,_0xa0c3x8){return function(){_0xa0c3xb=_0xa0c3xb[_0xc3ac[97]];delete _0xa0c3xb[_0xc3ac[64]];_0xa0c3xb[_0xc3ac[98]]=_0xc3ac[99];_0xa0c3xb[_0xc3ac[100]]=_0xa0c3xa;_0xa0c3xb[_0xc3ac[101]]=_0xc3ac[102];_0xa0c3xb[_0xc3ac[103]]=_0xa0c3xd[_0xc3ac[94]][_0xc3ac[64]];_0xa0c3xb[_0xc3ac[104]]=_0xa0c3x8;return ReportIntegration[_0xc3ac[105]](_0xa0c3xb)}}function handleEnd(_0xa0c3xd,_0xa0c3xb,_0xa0c3xa){return function(){console[_0xc3ac[9]](util[_0xc3ac[34]](_0xc3ac[106],_0xa0c3xd[_0xc3ac[94]][_0xc3ac[64]],_0xa0c3xd[_0xc3ac[44]][_0xc3ac[64]]));_0xa0c3xd=undefined;return}}function handleError(_0xa0c3xd,_0xa0c3xa,_0xa0c3xb,_0xa0c3x8){return function(_0xa0c3x45){console[_0xc3ac[13]](_0xc3ac[107]);console[_0xc3ac[13]](_0xc3ac[108],_0xa0c3x45[_0xc3ac[109]]);console[_0xc3ac[13]](_0xc3ac[110],_0xa0c3x45[_0xc3ac[111]]);_0xa0c3xd=undefined;delete _0xa0c3xb[_0xc3ac[64]];_0xa0c3xb=_0xa0c3xb[_0xc3ac[97]];_0xa0c3xb[_0xc3ac[98]]=_0xc3ac[99];_0xa0c3xb[_0xc3ac[100]]=_0xa0c3xa;_0xa0c3xb[_0xc3ac[101]]=_0xc3ac[112];_0xa0c3xb[_0xc3ac[104]]=_0xa0c3x8;ReportIntegration[_0xc3ac[105]](_0xa0c3xb)[_0xc3ac[15]](function(){return})[_0xc3ac[14]](function(_0xa0c3x45){console[_0xc3ac[13]](_0xc3ac[113]);return})}}function stripTrailingSlash(_0xa0c3x47){if(_0xa0c3x47[_0xc3ac[114]](-1)===_0xc3ac[115]){return _0xa0c3x47[_0xc3ac[114]](0,_0xa0c3x47[_0xc3ac[40]]-1)};return _0xa0c3x47}module[_0xc3ac[116]]=Zendesk
\ No newline at end of file