Built motion from commit f541bb3b.|2.6.14
[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 _0x8f94=['_transform','_localBuffer','indexOf','substring','length','split','slice','trim','headers','emit','line','util','stream','Transform','call','_inBody','inherits'];(function(_0x316100,_0x40076d){var _0x2e1935=function(_0x2dacf){while(--_0x2dacf){_0x316100['push'](_0x316100['shift']());}};_0x2e1935(++_0x40076d);}(_0x8f94,0xd7));var _0x48f9=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x8f94[_0x5b644e];return _0x49c6bf;};'use strict';var util=require(_0x48f9('0x0'));var Transform=require(_0x48f9('0x1'))[_0x48f9('0x2')];function AGIReply(_0x3cdb59){Transform[_0x48f9('0x3')](this,_0x3cdb59);this['_localBuffer']='';this[_0x48f9('0x4')]=![];}util[_0x48f9('0x5')](AGIReply,Transform);AGIReply['prototype'][_0x48f9('0x6')]=function(_0x53ecc4,_0x2f6a18,_0x5d427f){var _0x38c652='\x0a',_0x45cdf7=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0x48e93f=-0x1,_0x2fe384=-0x1,_0x28704d='',_0x24bc0f=0x0,_0x1fde15='',_0x1ec24c='';this[_0x48f9('0x7')]+=_0x53ecc4['toString']();_0x1fde15=this[_0x48f9('0x7')];if(!this[_0x48f9('0x4')]){_0x24bc0f=0x0;while(_0x45cdf7[_0x24bc0f]){while((_0x2fe384=_0x1fde15[_0x48f9('0x8')](_0x45cdf7[_0x24bc0f]))!=-0x1){_0x28704d=_0x45cdf7[_0x24bc0f];_0x1ec24c=_0x1fde15['substring'](0x0,_0x2fe384);_0x1fde15=_0x1fde15[_0x48f9('0x9')](_0x2fe384+_0x28704d[_0x48f9('0xa')]);var _0x4839ad=_0x1ec24c[_0x48f9('0xb')](_0x38c652),_0x18c127=0x0,_0x12cdfb={},_0xe9eceb='',_0x5249c3='',_0x28d8e9=-0x1;while(_0x4839ad[_0x18c127]){_0x28d8e9=_0x4839ad[_0x18c127]['indexOf'](':');if(_0x28d8e9!=-0x1){_0xe9eceb=_0x4839ad[_0x18c127][_0x48f9('0xc')](0x0,_0x28d8e9)[_0x48f9('0xd')]();_0x5249c3=_0x4839ad[_0x18c127][_0x48f9('0xc')](_0x28d8e9+0x1)['trim']();if(_0xe9eceb[_0x48f9('0xa')]>0x0){_0x12cdfb[_0xe9eceb]=_0x5249c3;}}else{}_0x18c127++;}this['emit'](_0x48f9('0xe'),_0x12cdfb);this[_0x48f9('0x4')]=!![];}_0x24bc0f++;}this[_0x48f9('0x7')]=_0x1fde15;}else{while((_0x48e93f=_0x1fde15[_0x48f9('0x8')](_0x38c652))!=-0x1){_0x1ec24c=_0x1fde15[_0x48f9('0x9')](0x0,_0x48e93f);this[_0x48f9('0xf')](_0x48f9('0x10'),_0x1ec24c);_0x1fde15=_0x1fde15[_0x48f9('0x9')](_0x48e93f+_0x38c652[_0x48f9('0xa')]);}this['_localBuffer']=_0x1fde15;}_0x5d427f();};module['exports']=AGIReply;