f7ba37d934463c02c7938dd4c86360009f6abf27
[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 _0x2143=['slice','trim','length','emit','line','exports','util','stream','Transform','_localBuffer','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','indexOf','substring'];(function(_0x4ce39b,_0x30dca9){var _0x25957c=function(_0x398953){while(--_0x398953){_0x4ce39b['push'](_0x4ce39b['shift']());}};_0x25957c(++_0x30dca9);}(_0x2143,0x114));var _0x3214=function(_0x308ca1,_0xf8eb57){_0x308ca1=_0x308ca1-0x0;var _0x1c589e=_0x2143[_0x308ca1];return _0x1c589e;};'use strict';var util=require(_0x3214('0x0'));var Transform=require(_0x3214('0x1'))[_0x3214('0x2')];function AGIReply(_0x537f9a){Transform['call'](this,_0x537f9a);this[_0x3214('0x3')]='';this[_0x3214('0x4')]=![];}util[_0x3214('0x5')](AGIReply,Transform);AGIReply[_0x3214('0x6')][_0x3214('0x7')]=function(_0x438728,_0x24a495,_0x7f7687){var _0x84bc1e='\x0a',_0x22f4b2=['\x0a\x0a',_0x3214('0x8')],_0x1a6160=-0x1,_0x2224d3=-0x1,_0x1287b8='',_0x38b2ea=0x0,_0x4a16f1='',_0x529f01='';this[_0x3214('0x3')]+=_0x438728[_0x3214('0x9')]();_0x4a16f1=this[_0x3214('0x3')];if(!this[_0x3214('0x4')]){_0x38b2ea=0x0;while(_0x22f4b2[_0x38b2ea]){while((_0x2224d3=_0x4a16f1[_0x3214('0xa')](_0x22f4b2[_0x38b2ea]))!=-0x1){_0x1287b8=_0x22f4b2[_0x38b2ea];_0x529f01=_0x4a16f1['substring'](0x0,_0x2224d3);_0x4a16f1=_0x4a16f1[_0x3214('0xb')](_0x2224d3+_0x1287b8['length']);var _0x2b436f=_0x529f01['split'](_0x84bc1e),_0x1b705b=0x0,_0x378d3e={},_0x597c99='',_0x352cc0='',_0x1eefa4=-0x1;while(_0x2b436f[_0x1b705b]){_0x1eefa4=_0x2b436f[_0x1b705b]['indexOf'](':');if(_0x1eefa4!=-0x1){_0x597c99=_0x2b436f[_0x1b705b][_0x3214('0xc')](0x0,_0x1eefa4)['trim']();_0x352cc0=_0x2b436f[_0x1b705b][_0x3214('0xc')](_0x1eefa4+0x1)[_0x3214('0xd')]();if(_0x597c99[_0x3214('0xe')]>0x0){_0x378d3e[_0x597c99]=_0x352cc0;}}else{}_0x1b705b++;}this[_0x3214('0xf')]('headers',_0x378d3e);this[_0x3214('0x4')]=!![];}_0x38b2ea++;}this['_localBuffer']=_0x4a16f1;}else{while((_0x1a6160=_0x4a16f1['indexOf'](_0x84bc1e))!=-0x1){_0x529f01=_0x4a16f1[_0x3214('0xb')](0x0,_0x1a6160);this['emit'](_0x3214('0x10'),_0x529f01);_0x4a16f1=_0x4a16f1[_0x3214('0xb')](_0x1a6160+_0x84bc1e[_0x3214('0xe')]);}this[_0x3214('0x3')]=_0x4a16f1;}_0x7f7687();};module[_0x3214('0x11')]=AGIReply;