Built motion from commit e02f907f.|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 _0xd696=['length','slice','trim','emit','util','stream','Transform','call','_localBuffer','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','_inBody','indexOf','substring'];(function(_0x25b7ab,_0x1592c4){var _0x3266f6=function(_0x202cd5){while(--_0x202cd5){_0x25b7ab['push'](_0x25b7ab['shift']());}};_0x3266f6(++_0x1592c4);}(_0xd696,0xe1));var _0x6d69=function(_0x57b236,_0x30614e){_0x57b236=_0x57b236-0x0;var _0x4feb29=_0xd696[_0x57b236];return _0x4feb29;};'use strict';var util=require(_0x6d69('0x0'));var Transform=require(_0x6d69('0x1'))[_0x6d69('0x2')];function AGIReply(_0x1e364e){Transform[_0x6d69('0x3')](this,_0x1e364e);this[_0x6d69('0x4')]='';this['_inBody']=![];}util[_0x6d69('0x5')](AGIReply,Transform);AGIReply[_0x6d69('0x6')][_0x6d69('0x7')]=function(_0x4eb098,_0x21846e,_0x5afe26){var _0x21a1ee='\x0a',_0x24a98b=['\x0a\x0a',_0x6d69('0x8')],_0x485c8c=-0x1,_0x2a460c=-0x1,_0x5f4a8d='',_0x16e5de=0x0,_0x60ce2f='',_0x454a86='';this[_0x6d69('0x4')]+=_0x4eb098[_0x6d69('0x9')]();_0x60ce2f=this['_localBuffer'];if(!this[_0x6d69('0xa')]){_0x16e5de=0x0;while(_0x24a98b[_0x16e5de]){while((_0x2a460c=_0x60ce2f[_0x6d69('0xb')](_0x24a98b[_0x16e5de]))!=-0x1){_0x5f4a8d=_0x24a98b[_0x16e5de];_0x454a86=_0x60ce2f[_0x6d69('0xc')](0x0,_0x2a460c);_0x60ce2f=_0x60ce2f[_0x6d69('0xc')](_0x2a460c+_0x5f4a8d[_0x6d69('0xd')]);var _0x529009=_0x454a86['split'](_0x21a1ee),_0x10d4b4=0x0,_0x190a6d={},_0x4f8f66='',_0x12f5b7='',_0x4cd354=-0x1;while(_0x529009[_0x10d4b4]){_0x4cd354=_0x529009[_0x10d4b4][_0x6d69('0xb')](':');if(_0x4cd354!=-0x1){_0x4f8f66=_0x529009[_0x10d4b4][_0x6d69('0xe')](0x0,_0x4cd354)[_0x6d69('0xf')]();_0x12f5b7=_0x529009[_0x10d4b4][_0x6d69('0xe')](_0x4cd354+0x1)[_0x6d69('0xf')]();if(_0x4f8f66[_0x6d69('0xd')]>0x0){_0x190a6d[_0x4f8f66]=_0x12f5b7;}}else{}_0x10d4b4++;}this[_0x6d69('0x10')]('headers',_0x190a6d);this['_inBody']=!![];}_0x16e5de++;}this['_localBuffer']=_0x60ce2f;}else{while((_0x485c8c=_0x60ce2f[_0x6d69('0xb')](_0x21a1ee))!=-0x1){_0x454a86=_0x60ce2f[_0x6d69('0xc')](0x0,_0x485c8c);this[_0x6d69('0x10')]('line',_0x454a86);_0x60ce2f=_0x60ce2f['substring'](_0x485c8c+_0x21a1ee[_0x6d69('0xd')]);}this[_0x6d69('0x4')]=_0x60ce2f;}_0x5afe26();};module['exports']=AGIReply;