a0c28721a3fead832fb34b51aea02695a6949232
[motion2.git] / server / services / agi / reply.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xb2a9=['slice','trim','length','headers','emit','exports','util','stream','Transform','call','_localBuffer','_inBody','inherits','_transform','\x0d\x0a\x0d\x0a','toString','substring','indexOf'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0xb2a9,0x84));var _0x9b2a=function(_0x1b44be,_0x1cdbfb){_0x1b44be=_0x1b44be-0x0;var _0x2593db=_0xb2a9[_0x1b44be];return _0x2593db;};'use strict';var util=require(_0x9b2a('0x0'));var Transform=require(_0x9b2a('0x1'))[_0x9b2a('0x2')];function AGIReply(_0x64a9a3){Transform[_0x9b2a('0x3')](this,_0x64a9a3);this[_0x9b2a('0x4')]='';this[_0x9b2a('0x5')]=![];}util[_0x9b2a('0x6')](AGIReply,Transform);AGIReply['prototype'][_0x9b2a('0x7')]=function(_0x5d5a96,_0x38fa64,_0x2eafb0){var _0x31a9a3='\x0a',_0x442bf9=['\x0a\x0a',_0x9b2a('0x8')],_0x1946ce=-0x1,_0x45714d=-0x1,_0x37ed7c='',_0x5a5c6c=0x0,_0x3bfd74='',_0x508b0d='';this['_localBuffer']+=_0x5d5a96[_0x9b2a('0x9')]();_0x3bfd74=this[_0x9b2a('0x4')];if(!this[_0x9b2a('0x5')]){_0x5a5c6c=0x0;while(_0x442bf9[_0x5a5c6c]){while((_0x45714d=_0x3bfd74['indexOf'](_0x442bf9[_0x5a5c6c]))!=-0x1){_0x37ed7c=_0x442bf9[_0x5a5c6c];_0x508b0d=_0x3bfd74['substring'](0x0,_0x45714d);_0x3bfd74=_0x3bfd74[_0x9b2a('0xa')](_0x45714d+_0x37ed7c['length']);var _0x3429e5=_0x508b0d['split'](_0x31a9a3),_0xc9d298=0x0,_0x282719={},_0x1b7d6a='',_0xd952e1='',_0x349c01=-0x1;while(_0x3429e5[_0xc9d298]){_0x349c01=_0x3429e5[_0xc9d298][_0x9b2a('0xb')](':');if(_0x349c01!=-0x1){_0x1b7d6a=_0x3429e5[_0xc9d298]['slice'](0x0,_0x349c01)['trim']();_0xd952e1=_0x3429e5[_0xc9d298][_0x9b2a('0xc')](_0x349c01+0x1)[_0x9b2a('0xd')]();if(_0x1b7d6a[_0x9b2a('0xe')]>0x0){_0x282719[_0x1b7d6a]=_0xd952e1;}}else{}_0xc9d298++;}this['emit'](_0x9b2a('0xf'),_0x282719);this[_0x9b2a('0x5')]=!![];}_0x5a5c6c++;}this[_0x9b2a('0x4')]=_0x3bfd74;}else{while((_0x1946ce=_0x3bfd74[_0x9b2a('0xb')](_0x31a9a3))!=-0x1){_0x508b0d=_0x3bfd74[_0x9b2a('0xa')](0x0,_0x1946ce);this[_0x9b2a('0x10')]('line',_0x508b0d);_0x3bfd74=_0x3bfd74[_0x9b2a('0xa')](_0x1946ce+_0x31a9a3[_0x9b2a('0xe')]);}this[_0x9b2a('0x4')]=_0x3bfd74;}_0x2eafb0();};module[_0x9b2a('0x11')]=AGIReply;