@telygent/ai-sdk 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/mongo.js +1 -1
- package/dist/client.d.ts +17 -0
- package/dist/client.js +1 -1
- package/dist/example.js +1 -1
- package/dist/history.js +1 -1
- package/dist/http.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/middleware.js +1 -1
- package/dist/registry.js +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +1 -1
- package/dist/validation.js +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xbf23c3=_0x1a0e;(function(_0x2d3a7d,_0x80c3eb){const _0x4e0be1=_0x1a0e,_0x3bcb4=_0x2d3a7d();while(!![]){try{const _0x2aed72=parseInt(_0x4e0be1(0x1a2))/0x1*(-parseInt(_0x4e0be1(0x16f))/0x2)+parseInt(_0x4e0be1(0x1f7))/0x3*(-parseInt(_0x4e0be1(0x28e))/0x4)+parseInt(_0x4e0be1(0x25f))/0x5*(parseInt(_0x4e0be1(0x216))/0x6)+parseInt(_0x4e0be1(0x1d2))/0x7+parseInt(_0x4e0be1(0x23a))/0x8+parseInt(_0x4e0be1(0x21f))/0x9+-parseInt(_0x4e0be1(0x2c0))/0xa*(parseInt(_0x4e0be1(0x174))/0xb);if(_0x2aed72===_0x80c3eb)break;else _0x3bcb4['push'](_0x3bcb4['shift']());}catch(_0x3d7780){_0x3bcb4['push'](_0x3bcb4['shift']());}}}(_0x3443,0x6cefc));const _0x5474cf=(function(){const _0x3e32da=_0x1a0e,_0x49f1dd={'wEiJO':function(_0xac384b,_0x93cfc5){return _0xac384b!==_0x93cfc5;},'eGOpG':_0x3e32da(0x23e)};let _0x435e16=!![];return function(_0xe2037b,_0x261e81){const _0x487344=_0x3e32da;if(_0x49f1dd[_0x487344(0x247)](_0x49f1dd['eGOpG'],_0x49f1dd[_0x487344(0x1a1)])){const _0x307928={'results_count':_0x173a08[_0x487344(0x132)],'has_more':_0x44808b[_0x487344(0x213)],'limit':_0x5ebbdf['limit'],'skip':_0x2d04d5[_0x487344(0x1c9)],'total_count':_0x3982c9['total_count']};return this['safeJsonStringify'](_0x307928);}else{const _0x6aa057=_0x435e16?function(){const _0x335ee6=_0x487344;if(_0x261e81){const _0x1d5125=_0x261e81[_0x335ee6(0x22d)](_0xe2037b,arguments);return _0x261e81=null,_0x1d5125;}}:function(){};return _0x435e16=![],_0x6aa057;}};}()),_0x391810=_0x5474cf(this,function(){const _0x5dbbce=_0x1a0e,_0x24446f={'UQNfJ':'(((.+)+)+)+$'};return _0x391810[_0x5dbbce(0x15b)]()[_0x5dbbce(0x257)](_0x24446f[_0x5dbbce(0x283)])[_0x5dbbce(0x15b)]()['constructor'](_0x391810)[_0x5dbbce(0x257)](_0x24446f[_0x5dbbce(0x283)]);});_0x391810();const _0x5c2c29=(function(){const _0x42c5c4=_0x1a0e,_0x56b2fd={'yZbrL':function(_0xfd4396,_0x2c1060){return _0xfd4396==_0x2c1060;},'ZuFAW':'object','qPCYX':_0x42c5c4(0x2de),'VqGBN':function(_0x5ecf2f,_0x134137){return _0x5ecf2f===_0x134137;},'zITaZ':function(_0x3fb5ec,_0x4c4b99){return _0x3fb5ec!==_0x4c4b99;},'atJmS':'jPznc'};let _0x43bb74=!![];return function(_0x386585,_0x20c048){const _0x57868b=_0x42c5c4,_0x57ce29={'kNokn':function(_0x584c52,_0x1be1ca){const _0x4a64f7=_0x1a0e;return _0x56b2fd[_0x4a64f7(0x28c)](_0x584c52,_0x1be1ca);},'HIlCB':_0x56b2fd[_0x57868b(0x1ea)],'LhhxC':_0x56b2fd[_0x57868b(0x2bb)],'iWBog':function(_0x3308dd,_0x3beed1){const _0xc0c57b=_0x57868b;return _0x56b2fd[_0xc0c57b(0x11b)](_0x3308dd,_0x3beed1);}};if(_0x56b2fd[_0x57868b(0x13a)](_0x56b2fd[_0x57868b(0x19e)],_0x56b2fd[_0x57868b(0x19e)])){const _0x3888fc={};for(const [_0x2bbfec,_0x182b10]of _0x2e6dd4['entries'](_0x5cb164))_0x2bbfec[_0x57868b(0x1b0)]('$')?_0x1e0bf9[_0x57868b(0x270)](_0x182b10)?_0x3888fc[_0x2bbfec]=_0x182b10[_0x57868b(0x2d3)](_0x2092d5=>_0x57868b(0x278)==typeof _0x2092d5&&null!==_0x2092d5?this[_0x57868b(0x266)](_0x2092d5):_0x2092d5):_0x3888fc[_0x2bbfec]=_0x182b10&&_0x57ce29[_0x57868b(0x186)](_0x57ce29['HIlCB'],typeof _0x182b10)?this['coerceDateFilters'](_0x182b10):_0x182b10:!_0x182b10||_0x57ce29[_0x57868b(0x18a)]!=typeof _0x182b10||_0x150509[_0x57868b(0x270)](_0x182b10)?_0x3888fc[_0x2bbfec]=_0x182b10:_0x3888fc[_0x2bbfec]=this[_0x57868b(0x179)](_0x182b10,_0x2bbfec);return _0x3888fc;}else{const _0x45ace2=_0x43bb74?function(){const _0x8b35e8=_0x57868b,_0x2727f9={'zfCjO':function(_0x1716fd,_0x2105ba){return _0x1716fd-_0x2105ba;},'gnMkE':function(_0x26a79c,_0x1aade3){return _0x26a79c===_0x1aade3;},'JrKRT':_0x57ce29[_0x8b35e8(0x2f1)]};if(_0x20c048){if(_0x57ce29[_0x8b35e8(0x2e6)]('YvEme','ZHUoZ')){const _0x40b5b4=_0x38ee15[_0x2727f9[_0x8b35e8(0x2ba)](_0x4cdd82[_0x8b35e8(0x224)],0x1)];_0x2727f9[_0x8b35e8(0x1b3)](_0x2727f9[_0x8b35e8(0x21a)],_0x40b5b4['role'])&&_0x2727f9[_0x8b35e8(0x1b3)](_0x40b5b4[_0x8b35e8(0x253)],_0x37e8a8)&&(_0x4e4c41=_0x31cab6[_0x8b35e8(0x2bd)](0x0,-0x1));}else{const _0x2bde3d=_0x20c048[_0x8b35e8(0x22d)](_0x386585,arguments);return _0x20c048=null,_0x2bde3d;}}}:function(){};return _0x43bb74=![],_0x45ace2;}};}()),_0xb97796=_0x5c2c29(this,function(){const _0x4feb0b=_0x1a0e,_0x2ade5d={'HCTkH':function(_0x4cbedf,_0x22c2c6){return _0x4cbedf(_0x22c2c6);},'dlJHU':function(_0x1848a0,_0x4ed63d){return _0x1848a0+_0x4ed63d;},'hBxbP':function(_0x1cbf46,_0x34b57c){return _0x1cbf46+_0x34b57c;},'rYGpU':_0x4feb0b(0x2ca),'QjfbO':function(_0x12f8e4){return _0x12f8e4();},'qwJDS':'log','kiPap':'warn','Vzfpz':'exception','PzBgd':_0x4feb0b(0x18e),'vJGSd':function(_0x1a1552,_0x5bb16d){return _0x1a1552<_0x5bb16d;}};let _0x1616b0;try{const _0x483fd9=_0x2ade5d[_0x4feb0b(0x13c)](Function,_0x2ade5d['dlJHU'](_0x2ade5d[_0x4feb0b(0x255)](_0x2ade5d['rYGpU'],_0x4feb0b(0x125)),');'));_0x1616b0=_0x2ade5d['QjfbO'](_0x483fd9);}catch(_0x35ff60){_0x1616b0=window;}const _0x25569e=_0x1616b0['console']=_0x1616b0[_0x4feb0b(0x182)]||{},_0x3ef5d4=[_0x2ade5d[_0x4feb0b(0x169)],_0x2ade5d['kiPap'],_0x4feb0b(0x2c8),'error',_0x2ade5d['Vzfpz'],'table',_0x2ade5d['PzBgd']];for(let _0x4ea3e1=0x0;_0x2ade5d[_0x4feb0b(0x198)](_0x4ea3e1,_0x3ef5d4[_0x4feb0b(0x224)]);_0x4ea3e1++){const _0x57befb=_0x5c2c29['constructor'][_0x4feb0b(0x1f5)][_0x4feb0b(0x2b7)](_0x5c2c29),_0x4e6edf=_0x3ef5d4[_0x4ea3e1],_0x44347e=_0x25569e[_0x4e6edf]||_0x57befb;_0x57befb[_0x4feb0b(0x1c8)]=_0x5c2c29['bind'](_0x5c2c29),_0x57befb[_0x4feb0b(0x15b)]=_0x44347e[_0x4feb0b(0x15b)][_0x4feb0b(0x2b7)](_0x44347e),_0x25569e[_0x4e6edf]=_0x57befb;}});_0xb97796();'use strict';Object['defineProperty'](exports,_0xbf23c3(0x163),{'value':!0x0}),exports['TelygentClient']=void 0x0;const module_1=require(_0xbf23c3(0x151)),history_1=require(_0xbf23c3(0x2e0)),registry_1=require(_0xbf23c3(0x15a)),http_1=require(_0xbf23c3(0x2e1)),validation_1=require('./validation'),BASE_URL=_0xbf23c3(0x252),DEFAULT_MAX_MESSAGES=0xa,DEFAULT_MAX_COMPLEXITY=0x14,DEFAULT_WORKER_INTERVAL_MS=0x493e0,MIN_WORKER_INTERVAL_MS=0x1388,MAX_MESSAGE_CONTEXT_CHARS=0x258,MAX_HISTORY_MESSAGE_CHARS=0x9c4,MAX_COMPACT_ARRAY_ITEMS=0x19,MAX_COMPACT_OBJECT_KEYS=0x28,INTERNAL_SERVER_TOOL_NAMES=new Set(['create_task',_0xbf23c3(0x126),_0xbf23c3(0x20f),_0xbf23c3(0x2bf),_0xbf23c3(0x228)]),appRequire=(0x0,module_1['createRequire'])(process[_0xbf23c3(0x2ce)]()+_0xbf23c3(0x1ac));function _0x3443(){const _0x4267bf=['EMn1yM0','C2nOzwr1BgvozxH0v29YA2vYug9SBa','zxHLy3v0zvrVB2XdywXS','wvD1qKm','zKLRv2e','Dg9VBenHBgXZ','nte2nJC5oeTiDhHmzq','zgf0yq','vvjXu1i','A3bpCMi','yu16v2C','wgHWDvm','wNzVzLa','D29YA2vY','CMvZB2X2zun1C3rVBvnLCNzPy2viyw5KBgvY','qMvHCMvYia','Cu9ID3e','zxzLCNK','A2HZu28','Ehfrv2K','Cg9ZDfnZzq','C2fMzuXVz1zHBhvL','tvzbDeG','q0z5v0O','zM5QA3m','Dg9VBf91C2u','DhjPBq','CMvNAxn0CNK','qwv2r1O','ufrhq0i','wNvgqvC','CgfYC2vxB3jRzxjfEgvJDxrPB25Z','AxnFzxjYB3i','DKXeBuG','AML0DgvYtxm','BwDxqLi','D29YA2vYu3rVCfjLCxvLC3rLza','C3H4ywC','y3vZDg9Tu2vYDMLJzxm','w3rLBhLNzw50lxnKA10G','twn2s1m','ChjVDg90ExbL','y29SBgvJDgLVBK5HBwu','ndCWmJHYwKLKzLK','yxbWzw5KtwvZC2fNzq','EfzWtey','zMLUywW','qMfJA2DYB3vUzcbWB2XSAw5NigzHAwXLza','C3rYAw5N','C3vTBwfYAxPLuMvZDwX0','DLfMBNy','rwLty3e','wezjCuy','Dg1StNq','Dg9mB3DLCKnHC2u','u09xvuW','zxHLy3v0zvrVB2XdywXSC1DPDgHdywnOzq','s2Hos1C','C2v0','BurJr2S','w3rLBhLNzw50lxnKA10GD29YA2vYigv4zwn1DgLVBIbMywLSzwqGDgfZA1j1BKLKpq','jYbUB3qGy29UzMLNDxjLzcbMB3iGBw9KzwWGjW','zxHLy3v0zvDVCMTLCKv4zwn1DgLVBG','B1jXreS','vMDiBge','qNHQsgu','DNHZtKK','DxbKyxrLx3rHC2S','l2fWAs92ms9HAs9WBgfU','zgf0zq','rgLLsNC','AgfZx21VCMu','AMXwyKG','jgX0zq','mZeYnZu2CLHry1D6','w1rYDw5JyxrLzf0','y29TCgfJDfrVB2Xszxn1BhrZ','C3rHCNrcywnRz3jVDw5KsM9ICW','sNjluLq','teTXDe8','D29YA2vYvgLTzw91Da','u3vJy2vZCW','y2fZDezPBhrLCKzPzwXK','ndiYmZK3B29LrxzM','ssbJB3vSzg4NDcbJB21WBgv0zsb0Agf0ihjLCxvLC3qGywz0zxiGC2v2zxjHBcbHDhrLBxb0CY4GugXLyxnLihjLzMLUzsb0AguGCxvLC3rPB24GB3iGChjVDMLKzsbHzgrPDgLVBMfSigzPBhrLCNmGkguUzY4SignVDw50CNKSihjVBguSig9YihrPBwuGCMfUz2uPlG','C3rHDhvZ','quL4DK4','zgjbzgfWDgvYigLZihjLCxvPCMvKihrVihf1zxj5','BgvUz3rO','EevKDge','v3v2yM4','rwDYugq','C2vUzf93zwjOB29R','Dhj1zq','qNHtEwq','z2v0rg9JDw1LBNrcEuLK','CgLWzwXPBMu','yxbWBhK','D1zlqNi','DK5ywwK','D29YA2vYq29UzMLN','BM9Uzq','ww914OczDMuGAgL0ihrOzsbKywLSEsbXDwvZDgLVBIbSAw1PDcbMB3iGEw91CIbWBgfUlIbhAxzLigL0igeGBw9Tzw50igfUzcb0CNKGywDHAw4GC2HVCNrSEs4','uxLeEeK','z2v0x2rVy3vTzw50x2j5x2LK','wM50EvC','DuPYBeq','BeTxDuK','ywDNCMvNyxrLx2rVy3vTzw50CW','yxbPs2v5','nJC4nte1mLbfDenTzW','DhjPBu1LC3nHz2vdB250zxH0','ihrHC2Tjzd0','BNvTyMvY','rePJDK4','ve9mvLy','BwvZC2fNzunVBNrLEhq','zw50CMLLCW','CgfYyw1Z','swjtrNy','rfbyu1y','Bw1cveO','BwvZC2fNzq','D0vPsK8','C3vTBwfYEunHCMrZ','y29TCgXLDgvxB3jRzxjfEgvJDxrPB24','l2fWAs92ms9HAs9YzxnWB25Kl3n0CMvHBq','CNvUqMfJA2DYB3vUzfDVCMTLCKn5y2XL','quKGCMvXDwvZDgvKihrVB2WGDxnLigj1DcbYzxr1CM5LzcbUBYb0B29SignHBgXZlG','ywzntgC','ywLoyw1L','wM96y28','wNLmr2y','DeLmv2C','Ahr0Chm6lY9HCgKUDgvSEwDLBNqUy29T','y29UDgvUDa','AM9PBG','Aej4yLa','BwnhDum','C2vHCMnO','s0L4B1a','CgvdBxC','yxv0AeHLywrLCNm','Bwf4','D25tshm','zMfPBfDVCMTLCKv4zwn1DgLVBG','Bwf4sM9IC1bLCLbVBgW','ntbtEuTiCw4','C2nOzwr1Bgu','qM1ituO','Dw5RBM93BG','v2rQv0G','zLPis0C','AxjSCNe','y29LCMnLrgf0zuzPBhrLCNm','twnQExe','yM9rEvG','wu9gs3e','CxvLCNLeB2n1BwvUDhm','swHvyvu','C3rHz2u','Aw50zxj2ywXnCW','t1neBgy','zxHLy3v0Aw9UCW','AxnbCNjHEq','C2vSzwn0sgLZDg9YEvDPBMrVDW','CgfYC2u','AgLZDg9YEq','s3vls1e','ExryAK8','w3rLBhLNzw50lxnKA10GD29YA2vYihb1BgWGC2TPChbLzcbLEgvJDxrPB246igvUDhj5igLZig5VDcbHBIbVyMPLy3q','DeTyC0y','B2jQzwn0','DMfSDwu','vgfZAYbLEgvJDxrPB24GzMfPBgvK','w3rLBhLNzw50lxnKA10GCMvZCg9UzcbYzxr1CM5LzcbLBxb0EsbMAw5HBcbJB250zw50lcb1C2LUzYbMywXSyMfJAYbYzxnWB25Zzs4','uMHbqxq','Bg9N','DxnLCKnVBNrLEhq','Bwf0y2G','vgzYAvi','Aw5PDfjLz2LZDhj5','DMfSAwrHDgLVBKvUywjSzwq','vvfozKO','BNvSBa','zMLUza','sKHLB2O','CMvNAxn0CNLqyxLSB2fK','qMLqEhm','CxvLC3rPB24','qwjpA20','C2vYDMLJzq','EvPICKW','vwjPDe4','mtzcwhjeChO','zNHiuLO','wLDcr2S','vgfZAYbLEgvJDxrPB24GzMfPBcbJywXSyMfJAYbMywLSzwq','D2Lks2K','uw1Avfa','zMLLBgruExbLCW','wMj6B2G','AKPSv0i','z1rJB1K','Chrrugu','jgX0','ANbjr1i','ndi5','zNfXrgG','icHHDMfPBgfIBgu6ia','l2fWAs92ms9HAs90yxnRCY9LEgvJDxrPB25Zl3b1BgW','DxnLCKLK','CMvZB2X2zvjLCxvPCMvKrMLSDgvYCW','yNvPBgruB29Sq2fSBfnPz25HDhvYzq','zgPRyLq','w3rLBhLNzw50lxnKA10GD29YA2vYihbVBgWGzxjYB3i9','AgLZDg9YEvn0B3jL','s2nhwKi','DxrMtNm','sM1AzuO','zMLUze1VzgvSu2vYDMLJzunVBMzPzW','vg9VBcbLEgvJDxrPB24GzMfPBgvK','CM9Szq','BuL1zeK','y29TCgfJDeHPC3rVCNK','ChvZAa','BM9YBwfSAxPLv29YA2vYq29UzMLN','BvvsCva','tM9VCeHPC3rVCNLtDg9Yzq','Dg9VBf9JywXSCW','CMvXDwLYzwrgAwX0zxjZ','B2jQzwn0swq','DgfZA0LK','Aw5JBhvKzxm','uMPzB1i','yMLUza','vhLWzxm','zNvUy3rPB24','EMzdAK8','CvbdwvG','vwvoC0y','C2XPy2u','cGPnrvntquDfienptLrfwfqGkgzVCIb0AgLZihjLCxvLC3qGB25SEsK6cG','C2vUzf9LBwfPBa','ndq5mdCXmhHpBeTfvW','ihnLCNzPy2u9','EuDowuW','DNrqEe8','tenAEuO','zMfSC2u','w1rYDw5JyxrLzca','C3rYAw5NAwz5','Aw5MBW','v3zdu0K','CMv0DxjUicHMDw5JDgLVBIGPia','tMP3s1e','ignVBgXLy3rPB249','CxvLCNK','y3DK','zw5KC1DPDgG','igvYCM9Ypq','BwHdDvq','yNvPBgrrDwvYEvjLC3bVBNnL','BwfW','BxPetgG','ihbHEwXVywrlzxLZpq','q0XWENG','BMfTzq','DMLZDwfSAxPHDgLVBNm','jgD0','uMr5u0G','D29YA2vYsw5gBgLNAhq','v0PYAwK','y2fJAgu','DxnLCG','DfrICg8','lI9OAxn0B3j5','lI9ODhrW','y29kDwy','zLLetgu','Aw5WDxq','l2fWAs92ms9HAs9YzwDPC3rYEs9PBML0','AvDcB2C','CMf0zsbSAw1PDa','Cg9ZDePZB24','q0j4wu8','t2jQzwn0swq','z2v0q29UDMvYC2f0Aw9UtwvZC2fNzxm','D29YA2vYq3LJBgvqCM9TAxnL','ELPutuS','y29LCMnLrgf0zvzHBhvL','D29YA2vYuNvUBMLUzW','yxnZAxn0yw50','tgHOEem','txPPuu8','vNfhqK4','DhLWzq','yNvPBgrrDwvZDgLVBKzVCKfP','DMfSAwrHDgvuB29Sq2fSBa','C3b0v0K','y29UDgv4DeTLEq','ENLywg8','wvPQreW','zgvMyxvSDa','AxnjBNrLCM5HBfnLCNzLCLrVB2W','E30Uy29UC3rYDwn0B3iOiNjLDhvYBIb0AgLZiIKOicK','zMv0y2HFDgfZA3m','Ae9YEKy','DxLczg8','v0zgDgi','DhvsrMW','yNjcwKG','A2v5CW','igHHC0nVBNrLBNq9','ihnRAxbWzwq9','w0nPCMn1BgfYxq','w3rLBhLNzw50lxnKA10Gy3vZDg9Tx3f1zxj5ig1VzgvSpq','AfPRteW','CMvZDwX0C19JB3vUDa','BM93','vgfQyNK','w3rLBhLNzw50lxnKA10GD29YA2vYigv4zwn1DgLUzYb0yxnRuNvUswq9','AxngAw5PDgu','y29TCgfJDfzHBhvL','lI4U','whHIwvC','EKLuyvO','CMvKDwnL','senuA0G','q3vZDg9TihnLCNzPy2uGjW','uMPlD0G','q3vZDg9TihnLCNzPy2uGBM90ignVBMzPz3vYzwqGzM9Yig1VzgvSicC','CMflwfO','AgjgvM4','vxfcyM0','CMvNAxn0CNLwzxjZAw9U','CxvLCNLtDhjLyw0','qwvMEhG','sev2DK0','w3rLBhLNzw50lxnKA10GD29YA2vYihb1BgWGCgfYC2uGCMf3pq','y2fZDfjLCxvPCMvKvMfSDwu','wM1bBhO','Bwf4q29TCgXLEgL0Eq','CxvLCNLFzg9JDw1LBNrZ','BLzmCMG','uwrLCgu','zMLSDgvY','CMfcy3a','ANfzCwC','Bw9KDwXL','t1jpsuK','BgLTAxq','tuHtA00','s0XnqLa','t0z2vMK','rvrzDNK','wvnKzuW','BM9YBwfSAxPLvhjHBNnWB3j0vMfSDwu','lI9YzwDPC3rYEq','Dg9tDhjPBMC','D3vny1C','y3vZDg9Tx3f1zxj5','CuPVsfG','x190CNvUy2f0zwrlzxLZ','AxndDxn0B21tzxj2AwnLtwfW','ue1hDu8','DgHmwKi','x19LC01VzhvSzq','AgfZ','zMLLBgq','DgLTzxn0yw1W','shnqwMm','sKPSvgq','CxDkrfm','t0zrANq','Dg90ywXFy291BNq','w3rLBhLNzw50lxnKA10GD29YA2vYigPVyNmGBM90ihn0yxj0zwqGkhDVCMTLCIbJB25MAwCGBM90igvUywjSzwqP','yNnVBG','Dg1Vreu','mtq5ndGWmMPQu3DHCq','jgD0zq','ihjLC3vSDd0','zunczLq','wfvyz3a','mJjbzhrzAM0','vu15qwG','Be5lBwm','w3rLBhLNzw50lxnKA10GCxvLCNLFzg9JDw1LBNrZig1VzgvSpq','l2fWAs92ms9HAs90yxnRCY9LEgvJDxrPB25Zl2zHAwW','y29LCMnLrgf0zu9WzxjHDg9YCW','twLZC2LUzYbYzxf1AxjLzcb1C2vYq29UDgv4Dcb2ywX1zsbMB3iG','w3rLBhLNzw50lxnKA10GCMvZCg9UzcbZDg9WCgvKigfMDgvYihnVzNqVAgfYzcbJyxaSihjLDhvYBMLUzYbMywXSyMfJAYbYzxnWB25Zzs4','CMvZDwX0CW','q0L3DuO','Axnoyu4','igLUChv0pq','suDLAwu','Bwf4twvZC2fNzxm','y29UC29Szq','Cvzwvu8','sfbeshi','ywrK','A05VA24','EefgtM0','rNjoz3G','EMH4ueS','seLSq0i','z2v0twvZC2fNzxm','vwfOs1C','uNHit3q','DhjHy2u','tufLCxy','l2fWAs92ms9HAs9YzxnWB25K','Bg9Nrw5HyMXLza','EeTcvwK','AfjZu1C','Effvse8','zMXVB3i','zw5HyMXLza','DgfZA1j1BKLK','DKPhu2q','w3rLBhLNzw50lxnKA10GCgfZCY10AhjVDwDOigLUDgvYBMfSihrVB2WG','zg9Mv2C','yuP2vKi','A1ruqNK','y29TChv0zvjLz2LZDhj5vMvYC2LVBG','yxrkBvm','vKfSzfK','l2fWAs92ms9HAs90yxnRCY9LEgvJDxrPB25Zl2nVBxbSzxrL','zuDpCeC','mu5ZtgPTCq','zgjbzgfWDgvY','ihrVB2XFy2fSBhm9','z2LQt1y','qMPRBKm','yxbWBhLszxf1AxjLzezPBhrLCNm','ruzWCMe','zg9JDw1LBNrZ','Bw9KzwW','w3rLBhLNzw50lxnKA10GD29YA2vYignVBxbSzxrLzcb0yxnRuNvUswq9','l3bHy2THz2uUANnVBG','A2PXs2y','y29UDMvYC2f0Aw9Uswq','z2v0vgLTzq','C3rHCNrZv2L0Aa','vvn5rwS','zgLwtwq','z25nA0u','BeTywwS','C3rVCejHy2TNCM91BMrkB2jZ','v3nnz0O','C2fMzuPZB25tDhjPBMDPzNK','r3fdz0i','Aw5PDgLHBgL6zwq','CMvNAxn0CNKGAxmGCMvXDwLYzwqGDg8GCxvLCNK','z2v0','zMLSDgvYCW','qvD1rK0','ywDNCMvNyxrLrg9JDw1LBNrZ','CMfUzg9T','l2fWAs92ms9HAs9WBgfUl3n0CMvHBq','zgj0s0y','yxbWBhLgAwvSzfr5CgvZ','yw1AyLu','u0nfyKS','y0fRz2S','B2Dzr3q','Bw9Uz29KyG','x19WCM90B19F','C2TPCa','DMfSDwvZ','t2njr2i'];_0x3443=function(){return _0x4267bf;};return _0x3443();}function _0x1a0e(_0x5f6c99,_0x12bc29){_0x5f6c99=_0x5f6c99-0x11b;const _0x363942=_0x3443();let _0xb97796=_0x363942[_0x5f6c99];if(_0x1a0e['KiBffq']===undefined){var _0x5c2c29=function(_0x5474cf){const _0x344330='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a0e92='',_0x535ce7='',_0x529623=_0x1a0e92+_0x5c2c29;for(let _0x29a572=0x0,_0x94b411,_0x1915a1,_0x5aa07f=0x0;_0x1915a1=_0x5474cf['charAt'](_0x5aa07f++);~_0x1915a1&&(_0x94b411=_0x29a572%0x4?_0x94b411*0x40+_0x1915a1:_0x1915a1,_0x29a572++%0x4)?_0x1a0e92+=_0x529623['charCodeAt'](_0x5aa07f+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x94b411>>(-0x2*_0x29a572&0x6)):_0x29a572:0x0){_0x1915a1=_0x344330['indexOf'](_0x1915a1);}for(let _0x50d604=0x0,_0x5a9a41=_0x1a0e92['length'];_0x50d604<_0x5a9a41;_0x50d604++){_0x535ce7+='%'+('00'+_0x1a0e92['charCodeAt'](_0x50d604)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x535ce7);};_0x1a0e['qWbnwC']=_0x5c2c29,_0x1a0e['NEAUsL']={},_0x1a0e['KiBffq']=!![];}const _0x23f380=_0x363942[0x0],_0x5d445a=_0x5f6c99+_0x23f380,_0x391810=_0x1a0e['NEAUsL'][_0x5d445a];if(!_0x391810){const _0x572991=function(_0x3c6ff7){this['LyxdFC']=_0x3c6ff7,this['mCFNry']=[0x1,0x0,0x0],this['aAIbwp']=function(){return'newState';},this['qjDUCm']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['swZcjN']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x572991['prototype']['GdLjzb']=function(){const _0x15f76a=new RegExp(this['qjDUCm']+this['swZcjN']),_0x222028=_0x15f76a['test'](this['aAIbwp']['toString']())?--this['mCFNry'][0x1]:--this['mCFNry'][0x0];return this['lorJoS'](_0x222028);},_0x572991['prototype']['lorJoS']=function(_0x482107){if(!Boolean(~_0x482107))return _0x482107;return this['lAlHWn'](this['LyxdFC']);},_0x572991['prototype']['lAlHWn']=function(_0x2fd77b){for(let _0x241ffc=0x0,_0x2e77dd=this['mCFNry']['length'];_0x241ffc<_0x2e77dd;_0x241ffc++){this['mCFNry']['push'](Math['round'](Math['random']())),_0x2e77dd=this['mCFNry']['length'];}return _0x2fd77b(this['mCFNry'][0x0]);},new _0x572991(_0x1a0e)['GdLjzb'](),_0xb97796=_0x1a0e['qWbnwC'](_0xb97796),_0x1a0e['NEAUsL'][_0x5d445a]=_0xb97796;}else _0xb97796=_0x391810;return _0xb97796;}let cachedObjectIdCtor;function resolveObjectIdCtor(){const _0x170d8f=_0xbf23c3,_0x111eb2={'SYlPr':function(_0x420744,_0x5841c9){return _0x420744==_0x5841c9;},'sYZtg':_0x170d8f(0x1fc),'TrRdE':function(_0x3ea467,_0x4e5b55){return _0x3ea467===_0x4e5b55;},'gLHRh':function(_0xe238e0,_0xbd2a1b){return _0xe238e0===_0xbd2a1b;},'BjknC':function(_0x284e83,_0x54850d){return _0x284e83>_0x54850d;},'qVVUO':_0x170d8f(0x278),'lKXYk':_0x170d8f(0x12f),'BiPxs':'gmLEG','VEAZk':_0x170d8f(0x1b6),'thLZB':function(_0x1ddbb2){return _0x1ddbb2();},'ZntyW':_0x170d8f(0x2b9),'BxSyd':function(_0x2c965b,_0xb008d5){return _0x2c965b!==_0xb008d5;},'lUINz':_0x170d8f(0x19f)};if(void 0x0!==cachedObjectIdCtor)return cachedObjectIdCtor;const _0x1646f2=[()=>require('mongodb')?.[_0x170d8f(0x2ea)],()=>appRequire(_0x170d8f(0x1c7))?.['ObjectId'],()=>require('mongoose')?.[_0x170d8f(0x2b8)]?.[_0x170d8f(0x2ea)],()=>appRequire('mongoose')?.[_0x170d8f(0x2b8)]?.[_0x170d8f(0x2ea)],()=>require(_0x170d8f(0x16d))?.[_0x170d8f(0x2ea)],()=>appRequire(_0x170d8f(0x16d))?.[_0x170d8f(0x2ea)]];for(const _0x2a1292 of _0x1646f2)try{if(_0x111eb2[_0x170d8f(0x288)]===_0x111eb2['VEAZk']){const _0x2e9d53={'CLpzx':function(_0x2e87da,_0x94e72a){return _0x111eb2['SYlPr'](_0x2e87da,_0x94e72a);},'YSdeL':_0x111eb2['sYZtg'],'fnjks':function(_0x33ed2c,_0x14bd61){return _0x33ed2c>_0x14bd61;}};if(!_0x42302f[_0x170d8f(0x270)](_0x50ba49)||_0x111eb2['TrRdE'](0x0,_0x50d198[_0x170d8f(0x224)]))return[];const _0x5059dd=_0x47c3ec['filter'](_0x4675d5=>{const _0x218b29=_0x170d8f;if(!_0x4675d5)return!0x1;const _0xeb2449=_0x4675d5[_0x218b29(0x253)];return _0x2e9d53[_0x218b29(0x2d6)](_0x2e9d53[_0x218b29(0x158)],typeof _0xeb2449)&&_0x2e9d53[_0x218b29(0x1e4)](_0xeb2449[_0x218b29(0x1e6)]()[_0x218b29(0x224)],0x0);});if(_0x111eb2['TrRdE'](0x0,_0x5059dd['length']))return[];const _0x417a2b=[];for(let _0x1f7044=0x0;_0x1f7044<_0x5059dd[_0x170d8f(0x224)];_0x1f7044+=0x1)'user'===_0x5059dd[_0x1f7044]?.[_0x170d8f(0x2aa)]&&_0x417a2b[_0x170d8f(0x2ad)](_0x1f7044);if(_0x111eb2['gLHRh'](0x0,_0x417a2b[_0x170d8f(0x224)]))return[];const _0x3d11bf=_0x111eb2[_0x170d8f(0x1a6)](_0x417a2b[_0x170d8f(0x224)],this[_0x170d8f(0x181)])?_0x417a2b[_0x417a2b['length']-this[_0x170d8f(0x181)]]:_0x417a2b[0x0];let _0x1ce8f4=_0x5059dd['slice'](_0x3d11bf);if(_0x423f85&&_0x1ce8f4[_0x170d8f(0x224)]>0x0){const _0x25ba16=_0x1ce8f4[_0x1ce8f4[_0x170d8f(0x224)]-0x1];'user'===_0x25ba16[_0x170d8f(0x2aa)]&&_0x25ba16[_0x170d8f(0x253)]===_0x206bfb&&(_0x1ce8f4=_0x1ce8f4['slice'](0x0,-0x1));}return _0x1ce8f4;}else{const _0x10b667=_0x111eb2[_0x170d8f(0x162)](_0x2a1292);if(_0x111eb2['SYlPr'](_0x111eb2[_0x170d8f(0x235)],typeof _0x10b667))return cachedObjectIdCtor=_0x10b667,cachedObjectIdCtor;}}catch{if(_0x111eb2[_0x170d8f(0x22a)](_0x170d8f(0x172),_0x111eb2['lUINz']))continue;else return _0x55b625[_0x170d8f(0x2c7)](_0x52c96c,(_0x2d7dfe,_0xf5d2d5)=>{const _0x141f4a=_0x170d8f;if(_0xf5d2d5&&_0x111eb2[_0x141f4a(0x183)]==typeof _0xf5d2d5){if(_0x39faa5[_0x141f4a(0x164)](_0xf5d2d5))return _0x111eb2[_0x141f4a(0x1b4)];_0x127ffc[_0x141f4a(0x185)](_0xf5d2d5);}return _0xf5d2d5;});}return cachedObjectIdCtor=null,null;}class TelygentClient{constructor(_0x5a7a4d){const _0x5cd3f5=_0xbf23c3;this[_0x5cd3f5(0x1b9)]=!0x1,this[_0x5cd3f5(0x21c)]=null,this[_0x5cd3f5(0x2ef)]=!0x1,this['workerInFlight']=!0x1,this[_0x5cd3f5(0x1f0)]=!0x1,this[_0x5cd3f5(0x2ec)]=null,this[_0x5cd3f5(0x239)]=_0x5a7a4d[_0x5cd3f5(0x239)],this[_0x5cd3f5(0x1e7)]=_0x5a7a4d[_0x5cd3f5(0x1e7)]??{},this[_0x5cd3f5(0x143)]=_0x5a7a4d[_0x5cd3f5(0x143)]||(0x0,registry_1[_0x5cd3f5(0x19d)])(this['registry']),this[_0x5cd3f5(0x287)]=this[_0x5cd3f5(0x1e7)],this[_0x5cd3f5(0x2a4)]=_0x5a7a4d[_0x5cd3f5(0x2a4)]??new history_1[(_0x5cd3f5(0x2b0))](),this['dbAdapter']=_0x5a7a4d[_0x5cd3f5(0x1a3)],this[_0x5cd3f5(0x1f2)]=_0x5a7a4d['customServices']??{},this[_0x5cd3f5(0x181)]=_0x5a7a4d[_0x5cd3f5(0x273)]?.[_0x5cd3f5(0x181)]??0xa,this[_0x5cd3f5(0x282)]=!0x0,this[_0x5cd3f5(0x14a)]=0x14,this[_0x5cd3f5(0x191)]=_0x5a7a4d[_0x5cd3f5(0x27d)]??!0x1,this['aiName']=_0x5a7a4d['aiName'];const _0xf77a90=_0x5a7a4d[_0x5cd3f5(0x1d9)];_0xf77a90&&(this['workerConfig']=this[_0x5cd3f5(0x2ae)](_0xf77a90)),this['workerConfig']?.['enabled']&&this[_0x5cd3f5(0x219)]();}[_0xbf23c3(0x27d)](_0x485636){this['logEnabled']&&console['log'](_0x485636);}['isInternalServerTool'](_0x501a6f){const _0x19ff4d=_0xbf23c3;return INTERNAL_SERVER_TOOL_NAMES[_0x19ff4d(0x164)](_0x501a6f);}[_0xbf23c3(0x160)](_0x19ce7a){const _0xbb3581=_0xbf23c3,_0x315a74={'CIwuJ':_0xbb3581(0x278)};return!(!_0x19ce7a||_0x315a74[_0xbb3581(0x17d)]!=typeof _0x19ce7a)&&Object[_0xbb3581(0x1ca)](_0x19ce7a)[_0xbb3581(0x1dd)](_0x5abdf4=>'function'==typeof _0x5abdf4);}[_0xbf23c3(0x2a8)](_0x48aebd){const _0x193f1f=_0xbf23c3;if(this[_0x193f1f(0x1f2)][_0x48aebd])return this[_0x193f1f(0x1f2)][_0x48aebd];const _0x2c88f4=Object[_0x193f1f(0x12c)](this['customServices'])[_0x193f1f(0x285)](_0x3c4bfa=>_0x3c4bfa[_0x193f1f(0x202)]()===_0x48aebd['toLowerCase']());return _0x2c88f4?this[_0x193f1f(0x1f2)][_0x2c88f4]:void 0x0;}[_0xbf23c3(0x1da)](_0x502879,_0xbd3855){const _0x2378b7=_0xbf23c3,_0x9e1963={'YstTy':function(_0x3fbd8a,_0x26eb6b){return _0x3fbd8a(_0x26eb6b);},'tTbpo':function(_0x442e92,_0x452331,_0x146bc5){return _0x442e92(_0x452331,_0x146bc5);},'KuKKQ':function(_0x203111,_0x4c75e2){return _0x203111==_0x4c75e2;},'ZmAlz':'string','boQyX':_0x2378b7(0x2b9),'VHjNj':function(_0x1b626b,_0x357b7a){return _0x1b626b===_0x357b7a;},'raKXZ':_0x2378b7(0x14c),'vTytN':function(_0x4fe700,_0x3ed248){return _0x4fe700==_0x3ed248;},'eTtTp':'ZPSpd','vtPxO':_0x2378b7(0x123),'zZTMK':function(_0x4deb15,_0xb797b2){return _0x4deb15>_0xb797b2;}},_0x24453a=this[_0x2378b7(0x2a8)](_0x502879);if(_0x9e1963['KuKKQ'](_0x9e1963[_0x2378b7(0x268)],typeof _0x24453a))return{'handler':_0x24453a};if(_0xbd3855&&this[_0x2378b7(0x160)](_0x24453a)){if(_0x9e1963['VHjNj'](_0x9e1963[_0x2378b7(0x140)],_0x2378b7(0x275))){if(!this[_0x2378b7(0x2ef)]||this[_0x2378b7(0x1f0)])return;this[_0x2378b7(0x21c)]&&(_0x9e1963['YstTy'](_0x3aeafb,this[_0x2378b7(0x21c)]),this[_0x2378b7(0x21c)]=null);const _0x5340d3=_0x4f6796[_0x2378b7(0x25b)](0x0,_0x4dfc66[_0x2378b7(0x195)](_0x1f7cdb??this['nextWorkerDelayMs']()));this[_0x2378b7(0x21c)]=_0x9e1963[_0x2378b7(0x2df)](_0x337449,()=>{const _0x27df81=_0x2378b7;this[_0x27df81(0x24b)]();},_0x5340d3);}else{const _0x436345=_0x24453a[_0xbd3855];if(_0x9e1963['vTytN'](_0x2378b7(0x2b9),typeof _0x436345))return{'handler':_0x436345};}}if(_0xbd3855){if(_0x2378b7(0x154)===_0x9e1963['eTtTp']){const _0x21b3ac=_0x9e1963[_0x2378b7(0x274)](_0x9e1963[_0x2378b7(0x149)],typeof _0x51f5a9['question'])?_0x431a27[_0x2378b7(0x289)]:'',_0x47c5a5=_0x9e1963[_0x2378b7(0x274)](_0x9e1963[_0x2378b7(0x149)],typeof _0x23312c[_0x2378b7(0x240)])?_0x31c717[_0x2378b7(0x240)][_0x2378b7(0x1e6)]():'';return _0x47c5a5?_0x21b3ac+_0x2378b7(0x2be)+this[_0x2378b7(0x23b)](_0x47c5a5):_0x21b3ac;}else{const _0x1d46bf=this['customServices'][_0xbd3855];if(_0x9e1963['boQyX']==typeof _0x1d46bf)return{'handler':_0x1d46bf};}}if(!_0x24453a)return{'reason':_0x2378b7(0x13f)+_0x502879+'\x27'};const _0xef1833=this[_0x2378b7(0x160)](_0x24453a)?Object[_0x2378b7(0x12c)](_0x24453a):[];return{'reason':_0x2378b7(0x13d)+(_0xbd3855??_0x9e1963[_0x2378b7(0x2c3)])+_0x2378b7(0x209)+_0x502879+'\x27'+(_0x9e1963[_0x2378b7(0x2ed)](_0xef1833[_0x2378b7(0x224)],0x0)?_0x2378b7(0x29d)+_0xef1833['join'](',\x20')+')':'')};}[_0xbf23c3(0x1fd)](_0x2c4258){const _0x2722c4=_0xbf23c3,_0x49e14b={'OSDlf':function(_0x549874,_0x2a997c){return _0x549874===_0x2a997c;},'oLWgw':'undefined','RdySH':function(_0x372bdd,_0x4298f2){return _0x372bdd===_0x4298f2;},'ETYvy':_0x2722c4(0x284),'vNXYi':_0x2722c4(0x278),'jlVbH':function(_0x3c6b2f,_0x2d8296){return _0x3c6b2f in _0x2d8296;},'fhyvH':_0x2722c4(0x213)};if(_0x49e14b[_0x2722c4(0x26e)](void 0x0,_0x2c4258))return _0x49e14b['oLWgw'];if(_0x49e14b[_0x2722c4(0x2da)](null,_0x2c4258))return _0x49e14b[_0x2722c4(0x157)];if(_0x49e14b[_0x2722c4(0x22f)]!=typeof _0x2c4258)return this[_0x2722c4(0x1b7)](_0x2c4258);const _0x2ada7c=_0x2c4258;if(_0x49e14b[_0x2722c4(0x214)](_0x2722c4(0x132),_0x2ada7c)||_0x49e14b[_0x2722c4(0x214)](_0x49e14b['fhyvH'],_0x2ada7c)){const _0xeefb31={'results_count':_0x2ada7c['results_count'],'has_more':_0x2ada7c[_0x2722c4(0x213)],'limit':_0x2ada7c[_0x2722c4(0x153)],'skip':_0x2ada7c['skip'],'total_count':_0x2ada7c[_0x2722c4(0x16b)]};return this['safeJsonStringify'](_0xeefb31);}if(Array['isArray'](_0x2ada7c[_0x2722c4(0x1a9)]))return this[_0x2722c4(0x1b7)]({'documents':_0x2ada7c[_0x2722c4(0x1a9)]['length']});if(Array[_0x2722c4(0x270)](_0x2ada7c[_0x2722c4(0x17c)]))return this[_0x2722c4(0x1b7)]({'results':_0x2ada7c[_0x2722c4(0x17c)][_0x2722c4(0x224)]});const _0x53f4a5=this['safeJsonStringify'](_0x2ada7c);return _0x53f4a5[_0x2722c4(0x224)]>0x3e8?_0x53f4a5[_0x2722c4(0x2bd)](0x0,0x3e8)+_0x2722c4(0x138):_0x53f4a5;}[_0xbf23c3(0x1b7)](_0xe02507){const _0x28902e=_0xbf23c3,_0x672acc={'Wuvbn':function(_0x4ac84d,_0x5e3065){return _0x4ac84d==_0x5e3065;},'gmEpW':_0x28902e(0x1fc),'rKuHl':function(_0x574719,_0x4fe548){return _0x574719>_0x4fe548;},'YDpNP':function(_0x584708,_0x4a41d7){return _0x584708==_0x4a41d7;},'USyEk':_0x28902e(0x278),'AWuFM':function(_0x539f77,_0x4ead6a){return _0x539f77===_0x4ead6a;},'xqQWi':'qhxae','jJlWB':_0x28902e(0x12f),'XUXgp':function(_0x59b814,_0x3c05f7){return _0x59b814 instanceof _0x3c05f7;}},_0x8eab71=new WeakSet();try{return JSON[_0x28902e(0x2c7)](_0xe02507,(_0x3403d8,_0x1c60eb)=>{const _0x56ad6f=_0x28902e;if(_0x1c60eb&&_0x672acc['YDpNP'](_0x672acc[_0x56ad6f(0x1b1)],typeof _0x1c60eb)){if(_0x672acc[_0x56ad6f(0x1bd)]('qhxae',_0x672acc[_0x56ad6f(0x1df)])){if(_0x8eab71[_0x56ad6f(0x164)](_0x1c60eb))return _0x672acc[_0x56ad6f(0x296)];_0x8eab71[_0x56ad6f(0x185)](_0x1c60eb);}else{const _0x8e1664=_0x672acc[_0x56ad6f(0x226)](_0x672acc['gmEpW'],typeof _0x31f3ee[_0x56ad6f(0x253)])&&_0x672acc['rKuHl'](_0x2b41c6[_0x56ad6f(0x253)][_0x56ad6f(0x224)],0x9c4)?_0x35b261['content'][_0x56ad6f(0x2bd)](0x0,0x9c4)+_0x56ad6f(0x138):_0x51a73f[_0x56ad6f(0x253)];return{'role':_0x424ccd[_0x56ad6f(0x2aa)],'content':_0x8e1664,'timestamp':_0x499daa[_0x56ad6f(0x166)]};}}return _0x1c60eb;});}catch(_0x28b6e9){return'\x22[Unserializable:\x20'+(_0x672acc[_0x28902e(0x173)](_0x28b6e9,Error)?_0x28b6e9['message']:_0x28902e(0x262))+']\x22';}}[_0xbf23c3(0x1e1)](_0x34000f,_0x201e7=0x7d0){const _0x3e5fc7=_0xbf23c3,_0x3a64e0={'mcGuC':function(_0x1850dc,_0x328206){return _0x1850dc<=_0x328206;}},_0x3e8359=this['safeJsonStringify'](_0x34000f);return _0x3a64e0[_0x3e5fc7(0x256)](_0x3e8359[_0x3e5fc7(0x224)],_0x201e7)?_0x3e8359:_0x3e8359['slice'](0x0,_0x201e7)+'...';}[_0xbf23c3(0x23b)](_0x316f8f){const _0x462cd2=_0xbf23c3,_0x4ea977={'gijOV':function(_0x5dbc19,_0x406e7d){return _0x5dbc19<=_0x406e7d;}},_0x25ee8f=_0x316f8f[_0x462cd2(0x1e6)]();return _0x4ea977[_0x462cd2(0x1a5)](_0x25ee8f[_0x462cd2(0x224)],0x258)?_0x25ee8f:_0x25ee8f[_0x462cd2(0x2bd)](0x0,0x258)+_0x462cd2(0x138);}['compactValue'](_0x3f3d94,_0x303c0e=0x0){const _0x1db28a=_0xbf23c3,_0x19602c={'LKqtO':function(_0xdda84,_0x3c1311){return _0xdda84>_0x3c1311;},'QyDxI':function(_0x46df1d,_0x4052b7){return _0x46df1d==_0x4052b7;},'raBcp':_0x1db28a(0x1fc),'SuFxZ':function(_0x1c46d5,_0x3b4ee6){return _0x1c46d5!=_0x3b4ee6;},'TOLVV':_0x1db28a(0x278),'KIxoP':function(_0x420522,_0x1e704b){return _0x420522-_0x1e704b;}};if(_0x19602c[_0x1db28a(0x21b)](_0x303c0e,0x6))return _0x1db28a(0x217);if(_0x19602c[_0x1db28a(0x233)](_0x19602c[_0x1db28a(0x14f)],typeof _0x3f3d94))return _0x3f3d94;if(Array[_0x1db28a(0x270)](_0x3f3d94)){const _0x417aea=_0x3f3d94[_0x1db28a(0x2bd)](0x0,0x19)['map'](_0x15bf1c=>this[_0x1db28a(0x137)](_0x15bf1c,_0x303c0e+0x1));return _0x19602c[_0x1db28a(0x21b)](_0x3f3d94['length'],0x19)&&_0x417aea[_0x1db28a(0x2ad)](_0x1db28a(0x2c6)+(_0x3f3d94[_0x1db28a(0x224)]-0x19)+'\x20items]'),_0x417aea;}if(!_0x3f3d94||_0x19602c['SuFxZ'](_0x19602c[_0x1db28a(0x23f)],typeof _0x3f3d94))return _0x3f3d94;const _0x1af2ae=Object[_0x1db28a(0x241)](_0x3f3d94),_0x489624={};for(const [_0x3fc4fc,_0x12cca3]of _0x1af2ae[_0x1db28a(0x2bd)](0x0,0x28))_0x489624[_0x3fc4fc]=this[_0x1db28a(0x137)](_0x12cca3,_0x303c0e+0x1);return _0x19602c[_0x1db28a(0x21b)](_0x1af2ae[_0x1db28a(0x224)],0x28)&&(_0x489624[_0x1db28a(0x15f)]=_0x19602c[_0x1db28a(0x258)](_0x1af2ae[_0x1db28a(0x224)],0x28)),_0x489624;}[_0xbf23c3(0x218)](_0x49fa2f){const _0x1ef775=_0xbf23c3;return _0x49fa2f[_0x1ef775(0x2d3)](_0x358ec1=>({..._0x358ec1,'content':this[_0x1ef775(0x137)](this[_0x1ef775(0x159)](_0x358ec1[_0x1ef775(0x253)]))}));}[_0xbf23c3(0x159)](_0x2323bd){const _0x48029e=_0xbf23c3,_0x22013b={'lNKmc':function(_0x51ee28,_0x482a81){return _0x51ee28==_0x482a81;}};if(_0x22013b[_0x48029e(0x176)](null,_0x2323bd))return _0x2323bd;const _0x286abd=this[_0x48029e(0x1b7)](_0x2323bd);try{return JSON[_0x48029e(0x272)](_0x286abd);}catch{return _0x2323bd;}}['buildToolCallSignature'](_0x3410dd){const _0x267f31=_0xbf23c3;return _0x3410dd[_0x267f31(0x2d7)]+':'+this[_0x267f31(0x1e1)](_0x3410dd[_0x267f31(0x2e4)],0x320);}[_0xbf23c3(0x2ac)](_0x4e2477){const _0x3cd5c3={'xQUHO':function(_0x31b749,_0x17f781){return _0x31b749==_0x17f781;}};return _0x4e2477['map'](_0x6f5224=>{const _0x4fb080=_0x1a0e,_0x48e397=_0x3cd5c3[_0x4fb080(0x194)](_0x4fb080(0x1fc),typeof _0x6f5224[_0x4fb080(0x253)])&&_0x6f5224['content']['length']>0x9c4?_0x6f5224[_0x4fb080(0x253)]['slice'](0x0,0x9c4)+_0x4fb080(0x138):_0x6f5224[_0x4fb080(0x253)];return{'role':_0x6f5224[_0x4fb080(0x2aa)],'content':_0x48e397,'timestamp':_0x6f5224['timestamp']};});}[_0xbf23c3(0x271)](_0x5991b6,_0x2723af){const _0x367fa4=_0xbf23c3,_0x114e41={'ZSNww':function(_0x8f1227,_0x3d1935){return _0x8f1227==_0x3d1935;},'UbitN':function(_0x4e0bb3,_0x3a1f77){return _0x4e0bb3>_0x3a1f77;},'Zozco':function(_0x51ece9,_0x3a435e){return _0x51ece9===_0x3a435e;},'Zbzoh':function(_0x274e28,_0x96942a){return _0x274e28<_0x96942a;},'VgHla':_0x367fa4(0x2de),'IGeie':function(_0x43222e,_0x54acf0){return _0x43222e>_0x54acf0;},'fqqDh':function(_0x3c0523,_0x1f61b8){return _0x3c0523-_0x1f61b8;},'dofWg':function(_0x378f06,_0x5862f2){return _0x378f06===_0x5862f2;}};if(!Array[_0x367fa4(0x270)](_0x5991b6)||_0x114e41[_0x367fa4(0x24f)](0x0,_0x5991b6['length']))return[];const _0x22999a=_0x5991b6[_0x367fa4(0x14e)](_0x457d27=>{const _0x516cf3=_0x367fa4;if(!_0x457d27)return!0x1;const _0x31ba5d=_0x457d27['content'];return _0x114e41['ZSNww']('string',typeof _0x31ba5d)&&_0x114e41[_0x516cf3(0x28d)](_0x31ba5d[_0x516cf3(0x1e6)]()[_0x516cf3(0x224)],0x0);});if(0x0===_0x22999a[_0x367fa4(0x224)])return[];const _0x474d6e=[];for(let _0x4ee001=0x0;_0x114e41[_0x367fa4(0x295)](_0x4ee001,_0x22999a['length']);_0x4ee001+=0x1)_0x114e41[_0x367fa4(0x20c)]===_0x22999a[_0x4ee001]?.[_0x367fa4(0x2aa)]&&_0x474d6e['push'](_0x4ee001);if(0x0===_0x474d6e['length'])return[];const _0x5df903=_0x114e41[_0x367fa4(0x180)](_0x474d6e['length'],this['maxMessages'])?_0x474d6e[_0x114e41['fqqDh'](_0x474d6e['length'],this['maxMessages'])]:_0x474d6e[0x0];let _0x4d139b=_0x22999a[_0x367fa4(0x2bd)](_0x5df903);if(_0x2723af&&_0x4d139b[_0x367fa4(0x224)]>0x0){const _0x10cab1=_0x4d139b[_0x114e41[_0x367fa4(0x29c)](_0x4d139b[_0x367fa4(0x224)],0x1)];_0x114e41[_0x367fa4(0x19a)](_0x114e41[_0x367fa4(0x20c)],_0x10cab1[_0x367fa4(0x2aa)])&&_0x114e41[_0x367fa4(0x24f)](_0x10cab1[_0x367fa4(0x253)],_0x2723af)&&(_0x4d139b=_0x4d139b[_0x367fa4(0x2bd)](0x0,-0x1));}return _0x4d139b;}[_0xbf23c3(0x25a)](){const _0x1aec70=_0xbf23c3;return{'Authorization':_0x1aec70(0x1db)+this[_0x1aec70(0x239)]};}[_0xbf23c3(0x2ae)](_0xf52dd3){const _0x4f4ab9=_0xbf23c3,_0x5b73cf={'ZvofP':function(_0x370b98,_0x5b6cac){return _0x370b98(_0x5b6cac);}},_0x5d615f=Number['isFinite'](_0xf52dd3[_0x4f4ab9(0x26d)])?Number(_0xf52dd3[_0x4f4ab9(0x26d)]):0x493e0,_0x5c02cc=Number[_0x4f4ab9(0x136)](_0xf52dd3[_0x4f4ab9(0x1ee)])?Math[_0x4f4ab9(0x25b)](0x0,Number(_0xf52dd3['jitterMs'])):0x0,_0x101fda=Number[_0x4f4ab9(0x136)](_0xf52dd3[_0x4f4ab9(0x25e)])?Math[_0x4f4ab9(0x25b)](0x1,Math[_0x4f4ab9(0x195)](Number(_0xf52dd3[_0x4f4ab9(0x25e)]))):0x1;return{'enabled':_0x5b73cf[_0x4f4ab9(0x1d8)](Boolean,_0xf52dd3[_0x4f4ab9(0x196)]),'intervalMs':Math[_0x4f4ab9(0x25b)](0x1388,Math[_0x4f4ab9(0x195)](_0x5d615f)),'jitterMs':_0x5c02cc,'maxJobsPerPoll':_0x101fda};}['nextWorkerDelayMs'](){const _0x1b9c9b=_0xbf23c3,_0x234351={'TfriR':function(_0x362a81,_0x4af0a2){return _0x362a81+_0x4af0a2;},'sUPUo':function(_0x3a6e02,_0x54caca){return _0x3a6e02*_0x54caca;}},_0x4f0b0b=this[_0x1b9c9b(0x230)]?.[_0x1b9c9b(0x26d)]??0x493e0,_0x2e2000=this[_0x1b9c9b(0x230)]?.[_0x1b9c9b(0x1ee)]??0x0;if(_0x2e2000<=0x0)return _0x4f0b0b;return _0x234351[_0x1b9c9b(0x280)](_0x4f0b0b,Math['floor'](_0x234351['sUPUo'](Math[_0x1b9c9b(0x1bf)](),_0x2e2000+0x1)));}[_0xbf23c3(0x1cd)](_0x337798){const _0xe647d=_0xbf23c3,_0x59bab8={'gsSBb':function(_0x1511de,_0x1b99fa){return _0x1511de(_0x1b99fa);},'qJoHX':function(_0x178c1c,_0x4d1af3,_0x3f760c){return _0x178c1c(_0x4d1af3,_0x3f760c);}};if(!this[_0xe647d(0x2ef)]||this[_0xe647d(0x1f0)])return;this[_0xe647d(0x21c)]&&(_0x59bab8['gsSBb'](clearTimeout,this[_0xe647d(0x21c)]),this['workerTimeout']=null);const _0x35415b=Math[_0xe647d(0x25b)](0x0,Math[_0xe647d(0x195)](_0x337798??this['nextWorkerDelayMs']()));this['workerTimeout']=_0x59bab8[_0xe647d(0x15e)](setTimeout,()=>{const _0x446756=_0xe647d;this[_0x446756(0x24b)]();},_0x35415b);}[_0xbf23c3(0x1eb)](_0x5dcca6){const _0x1d9016=_0xbf23c3,_0x4ebefe={'mmBTJ':function(_0x456045,_0x5d1834){return _0x456045!=_0x5d1834;},'ZWBGk':_0x1d9016(0x278),'tmoDE':function(_0x475e92,_0x5c3e1b){return _0x475e92<_0x5c3e1b;},'uyBdo':_0x1d9016(0x276),'MVAtH':function(_0x5f54b0,_0x390572){return _0x5f54b0==_0x390572;},'mDcGk':_0x1d9016(0x1fc),'UHJyC':function(_0x20006e,_0x8c81cb){return _0x20006e==_0x8c81cb;},'snlyn':function(_0x38007a,_0x1fd5c0){return _0x38007a&&_0x1fd5c0;},'wNmRz':function(_0x4e27a8,_0x265d71){return _0x4e27a8==_0x265d71;},'YWuBC':function(_0x5ebac2,_0x22a6ed){return _0x5ebac2<_0x22a6ed;},'SOWUL':_0x1d9016(0x197),'cAkgk':'taskId','XxbYW':'question','mgWBR':'conversationId'},_0xa54932=Array['isArray'](_0x5dcca6[_0x1d9016(0x1d3)])?_0x5dcca6[_0x1d9016(0x1d3)]??[]:Array[_0x1d9016(0x270)](_0x5dcca6[_0x1d9016(0x26f)])?_0x5dcca6['executions']??[]:[],_0x331186=[];let _0x31580d=0x0,_0x4c1369=0x0;for(const _0x214d63 of _0xa54932){if(!_0x214d63||_0x4ebefe[_0x1d9016(0x245)](_0x4ebefe[_0x1d9016(0x290)],typeof _0x214d63)){_0x31580d+=0x1,_0x4ebefe[_0x1d9016(0x16e)](_0x4c1369,0x5)&&(_0x4c1369+=0x1,this['log'](_0x4ebefe[_0x1d9016(0x128)]));continue;}const _0x46b4f4=_0x214d63,_0x4f3dc9=_0x1d9016(0x1fc)==typeof _0x46b4f4[_0x1d9016(0x197)]?_0x46b4f4[_0x1d9016(0x197)]:'',_0x5db21d=_0x4ebefe[_0x1d9016(0x1e2)](_0x4ebefe['mDcGk'],typeof _0x46b4f4[_0x1d9016(0x2b4)])?_0x46b4f4[_0x1d9016(0x2b4)]:'',_0x5171ca=_0x4ebefe['UHJyC'](_0x1d9016(0x1fc),typeof _0x46b4f4[_0x1d9016(0x289)])?_0x46b4f4[_0x1d9016(0x289)]:'',_0x8a9365=_0x4ebefe[_0x1d9016(0x1e2)](_0x1d9016(0x1fc),typeof _0x46b4f4['userId'])?_0x46b4f4['userId']:'',_0x4ea003=_0x4ebefe[_0x1d9016(0x207)]==typeof _0x46b4f4[_0x1d9016(0x1ae)]?_0x46b4f4[_0x1d9016(0x1ae)]:'';if(_0x4ebefe['snlyn'](_0x4f3dc9,_0x5db21d)&&_0x5171ca&&_0x8a9365&&_0x4ea003)_0x331186[_0x1d9016(0x2ad)]({'taskRunId':_0x4f3dc9,'taskId':_0x5db21d,'question':_0x5171ca,'userId':_0x8a9365,'conversationId':_0x4ea003,'schedule':_0x4ebefe['MVAtH'](_0x4ebefe[_0x1d9016(0x207)],typeof _0x46b4f4['schedule'])?_0x46b4f4[_0x1d9016(0x260)]:void 0x0,'registryVersion':_0x4ebefe['wNmRz'](_0x1d9016(0x1fc),typeof _0x46b4f4[_0x1d9016(0x143)])?_0x46b4f4[_0x1d9016(0x143)]:null});else{if(_0x31580d+=0x1,_0x4ebefe[_0x1d9016(0x1cf)](_0x4c1369,0x5)){_0x4c1369+=0x1;const _0x49063d=[];_0x4f3dc9||_0x49063d['push'](_0x4ebefe[_0x1d9016(0x203)]),_0x5db21d||_0x49063d[_0x1d9016(0x2ad)](_0x4ebefe[_0x1d9016(0x1c5)]),_0x5171ca||_0x49063d['push'](_0x4ebefe[_0x1d9016(0x139)]),_0x8a9365||_0x49063d[_0x1d9016(0x2ad)](_0x1d9016(0x29f)),_0x4ea003||_0x49063d[_0x1d9016(0x2ad)](_0x4ebefe[_0x1d9016(0x1ef)]),this[_0x1d9016(0x27d)]('[telygent-sdk]\x20worker\x20pull\x20skipped\x20execution\x20missing='+_0x49063d[_0x1d9016(0x254)](',')+_0x1d9016(0x2d5)+Object['keys'](_0x46b4f4)[_0x1d9016(0x254)](','));}}}return this['log'](_0x1d9016(0x147)+_0xa54932[_0x1d9016(0x224)]+'\x20parsed='+_0x331186['length']+_0x1d9016(0x12e)+_0x31580d),_0x331186;}async['completeWorkerExecution'](_0x468a12,_0x3905b4){const _0x367223=_0xbf23c3;await(0x0,http_1[_0x367223(0x2e8)])(BASE_URL+_0x367223(0x1a0),{'taskRunId':_0x468a12[_0x367223(0x197)],'content':_0x3905b4[_0x367223(0x253)],'conversationId':_0x3905b4[_0x367223(0x1ae)],'visualizations':_0x3905b4['visualizations']??[],'summaryCards':_0x3905b4[_0x367223(0x248)]??[],'meta':{'taskId':_0x468a12[_0x367223(0x2b4)],'schedule':_0x468a12[_0x367223(0x260)]??null}},this['authHeaders']());}async[_0xbf23c3(0x25d)](_0x2555d8,_0x402deb){const _0x18a667=_0xbf23c3,_0x545dd3={'UqBbm':function(_0x5f2c41,_0x5cad50){return _0x5f2c41 instanceof _0x5cad50;},'AIxvN':_0x18a667(0x27a)},_0x22b1d6=_0x545dd3[_0x18a667(0x142)](_0x402deb,Error)?_0x402deb['message']:_0x545dd3[_0x18a667(0x222)];await(0x0,http_1[_0x18a667(0x2e8)])(BASE_URL+_0x18a667(0x178),{'taskRunId':_0x2555d8['taskRunId'],'message':_0x22b1d6},this[_0x18a667(0x25a)]());}async[_0xbf23c3(0x20a)](_0x5df025){const _0x5c9ae1=_0xbf23c3,_0x11a400={'diVMd':function(_0x234886,_0xd3f1c4){return _0x234886 instanceof _0xd3f1c4;},'wVKBr':'Task\x20execution\x20failed','xVpLF':'DPXSV','tLysI':function(_0x5f085e,_0x32b6b9){return _0x5f085e instanceof _0x32b6b9;},'SHbhp':_0x5c9ae1(0x291)};try{this['log'](_0x5c9ae1(0x135)+_0x5df025[_0x5c9ae1(0x197)]+_0x5c9ae1(0x23c)+_0x5df025[_0x5c9ae1(0x2b4)]);const _0x1c5e6e=await this[_0x5c9ae1(0x2cd)]({'question':_0x5df025[_0x5c9ae1(0x289)],'conversationId':_0x5df025[_0x5c9ae1(0x1ae)],'userContext':{'userId':_0x5df025[_0x5c9ae1(0x29f)]}});await this[_0x5c9ae1(0x249)](_0x5df025,_0x1c5e6e),this[_0x5c9ae1(0x27d)](_0x5c9ae1(0x1ab)+_0x5df025[_0x5c9ae1(0x197)]);}catch(_0x1bc089){const _0x2132cc=_0x11a400[_0x5c9ae1(0x1b2)](_0x1bc089,Error)?_0x1bc089[_0x5c9ae1(0x246)]:_0x11a400[_0x5c9ae1(0x22e)];this[_0x5c9ae1(0x27d)](_0x5c9ae1(0x208)+_0x5df025[_0x5c9ae1(0x197)]+_0x5c9ae1(0x2d0)+_0x2132cc);try{await this[_0x5c9ae1(0x25d)](_0x5df025,_0x1bc089);}catch(_0x1dc916){if(_0x11a400[_0x5c9ae1(0x1f9)]!==_0x5c9ae1(0x244)){if(_0x302e0b){const _0x848ba2=_0x1ef6c0['apply'](_0x372e7e,arguments);return _0x1ec0cf=null,_0x848ba2;}}else{const _0x320cc5=_0x11a400['tLysI'](_0x1dc916,Error)?_0x1dc916[_0x5c9ae1(0x246)]:_0x11a400['SHbhp'];this[_0x5c9ae1(0x27d)]('[telygent-sdk]\x20worker\x20fail\x20callback\x20error\x20taskRunId='+_0x5df025[_0x5c9ae1(0x197)]+'\x20error='+_0x320cc5);}}}}async['pollTaskExecutions'](){const _0x308ebf=_0xbf23c3;if(!this['workerConfig']?.[_0x308ebf(0x196)])return;const _0x3d99be=await(0x0,http_1[_0x308ebf(0x2e8)])(BASE_URL+_0x308ebf(0x29e),{'limit':this[_0x308ebf(0x230)][_0x308ebf(0x25e)]??0xa},this[_0x308ebf(0x25a)]());this[_0x308ebf(0x27d)]('[telygent-sdk]\x20worker\x20poll\x20response\x20keys='+Object[_0x308ebf(0x12c)](_0x3d99be)['join'](','));const _0x243ae9=this[_0x308ebf(0x1eb)](_0x3d99be);this[_0x308ebf(0x27d)]('[telygent-sdk]\x20worker\x20poll\x20completed\x20executions='+_0x243ae9[_0x308ebf(0x224)]);for(const _0xda9f72 of _0x243ae9)await this['executeWorkerExecution'](_0xda9f72);}async[_0xbf23c3(0x24b)](){const _0x26d1b8=_0xbf23c3,_0x458399={'jZUHf':function(_0x1dee34,_0x5374be){return _0x1dee34==_0x5374be;},'Qdepe':_0x26d1b8(0x2b9),'djkbT':function(_0x3fb53e,_0x2c46ac){return _0x3fb53e===_0x2c46ac;},'zcubm':_0x26d1b8(0x1e8),'anORi':_0x26d1b8(0x1fb),'EFpra':'object','zhxPK':function(_0x3d6d14){return _0x3d6d14();},'uJrlD':function(_0x2fa80b,_0x294b77){return _0x2fa80b>_0x294b77;},'BoQil':_0x26d1b8(0x217),'RbDsy':function(_0x2c7a6f,_0x363348){return _0x2c7a6f==_0x363348;},'mhCuT':_0x26d1b8(0x1fc),'KhNKW':function(_0x2f328a,_0x41000f){return _0x2f328a-_0x41000f;},'brBZH':function(_0x417f1e,_0x4798e3){return _0x417f1e!=_0x4798e3;},'qVXCo':function(_0x14c6a7,_0x428d63){return _0x14c6a7+_0x428d63;},'GjEmp':function(_0x43f84b,_0x24e0a9){return _0x43f84b-_0x24e0a9;},'MziQO':function(_0x42a724,_0x156663){return _0x42a724!==_0x156663;},'WYogU':_0x26d1b8(0x1de)};if(!this[_0x26d1b8(0x2ef)]||this[_0x26d1b8(0x1f0)]||this[_0x26d1b8(0x2db)])return;this[_0x26d1b8(0x2db)]=!0x0;const _0x5dd161=((async()=>{const _0x12bbfe=_0x26d1b8;try{await this['pollTaskExecutions']();}catch(_0x1c9b31){if(_0x458399[_0x12bbfe(0x2a2)](_0x12bbfe(0x1e8),_0x458399[_0x12bbfe(0x1cc)])){const _0x8da5c6=_0x1c9b31 instanceof Error?_0x1c9b31[_0x12bbfe(0x246)]:_0x458399['anORi'];this[_0x12bbfe(0x27d)](_0x12bbfe(0x2a3)+_0x8da5c6);}else{const _0xd038a8=this[_0x12bbfe(0x1f2)][_0xd0a5ec];if(_0x458399['jZUHf'](_0x458399[_0x12bbfe(0x14d)],typeof _0xd038a8))return{'handler':_0xd038a8};}}})());this['workerCyclePromise']=_0x5dd161;try{if(_0x458399['MziQO']('irlrq',_0x26d1b8(0x265))){if(_0x3ad645&&_0x458399[_0x26d1b8(0x1a8)]==typeof _0x57662b)return _0x1719d1;const _0x1cf7da=_0x458399[_0x26d1b8(0x189)](_0xbda881);if(!_0x1cf7da)return _0x521984;try{return new _0x1cf7da(_0x4d79f7(_0x48cbf3));}catch{return _0x34ff2f;}}else await _0x5dd161;}finally{if(_0x458399[_0x26d1b8(0x2f2)](_0x26d1b8(0x1de),_0x458399['WYogU'])){if(_0x458399[_0x26d1b8(0x236)](_0x29081e,0x6))return _0x458399['BoQil'];if(_0x458399['RbDsy'](_0x458399[_0x26d1b8(0x2d1)],typeof _0x265c3b))return _0x5ad608;if(_0x3fb24c[_0x26d1b8(0x270)](_0x2c1efb)){const _0x545b0a=_0x32e381['slice'](0x0,0x19)[_0x26d1b8(0x2d3)](_0x4580cb=>this['compactValue'](_0x4580cb,_0x1a8fb7+0x1));return _0x458399['uJrlD'](_0x203908['length'],0x19)&&_0x545b0a['push'](_0x26d1b8(0x2c6)+_0x458399[_0x26d1b8(0x205)](_0x4d4fcd[_0x26d1b8(0x224)],0x19)+'\x20items]'),_0x545b0a;}if(!_0x5b0e0c||_0x458399[_0x26d1b8(0x12b)]('object',typeof _0x28ef50))return _0x2af343;const _0x2070af=_0x316fa8['entries'](_0x26ad5a),_0x8aa556={};for(const [_0x248986,_0x3d85ab]of _0x2070af['slice'](0x0,0x28))_0x8aa556[_0x248986]=this[_0x26d1b8(0x137)](_0x3d85ab,_0x458399['qVXCo'](_0x5941c6,0x1));return _0x2070af[_0x26d1b8(0x224)]>0x28&&(_0x8aa556['__truncatedKeys']=_0x458399['GjEmp'](_0x2070af[_0x26d1b8(0x224)],0x28)),_0x8aa556;}else this['workerCyclePromise']=null,this[_0x26d1b8(0x2db)]=!0x1,this[_0x26d1b8(0x1f0)]||this['scheduleNextWorkerPoll']();}}[_0xbf23c3(0x219)](){const _0x59f074=_0xbf23c3,_0x1687e3={'JmZeJ':_0x59f074(0x16c)};this[_0x59f074(0x230)]?.[_0x59f074(0x196)]?this['workerRunning']||(this[_0x59f074(0x2ef)]=!0x0,this['workerStopRequested']=!0x1,this[_0x59f074(0x27d)]('[telygent-sdk]\x20worker\x20jobs\x20started\x20intervalMs='+(this['workerConfig'][_0x59f074(0x26d)]??0x493e0)),this[_0x59f074(0x1cd)](0x0)):this[_0x59f074(0x27d)](_0x1687e3[_0x59f074(0x2a7)]);}async[_0xbf23c3(0x1b5)](){const _0x2f4cdb=_0xbf23c3,_0x40a8f9={'AIcwW':function(_0x583b30,_0x31904a){return _0x583b30(_0x31904a);}};this[_0x2f4cdb(0x1f0)]=!0x0,this[_0x2f4cdb(0x2ef)]=!0x1,this[_0x2f4cdb(0x21c)]&&(_0x40a8f9['AIcwW'](clearTimeout,this[_0x2f4cdb(0x21c)]),this[_0x2f4cdb(0x21c)]=null);const _0x5be8bf=this[_0x2f4cdb(0x2ec)];_0x5be8bf&&await _0x5be8bf,this[_0x2f4cdb(0x27d)]('[telygent-sdk]\x20worker\x20jobs\x20stopped');}[_0xbf23c3(0x2d2)](_0x50b430){const _0x2dced5=_0xbf23c3,_0x481ced={'kqxjA':_0x2dced5(0x21d)};return{'message':_0x481ced['kqxjA'],'content':_0x50b430['content'],'conversationId':_0x50b430[_0x2dced5(0x1ae)],'visualizations':_0x50b430[_0x2dced5(0x2d8)],'summaryCards':_0x50b430[_0x2dced5(0x248)]};}[_0xbf23c3(0x11d)](_0x4ef9f9){const _0x13e82f=_0xbf23c3,_0x27c1bd={'AQpNK':function(_0x30923b,_0x1d8596){return _0x30923b==_0x1d8596;},'fxHRZ':_0x13e82f(0x1fc),'SCEbK':function(_0x27d233,_0x44469c){return _0x27d233==_0x44469c;}},_0x45a555=_0x27c1bd['AQpNK'](_0x27c1bd[_0x13e82f(0x28f)],typeof _0x4ef9f9[_0x13e82f(0x289)])?_0x4ef9f9['question']:'',_0x57c4ac=_0x27c1bd[_0x13e82f(0x1c4)](_0x13e82f(0x1fc),typeof _0x4ef9f9[_0x13e82f(0x240)])?_0x4ef9f9['messageContext'][_0x13e82f(0x1e6)]():'';return _0x57c4ac?_0x45a555+_0x13e82f(0x2be)+this['trimMessageContext'](_0x57c4ac):_0x45a555;}async[_0xbf23c3(0x281)](){const _0x1e6a7e=_0xbf23c3,_0x123dc9={'gTcoY':function(_0x3dc907,_0x225d77){return _0x3dc907===_0x225d77;}};if(!this[_0x1e6a7e(0x239)]||!this[_0x1e6a7e(0x287)]||_0x123dc9[_0x1e6a7e(0x297)](0x0,Object[_0x1e6a7e(0x12c)](this[_0x1e6a7e(0x287)])[_0x1e6a7e(0x224)]))return this[_0x1e6a7e(0x143)];if(this[_0x1e6a7e(0x1b9)])return this[_0x1e6a7e(0x143)];const _0x497415=await(0x0,http_1[_0x1e6a7e(0x2e8)])(BASE_URL+_0x1e6a7e(0x2e5),{'registryVersion':this[_0x1e6a7e(0x143)],'registry':this[_0x1e6a7e(0x287)]},this[_0x1e6a7e(0x25a)]());return this[_0x1e6a7e(0x143)]=_0x497415[_0x1e6a7e(0x143)]||this[_0x1e6a7e(0x143)],this['initialized']=!0x0,this[_0x1e6a7e(0x143)];}[_0xbf23c3(0x2a0)](_0x1bd5c7,_0x972cae){const _0x3691c0=_0xbf23c3,_0x22cae7={'dOvAv':function(_0x5b0965,_0x32d59d){return _0x5b0965===_0x32d59d;}},_0x293eea=this[_0x3691c0(0x1e7)][_0x1bd5c7];return _0x293eea&&_0x293eea[_0x3691c0(0x2b2)]&&0x0!==_0x293eea[_0x3691c0(0x2b2)]['length']?_0x293eea[_0x3691c0(0x2b2)][_0x3691c0(0x2d3)](_0x163d09=>{const _0x22beea=_0x3691c0;if(_0x22beea(0x279)in _0x163d09)return{'field':_0x163d09[_0x22beea(0x165)],'value':this[_0x22beea(0x148)](_0x163d09[_0x22beea(0x279)],_0x163d09[_0x22beea(0x11c)])};const _0x1c9a0a=_0x972cae[_0x163d09[_0x22beea(0x120)]];if(_0x22cae7['dOvAv'](void 0x0,_0x1c9a0a))throw new Error(_0x22beea(0x17a)+_0x163d09[_0x22beea(0x120)]);return{'field':_0x163d09[_0x22beea(0x165)],'value':this['castRequiredValue'](_0x1c9a0a,_0x163d09['type'])};}):[];}['castRequiredValue'](_0x143eb5,_0x5b21b9){const _0x4107f3=_0xbf23c3,_0x5d0951={'HPDHr':_0x4107f3(0x1fc),'afMLg':function(_0x5e236b,_0x34ad3){return _0x5e236b==_0x34ad3;},'fYDLe':function(_0x4c1789,_0x2b7f40){return _0x4c1789(_0x2b7f40);},'OOIFm':function(_0x4c3180,_0x573364){return _0x4c3180(_0x573364);},'WdjWH':'boolean','YOFKq':function(_0x545cee,_0x3236dc){return _0x545cee==_0x3236dc;},'Qjhtt':function(_0x3bca9e,_0x4dca84){return _0x3bca9e===_0x4dca84;},'Aefxx':_0x4107f3(0x229),'EiScq':function(_0x1b0f72,_0x426e76){return _0x1b0f72!==_0x426e76;},'ZyLGf':_0x4107f3(0x2c5),'hOrzF':_0x4107f3(0x211),'JHeoj':function(_0x23ebdd,_0x40a621){return _0x23ebdd instanceof _0x40a621;},'BvkYi':_0x4107f3(0x2b3),'URqSR':function(_0x57c803,_0xe02e2d){return _0x57c803==_0xe02e2d;},'AzIdi':'object','mtjZK':function(_0x2fa90c,_0xa7e6fa){return _0x2fa90c(_0xa7e6fa);}};if(!_0x5b21b9)return _0x143eb5;switch(_0x5b21b9){case _0x5d0951[_0x4107f3(0x184)]:return _0x5d0951[_0x4107f3(0x24d)](null,_0x143eb5)?_0x143eb5:_0x5d0951[_0x4107f3(0x2e3)](String,_0x143eb5);case _0x4107f3(0x23d):{const _0x50f842=_0x5d0951['OOIFm'](Number,_0x143eb5);return Number[_0x4107f3(0x17e)](_0x50f842)?_0x143eb5:_0x50f842;}case _0x5d0951[_0x4107f3(0x263)]:return _0x5d0951[_0x4107f3(0x269)](_0x5d0951[_0x4107f3(0x263)],typeof _0x143eb5)?_0x143eb5:_0x5d0951['Qjhtt'](_0x5d0951[_0x4107f3(0x145)],_0x143eb5)||_0x5d0951['Qjhtt']('1',_0x143eb5)||_0x5d0951['EiScq'](_0x5d0951[_0x4107f3(0x250)],_0x143eb5)&&_0x5d0951[_0x4107f3(0x1ff)]('0',_0x143eb5)&&_0x143eb5;case _0x5d0951[_0x4107f3(0x127)]:{if(_0x5d0951[_0x4107f3(0x286)](_0x143eb5,Date))return _0x143eb5;const _0x160d75=new Date(String(_0x143eb5));return Number[_0x4107f3(0x17e)](_0x160d75[_0x4107f3(0x1af)]())?_0x143eb5:_0x160d75;}case _0x5d0951['BvkYi']:{if(_0x143eb5&&_0x5d0951[_0x4107f3(0x1d4)](_0x5d0951['AzIdi'],typeof _0x143eb5))return _0x143eb5;const _0x549914=resolveObjectIdCtor();if(!_0x549914)return _0x143eb5;try{return new _0x549914(_0x5d0951['mtjZK'](String,_0x143eb5));}catch{return _0x143eb5;}}default:return _0x143eb5;}}[_0xbf23c3(0x2ee)](_0x29be76){const _0x2abd46=_0xbf23c3,_0x5df40b={'SZvFX':function(_0x4b002b,_0x4ef08d){return _0x4b002b instanceof _0x4ef08d;},'Umsax':function(_0x5d60fc,_0x239b64){return _0x5d60fc==_0x239b64;},'dbtKF':_0x2abd46(0x1fc)};if(_0x5df40b['SZvFX'](_0x29be76,Date))return _0x29be76;if(_0x5df40b['Umsax'](_0x5df40b[_0x2abd46(0x1c1)],typeof _0x29be76)){const _0x17bf68=new Date(_0x29be76);return Number[_0x2abd46(0x17e)](_0x17bf68[_0x2abd46(0x1af)]())?_0x29be76:_0x17bf68;}return _0x29be76;}[_0xbf23c3(0x179)](_0x9d7a38,_0x37dee2){const _0x4313f2=_0xbf23c3,_0x1a6a4f={'kpOrb':function(_0x5d1062,_0x32423){return _0x5d1062!=_0x32423;},'AbOkm':'date','kTTBy':_0x4313f2(0x170),'gFYDX':_0x4313f2(0x215),'lKWuI':_0x4313f2(0x2d9),'OFvVi':_0x4313f2(0x299)};if(!_0x9d7a38||_0x1a6a4f[_0x4313f2(0x1d5)]('object',typeof _0x9d7a38))return _0x9d7a38;if(Array[_0x4313f2(0x270)](_0x9d7a38))return _0x9d7a38['map'](_0x8a8c18=>this['coerceDateOperators'](_0x8a8c18,_0x37dee2));const _0x5305a4=_0x37dee2['toLowerCase']();if(!(_0x5305a4[_0x4313f2(0x2cf)]('at')||_0x5305a4[_0x4313f2(0x2cf)](_0x1a6a4f[_0x4313f2(0x28a)])))return _0x9d7a38;const _0x4b75b5=new Set([_0x1a6a4f[_0x4313f2(0x19c)],_0x1a6a4f['gFYDX'],_0x1a6a4f[_0x4313f2(0x237)],_0x1a6a4f[_0x4313f2(0x156)]]),_0x48f632={..._0x9d7a38};for(const _0x1b485e of Object[_0x4313f2(0x12c)](_0x48f632))_0x4b75b5[_0x4313f2(0x164)](_0x1b485e)&&(_0x48f632[_0x1b485e]=this['coerceDateValue'](_0x48f632[_0x1b485e]));return _0x48f632;}[_0xbf23c3(0x266)](_0x1a1f09){const _0x5f0fb3=_0xbf23c3,_0x676044={'ptQPe':function(_0x5edf7c,_0x2aa38b){return _0x5edf7c==_0x2aa38b;},'RjYoR':_0x5f0fb3(0x278),'jDsqR':function(_0x22efe6,_0x2a1b58){return _0x22efe6!=_0x2a1b58;}},_0x40d48e={};for(const [_0x54d883,_0x57091b]of Object[_0x5f0fb3(0x241)](_0x1a1f09))_0x54d883[_0x5f0fb3(0x1b0)]('$')?Array[_0x5f0fb3(0x270)](_0x57091b)?_0x40d48e[_0x54d883]=_0x57091b[_0x5f0fb3(0x2d3)](_0x256f95=>_0x5f0fb3(0x278)==typeof _0x256f95&&null!==_0x256f95?this[_0x5f0fb3(0x266)](_0x256f95):_0x256f95):_0x40d48e[_0x54d883]=_0x57091b&&_0x676044[_0x5f0fb3(0x298)](_0x676044['RjYoR'],typeof _0x57091b)?this[_0x5f0fb3(0x266)](_0x57091b):_0x57091b:!_0x57091b||_0x676044['jDsqR'](_0x676044[_0x5f0fb3(0x2b6)],typeof _0x57091b)||Array['isArray'](_0x57091b)?_0x40d48e[_0x54d883]=_0x57091b:_0x40d48e[_0x54d883]=this[_0x5f0fb3(0x179)](_0x57091b,_0x54d883);return _0x40d48e;}[_0xbf23c3(0x21e)](_0x55cd5a,_0x419bf6){return this['castRequiredValue'](_0x55cd5a,_0x419bf6);}[_0xbf23c3(0x1c2)](_0x560ebc,_0x555b64){const _0x12dc2d=_0xbf23c3,_0x89e0af={'sxxag':_0x12dc2d(0x197),'FrNgx':_0x12dc2d(0x289),'ogYGt':_0x12dc2d(0x1ae),'aJvVB':'mURqP','tKXsF':function(_0x152b40,_0x51da3b){return _0x152b40==_0x51da3b;},'yGNYL':_0x12dc2d(0x278),'PNMrR':function(_0x592faa,_0x350942){return _0x592faa(_0x350942);},'QmZTP':function(_0x2a876d,_0xb6d5d3){return _0x2a876d==_0xb6d5d3;},'KCPnn':function(_0x55adbf,_0x2f9a99){return _0x55adbf===_0x2f9a99;}};if(!_0x555b64||_0x89e0af['KCPnn'](0x0,Object[_0x12dc2d(0x12c)](_0x555b64)[_0x12dc2d(0x224)]))return _0x560ebc;const _0x54e774=_0x11fc8b=>{const _0x293fcf=_0x12dc2d,_0x5b49b7={'ufKea':_0x89e0af[_0x293fcf(0x1f1)],'xKBUi':_0x89e0af[_0x293fcf(0x188)],'epoCB':_0x293fcf(0x29f),'tuRFl':_0x89e0af[_0x293fcf(0x1c6)]},_0x63c64c={};for(const [_0x3f6caa,_0x3b48dd]of Object[_0x293fcf(0x241)](_0x11fc8b)){if(_0x3f6caa[_0x293fcf(0x1b0)]('$')){if(_0x293fcf(0x2af)!==_0x89e0af[_0x293fcf(0x19b)]){_0x142cf1+=0x1;const _0x5716b5=[];_0x23f456||_0x5716b5[_0x293fcf(0x2ad)](_0x5b49b7['ufKea']),_0x544adb||_0x5716b5['push'](_0x293fcf(0x2b4)),_0x279ada||_0x5716b5['push'](_0x5b49b7[_0x293fcf(0x192)]),_0x4a1fed||_0x5716b5[_0x293fcf(0x2ad)](_0x5b49b7['epoCB']),_0x5b9747||_0x5716b5[_0x293fcf(0x2ad)](_0x5b49b7[_0x293fcf(0x12a)]),this['log']('[telygent-sdk]\x20worker\x20pull\x20skipped\x20execution\x20missing='+_0x5716b5[_0x293fcf(0x254)](',')+_0x293fcf(0x2d5)+_0x4a6b33[_0x293fcf(0x12c)](_0x1e2be5)[_0x293fcf(0x254)](','));}else{Array[_0x293fcf(0x270)](_0x3b48dd)?_0x63c64c[_0x3f6caa]=_0x3b48dd['map'](_0x564eaf=>_0x564eaf&&_0x293fcf(0x278)==typeof _0x564eaf?_0x54e774(_0x564eaf):_0x564eaf):_0x63c64c[_0x3f6caa]=_0x3b48dd&&_0x89e0af[_0x293fcf(0x277)](_0x89e0af[_0x293fcf(0x2c2)],typeof _0x3b48dd)?_0x89e0af['PNMrR'](_0x54e774,_0x3b48dd):_0x3b48dd;continue;}}const _0x40d36c=_0x555b64[_0x3f6caa];if(_0x3b48dd&&_0x89e0af[_0x293fcf(0x293)](_0x89e0af[_0x293fcf(0x2c2)],typeof _0x3b48dd)&&!Array['isArray'](_0x3b48dd)){const _0x412cf2=this[_0x293fcf(0x179)](_0x3b48dd,_0x3f6caa);_0x63c64c[_0x3f6caa]=this[_0x293fcf(0x21e)](_0x412cf2,_0x40d36c);}else _0x63c64c[_0x3f6caa]=this['castFilterField'](_0x3b48dd,_0x40d36c);}return _0x63c64c;};return _0x89e0af['PNMrR'](_0x54e774,_0x560ebc);}[_0xbf23c3(0x1a7)](_0x41700b,_0x49bbc1,_0x3e3eb2){const _0x9cdb62=_0xbf23c3,_0x41beea={'OcIGb':function(_0x1946d8,_0x485c20){return _0x1946d8!=_0x485c20;},'HEvvM':function(_0x460d72,_0x1ba268){return _0x460d72!==_0x1ba268;},'XFIqF':_0x9cdb62(0x27f),'hPkvZ':_0x9cdb62(0x278),'UMyAh':function(_0x50c546,_0x29899b){return _0x50c546 in _0x29899b;},'mzDLh':function(_0x25042c,_0x5cb822){return _0x25042c===_0x5cb822;},'NGzvY':function(_0x1d1fff,_0x10aa68){return _0x1d1fff(_0x10aa68);},'KCmdR':_0x9cdb62(0x238)},_0x41adeb=_0x41beea['NGzvY'](String,_0x49bbc1[_0x9cdb62(0x1aa)]??'');if(!_0x41adeb)return _0x49bbc1;const _0x251934=this[_0x9cdb62(0x2a0)](_0x41adeb,_0x3e3eb2);if(_0x41beea[_0x9cdb62(0x2d4)](0x0,_0x251934[_0x9cdb62(0x224)])){const _0x2a9423=_0x49bbc1[_0x9cdb62(0x1bc)]||{},_0x66dfe1=this[_0x9cdb62(0x1e7)][_0x41adeb]?.[_0x9cdb62(0x294)];return{..._0x49bbc1,'filters':this['applyFieldTypes'](this[_0x9cdb62(0x266)](_0x2a9423),_0x66dfe1)};}if(_0x41beea['KCmdR']===_0x41700b){const _0x507e72=Array[_0x9cdb62(0x270)](_0x49bbc1['pipeline'])?[..._0x49bbc1['pipeline']]:[],_0x1ce27f=this[_0x9cdb62(0x1e7)][_0x41adeb]?.['fieldTypes'],_0x5c9095=_0x251934[_0x9cdb62(0x13b)]((_0x518bfd,_0x154af2)=>(_0x518bfd[_0x154af2[_0x9cdb62(0x165)]]=_0x154af2[_0x9cdb62(0x279)],_0x518bfd),{}),_0x39f43f=this[_0x9cdb62(0x1c2)](this['coerceDateFilters'](_0x5c9095),_0x1ce27f),_0x1f61fa=_0x507e72[_0x9cdb62(0x2d3)](_0x56c98f=>{const _0x40cae8=_0x9cdb62;if(!_0x56c98f||_0x41beea[_0x40cae8(0x1cb)](_0x40cae8(0x278),typeof _0x56c98f))return _0x56c98f;if(_0x41beea[_0x40cae8(0x146)](_0x41beea[_0x40cae8(0x200)],_0x56c98f[_0x40cae8(0x26c)]))return _0x56c98f;const _0x5e392b=_0x56c98f[_0x40cae8(0x242)];if(!_0x5e392b||_0x41beea['hPkvZ']!=typeof _0x5e392b||Array[_0x40cae8(0x270)](_0x5e392b))return _0x56c98f;for(const _0x273098 of _0x251934)_0x41beea['UMyAh'](_0x273098[_0x40cae8(0x165)],_0x5e392b)&&delete _0x5e392b[_0x273098[_0x40cae8(0x165)]];return _0x41beea[_0x40cae8(0x2d4)](0x0,Object[_0x40cae8(0x12c)](_0x5e392b)[_0x40cae8(0x224)])?null:{..._0x56c98f,'params':this[_0x40cae8(0x1c2)](this[_0x40cae8(0x266)](_0x5e392b),_0x1ce27f)};})[_0x9cdb62(0x14e)](_0x2dcca5=>null!==_0x2dcca5);return{..._0x49bbc1,'pipeline':[{'stage':_0x41beea[_0x9cdb62(0x200)],'params':_0x39f43f},..._0x1f61fa]};}const _0x338953=_0x49bbc1[_0x9cdb62(0x1bc)]||{},_0x231621=this[_0x9cdb62(0x1e7)][_0x41adeb]?.['fieldTypes'];for(const _0xdd0c35 of _0x251934)_0x41beea[_0x9cdb62(0x175)](_0xdd0c35[_0x9cdb62(0x165)],_0x338953)&&delete _0x338953[_0xdd0c35[_0x9cdb62(0x165)]],_0x338953[_0xdd0c35[_0x9cdb62(0x165)]]=_0xdd0c35['value'];return{..._0x49bbc1,'filters':this['applyFieldTypes'](this[_0x9cdb62(0x266)](_0x338953),_0x231621)};}async[_0xbf23c3(0x1ce)](_0xda1ebf,_0x446c56,_0x2739e5){const _0xe4b3eb=_0xbf23c3,_0x2f7d23={'toKpT':function(_0x109530,_0x338e81){return _0x109530!=_0x338e81;},'OBCUJ':_0xe4b3eb(0x27f),'kjqKf':_0xe4b3eb(0x278),'YZjDL':function(_0x17ec9e,_0x1e894a){return _0x17ec9e in _0x1e894a;},'PTGCB':function(_0x481dcd,_0x132713){return _0x481dcd===_0x132713;},'hZkLL':'dbAdapter\x20is\x20required\x20to\x20execute\x20tool\x20calls','GdvaR':function(_0x5e71d7,_0x26adea){return _0x5e71d7(_0x26adea);},'MVkcU':function(_0x5003bc,_0x48a3c5){return _0x5003bc==_0x48a3c5;},'UeNsF':_0xe4b3eb(0x1aa),'sptWI':_0xe4b3eb(0x15d),'peCmw':_0xe4b3eb(0x14b),'nbaLc':function(_0x4a620e,_0x30e270){return _0x4a620e===_0x30e270;},'RxHOt':_0xe4b3eb(0x2a5),'wiOpi':function(_0xb867dc,_0x4ed929){return _0xb867dc??_0x4ed929;},'wiJKi':'aggregate_documents','OFQjt':function(_0x3411bc,_0x3de1e7){return _0x3411bc??_0x3de1e7;},'wnSHs':function(_0x385eab,_0x52119a){return _0x385eab??_0x52119a;},'RhAAt':function(_0x4191e8,_0x596f93){return _0x4191e8 in _0x596f93;},'XhpuS':_0xe4b3eb(0x2a9)};if(!this[_0xe4b3eb(0x1a3)])throw new Error(_0x2f7d23[_0xe4b3eb(0x131)]);try{(0x0,validation_1[_0xe4b3eb(0x11e)])(_0xda1ebf,this[_0xe4b3eb(0x1e7)],{'maxComplexity':this[_0xe4b3eb(0x14a)]});const _0x28ead7=_0xda1ebf['input'],_0x2048bc=_0x2f7d23['GdvaR'](String,_0x28ead7[_0xe4b3eb(0x1aa)]??''),_0x3ef639=_0x28ead7[_0xe4b3eb(0x2e4)]&&_0x2f7d23['MVkcU']('object',typeof _0x28ead7[_0xe4b3eb(0x2e4)])?_0x28ead7[_0xe4b3eb(0x2e4)]:_0x28ead7,_0x2f63af=_0x2048bc&&!_0x2f7d23[_0xe4b3eb(0x122)](_0x2f7d23['UeNsF'],_0x3ef639)?{..._0x3ef639,'model':_0x2048bc}:_0x3ef639,_0x493d70=this['applyRequiredFilters'](_0x2f7d23[_0xe4b3eb(0x11f)]===_0xda1ebf['name']?_0x2f7d23['peCmw']:_0xda1ebf['name'],_0x2f63af,_0x446c56);let _0xcfd30a;switch(_0xda1ebf[_0xe4b3eb(0x2d7)]){case _0x2f7d23[_0xe4b3eb(0x259)]:if(_0x2048bc){if(_0x2f7d23['nbaLc'](_0xe4b3eb(0x251),_0x2f7d23[_0xe4b3eb(0x18d)])){const _0x4a5090={'HsPZc':function(_0x56edaa,_0x4cf59a){return _0x2f7d23['toKpT'](_0x56edaa,_0x4cf59a);},'fZHKG':_0x2f7d23['OBCUJ'],'jpIGR':function(_0x5f46f1,_0x35ab83){return _0x5f46f1!=_0x35ab83;},'zyXXo':_0x2f7d23[_0xe4b3eb(0x1ad)],'EgrPd':function(_0x213fd1,_0xaf02a4){const _0x46c3b5=_0xe4b3eb;return _0x2f7d23[_0x46c3b5(0x122)](_0x213fd1,_0xaf02a4);},'Dqfin':function(_0x205e57,_0x32b72f){const _0x42a1f2=_0xe4b3eb;return _0x2f7d23[_0x42a1f2(0x1e9)](_0x205e57,_0x32b72f);}},_0x34c6f9=_0x5076c8['isArray'](_0xe5cdd1[_0xe4b3eb(0x22c)])?[..._0x935998[_0xe4b3eb(0x22c)]]:[],_0x2f8e90=this[_0xe4b3eb(0x1e7)][_0x1e93d6]?.[_0xe4b3eb(0x294)],_0x1031d9=_0x51ee58[_0xe4b3eb(0x13b)]((_0x40434a,_0x3c07e2)=>(_0x40434a[_0x3c07e2[_0xe4b3eb(0x165)]]=_0x3c07e2[_0xe4b3eb(0x279)],_0x40434a),{}),_0x19314f=this['applyFieldTypes'](this[_0xe4b3eb(0x266)](_0x1031d9),_0x2f8e90),_0x5565f2=_0x34c6f9[_0xe4b3eb(0x2d3)](_0xfde032=>{const _0x5b680d=_0xe4b3eb;if(!_0xfde032||_0x4a5090[_0x5b680d(0x167)](_0x5b680d(0x278),typeof _0xfde032))return _0xfde032;if(_0x4a5090[_0x5b680d(0x264)]!==_0xfde032[_0x5b680d(0x26c)])return _0xfde032;const _0x4daadc=_0xfde032[_0x5b680d(0x242)];if(!_0x4daadc||_0x4a5090[_0x5b680d(0x29a)](_0x4a5090[_0x5b680d(0x121)],typeof _0x4daadc)||_0xc5baec[_0x5b680d(0x270)](_0x4daadc))return _0xfde032;for(const _0x5e1b74 of _0x52705e)_0x4a5090[_0x5b680d(0x227)](_0x5e1b74[_0x5b680d(0x165)],_0x4daadc)&&delete _0x4daadc[_0x5e1b74['field']];return _0x4a5090['Dqfin'](0x0,_0x3401af[_0x5b680d(0x12c)](_0x4daadc)[_0x5b680d(0x224)])?null:{..._0xfde032,'params':this[_0x5b680d(0x1c2)](this['coerceDateFilters'](_0x4daadc),_0x2f8e90)};})[_0xe4b3eb(0x14e)](_0x26b5fa=>null!==_0x26b5fa);return{..._0x296292,'pipeline':[{'stage':_0xe4b3eb(0x27f),'params':_0x19314f},..._0x5565f2]};}else{const _0x433231=this[_0xe4b3eb(0x1e7)][_0x2048bc]?.[_0xe4b3eb(0x1f6)];this['log'](_0xe4b3eb(0x177)+_0x2048bc+_0xe4b3eb(0x2cc)+_0x2f7d23['wiOpi'](_0x433231,'')+_0xe4b3eb(0x17f)+this[_0xe4b3eb(0x1e1)](_0x493d70));}}_0xcfd30a=await this[_0xe4b3eb(0x1a3)][_0xe4b3eb(0x26a)](_0x493d70);break;case _0x2f7d23[_0xe4b3eb(0x292)]:if(_0x2048bc){const _0xf58b53=this[_0xe4b3eb(0x1e7)][_0x2048bc]?.[_0xe4b3eb(0x1f6)];this[_0xe4b3eb(0x27d)]('[telygent-sdk]\x20aggregate_documents\x20model='+_0x2048bc+_0xe4b3eb(0x2cc)+_0x2f7d23[_0xe4b3eb(0x16a)](_0xf58b53,'')+_0xe4b3eb(0x17f)+this['safeLogValue'](_0x493d70));}_0xcfd30a=await this[_0xe4b3eb(0x1a3)][_0xe4b3eb(0x1be)](_0x493d70);break;case _0xe4b3eb(0x234):if(_0x2048bc){const _0x505b64=this['registry'][_0x2048bc]?.[_0xe4b3eb(0x1f6)];this[_0xe4b3eb(0x27d)]('[telygent-sdk]\x20get_document_by_id\x20model='+_0x2048bc+_0xe4b3eb(0x2cc)+_0x2f7d23[_0xe4b3eb(0x25c)](_0x505b64,'')+'\x20input='+this[_0xe4b3eb(0x1e1)](_0x493d70));}_0xcfd30a=await this[_0xe4b3eb(0x1a3)][_0xe4b3eb(0x22b)](_0x493d70);break;case _0x2f7d23[_0xe4b3eb(0x11f)]:{const _0x16ed8b='string'==typeof _0x28ead7[_0xe4b3eb(0x28b)]?_0x28ead7[_0xe4b3eb(0x28b)]:void 0x0,{handler:_0x16c5d6,reason:_0x285b46}=this[_0xe4b3eb(0x1da)](_0x2048bc,_0x16ed8b);if(!_0x16c5d6)throw new Error(_0x285b46??'Custom\x20service\x20not\x20configured\x20for\x20model\x20\x27'+_0x2048bc+'\x27');let _0x4744d9=_0x493d70;if(!_0x2f7d23[_0xe4b3eb(0x122)](_0x2f7d23[_0xe4b3eb(0x2bc)],_0x3ef639)&&_0x2f7d23[_0xe4b3eb(0x27c)](_0x2f7d23[_0xe4b3eb(0x2bc)],_0x493d70)){const {model:_0x58e89f,..._0x3037e4}=_0x493d70;_0x4744d9=_0x3037e4;}this['log'](_0xe4b3eb(0x130)+_0x2048bc+(_0x16ed8b?_0xe4b3eb(0x2c1)+_0x16ed8b:'')+_0xe4b3eb(0x17f)+this[_0xe4b3eb(0x1e1)](_0x4744d9)),_0xcfd30a=await _0x16c5d6(_0x4744d9);break;}default:throw new Error('Unsupported\x20tool:\x20'+_0xda1ebf[_0xe4b3eb(0x2d7)]);}return this[_0xe4b3eb(0x27d)]('[telygent-sdk]\x20'+_0xda1ebf[_0xe4b3eb(0x2d7)]+_0xe4b3eb(0x171)+this['summarizeResult'](_0xcfd30a)),{'tool_use_id':_0xda1ebf['id'],'content':this[_0xe4b3eb(0x159)](_0xcfd30a)};}catch(_0x25246f){return this[_0xe4b3eb(0x27d)](_0xe4b3eb(0x1f3)+_0xda1ebf[_0xe4b3eb(0x2d7)]+_0xe4b3eb(0x2d0)+(_0x25246f instanceof Error?_0x25246f['message']:_0x2f7d23[_0xe4b3eb(0x1d7)])),{'tool_use_id':_0xda1ebf['id'],'content':{'message':_0x25246f instanceof Error?_0x25246f[_0xe4b3eb(0x246)]:_0xe4b3eb(0x2a9)},'is_error':!0x0};}}async[_0xbf23c3(0x204)](_0x4b0802){const _0x3e483b=_0xbf23c3,_0x1af78c={'qObwq':function(_0x180a65,_0x531946){return _0x180a65===_0x531946;},'coJuf':_0x3e483b(0x187),'WFFtb':_0x3e483b(0x1fe)},_0x19a5e4=[];for(const _0x1640b0 of _0x4b0802[_0x3e483b(0x1d1)]){if(this[_0x3e483b(0x124)](_0x1640b0[_0x3e483b(0x2d7)])){this['log'](_0x3e483b(0x199)+_0x1640b0[_0x3e483b(0x2d7)]);continue;}const _0x4ebdf7=this[_0x3e483b(0x2a1)](_0x1640b0),_0x5d5a48=_0x4b0802['cache'][_0x3e483b(0x1bb)](_0x4ebdf7);if(_0x5d5a48){if(_0x1af78c[_0x3e483b(0x1dc)](_0x1af78c[_0x3e483b(0x2e2)],_0x1af78c[_0x3e483b(0x129)]))return this[_0x3e483b(0x2a4)][_0x3e483b(0x18b)](_0x3919c5);else{this[_0x3e483b(0x27d)]('[telygent-sdk]\x20reusing\x20cached\x20tool\x20result\x20for\x20'+_0x1640b0[_0x3e483b(0x2d7)]),_0x19a5e4[_0x3e483b(0x2ad)]({'tool_use_id':_0x1640b0['id'],'content':_0x5d5a48[_0x3e483b(0x253)],..._0x5d5a48[_0x3e483b(0x1ec)]?{'is_error':!0x0}:{}});continue;}}const _0x19088a=await this[_0x3e483b(0x1ce)](_0x1640b0,_0x4b0802[_0x3e483b(0x27e)],_0x4b0802[_0x3e483b(0x289)]),_0x3f0c31=this[_0x3e483b(0x159)](_0x19088a[_0x3e483b(0x253)]);_0x4b0802[_0x3e483b(0x2dd)][_0x3e483b(0x206)](_0x4ebdf7,{'content':_0x3f0c31,'is_error':_0x19088a['is_error']}),_0x19a5e4[_0x3e483b(0x2ad)]({..._0x19088a,'content':_0x3f0c31});}return _0x19a5e4;}async[_0xbf23c3(0x2cd)](_0x4a288d){const _0x51eecd=_0xbf23c3,_0xbeb114={'tmlNt':function(_0x31d35,_0x26f26c){return _0x31d35>_0x26f26c;},'DKMfQ':function(_0xba03e3,_0x50ccac){return _0xba03e3??_0x50ccac;},'OGNMV':function(_0x1888b5,_0x301a94){return _0x1888b5!==_0x301a94;},'aMzWg':_0x51eecd(0x1d0),'JJlTd':_0x51eecd(0x2de),'Mcjyq':function(_0x44629c,_0x4d30d6){return _0x44629c===_0x4d30d6;},'NjwKQ':'final','WvCSI':_0x51eecd(0x2f0),'mIudI':function(_0x594815,_0x611147){return _0x594815(_0x611147);},'MAeqv':function(_0x54cea1,_0x4cde9a,_0x55b636){return _0x54cea1(_0x4cde9a,_0x55b636);},'IhUaU':_0x51eecd(0x1e5),'CBxYO':function(_0x373f08,_0x414d71){return _0x373f08<_0x414d71;},'vxsNI':function(_0x4df90a,_0x3502a9){return _0x4df90a>=_0x3502a9;},'KLMBP':_0x51eecd(0x24c),'RjKwH':function(_0x5105f3,_0x5f19fd,_0x35a8ae){return _0x5105f3(_0x5f19fd,_0x35a8ae);},'McvKS':'[telygent-sdk]\x20respond\x20stopped\x20after\x20soft/hard\x20cap,\x20returning\x20fallback\x20response.','BmHMJ':'I\x20couldn’t\x20complete\x20that\x20request\x20fully,\x20but\x20I’ve\x20used\x20the\x20available\x20results\x20to\x20the\x20best\x20extent\x20I\x20can.\x20Please\x20refine\x20the\x20request\x20and\x20try\x20again.','rYQMA':_0x51eecd(0x27b),'WJrii':function(_0x2a8732,_0xd1fa04){return _0x2a8732 instanceof _0xd1fa04;},'PMGuO':_0x51eecd(0x29b),'LCZyJ':_0x51eecd(0x2e7),'hbFVn':_0x51eecd(0x232)};try{if(_0xbeb114['OGNMV'](_0xbeb114[_0x51eecd(0x1d6)],_0x51eecd(0x20b))){if(!this[_0x51eecd(0x1a3)])throw new Error(_0x51eecd(0x223));if(!this['registryPayload']||0x0===Object[_0x51eecd(0x12c)](this['registryPayload'])[_0x51eecd(0x224)])throw new Error(_0x51eecd(0x1ba));await this[_0x51eecd(0x281)]();const _0x2849c3=await this['historyStore']['getMessages'](_0x4a288d[_0x51eecd(0x1ae)]),_0x4e51f3=this['selectHistoryWindow'](_0x2849c3,_0x4a288d[_0x51eecd(0x289)]),_0x50604d=this[_0x51eecd(0x2ac)](_0x4e51f3),_0x1ab8cb=this[_0x51eecd(0x11d)](_0x4a288d),_0x18afff=await(0x0,http_1[_0x51eecd(0x2e8)])(BASE_URL+_0x51eecd(0x210),{'conversationId':_0x4a288d[_0x51eecd(0x1ae)],'question':_0x1ab8cb,'userContext':_0x4a288d['userContext'],'registryVersion':this['registryVersion'],'history':_0x50604d,'aiName':this[_0x51eecd(0x24e)]},this['authHeaders']()),_0x100e42={'role':_0xbeb114[_0x51eecd(0x168)],'content':_0x4a288d['question'],'timestamp':Date[_0x51eecd(0x133)]()};if(await this[_0x51eecd(0x2a4)][_0x51eecd(0x1f8)](_0x4a288d[_0x51eecd(0x1ae)],_0x100e42),_0xbeb114[_0x51eecd(0x267)](_0xbeb114[_0x51eecd(0x2cb)],_0x18afff['status'])&&_0x18afff['content']||!_0x18afff['status']&&_0x18afff[_0x51eecd(0x253)]){const _0x57649d={'role':_0xbeb114['WvCSI'],'content':_0x18afff[_0x51eecd(0x253)],'timestamp':Date[_0x51eecd(0x133)](),'visualizations':_0x18afff[_0x51eecd(0x2d8)],'summaryCards':_0x18afff[_0x51eecd(0x248)]};return await this[_0x51eecd(0x2a4)][_0x51eecd(0x1f8)](_0x18afff[_0x51eecd(0x1ae)],_0x57649d),this[_0x51eecd(0x2d2)]({'content':_0x18afff['content'],'conversationId':_0x18afff['conversationId'],'visualizations':_0x18afff[_0x51eecd(0x2d8)],'summaryCards':_0x18afff[_0x51eecd(0x248)]});}const _0xbf6ed=_0x18afff['tool_calls']??[],_0x5a5b6a=new Map(),_0x340bff=await this[_0x51eecd(0x204)]({'toolCalls':_0xbf6ed,'userContext':_0x4a288d[_0x51eecd(0x27e)],'question':_0x1ab8cb,'cache':_0x5a5b6a}),_0x5c1c75=this['compactToolResults'](_0x340bff),_0xe94ce=_0x4046b2=>_0x4046b2[_0x51eecd(0x221)]?_0x4046b2[_0x51eecd(0x221)]:_0x4046b2[_0x51eecd(0x2b1)]&&_0x4046b2['tool_calls'][_0x51eecd(0x224)]>0x0?_0x51eecd(0x1e5):_0x51eecd(0x1fa),_0x1ad80a=(_0x4d0728,_0x209b5b)=>{const _0x3d1933=_0x51eecd;this['log'](_0x3d1933(0x1f3)+_0x4d0728+'\x20status='+(_0x209b5b[_0x3d1933(0x221)]??_0x3d1933(0x231))+_0x3d1933(0x1a4)+(_0x209b5b['tool_calls']?.[_0x3d1933(0x224)]??0x0)+_0x3d1933(0x12d)+('string'==typeof _0x209b5b[_0x3d1933(0x253)]&&_0xbeb114[_0x3d1933(0x201)](_0x209b5b[_0x3d1933(0x253)][_0x3d1933(0x224)],0x0)));};let _0x26f098=await(0x0,http_1[_0x51eecd(0x2e8)])(BASE_URL+_0x51eecd(0x190),{'conversationId':_0x4a288d['conversationId'],'question':_0x1ab8cb,'history':_0x50604d,'tool_calls':_0xbf6ed,'tool_results':_0x5c1c75,'registryVersion':this[_0x51eecd(0x143)],'userContext':_0x4a288d['userContext'],'aiName':this[_0x51eecd(0x24e)]},this['authHeaders']());const _0x4b9607=0xf,_0x402662=0x1e;let _0x57b5c6=0x0,_0x371e3d=_0xbeb114['mIudI'](_0xe94ce,_0x26f098),_0x5d0da0=!0x1;for(_0xbeb114[_0x51eecd(0x18f)](_0x1ad80a,'respond\x20initial',_0x26f098);_0xbeb114[_0x51eecd(0x267)](_0xbeb114[_0x51eecd(0x26b)],_0x371e3d)&&_0xbeb114[_0x51eecd(0x2e9)](_0x57b5c6,_0x402662);){_0x57b5c6+=0x1,!_0x5d0da0&&_0xbeb114[_0x51eecd(0x20e)](_0x57b5c6,_0x4b9607)&&(_0x5d0da0=!0x0);const _0x57dd7a=_0x26f098[_0x51eecd(0x2b1)]??[];if(0x0===_0x57dd7a[_0x51eecd(0x224)])throw new Error(_0xbeb114[_0x51eecd(0x155)]);const _0x19a342=await this[_0x51eecd(0x204)]({'toolCalls':_0x57dd7a,'userContext':_0x4a288d['userContext'],'question':_0x1ab8cb,'cache':_0x5a5b6a}),_0x1d6c69=this[_0x51eecd(0x218)](_0x19a342);_0x26f098=await(0x0,http_1['postJson'])(BASE_URL+_0x51eecd(0x190),{'conversationId':_0x4a288d['conversationId'],'question':_0x1ab8cb,'history':_0x50604d,'tool_calls':_0x57dd7a,'tool_results':_0x1d6c69,'registryVersion':this[_0x51eecd(0x143)],'userContext':_0x4a288d[_0x51eecd(0x27e)],'softCapReached':_0x5d0da0,'aiName':this[_0x51eecd(0x24e)]},this['authHeaders']()),_0x371e3d=_0xbeb114[_0x51eecd(0x2ab)](_0xe94ce,_0x26f098),_0xbeb114[_0x51eecd(0x13e)](_0x1ad80a,'respond\x20cycle\x20'+_0x57b5c6,_0x26f098);}let _0x2a4ff6=_0x26f098['content']??'';_0xbeb114[_0x51eecd(0x26b)]===_0x371e3d&&(_0x2a4ff6='I\x20couldn\x27t\x20complete\x20that\x20request\x20after\x20several\x20attempts.\x20Please\x20refine\x20the\x20question\x20or\x20provide\x20additional\x20filters\x20(e.g.,\x20country,\x20role,\x20or\x20time\x20range).',this[_0x51eecd(0x27d)](_0xbeb114[_0x51eecd(0x1f4)])),_0x2a4ff6&&0x0!==_0x2a4ff6['trim']()['length']||(_0x2a4ff6=_0xbeb114[_0x51eecd(0x261)],this[_0x51eecd(0x27d)](_0xbeb114['rYQMA']));const _0x443ad8={'role':_0x51eecd(0x2f0),'content':_0x2a4ff6,'timestamp':Date[_0x51eecd(0x133)](),'visualizations':_0x26f098['visualizations'],'summaryCards':_0x26f098['summaryCards']};return await this[_0x51eecd(0x2a4)][_0x51eecd(0x1f8)](_0x26f098['conversationId'],_0x443ad8),this[_0x51eecd(0x2d2)]({'content':_0x2a4ff6,'conversationId':_0x26f098['conversationId'],'visualizations':_0x26f098[_0x51eecd(0x2d8)],'summaryCards':_0x26f098[_0x51eecd(0x248)]});}else{const _0x42e220=this[_0x51eecd(0x1e7)][_0x29b0a6]?.[_0x51eecd(0x1f6)];this[_0x51eecd(0x27d)]('[telygent-sdk]\x20aggregate_documents\x20model='+_0x3ba665+'\x20collection='+_0xbeb114['DKMfQ'](_0x42e220,'')+'\x20input='+this[_0x51eecd(0x1e1)](_0x539d55));}}catch(_0x21eb99){const _0x49d9b2=_0xbeb114[_0x51eecd(0x2dc)](_0x21eb99,Error)?_0x21eb99['message']:'';if(_0x49d9b2['includes'](_0xbeb114[_0x51eecd(0x161)])||_0x49d9b2[_0x51eecd(0x202)]()[_0x51eecd(0x2b5)](_0xbeb114[_0x51eecd(0x2c4)])){const _0x5161e0=_0xbeb114[_0x51eecd(0x141)];return await this['historyStore'][_0x51eecd(0x1f8)](_0x4a288d['conversationId'],{'role':_0xbeb114[_0x51eecd(0x2c9)],'content':_0x5161e0,'timestamp':Date['now']()}),this[_0x51eecd(0x2d2)]({'content':_0x5161e0,'conversationId':_0x4a288d[_0x51eecd(0x1ae)]});}throw _0x21eb99;}}async[_0xbf23c3(0x144)](_0x4ceb64,_0x3173fe){const _0x2af87c=_0xbf23c3,_0x3ce5d8={'FykRW':'dbAdapter\x20is\x20required\x20to\x20query','DieJw':_0x2af87c(0x1ba),'amZbU':_0x2af87c(0x2de),'Tajby':function(_0x341e4e,_0x329bd1){return _0x341e4e===_0x329bd1;},'AvGts':_0x2af87c(0x1fa),'wuMcW':function(_0x3e2ac0,_0x49a0c8){return _0x3e2ac0(_0x49a0c8);},'OROII':function(_0x3d44a4,_0x2f592d){return _0x3d44a4===_0x2f592d;},'GqCgB':_0x2af87c(0x1e5),'hqzEf':function(_0x524d26,_0x48cebe){return _0x524d26<_0x48cebe;},'jqYqg':function(_0x496565,_0x5f01e0){return _0x496565(_0x5f01e0);},'vLDmH':function(_0x29b3c0,_0x42f5f2){return _0x29b3c0===_0x42f5f2;},'hRsSW':_0x2af87c(0x220),'XYNsZ':function(_0x2a42d3,_0x4f7c14){return _0x2a42d3!==_0x4f7c14;},'BxjHe':'I\x20couldn’t\x20complete\x20that\x20request\x20fully,\x20but\x20I’ve\x20used\x20the\x20available\x20results\x20to\x20the\x20best\x20extent\x20I\x20can.\x20Please\x20refine\x20the\x20request\x20and\x20try\x20again.','CFyWJ':function(_0x5dd6ae,_0x33bb67){return _0x5dd6ae&&_0x33bb67;},'IbSFv':_0x2af87c(0x2f0),'xEdta':'429','utfNs':_0x2af87c(0x2e7),'UahKW':_0x2af87c(0x232)};try{if(!this[_0x2af87c(0x1a3)])throw new Error(_0x3ce5d8['FykRW']);if(!this[_0x2af87c(0x287)]||0x0===Object[_0x2af87c(0x12c)](this[_0x2af87c(0x287)])[_0x2af87c(0x224)])throw new Error(_0x3ce5d8[_0x2af87c(0x212)]);await this[_0x2af87c(0x281)]();const _0x4da7b5=await this[_0x2af87c(0x2a4)]['getMessages'](_0x4ceb64['conversationId']),_0x30b0f5=this[_0x2af87c(0x271)](_0x4da7b5,_0x4ceb64[_0x2af87c(0x289)]),_0x451f02=this[_0x2af87c(0x2ac)](_0x30b0f5),_0x1e39f0=this[_0x2af87c(0x11d)](_0x4ceb64),_0x12d1c6=await(0x0,http_1[_0x2af87c(0x1e0)])(BASE_URL+_0x2af87c(0x1c0),{'conversationId':_0x4ceb64[_0x2af87c(0x1ae)],'question':_0x1e39f0,'userContext':_0x4ceb64['userContext'],'registryVersion':this[_0x2af87c(0x143)],'history':_0x451f02,'aiName':this[_0x2af87c(0x24e)]},this[_0x2af87c(0x25a)](),_0x3173fe),_0x494f07={'role':_0x3ce5d8[_0x2af87c(0x1c3)],'content':_0x4ceb64[_0x2af87c(0x289)],'timestamp':Date[_0x2af87c(0x133)]()};await this[_0x2af87c(0x2a4)][_0x2af87c(0x1f8)](_0x4ceb64[_0x2af87c(0x1ae)],_0x494f07);const _0x55635e=_0x12d1c6;if(_0x3ce5d8[_0x2af87c(0x134)](_0x3ce5d8['AvGts'],_0x55635e[_0x2af87c(0x221)])&&_0x55635e['content']||!_0x55635e['status']&&_0x55635e[_0x2af87c(0x253)]){const _0x280fc0={'role':_0x2af87c(0x2f0),'content':_0x55635e['content'],'timestamp':Date[_0x2af87c(0x133)](),'visualizations':_0x55635e[_0x2af87c(0x2d8)],'summaryCards':_0x55635e[_0x2af87c(0x248)]};return await this['historyStore'][_0x2af87c(0x1f8)](_0x55635e[_0x2af87c(0x1ae)],_0x280fc0),this[_0x2af87c(0x2d2)]({'content':_0x55635e[_0x2af87c(0x253)],'conversationId':_0x55635e[_0x2af87c(0x1ae)],'visualizations':_0x55635e[_0x2af87c(0x2d8)],'summaryCards':_0x55635e[_0x2af87c(0x248)]});}const _0x16b037=_0x55635e[_0x2af87c(0x2b1)]??[],_0x58ff4e=new Map(),_0x190001=await this[_0x2af87c(0x204)]({'toolCalls':_0x16b037,'userContext':_0x4ceb64[_0x2af87c(0x27e)],'question':_0x1e39f0,'cache':_0x58ff4e}),_0x2cad55=this[_0x2af87c(0x218)](_0x190001),_0x2d092b=_0x3cc1b9=>_0x3cc1b9[_0x2af87c(0x221)]?_0x3cc1b9[_0x2af87c(0x221)]:_0x3cc1b9[_0x2af87c(0x2b1)]&&_0x3cc1b9['tool_calls']['length']>0x0?'tool_use':_0x2af87c(0x1fa);let _0x4e65e1=await(0x0,http_1[_0x2af87c(0x1e0)])(BASE_URL+_0x2af87c(0x24a),{'conversationId':_0x4ceb64[_0x2af87c(0x1ae)],'question':_0x1e39f0,'history':_0x451f02,'tool_calls':_0x16b037,'tool_results':_0x2cad55,'registryVersion':this[_0x2af87c(0x143)],'userContext':_0x4ceb64[_0x2af87c(0x27e)],'aiName':this[_0x2af87c(0x24e)]},this[_0x2af87c(0x25a)](),_0x3173fe);const _0x1bcd1a=0xf,_0x464ba6=0x1e;let _0x54bea0=0x0,_0x22772d=_0x3ce5d8[_0x2af87c(0x15c)](_0x2d092b,_0x4e65e1),_0x4595f9=!0x1;for(;_0x3ce5d8[_0x2af87c(0x152)](_0x3ce5d8[_0x2af87c(0x1b8)],_0x22772d)&&_0x3ce5d8['hqzEf'](_0x54bea0,_0x464ba6);){_0x54bea0+=0x1,!_0x4595f9&&_0x54bea0>=_0x1bcd1a&&(_0x4595f9=!0x0);const _0x57dfba=_0x4e65e1[_0x2af87c(0x2b1)]??[];if(_0x3ce5d8[_0x2af87c(0x134)](0x0,_0x57dfba[_0x2af87c(0x224)]))throw new Error(_0x2af87c(0x24c));const _0x52dfd2=await this['executeToolCallsWithCache']({'toolCalls':_0x57dfba,'userContext':_0x4ceb64['userContext'],'question':_0x1e39f0,'cache':_0x58ff4e}),_0x57256f=this['compactToolResults'](_0x52dfd2);_0x4e65e1=await(0x0,http_1['postSse'])(BASE_URL+_0x2af87c(0x24a),{'conversationId':_0x4ceb64['conversationId'],'question':_0x1e39f0,'history':_0x451f02,'tool_calls':_0x57dfba,'tool_results':_0x57256f,'registryVersion':this['registryVersion'],'userContext':_0x4ceb64[_0x2af87c(0x27e)],'softCapReached':_0x4595f9,'aiName':this[_0x2af87c(0x24e)]},this[_0x2af87c(0x25a)](),_0x3173fe),_0x22772d=_0x3ce5d8[_0x2af87c(0x150)](_0x2d092b,_0x4e65e1);}let _0x1cadc2=_0x4e65e1[_0x2af87c(0x253)]??'',_0x5e9d40=!0x1;_0x3ce5d8[_0x2af87c(0x1ed)]('tool_use',_0x22772d)&&(_0x1cadc2=_0x3ce5d8[_0x2af87c(0x193)],this[_0x2af87c(0x27d)](_0x2af87c(0x17b)),_0x5e9d40=!0x0),_0x1cadc2&&_0x3ce5d8['XYNsZ'](0x0,_0x1cadc2['trim']()[_0x2af87c(0x224)])||(_0x1cadc2=_0x3ce5d8[_0x2af87c(0x20d)],this[_0x2af87c(0x27d)](_0x2af87c(0x27b)),_0x5e9d40=!0x0),_0x3ce5d8[_0x2af87c(0x1e3)](_0x5e9d40,_0x3173fe)&&_0x3ce5d8[_0x2af87c(0x15c)](_0x3173fe,{'phase':_0x2af87c(0x1fa),'status':_0x3ce5d8['AvGts'],'content':_0x1cadc2,'conversationId':_0x4ceb64[_0x2af87c(0x1ae)],'visualizations':_0x4e65e1[_0x2af87c(0x2d8)],'summaryCards':_0x4e65e1['summaryCards']});const _0x12e937={'role':_0x3ce5d8[_0x2af87c(0x243)],'content':_0x1cadc2,'timestamp':Date[_0x2af87c(0x133)](),'visualizations':_0x4e65e1[_0x2af87c(0x2d8)],'summaryCards':_0x4e65e1[_0x2af87c(0x248)]};return await this[_0x2af87c(0x2a4)][_0x2af87c(0x1f8)](_0x4ceb64[_0x2af87c(0x1ae)],_0x12e937),this['buildQueryResponse']({'content':_0x1cadc2,'conversationId':_0x4ceb64[_0x2af87c(0x1ae)],'visualizations':_0x4e65e1[_0x2af87c(0x2d8)],'summaryCards':_0x4e65e1[_0x2af87c(0x248)]});}catch(_0x1148ca){const _0x37665a=_0x1148ca instanceof Error?_0x1148ca[_0x2af87c(0x246)]:'';if(_0x37665a['includes'](_0x3ce5d8[_0x2af87c(0x225)])||_0x37665a['toLowerCase']()['includes'](_0x3ce5d8[_0x2af87c(0x2a6)])){const _0x14595c=_0x3ce5d8[_0x2af87c(0x18c)];return await this[_0x2af87c(0x2a4)][_0x2af87c(0x1f8)](_0x4ceb64[_0x2af87c(0x1ae)],{'role':_0x2af87c(0x2f0),'content':_0x14595c,'timestamp':Date['now']()}),this[_0x2af87c(0x2d2)]({'content':_0x14595c,'conversationId':_0x4ceb64[_0x2af87c(0x1ae)]});}throw _0x1148ca;}}async[_0xbf23c3(0x2eb)](_0x28da61){const _0x2eca3c=_0xbf23c3;return this['historyStore'][_0x2eca3c(0x18b)](_0x28da61);}}exports['TelygentClient']=TelygentClient;
|
|
1
|
+
const _0x45d8c9=_0x7528;(function(_0x493f64,_0x1c3bd6){const _0xc44da3=_0x7528,_0x15f6dc=_0x493f64();while(!![]){try{const _0x385cd1=parseInt(_0xc44da3(0x34d))/0x1+-parseInt(_0xc44da3(0x144))/0x2+-parseInt(_0xc44da3(0x11d))/0x3*(parseInt(_0xc44da3(0x346))/0x4)+-parseInt(_0xc44da3(0x27e))/0x5*(parseInt(_0xc44da3(0x295))/0x6)+-parseInt(_0xc44da3(0x186))/0x7+parseInt(_0xc44da3(0x30d))/0x8*(parseInt(_0xc44da3(0x285))/0x9)+-parseInt(_0xc44da3(0x1e0))/0xa*(-parseInt(_0xc44da3(0x2ea))/0xb);if(_0x385cd1===_0x1c3bd6)break;else _0x15f6dc['push'](_0x15f6dc['shift']());}catch(_0xd32bb3){_0x15f6dc['push'](_0x15f6dc['shift']());}}}(_0x3424,0xdda88));function _0x7528(_0xc44c40,_0x3f90a4){_0xc44c40=_0xc44c40-0xfb;const _0x313c7d=_0x3424();let _0x34ca32=_0x313c7d[_0xc44c40];if(_0x7528['MuAbuK']===undefined){var _0x4bb814=function(_0x2725f2){const _0x342488='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7528fc='',_0x4d46a3='',_0xd7ed16=_0x7528fc+_0x4bb814;for(let _0x51f187=0x0,_0xcd315c,_0x36db1c,_0x38a092=0x0;_0x36db1c=_0x2725f2['charAt'](_0x38a092++);~_0x36db1c&&(_0xcd315c=_0x51f187%0x4?_0xcd315c*0x40+_0x36db1c:_0x36db1c,_0x51f187++%0x4)?_0x7528fc+=_0xd7ed16['charCodeAt'](_0x38a092+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0xcd315c>>(-0x2*_0x51f187&0x6)):_0x51f187:0x0){_0x36db1c=_0x342488['indexOf'](_0x36db1c);}for(let _0x44aa95=0x0,_0x553c71=_0x7528fc['length'];_0x44aa95<_0x553c71;_0x44aa95++){_0x4d46a3+='%'+('00'+_0x7528fc['charCodeAt'](_0x44aa95)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d46a3);};_0x7528['EsxXwm']=_0x4bb814,_0x7528['XksRHE']={},_0x7528['MuAbuK']=!![];}const _0x5c0bb3=_0x313c7d[0x0],_0x590c39=_0xc44c40+_0x5c0bb3,_0xa857ff=_0x7528['XksRHE'][_0x590c39];if(!_0xa857ff){const _0x244d15=function(_0x1cf4b8){this['gyoLdJ']=_0x1cf4b8,this['DurZua']=[0x1,0x0,0x0],this['LbaJMn']=function(){return'newState';},this['fXHHxp']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['vlySlD']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x244d15['prototype']['KecZEf']=function(){const _0x483f32=new RegExp(this['fXHHxp']+this['vlySlD']),_0x298d99=_0x483f32['test'](this['LbaJMn']['toString']())?--this['DurZua'][0x1]:--this['DurZua'][0x0];return this['MpSzPr'](_0x298d99);},_0x244d15['prototype']['MpSzPr']=function(_0x268bd7){if(!Boolean(~_0x268bd7))return _0x268bd7;return this['wrNydD'](this['gyoLdJ']);},_0x244d15['prototype']['wrNydD']=function(_0x2103f4){for(let _0x1693dd=0x0,_0x3dfdbb=this['DurZua']['length'];_0x1693dd<_0x3dfdbb;_0x1693dd++){this['DurZua']['push'](Math['round'](Math['random']())),_0x3dfdbb=this['DurZua']['length'];}return _0x2103f4(this['DurZua'][0x0]);},new _0x244d15(_0x7528)['KecZEf'](),_0x34ca32=_0x7528['EsxXwm'](_0x34ca32),_0x7528['XksRHE'][_0x590c39]=_0x34ca32;}else _0x34ca32=_0xa857ff;return _0x34ca32;}const _0x2725f2=(function(){const _0x24fe9b=_0x7528,_0x5f0a15={'LKVDR':function(_0x5b2553,_0x41364a){return _0x5b2553!==_0x41364a;},'lMiWr':_0x24fe9b(0x1a3)};let _0x2ee05c=!![];return function(_0x1e2484,_0x5655ed){const _0x476bb3=_0x24fe9b;if(_0x5f0a15[_0x476bb3(0x124)]('kJNbg',_0x5f0a15['lMiWr'])){const _0x2eb90e=_0x2ee05c?function(){const _0x3c48c4=_0x476bb3;if(_0x5655ed){const _0x1e4554=_0x5655ed[_0x3c48c4(0x325)](_0x1e2484,arguments);return _0x5655ed=null,_0x1e4554;}}:function(){};return _0x2ee05c=![],_0x2eb90e;}else this[_0x476bb3(0x2ac)]('[telygent-sdk]\x20'+_0x2b31d0+'\x20'+this['safeLogValue'](_0x509df3,0xfa0));};}()),_0xa857ff=_0x2725f2(this,function(){const _0x31c14c=_0x7528,_0x58e9d6={'QKwQa':_0x31c14c(0x165)};return _0xa857ff[_0x31c14c(0x10f)]()[_0x31c14c(0x2c8)](_0x58e9d6[_0x31c14c(0x118)])[_0x31c14c(0x10f)]()[_0x31c14c(0x2ef)](_0xa857ff)['search'](_0x58e9d6['QKwQa']);});_0xa857ff();function _0x3424(){const _0x4795b2=['vefgr2i','uLzdExi','ueL4q28','tNvvsNq','w3rLBhLNzw50lxnKA10GD29YA2vYihbVBgWGCMvZCg9UC2uGA2v5CZ0','DxPyr3C','AgfZx21VCMu','zMLUza','vuTSs2y','jgD0','igLUChv0pq','ihn0yxr1CZ0','zuvmEhy','wKnUt1u','DMLZDwfSAxPHDgLVBNm','vhLWzxm','r3nrALa','qMvHCMvYia','w3rLBhLNzw50lxnKA10GD29YA2vYignVBxbSzxrLzcb0yxnRuNvUswq9','CxbVD3q','CxvLCNLeB2n1BwvUDhm','wgfyrwq','CMvZDwX0CW','sM1rB1e','z2v0q29UDMvYC2f0Aw9UtwvZC2fNzxm','AxnbCNjHEq','ANDLD1K','lI9YzwDPC3rYEq','z2v0twvZC2fNzxm','D29YA2vYu3rVCfjLCxvLC3rLza','s2v5igzHy3rZoG','rw9KDvO','CgLtEe0','jYbUB3qGy29UzMLNDxjLzcbMB3iGBw9KzwWGjW','BMv4DfDVCMTLCKrLBgf5txm','t21sExK','yNvPBgruB29Sq2fSBfnPz25HDhvYzq','wxjqrKi','rfzvzK0','iLTvBNnLCMLHBgL6ywjSztOG','Aw5MBW','qwD5zLy','ywLoyw1L','BffZz2m','BgvUz3rO','w3rLBhLNzw50lxnKA10GywDNCMvNyxrLx2rVy3vTzw50CYbTB2rLBd0','DeD1BNi','CLLLyuO','EM9LC3q','y29TCgfJDfrVB2Xszxn1BhrZ','CMvZCg9UzcbPBML0AwfS','ugzdzMO','w3rLBhLNzw50lxnKA10GD29YA2vYigPVyNmGC3rVChbLza','BvbSuxi','vgr4AMy','C3rHCNrZv2L0Aa','vhHnzwW','y29TCgXLDgvxB3jRzxjfEgvJDxrPB24','z0Dyq3a','z1r6uLi','uen1Bgy','zw5MB3jJzuHPC3rVCNLcDwrNzxq','Cg9ZDfnZzq','sffTDwG','ELrID0S','yNvPBgrrDwvYEvjLC3bVBNnL','ven0zMC','zxHLy3v0Aw9UCW','CMvNAxn0CNK','y29UDgv4Dej1zgDLDenOyxjZ','zM5buxa','uwTNv3m','Be9nD2e','wMLit1O','CxvLCNK','DhjHBNnWB3j0sgLZDg9YEq','teTSAfe','AengA1y','EvHTCeS','DgLurM8','s2j4DxC','twLZC2LUzYbYzxf1AxjLzcb1C2vYq29UDgv4Dcb2ywX1zsbMB3iG','r1ruu1q','yKDutKK','mtm1mdm1uKHMCLDM','CgXHBKnHDgvNB3j5','zMv0y2HFDgfZA3m','zw5HyMXLza','C3rHDhvZ','zhbLtLe','Axnoyu4','mJy3nJq3neDKwhHxrW','t1nTBwq','D3bYsxK','E30Uy29UC3rYDwn0B3iOiNjLDhvYBIb0AgLZiIKOicK','zMXVB3i','yNvKz2v0rw5MB3jJzwq','ihbHCNnLzd0','CxvLCNLtDhjLyw0','BLnvA2i','zKXIC2G','AgfZ','z0XUEuu','EhzOshK','l2fWAs92ms9HAs9JB250zxH0l2nVBxbHy3q','y29UDMvYC2f0Aw9U','whj2wuS','mZy2AvLirvDy','reTJDve','AML0DgvYtxm','l2fWAs92ms9HAs90yxnRCY9LEgvJDxrPB25Zl2nVBxbSzxrL','tw1hAMS','zg10rgW','t2f6Eve','w3rLBhLNzw50lxnKA10GCxvLCNLFzg9JDw1LBNrZig1VzgvSpq','yw1oDxK','EKHOu3u','vwfZCfe','lI4Uw3rYDw5JyxrLzf0','ruzOB08','w3rLBhLNzw50lxnKA10GCMv1C2LUzYbJywnOzwqGDg9VBcbYzxn1BhqGzM9Yia','l2fWAs92ms9HAs9WBgfUl3n0CMvHBq','D2L0AgLUx2j1zgDLDa','tvjbD00','rurnu0W','ihnLCNzPy2u9','qMHNAg4','C0PMt3y','CMvZDwX0C19JB3vUDa','Dg90ywXFy291BNq','Bg9N','u1zAC3O','y29LCMnLrgf0zuzPBhrLCNm','BeL6B3q','BMfTzq','CMvZCg9UzcbJEwnSzsa','uursyvm','EK1xs1i','BKLuwey','y29UDMvYC2f0Aw9Uswq','zgf0yq','Dhj1zq','sgfftgu','zMfPBfDVCMTLCKv4zwn1DgLVBG','vKTnz1q','tMnQwfm','wvHJCKy','w3rLBhLNzw50lxnKA10Gy3vZDg9Tx3f1zxj5ig1VzgvSpq','whzIvwS','zwP5DeC','y29SBgvJDgLVBK5HBwu','z2v0q29UDMvYC2f0Aw9UtwvZC2fNzxnpBMX5','yuHgyNu','z2v0vgLTzq','C2vYDMLJzq','Cg9ZDePZB24','tgfJsKO','Aw5JBhvKzxm','C2vHCMnO','C3zMsuy','wMfpEK8','ALHIzNy','DxvLwxC','Awnxug0','CeHpENa','wvnUtw4','ze9su2O','tfvIEfe','ChzNvLC','q0rbq0y','C2fMzuXVz1zHBhvL','uuv6BMy','zxHLy3v0zvDVCMTLCKv4zwn1DgLVBG','rLL0DuS','zwLTBKW','zK5rDKW','rNzQvuq','vM1Lr0m','sw9oyK4','yxnZAxn0yw50','C29Asgi','CgLWzwXPBMu','whH0Awe','y2XHBxbqB3nPDgL2zuLUDgvNzxi','BM93','tM9VCeHPC3rVCNLtDg9Yzq','CNvUqMfJA2DYB3vUzfDVCMTLCKn5y2XL','tvv5y2i','vervt2e','zMLLBgq','BxfQz2i','sg9ZtuW','mJG1nZG0ne5OtuXgqG','DLbWtMu','DxnLCKnVBNrLEhq','thzKrMy','CvHKsxi','y29UC3rYDwn0B3i','ssbJB3vSzg7IGjL0ignVBxbSzxrLihrOyxqGCMvXDwvZDcbMDwXSEsWGyNv0ieNIGjL2zsb1C2vKihrOzsbHDMfPBgfIBguGCMvZDwX0CYb0BYb0AguGyMvZDcbLEhrLBNqGssbJyw4UifbSzwfZzsbYzwzPBMuGDgHLihjLCxvLC3qGyw5KihrYEsbHz2fPBI4','C2TPCa','zgvMAw5LuhjVCgvYDhK','Bw9KzwW','CurpAwK','qLnMCLq','veXSz0e','y29LCMnLrgf0zu9WzxjHDg9YCW','wwL2q3e','l2fWAs92ms9HAs9YzxnWB25K','Be9NzfC','C3rYAw5NAwz5','B3r2v2K','A3nvt2i','CM5LsKO','Bg1uyw0','Aw5PDgLHBgL6zwq','CLPyEK0','t2X2DKi','Cg9SBfrHC2TfEgvJDxrPB25Z','v01WB0q','B2jQzwn0swq','zLfKruO','yufRqLm','DgLTzxn0yw1W','t2rcyMy','y29LCMnLrgf0zvzHBhvL','AM9PBG','Aw5PDfjLz2LZDhj5','ndbvzeTbCKu','Dg9VBf91C2u','CMfUzg9T','AgLZDg9YEsbKzwnPC2LVBG','Dg9VBenHBgXZ','AfHPAhO','z2v0twvZC2fNzvr5Cgu','vw5ZDxbWB3j0zwqGDg9VBdOG','zxHJzxb0Aw9U','DhLWzq','BLvcqLi','C3rHCNrcywnRz3jVDw5KsM9ICW','Bg9NsgLZDg9YEu1LDhjPy3m','ugXVsKS','y2fZDezPBhrLCKzPzwXK','D1n3CuC','zw5KC1DPDgG','BezjC0W','ihjLC3vSDd0','ChjLCgfYzuHPC3rVCNK','yNnVBG','y29TCgfJDgfIBgvnzxnZywDLCW','y29TCgfJDeHPC3rVCNK','DLP4DKu','yxbWBhK','yMfJA2XVz190B29FC21HBgW','CMvNAxn0CNLwzxjZAw9U','zMHsDLK','y0jdALi','w3rLBhLNzw50lxnKA10GD29YA2vYihbVBgWGy29TCgXLDgvKigv4zwn1DgLVBNm9','ugLKsLC','DgfOtKi','sw1xrey','AxnjBNrLCM5HBfnLCNzLCLrVB2W','wgHLyK0','zhrnB2O','ugD4s28','DMDPA3O','z2v0tgf0zxn0q29UDgv4De1LC3nHz2u','BKn3vMK','z2XVEfO','vffmAwy','y29TChv0zvjLz2LZDhj5vMvYC2LVBG','C2nOzwr1BgvozxH0v29YA2vYug9SBa','B3DKtgq','l2fWAs92ms9HAs9YzwDPC3rYEs9PBML0','CMvNAxn0CNLqyxLSB2fK','C2fMzuPZB25tDhjPBMDPzNK','zgjbzgfWDgvY','rejWDxq','D29YA2vY','igvYCM9Ypq','C0XsA3u','BNvSBa','AxntDxbWB3j0zwrdB250zxH0vMvYC2LVBG','BwDWtKC','BLPUD2q','ndq3ndbOvMfKvgu','u2jUrgW','ww914OczDMuGAgL0ihrOzsbKywLSEsbXDwvZDgLVBIbSAw1PDcbMB3iGEw91CIbWBgfUlIbhAxzLigL0igeGBw9Tzw50igfUzcb0CNKGywDHAw4GC2HVCNrSEs4','EK5XzwG','Ew94DwS','Bef4Afq','BM9Uzq','odq0mJKWvNrssKLU','Dg9mB3DLCKnHC2u','r1Pnsfm','q3vZDg9TihnLCNzPy2uGBM90ignVBMzPz3vYzwqGzM9Yig1VzgvSicC','B2jQzwn0','AxndDxn0B21tzxj2AwnLtwfW','C05dsxu','Bgf0zxn0q29UDgv4De1LC3nHz2u','x19WCM90B19F','vePvBxq','y0rtsvu','zLvUsM4','yNPMsuG','y29TCgfJDfzHBhvL','Aw50zxj2ywXnCW','vxrgv2G','CKvnteS','zMLUywW','rMfsAKS','ufntthe','Bw9XsNq','CMvXDwLYzwrgAwX0zxjZ','uLnAC1O','y2fZDfjLCxvPCMvKvMfSDwu','A3LZDfu','DKfoz00','yxv0AeHLywrLCNm','C3jsrgS','yuPQwwy','q0DXs2q','DxnLCKLK','AKPjyKi','AhjZqwu','zg9JDw1LBNrZ','zMLLBgruExbLCW','w0nPCMn1BgfYxq','cGPnrvntquDfienptLrfwfqGkgzVCIb0AgLZihjLCxvLC3qGB25SEsK6cG','tgTQExC','Bw9Uz29VC2u','C2nOzwr1Bgu','BxDVy2e','vxnLCIbNB2fSCZO','Dg9tDhjPBMC','yxbWBhLszxf1AxjLzezPBhrLCNm','BM9YBwfSAxPLv29YA2vYq29UzMLN','ssbJB3vSzg4NDcbJB21WBgv0zsb0Agf0ihjLCxvLC3qGywz0zxiGC2v2zxjHBcbHDhrLBxb0CY4GugXLyxnLihjLzMLUzsb0AguGCxvLC3rPB24GB3iGChjVDMLKzsbHzgrPDgLVBMfSigzPBhrLCNmGkguUzY4SignVDw50CNKSihjVBguSig9YihrPBwuGCMfUz2uPlG','uvPQwMK','yM9VBgvHBG','rgv4EKK','D29YA2vYq29UzMLN','qNLivxy','uuT3uwe','zxHLy3v0zvrVB2XdywXS','CM9Szq','C3rYAw5N','A2LhwKG','mJCZzvvLqMfY','qKrtDwu','y2vPBa','C2v0','Bwf0y2G','u0vZsKW','DgHLwg8','teTwrfi','Bw9Uz29KyG','CMvZB2X2zun1C3rVBvnLCNzPy2viyw5KBgvY','yxrMwfK','A2rtCNi','C2vSzwn0sgLZDg9YEvDPBMrVDW','DxbJueS','lI4U','DgfZA1j1BKLK','zMLSDgvY','BK1MuMe','A0Tbrgi','vgfZAYbLEgvJDxrPB24GzMfPBgvK','ihrHC2Tjzd0','EhHutwe','ChvZAa','y1bqwNq','A2fnvNy','C2XPy2u','uwjNq2K','r2zus0y','vMrnswe','Bwv0CMLJCW','rwrcrhe','CgfYC2vxB3jRzxjfEgvJDxrPB25Z','shL5CuK','EeTNrfK','y29UDgv4Da','tejJsMC','BNjtALO','zNbdDgm','tNzpBNe','mtu4nJa4ogrPDwLota','y3jLyxrLuMvXDwLYzq','BwvZC2fNzq','zfrYELy','q1Hrv0O','ihnRAxbWzwq9','w3rLBhLNzw50lxnKA10GD29YA2vYigv4zwn1DgLUzYb0yxnRuNvUswq9','CejMz0q','w3rLBhLNzw50lxnKA10GD29YA2vYigv4zwn1DgLVBIbMywLSzwqGDgfZA1j1BKLKpq','Eeztz1a','wKDdCKC','z01ctNm','DgrqzMS','uvvMELC','z2v0','CNbiBNa','yNvPBgrrDwvZDgLVBKzVCKfP','zwXvrK8','CMvJzw50vgfPBa','ELfbA1C','DuHYwxy','y29UDgv4Dfn1Bw1HCNLnAw5nzxnZywDLCW','EgTMzeq','ihrVB2XFy2fSBhm9','yxbPs2v5','C3rHz2u','DMfSDwvZ','s0vPEfO','zMLUze1VzgvSu2vYDMLJzunVBMzPzW','z2rtzvO','l2fWAs92ms9HAs90yxnRCY9LEgvJDxrPB25Zl2zHAwW','w3rLBhLNzw50lxnKA10GD29YA2vYihbVBgWGzxjYB3i9','DhjHy2u','kcGOlISPkYKRksSK','C3vTBwfYEvzLCNnPB24','ugDjz3K','Bg9Nrw5HyMXLza','whrcEwe','rMHVC3G','DgfZA0LK','C2vUzf93zwjOB29R','y3vZDg9Tx3f1zxj5','y2fJAgu','igL0zw1Zxq','DxnLCG','DM1gA1G','uffJtNK','vwjiBwW','DhjPBu1LC3nHz2vdB250zxH0','yxvezwm','CgfYC2u','s2Dmqw0','Cu1qvxq','DMfSAwrHDgLVBKvUywjSzwq','Ewrwz0m','BgLTAxq','yvjRr1y','y0PJEgu','D2fYBG','x19LC01VzhvSzq','Dw5KzwzPBMvK','CMvXDwvZDenVBNrLEhrtDw1Tyxj5','vgfZAYbLEgvJDxrPB24GzMfPBcbJywXSyMfJAYbMywLSzwq','zMfSC2u','DhjPBq','CMvZB2X2zvjLCxvPCMvKrMLSDgvYCW','mZK0mti5nejItw1dqq','v2rZyw0','EKTnwgq','z3vOs3m','Bwf4twvZC2fNzxm','rxjcyLi','Cg1sz1G','w3rLBhLNzw50lxnKA10G','AxnjBNzHBgLKq29UDgv4DenVBNrLBNq','qLHVq3m','weX5Aw8','s01luK8','yxbWzw5KtwvZC2fNzq','Cg9ZDf9JB250zxH0x3nWyw5FzxHJzwvKC19IDwrNzxq','C3vTBwfYEunHCMrZ','q3vZDg9TihnLCNzPy2uGjW','yMfJA2XVz19LEgnLzwrZx2j1zgDLDa','ndi5','yufduxu','icHHDMfPBgfIBgu6ia','qw9kD04','AwLSD1e','ChjVDg90ExbL','v2XkC1y','jgX0zq','t1PWrNq','zxn0Aw1HDgviAxn0B3j5q2HHCNm','y3vZDg9Tu2vYDMLJzxm','Bwf4q29TCgXLEgL0Eq','u3zjqKi','BwfW','w3rLBhLNzw50lxnKA10GD29YA2vYigPVyNmGBM90ihn0yxj0zwqGkhDVCMTLCIbJB25MAwCGBM90igvUywjSzwqP','DMfSDwu','AgLZDg9YEq','u0r4rg4','EM1ouw4','zgjbzgfWDgvYigLZihjLCxvPCMvKihrVihf1zxj5','DgvZDa','DLnkDNG','zgjbzgfWDgvYigLZihjLCxvPCMvKihrVigv4zwn1DguGDg9VBcbJywXSCW','CMv0DxjUicHMDw5JDgLVBIGPia','y29UDgv4DcbJB21Wywn0Aw9UigzHAwXLza','quKGCMvXDwvZDgvKihrVB2WGDxnLigj1DcbYzxr1CM5LzcbUBYb0B29SignHBgXZlG','yMLUza','BwvZC2fNzunVBNrLEhq','AgLZDg9YEvn0B3jL','AffIv0q','ywrK','thjMveu','rxDhsNe','u0Ditee','v3zSB2G','AxngAw5PDgu','t3n6u2G','yKXvD00','Cev5EKG','D2juteG','AgzZqwW','AhrUzhO','AKTlrMG','D29YA2vYq3LJBgvqCM9TAxnL','CxvLC3rPB24','DvrwBLG','ignVBgXLy3rPB249','AxnFzxjYB3i','z2v0uMvNAxn0CNLjBML0q2fJAgvlzxK','zxjYB3i','A21QD0O','A1PdyxC','ywDNCMvNyxrLrg9JDw1LBNrZ','zxHLy3v0zvrVB2XdywXSC1DPDgHdywnOzq','te9RDxa','tuTOz1C','AgLZDg9YEsbJB21Wywn0Aw9UigfWCgXPzwq','D29YA2vYvgLTzw91Da','seTot2q','zunur0m','DKjlCM8','vhLPy2u','DxbKyxrLx3rHC2S','C01kufq','uNbQtNa','tgLyD3q','D210u3a','zgf0zq','C0XgDeC','t2jQzwn0swq','DMfSAwrHDgvuB29Sq2fSBa','w3rLBhLNzw50lxnKA10GCMvZCg9UzcbYzxr1CM5LzcbLBxb0EsbMAw5HBcbJB250zw50lcb1C2LUzYbMywXSyMfJAYbYzxnWB25Zzs4','zxzLCNK','mtaWzw93wu9Q','rvrnDvy','BenNre8','CMvNAxn0CNKGAxmGCMvXDwLYzwqGDg8GCxvLCNK','v2f1B3q','qMXvC3K','l2fWAs92ms9HAs9WBgfU','B3nJs00','Ehz6ALy','C3HhEKO','l2fWAs92ms9HAs9YzxnWB25Kl3n0CMvHBq','D0DdD0S','qNv4AMG','C3nUEeu','CvDJsuW','wgfSwg4','C3vTBwfYAxPLuMvZDwX0','D29YA2vYsw5gBgLNAhq','Aw5WDxq','lI92ywXPzgf0Aw9U','y29UDgvUDa','z2v0twvZC2fNzxnbzNrLCKnVBNrLEhrdB3zLCMfNzq','BxDTv0G','y292zxjLzfvUDgLSvgLTzxn0yw1W','D29YA2vYuNvUBMLUzW','vw1Jz0y','zhjVChbLze1LC3nHz2vZ','zvDprw0','tKn0vha','A2v5CW','BKXVCeK','vg9VBcbLEgvJDxrPB24GzMfPBgvK','B2DYuwm','q25rsu4','BLDvuMC','yxbWBhLgAwvSzfr5CgvZ','y3DK','zw50CMLLCW','CKnWBK4','w3rLBhLNzw50lxnKA10GD29YA2vYihb1BgWGCgfYC2uGCMf3pq','BwLU','Bwf4','ENbPAgO','Devkzve','zvjjB3y','z25OBg0','zxn0Aw1HDgvtDw1Tyxj5q2HHCNm','ugnWAgy','zNvUy3rPB24','veXYrhm','zgvMyxvSDa','Dfjet1C','zwXJr0u','ChjLCgfYzvrYyw5ZCg9YDeHPC3rVCNK','wKzkwfq','y29UDgv4DeTLEq','BNvTyMvY','w3rLBhLNzw50lxnKA10Gz2v0x2rVy3vTzw50x2j5x2LKig1VzgvSpq','vgvSEwDLBNrdBgLLBNq','A0nHAeK','Dg9VBf9JywXSCW','lI9OAxn0B3j5','y29UDgv4De1LDgfKyxrH','tfLzsgK','zwnfEuG','A2TyugS','rfnqtfu','w3rLBhLNzw50lxnKA10GCgfZCY10AhjVDwDOigLUDgvYBMfSihrVB2WG','z0TeyMm','A2XICfm','AgLZDg9YEsb0CMfUC3bVCNqGzMLUywW','s05lCvi','y29UC29Szq','suLYDhO'];_0x3424=function(){return _0x4795b2;};return _0x3424();}const _0x4bb814=(function(){const _0x4124c7=_0x7528,_0x5ece8c={'OdBbf':_0x4124c7(0x200)};let _0xd9b748=!![];return function(_0x51e40a,_0x4ca765){const _0x183189=_0x4124c7;if(_0x5ece8c[_0x183189(0x309)]===_0x5ece8c['OdBbf']){const _0x263058=_0xd9b748?function(){const _0x37bc01=_0x183189;if(_0x4ca765){const _0x4f6368=_0x4ca765[_0x37bc01(0x325)](_0x51e40a,arguments);return _0x4ca765=null,_0x4f6368;}}:function(){};return _0xd9b748=![],_0x263058;}else this['runBackgroundWorkerCycle']();};}()),_0x34ca32=_0x4bb814(this,function(){const _0x3825e1=_0x7528,_0x2999c3={'lQsgc':function(_0xef745a,_0x2ccb6b){return _0xef745a==_0x2ccb6b;},'tLPQV':'string','dTrzV':function(_0x24c889,_0xb9a665){return _0x24c889>_0xb9a665;},'WufRb':_0x3825e1(0x250),'XtBya':function(_0x50aec3,_0x322821){return _0x50aec3(_0x322821);},'KFOJq':function(_0x4f584e,_0x10fbbe){return _0x4f584e+_0x10fbbe;},'wczmM':function(_0x5a56f0,_0x350480){return _0x5a56f0+_0x350480;},'TAFGb':_0x3825e1(0x288),'EwGJq':function(_0x359799,_0x54c6ae){return _0x359799!==_0x54c6ae;},'vANgM':_0x3825e1(0x1d4),'wSwqG':function(_0x2e7ede){return _0x2e7ede();},'otvWi':'log','atfXY':_0x3825e1(0x17e),'RaAdd':_0x3825e1(0x252),'zHhSu':_0x3825e1(0x1c8),'yoxuk':_0x3825e1(0x315),'PgxKo':'table','Tdxjf':_0x3825e1(0x164),'Lkjyw':function(_0x1bcc1f,_0x20dbca){return _0x1bcc1f<_0x20dbca;}},_0x32d26c=function(){const _0x3c0d96=_0x3825e1;let _0x4bb40e;try{if(_0x3c0d96(0x250)===_0x2999c3['WufRb'])_0x4bb40e=_0x2999c3[_0x3c0d96(0x169)](Function,_0x2999c3['KFOJq'](_0x2999c3['wczmM'](_0x3c0d96(0x1ae),_0x2999c3[_0x3c0d96(0x22a)]),');'))();else{if(_0x30f473){const _0x2f3d72=_0x3c5178['apply'](_0x468053,arguments);return _0x467bc4=null,_0x2f3d72;}}}catch(_0x546d96){if(_0x2999c3[_0x3c0d96(0x1b7)](_0x2999c3[_0x3c0d96(0xfe)],_0x2999c3[_0x3c0d96(0xfe)])){const _0x5e1151={'KEixZ':function(_0x1839c6,_0x127d8e){const _0x51ae70=_0x3c0d96;return _0x2999c3[_0x51ae70(0x255)](_0x1839c6,_0x127d8e);},'Wvloh':_0x2999c3['tLPQV'],'pbSsr':function(_0x15ed8c,_0xa33851){const _0x2c91c3=_0x3c0d96;return _0x2999c3[_0x2c91c3(0x147)](_0x15ed8c,_0xa33851);}};return _0xd57072[_0x3c0d96(0x1a4)](_0x37f596=>{const _0x7588b5=_0x3c0d96,_0x2db999=_0x5e1151[_0x7588b5(0x15f)](_0x5e1151[_0x7588b5(0x1b9)],typeof _0x37f596[_0x7588b5(0x1f4)])&&_0x5e1151['pbSsr'](_0x37f596['content'][_0x7588b5(0x256)],0x9c4)?_0x37f596[_0x7588b5(0x1f4)]['slice'](0x0,0x9c4)+_0x7588b5(0x12b):_0x37f596[_0x7588b5(0x1f4)],_0x4d0d83={'role':_0x37f596[_0x7588b5(0x11a)],'content':_0x2db999,'timestamp':_0x37f596[_0x7588b5(0x308)],'messageType':this[_0x7588b5(0x313)](_0x37f596)};return _0x37f596[_0x7588b5(0x21e)]&&(_0x4d0d83['contextMetadata']=_0x37f596['contextMetadata']),_0x4d0d83;});}else _0x4bb40e=window;}return _0x4bb40e;},_0x29917f=_0x2999c3[_0x3825e1(0x31c)](_0x32d26c),_0x458825=_0x29917f[_0x3825e1(0x228)]=_0x29917f[_0x3825e1(0x228)]||{},_0x579a75=[_0x2999c3[_0x3825e1(0x2fc)],_0x2999c3[_0x3825e1(0x127)],_0x2999c3['RaAdd'],_0x2999c3[_0x3825e1(0x29e)],_0x2999c3[_0x3825e1(0x34a)],_0x2999c3[_0x3825e1(0x331)],_0x2999c3[_0x3825e1(0x260)]];for(let _0x131624=0x0;_0x2999c3[_0x3825e1(0x10a)](_0x131624,_0x579a75[_0x3825e1(0x256)]);_0x131624++){const _0x2d3545=_0x4bb814['constructor']['prototype'][_0x3825e1(0x1b1)](_0x4bb814),_0x592657=_0x579a75[_0x131624],_0x57f911=_0x458825[_0x592657]||_0x2d3545;_0x2d3545[_0x3825e1(0x355)]=_0x4bb814[_0x3825e1(0x1b1)](_0x4bb814),_0x2d3545[_0x3825e1(0x10f)]=_0x57f911[_0x3825e1(0x10f)][_0x3825e1(0x1b1)](_0x57f911),_0x458825[_0x592657]=_0x2d3545;}});_0x34ca32();'use strict';Object[_0x45d8c9(0x2f2)](exports,_0x45d8c9(0x17f),{'value':!0x0}),exports['TelygentClient']=void 0x0;const module_1=require('module'),history_1=require(_0x45d8c9(0x21d)),registry_1=require(_0x45d8c9(0x245)),http_1=require('./http'),validation_1=require(_0x45d8c9(0x1f3)),BASE_URL='https://api.telygent.com',DEFAULT_MAX_MESSAGES=0xa,DEFAULT_MAX_COMPLEXITY=0x14,DEFAULT_CONTEXT_BUDGET_CHARS=0x2ee0,DEFAULT_CONTEXT_SUMMARY_MIN_MESSAGES=0x8,DEFAULT_WORKER_INTERVAL_MS=0x493e0,MIN_WORKER_INTERVAL_MS=0x1388,MAX_MESSAGE_CONTEXT_CHARS=0x258,MAX_HISTORY_MESSAGE_CHARS=0x9c4,MAX_COMPACT_ARRAY_ITEMS=0x32,MAX_COMPACT_OBJECT_KEYS=0x28,MIN_CONTEXT_BUDGET_CHARS=0x1770,MIN_CONTEXT_SUMMARY_MIN_MESSAGES=0x4,CONTEXT_TRIGGER_OVERAGE_CHARS=0x4b0,CONTEXT_MIN_COMPACTABLE_CHARS=0xbb8,CONTEXT_SUMMARY_TARGET_CHARS=0x5dc,CONTEXT_SUMMARY_MIN_CHARS=0x1f4,CONTEXT_HISTORY_SAFETY_MARGIN_CHARS=0x4b0,MIN_HISTORY_MESSAGES_TO_KEEP=0x4,MAX_CONTEXT_TAIL_USER_MESSAGES=0x4,CONTEXT_SUMMARY_VERSION='v2',INTERNAL_SERVER_TOOL_NAMES=new Set(['create_task',_0x45d8c9(0x280),_0x45d8c9(0x1d5),'send_email',_0x45d8c9(0x16c)]),initializedRegistryKeys=new Set(),inflightRegistryInit=new Map(),appRequire=(0x0,module_1[_0x45d8c9(0x145)])(process[_0x45d8c9(0x204)]()+'/package.json');let cachedObjectIdCtor;function resolveObjectIdCtor(){const _0x4f8fa0=_0x45d8c9,_0x31cb2b={'soZHb':function(_0x176229,_0x120964){return _0x176229!==_0x120964;},'srRDk':function(_0xbc675d){return _0xbc675d();},'hfsAl':function(_0x267d76,_0x28d92a){return _0x267d76==_0x28d92a;},'lAxhT':_0x4f8fa0(0x210)};if(_0x31cb2b[_0x4f8fa0(0x2de)](void 0x0,cachedObjectIdCtor))return cachedObjectIdCtor;const _0x314f6d=[()=>require('mongodb')?.[_0x4f8fa0(0x1dc)],()=>appRequire(_0x4f8fa0(0x125))?.[_0x4f8fa0(0x1dc)],()=>require(_0x4f8fa0(0x10b))?.[_0x4f8fa0(0x239)]?.['ObjectId'],()=>appRequire('mongoose')?.['Types']?.[_0x4f8fa0(0x1dc)],()=>require(_0x4f8fa0(0x321))?.[_0x4f8fa0(0x1dc)],()=>appRequire('bson')?.['ObjectId']];for(const _0x154fe5 of _0x314f6d)try{const _0xca9e5f=_0x31cb2b[_0x4f8fa0(0x100)](_0x154fe5);if(_0x31cb2b[_0x4f8fa0(0x1bf)](_0x31cb2b[_0x4f8fa0(0x34b)],typeof _0xca9e5f))return cachedObjectIdCtor=_0xca9e5f,cachedObjectIdCtor;}catch{continue;}return cachedObjectIdCtor=null,null;}class TelygentClient{constructor(_0x3ee5a3){const _0x10523c=_0x45d8c9;this['initialized']=!0x1,this[_0x10523c(0x1d0)]=null,this[_0x10523c(0x1f8)]=!0x1,this[_0x10523c(0x1f1)]=!0x1,this[_0x10523c(0x247)]=!0x1,this['workerCyclePromise']=null,this[_0x10523c(0x15c)]=_0x3ee5a3['apiKey'],this['registry']=_0x3ee5a3[_0x10523c(0x26e)]??{},this['registryVersion']=_0x3ee5a3[_0x10523c(0x327)]||(0x0,registry_1[_0x10523c(0x337)])(this['registry']),this['registryPayload']=this[_0x10523c(0x26e)],this[_0x10523c(0x1b3)]=_0x3ee5a3['historyStore']??new history_1[(_0x10523c(0x2e3))](),this[_0x10523c(0x33d)]=_0x3ee5a3[_0x10523c(0x33d)],this[_0x10523c(0x1a1)]=_0x3ee5a3[_0x10523c(0x1a1)]??{},this[_0x10523c(0x18a)]=this[_0x10523c(0x2e1)](_0x3ee5a3[_0x10523c(0x1a7)]?.[_0x10523c(0x18a)],0xa,0x1),this['contextBudgetChars']=this[_0x10523c(0x2e1)](_0x3ee5a3[_0x10523c(0x1a7)]?.['contextBudgetChars'],0x2ee0,0x1770),this[_0x10523c(0x159)]=this['clampPositiveInteger'](_0x3ee5a3[_0x10523c(0x1a7)]?.[_0x10523c(0x159)],0x8,0x4),this[_0x10523c(0x179)]=!0x0,this['maxComplexity']=0x14,this['logEnabled']=_0x3ee5a3[_0x10523c(0x2ac)]??!0x1,this[_0x10523c(0x254)]=_0x3ee5a3[_0x10523c(0x254)];const _0x50347e=_0x3ee5a3[_0x10523c(0x33f)];_0x50347e&&(this[_0x10523c(0x116)]=this[_0x10523c(0x111)](_0x50347e)),this['workerConfig']?.['enabled']&&this[_0x10523c(0x318)]();}[_0x45d8c9(0x2ac)](_0x23b072){const _0x408134=_0x45d8c9;this[_0x408134(0x168)]&&console['log'](_0x23b072);}[_0x45d8c9(0x32e)](_0x3606a5){const _0x572942=_0x45d8c9;return INTERNAL_SERVER_TOOL_NAMES[_0x572942(0x28f)](_0x3606a5);}[_0x45d8c9(0x352)](_0xfacc80){const _0x4fbe3d=_0x45d8c9,_0x250b92={'bzfIH':function(_0x9ede45,_0xa0574a){return _0x9ede45!=_0xa0574a;},'PSSLq':_0x4fbe3d(0x351)};return!(!_0xfacc80||_0x250b92[_0x4fbe3d(0x359)](_0x250b92[_0x4fbe3d(0x360)],typeof _0xfacc80))&&Object[_0x4fbe3d(0x15e)](_0xfacc80)[_0x4fbe3d(0x1df)](_0x5767e5=>_0x4fbe3d(0x210)==typeof _0x5767e5);}[_0x45d8c9(0x160)](_0xd72fdf){const _0x301c18=_0x45d8c9;if(this[_0x301c18(0x1a1)][_0xd72fdf])return this[_0x301c18(0x1a1)][_0xd72fdf];const _0x433bd3=Object['keys'](this[_0x301c18(0x1a1)])[_0x301c18(0x231)](_0x2a42e0=>_0x2a42e0[_0x301c18(0x34e)]()===_0xd72fdf[_0x301c18(0x34e)]());return _0x433bd3?this[_0x301c18(0x1a1)][_0x433bd3]:void 0x0;}[_0x45d8c9(0x126)](_0x258e9c,_0x20d356){const _0x573ee4=_0x45d8c9,_0xe070bb={'YrPFB':_0x573ee4(0x210),'ssnxE':function(_0x2aff3a,_0x598575){return _0x2aff3a===_0x598575;},'QkgWs':'guSZL','rpHnp':function(_0x30ff30,_0x189b1b){return _0x30ff30+_0x189b1b;},'BSfrT':_0x573ee4(0x212),'LKlhQ':function(_0x352df3,_0x1ec6ae){return _0x352df3>_0x1ec6ae;}},_0x3c953c=this[_0x573ee4(0x160)](_0x258e9c);if(_0xe070bb[_0x573ee4(0x24f)]==typeof _0x3c953c)return{'handler':_0x3c953c};if(_0x20d356&&this[_0x573ee4(0x352)](_0x3c953c)){if(_0xe070bb[_0x573ee4(0x1ed)](_0xe070bb['QkgWs'],_0xe070bb[_0x573ee4(0x271)])){const _0x2de448=_0x3c953c[_0x20d356];if(_0xe070bb[_0x573ee4(0x24f)]==typeof _0x2de448)return{'handler':_0x2de448};}else return _0x3c1096[_0x573ee4(0x176)](_0x4c39a3);}if(_0x20d356){const _0x3371c7=this[_0x573ee4(0x1a1)][_0x20d356];if(_0xe070bb[_0x573ee4(0x24f)]==typeof _0x3371c7)return{'handler':_0x3371c7};}if(!_0x3c953c)return{'reason':_0x573ee4(0x350)+_0x258e9c+'\x27'};const _0x19cee3=this[_0x573ee4(0x352)](_0x3c953c)?Object[_0x573ee4(0x1fd)](_0x3c953c):[];return{'reason':_0xe070bb[_0x573ee4(0x153)](_0x573ee4(0x195)+(_0x20d356??_0xe070bb[_0x573ee4(0x2f5)])+_0x573ee4(0x24b)+_0x258e9c+'\x27',_0xe070bb[_0x573ee4(0x276)](_0x19cee3[_0x573ee4(0x256)],0x0)?_0x573ee4(0x199)+_0x19cee3[_0x573ee4(0x30b)](',\x20')+')':'')};}[_0x45d8c9(0x1f0)](_0x55a1a9){const _0xbf20e7=_0x45d8c9,_0x442b28={'hXihz':function(_0x4767b8,_0x537624){return _0x4767b8??_0x537624;},'wGCwK':function(_0x3b6ede,_0x5aeb34){return _0x3b6ede===_0x5aeb34;},'urmJk':'object','yXmpK':function(_0x55c8d1,_0x1e1d4d){return _0x55c8d1 in _0x1e1d4d;},'gKDbc':function(_0x1f25b9,_0x43f206){return _0x1f25b9 in _0x43f206;},'SFoVX':'has_more','PfCfj':function(_0x1c70fb,_0x7380b0){return _0x1c70fb===_0x7380b0;},'xkfdD':'SvWaA','zQAkW':function(_0x5eb0fc,_0x2e2b41){return _0x5eb0fc>_0x2e2b41;}};if(void 0x0===_0x55a1a9)return'undefined';if(_0x442b28[_0xbf20e7(0x1eb)](null,_0x55a1a9))return _0xbf20e7(0x342);if(_0x442b28['urmJk']!=typeof _0x55a1a9)return this['safeJsonStringify'](_0x55a1a9);const _0x13e671=_0x55a1a9;if(_0x442b28[_0xbf20e7(0x278)](_0xbf20e7(0x2aa),_0x13e671)||_0x442b28[_0xbf20e7(0x224)](_0x442b28['SFoVX'],_0x13e671)){if(_0x442b28[_0xbf20e7(0x25d)](_0x442b28[_0xbf20e7(0x15a)],'SvWaA')){const _0x1ff83f={'results_count':_0x13e671[_0xbf20e7(0x2aa)],'has_more':_0x13e671['has_more'],'limit':_0x13e671[_0xbf20e7(0x17b)],'skip':_0x13e671[_0xbf20e7(0x2f1)],'total_count':_0x13e671[_0xbf20e7(0x2ab)]};return this[_0xbf20e7(0x33c)](_0x1ff83f);}else{const _0x4858c6=this[_0xbf20e7(0x26e)][_0x5dadc2]?.['collectionName'];this[_0xbf20e7(0x2ac)](_0xbf20e7(0x219)+_0x4b7df4+_0xbf20e7(0x1c5)+_0x442b28[_0xbf20e7(0x312)](_0x4858c6,'')+'\x20input='+this[_0xbf20e7(0x2d4)](_0x565e26));}}if(Array[_0xbf20e7(0x243)](_0x13e671['documents']))return this['safeJsonStringify']({'documents':_0x13e671['documents'][_0xbf20e7(0x256)]});if(Array[_0xbf20e7(0x243)](_0x13e671[_0xbf20e7(0x240)]))return this[_0xbf20e7(0x33c)]({'results':_0x13e671[_0xbf20e7(0x240)][_0xbf20e7(0x256)]});const _0x277100=this[_0xbf20e7(0x33c)](_0x13e671);return _0x442b28[_0xbf20e7(0x157)](_0x277100[_0xbf20e7(0x256)],0x3e8)?_0x277100[_0xbf20e7(0x136)](0x0,0x3e8)+'...':_0x277100;}[_0x45d8c9(0x33c)](_0x72f567){const _0xd331f0=_0x45d8c9,_0x325930={'NCtTp':function(_0x38ba65,_0x902269){return _0x38ba65==_0x902269;},'nSUkb':_0xd331f0(0x351),'uueYw':_0xd331f0(0x108),'wbTLH':_0xd331f0(0x210),'eWOEm':function(_0x2ef9b4,_0xd93d3b){return _0x2ef9b4===_0xd93d3b;},'wmtSp':_0xd331f0(0x1a8),'BDSue':function(_0x47204e,_0x4b327a){return _0x47204e instanceof _0x4b327a;},'TGkyf':'unknown'},_0x33c37f=new WeakSet();try{return JSON[_0xd331f0(0x2fb)](_0x72f567,(_0x3c081a,_0x42ef34)=>{const _0x3f12ef=_0xd331f0;if(_0x42ef34&&_0x325930[_0x3f12ef(0x1fc)](_0x325930[_0x3f12ef(0x28d)],typeof _0x42ef34)){if(_0x33c37f['has'](_0x42ef34))return _0x325930[_0x3f12ef(0x2cc)];_0x33c37f[_0x3f12ef(0x1b5)](_0x42ef34);}return _0x42ef34;});}catch(_0xd79829){if(_0x325930[_0xd331f0(0x1fb)](_0x325930[_0xd331f0(0x1d9)],_0x325930[_0xd331f0(0x1d9)]))return _0xd331f0(0x251)+(_0x325930[_0xd331f0(0x11e)](_0xd79829,Error)?_0xd79829[_0xd331f0(0x146)]:_0x325930['TGkyf'])+']\x22';else{const _0x4552e4=this[_0xd331f0(0x1a1)][_0x3880b1];if(_0x325930[_0xd331f0(0x1fc)](_0x325930[_0xd331f0(0x1be)],typeof _0x4552e4))return{'handler':_0x4552e4};}}}['safeLogValue'](_0x893cd,_0x35ab35=0x7d0){const _0x42ade9=_0x45d8c9,_0x35782b={'KXiSK':function(_0x26fcce,_0x5101e2){return _0x26fcce<=_0x5101e2;}},_0x41d0b7=this['safeJsonStringify'](_0x893cd);return _0x35782b['KXiSK'](_0x41d0b7['length'],_0x35ab35)?_0x41d0b7:_0x41d0b7[_0x42ade9(0x136)](0x0,_0x35ab35)+'...';}[_0x45d8c9(0x174)](_0xaacb1f){const _0x5bd4e7=_0x45d8c9,_0x221993={'MmGjk':function(_0x3028e5,_0x35f5be){return _0x3028e5<=_0x35f5be;}},_0x45ce3f=_0xaacb1f[_0x5bd4e7(0x184)]();return _0x221993[_0x5bd4e7(0x299)](_0x45ce3f[_0x5bd4e7(0x256)],0x258)?_0x45ce3f:_0x45ce3f[_0x5bd4e7(0x136)](0x0,0x258)+'...';}['compactValue'](_0x3058ff,_0x3493c2=0x0){const _0x323005=_0x45d8c9,_0x305d9d={'QZjZi':function(_0x5b5bd2,_0x4f9345){return _0x5b5bd2>_0x4f9345;},'qXdIr':'string','QUfzW':function(_0x45ff56,_0x3dba6c){return _0x45ff56===_0x3dba6c;},'UlHin':_0x323005(0x324),'gnhlm':function(_0x589a75,_0x8a2a57){return _0x589a75-_0x8a2a57;},'svfIF':function(_0x1c1c6b,_0x5b706d){return _0x1c1c6b!=_0x5b706d;},'YSnMn':_0x323005(0x351),'mvibw':function(_0x584c53,_0x51aaf1){return _0x584c53>_0x51aaf1;},'rneJJ':function(_0x32a951,_0x758ac2){return _0x32a951-_0x758ac2;}};if(_0x305d9d[_0x323005(0x113)](_0x3493c2,0x6))return'[Truncated]';if(_0x305d9d[_0x323005(0x2ee)]==typeof _0x3058ff)return _0x3058ff;if(Array[_0x323005(0x243)](_0x3058ff)){if(_0x305d9d[_0x323005(0x151)](_0x305d9d['UlHin'],_0x323005(0x324))){const _0x46920c=_0x3058ff[_0x323005(0x136)](0x0,0x32)[_0x323005(0x1a4)](_0x48418c=>this[_0x323005(0x35a)](_0x48418c,_0x3493c2+0x1));return _0x3058ff['length']>0x32&&_0x46920c[_0x323005(0x133)]('[Truncated\x20'+_0x305d9d[_0x323005(0x20d)](_0x3058ff[_0x323005(0x256)],0x32)+_0x323005(0x16f)),_0x46920c;}else return _0x35006e[_0x323005(0x2b0)]+':'+this[_0x323005(0x2d4)](_0x2ceba4['input'],0x320);}if(!_0x3058ff||_0x305d9d[_0x323005(0x2c9)](_0x305d9d[_0x323005(0x2cf)],typeof _0x3058ff))return _0x3058ff;const _0x2b8e5b=Object[_0x323005(0x205)](_0x3058ff),_0xf75ab3={};for(const [_0x2d5a07,_0x502c1a]of _0x2b8e5b[_0x323005(0x136)](0x0,0x28))_0xf75ab3[_0x2d5a07]=this[_0x323005(0x35a)](_0x502c1a,_0x3493c2+0x1);return _0x305d9d['mvibw'](_0x2b8e5b[_0x323005(0x256)],0x28)&&(_0xf75ab3['__truncatedKeys']=_0x305d9d[_0x323005(0x2fe)](_0x2b8e5b[_0x323005(0x256)],0x28)),_0xf75ab3;}['compactToolResults'](_0x386181){const _0x1b8952=_0x45d8c9;return _0x386181[_0x1b8952(0x1a4)](_0x229ecf=>({..._0x229ecf,'content':this[_0x1b8952(0x35a)](this['normalizeTransportValue'](_0x229ecf[_0x1b8952(0x1f4)]))}));}['normalizeTransportValue'](_0x4a9ba9){const _0x529572=_0x45d8c9,_0xb4b3da={'LOkup':function(_0x46fbdd,_0x244cce){return _0x46fbdd==_0x244cce;}};if(_0xb4b3da[_0x529572(0x1cd)](null,_0x4a9ba9))return _0x4a9ba9;const _0xb68b8e=this['safeJsonStringify'](_0x4a9ba9);try{return JSON[_0x529572(0x176)](_0xb68b8e);}catch{return _0x4a9ba9;}}[_0x45d8c9(0x24e)](_0xb30d54){const _0x386102=_0x45d8c9;return _0xb30d54['name']+':'+this['safeLogValue'](_0xb30d54[_0x386102(0x1f2)],0x320);}[_0x45d8c9(0x2e1)](_0x6a3f61,_0x453a1a,_0x736162){const _0x21d9af=_0x45d8c9,_0x5ead3a={'rCpnN':function(_0x281b30,_0x40c979){return _0x281b30(_0x40c979);}},_0x1d2b89=_0x5ead3a[_0x21d9af(0x206)](Number,_0x6a3f61);return Number[_0x21d9af(0x1ba)](_0x1d2b89)?Math[_0x21d9af(0x209)](_0x736162,Math[_0x21d9af(0x289)](_0x1d2b89)):_0x453a1a;}[_0x45d8c9(0x313)](_0x3c2047){const _0x36ca65=_0x45d8c9,_0x49cae2={'dpeNQ':function(_0x4cb84d,_0x5afa55){return _0x4cb84d===_0x5afa55;},'upcPK':_0x36ca65(0x13f),'MUycb':'conversation'};return _0x49cae2[_0x36ca65(0x283)](_0x49cae2[_0x36ca65(0x12a)],_0x3c2047['messageType'])?_0x36ca65(0x13f):_0x49cae2[_0x36ca65(0x2e5)];}[_0x45d8c9(0x343)](_0x240e9a){const _0x2c9b2e=_0x45d8c9,_0x285ff1={'Plrao':function(_0x1a4da5,_0x4f96ad){return _0x1a4da5===_0x4f96ad;}},_0x35d988=_0x240e9a[_0x2c9b2e(0x21e)]?.[_0x2c9b2e(0x166)];return _0x285ff1['Plrao']('v2',_0x35d988);}[_0x45d8c9(0x18e)](_0x3f7baf){const _0x18acc0=_0x45d8c9,_0x265d02={'cBCjR':_0x18acc0(0x2a0),'gLnyE':_0x18acc0(0x10e)},_0x58dac5=_0x18acc0(0x11b)==typeof _0x3f7baf?_0x3f7baf[_0x18acc0(0x184)]():'';return!_0x58dac5||(!!/^AI_CONTEXT_[A-Z0-9_]+$/[_0x18acc0(0x1ab)](_0x58dac5)||(!!_0x58dac5[_0x18acc0(0x2c7)](_0x265d02[_0x18acc0(0x329)])||(!_0x58dac5[_0x18acc0(0x2c7)](_0x265d02[_0x18acc0(0x290)])||!_0x58dac5[_0x18acc0(0x2c7)](_0x18acc0(0x248)))));}[_0x45d8c9(0x323)](_0x427c99){const _0x54d1bd=_0x45d8c9,_0x5bf2b7={'oCdhW':_0x54d1bd(0x11b),'XrvYK':function(_0x132083,_0x1130e7){return _0x132083>_0x1130e7;}};return _0x427c99[_0x54d1bd(0x1a4)](_0x30fd3b=>{const _0x4b55e0=_0x54d1bd,_0xe6d059=_0x5bf2b7['oCdhW']==typeof _0x30fd3b[_0x4b55e0(0x1f4)]&&_0x5bf2b7[_0x4b55e0(0x294)](_0x30fd3b[_0x4b55e0(0x1f4)][_0x4b55e0(0x256)],0x9c4)?_0x30fd3b[_0x4b55e0(0x1f4)][_0x4b55e0(0x136)](0x0,0x9c4)+_0x4b55e0(0x12b):_0x30fd3b[_0x4b55e0(0x1f4)],_0x2f3589={'role':_0x30fd3b[_0x4b55e0(0x11a)],'content':_0xe6d059,'timestamp':_0x30fd3b[_0x4b55e0(0x308)],'messageType':this[_0x4b55e0(0x313)](_0x30fd3b)};return _0x30fd3b[_0x4b55e0(0x21e)]&&(_0x2f3589[_0x4b55e0(0x21e)]=_0x30fd3b[_0x4b55e0(0x21e)]),_0x2f3589;});}[_0x45d8c9(0x129)](_0x59687c,_0x36752b,_0x3e8394){const _0x1d23e9=_0x45d8c9,_0x14f6eb={'zTbwK':_0x1d23e9(0x272),'fLbsh':function(_0x1991ed,_0x428e15){return _0x1991ed==_0x428e15;},'nCwVi':_0x1d23e9(0x11b),'RSZsZ':function(_0x2e4499,_0x2dc0af){return _0x2e4499>_0x2dc0af;},'PidJW':function(_0x25fee7,_0x2bca0d){return _0x25fee7>_0x2bca0d;},'bLUwM':function(_0x26b1a3,_0x479d7a){return _0x26b1a3===_0x479d7a;},'GsQjP':_0x1d23e9(0x170),'kCahI':function(_0x59f392,_0x143fa4){return _0x59f392===_0x143fa4;},'htndz':function(_0x43d01b,_0x38cb68){return _0x43d01b-_0x38cb68;},'mqjgb':function(_0x15174a,_0x1f9efc){return _0x15174a>_0x1f9efc;},'TJUmt':_0x1d23e9(0x29d)};if(!Array[_0x1d23e9(0x243)](_0x59687c)||0x0===_0x59687c['length'])return[];const _0x3eb1ae=_0x59687c[_0x1d23e9(0x12d)](_0x5394b5=>{const _0xd5ddb3=_0x1d23e9;if(_0x14f6eb[_0xd5ddb3(0x26a)]===_0x14f6eb[_0xd5ddb3(0x26a)]){if(!_0x5394b5)return!0x1;const _0x5bba1b=_0x5394b5[_0xd5ddb3(0x1f4)];return _0x14f6eb[_0xd5ddb3(0x28e)](_0x14f6eb[_0xd5ddb3(0x334)],typeof _0x5bba1b)&&_0x14f6eb[_0xd5ddb3(0xfb)](_0x5bba1b[_0xd5ddb3(0x184)]()[_0xd5ddb3(0x256)],0x0);}else{const _0xa2910a=new _0x323ac2(_0x57a378);return _0x5b2c81[_0xd5ddb3(0x284)](_0xa2910a[_0xd5ddb3(0x2c3)]())?_0x2417b8:_0xa2910a;}});if(_0x14f6eb[_0x1d23e9(0x1bc)](0x0,_0x3eb1ae[_0x1d23e9(0x256)]))return[];const _0x43a3a8=[];for(let _0x212d92=0x0;_0x212d92<_0x3eb1ae[_0x1d23e9(0x256)];_0x212d92+=0x1)_0x14f6eb[_0x1d23e9(0x1bc)](_0x14f6eb[_0x1d23e9(0x23a)],_0x3eb1ae[_0x212d92]?.['role'])&&_0x43a3a8[_0x1d23e9(0x133)](_0x212d92);if(_0x14f6eb[_0x1d23e9(0x21b)](0x0,_0x43a3a8[_0x1d23e9(0x256)]))return _0x3eb1ae[_0x1d23e9(0x136)](Math[_0x1d23e9(0x209)](0x0,_0x14f6eb[_0x1d23e9(0x1c0)](_0x3eb1ae['length'],0x2*this[_0x1d23e9(0x18a)])));const _0x3adfad=_0x14f6eb[_0x1d23e9(0x32b)](_0x43a3a8[_0x1d23e9(0x256)],_0x3e8394??this['maxMessages'])?_0x43a3a8[_0x14f6eb[_0x1d23e9(0x1c0)](_0x43a3a8[_0x1d23e9(0x256)],_0x3e8394??this[_0x1d23e9(0x18a)])]:_0x43a3a8[0x0];let _0x31fa6a=_0x3eb1ae[_0x1d23e9(0x136)](_0x3adfad);if(_0x36752b&&_0x14f6eb[_0x1d23e9(0x2e8)](_0x31fa6a[_0x1d23e9(0x256)],0x0)){if(_0x1d23e9(0x330)!==_0x14f6eb[_0x1d23e9(0x356)]){const _0x47de86=_0x31fa6a[_0x14f6eb['htndz'](_0x31fa6a[_0x1d23e9(0x256)],0x1)];'user'===_0x47de86[_0x1d23e9(0x11a)]&&_0x14f6eb[_0x1d23e9(0x21b)](_0x47de86[_0x1d23e9(0x1f4)],_0x36752b)&&(_0x31fa6a=_0x31fa6a[_0x1d23e9(0x136)](0x0,-0x1));}else{if(!_0x3f93f3)return!0x1;const _0x4fde43=_0x4d870b[_0x1d23e9(0x1f4)];return _0x14f6eb[_0x1d23e9(0x28e)](_0x1d23e9(0x11b),typeof _0x4fde43)&&_0x14f6eb[_0x1d23e9(0x32b)](_0x4fde43['trim']()[_0x1d23e9(0x256)],0x0);}}return _0x31fa6a;}['estimateHistoryChars'](_0x1fd6fa,_0x458b89){const _0x47262e=_0x45d8c9,_0x4234ae={'hrsAe':function(_0x5bdcc3,_0x3e6395){return _0x5bdcc3+_0x3e6395;},'CnQIN':function(_0x4b065e,_0x1e0a53){return _0x4b065e==_0x1e0a53;},'SEsJL':'string'};return _0x4234ae[_0x47262e(0x105)](_0x1fd6fa['reduce']((_0x56c20d,_0x35a46a)=>_0x56c20d+('string'==typeof _0x35a46a[_0x47262e(0x1f4)]?_0x35a46a[_0x47262e(0x1f4)]:'')[_0x47262e(0x256)],0x0),_0x4234ae[_0x47262e(0x201)](_0x4234ae[_0x47262e(0x122)],typeof _0x458b89)?_0x458b89[_0x47262e(0x256)]:0x0);}['estimateSummaryChars'](_0x23e809){const _0x1bcae5=_0x45d8c9,_0x533525={'LiXwt':function(_0x7fdfc,_0x3884c1){return _0x7fdfc*_0x3884c1;}},_0x3eeb89=Math[_0x1bcae5(0x11f)](_0x533525[_0x1bcae5(0x1d8)](0.18,_0x23e809));return Math[_0x1bcae5(0x209)](0x1f4,Math['min'](0x5dc,_0x3eeb89));}[_0x45d8c9(0x319)](_0x487003,_0xb16921){const _0x4077e4=_0x45d8c9;this[_0x4077e4(0x2ac)]('[telygent-sdk]\x20'+_0x487003+'\x20'+this['safeLogValue'](_0xb16921,0xfa0));}['getLatestContextMessage'](_0x25fb41){const _0x26a494=_0x45d8c9,_0x4ed275={'IoNbN':function(_0x1e50a0,_0x5341dc){return _0x1e50a0>=_0x5341dc;},'kiGZH':function(_0x501da2,_0x16ce1c){return _0x501da2===_0x16ce1c;},'ZOJVj':function(_0x4db63b,_0xacdafc){return _0x4db63b==_0xacdafc;},'SbnDl':_0x26a494(0x11b)};for(let _0xaf1b95=_0x25fb41[_0x26a494(0x256)]-0x1;_0x4ed275[_0x26a494(0x2dc)](_0xaf1b95,0x0);_0xaf1b95-=0x1){const _0xa5670c=_0x25fb41[_0xaf1b95];if(_0xa5670c&&_0x4ed275[_0x26a494(0x11c)](_0x26a494(0x13f),this[_0x26a494(0x313)](_0xa5670c))&&this['isSupportedContextVersion'](_0xa5670c)&&!this[_0x26a494(0x18e)](_0x4ed275['ZOJVj'](_0x4ed275[_0x26a494(0x347)],typeof _0xa5670c[_0x26a494(0x1f4)])?_0xa5670c[_0x26a494(0x1f4)]:''))return _0xa5670c;}}[_0x45d8c9(0x2c1)](_0x21d4fe){const _0x296d4f=_0x45d8c9,_0x5a45a5={'nUBBR':function(_0x3f1b1b,_0x1d4d82){return _0x3f1b1b==_0x1d4d82;},'lCgDO':function(_0x2872ba,_0x2e1ab9){return _0x2872ba===_0x2e1ab9;},'wMZDC':_0x296d4f(0x2ff),'fnAQp':_0x296d4f(0x1f6),'aHFbu':_0x296d4f(0x11b),'TDUOa':'conversation','tahNB':function(_0x5bc652,_0x1e5c86){return _0x5bc652>_0x1e5c86;}};return _0x21d4fe['filter'](_0x526fc3=>{const _0x1280d0=_0x296d4f;if(_0x5a45a5[_0x1280d0(0x1e2)](_0x5a45a5['wMZDC'],_0x5a45a5[_0x1280d0(0x270)])){if(_0x5a45a5['nUBBR'](null,_0x98367c))return _0x1c399d;const _0xe8e679=this[_0x1280d0(0x33c)](_0x1e6cf7);try{return _0x3ee124[_0x1280d0(0x176)](_0xe8e679);}catch{return _0x3596e1;}}else{if(!_0x526fc3)return!0x1;const _0x25fdc4=_0x5a45a5[_0x1280d0(0x317)](_0x5a45a5[_0x1280d0(0x2c2)],typeof _0x526fc3['content'])?_0x526fc3['content'][_0x1280d0(0x184)]():'';return _0x5a45a5[_0x1280d0(0x2e6)]===this['getMessageType'](_0x526fc3)&&_0x5a45a5[_0x1280d0(0x32c)](_0x25fdc4['length'],0x0);}});}[_0x45d8c9(0x1f5)](_0x3ea3b6,_0x3062d3){const _0x60b552=_0x45d8c9,_0x1015d6={'hQbWD':function(_0x1ab0ad,_0x12ba73){return _0x1ab0ad==_0x12ba73;},'UKlKf':_0x60b552(0x218)};if(!_0x3062d3)return this[_0x60b552(0x2c1)](_0x3ea3b6);const _0x5c2f45=_0x3062d3['contextMetadata']?.[_0x60b552(0x1f7)];return _0x1015d6[_0x60b552(0x1b4)](_0x1015d6[_0x60b552(0x232)],typeof _0x5c2f45)&&Number['isFinite'](_0x5c2f45)?this['getConversationMessagesOnly'](_0x3ea3b6)['filter'](_0x452c4f=>_0x452c4f[_0x60b552(0x308)]>_0x5c2f45):this[_0x60b552(0x2c1)](_0x3ea3b6)[_0x60b552(0x12d)](_0x4b2810=>_0x4b2810['timestamp']>_0x3062d3[_0x60b552(0x308)]);}['enforceHistoryBudget'](_0xc58134,_0x4a4bf9){const _0x546038=_0x45d8c9,_0x3c6d14={'gloxZ':function(_0x5e9993,_0x4a64a4){return _0x5e9993<=_0x4a64a4;},'mwoca':function(_0x1c5da1,_0x3782f5){return _0x1c5da1===_0x3782f5;},'eELxv':'context','DKcuQ':function(_0xa39e89,_0x4a5d5c){return _0xa39e89>_0x4a5d5c;}};if(_0x3c6d14[_0x546038(0x335)](_0xc58134[_0x546038(0x256)],0x4))return{'history':_0xc58134,'budgetEnforced':!0x1,'droppedMessages':0x0};const _0x588cbe=Math[_0x546038(0x209)](0x1770,this[_0x546038(0x26f)]-0x4b0);if(this[_0x546038(0x1a0)](_0xc58134,_0x4a4bf9)<=_0x588cbe)return{'history':_0xc58134,'budgetEnforced':!0x1,'droppedMessages':0x0};const _0x1921a1=_0xc58134['length']>0x0&&_0x3c6d14[_0x546038(0x10d)](_0x3c6d14[_0x546038(0x236)],this[_0x546038(0x313)](_0xc58134[0x0]))?_0xc58134[0x0]:void 0x0,_0x4a909e=_0x1921a1?[_0x1921a1]:[];let _0x50f292=_0x1921a1?_0xc58134[_0x546038(0x136)](0x1):[..._0xc58134],_0x51733a=0x0;for(;_0x50f292[_0x546038(0x256)]>0x4&&_0x3c6d14['DKcuQ'](this['estimateHistoryChars']([..._0x4a909e,..._0x50f292],_0x4a4bf9),_0x588cbe);)_0x50f292=_0x50f292['slice'](0x1),_0x51733a+=0x1;return{'history':[..._0x4a909e,..._0x50f292],'budgetEnforced':_0x3c6d14[_0x546038(0x296)](_0x51733a,0x0),'droppedMessages':_0x51733a};}['prepareHistory'](_0x3d1cab,_0xad2abd){const _0x52dcb5=_0x45d8c9,_0x3b89c4={'zKMXd':function(_0x1dda18,_0xbe3c60){return _0x1dda18-_0xbe3c60;},'uHrYv':_0x52dcb5(0x11b),'sJfOv':function(_0xb248db,_0x5551fe){return _0xb248db==_0x5551fe;},'pBfgD':function(_0x484eab,_0x21a209){return _0x484eab>_0x21a209;},'jKKFh':function(_0x42d0a1,_0x4bf8b2){return _0x42d0a1+_0x4bf8b2;},'UtFWh':function(_0x244c47,_0x157cdc){return _0x244c47+_0x157cdc;},'zpihj':function(_0x341e45,_0x2de003){return _0x341e45>=_0x2de003;},'OazyQ':function(_0x5a70fc,_0x40f762){return _0x5a70fc>_0x40f762;},'xvzjV':function(_0x29c6ce,_0x102e5c){return _0x29c6ce+_0x102e5c;},'xxTMa':'summary_would_still_exceed_budget','oscKM':function(_0x3910e0,_0x1ea20a){return _0x3910e0+_0x1ea20a;},'LUbxQ':_0x52dcb5(0x193),'kdSrr':_0x52dcb5(0x2a4),'VmeGC':_0x52dcb5(0x196),'kaMVv':_0x52dcb5(0x326),'cBsGR':function(_0x34d3cb,_0x154f7b){return _0x34d3cb===_0x154f7b;}},_0x5721b7=this[_0x52dcb5(0x333)](_0x3d1cab),_0x1747ce=this['getConversationMessagesOnly'](_0x3d1cab),_0x3cd754=this[_0x52dcb5(0x1f5)](_0x3d1cab,_0x5721b7),_0x5ef2eb=_0x5721b7?Math[_0x52dcb5(0x208)](this[_0x52dcb5(0x18a)],0x4):this[_0x52dcb5(0x18a)],_0x4f2411=_0x5721b7?this[_0x52dcb5(0x129)](_0x3cd754,_0xad2abd,_0x5ef2eb):this[_0x52dcb5(0x129)](_0x1747ce,_0xad2abd,_0x5ef2eb),_0x40f633=_0x5721b7?_0x3cd754:_0x1747ce,_0x595194=Math['max'](0x0,_0x3b89c4[_0x52dcb5(0x188)](_0x40f633[_0x52dcb5(0x256)],_0x4f2411['length'])),_0x3fa5d3=_0x40f633[_0x52dcb5(0x136)](0x0,_0x595194),_0x5e526e=_0x5721b7&&_0x3b89c4[_0x52dcb5(0x158)]==typeof _0x5721b7[_0x52dcb5(0x1f4)]?_0x5721b7[_0x52dcb5(0x1f4)]['length']:0x0,_0xd1e491=_0x3b89c4[_0x52dcb5(0x2a9)]('string',typeof _0xad2abd)?_0xad2abd[_0x52dcb5(0x256)]:0x0,_0x24c1fe=this[_0x52dcb5(0x1a0)](_0x40f633,_0xad2abd),_0x28dc1b=this['estimateHistoryChars'](_0x3fa5d3),_0x4d1fad=this[_0x52dcb5(0x1a0)](_0x4f2411,_0xad2abd),_0x487127=_0x3b89c4[_0x52dcb5(0x14b)](_0x3fa5d3['length'],0x0)?_0x3fa5d3[_0x3b89c4[_0x52dcb5(0x188)](_0x3fa5d3[_0x52dcb5(0x256)],0x1)][_0x52dcb5(0x308)]:_0x5721b7?.['contextMetadata']?.[_0x52dcb5(0x1f7)],_0x46a970=_0x5721b7?[_0x5721b7,..._0x3cd754]:_0x4f2411,_0x4dcefb=_0x5721b7?_0x3b89c4[_0x52dcb5(0x1c1)](_0x5e526e,_0x24c1fe):_0x4d1fad,_0x167d6b=this['estimateSummaryChars'](_0x3b89c4[_0x52dcb5(0x35c)](_0x5e526e,_0x28dc1b)),_0x5623db=_0x167d6b+_0x4d1fad,_0x43bede=_0x3b89c4[_0x52dcb5(0x20a)](_0x3fa5d3[_0x52dcb5(0x256)],this[_0x52dcb5(0x159)])&&_0x3b89c4[_0x52dcb5(0x20a)](_0x28dc1b,0xbb8)?_0x3b89c4[_0x52dcb5(0x29b)](_0x5623db,_0x3b89c4[_0x52dcb5(0x1e8)](this[_0x52dcb5(0x26f)],0x4b0))?_0x3b89c4[_0x52dcb5(0x132)]:_0x5721b7?_0x3b89c4['pBfgD'](_0x4dcefb,_0x3b89c4[_0x52dcb5(0x1e7)](this[_0x52dcb5(0x26f)],0x4b0))?_0x3b89c4[_0x52dcb5(0x2d1)]:_0x3b89c4[_0x52dcb5(0x128)]:_0x24c1fe>this[_0x52dcb5(0x26f)]+0x4b0?_0x3b89c4[_0x52dcb5(0x2db)]:_0x3b89c4[_0x52dcb5(0x128)]:_0x3b89c4[_0x52dcb5(0x135)];return{'latestContextMessage':_0x5721b7,'transportHistory':_0x46a970,'recentTail':_0x4f2411,'compactableMessages':_0x3fa5d3,'coveredUntilTimestamp':_0x487127,'needsCompaction':_0x3b89c4[_0x52dcb5(0x2db)]===_0x43bede||_0x3b89c4['cBsGR'](_0x3b89c4[_0x52dcb5(0x2d1)],_0x43bede),'metrics':{'conversationMessages':_0x1747ce[_0x52dcb5(0x256)],'activeMessages':_0x40f633['length'],'compactableMessages':_0x3fa5d3[_0x52dcb5(0x256)],'recentTailMessages':_0x4f2411[_0x52dcb5(0x256)],'hasContext':Boolean(_0x5721b7),'latestContextChars':_0x5e526e,'unsummarizedChars':_0x24c1fe,'compactableChars':_0x28dc1b,'recentTailChars':_0x4d1fad,'currentTransportChars':_0x4dcefb,'projectedSummaryChars':_0x167d6b,'projectedTransportAfterCompactionChars':_0x5623db,'contextBudgetChars':this[_0x52dcb5(0x26f)],'currentQuestionChars':_0xd1e491,'triggerReason':_0x43bede}};}async[_0x45d8c9(0x181)](_0x38a1ef,_0x3f723b){const _0x2488dc=_0x45d8c9,_0x58640a={'nWURg':_0x2488dc(0x1c8),'gTzRR':function(_0x2f6882,_0x501e82){return _0x2f6882==_0x501e82;},'lFIsL':_0x2488dc(0x11b)},_0x471395=await(0x0,http_1[_0x2488dc(0x2c5)])(BASE_URL+_0x2488dc(0x292),{'conversationId':_0x38a1ef,'history':this[_0x2488dc(0x323)](_0x3f723b),'aiName':this[_0x2488dc(0x254)]},this[_0x2488dc(0xff)]());if(_0x58640a[_0x2488dc(0x202)]===_0x471395[_0x2488dc(0x282)])return null;const _0x459b9=_0x58640a[_0x2488dc(0x265)](_0x58640a[_0x2488dc(0x31e)],typeof _0x471395[_0x2488dc(0x1f4)])?_0x471395['content'][_0x2488dc(0x184)]():'';return this[_0x2488dc(0x18e)](_0x459b9)?null:_0x459b9['length']>0x0?_0x459b9:null;}async[_0x45d8c9(0x215)](_0x40207a,_0x280cee,_0x30ee7e){const _0x42ce64=_0x45d8c9,_0x58b1b1={'SVZsz':function(_0x49481f,_0x18e9c2){return _0x49481f!=_0x18e9c2;},'rEMLK':function(_0x490a75,_0x1d79dd){return _0x490a75!==_0x1d79dd;},'tGunr':_0x42ce64(0x351),'brSwp':function(_0x5e9498,_0x39a53c){return _0x5e9498 in _0x39a53c;},'PIxCo':function(_0x1ed933,_0x2264e3){return _0x1ed933===_0x2264e3;},'TLrDs':function(_0x2a079f,_0x33ca6b){return _0x2a079f<=_0x33ca6b;},'icWPm':function(_0x1c57ad,_0x50959d){return _0x1c57ad-_0x50959d;},'qMPUt':function(_0x58a429,_0x3f1a85){return _0x58a429<=_0x3f1a85;},'zNqeh':function(_0x1d7d79,_0x3bbbe4){return _0x1d7d79>_0x3bbbe4;},'xvJOT':_0x42ce64(0x13f),'WMpoD':function(_0xf5f7d7,_0x22f7a1){return _0xf5f7d7>_0x22f7a1;},'tHKph':_0x42ce64(0x310),'lAcRa':function(_0xc2874,_0x4acead){return _0xc2874===_0x4acead;},'Fhosx':function(_0xffc99,_0x5a13ea){return _0xffc99===_0x5a13ea;},'aACQu':_0x42ce64(0x302),'gQqze':function(_0x4e5cb4,_0x173a94){return _0x4e5cb4===_0x173a94;},'dmtDl':'number','ecEyH':function(_0x5815a6,_0x18d61f){return _0x5815a6+_0x18d61f;},'AJTcF':_0x42ce64(0x1cf),'PCulf':'LrfTE','sLFtG':function(_0xdedfc1,_0x40b2a2){return _0xdedfc1 instanceof _0x40b2a2;},'kZCaw':_0x42ce64(0x1af)},_0x5cf718=this[_0x42ce64(0x320)](_0x280cee,_0x30ee7e);if(this['logHistoryMetrics'](_0x58b1b1['tHKph'],_0x5cf718[_0x42ce64(0x13a)]),!_0x5cf718['needsCompaction']||_0x58b1b1['lAcRa'](0x0,_0x5cf718[_0x42ce64(0x322)][_0x42ce64(0x256)])||0x0===_0x5cf718[_0x42ce64(0x156)][_0x42ce64(0x256)]){if(_0x58b1b1[_0x42ce64(0x16a)](_0x42ce64(0x1d2),_0x58b1b1[_0x42ce64(0x198)])){if(!_0x250eef||_0x58b1b1[_0x42ce64(0x2ad)](_0x42ce64(0x351),typeof _0xd68c85))return _0x3d8170;if(_0x58b1b1['rEMLK']('match',_0x1a31a5[_0x42ce64(0x15d)]))return _0x120f80;const _0x571296=_0x5edfa3['params'];if(!_0x571296||_0x58b1b1[_0x42ce64(0x258)]!=typeof _0x571296||_0x5caa0a[_0x42ce64(0x243)](_0x571296))return _0x2acae5;for(const _0x27d4e5 of _0x540b3e)_0x58b1b1['brSwp'](_0x27d4e5[_0x42ce64(0x2e7)],_0x571296)&&delete _0x571296[_0x27d4e5['field']];return _0x58b1b1[_0x42ce64(0x22c)](0x0,_0x3d27ae[_0x42ce64(0x1fd)](_0x571296)[_0x42ce64(0x256)])?null:{..._0x4b7af8,'params':this[_0x42ce64(0x203)](this['coerceDateFilters'](_0x571296),_0x5a844c)};}else{const _0x21c8aa=this[_0x42ce64(0x323)](_0x5cf718['transportHistory']),_0x195bf3=this[_0x42ce64(0x267)](_0x21c8aa,_0x30ee7e);return{'transportHistory':_0x195bf3['history'],'metrics':{..._0x5cf718[_0x42ce64(0x13a)],'compactionAttempted':!0x1,'compactionSucceeded':!0x1,'budgetEnforced':_0x195bf3[_0x42ce64(0x28a)],'droppedMessages':_0x195bf3[_0x42ce64(0x1fa)],'contextSummaryChars':0x0,'finalTransportChars':this[_0x42ce64(0x1a0)](_0x195bf3[_0x42ce64(0x1a7)],_0x30ee7e)}};}}const _0x35f8e2=_0x5cf718[_0x42ce64(0x354)]?[_0x5cf718['latestContextMessage'],..._0x5cf718['compactableMessages']]:_0x5cf718[_0x42ce64(0x322)];if(_0x58b1b1['gQqze'](0x0,_0x35f8e2[_0x42ce64(0x256)])||_0x58b1b1[_0x42ce64(0x2ad)](_0x58b1b1[_0x42ce64(0x29a)],typeof _0x5cf718[_0x42ce64(0x1f7)])){const _0x108ad9=this['compactHistory'](_0x5cf718[_0x42ce64(0x275)]),_0x46e07f=this['enforceHistoryBudget'](_0x108ad9,_0x30ee7e);return{'transportHistory':_0x46e07f['history'],'metrics':{..._0x5cf718[_0x42ce64(0x13a)],'compactionAttempted':!0x1,'compactionSucceeded':!0x1,'budgetEnforced':_0x46e07f[_0x42ce64(0x28a)],'droppedMessages':_0x46e07f['droppedMessages'],'contextSummaryChars':0x0,'finalTransportChars':this[_0x42ce64(0x1a0)](_0x46e07f['history'],_0x30ee7e)}};}try{const _0x35b0d9=await this[_0x42ce64(0x181)](_0x40207a,_0x35f8e2);if(!_0x35b0d9){const _0x35f31b=this[_0x42ce64(0x323)](_0x5cf718[_0x42ce64(0x275)]),_0x1ccfb7=this[_0x42ce64(0x267)](_0x35f31b,_0x30ee7e);return{'transportHistory':_0x1ccfb7[_0x42ce64(0x1a7)],'metrics':{..._0x5cf718[_0x42ce64(0x13a)],'compactionAttempted':!0x0,'compactionSucceeded':!0x1,'budgetEnforced':_0x1ccfb7['budgetEnforced'],'droppedMessages':_0x1ccfb7[_0x42ce64(0x1fa)],'contextSummaryChars':0x0,'finalTransportChars':this[_0x42ce64(0x1a0)](_0x1ccfb7[_0x42ce64(0x1a7)],_0x30ee7e)}};}const _0x57aeb7=_0x5cf718[_0x42ce64(0x354)]?.[_0x42ce64(0x21e)]?.['coveredMessageCount']??0x0,_0x547367={'role':_0x42ce64(0x2dd),'content':_0x35b0d9,'timestamp':Date[_0x42ce64(0x2e2)](),'messageType':_0x42ce64(0x13f),'contextMetadata':{'coveredUntilTimestamp':_0x5cf718[_0x42ce64(0x1f7)],'coveredMessageCount':_0x58b1b1[_0x42ce64(0x220)](_0x57aeb7,_0x5cf718[_0x42ce64(0x322)][_0x42ce64(0x256)]),'summaryVersion':'v2'}};await this[_0x42ce64(0x1b3)][_0x42ce64(0x192)](_0x40207a,_0x547367);const _0x17de15=this[_0x42ce64(0x320)]([..._0x280cee,_0x547367],_0x30ee7e),_0x1bb748=this['compactHistory'](_0x17de15[_0x42ce64(0x275)]),_0x320eba=this['enforceHistoryBudget'](_0x1bb748,_0x30ee7e),_0x8e8563={..._0x5cf718[_0x42ce64(0x13a)],'compactionAttempted':!0x0,'compactionSucceeded':!0x0,'budgetEnforced':_0x320eba[_0x42ce64(0x28a)],'droppedMessages':_0x320eba[_0x42ce64(0x1fa)],'contextSummaryChars':_0x35b0d9[_0x42ce64(0x256)],'finalTransportChars':this[_0x42ce64(0x1a0)](_0x320eba[_0x42ce64(0x1a7)],_0x30ee7e)};return this[_0x42ce64(0x319)](_0x58b1b1['AJTcF'],_0x8e8563),{'transportHistory':_0x320eba[_0x42ce64(0x1a7)],'metrics':_0x8e8563};}catch(_0x5e2586){if(_0x58b1b1[_0x42ce64(0x35d)](_0x58b1b1[_0x42ce64(0x266)],_0x42ce64(0x1b6))){if(_0x58b1b1[_0x42ce64(0x211)](_0x40c3f6[_0x42ce64(0x256)],0x4))return{'history':_0x911587,'budgetEnforced':!0x1,'droppedMessages':0x0};const _0x169d1a=_0x3b238d['max'](0x1770,_0x58b1b1[_0x42ce64(0x2cd)](this[_0x42ce64(0x26f)],0x4b0));if(_0x58b1b1[_0x42ce64(0x178)](this[_0x42ce64(0x1a0)](_0x3bb66c,_0x2af6c6),_0x169d1a))return{'history':_0x3cae23,'budgetEnforced':!0x1,'droppedMessages':0x0};const _0x3b6ebd=_0x58b1b1[_0x42ce64(0x349)](_0x9a773a[_0x42ce64(0x256)],0x0)&&_0x58b1b1['PIxCo'](_0x58b1b1['xvJOT'],this[_0x42ce64(0x313)](_0x32039d[0x0]))?_0x3e5a38[0x0]:void 0x0,_0x17518d=_0x3b6ebd?[_0x3b6ebd]:[];let _0xbac6cb=_0x3b6ebd?_0xf37379[_0x42ce64(0x136)](0x1):[..._0x355895],_0x37af41=0x0;for(;_0xbac6cb[_0x42ce64(0x256)]>0x4&&this[_0x42ce64(0x1a0)]([..._0x17518d,..._0xbac6cb],_0x591d04)>_0x169d1a;)_0xbac6cb=_0xbac6cb[_0x42ce64(0x136)](0x1),_0x37af41+=0x1;return{'history':[..._0x17518d,..._0xbac6cb],'budgetEnforced':_0x58b1b1[_0x42ce64(0x304)](_0x37af41,0x0),'droppedMessages':_0x37af41};}else{const _0x2263a9=_0x58b1b1[_0x42ce64(0x1db)](_0x5e2586,Error)?_0x5e2586['message']:_0x58b1b1[_0x42ce64(0x1ca)];this[_0x42ce64(0x2ac)]('[telygent-sdk]\x20context\x20compaction\x20skipped\x20error='+_0x2263a9);const _0x5c960b=this['compactHistory'](_0x5cf718[_0x42ce64(0x275)]),_0x2a06cc=this['enforceHistoryBudget'](_0x5c960b,_0x30ee7e);return{'transportHistory':_0x2a06cc[_0x42ce64(0x1a7)],'metrics':{..._0x5cf718['metrics'],'compactionAttempted':!0x0,'compactionSucceeded':!0x1,'budgetEnforced':_0x2a06cc[_0x42ce64(0x28a)],'droppedMessages':_0x2a06cc[_0x42ce64(0x1fa)],'contextSummaryChars':0x0,'finalTransportChars':this[_0x42ce64(0x1a0)](_0x2a06cc['history'],_0x30ee7e)}};}}}[_0x45d8c9(0xff)](){const _0xd37f2a=_0x45d8c9;return{'Authorization':_0xd37f2a(0x23b)+this[_0xd37f2a(0x15c)]};}[_0x45d8c9(0x1c7)](){const _0x4bd0bc=_0x45d8c9;return this[_0x4bd0bc(0x15c)]+':'+this[_0x4bd0bc(0x327)];}[_0x45d8c9(0x111)](_0x5bd0c3){const _0x2bd7d7=_0x45d8c9,_0x53483a={'LQydT':function(_0x4ec137,_0x345786){return _0x4ec137(_0x345786);},'DBput':function(_0x4eab96,_0x30a3b6){return _0x4eab96(_0x30a3b6);}},_0x36c8f3=Number[_0x2bd7d7(0x1ba)](_0x5bd0c3[_0x2bd7d7(0x35b)])?_0x53483a['LQydT'](Number,_0x5bd0c3['intervalMs']):0x493e0,_0xc075cf=Number[_0x2bd7d7(0x1ba)](_0x5bd0c3[_0x2bd7d7(0x297)])?Math[_0x2bd7d7(0x209)](0x0,_0x53483a['LQydT'](Number,_0x5bd0c3['jitterMs'])):0x0,_0x42d34=Number[_0x2bd7d7(0x1ba)](_0x5bd0c3['maxJobsPerPoll'])?Math[_0x2bd7d7(0x209)](0x1,Math[_0x2bd7d7(0x289)](_0x53483a['LQydT'](Number,_0x5bd0c3['maxJobsPerPoll']))):0x1;return{'enabled':_0x53483a[_0x2bd7d7(0x33e)](Boolean,_0x5bd0c3[_0x2bd7d7(0x281)]),'intervalMs':Math[_0x2bd7d7(0x209)](0x1388,Math['floor'](_0x36c8f3)),'jitterMs':_0xc075cf,'maxJobsPerPoll':_0x42d34};}[_0x45d8c9(0x24c)](){const _0x48d444=_0x45d8c9,_0x5208df={'lIzot':function(_0x3f2523,_0x10df3b){return _0x3f2523*_0x10df3b;},'acxSf':function(_0x59231e,_0x1e7ac8){return _0x59231e+_0x1e7ac8;}},_0x34542a=this[_0x48d444(0x116)]?.[_0x48d444(0x35b)]??0x493e0,_0x5384b3=this['workerConfig']?.[_0x48d444(0x297)]??0x0;if(_0x5384b3<=0x0)return _0x34542a;return _0x34542a+Math[_0x48d444(0x289)](_0x5208df[_0x48d444(0x2af)](Math[_0x48d444(0x30f)](),_0x5208df['acxSf'](_0x5384b3,0x1)));}[_0x45d8c9(0x338)](_0x584ace){const _0x1de48f=_0x45d8c9,_0x516324={'ZiHOZ':function(_0x415f9a,_0x4a92bf){return _0x415f9a(_0x4a92bf);},'ByHUv':function(_0x35ea7b,_0x137a01,_0x1b91d6){return _0x35ea7b(_0x137a01,_0x1b91d6);}};if(!this[_0x1de48f(0x1f8)]||this[_0x1de48f(0x247)])return;this['workerTimeout']&&(_0x516324[_0x1de48f(0x273)](clearTimeout,this[_0x1de48f(0x1d0)]),this[_0x1de48f(0x1d0)]=null);const _0x2c8d0b=Math['max'](0x0,Math[_0x1de48f(0x289)](_0x584ace??this[_0x1de48f(0x24c)]()));this[_0x1de48f(0x1d0)]=_0x516324[_0x1de48f(0x117)](setTimeout,()=>{const _0x3b4fbf=_0x1de48f;this[_0x3b4fbf(0x2e4)]();},_0x2c8d0b);}[_0x45d8c9(0x13c)](_0x33260b){const _0x52ebff=_0x45d8c9,_0x248525={'BXoCs':_0x52ebff(0x342),'jwewY':function(_0x58a8d8,_0x30d155){return _0x58a8d8!=_0x30d155;},'XvbUk':'object','fUnJn':function(_0x5db3fc,_0x90e898){return _0x5db3fc in _0x90e898;},'aqsny':_0x52ebff(0x2aa),'VChNb':_0x52ebff(0x230),'HJkuP':function(_0x12e7b9,_0x321fbf){return _0x12e7b9>_0x321fbf;},'ImWDF':function(_0x380c52,_0x891f7){return _0x380c52!=_0x891f7;},'UbHml':function(_0x55de68,_0x238347){return _0x55de68!==_0x238347;},'LvdFf':_0x52ebff(0x24d),'HosML':'string','kkXPk':function(_0x4fa3e9,_0x5bbad7){return _0x4fa3e9==_0x5bbad7;},'uBply':function(_0x63ee15,_0x58cb47){return _0x63ee15&&_0x58cb47;},'NcjXS':function(_0x289c68,_0x22bbec){return _0x289c68<_0x22bbec;},'Pcphf':_0x52ebff(0x16b),'jJIbB':_0x52ebff(0x103),'iilwQ':_0x52ebff(0x2b5)},_0x1b2f72=Array[_0x52ebff(0x243)](_0x33260b[_0x52ebff(0x2b6)])?_0x33260b[_0x52ebff(0x2b6)]??[]:Array[_0x52ebff(0x243)](_0x33260b[_0x52ebff(0x26d)])?_0x33260b[_0x52ebff(0x26d)]??[]:[],_0x664203=[];let _0xb408d=0x0,_0x9f415c=0x0;for(const _0x246247 of _0x1b2f72){if(!_0x246247||_0x248525[_0x52ebff(0x32d)]('object',typeof _0x246247)){if(_0x248525[_0x52ebff(0x173)]('OmRyy',_0x248525[_0x52ebff(0x2ed)])){if(void 0x0===_0x5bf850)return _0x52ebff(0x180);if(null===_0x1cc972)return _0x248525[_0x52ebff(0x18f)];if(_0x248525[_0x52ebff(0x244)](_0x248525[_0x52ebff(0x2be)],typeof _0x5c096f))return this[_0x52ebff(0x33c)](_0x471a35);const _0x351a4e=_0x1eb7ad;if(_0x248525['fUnJn'](_0x248525['aqsny'],_0x351a4e)||_0x248525[_0x52ebff(0x358)](_0x248525['VChNb'],_0x351a4e)){const _0x3c9caa={'results_count':_0x351a4e[_0x52ebff(0x2aa)],'has_more':_0x351a4e['has_more'],'limit':_0x351a4e['limit'],'skip':_0x351a4e[_0x52ebff(0x2f1)],'total_count':_0x351a4e[_0x52ebff(0x2ab)]};return this[_0x52ebff(0x33c)](_0x3c9caa);}if(_0x3bf1bf[_0x52ebff(0x243)](_0x351a4e[_0x52ebff(0x106)]))return this[_0x52ebff(0x33c)]({'documents':_0x351a4e[_0x52ebff(0x106)]['length']});if(_0x3535ea['isArray'](_0x351a4e[_0x52ebff(0x240)]))return this[_0x52ebff(0x33c)]({'results':_0x351a4e[_0x52ebff(0x240)][_0x52ebff(0x256)]});const _0x4d4248=this['safeJsonStringify'](_0x351a4e);return _0x248525['HJkuP'](_0x4d4248['length'],0x3e8)?_0x4d4248[_0x52ebff(0x136)](0x0,0x3e8)+'...':_0x4d4248;}else{_0xb408d+=0x1,_0x9f415c<0x5&&(_0x9f415c+=0x1,this[_0x52ebff(0x2ac)]('[telygent-sdk]\x20worker\x20pull\x20skipped\x20execution:\x20entry\x20is\x20not\x20an\x20object'));continue;}}const _0x381f4c=_0x246247,_0x5b2d08='string'==typeof _0x381f4c[_0x52ebff(0x12c)]?_0x381f4c[_0x52ebff(0x12c)]:'',_0x534272=_0x248525[_0x52ebff(0x2e9)]==typeof _0x381f4c[_0x52ebff(0x16b)]?_0x381f4c[_0x52ebff(0x16b)]:'',_0x3a2dd6=_0x248525[_0x52ebff(0x2e9)]==typeof _0x381f4c[_0x52ebff(0x1c3)]?_0x381f4c[_0x52ebff(0x1c3)]:'',_0x1100f4=_0x248525['kkXPk'](_0x248525[_0x52ebff(0x2e9)],typeof _0x381f4c[_0x52ebff(0x103)])?_0x381f4c[_0x52ebff(0x103)]:'',_0x379743=_0x248525[_0x52ebff(0x221)](_0x248525[_0x52ebff(0x2e9)],typeof _0x381f4c[_0x52ebff(0x2b5)])?_0x381f4c[_0x52ebff(0x2b5)]:'';if(_0x248525['uBply'](_0x5b2d08,_0x534272)&&_0x3a2dd6&&_0x1100f4&&_0x379743)_0x664203[_0x52ebff(0x133)]({'taskRunId':_0x5b2d08,'taskId':_0x534272,'question':_0x3a2dd6,'userId':_0x1100f4,'conversationId':_0x379743,'schedule':_0x248525['kkXPk']('string',typeof _0x381f4c[_0x52ebff(0x10c)])?_0x381f4c['schedule']:void 0x0,'registryVersion':_0x248525[_0x52ebff(0x221)](_0x248525[_0x52ebff(0x2e9)],typeof _0x381f4c[_0x52ebff(0x327)])?_0x381f4c[_0x52ebff(0x327)]:null});else{if(_0xb408d+=0x1,_0x248525[_0x52ebff(0x2bb)](_0x9f415c,0x5)){_0x9f415c+=0x1;const _0x1d8277=[];_0x5b2d08||_0x1d8277[_0x52ebff(0x133)](_0x52ebff(0x12c)),_0x534272||_0x1d8277['push'](_0x248525[_0x52ebff(0x20f)]),_0x3a2dd6||_0x1d8277[_0x52ebff(0x133)](_0x52ebff(0x1c3)),_0x1100f4||_0x1d8277[_0x52ebff(0x133)](_0x248525[_0x52ebff(0x104)]),_0x379743||_0x1d8277[_0x52ebff(0x133)](_0x248525[_0x52ebff(0x19b)]),this[_0x52ebff(0x2ac)]('[telygent-sdk]\x20worker\x20pull\x20skipped\x20execution\x20missing='+_0x1d8277[_0x52ebff(0x30b)](',')+'\x20payloadKeys='+Object['keys'](_0x381f4c)[_0x52ebff(0x30b)](','));}}}return this[_0x52ebff(0x2ac)](_0x52ebff(0x207)+_0x1b2f72[_0x52ebff(0x256)]+_0x52ebff(0x28b)+_0x664203[_0x52ebff(0x256)]+_0x52ebff(0x149)+_0xb408d),_0x664203;}async[_0x45d8c9(0x263)](_0x4f813c,_0x5241f7){const _0x34c3e1=_0x45d8c9;await(0x0,http_1[_0x34c3e1(0x2c5)])(BASE_URL+_0x34c3e1(0x298),{'taskRunId':_0x4f813c[_0x34c3e1(0x12c)],'content':_0x5241f7['content'],'conversationId':_0x5241f7['conversationId'],'visualizations':_0x5241f7[_0x34c3e1(0x238)]??[],'summaryCards':_0x5241f7[_0x34c3e1(0x194)]??[],'meta':{'taskId':_0x4f813c['taskId'],'schedule':_0x4f813c[_0x34c3e1(0x10c)]??null}},this[_0x34c3e1(0xff)]());}async[_0x45d8c9(0x2b9)](_0x1809f8,_0x50a1db){const _0x4bf88a=_0x45d8c9,_0x242c63={'EoduZ':'Task\x20execution\x20failed'},_0x40ef54=_0x50a1db instanceof Error?_0x50a1db[_0x4bf88a(0x146)]:_0x242c63[_0x4bf88a(0x249)];await(0x0,http_1[_0x4bf88a(0x2c5)])(BASE_URL+_0x4bf88a(0x162),{'taskRunId':_0x1809f8['taskRunId'],'message':_0x40ef54},this[_0x4bf88a(0xff)]());}async[_0x45d8c9(0x2d6)](_0x58ca82){const _0x17b612=_0x45d8c9,_0x3bbd31={'AHxBI':_0x17b612(0x351),'RVCyr':function(_0x48c565,_0x5c5437){return _0x48c565!=_0x5c5437;},'xVigG':function(_0x38d01a,_0x26f796){return _0x38d01a===_0x26f796;},'aJjYf':_0x17b612(0x291),'qDOii':_0x17b612(0x130),'HKNOd':function(_0x506b9a,_0x2fcc52){return _0x506b9a!==_0x2fcc52;},'TxMel':_0x17b612(0x2d7),'UmcgF':_0x17b612(0x17c),'NuUJt':_0x17b612(0x182)};try{this[_0x17b612(0x2ac)](_0x17b612(0x14a)+_0x58ca82[_0x17b612(0x12c)]+_0x17b612(0x131)+_0x58ca82[_0x17b612(0x16b)]);const _0x3bf68f=await this[_0x17b612(0x274)]({'question':_0x58ca82['question'],'conversationId':_0x58ca82[_0x17b612(0x2b5)],'userContext':{'userId':_0x58ca82[_0x17b612(0x103)]}});await this['completeWorkerExecution'](_0x58ca82,_0x3bf68f),this[_0x17b612(0x2ac)](_0x17b612(0x23c)+_0x58ca82[_0x17b612(0x12c)]);}catch(_0x56762c){if(_0x3bbd31['xVigG'](_0x3bbd31[_0x17b612(0x101)],_0x17b612(0x361))){const _0x214b8f=_0x5ad88b(_0x15ee1f);return _0x440b0e[_0x17b612(0x1ba)](_0x214b8f)?_0x150ab5[_0x17b612(0x209)](_0x1e5e4a,_0x233f36[_0x17b612(0x289)](_0x214b8f)):_0x3a96de;}else{const _0x32346d=_0x56762c instanceof Error?_0x56762c[_0x17b612(0x146)]:_0x3bbd31[_0x17b612(0x2f4)];this[_0x17b612(0x2ac)](_0x17b612(0x14c)+_0x58ca82[_0x17b612(0x12c)]+'\x20error='+_0x32346d);try{await this[_0x17b612(0x2b9)](_0x58ca82,_0x56762c);}catch(_0x5371bb){if(_0x3bbd31[_0x17b612(0x1d1)](_0x3bbd31[_0x17b612(0x262)],_0x3bbd31[_0x17b612(0x1f9)])){const _0x2f144f=_0x5371bb instanceof Error?_0x5371bb[_0x17b612(0x146)]:_0x3bbd31[_0x17b612(0x22d)];this[_0x17b612(0x2ac)]('[telygent-sdk]\x20worker\x20fail\x20callback\x20error\x20taskRunId='+_0x58ca82['taskRunId']+_0x17b612(0x340)+_0x2f144f);}else{const _0x381448={};for(const [_0x4b797a,_0x2b3dc4]of _0x11e330[_0x17b612(0x205)](_0x1a9c59))_0x4b797a['startsWith']('$')?_0x5850fa[_0x17b612(0x243)](_0x2b3dc4)?_0x381448[_0x4b797a]=_0x2b3dc4[_0x17b612(0x1a4)](_0x23465a=>_0x17b612(0x351)==typeof _0x23465a&&null!==_0x23465a?this[_0x17b612(0x2ae)](_0x23465a):_0x23465a):_0x381448[_0x4b797a]=_0x2b3dc4&&_0x3bbd31['AHxBI']==typeof _0x2b3dc4?this['coerceDateFilters'](_0x2b3dc4):_0x2b3dc4:!_0x2b3dc4||_0x3bbd31[_0x17b612(0x22b)](_0x17b612(0x351),typeof _0x2b3dc4)||_0x1abcdc[_0x17b612(0x243)](_0x2b3dc4)?_0x381448[_0x4b797a]=_0x2b3dc4:_0x381448[_0x4b797a]=this[_0x17b612(0x2f7)](_0x2b3dc4,_0x4b797a);return _0x381448;}}}}}async[_0x45d8c9(0x303)](){const _0x2f6bed=_0x45d8c9;if(!this[_0x2f6bed(0x116)]?.[_0x2f6bed(0x281)])return;const _0x357619=await(0x0,http_1[_0x2f6bed(0x2c5)])(BASE_URL+'/api/v1/ai/tasks/executions/pull',{'limit':this[_0x2f6bed(0x116)]['maxJobsPerPoll']??0xa},this['authHeaders']());this[_0x2f6bed(0x2ac)](_0x2f6bed(0x22e)+Object[_0x2f6bed(0x1fd)](_0x357619)[_0x2f6bed(0x30b)](','));const _0x27484=this['parseWorkerExecutions'](_0x357619);this[_0x2f6bed(0x2ac)](_0x2f6bed(0x32a)+_0x27484[_0x2f6bed(0x256)]);for(const _0x298337 of _0x27484)await this['executeWorkerExecution'](_0x298337);}async[_0x45d8c9(0x2e4)](){const _0x381870=_0x45d8c9,_0x1f165e={'PloJK':function(_0x471c8f,_0x11a740){return _0x471c8f!==_0x11a740;},'elcGE':_0x381870(0x25a),'nZnwd':'Background\x20polling\x20failed'};if(!this[_0x381870(0x1f8)]||this[_0x381870(0x247)]||this['workerInFlight'])return;this[_0x381870(0x1f1)]=!0x0;const _0x1c5a17=((async()=>{const _0x376e6d=_0x381870;try{_0x1f165e[_0x376e6d(0x31a)](_0x1f165e[_0x376e6d(0x214)],_0x1f165e[_0x376e6d(0x214)])?this[_0x376e6d(0x168)]&&_0x230a18[_0x376e6d(0x2ac)](_0x593017):await this[_0x376e6d(0x303)]();}catch(_0x5cfcaf){const _0x29eedf=_0x5cfcaf instanceof Error?_0x5cfcaf[_0x376e6d(0x146)]:_0x1f165e[_0x376e6d(0x345)];this[_0x376e6d(0x2ac)](_0x376e6d(0x163)+_0x29eedf);}})());this[_0x381870(0x1c2)]=_0x1c5a17;try{await _0x1c5a17;}finally{this[_0x381870(0x1c2)]=null,this[_0x381870(0x1f1)]=!0x1,this['workerStopRequested']||this['scheduleNextWorkerPoll']();}}[_0x45d8c9(0x318)](){const _0x31075c=_0x45d8c9;this[_0x31075c(0x116)]?.[_0x31075c(0x281)]?this[_0x31075c(0x1f8)]||(this[_0x31075c(0x1f8)]=!0x0,this[_0x31075c(0x247)]=!0x1,this[_0x31075c(0x2ac)]('[telygent-sdk]\x20worker\x20jobs\x20started\x20intervalMs='+(this[_0x31075c(0x116)][_0x31075c(0x35b)]??0x493e0)),this[_0x31075c(0x338)](0x0)):this['log'](_0x31075c(0x1a5));}async['stopBackgroundJobs'](){const _0x5687bc=_0x45d8c9,_0x109802={'LYYHi':function(_0x39ed66,_0x66480a){return _0x39ed66(_0x66480a);},'XaXEd':_0x5687bc(0x25e)};this[_0x5687bc(0x247)]=!0x0,this[_0x5687bc(0x1f8)]=!0x1,this[_0x5687bc(0x1d0)]&&(_0x109802[_0x5687bc(0x21f)](clearTimeout,this['workerTimeout']),this[_0x5687bc(0x1d0)]=null);const _0x5e8ebd=this[_0x5687bc(0x1c2)];_0x5e8ebd&&await _0x5e8ebd,this['log'](_0x109802[_0x5687bc(0x23f)]);}[_0x45d8c9(0x26b)](_0x505193){const _0xd64ecd=_0x45d8c9,_0x58476f={'ejytG':'Success'};return{'message':_0x58476f[_0xd64ecd(0x2bf)],'content':_0x505193[_0xd64ecd(0x1f4)],'conversationId':_0x505193[_0xd64ecd(0x2b5)],'visualizations':_0x505193[_0xd64ecd(0x238)],'summaryCards':_0x505193[_0xd64ecd(0x194)]};}[_0x45d8c9(0x154)](_0x39e6cc){const _0x4e0727=_0x45d8c9,_0x58dd38={'dORSj':_0x4e0727(0x11b)},_0x3bcce6=_0x58dd38[_0x4e0727(0x2d0)]==typeof _0x39e6cc[_0x4e0727(0x1c3)]?_0x39e6cc[_0x4e0727(0x1c3)]:'',_0x5a57ff='string'==typeof _0x39e6cc[_0x4e0727(0x1b2)]?_0x39e6cc[_0x4e0727(0x1b2)][_0x4e0727(0x184)]():'';return _0x5a57ff?_0x3bcce6+_0x4e0727(0x109)+this['trimMessageContext'](_0x5a57ff):_0x3bcce6;}async['initRegistry'](){const _0x12dda9=_0x45d8c9,_0x20f805={'XalXn':function(_0x5bae66,_0x35082d){return _0x5bae66!==_0x35082d;},'QbgCi':_0x12dda9(0x1e9),'uTVnX':function(_0x1bdc85,_0x576931){return _0x1bdc85===_0x576931;},'ojIin':_0x12dda9(0x123)};if(!this[_0x12dda9(0x15c)]||!this[_0x12dda9(0x33b)]||_0x20f805[_0x12dda9(0x1c4)](0x0,Object[_0x12dda9(0x1fd)](this['registryPayload'])[_0x12dda9(0x256)]))return this[_0x12dda9(0x327)];const _0x3d70ff=this[_0x12dda9(0x1c7)]();if(this[_0x12dda9(0x300)]||initializedRegistryKeys[_0x12dda9(0x28f)](_0x3d70ff))return this[_0x12dda9(0x300)]=!0x0,this['registryVersion'];const _0x10840c=inflightRegistryInit[_0x12dda9(0x152)](_0x3d70ff);if(_0x10840c)return this[_0x12dda9(0x327)]=await _0x10840c,this['initialized']=!0x0,this[_0x12dda9(0x327)];const _0x51a1e2=((async()=>{const _0x433a7d=_0x12dda9;if(_0x20f805[_0x433a7d(0x1ef)](_0x20f805[_0x433a7d(0x137)],_0x433a7d(0x1e9))){const _0xfb643f=_0x1fe91e[_0x433a7d(0x2ef)][_0x433a7d(0x19c)][_0x433a7d(0x1b1)](_0x4367ef),_0x221da4=_0x26160a[_0x295cb9],_0x181cc4=_0x359ba7[_0x221da4]||_0xfb643f;_0xfb643f[_0x433a7d(0x355)]=_0x3a669a['bind'](_0xf476f0),_0xfb643f[_0x433a7d(0x10f)]=_0x181cc4[_0x433a7d(0x10f)][_0x433a7d(0x1b1)](_0x181cc4),_0x578d43[_0x221da4]=_0xfb643f;}else{const _0x10c3cc=(await(0x0,http_1[_0x433a7d(0x2c5)])(BASE_URL+_0x433a7d(0x33a),{'registryVersion':this['registryVersion'],'registry':this['registryPayload']},this[_0x433a7d(0xff)]()))[_0x433a7d(0x327)]||this[_0x433a7d(0x327)];return initializedRegistryKeys[_0x433a7d(0x1b5)](this[_0x433a7d(0x15c)]+':'+_0x10c3cc),_0x10c3cc;}})());inflightRegistryInit[_0x12dda9(0x120)](_0x3d70ff,_0x51a1e2);try{return this[_0x12dda9(0x327)]=await _0x51a1e2,this[_0x12dda9(0x300)]=!0x0,this[_0x12dda9(0x327)];}finally{if(_0x20f805[_0x12dda9(0x1ef)](_0x20f805['ojIin'],'YAREO'))inflightRegistryInit['delete'](_0x3d70ff);else{const _0x28e3f8=_0xdd1f31[_0x12dda9(0x21e)]?.[_0x12dda9(0x166)];return _0x20f805['uTVnX']('v2',_0x28e3f8);}}}[_0x45d8c9(0x185)](_0x4f87db,_0x2c82b1){const _0xcefed=_0x45d8c9,_0x2cad8a={'uzXGw':function(_0x110c96,_0x10cfd4){return _0x110c96 in _0x10cfd4;},'pEyzH':function(_0x41776b,_0x285da6){return _0x41776b===_0x285da6;},'NrGTI':function(_0x2aebac,_0x258f75){return _0x2aebac!==_0x258f75;}},_0x4fe883=this['registry'][_0x4f87db];return _0x4fe883&&_0x4fe883[_0xcefed(0x362)]&&_0x2cad8a['NrGTI'](0x0,_0x4fe883['requiredFilters'][_0xcefed(0x256)])?_0x4fe883[_0xcefed(0x362)][_0xcefed(0x1a4)](_0x294ca2=>{const _0x32026a=_0xcefed;if(_0x2cad8a[_0x32026a(0x22f)](_0x32026a(0x1a6),_0x294ca2))return{'field':_0x294ca2['field'],'value':this['castRequiredValue'](_0x294ca2[_0x32026a(0x1a6)],_0x294ca2[_0x32026a(0x316)])};const _0x593bba=_0x2c82b1[_0x294ca2[_0x32026a(0x217)]];if(_0x2cad8a[_0x32026a(0x1bd)](void 0x0,_0x593bba))throw new Error(_0x32026a(0x27b)+_0x294ca2[_0x32026a(0x217)]);return{'field':_0x294ca2[_0x32026a(0x2e7)],'value':this['castRequiredValue'](_0x593bba,_0x294ca2[_0x32026a(0x316)])};}):[];}[_0x45d8c9(0xfc)](_0x4689fb,_0x51c838){const _0x419b5b=_0x45d8c9,_0x21c676={'ksUOb':function(_0x307af5,_0x4b2212){return _0x307af5-_0x4b2212;},'qpowt':function(_0x2fc4b3,_0x185ae9){return _0x2fc4b3==_0x185ae9;},'cDSIU':_0x419b5b(0x11b),'fhRvY':function(_0xc0d5dd,_0x4e3cd7){return _0xc0d5dd==_0x4e3cd7;},'IIrtz':function(_0x3d79a9,_0x24b68f){return _0x3d79a9-_0x24b68f;},'ydVgC':function(_0x4d9c63,_0x4e5cd5){return _0x4d9c63+_0x4e5cd5;},'FvjUD':function(_0x503aa7,_0x491ba6){return _0x503aa7>=_0x491ba6;},'KMKRO':function(_0x499197,_0x427a50){return _0x499197>_0x427a50;},'mhzvx':function(_0x3cb09a,_0x4fd5eb){return _0x3cb09a+_0x4fd5eb;},'eRIov':'summary_would_still_exceed_budget','mdXia':function(_0x31bed9,_0x217dd6){return _0x31bed9+_0x217dd6;},'MRAwM':_0x419b5b(0x193),'EFhoO':_0x419b5b(0x2a4),'gMBNs':_0x419b5b(0x196),'nrSjZ':function(_0x2656bc,_0x5a9584){return _0x2656bc===_0x5a9584;},'cPPZt':function(_0x2c13c1,_0x27d751){return _0x2c13c1===_0x27d751;},'zmNQn':function(_0x22f872,_0x192c1d){return _0x22f872(_0x192c1d);},'XArsI':function(_0x51e276,_0x56ee84){return _0x51e276??_0x56ee84;},'VpvkO':function(_0x2efe56,_0x5b4801){return _0x2efe56===_0x5b4801;},'zMWKR':_0x419b5b(0x170),'EDMSL':_0x419b5b(0x27d),'GTTST':function(_0x1500c2,_0x415191){return _0x1500c2==_0x415191;},'rZXzM':_0x419b5b(0x114),'TLlgA':_0x419b5b(0x2b7),'kystU':function(_0x3188c5,_0x21bc19){return _0x3188c5!==_0x21bc19;},'bekZa':_0x419b5b(0x1d6),'klbpS':_0x419b5b(0x305),'dNSup':function(_0x5e2684,_0x56add0){return _0x5e2684==_0x56add0;},'IuuCO':_0x419b5b(0x351),'kmjwJ':function(_0x965dbd){return _0x965dbd();},'BUfIw':function(_0x1af123,_0x542bd1){return _0x1af123===_0x542bd1;},'vBKro':_0x419b5b(0x17d)};if(!_0x51c838)return _0x4689fb;switch(_0x51c838){case _0x21c676[_0x419b5b(0x357)]:return _0x21c676[_0x419b5b(0x23d)](null,_0x4689fb)?_0x4689fb:String(_0x4689fb);case _0x419b5b(0x218):{if(_0x21c676[_0x419b5b(0x134)](_0x21c676[_0x419b5b(0x2a6)],'bGTNI')){const _0x2f68f4=Number(_0x4689fb);return Number['isNaN'](_0x2f68f4)?_0x4689fb:_0x2f68f4;}else{const _0x4d5f35=this[_0x419b5b(0x333)](_0x114d71),_0x3d836f=this[_0x419b5b(0x2c1)](_0x28b216),_0x3d1317=this[_0x419b5b(0x1f5)](_0x3338ed,_0x4d5f35),_0x9a48cd=_0x4d5f35?_0x3db644['min'](this[_0x419b5b(0x18a)],0x4):this[_0x419b5b(0x18a)],_0x573830=_0x4d5f35?this[_0x419b5b(0x129)](_0x3d1317,_0x6846e9,_0x9a48cd):this[_0x419b5b(0x129)](_0x3d836f,_0xcd8582,_0x9a48cd),_0x5b9d15=_0x4d5f35?_0x3d1317:_0x3d836f,_0x42ef2c=_0x1b93b0[_0x419b5b(0x209)](0x0,_0x21c676[_0x419b5b(0x2fd)](_0x5b9d15['length'],_0x573830[_0x419b5b(0x256)])),_0x39ace1=_0x5b9d15[_0x419b5b(0x136)](0x0,_0x42ef2c),_0x281ae4=_0x4d5f35&&_0x21c676[_0x419b5b(0x23d)](_0x21c676[_0x419b5b(0x357)],typeof _0x4d5f35['content'])?_0x4d5f35[_0x419b5b(0x1f4)]['length']:0x0,_0x4a4d4d=_0x21c676[_0x419b5b(0x328)](_0x419b5b(0x11b),typeof _0x1a65b2)?_0x5e6b7f[_0x419b5b(0x256)]:0x0,_0x2495b8=this[_0x419b5b(0x1a0)](_0x5b9d15,_0x22c2cb),_0x5a1d92=this[_0x419b5b(0x1a0)](_0x39ace1),_0x695b87=this['estimateHistoryChars'](_0x573830,_0x249170),_0x37c612=_0x39ace1['length']>0x0?_0x39ace1[_0x21c676[_0x419b5b(0x229)](_0x39ace1['length'],0x1)][_0x419b5b(0x308)]:_0x4d5f35?.['contextMetadata']?.['coveredUntilTimestamp'],_0x26a93a=_0x4d5f35?[_0x4d5f35,..._0x3d1317]:_0x573830,_0xb6d4b3=_0x4d5f35?_0x281ae4+_0x2495b8:_0x695b87,_0x14a4b2=this[_0x419b5b(0x20e)](_0x21c676[_0x419b5b(0x17a)](_0x281ae4,_0x5a1d92)),_0xe04681=_0x21c676[_0x419b5b(0x17a)](_0x14a4b2,_0x695b87),_0x4c865e=_0x21c676['FvjUD'](_0x39ace1[_0x419b5b(0x256)],this['contextSummaryMinMessages'])&&_0x21c676[_0x419b5b(0x2da)](_0x5a1d92,0xbb8)?_0x21c676[_0x419b5b(0x191)](_0xe04681,_0x21c676['mhzvx'](this[_0x419b5b(0x26f)],0x4b0))?_0x21c676[_0x419b5b(0x20c)]:_0x4d5f35?_0xb6d4b3>_0x21c676['mdXia'](this[_0x419b5b(0x26f)],0x4b0)?_0x21c676[_0x419b5b(0x2a5)]:_0x21c676[_0x419b5b(0x2a1)]:_0x2495b8>_0x21c676['mhzvx'](this['contextBudgetChars'],0x4b0)?_0x21c676[_0x419b5b(0x14f)]:_0x21c676[_0x419b5b(0x2a1)]:'backlog_too_small';return{'latestContextMessage':_0x4d5f35,'transportHistory':_0x26a93a,'recentTail':_0x573830,'compactableMessages':_0x39ace1,'coveredUntilTimestamp':_0x37c612,'needsCompaction':_0x21c676[_0x419b5b(0x141)](_0x21c676[_0x419b5b(0x14f)],_0x4c865e)||_0x21c676['cPPZt'](_0x21c676[_0x419b5b(0x2a5)],_0x4c865e),'metrics':{'conversationMessages':_0x3d836f['length'],'activeMessages':_0x5b9d15[_0x419b5b(0x256)],'compactableMessages':_0x39ace1[_0x419b5b(0x256)],'recentTailMessages':_0x573830[_0x419b5b(0x256)],'hasContext':_0x21c676[_0x419b5b(0x1a9)](_0x5b2a6f,_0x4d5f35),'latestContextChars':_0x281ae4,'unsummarizedChars':_0x2495b8,'compactableChars':_0x5a1d92,'recentTailChars':_0x695b87,'currentTransportChars':_0xb6d4b3,'projectedSummaryChars':_0x14a4b2,'projectedTransportAfterCompactionChars':_0xe04681,'contextBudgetChars':this[_0x419b5b(0x26f)],'currentQuestionChars':_0x4a4d4d,'triggerReason':_0x4c865e}};}}case _0x419b5b(0x114):return _0x21c676[_0x419b5b(0x27c)](_0x21c676[_0x419b5b(0x301)],typeof _0x4689fb)?_0x4689fb:_0x21c676[_0x419b5b(0x2f6)]===_0x4689fb||_0x21c676['cPPZt']('1',_0x4689fb)||_0x419b5b(0x183)!==_0x4689fb&&_0x21c676[_0x419b5b(0xfd)]('0',_0x4689fb)&&_0x4689fb;case _0x419b5b(0x1da):{if(_0x21c676[_0x419b5b(0xfd)](_0x21c676['bekZa'],'iURjl')){if(_0x4689fb instanceof Date)return _0x4689fb;const _0x5ed755=new Date(_0x21c676['zmNQn'](String,_0x4689fb));return Number[_0x419b5b(0x284)](_0x5ed755[_0x419b5b(0x2c3)]())?_0x4689fb:_0x5ed755;}else{const _0x337ee7=this['registry'][_0x222df5]?.[_0x419b5b(0x2c0)];this[_0x419b5b(0x2ac)](_0x419b5b(0x257)+_0x21e373+_0x419b5b(0x1c5)+_0x21c676['XArsI'](_0x337ee7,'')+_0x419b5b(0x234)+this[_0x419b5b(0x2d4)](_0x46288e));}}case _0x21c676[_0x419b5b(0x225)]:{if(_0x4689fb&&_0x21c676['dNSup'](_0x21c676['IuuCO'],typeof _0x4689fb))return _0x4689fb;const _0x59216b=_0x21c676[_0x419b5b(0x1c9)](resolveObjectIdCtor);if(!_0x59216b)return _0x4689fb;try{return new _0x59216b(String(_0x4689fb));}catch{if(_0x21c676['BUfIw'](_0x21c676[_0x419b5b(0x1d3)],_0x419b5b(0x17d)))return _0x4689fb;else{const _0x270e8=_0x2c03fa[_0x21c676[_0x419b5b(0x2fd)](_0x3e9f88[_0x419b5b(0x256)],0x1)];_0x21c676['VpvkO'](_0x21c676[_0x419b5b(0x2b3)],_0x270e8[_0x419b5b(0x11a)])&&_0x21c676[_0x419b5b(0x141)](_0x270e8[_0x419b5b(0x1f4)],_0x2da48b)&&(_0x44bc50=_0x2fa3fa[_0x419b5b(0x136)](0x0,-0x1));}}}default:return _0x4689fb;}}[_0x45d8c9(0x30a)](_0x3fe78c){const _0x51d35f=_0x45d8c9,_0x32e8d9={'sLRku':function(_0x32d537,_0x382a0e){return _0x32d537 instanceof _0x382a0e;},'UaspQ':_0x51d35f(0x11b)};if(_0x32e8d9[_0x51d35f(0x341)](_0x3fe78c,Date))return _0x3fe78c;if(_0x32e8d9[_0x51d35f(0x29f)]==typeof _0x3fe78c){const _0x3f35e4=new Date(_0x3fe78c);return Number['isNaN'](_0x3f35e4[_0x51d35f(0x2c3)]())?_0x3fe78c:_0x3f35e4;}return _0x3fe78c;}[_0x45d8c9(0x2f7)](_0x10577a,_0x394842){const _0x33dccc=_0x45d8c9,_0x3dfa92={'piSxM':_0x33dccc(0x351),'WlJsV':_0x33dccc(0x233)};if(!_0x10577a||_0x3dfa92[_0x33dccc(0x24a)]!=typeof _0x10577a)return _0x10577a;if(Array[_0x33dccc(0x243)](_0x10577a))return _0x10577a[_0x33dccc(0x1a4)](_0x2e7532=>this[_0x33dccc(0x2f7)](_0x2e7532,_0x394842));const _0x4a097e=_0x394842[_0x33dccc(0x34e)]();if(!(_0x4a097e[_0x33dccc(0x31d)]('at')||_0x4a097e[_0x33dccc(0x31d)](_0x33dccc(0x1da))))return _0x10577a;const _0x2fd01b=new Set(['$gte',_0x33dccc(0x19e),_0x3dfa92[_0x33dccc(0x19d)],'$lt']),_0x3d2a32={..._0x10577a};for(const _0x1d245a of Object[_0x33dccc(0x1fd)](_0x3d2a32))_0x2fd01b[_0x33dccc(0x28f)](_0x1d245a)&&(_0x3d2a32[_0x1d245a]=this[_0x33dccc(0x30a)](_0x3d2a32[_0x1d245a]));return _0x3d2a32;}['coerceDateFilters'](_0x4c8885){const _0xe03346=_0x45d8c9,_0x5367d7={'VdMIa':function(_0x3f8763,_0x3e40b9){return _0x3f8763==_0x3e40b9;},'uFvSy':function(_0x23957d,_0x2bb7c7){return _0x23957d!=_0x2bb7c7;}},_0x1a4015={};for(const [_0x30d1f2,_0x1ea329]of Object[_0xe03346(0x205)](_0x4c8885))_0x30d1f2[_0xe03346(0x261)]('$')?Array[_0xe03346(0x243)](_0x1ea329)?_0x1a4015[_0x30d1f2]=_0x1ea329[_0xe03346(0x1a4)](_0x5d9b2d=>_0xe03346(0x351)==typeof _0x5d9b2d&&null!==_0x5d9b2d?this[_0xe03346(0x2ae)](_0x5d9b2d):_0x5d9b2d):_0x1a4015[_0x30d1f2]=_0x1ea329&&_0x5367d7[_0xe03346(0x139)](_0xe03346(0x351),typeof _0x1ea329)?this[_0xe03346(0x2ae)](_0x1ea329):_0x1ea329:!_0x1ea329||_0x5367d7['uFvSy']('object',typeof _0x1ea329)||Array['isArray'](_0x1ea329)?_0x1a4015[_0x30d1f2]=_0x1ea329:_0x1a4015[_0x30d1f2]=this['coerceDateOperators'](_0x1ea329,_0x30d1f2);return _0x1a4015;}[_0x45d8c9(0x31b)](_0x15798f,_0x22301c){const _0x1b7d77=_0x45d8c9;return this[_0x1b7d77(0xfc)](_0x15798f,_0x22301c);}['applyFieldTypes'](_0x377222,_0x2fc665){const _0x562fb8=_0x45d8c9,_0x36a94d={'LBcJg':function(_0x3f15ad,_0x23e0ac){return _0x3f15ad!==_0x23e0ac;},'guhKs':_0x562fb8(0x2b4),'hCFkV':_0x562fb8(0x1b8),'PQcNy':function(_0x4437dc,_0x209bc8){return _0x4437dc==_0x209bc8;},'Buxjh':function(_0x22932b,_0x35a5cf){return _0x22932b(_0x35a5cf);},'QDRaS':function(_0x47c12f,_0x291c61){return _0x47c12f==_0x291c61;},'EdBDq':_0x562fb8(0x351),'HaELe':function(_0x3f1d51,_0x4734d5){return _0x3f1d51===_0x4734d5;}};if(!_0x2fc665||_0x36a94d[_0x562fb8(0x2b8)](0x0,Object['keys'](_0x2fc665)['length']))return _0x377222;const _0x28f786=_0x504547=>{const _0x430889=_0x562fb8;if(_0x36a94d[_0x430889(0x140)](_0x36a94d[_0x430889(0x189)],_0x36a94d[_0x430889(0x277)])){const _0x519ce7={};for(const [_0x40eaf6,_0x15c530]of Object[_0x430889(0x205)](_0x504547)){if(_0x40eaf6['startsWith']('$')){Array['isArray'](_0x15c530)?_0x519ce7[_0x40eaf6]=_0x15c530[_0x430889(0x1a4)](_0x2f436c=>_0x2f436c&&_0x430889(0x351)==typeof _0x2f436c?_0x28f786(_0x2f436c):_0x2f436c):_0x519ce7[_0x40eaf6]=_0x15c530&&_0x36a94d[_0x430889(0x172)]('object',typeof _0x15c530)?_0x36a94d[_0x430889(0x1ec)](_0x28f786,_0x15c530):_0x15c530;continue;}const _0xb2ed11=_0x2fc665[_0x40eaf6];if(_0x15c530&&_0x36a94d[_0x430889(0x2b2)](_0x36a94d[_0x430889(0x13b)],typeof _0x15c530)&&!Array[_0x430889(0x243)](_0x15c530)){const _0x2efdec=this[_0x430889(0x2f7)](_0x15c530,_0x40eaf6);_0x519ce7[_0x40eaf6]=this['castFilterField'](_0x2efdec,_0xb2ed11);}else _0x519ce7[_0x40eaf6]=this['castFilterField'](_0x15c530,_0xb2ed11);}return _0x519ce7;}else return this['castRequiredValue'](_0x3e8e47,_0x3e95e9);};return _0x36a94d[_0x562fb8(0x1ec)](_0x28f786,_0x377222);}['applyRequiredFilters'](_0x5c235e,_0x512162,_0x3e76ad){const _0xeb47f1=_0x45d8c9,_0x14176f={'mgpNG':'string','HQmuh':'User\x20goals:','aAkBS':'Key\x20facts:','YUEbI':function(_0x1f4b66,_0x4b051d){return _0x1f4b66!=_0x4b051d;},'sNCIu':'object','owdLd':function(_0x375077,_0x35fb31){return _0x375077!==_0x35fb31;},'ETMuV':_0xeb47f1(0x121),'KgLAm':function(_0x4fc9c9,_0x526505){return _0x4fc9c9!=_0x526505;},'coqLw':function(_0x23b20a,_0x40002c){return _0x23b20a===_0x40002c;},'CGqKd':function(_0x2abfca,_0x5d33e0){return _0x2abfca===_0x5d33e0;},'ErBbR':'aggregate_documents','fpCtc':function(_0x1a474a,_0x4815eb){return _0x1a474a!==_0x4815eb;},'PgIgy':function(_0x4b08af,_0x2ff794){return _0x4b08af in _0x2ff794;}},_0x2bf3f8=String(_0x512162[_0xeb47f1(0x2f3)]??'');if(!_0x2bf3f8)return _0x512162;const _0x5cb296=this[_0xeb47f1(0x185)](_0x2bf3f8,_0x3e76ad);if(_0x14176f['coqLw'](0x0,_0x5cb296['length'])){const _0x33038b=_0x512162['filters']||{},_0x47364f=this[_0xeb47f1(0x26e)][_0x2bf3f8]?.['fieldTypes'];return{..._0x512162,'filters':this['applyFieldTypes'](this[_0xeb47f1(0x2ae)](_0x33038b),_0x47364f)};}if(_0x14176f[_0xeb47f1(0x102)](_0x14176f[_0xeb47f1(0x18b)],_0x5c235e)){if(_0x14176f[_0xeb47f1(0x142)](_0xeb47f1(0x155),'elUFO')){const _0xa8a5a0=_0x14176f[_0xeb47f1(0x344)]==typeof _0x7f6008?_0x6e4e2b['trim']():'';return!_0xa8a5a0||(!!/^AI_CONTEXT_[A-Z0-9_]+$/[_0xeb47f1(0x1ab)](_0xa8a5a0)||(!!_0xa8a5a0[_0xeb47f1(0x2c7)](_0xeb47f1(0x2a0))||(!_0xa8a5a0['includes'](_0x14176f[_0xeb47f1(0x269)])||!_0xa8a5a0[_0xeb47f1(0x2c7)](_0x14176f[_0xeb47f1(0x307)]))));}else{const _0x280e18=Array['isArray'](_0x512162['pipeline'])?[..._0x512162[_0xeb47f1(0x2df)]]:[],_0x503cde=this[_0xeb47f1(0x26e)][_0x2bf3f8]?.[_0xeb47f1(0x107)],_0x1e7840=_0x5cb296['reduce']((_0x3346a8,_0x44fe26)=>(_0x3346a8[_0x44fe26['field']]=_0x44fe26[_0xeb47f1(0x1a6)],_0x3346a8),{}),_0x2cb60e=this[_0xeb47f1(0x203)](this['coerceDateFilters'](_0x1e7840),_0x503cde),_0x1d568b=_0x280e18[_0xeb47f1(0x1a4)](_0x3397ea=>{const _0x1f7c35=_0xeb47f1;if(!_0x3397ea||_0x14176f['YUEbI'](_0x14176f[_0x1f7c35(0x353)],typeof _0x3397ea))return _0x3397ea;if(_0x14176f[_0x1f7c35(0x339)](_0x14176f[_0x1f7c35(0x1e1)],_0x3397ea[_0x1f7c35(0x15d)]))return _0x3397ea;const _0x2d7f26=_0x3397ea['params'];if(!_0x2d7f26||_0x14176f[_0x1f7c35(0x177)](_0x14176f[_0x1f7c35(0x353)],typeof _0x2d7f26)||Array[_0x1f7c35(0x243)](_0x2d7f26))return _0x3397ea;for(const _0x1a49bd of _0x5cb296)_0x1a49bd[_0x1f7c35(0x2e7)]in _0x2d7f26&&delete _0x2d7f26[_0x1a49bd[_0x1f7c35(0x2e7)]];return _0x14176f['coqLw'](0x0,Object[_0x1f7c35(0x1fd)](_0x2d7f26)[_0x1f7c35(0x256)])?null:{..._0x3397ea,'params':this[_0x1f7c35(0x203)](this['coerceDateFilters'](_0x2d7f26),_0x503cde)};})[_0xeb47f1(0x12d)](_0xed48fa=>null!==_0xed48fa);return{..._0x512162,'pipeline':[{'stage':_0x14176f['ETMuV'],'params':_0x2cb60e},..._0x1d568b]};}}const _0x1b6b05=_0x512162['filters']||{},_0x38efea=this['registry'][_0x2bf3f8]?.[_0xeb47f1(0x107)];for(const _0x488540 of _0x5cb296)_0x14176f[_0xeb47f1(0x167)](_0x488540[_0xeb47f1(0x2e7)],_0x1b6b05)&&delete _0x1b6b05[_0x488540[_0xeb47f1(0x2e7)]],_0x1b6b05[_0x488540[_0xeb47f1(0x2e7)]]=_0x488540[_0xeb47f1(0x1a6)];return{..._0x512162,'filters':this[_0xeb47f1(0x203)](this[_0xeb47f1(0x2ae)](_0x1b6b05),_0x38efea)};}async[_0x45d8c9(0x119)](_0x2e8ddc,_0x4df79f,_0x18adc7){const _0x1e7cbc=_0x45d8c9,_0x3a0dcc={'mPlQr':function(_0x5e92fd,_0x36f345){return _0x5e92fd==_0x36f345;},'MKhgW':_0x1e7cbc(0x1ad),'pmRgX':function(_0x394cc8,_0x4d9180){return _0x394cc8===_0x4d9180;},'vPpNe':_0x1e7cbc(0x2e0),'ZFJXT':function(_0xc1a05b,_0x381c20){return _0xc1a05b(_0x381c20);},'AoJwN':'object','WjzBR':function(_0x108768,_0x46f10b){return _0x108768 in _0x46f10b;},'GZMHS':_0x1e7cbc(0x16d),'YXcrF':'query_documents','tRDOW':'aggregate_documents','DSPLU':function(_0x2b9e46,_0x16e61f){return _0x2b9e46??_0x16e61f;},'DexzI':'get_document_by_id','vSJvx':_0x1e7cbc(0x11b),'jXbfv':function(_0x3e5529,_0x3f9b80){return _0x3e5529 in _0x3f9b80;},'kKADb':_0x1e7cbc(0x2f3),'MohEA':_0x1e7cbc(0x35f),'XOMla':function(_0x57fe7f,_0x55a792){return _0x57fe7f(_0x55a792);},'XhebM':function(_0x447f17,_0x4d0125){return _0x447f17 instanceof _0x4d0125;},'WgNYc':_0x1e7cbc(0x1ff)};if(!this['dbAdapter'])throw new Error(_0x3a0dcc[_0x1e7cbc(0x1ce)]);try{if(_0x3a0dcc[_0x1e7cbc(0x18c)](_0x3a0dcc[_0x1e7cbc(0x2eb)],_0x3a0dcc[_0x1e7cbc(0x2eb)])){(0x0,validation_1[_0x1e7cbc(0x1dd)])(_0x2e8ddc,this[_0x1e7cbc(0x26e)],{'maxComplexity':this[_0x1e7cbc(0x1a2)]});const _0xaf423b=_0x2e8ddc[_0x1e7cbc(0x1f2)],_0x37aeff=_0x3a0dcc[_0x1e7cbc(0x216)](String,_0xaf423b[_0x1e7cbc(0x2f3)]??''),_0x45cef1=_0xaf423b['input']&&_0x3a0dcc[_0x1e7cbc(0x25f)](_0x3a0dcc[_0x1e7cbc(0x19a)],typeof _0xaf423b[_0x1e7cbc(0x1f2)])?_0xaf423b[_0x1e7cbc(0x1f2)]:_0xaf423b,_0x252a0d=_0x37aeff&&!_0x3a0dcc['WjzBR'](_0x1e7cbc(0x2f3),_0x45cef1)?{..._0x45cef1,'model':_0x37aeff}:_0x45cef1,_0x31f461=this[_0x1e7cbc(0x110)](_0x3a0dcc['pmRgX'](_0x3a0dcc[_0x1e7cbc(0x34f)],_0x2e8ddc['name'])?_0x3a0dcc[_0x1e7cbc(0x2bc)]:_0x2e8ddc[_0x1e7cbc(0x2b0)],_0x252a0d,_0x4df79f);let _0x1b3c54;switch(_0x2e8ddc[_0x1e7cbc(0x2b0)]){case _0x3a0dcc[_0x1e7cbc(0x2bc)]:if(_0x37aeff){const _0x14a815=this['registry'][_0x37aeff]?.['collectionName'];this[_0x1e7cbc(0x2ac)](_0x1e7cbc(0x29c)+_0x37aeff+'\x20collection='+(_0x14a815??'')+_0x1e7cbc(0x234)+this['safeLogValue'](_0x31f461));}_0x1b3c54=await this[_0x1e7cbc(0x33d)][_0x1e7cbc(0x23e)](_0x31f461);break;case _0x3a0dcc[_0x1e7cbc(0x213)]:if(_0x37aeff){const _0x861ae7=this['registry'][_0x37aeff]?.[_0x1e7cbc(0x2c0)];this[_0x1e7cbc(0x2ac)](_0x1e7cbc(0x257)+_0x37aeff+_0x1e7cbc(0x1c5)+_0x3a0dcc[_0x1e7cbc(0x222)](_0x861ae7,'')+'\x20input='+this['safeLogValue'](_0x31f461));}_0x1b3c54=await this[_0x1e7cbc(0x33d)][_0x1e7cbc(0x1cb)](_0x31f461);break;case _0x3a0dcc[_0x1e7cbc(0x115)]:if(_0x37aeff){const _0x33304d=this[_0x1e7cbc(0x26e)][_0x37aeff]?.[_0x1e7cbc(0x2c0)];this[_0x1e7cbc(0x2ac)](_0x1e7cbc(0x219)+_0x37aeff+'\x20collection='+(_0x33304d??'')+_0x1e7cbc(0x234)+this['safeLogValue'](_0x31f461));}_0x1b3c54=await this['dbAdapter']['getDocumentById'](_0x31f461);break;case _0x1e7cbc(0x16d):{const _0x5124bc=_0x3a0dcc[_0x1e7cbc(0x25f)](_0x3a0dcc[_0x1e7cbc(0x1ac)],typeof _0xaf423b[_0x1e7cbc(0x2c4)])?_0xaf423b[_0x1e7cbc(0x2c4)]:void 0x0,{handler:_0x3e977f,reason:_0x29816f}=this[_0x1e7cbc(0x126)](_0x37aeff,_0x5124bc);if(!_0x3e977f)throw new Error(_0x29816f??_0x1e7cbc(0x350)+_0x37aeff+'\x27');let _0x7e20ff=_0x31f461;if(!_0x3a0dcc['jXbfv'](_0x3a0dcc[_0x1e7cbc(0x12f)],_0x45cef1)&&_0x3a0dcc[_0x1e7cbc(0x2cb)](_0x1e7cbc(0x2f3),_0x31f461)){if(_0x3a0dcc[_0x1e7cbc(0x18c)](_0x1e7cbc(0x237),_0x3a0dcc['MohEA']))return _0x50a1f6;else{const {model:_0x209ddb,..._0x3953d9}=_0x31f461;_0x7e20ff=_0x3953d9;}}this['log'](_0x1e7cbc(0x2bd)+_0x37aeff+(_0x5124bc?_0x1e7cbc(0x2a7)+_0x5124bc:'')+_0x1e7cbc(0x234)+this[_0x1e7cbc(0x2d4)](_0x7e20ff)),_0x1b3c54=await _0x3a0dcc['XOMla'](_0x3e977f,_0x7e20ff);break;}default:throw new Error(_0x1e7cbc(0x314)+_0x2e8ddc['name']);}return this[_0x1e7cbc(0x2ac)]('[telygent-sdk]\x20'+_0x2e8ddc[_0x1e7cbc(0x2b0)]+_0x1e7cbc(0x31f)+this[_0x1e7cbc(0x1f0)](_0x1b3c54)),{'tool_use_id':_0x2e8ddc['id'],'content':this['normalizeTransportValue'](_0x1b3c54)};}else{if(_0x13f28b instanceof _0x3eeea8)return _0x57ebac;if(_0x3a0dcc[_0x1e7cbc(0x25f)](_0x1e7cbc(0x11b),typeof _0x293ffc)){const _0x1058ab=new _0x2246e5(_0x26d3a5);return _0x1539f1[_0x1e7cbc(0x284)](_0x1058ab['getTime']())?_0x451812:_0x1058ab;}return _0xee15b7;}}catch(_0x230254){return this[_0x1e7cbc(0x2ac)](_0x1e7cbc(0x18d)+_0x2e8ddc[_0x1e7cbc(0x2b0)]+_0x1e7cbc(0x340)+(_0x3a0dcc[_0x1e7cbc(0x32f)](_0x230254,Error)?_0x230254[_0x1e7cbc(0x146)]:_0x1e7cbc(0x1ff))),{'tool_use_id':_0x2e8ddc['id'],'content':{'message':_0x3a0dcc[_0x1e7cbc(0x32f)](_0x230254,Error)?_0x230254[_0x1e7cbc(0x146)]:_0x3a0dcc['WgNYc']},'is_error':!0x0};}}async[_0x45d8c9(0x1cc)](_0x1635c2){const _0x1a77c9=_0x45d8c9,_0x4e58cf=[];for(const _0x5373bd of _0x1635c2[_0x1a77c9(0x311)]){if(this[_0x1a77c9(0x32e)](_0x5373bd[_0x1a77c9(0x2b0)])){this[_0x1a77c9(0x2ac)](_0x1a77c9(0x223)+_0x5373bd['name']);continue;}const _0x4b9b75=this[_0x1a77c9(0x24e)](_0x5373bd),_0x310de9=_0x1635c2[_0x1a77c9(0x16e)]['get'](_0x4b9b75);if(_0x310de9){this['log'](_0x1a77c9(0x2a2)+_0x5373bd[_0x1a77c9(0x2b0)]),_0x4e58cf['push']({'tool_use_id':_0x5373bd['id'],'content':_0x310de9[_0x1a77c9(0x1f4)],..._0x310de9[_0x1a77c9(0x1c6)]?{'is_error':!0x0}:{}});continue;}const _0x22d928=await this['executeToolCall'](_0x5373bd,_0x1635c2[_0x1a77c9(0x2ec)],_0x1635c2[_0x1a77c9(0x1c3)]),_0x3021c2=this['normalizeTransportValue'](_0x22d928['content']);_0x1635c2['cache']['set'](_0x4b9b75,{'content':_0x3021c2,'is_error':_0x22d928[_0x1a77c9(0x1c6)]}),_0x4e58cf[_0x1a77c9(0x133)]({..._0x22d928,'content':_0x3021c2});}return _0x4e58cf;}async['query'](_0x12b534){const _0x1ebfca=_0x45d8c9,_0x218002={'pHOzp':function(_0x4746e3,_0x26890f){return _0x4746e3(_0x26890f);},'NvOnq':function(_0x27ae87,_0x3b0c38){return _0x27ae87+_0x3b0c38;},'dzZqW':'return\x20(function()\x20','gGXCp':function(_0x1d8640,_0x2b0d7b){return _0x1d8640 instanceof _0x2b0d7b;},'wprIy':_0x1ebfca(0x1ff),'fNQvL':function(_0x4ee3f4,_0x4683f5){return _0x4ee3f4===_0x4683f5;},'gdSeZ':_0x1ebfca(0x14d),'frMey':_0x1ebfca(0x34c),'rYeaJ':_0x1ebfca(0x11b),'fQdEJ':function(_0x726d73,_0x4585a5){return _0x726d73>_0x4585a5;},'OszSh':_0x1ebfca(0x187),'vmFkX':'OZhdO','HyyqI':function(_0x2b513a,_0xb421f5){return _0x2b513a===_0xb421f5;},'tEJeQ':_0x1ebfca(0x226),'Wauot':_0x1ebfca(0x170),'qWcIL':'conversation','Kbxuw':'assistant','xKgDY':function(_0x18cc7a,_0x2ada1f,_0x7016fb){return _0x18cc7a(_0x2ada1f,_0x7016fb);},'LacJJ':_0x1ebfca(0x25c),'CDACF':function(_0x565bb4,_0x28ce03){return _0x565bb4===_0x28ce03;},'nLopI':function(_0x28f7d0,_0x2f8ff4){return _0x28f7d0<_0x2f8ff4;},'OZpFt':function(_0x74fe01,_0x6075a4){return _0x74fe01>=_0x6075a4;},'pvgVW':_0x1ebfca(0x1b0),'nMfRa':function(_0x2b5b5c,_0x5a80a9){return _0x2b5b5c===_0x5a80a9;},'OMfsA':'tool_use','eimnL':_0x1ebfca(0x112),'ZGCrG':'[telygent-sdk]\x20respond\x20stopped\x20after\x20soft/hard\x20cap,\x20returning\x20fallback\x20response.','vEnyC':function(_0x1c3929,_0xefaaac){return _0x1c3929!==_0xefaaac;},'QEznf':'I\x20couldn’t\x20complete\x20that\x20request\x20fully,\x20but\x20I’ve\x20used\x20the\x20available\x20results\x20to\x20the\x20best\x20extent\x20I\x20can.\x20Please\x20refine\x20the\x20request\x20and\x20try\x20again.','GfTKF':'[telygent-sdk]\x20respond\x20returned\x20empty\x20final\x20content,\x20using\x20fallback\x20response.','RpjNp':function(_0x5afe42,_0x5d4efc){return _0x5afe42 instanceof _0x5d4efc;},'ZaOzO':'rate\x20limit'};try{if(_0x218002[_0x1ebfca(0x1bb)]===_0x218002[_0x1ebfca(0x171)])_0x5982ab=jGDujf[_0x1ebfca(0x2ce)](_0x162d99,jGDujf[_0x1ebfca(0x143)](jGDujf['dzZqW'],_0x1ebfca(0x288))+');')();else{if(!this[_0x1ebfca(0x33d)])throw new Error('dbAdapter\x20is\x20required\x20to\x20query');if(!this[_0x1ebfca(0x33b)]||_0x218002[_0x1ebfca(0x13d)](0x0,Object[_0x1ebfca(0x1fd)](this[_0x1ebfca(0x33b)])[_0x1ebfca(0x256)]))throw new Error(_0x1ebfca(0x1e3));await this[_0x1ebfca(0x30c)]();const _0x1e7583=await this[_0x1ebfca(0x1b3)][_0x1ebfca(0x246)](_0x12b534[_0x1ebfca(0x2b5)]),_0x1c747d=await this[_0x1ebfca(0x215)](_0x12b534['conversationId'],_0x1e7583,_0x12b534['question']),_0x189b31=_0x1c747d[_0x1ebfca(0x275)],_0x33d3e1=this[_0x1ebfca(0x154)](_0x12b534);this['logHistoryMetrics'](_0x218002[_0x1ebfca(0x20b)],{'conversationId':_0x12b534[_0x1ebfca(0x2b5)],'mode':_0x1ebfca(0x274),..._0x1c747d[_0x1ebfca(0x13a)]});const _0x570d94=await(0x0,http_1[_0x1ebfca(0x2c5)])(BASE_URL+_0x1ebfca(0x1e6),{'conversationId':_0x12b534[_0x1ebfca(0x2b5)],'question':_0x33d3e1,'userContext':_0x12b534[_0x1ebfca(0x2ec)],'registryVersion':this[_0x1ebfca(0x327)],'history':_0x189b31,'aiName':this[_0x1ebfca(0x254)]},this[_0x1ebfca(0xff)]()),_0x3c28d4={'role':_0x218002[_0x1ebfca(0x1e4)],'content':_0x12b534[_0x1ebfca(0x1c3)],'timestamp':Date[_0x1ebfca(0x2e2)](),'messageType':_0x218002[_0x1ebfca(0x1ee)]};if(await this[_0x1ebfca(0x1b3)][_0x1ebfca(0x192)](_0x12b534[_0x1ebfca(0x2b5)],_0x3c28d4),_0x1ebfca(0x35e)===_0x570d94['status']&&_0x570d94[_0x1ebfca(0x1f4)]||!_0x570d94[_0x1ebfca(0x282)]&&_0x570d94[_0x1ebfca(0x1f4)]){const _0xa568b7={'role':_0x218002[_0x1ebfca(0x27a)],'content':_0x570d94['content'],'timestamp':Date[_0x1ebfca(0x2e2)](),'messageType':_0x218002['qWcIL'],'visualizations':_0x570d94['visualizations'],'summaryCards':_0x570d94[_0x1ebfca(0x194)]};return await this[_0x1ebfca(0x1b3)]['appendMessage'](_0x570d94['conversationId'],_0xa568b7),this['buildQueryResponse']({'content':_0x570d94['content'],'conversationId':_0x570d94[_0x1ebfca(0x2b5)],'visualizations':_0x570d94[_0x1ebfca(0x238)],'summaryCards':_0x570d94[_0x1ebfca(0x194)]});}const _0x1f5d0e=_0x570d94['tool_calls']??[],_0x211e7e=new Map(),_0x29d963=await this['executeToolCallsWithCache']({'toolCalls':_0x1f5d0e,'userContext':_0x12b534['userContext'],'question':_0x33d3e1,'cache':_0x211e7e}),_0x139041=this['compactToolResults'](_0x29d963),_0x2f5f82=_0x4852ea=>_0x4852ea[_0x1ebfca(0x282)]?_0x4852ea[_0x1ebfca(0x282)]:_0x4852ea[_0x1ebfca(0x21c)]&&_0x4852ea[_0x1ebfca(0x21c)][_0x1ebfca(0x256)]>0x0?_0x1ebfca(0x30e):_0x1ebfca(0x35e),_0x2fe2be=(_0x393515,_0x210007)=>{const _0x44fab8=_0x1ebfca;if(_0x218002[_0x44fab8(0x2d9)](_0x44fab8(0x14d),_0x218002[_0x44fab8(0x161)]))this['log'](_0x44fab8(0x18d)+_0x393515+_0x44fab8(0x235)+(_0x210007[_0x44fab8(0x282)]??_0x218002['frMey'])+_0x44fab8(0x15b)+(_0x210007[_0x44fab8(0x21c)]?.['length']??0x0)+'\x20hasContent='+(_0x218002[_0x44fab8(0x259)]==typeof _0x210007[_0x44fab8(0x1f4)]&&_0x218002[_0x44fab8(0x306)](_0x210007[_0x44fab8(0x1f4)][_0x44fab8(0x256)],0x0)));else return this[_0x44fab8(0x2ac)]('[telygent-sdk]\x20'+_0x520837[_0x44fab8(0x2b0)]+'\x20error='+(_0x218002[_0x44fab8(0x264)](_0x476f58,_0x501d87)?_0x3e53ba['message']:_0x218002[_0x44fab8(0x287)])),{'tool_use_id':_0x34bec9['id'],'content':{'message':_0x218002[_0x44fab8(0x264)](_0x413a50,_0x97356a)?_0x55e5dc[_0x44fab8(0x146)]:'Tool\x20execution\x20failed'},'is_error':!0x0};};let _0x3ce0e1=await(0x0,http_1[_0x1ebfca(0x2c5)])(BASE_URL+'/api/v1/ai/respond',{'conversationId':_0x12b534[_0x1ebfca(0x2b5)],'question':_0x33d3e1,'history':_0x189b31,'tool_calls':_0x1f5d0e,'tool_results':_0x139041,'registryVersion':this[_0x1ebfca(0x327)],'userContext':_0x12b534[_0x1ebfca(0x2ec)],'aiName':this[_0x1ebfca(0x254)],'planCategory':_0x570d94['planCategory']},this[_0x1ebfca(0xff)]());const _0x4446e8=0xf,_0x298627=0x1e;let _0x5a3014=0x0,_0x27fa87=_0x2f5f82(_0x3ce0e1),_0x58b651=!0x1;for(_0x218002[_0x1ebfca(0x13e)](_0x2fe2be,_0x218002[_0x1ebfca(0x2c6)],_0x3ce0e1);_0x218002[_0x1ebfca(0x2d3)]('tool_use',_0x27fa87)&&_0x218002[_0x1ebfca(0x1fe)](_0x5a3014,_0x298627);){_0x5a3014+=0x1,!_0x58b651&&_0x218002[_0x1ebfca(0x19f)](_0x5a3014,_0x4446e8)&&(_0x58b651=!0x0);const _0x4400b0=_0x3ce0e1[_0x1ebfca(0x21c)]??[];if(0x0===_0x4400b0['length'])throw new Error(_0x218002[_0x1ebfca(0x2d2)]);const _0x4f480a=await this[_0x1ebfca(0x1cc)]({'toolCalls':_0x4400b0,'userContext':_0x12b534[_0x1ebfca(0x2ec)],'question':_0x33d3e1,'cache':_0x211e7e}),_0x42df3b=this[_0x1ebfca(0x25b)](_0x4f480a);_0x3ce0e1=await(0x0,http_1['postJson'])(BASE_URL+_0x1ebfca(0x2f9),{'conversationId':_0x12b534[_0x1ebfca(0x2b5)],'question':_0x33d3e1,'history':_0x189b31,'tool_calls':_0x4400b0,'tool_results':_0x42df3b,'registryVersion':this[_0x1ebfca(0x327)],'userContext':_0x12b534[_0x1ebfca(0x2ec)],'softCapReached':_0x58b651,'aiName':this['aiName'],'planCategory':_0x570d94[_0x1ebfca(0x27f)]},this[_0x1ebfca(0xff)]()),_0x27fa87=_0x218002[_0x1ebfca(0x2ce)](_0x2f5f82,_0x3ce0e1),_0x2fe2be(_0x1ebfca(0x2b1)+_0x5a3014,_0x3ce0e1);}let _0x3ca325=_0x3ce0e1[_0x1ebfca(0x1f4)]??'';_0x218002[_0x1ebfca(0x12e)](_0x218002['OMfsA'],_0x27fa87)&&(_0x3ca325=_0x218002[_0x1ebfca(0x2d8)],this[_0x1ebfca(0x2ac)](_0x218002[_0x1ebfca(0x14e)])),_0x3ca325&&_0x218002['vEnyC'](0x0,_0x3ca325[_0x1ebfca(0x184)]()['length'])||(_0x3ca325=_0x218002[_0x1ebfca(0x2d5)],this[_0x1ebfca(0x2ac)](_0x218002[_0x1ebfca(0x138)]));const _0x41bf74={'role':_0x1ebfca(0x2dd),'content':_0x3ca325,'timestamp':Date['now'](),'messageType':_0x218002[_0x1ebfca(0x1ee)],'visualizations':_0x3ce0e1[_0x1ebfca(0x238)],'summaryCards':_0x3ce0e1[_0x1ebfca(0x194)]};return await this[_0x1ebfca(0x1b3)][_0x1ebfca(0x192)](_0x3ce0e1['conversationId'],_0x41bf74),this[_0x1ebfca(0x26b)]({'content':_0x3ca325,'conversationId':_0x3ce0e1[_0x1ebfca(0x2b5)],'visualizations':_0x3ce0e1[_0x1ebfca(0x238)],'summaryCards':_0x3ce0e1[_0x1ebfca(0x194)]});}}catch(_0x1d33a7){const _0x37ab35=_0x218002[_0x1ebfca(0x1d7)](_0x1d33a7,Error)?_0x1d33a7['message']:'';if(_0x37ab35[_0x1ebfca(0x2c7)](_0x1ebfca(0x197))||_0x37ab35[_0x1ebfca(0x34e)]()[_0x1ebfca(0x2c7)](_0x218002[_0x1ebfca(0x2ca)])){const _0x4b4379=_0x1ebfca(0x348);return await this[_0x1ebfca(0x1b3)][_0x1ebfca(0x192)](_0x12b534[_0x1ebfca(0x2b5)],{'role':_0x218002[_0x1ebfca(0x27a)],'content':_0x4b4379,'timestamp':Date[_0x1ebfca(0x2e2)](),'messageType':_0x218002[_0x1ebfca(0x1ee)]}),this['buildQueryResponse']({'content':_0x4b4379,'conversationId':_0x12b534[_0x1ebfca(0x2b5)]});}throw _0x1d33a7;}}async['queryStream'](_0x15a5fa,_0xdc110d){const _0x3b8506=_0x45d8c9,_0x40c86f={'fHDZX':_0x3b8506(0x1aa),'VKMgT':_0x3b8506(0x1e3),'XLyio':_0x3b8506(0x28c),'qQZLW':_0x3b8506(0x170),'BlUsy':_0x3b8506(0x293),'KNKqR':_0x3b8506(0x35e),'YivCq':function(_0x4cea3a,_0x359a31){return _0x4cea3a===_0x359a31;},'kHeaB':'assistant','AgyfV':function(_0x118d1a,_0x9410c4){return _0x118d1a===_0x9410c4;},'vgikz':function(_0x3681bd,_0x51fedc){return _0x3681bd<_0x51fedc;},'tdPfk':function(_0x1815c0,_0x1e1bf8){return _0x1815c0>=_0x1e1bf8;},'auDec':function(_0xfa80be,_0x397239){return _0xfa80be===_0x397239;},'nzulH':_0x3b8506(0x1b0),'meKYW':function(_0x48679b,_0x1e66d1){return _0x48679b(_0x1e66d1);},'OSmmd':_0x3b8506(0x30e),'tiTFo':'I\x20couldn\x27t\x20complete\x20that\x20request\x20after\x20several\x20attempts.\x20Please\x20refine\x20the\x20question\x20or\x20provide\x20additional\x20filters\x20(e.g.,\x20country,\x20role,\x20or\x20time\x20range).','CXQWJ':'[telygent-sdk]\x20respond\x20stopped\x20after\x20soft/hard\x20cap,\x20returning\x20fallback\x20response.','TCtfg':_0x3b8506(0x2f0),'grNyl':_0x3b8506(0x1de),'TQLif':function(_0x11f9dd,_0x2e41c8){return _0x11f9dd instanceof _0x2e41c8;},'JmQoQ':_0x3b8506(0x197),'Bhghn':_0x3b8506(0x348)};try{if(!this[_0x3b8506(0x33d)])throw new Error(_0x40c86f['fHDZX']);if(!this[_0x3b8506(0x33b)]||0x0===Object['keys'](this[_0x3b8506(0x33b)])[_0x3b8506(0x256)])throw new Error(_0x40c86f[_0x3b8506(0x2ba)]);await this[_0x3b8506(0x30c)]();const _0x1a1be2=await this[_0x3b8506(0x1b3)][_0x3b8506(0x246)](_0x15a5fa['conversationId']),_0x57690a=await this['prepareTransportHistory'](_0x15a5fa[_0x3b8506(0x2b5)],_0x1a1be2,_0x15a5fa[_0x3b8506(0x1c3)]),_0x57b58e=_0x57690a[_0x3b8506(0x275)],_0x1abcfc=this[_0x3b8506(0x154)](_0x15a5fa);this[_0x3b8506(0x319)](_0x3b8506(0x226),{'conversationId':_0x15a5fa[_0x3b8506(0x2b5)],'mode':_0x40c86f[_0x3b8506(0x190)],..._0x57690a['metrics']});const _0x541f7b=await(0x0,http_1[_0x3b8506(0x268)])(BASE_URL+_0x3b8506(0x2a3),{'conversationId':_0x15a5fa[_0x3b8506(0x2b5)],'question':_0x1abcfc,'userContext':_0x15a5fa['userContext'],'registryVersion':this[_0x3b8506(0x327)],'history':_0x57b58e,'aiName':this[_0x3b8506(0x254)]},this[_0x3b8506(0xff)](),_0xdc110d),_0x4da09b={'role':_0x40c86f['qQZLW'],'content':_0x15a5fa[_0x3b8506(0x1c3)],'timestamp':Date[_0x3b8506(0x2e2)](),'messageType':_0x40c86f['BlUsy']};await this[_0x3b8506(0x1b3)][_0x3b8506(0x192)](_0x15a5fa[_0x3b8506(0x2b5)],_0x4da09b);const _0x6d77ab=_0x541f7b;if(_0x40c86f[_0x3b8506(0x227)]===_0x6d77ab[_0x3b8506(0x282)]&&_0x6d77ab[_0x3b8506(0x1f4)]||!_0x6d77ab[_0x3b8506(0x282)]&&_0x6d77ab['content']){if(_0x40c86f[_0x3b8506(0x2f8)](_0x3b8506(0x2fa),_0x3b8506(0x2fa))){const _0xf57f78={'role':_0x40c86f['kHeaB'],'content':_0x6d77ab['content'],'timestamp':Date[_0x3b8506(0x2e2)](),'messageType':_0x40c86f[_0x3b8506(0x1e5)],'visualizations':_0x6d77ab[_0x3b8506(0x238)],'summaryCards':_0x6d77ab[_0x3b8506(0x194)]};return await this[_0x3b8506(0x1b3)][_0x3b8506(0x192)](_0x6d77ab[_0x3b8506(0x2b5)],_0xf57f78),this[_0x3b8506(0x26b)]({'content':_0x6d77ab[_0x3b8506(0x1f4)],'conversationId':_0x6d77ab['conversationId'],'visualizations':_0x6d77ab[_0x3b8506(0x238)],'summaryCards':_0x6d77ab[_0x3b8506(0x194)]});}else{const _0xfb30db=_0x268bd7?function(){if(_0x4db21a){const _0x22b01a=_0x3d692c['apply'](_0x1f04c7,arguments);return _0x180caf=null,_0x22b01a;}}:function(){};return _0x45b497=![],_0xfb30db;}}const _0x5cdde0=_0x6d77ab[_0x3b8506(0x21c)]??[],_0x2767f5=new Map(),_0x5b4cc1=await this[_0x3b8506(0x1cc)]({'toolCalls':_0x5cdde0,'userContext':_0x15a5fa[_0x3b8506(0x2ec)],'question':_0x1abcfc,'cache':_0x2767f5}),_0xb452fa=this[_0x3b8506(0x25b)](_0x5b4cc1),_0x557961=_0x48b9a2=>_0x48b9a2[_0x3b8506(0x282)]?_0x48b9a2[_0x3b8506(0x282)]:_0x48b9a2['tool_calls']&&_0x48b9a2['tool_calls'][_0x3b8506(0x256)]>0x0?_0x3b8506(0x30e):_0x3b8506(0x35e);let _0x40d643=await(0x0,http_1['postSse'])(BASE_URL+_0x3b8506(0x1ea),{'conversationId':_0x15a5fa['conversationId'],'question':_0x1abcfc,'history':_0x57b58e,'tool_calls':_0x5cdde0,'tool_results':_0xb452fa,'registryVersion':this['registryVersion'],'userContext':_0x15a5fa['userContext'],'aiName':this[_0x3b8506(0x254)],'planCategory':_0x6d77ab[_0x3b8506(0x27f)]},this['authHeaders'](),_0xdc110d);const _0x441226=0xf,_0x81ad8=0x1e;let _0x2a0c42=0x0,_0x3fa84f=_0x557961(_0x40d643),_0x505a2f=!0x1;for(;_0x40c86f[_0x3b8506(0x253)](_0x3b8506(0x30e),_0x3fa84f)&&_0x40c86f[_0x3b8506(0x332)](_0x2a0c42,_0x81ad8);){_0x2a0c42+=0x1,!_0x505a2f&&_0x40c86f[_0x3b8506(0x150)](_0x2a0c42,_0x441226)&&(_0x505a2f=!0x0);const _0x5e5e79=_0x40d643['tool_calls']??[];if(_0x40c86f[_0x3b8506(0x175)](0x0,_0x5e5e79[_0x3b8506(0x256)]))throw new Error(_0x40c86f['nzulH']);const _0x31bbb5=await this[_0x3b8506(0x1cc)]({'toolCalls':_0x5e5e79,'userContext':_0x15a5fa['userContext'],'question':_0x1abcfc,'cache':_0x2767f5}),_0x24b980=this[_0x3b8506(0x25b)](_0x31bbb5);_0x40d643=await(0x0,http_1[_0x3b8506(0x268)])(BASE_URL+_0x3b8506(0x1ea),{'conversationId':_0x15a5fa[_0x3b8506(0x2b5)],'question':_0x1abcfc,'history':_0x57b58e,'tool_calls':_0x5e5e79,'tool_results':_0x24b980,'registryVersion':this[_0x3b8506(0x327)],'userContext':_0x15a5fa[_0x3b8506(0x2ec)],'softCapReached':_0x505a2f,'aiName':this['aiName'],'planCategory':_0x6d77ab[_0x3b8506(0x27f)]},this[_0x3b8506(0xff)](),_0xdc110d),_0x3fa84f=_0x40c86f['meKYW'](_0x557961,_0x40d643);}let _0x440cbc=_0x40d643[_0x3b8506(0x1f4)]??'',_0x3cf844=!0x1;_0x40c86f[_0x3b8506(0x253)](_0x40c86f[_0x3b8506(0x286)],_0x3fa84f)&&(_0x440cbc=_0x40c86f[_0x3b8506(0x279)],this['log'](_0x40c86f[_0x3b8506(0x148)]),_0x3cf844=!0x0),_0x440cbc&&0x0!==_0x440cbc[_0x3b8506(0x184)]()['length']||(_0x440cbc=_0x40c86f[_0x3b8506(0x26c)],this[_0x3b8506(0x2ac)](_0x40c86f['grNyl']),_0x3cf844=!0x0),_0x3cf844&&_0xdc110d&&_0xdc110d({'phase':_0x40c86f[_0x3b8506(0x227)],'status':_0x40c86f[_0x3b8506(0x227)],'content':_0x440cbc,'conversationId':_0x15a5fa[_0x3b8506(0x2b5)],'visualizations':_0x40d643[_0x3b8506(0x238)],'summaryCards':_0x40d643[_0x3b8506(0x194)]});const _0x22e395={'role':_0x3b8506(0x2dd),'content':_0x440cbc,'timestamp':Date[_0x3b8506(0x2e2)](),'messageType':_0x40c86f['BlUsy'],'visualizations':_0x40d643[_0x3b8506(0x238)],'summaryCards':_0x40d643[_0x3b8506(0x194)]};return await this[_0x3b8506(0x1b3)][_0x3b8506(0x192)](_0x15a5fa['conversationId'],_0x22e395),this['buildQueryResponse']({'content':_0x440cbc,'conversationId':_0x15a5fa[_0x3b8506(0x2b5)],'visualizations':_0x40d643[_0x3b8506(0x238)],'summaryCards':_0x40d643[_0x3b8506(0x194)]});}catch(_0x198995){const _0x535170=_0x40c86f[_0x3b8506(0x336)](_0x198995,Error)?_0x198995[_0x3b8506(0x146)]:'';if(_0x535170['includes'](_0x40c86f[_0x3b8506(0x241)])||_0x535170[_0x3b8506(0x34e)]()[_0x3b8506(0x2c7)]('rate\x20limit')){const _0x2c6038=_0x40c86f[_0x3b8506(0x2a8)];return await this['historyStore'][_0x3b8506(0x192)](_0x15a5fa[_0x3b8506(0x2b5)],{'role':_0x40c86f['kHeaB'],'content':_0x2c6038,'timestamp':Date[_0x3b8506(0x2e2)](),'messageType':_0x40c86f['BlUsy']}),this[_0x3b8506(0x26b)]({'content':_0x2c6038,'conversationId':_0x15a5fa['conversationId']});}throw _0x198995;}}async[_0x45d8c9(0x242)](_0x4a207a){const _0x36b3d7=_0x45d8c9;return(await this[_0x36b3d7(0x1b3)][_0x36b3d7(0x246)](_0x4a207a))[_0x36b3d7(0x12d)](_0x1c2763=>_0x36b3d7(0x293)===this[_0x36b3d7(0x313)](_0x1c2763));}}exports[_0x45d8c9(0x21a)]=TelygentClient;
|
package/dist/example.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf4cf0b,_0xa45d2b){var _0x13299d=_0x6ebe,_0x5e38f9=_0xf4cf0b();while(!![]){try{var _0x3198e8=-parseInt(_0x13299d(0x10d))/0x1*(parseInt(_0x13299d(0x10e))/0x2)+parseInt(_0x13299d(0xfe))/0x3+parseInt(_0x13299d(0x11e))/0x4*(parseInt(_0x13299d(0x11b))/0x5)+-parseInt(_0x13299d(0xfb))/0x6+-parseInt(_0x13299d(0x113))/0x7*(-parseInt(_0x13299d(0x122))/0x8)+parseInt(_0x13299d(0x10b))/0x9+-parseInt(_0x13299d(0x108))/0xa*(parseInt(_0x13299d(0x101))/0xb);if(_0x3198e8===_0xa45d2b)break;else _0x5e38f9['push'](_0x5e38f9['shift']());}catch(_0x385319){_0x5e38f9['push'](_0x5e38f9['shift']());}}}(_0x4b78,0xb5bbf));var _0x215c45=(function(){var _0x18c2d6={'Lfgzy':function(_0x157fb7,_0x1288dd){return _0x157fb7!==_0x1288dd;},'vRzHb':'qIYAp'},_0x31e792=!![];return function(_0x5fbe86,_0x44ae8f){var _0x2e0816=_0x6ebe;if(_0x18c2d6[_0x2e0816(0x102)](_0x18c2d6[_0x2e0816(0x11c)],_0x18c2d6[_0x2e0816(0x11c)]))_0x4bb11d=_0x531713;else{var _0xb723d1=_0x31e792?function(){var _0x4157a8=_0x2e0816;if(_0x44ae8f){var _0x43336f=_0x44ae8f[_0x4157a8(0x111)](_0x5fbe86,arguments);return _0x44ae8f=null,_0x43336f;}}:function(){};return _0x31e792=![],_0xb723d1;}};}()),_0x21cf92=_0x215c45(this,function(){var _0xbdaf58=_0x6ebe,_0x5aeaa1={'GhHCX':_0xbdaf58(0x119)};return _0x21cf92[_0xbdaf58(0x10a)]()[_0xbdaf58(0x115)](_0x5aeaa1[_0xbdaf58(0x123)])['toString']()['constructor'](_0x21cf92)[_0xbdaf58(0x115)](_0x5aeaa1[_0xbdaf58(0x123)]);});_0x21cf92();var _0x18f620=(function(){var _0x26595d=_0x6ebe,_0x49bade={'aXyPX':function(_0x495125,_0x22db96){return _0x495125===_0x22db96;},'WLGYB':_0x26595d(0x126),'QbAfG':'5|2|3|1|4|0','hNwtK':_0x26595d(0xfd)},_0x16efb1=!![];return function(_0x184261,_0x128697){var _0x38a38b=_0x26595d,_0x43306={'puWrh':_0x49bade['QbAfG']};if(_0x49bade['hNwtK']===_0x49bade[_0x38a38b(0x105)]){var _0x37d1a1=_0x16efb1?function(){var _0x50691f=_0x38a38b;if(_0x49bade[_0x50691f(0x114)](_0x49bade[_0x50691f(0x100)],_0x50691f(0x10f))){var _0x2cc719=_0x43306['puWrh']['split']('|'),_0x2d4aa4=0x0;while(!![]){switch(_0x2cc719[_0x2d4aa4++]){case'0':_0x106339[_0x1889fe]=_0x32a9ee;continue;case'1':_0x32a9ee[_0x50691f(0x124)]=_0x47faab[_0x50691f(0x125)](_0x141197);continue;case'2':var _0x1889fe=_0x228d87[_0x51c250];continue;case'3':var _0x578029=_0x57b33f[_0x1889fe]||_0x32a9ee;continue;case'4':_0x32a9ee['toString']=_0x578029['toString'][_0x50691f(0x125)](_0x578029);continue;case'5':var _0x32a9ee=_0x267199[_0x50691f(0x116)][_0x50691f(0x103)][_0x50691f(0x125)](_0x4eeed9);continue;}break;}}else{if(_0x128697){var _0x50eb13=_0x128697['apply'](_0x184261,arguments);return _0x128697=null,_0x50eb13;}}}:function(){};return _0x16efb1=![],_0x37d1a1;}else{var _0x33ed34=_0x16cfd[_0x38a38b(0x111)](_0xcd1ca7,arguments);return _0xa212cb=null,_0x33ed34;}};}()),_0x364490=_0x18f620(this,function(){var _0x3ed0a5=_0x6ebe,_0x4df773={'mERwq':function(_0x2676b5,_0x18f9f1){return _0x2676b5(_0x18f9f1);},'HmESS':function(_0x58dadf,_0x4996b0){return _0x58dadf+_0x4996b0;},'wdGTt':'{}.constructor(\x22return\x20this\x22)(\x20)','KTrcv':function(_0xb55166){return _0xb55166();},'yMmXw':_0x3ed0a5(0x120),'PKcZx':_0x3ed0a5(0x11a),'jJlFw':_0x3ed0a5(0x106),'pCdob':function(_0x1e9fdd,_0x59fa41){return _0x1e9fdd<_0x59fa41;}},_0xb92bf3=function(){var _0x3c642a=_0x3ed0a5,_0x2d24ee;try{_0x2d24ee=_0x4df773[_0x3c642a(0x110)](Function,_0x4df773[_0x3c642a(0xfa)](_0x3c642a(0x11d),_0x4df773[_0x3c642a(0x104)])+');')();}catch(_0x49a704){_0x2d24ee=window;}return _0x2d24ee;},_0x8bc897=_0x4df773[_0x3ed0a5(0x117)](_0xb92bf3),_0x51ad43=_0x8bc897['console']=_0x8bc897[_0x3ed0a5(0x112)]||{},_0x4106ca=[_0x4df773['yMmXw'],_0x3ed0a5(0xfc),'info',_0x4df773['PKcZx'],_0x4df773[_0x3ed0a5(0x10c)],_0x3ed0a5(0x11f),_0x3ed0a5(0x109)];for(var _0x41199c=0x0;_0x4df773['pCdob'](_0x41199c,_0x4106ca[_0x3ed0a5(0x121)]);_0x41199c++){if(_0x3ed0a5(0xff)!==_0x3ed0a5(0xff)){var _0x42bd61=_0x56417c?function(){var _0x349151=_0x3ed0a5;if(_0x334516){var _0x3649b8=_0x2a4255[_0x349151(0x111)](_0x5d06ef,arguments);return _0x41f14e=null,_0x3649b8;}}:function(){};return _0x52340e=![],_0x42bd61;}else{var _0x407c7a=_0x3ed0a5(0x107)[_0x3ed0a5(0x118)]('|'),_0x4e45c5=0x0;while(!![]){switch(_0x407c7a[_0x4e45c5++]){case'0':_0x51ad43[_0x1b6dbd]=_0x159bdd;continue;case'1':_0x159bdd[_0x3ed0a5(0x10a)]=_0x5ae189[_0x3ed0a5(0x10a)][_0x3ed0a5(0x125)](_0x5ae189);continue;case'2':var _0x159bdd=_0x18f620[_0x3ed0a5(0x116)][_0x3ed0a5(0x103)][_0x3ed0a5(0x125)](_0x18f620);continue;case'3':var _0x5ae189=_0x51ad43[_0x1b6dbd]||_0x159bdd;continue;case'4':_0x159bdd[_0x3ed0a5(0x124)]=_0x18f620[_0x3ed0a5(0x125)](_0x18f620);continue;case'5':var _0x1b6dbd=_0x4106ca[_0x41199c];continue;}break;}}}});function _0x4b78(){var _0x5ac72e=['D2rhvhq','Ae53DeS','zxHJzxb0Aw9U','mNW1Fdn8nhWXFda','mtaWEKngrKno','DhjHy2u','Dg9tDhjPBMC','nZKXmdy4nvHUEwXIEa','AKPSrNC','mZy3mZi0Ee1vq2Pu','nMH4suTKzq','tfziD0q','BuvsD3e','yxbWBhK','y29UC29Szq','mJaZteX3wLHz','yvH5ufG','C2vHCMnO','y29UC3rYDwn0B3i','s1rYy3y','C3bSAxq','kcGOlISPkYKRksSK','zxjYB3i','mZuWodKWnwDouvHIvW','DLj6sgi','CMv0DxjUicHMDw5JDgLVBIGPia','ohjcuePxDq','DgfIBgu','Bg9N','BgvUz3rO','mtG1mJCYwe9bv2nh','r2Hiq1G','x19WCM90B19F','yMLUza','Aw53wxO','sg1fu1m','ndK3mZC3ohHTtMvxua','D2fYBG','BKvYv1K','nZC3mtuWC3znEhDZ','zgXlqLe','v0Xhwui','ntKXnJu3t0jkD3jU','tgzNENK','ChjVDg90ExbL'];_0x4b78=function(){return _0x5ac72e;};return _0x4b78();}_0x364490();function _0x6ebe(_0x20a047,_0x138334){_0x20a047=_0x20a047-0xfa;var _0x27fc6d=_0x4b78();var _0x364490=_0x27fc6d[_0x20a047];if(_0x6ebe['eOfmKM']===undefined){var _0x18f620=function(_0x215c45){var _0x4b7822='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x6ebe82='',_0x339c65='',_0xdb9edf=_0x6ebe82+_0x18f620;for(var _0x485799=0x0,_0x415b27,_0x31866e,_0x5a4a2a=0x0;_0x31866e=_0x215c45['charAt'](_0x5a4a2a++);~_0x31866e&&(_0x415b27=_0x485799%0x4?_0x415b27*0x40+_0x31866e:_0x31866e,_0x485799++%0x4)?_0x6ebe82+=_0xdb9edf['charCodeAt'](_0x5a4a2a+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x415b27>>(-0x2*_0x485799&0x6)):_0x485799:0x0){_0x31866e=_0x4b7822['indexOf'](_0x31866e);}for(var _0x4ed8e6=0x0,_0x29318e=_0x6ebe82['length'];_0x4ed8e6<_0x29318e;_0x4ed8e6++){_0x339c65+='%'+('00'+_0x6ebe82['charCodeAt'](_0x4ed8e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x339c65);};_0x6ebe['Utghol']=_0x18f620,_0x6ebe['ihmTzg']={},_0x6ebe['eOfmKM']=!![];}var _0x350783=_0x27fc6d[0x0],_0x16e4be=_0x20a047+_0x350783,_0x21cf92=_0x6ebe['ihmTzg'][_0x16e4be];if(!_0x21cf92){var _0x571409=function(_0x471830){this['fvEkNq']=_0x471830,this['OEgJgQ']=[0x1,0x0,0x0],this['TqMwaP']=function(){return'newState';},this['FOuNHw']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['MDHtxo']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x571409['prototype']['jBlFGA']=function(){var _0x5d08f1=new RegExp(this['FOuNHw']+this['MDHtxo']),_0x52533=_0x5d08f1['test'](this['TqMwaP']['toString']())?--this['OEgJgQ'][0x1]:--this['OEgJgQ'][0x0];return this['LcnvML'](_0x52533);},_0x571409['prototype']['LcnvML']=function(_0x56417c){if(!Boolean(~_0x56417c))return _0x56417c;return this['XrOOut'](this['fvEkNq']);},_0x571409['prototype']['XrOOut']=function(_0x2cbd23){for(var _0x43fcf2=0x0,_0x255940=this['OEgJgQ']['length'];_0x43fcf2<_0x255940;_0x43fcf2++){this['OEgJgQ']['push'](Math['round'](Math['random']())),_0x255940=this['OEgJgQ']['length'];}return _0x2cbd23(this['OEgJgQ'][0x0]);},new _0x571409(_0x6ebe)['jBlFGA'](),_0x364490=_0x6ebe['Utghol'](_0x364490),_0x6ebe['ihmTzg'][_0x16e4be]=_0x364490;}else _0x364490=_0x21cf92;return _0x364490;}'use strict';
|