Built motion from commit 167bccf5.|2.6.7
[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 _0xd87b=['Transform','call','_localBuffer','_inBody','inherits','prototype','indexOf','split','slice','trim','length','emit','substring','line','stream'];(function(_0x9dfc10,_0x19c2d5){var _0x4f938a=function(_0x12b1e5){while(--_0x12b1e5){_0x9dfc10['push'](_0x9dfc10['shift']());}};_0x4f938a(++_0x19c2d5);}(_0xd87b,0xa4));var _0xbd87=function(_0x4e0556,_0x3624e4){_0x4e0556=_0x4e0556-0x0;var _0x5786fd=_0xd87b[_0x4e0556];return _0x5786fd;};'use strict';var util=require('util');var Transform=require(_0xbd87('0x0'))[_0xbd87('0x1')];function AGIReply(_0xe3405f){Transform[_0xbd87('0x2')](this,_0xe3405f);this[_0xbd87('0x3')]='';this[_0xbd87('0x4')]=![];}util[_0xbd87('0x5')](AGIReply,Transform);AGIReply[_0xbd87('0x6')]['_transform']=function(_0x310e4,_0x200edf,_0x2d7805){var _0x178970='\x0a',_0x2cd2ac=['\x0a\x0a','\x0d\x0a\x0d\x0a'],_0xc150a8=-0x1,_0x2ecc0a=-0x1,_0x59e071='',_0x51d259=0x0,_0xb5e834='',_0x164644='';this[_0xbd87('0x3')]+=_0x310e4['toString']();_0xb5e834=this[_0xbd87('0x3')];if(!this[_0xbd87('0x4')]){_0x51d259=0x0;while(_0x2cd2ac[_0x51d259]){while((_0x2ecc0a=_0xb5e834[_0xbd87('0x7')](_0x2cd2ac[_0x51d259]))!=-0x1){_0x59e071=_0x2cd2ac[_0x51d259];_0x164644=_0xb5e834['substring'](0x0,_0x2ecc0a);_0xb5e834=_0xb5e834['substring'](_0x2ecc0a+_0x59e071['length']);var _0x2d2e8b=_0x164644[_0xbd87('0x8')](_0x178970),_0x10ebdf=0x0,_0x2fd7db={},_0x42df29='',_0x3ab30b='',_0x4bfa6f=-0x1;while(_0x2d2e8b[_0x10ebdf]){_0x4bfa6f=_0x2d2e8b[_0x10ebdf][_0xbd87('0x7')](':');if(_0x4bfa6f!=-0x1){_0x42df29=_0x2d2e8b[_0x10ebdf][_0xbd87('0x9')](0x0,_0x4bfa6f)['trim']();_0x3ab30b=_0x2d2e8b[_0x10ebdf]['slice'](_0x4bfa6f+0x1)[_0xbd87('0xa')]();if(_0x42df29[_0xbd87('0xb')]>0x0){_0x2fd7db[_0x42df29]=_0x3ab30b;}}else{}_0x10ebdf++;}this[_0xbd87('0xc')]('headers',_0x2fd7db);this[_0xbd87('0x4')]=!![];}_0x51d259++;}this[_0xbd87('0x3')]=_0xb5e834;}else{while((_0xc150a8=_0xb5e834[_0xbd87('0x7')](_0x178970))!=-0x1){_0x164644=_0xb5e834[_0xbd87('0xd')](0x0,_0xc150a8);this[_0xbd87('0xc')](_0xbd87('0xe'),_0x164644);_0xb5e834=_0xb5e834[_0xbd87('0xd')](_0xc150a8+_0x178970[_0xbd87('0xb')]);}this[_0xbd87('0x3')]=_0xb5e834;}_0x2d7805();};module['exports']=AGIReply;