UNPKG

@taazkareem/clickup-mcp-server

Version:

ClickUp MCP Server - Powering AI Agents with full ClickUp task, document, and chat management capabilities.

1 lines 12.9 kB
const a0_0x2a3704=a0_0x1343;(function(_0x3674dc,_0x1eb599){const _0x1a996f=a0_0x1343,_0x1ffb7e=_0x3674dc();while(!![]){try{const _0x44def2=parseInt(_0x1a996f(0x11c))/0x1*(-parseInt(_0x1a996f(0x163))/0x2)+parseInt(_0x1a996f(0xe3))/0x3*(parseInt(_0x1a996f(0x152))/0x4)+-parseInt(_0x1a996f(0xec))/0x5+-parseInt(_0x1a996f(0x170))/0x6+parseInt(_0x1a996f(0x125))/0x7+-parseInt(_0x1a996f(0x16c))/0x8+parseInt(_0x1a996f(0x100))/0x9;if(_0x44def2===_0x1eb599)break;else _0x1ffb7e['push'](_0x1ffb7e['shift']());}catch(_0x3719c0){_0x1ffb7e['push'](_0x1ffb7e['shift']());}}}(a0_0x4ab4,0xc30d6));import{ClickUpServiceError,ErrorCode}from'./errors.js';function a0_0x1343(_0x286732,_0x20fc8b){_0x286732=_0x286732-0xe2;const _0x4ab44=a0_0x4ab4();let _0x13439a=_0x4ab44[_0x286732];if(a0_0x1343['oKWUoI']===undefined){var _0xd955c6=function(_0x2e296c){const _0x466d4c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a299f='',_0x139c8f='';for(let _0x3d90e2=0x0,_0x47ec63,_0x2b89a6,_0x4a8c2b=0x0;_0x2b89a6=_0x2e296c['charAt'](_0x4a8c2b++);~_0x2b89a6&&(_0x47ec63=_0x3d90e2%0x4?_0x47ec63*0x40+_0x2b89a6:_0x2b89a6,_0x3d90e2++%0x4)?_0x1a299f+=String['fromCharCode'](0xff&_0x47ec63>>(-0x2*_0x3d90e2&0x6)):0x0){_0x2b89a6=_0x466d4c['indexOf'](_0x2b89a6);}for(let _0x56bdb9=0x0,_0x561f1a=_0x1a299f['length'];_0x56bdb9<_0x561f1a;_0x56bdb9++){_0x139c8f+='%'+('00'+_0x1a299f['charCodeAt'](_0x56bdb9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x139c8f);};a0_0x1343['XvtdPq']=_0xd955c6,a0_0x1343['QMiqNV']={},a0_0x1343['oKWUoI']=!![];}const _0x22b47e=_0x4ab44[0x0],_0x108771=_0x286732+_0x22b47e,_0x5da451=a0_0x1343['QMiqNV'][_0x108771];return!_0x5da451?(_0x13439a=a0_0x1343['XvtdPq'](_0x13439a),a0_0x1343['QMiqNV'][_0x108771]=_0x13439a):_0x13439a=_0x5da451,_0x13439a;}function a0_0x4ab4(){const _0x478602=['qxbWCM8','BwL0uMu','D2fZihe','DwvZDca','y2vPBa','vuvfAhu','BgvUz3q','Dg8GCxu','BffTt1G','Bhrszxe','zwvTAgG','sfb0y0O','igv4zwm','C2HPzNq','y2PYtw4','Bgf0zuq','BgLTAxq','y2vZC2K','rxjYB3i','zYbYyxq','DxrPBMC','C3bSAxq','AgfUzgW','Dxjjtei','CgfJAw4','zsbSAw0','uKfurv8','odu1mJG0vML2AKXd','C3nPBMC','ywnOAw4','BgfZDfi','BM93','uxvLDwu','Bg9Nz2u','zwqGCMu','DYbYzw0','B2nLC3m','ihjLCxu','igL0zw0','y1vNBhG','y29Kzq','ihn0yxq','zxnZAw4','BxmG4OAsia','mZu4tNn5sgDy','Aw5JCMu','zsaOBg8','v0DoC1e','DwvZDfm','Fdr8m3W','C3rrDwu','zgvIDwC','ze5XyMW','mJa4oda4EM1oA3rL','B24G','igXPBwK','wfbjA2O','nteZndGXmMnIqvrmDa','igvTChq','nNLSyNvXAW','z0jeEe0','y2f0y2G','uhjVy2u','wvzoExq','DcbOzwe','uhjLzw0','Dwv1zsa','zYbXDwu','mtGXmZC4mg54CwTVEG','zcb0BYa','CgfYC2u','zw5XDwu','zgvMyxu','DwvZDhm','ChjVy2u','C3qGC3a','Dc1Yzw0','DhjHy2u','ywnPBMC','CxvLDwu','C3DPDgm','zsbWCM8','igrLBge','A3HsCMG','ChvZAa','zxvLzca','zxvLig0','ihjHDgu','mJe5mZmXndrcu09mr3G','vK5XCgC','igf0iha','qwrQDxm','A3PxDMm','y2fSy3u','zwXPBwK','y2LUzW','Ec1Yyxq','zxnZzwq','D2fYBG','zhvYAw4','BMCGDg8','ihjLywm','uMf0zsa','zwXHEq','swDstwC','AgLUzYa','ihbYB2m','BYbYyxq','teLnsvq','zgvYCW','Dwv1zwq','igLUia','C3rtCge','BhKGC3C','C3nrDwu','BwvZC2e','ntq1mu9oz0DTqW','zvjHDgu','zxjYB3i','yxrLtgK','CYbYzw0','zYbYzxe','CxvLC3q','icHszxe','Dc1SAw0','mta4mJy0ofbUzxbTrW','BMCGBw8','Bwf4','C2v0','BwLU','vxf4BhO','zgf0yq','AgvKlca','CMvXDwu','igHPDca','B2rL','mhW1Fde','Esb0BYa','zhvLihq','B3nPDgK','qxHRuLa','ihf1zxu','AxrPBMC'];a0_0x4ab4=function(){return _0x478602;};return a0_0x4ab4();}export class RateLimiter{constructor(_0x2acd61){const _0x17c086=a0_0x1343,_0x51164c=(_0x17c086(0x130)+_0x17c086(0x168)+'2')[_0x17c086(0x14c)]('|');let _0x122d38=0x0;while(!![]){switch(_0x51164c[_0x122d38++]){case'0':this['defau'+_0x17c086(0x140)+_0x17c086(0x167)+_0x17c086(0x14f)+'g']=0x258;continue;case'1':this[_0x17c086(0xf2)+_0x17c086(0x153)+_0x17c086(0x157)]=![];continue;case'2':this[_0x17c086(0x12d)+_0x17c086(0x118)+_0x17c086(0x107)]=this[_0x17c086(0xf0)+'ltReq'+_0x17c086(0x167)+'pacin'+'g'];continue;case'3':this['logge'+'r']=_0x2acd61;continue;case'4':this['lastR'+_0x17c086(0x11f)+_0x17c086(0x138)+_0x17c086(0x128)]=0x0;continue;case'5':this[_0x17c086(0x12d)+_0x17c086(0x169)+'ue']=[];continue;}break;}}[a0_0x2a3704(0x14d)+a0_0x2a3704(0x11d)+'Limit'+'Heade'+'rs'](_0x17f74d){const _0x27ea3c=a0_0x2a3704,_0x139ac4={'eemhh':_0x27ea3c(0x108)+_0x27ea3c(0x106)+_0x27ea3c(0x124)+'it','cUglx':function(_0x5a9df3,_0x148b6d){return _0x5a9df3*_0x148b6d;},'UEEhu':function(_0xe0c6d9,_0x514873){return _0xe0c6d9<=_0x514873;},'AxkRP':function(_0x239658,_0x55e8ac){return _0x239658*_0x55e8ac;},'BkhHN':function(_0x2eac03,_0x5e95bd){return _0x2eac03/_0x5e95bd;},'kxRrh':function(_0x487d1,_0x1461a1){return _0x487d1/_0x1461a1;},'HPtcJ':'Faile'+_0x27ea3c(0xed)+_0x27ea3c(0xee)+_0x27ea3c(0xff)+_0x27ea3c(0x16e)+_0x27ea3c(0xe8)+_0x27ea3c(0x115)};try{const _0x5df3de=_0x17f74d[_0x139ac4[_0x27ea3c(0x141)]],_0x4b46ee=_0x17f74d['x-rat'+_0x27ea3c(0x106)+_0x27ea3c(0xf4)+'ainin'+'g'],_0x15fa88=_0x17f74d[_0x27ea3c(0x108)+_0x27ea3c(0x106)+'t-res'+'et'];_0x4b46ee<_0x5df3de*0.2?this['logge'+'r'][_0x27ea3c(0x10a)](_0x27ea3c(0x137)+_0x27ea3c(0x154)+_0x27ea3c(0x14a)+_0x27ea3c(0x150)+'it',{'remaining':_0x4b46ee,'limit':_0x5df3de,'reset':_0x15fa88}):this[_0x27ea3c(0x158)+'r']['debug']('Rate\x20'+_0x27ea3c(0x147)+_0x27ea3c(0x160)+'us',{'remaining':_0x4b46ee,'limit':_0x5df3de,'reset':_0x15fa88});if(_0x15fa88){this[_0x27ea3c(0x155)+_0x27ea3c(0x11f)+_0x27ea3c(0x138)+_0x27ea3c(0x128)]=_0x15fa88;const _0x4a463d=Date[_0x27ea3c(0x156)](),_0x450130=_0x139ac4[_0x27ea3c(0x15e)](_0x15fa88,0x3e8),_0x4080e9=Math[_0x27ea3c(0x127)](0x0,_0x450130-_0x4a463d);if(_0x4b46ee<_0x5df3de*0.3){let _0x510760;if(_0x139ac4[_0x27ea3c(0x13c)](_0x4b46ee,0x5))_0x510760=Math['ceil'](_0x139ac4[_0x27ea3c(0x134)](_0x139ac4['BkhHN'](_0x4080e9,_0x4b46ee),0x2)),!this[_0x27ea3c(0xf2)+_0x27ea3c(0x153)+_0x27ea3c(0x157)]&&(this[_0x27ea3c(0x158)+'r']['info'](_0x27ea3c(0xe9)+'ptive'+_0x27ea3c(0x119)+'itchi'+_0x27ea3c(0x10c)+_0x27ea3c(0x135)+'e\x20mod'+_0x27ea3c(0x165)+_0x27ea3c(0x15a)+'ainin'+_0x27ea3c(0x121)+_0x27ea3c(0xf1)+')',{'remaining':_0x4b46ee,'limit':_0x5df3de}),this['proce'+'ssing'+_0x27ea3c(0x157)]=!![],this[_0x27ea3c(0xf2)+_0x27ea3c(0x11a)+'ue']()[_0x27ea3c(0xe5)](_0x3dac6f=>{const _0x6c2c7c=_0x27ea3c;this[_0x6c2c7c(0x158)+'r'][_0x6c2c7c(0x11e)](_0x6c2c7c(0x149)+_0x6c2c7c(0x112)+_0x6c2c7c(0x161)+_0x6c2c7c(0x121)+_0x6c2c7c(0x13a)+'queue',_0x3dac6f);}));else _0x4b46ee<=0x14?_0x510760=Math[_0x27ea3c(0x13b)](_0x139ac4[_0x27ea3c(0xfb)](_0x4080e9,_0x4b46ee)*1.5):_0x510760=Math[_0x27ea3c(0x13b)](_0x139ac4[_0x27ea3c(0x15e)](_0x4080e9/_0x4b46ee,1.1));const _0x22f5db=0x1388,_0x2ec25c=Math[_0x27ea3c(0x129)](_0x510760,_0x22f5db);_0x2ec25c>this[_0x27ea3c(0x12d)+_0x27ea3c(0x118)+_0x27ea3c(0x107)]&&(this[_0x27ea3c(0x158)+'r'][_0x27ea3c(0x16a)](_0x27ea3c(0x103)+'ting\x20'+_0x27ea3c(0x12d)+_0x27ea3c(0xf3)+_0x27ea3c(0xf6)+':\x20'+this['reque'+_0x27ea3c(0x118)+'cing']+_0x27ea3c(0x162)+_0x2ec25c+'ms',{'remaining':_0x4b46ee,'timeToReset':_0x4080e9}),this[_0x27ea3c(0x12d)+_0x27ea3c(0x118)+_0x27ea3c(0x107)]=_0x2ec25c);}}}catch(_0x32738d){this[_0x27ea3c(0x158)+'r'][_0x27ea3c(0x10a)](_0x139ac4[_0x27ea3c(0x142)],_0x32738d);}}async[a0_0x2a3704(0xef)+'ue'](_0x274621){const _0x4a03a3=a0_0x2a3704,_0x462883={'WGNsQ':function(_0x2c3c9b){return _0x2c3c9b();},'XPIkj':function(_0x4debda,_0x4fc222){return _0x4debda(_0x4fc222);},'urILB':function(_0x2d23f4,_0x2c8022){return _0x2d23f4(_0x2c8022);},'IgRMg':function(_0x53b76f,_0xf6f57a){return _0x53b76f/_0xf6f57a;},'dNqbl':'Reque'+'st\x20qu'+_0x4a03a3(0xfd)+_0x4a03a3(0x132)+_0x4a03a3(0x113)+_0x4a03a3(0x150)+'iting','Uqxlz':function(_0x490694){return _0x490694();},'gBDxM':function(_0x3ee6d8,_0x699803){return _0x3ee6d8 instanceof _0x699803;}};if(this['proce'+_0x4a03a3(0x153)+_0x4a03a3(0x157)]){const _0x5ca117=this['reque'+'stQue'+'ue'][_0x4a03a3(0x13d)+'h']+0x1,_0x294fd0=Math[_0x4a03a3(0x13b)](_0x462883[_0x4a03a3(0x110)](_0x5ca117*this[_0x4a03a3(0x12d)+_0x4a03a3(0x118)+_0x4a03a3(0x107)],0x3e8));return this[_0x4a03a3(0x158)+'r']['info'](_0x462883[_0x4a03a3(0x16b)],{'queuePosition':_0x5ca117,'estimatedWaitSeconds':_0x294fd0,'currentSpacing':this[_0x4a03a3(0x12d)+_0x4a03a3(0x118)+_0x4a03a3(0x107)]}),new Promise((_0x18feb7,_0x5c3e1a)=>{const _0x1ad4af=_0x4a03a3;this[_0x1ad4af(0x12d)+_0x1ad4af(0x169)+'ue']['push'](async()=>{const _0x4696e7=_0x1ad4af;try{const _0x549acb=await _0x462883[_0x4696e7(0x166)](_0x274621);_0x18feb7(_0x549acb);}catch(_0x23221d){if(_0x23221d instanceof ClickUpServiceError&&_0x23221d['code']===ErrorCode[_0x4696e7(0x151)+'LIMIT']){const _0xb75ced=new ClickUpServiceError(_0x23221d[_0x4696e7(0x11b)+'ge']+(_0x4696e7(0x123)+_0x4696e7(0x13a)+_0x4696e7(0x139)+_0x4696e7(0x116)+_0x4696e7(0x102)+_0x4696e7(0x133)+_0x4696e7(0x16d))+_0x5ca117+')',_0x23221d[_0x4696e7(0x15f)],_0x23221d[_0x4696e7(0x12b)]);_0x462883[_0x4696e7(0x16f)](_0x5c3e1a,_0xb75ced);}else _0x462883['XPIkj'](_0x5c3e1a,_0x23221d);}});});}try{return await _0x462883[_0x4a03a3(0x12a)](_0x274621);}catch(_0x3de202){if(_0x462883[_0x4a03a3(0xe4)](_0x3de202,ClickUpServiceError)&&_0x3de202['code']===ErrorCode[_0x4a03a3(0x151)+_0x4a03a3(0x114)])return this[_0x4a03a3(0x158)+'r'][_0x4a03a3(0x10a)](_0x4a03a3(0x10e)+_0x4a03a3(0x147)+_0x4a03a3(0x10d)+_0x4a03a3(0x12c)+_0x4a03a3(0xf8)+_0x4a03a3(0x111)+_0x4a03a3(0x13e)+_0x4a03a3(0xfe)+_0x4a03a3(0x12f),{'reset':this[_0x4a03a3(0x155)+_0x4a03a3(0x11f)+_0x4a03a3(0x138)+_0x4a03a3(0x128)],'queueLength':this[_0x4a03a3(0x12d)+_0x4a03a3(0x169)+'ue'][_0x4a03a3(0x13d)+'h']}),!this[_0x4a03a3(0xf2)+_0x4a03a3(0x153)+'Queue']&&(this[_0x4a03a3(0xf2)+_0x4a03a3(0x153)+'Queue']=!![],this['proce'+'ssQue'+'ue']()[_0x4a03a3(0xe5)](_0xabeb29=>{const _0x17d61d=_0x4a03a3;this[_0x17d61d(0x158)+'r'][_0x17d61d(0x11e)]('Error'+'\x20proc'+_0x17d61d(0x161)+_0x17d61d(0x121)+_0x17d61d(0x13a)+_0x17d61d(0xf7),_0xabeb29);})),new Promise((_0x51f942,_0x4c844c)=>{const _0x528e4c=_0x4a03a3;this['reque'+_0x528e4c(0x169)+'ue'][_0x528e4c(0xfc)](async()=>{const _0x11a4be=_0x528e4c;try{const _0x40763d=await _0x462883[_0x11a4be(0x166)](_0x274621);_0x462883['XPIkj'](_0x51f942,_0x40763d);}catch(_0x53fea4){_0x462883[_0x11a4be(0x14e)](_0x4c844c,_0x53fea4);}});});throw _0x3de202;}}async[a0_0x2a3704(0xf2)+a0_0x2a3704(0x11a)+'ue'](){const _0x4ed9f2=a0_0x2a3704,_0xf40c5d={'lQmOX':function(_0x5d689e,_0x446efe){return _0x5d689e===_0x446efe;},'YVNyt':function(_0x75feed,_0x5ccce6){return _0x75feed*_0x5ccce6;},'VNqpg':_0x4ed9f2(0x149)+_0x4ed9f2(0x143)+_0x4ed9f2(0x14b)+_0x4ed9f2(0x135)+_0x4ed9f2(0x159)+_0x4ed9f2(0x122)};if(this[_0x4ed9f2(0x12d)+_0x4ed9f2(0x169)+'ue'][_0x4ed9f2(0x13d)+'h']===0x0){this[_0x4ed9f2(0x158)+'r'][_0x4ed9f2(0x16a)](_0x4ed9f2(0x157)+_0x4ed9f2(0xe2)+'y,\x20ex'+_0x4ed9f2(0x136)+_0x4ed9f2(0x135)+_0x4ed9f2(0xf9)+_0x4ed9f2(0x148)+_0x4ed9f2(0x126)+'de'),this[_0x4ed9f2(0xf2)+_0x4ed9f2(0x153)+_0x4ed9f2(0x157)]=![];return;}const _0x5b0a8a=this['reque'+_0x4ed9f2(0x169)+'ue'][_0x4ed9f2(0x13d)+'h'];this[_0x4ed9f2(0x158)+'r']['debug'](_0x4ed9f2(0xe6)+_0x4ed9f2(0x153)+_0x4ed9f2(0x15c)+'est\x20q'+_0x4ed9f2(0xea)+'('+_0x5b0a8a+(_0x4ed9f2(0x15d)+'s)'));const _0x3c2348=Date[_0x4ed9f2(0x156)]();try{const _0x5c8593=this['reque'+_0x4ed9f2(0x169)+'ue'][_0x4ed9f2(0x144)]();if(_0x5c8593){const _0x3d85eb=this[_0x4ed9f2(0x105)+_0x4ed9f2(0x146)+_0x4ed9f2(0x10f)](_0x5b0a8a);await new Promise(_0x40490c=>setTimeout(_0x40490c,_0x3d85eb)),await _0x5c8593();}}catch(_0x40bf85){_0x40bf85 instanceof ClickUpServiceError&&_0xf40c5d[_0x4ed9f2(0x13f)](_0x40bf85[_0x4ed9f2(0x15f)],ErrorCode['RATE_'+'LIMIT'])?(this['reque'+_0x4ed9f2(0x118)+_0x4ed9f2(0x107)]=Math[_0x4ed9f2(0x129)](_0xf40c5d[_0x4ed9f2(0xe7)](this[_0x4ed9f2(0x12d)+_0x4ed9f2(0x118)+_0x4ed9f2(0x107)],1.5),0x2710),this[_0x4ed9f2(0x158)+'r'][_0x4ed9f2(0x10a)](_0x4ed9f2(0x10e)+_0x4ed9f2(0x147)+_0x4ed9f2(0x12e)+_0x4ed9f2(0x10b)+_0x4ed9f2(0xeb)+'ue\x20pr'+_0x4ed9f2(0x15b)+'ing,\x20'+_0x4ed9f2(0x164)+'asing'+_0x4ed9f2(0xfa)+_0x4ed9f2(0x131)+this[_0x4ed9f2(0x12d)+'stSpa'+_0x4ed9f2(0x107)]+'ms')):this[_0x4ed9f2(0x158)+'r'][_0x4ed9f2(0x11e)](_0xf40c5d[_0x4ed9f2(0x101)],_0x40bf85);}finally{const _0x3426c6=Date[_0x4ed9f2(0x156)]()-_0x3c2348;this[_0x4ed9f2(0x158)+'r'][_0x4ed9f2(0xf5)](_0x4ed9f2(0x157)+'\x20item'+'\x20proc'+_0x4ed9f2(0x109)+_0x4ed9f2(0x117)+_0x3426c6+'ms,\x20'+this[_0x4ed9f2(0x12d)+'stQue'+'ue'][_0x4ed9f2(0x13d)+'h']+(_0x4ed9f2(0x15d)+_0x4ed9f2(0x120)+'ainin'+'g')),setTimeout(()=>this[_0x4ed9f2(0xf2)+_0x4ed9f2(0x11a)+'ue'](),this[_0x4ed9f2(0x12d)+_0x4ed9f2(0x118)+_0x4ed9f2(0x107)]);}}[a0_0x2a3704(0x105)+a0_0x2a3704(0x146)+'elay'](_0x3c459c){const _0x58d120=a0_0x2a3704,_0xb91e1a={'cjrMn':function(_0x411f09,_0x412171){return _0x411f09>_0x412171;},'kzWvc':function(_0x135696,_0x284d98){return _0x135696>_0x284d98;}};let _0x3b859f=this[_0x58d120(0x12d)+_0x58d120(0x118)+_0x58d120(0x107)];if(_0xb91e1a[_0x58d120(0x145)](_0x3c459c,0x14))_0x3b859f=this[_0x58d120(0x12d)+_0x58d120(0x118)+_0x58d120(0x107)]*0x2;else _0xb91e1a[_0x58d120(0x104)](_0x3c459c,0xa)&&(_0x3b859f=this['reque'+_0x58d120(0x118)+'cing']*1.5);return _0x3b859f;}}