912f4fbfb47cddb8ee439939653e9f55e4083d17
[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 _0xf91d=['stream','Transform','call','_localBuffer','_inBody','inherits','prototype','toString','indexOf','substring','length','split','slice','trim','headers','line','exports','util'];(function(_0x224f8c,_0x192f2b){var _0x14cdd7=function(_0x1c66a8){while(--_0x1c66a8){_0x224f8c['push'](_0x224f8c['shift']());}};_0x14cdd7(++_0x192f2b);}(_0xf91d,0x155));var _0xdf91=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0xf91d[_0x2c91e9];return _0x13f0ff;};'use strict';var util=require(_0xdf91('0x0'));var Transform=require(_0xdf91('0x1'))[_0xdf91('0x2')];function AGIReply(_0x95d77d){Transform[_0xdf91('0x3')](this,_0x95d77d);this[_0xdf91('0x4')]='';this[_0xdf91('0x5')]=![];}util[_0xdf91('0x6')](AGIReply,Transform);AGIReply[_0xdf91('0x7')]['_transform']=function(_0x9e88e5,_0x293539,_0x224ff8){var _0x487cb8='\x0a',_0x71f381=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0x5cc25a=-0x1,_0x482672=-0x1,_0x460774='',_0x40d9eb=0x0,_0x5d710a='',_0x32f329='';this[_0xdf91('0x4')]+=_0x9e88e5[_0xdf91('0x8')]();_0x5d710a=this[_0xdf91('0x4')];if(!this['_inBody']){_0x40d9eb=0x0;while(_0x71f381[_0x40d9eb]){while((_0x482672=_0x5d710a[_0xdf91('0x9')](_0x71f381[_0x40d9eb]))!=-0x1){_0x460774=_0x71f381[_0x40d9eb];_0x32f329=_0x5d710a[_0xdf91('0xa')](0x0,_0x482672);_0x5d710a=_0x5d710a[_0xdf91('0xa')](_0x482672+_0x460774[_0xdf91('0xb')]);var _0x59868e=_0x32f329[_0xdf91('0xc')](_0x487cb8),_0x52646d=0x0,_0x5b7a10={},_0x469cc3='',_0x4bad36='',_0x39a056=-0x1;while(_0x59868e[_0x52646d]){_0x39a056=_0x59868e[_0x52646d][_0xdf91('0x9')](':');if(_0x39a056!=-0x1){_0x469cc3=_0x59868e[_0x52646d][_0xdf91('0xd')](0x0,_0x39a056)[_0xdf91('0xe')]();_0x4bad36=_0x59868e[_0x52646d][_0xdf91('0xd')](_0x39a056+0x1)['trim']();if(_0x469cc3[_0xdf91('0xb')]>0x0){_0x5b7a10[_0x469cc3]=_0x4bad36;}}else{}_0x52646d++;}this['emit'](_0xdf91('0xf'),_0x5b7a10);this['_inBody']=!![];}_0x40d9eb++;}this['_localBuffer']=_0x5d710a;}else{while((_0x5cc25a=_0x5d710a[_0xdf91('0x9')](_0x487cb8))!=-0x1){_0x32f329=_0x5d710a[_0xdf91('0xa')](0x0,_0x5cc25a);this['emit'](_0xdf91('0x10'),_0x32f329);_0x5d710a=_0x5d710a[_0xdf91('0xa')](_0x5cc25a+_0x487cb8[_0xdf91('0xb')]);}this[_0xdf91('0x4')]=_0x5d710a;}_0x224ff8();};module[_0xdf91('0x11')]=AGIReply;