08189df25870f039b5cc0c076829af7b35e37fff
[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 _0x609a=['stream','Transform','call','_localBuffer','inherits','_transform','_inBody','indexOf','substring','length','split','slice','trim','emit','line','exports','util'];(function(_0x2aec52,_0x59d962){var _0x3b8835=function(_0x3e2604){while(--_0x3e2604){_0x2aec52['push'](_0x2aec52['shift']());}};_0x3b8835(++_0x59d962);}(_0x609a,0x1ec));var _0xa609=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x609a[_0x20a584];return _0x4b41a8;};'use strict';var util=require(_0xa609('0x0'));var Transform=require(_0xa609('0x1'))[_0xa609('0x2')];function AGIReply(_0x45ae05){Transform[_0xa609('0x3')](this,_0x45ae05);this[_0xa609('0x4')]='';this['_inBody']=![];}util[_0xa609('0x5')](AGIReply,Transform);AGIReply['prototype'][_0xa609('0x6')]=function(_0x1c5977,_0x15c6de,_0x317946){var _0x31a510='\x0a',_0x409f8d=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0x394cde=-0x1,_0x269447=-0x1,_0x29f23a='',_0x3b5da3=0x0,_0x40257e='',_0x3d702b='';this[_0xa609('0x4')]+=_0x1c5977['toString']();_0x40257e=this[_0xa609('0x4')];if(!this[_0xa609('0x7')]){_0x3b5da3=0x0;while(_0x409f8d[_0x3b5da3]){while((_0x269447=_0x40257e[_0xa609('0x8')](_0x409f8d[_0x3b5da3]))!=-0x1){_0x29f23a=_0x409f8d[_0x3b5da3];_0x3d702b=_0x40257e[_0xa609('0x9')](0x0,_0x269447);_0x40257e=_0x40257e['substring'](_0x269447+_0x29f23a[_0xa609('0xa')]);var _0x1cc0a5=_0x3d702b[_0xa609('0xb')](_0x31a510),_0xa7c9d3=0x0,_0x49e8df={},_0x2b8729='',_0x28312c='',_0x190509=-0x1;while(_0x1cc0a5[_0xa7c9d3]){_0x190509=_0x1cc0a5[_0xa7c9d3][_0xa609('0x8')](':');if(_0x190509!=-0x1){_0x2b8729=_0x1cc0a5[_0xa7c9d3][_0xa609('0xc')](0x0,_0x190509)[_0xa609('0xd')]();_0x28312c=_0x1cc0a5[_0xa7c9d3][_0xa609('0xc')](_0x190509+0x1)[_0xa609('0xd')]();if(_0x2b8729[_0xa609('0xa')]>0x0){_0x49e8df[_0x2b8729]=_0x28312c;}}else{}_0xa7c9d3++;}this[_0xa609('0xe')]('headers',_0x49e8df);this[_0xa609('0x7')]=!![];}_0x3b5da3++;}this[_0xa609('0x4')]=_0x40257e;}else{while((_0x394cde=_0x40257e[_0xa609('0x8')](_0x31a510))!=-0x1){_0x3d702b=_0x40257e[_0xa609('0x9')](0x0,_0x394cde);this[_0xa609('0xe')](_0xa609('0xf'),_0x3d702b);_0x40257e=_0x40257e[_0xa609('0x9')](_0x394cde+_0x31a510[_0xa609('0xa')]);}this[_0xa609('0x4')]=_0x40257e;}_0x317946();};module[_0xa609('0x10')]=AGIReply;