Built motion from commit 9d0783e6.|2.6.13
[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 _0xd840=['stream','Transform','call','_localBuffer','_inBody','prototype','\x0d\x0a\x0d\x0a','toString','indexOf','substring','length','split','trim','slice','emit','line','exports','util'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xd840,0xd7));var _0x0d84=function(_0x1e3945,_0x4e5302){_0x1e3945=_0x1e3945-0x0;var _0x1abf06=_0xd840[_0x1e3945];return _0x1abf06;};'use strict';var util=require(_0x0d84('0x0'));var Transform=require(_0x0d84('0x1'))[_0x0d84('0x2')];function AGIReply(_0x58cd73){Transform[_0x0d84('0x3')](this,_0x58cd73);this[_0x0d84('0x4')]='';this[_0x0d84('0x5')]=![];}util['inherits'](AGIReply,Transform);AGIReply[_0x0d84('0x6')]['_transform']=function(_0x55e3b9,_0x3f5f34,_0x5e83a2){var _0x3f4732='\x0a',_0x5df0e9=['\x0a\x0a',_0x0d84('0x7')],_0x4edba8=-0x1,_0x95403c=-0x1,_0x3147a1='',_0x4e633e=0x0,_0x286d73='',_0x365421='';this['_localBuffer']+=_0x55e3b9[_0x0d84('0x8')]();_0x286d73=this[_0x0d84('0x4')];if(!this[_0x0d84('0x5')]){_0x4e633e=0x0;while(_0x5df0e9[_0x4e633e]){while((_0x95403c=_0x286d73[_0x0d84('0x9')](_0x5df0e9[_0x4e633e]))!=-0x1){_0x3147a1=_0x5df0e9[_0x4e633e];_0x365421=_0x286d73['substring'](0x0,_0x95403c);_0x286d73=_0x286d73[_0x0d84('0xa')](_0x95403c+_0x3147a1[_0x0d84('0xb')]);var _0x489d97=_0x365421[_0x0d84('0xc')](_0x3f4732),_0x418c8d=0x0,_0x4bed18={},_0xb14a7a='',_0x466792='',_0x5a2b57=-0x1;while(_0x489d97[_0x418c8d]){_0x5a2b57=_0x489d97[_0x418c8d][_0x0d84('0x9')](':');if(_0x5a2b57!=-0x1){_0xb14a7a=_0x489d97[_0x418c8d]['slice'](0x0,_0x5a2b57)[_0x0d84('0xd')]();_0x466792=_0x489d97[_0x418c8d][_0x0d84('0xe')](_0x5a2b57+0x1)['trim']();if(_0xb14a7a[_0x0d84('0xb')]>0x0){_0x4bed18[_0xb14a7a]=_0x466792;}}else{}_0x418c8d++;}this[_0x0d84('0xf')]('headers',_0x4bed18);this[_0x0d84('0x5')]=!![];}_0x4e633e++;}this['_localBuffer']=_0x286d73;}else{while((_0x4edba8=_0x286d73[_0x0d84('0x9')](_0x3f4732))!=-0x1){_0x365421=_0x286d73[_0x0d84('0xa')](0x0,_0x4edba8);this[_0x0d84('0xf')](_0x0d84('0x10'),_0x365421);_0x286d73=_0x286d73[_0x0d84('0xa')](_0x4edba8+_0x3f4732['length']);}this[_0x0d84('0x4')]=_0x286d73;}_0x5e83a2();};module[_0x0d84('0x11')]=AGIReply;