@univer-cli/generic-keyed-instance-pool 1.5.2 → 1.6.0

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- (function(_0x41f6ca,_0x452bc6){const _0xbb4006=_0x3886,_0x183dbb=_0x41f6ca();while(!![]){try{const _0x5aedd8=-parseInt(_0xbb4006(0x7e))/0x1+parseInt(_0xbb4006(0x86))/0x2+parseInt(_0xbb4006(0x80))/0x3+parseInt(_0xbb4006(0x7a))/0x4*(parseInt(_0xbb4006(0x93))/0x5)+-parseInt(_0xbb4006(0x90))/0x6+-parseInt(_0xbb4006(0x7f))/0x7+parseInt(_0xbb4006(0x77))/0x8;if(_0x5aedd8===_0x452bc6)break;else _0x183dbb['push'](_0x183dbb['shift']());}catch(_0x26c936){_0x183dbb['push'](_0x183dbb['shift']());}}}(_0x3df5,0xed1c7));var e=class extends Error{['code'];constructor(_0x4cf384,_0xe58d07,_0x128356){const _0x1c06ad=_0x3886;super(_0xe58d07,_0x128356),this[_0x1c06ad(0x71)]=_0x1c06ad(0x89),this[_0x1c06ad(0x78)]=_0x4cf384;}},t=0x493e0,n=0x14;function r(_0x53ca1d){const _0x16f4af=_0x3886;let _0x4b71d1=new Map(),_0x442352=new Set(),_0x254066=new Map(),_0x192fec=_0x53ca1d[_0x16f4af(0x7c)]?.['idleTtlMs']??t,_0x5b00ea=_0x53ca1d[_0x16f4af(0x7c)]?.[_0x16f4af(0x7d)]??n,_0x4d276e=!0x1,_0x495c7f,_0x33589d=0x0;i(_0x192fec,_0x5b00ea);let _0x404fc8={async 'acquire'(_0xad2229){const _0x3b53b9=_0x16f4af;_0x3c9715(),a(_0xad2229);let _0x3b156f=_0x4b71d1[_0x3b53b9(0xa0)](_0xad2229[_0x3b53b9(0xa9)]);if(_0x3b156f)return _0x3b156f[_0x3b53b9(0x6f)]?await o(_0xad2229,_0x3b156f[_0x3b53b9(0x87)]):(c(_0x3b156f),_0x3b156f[_0x3b53b9(0x6f)]=!0x0,_0x5bc6fd({'key':_0xad2229['key'],'type':_0x3b53b9(0x6d)}),_0x3241d7(_0xad2229['key'],_0x3b156f));let _0x54aa3b=_0x254066['get'](_0xad2229[_0x3b53b9(0xa9)]);if(_0x54aa3b)return await o(_0xad2229,_0x54aa3b);let _0x53ab46,_0x3c03c8=new Promise(_0x5048cb=>{_0x53ab46=_0x5048cb;});_0x442352[_0x3b53b9(0xa6)](_0x3c03c8),_0x254066[_0x3b53b9(0xa2)](_0xad2229['key'],[]);let _0x115e86=Date['now']();_0x5bc6fd({'key':_0xad2229[_0x3b53b9(0xa9)],'type':_0x3b53b9(0x7b)});try{await _0x5624a7();let _0x453ae9=await _0x53ca1d[_0x3b53b9(0x95)][_0x3b53b9(0x73)](_0xad2229);if(_0x4d276e)throw await _0x53ca1d[_0x3b53b9(0x95)][_0x3b53b9(0x70)]({'instance':_0x453ae9,'key':_0xad2229[_0x3b53b9(0xa9)]}),l();let _0x6a6a10={'busy':!0x0,'closed':!0x1,'instance':_0x453ae9,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x254066[_0x3b53b9(0xa0)](_0xad2229[_0x3b53b9(0xa9)])??[]};return _0x4b71d1[_0x3b53b9(0xa2)](_0xad2229['key'],_0x6a6a10),_0x5bc6fd({'durationMs':Date[_0x3b53b9(0x88)]()-_0x115e86,'key':_0xad2229[_0x3b53b9(0xa9)],'type':_0x3b53b9(0x8c)}),_0x3241d7(_0xad2229[_0x3b53b9(0xa9)],_0x6a6a10);}catch(_0x481286){throw s(_0x254066[_0x3b53b9(0xa0)](_0xad2229[_0x3b53b9(0xa9)])??[],_0x481286),_0x481286;}finally{_0x254066[_0x3b53b9(0x85)](_0xad2229[_0x3b53b9(0xa9)]),_0x442352[_0x3b53b9(0x85)](_0x3c03c8),_0x53ab46();}},async 'close'(){if(_0x495c7f)return await _0x495c7f;_0x4d276e=!0x0,_0x495c7f=_0x2db7fe(),await _0x495c7f;}};return _0x404fc8;function _0x3241d7(_0x385157,_0x1f3d6f){let _0x3804e9=!0x1;return{'instance':_0x1f3d6f['instance'],'key':_0x385157,async 'invalidate'(){const _0x35d426=_0x3886;_0x3804e9||(_0x3804e9=!0x0,_0x1f3d6f[_0x35d426(0x76)]=!0x0,await _0x4950fc(_0x385157,_0x1f3d6f,_0x35d426(0x99)));},async 'release'(){const _0x4b8645=_0x3886;if(_0x3804e9||(_0x3804e9=!0x0,_0x1f3d6f[_0x4b8645(0x9e)]))return;if(_0x1f3d6f[_0x4b8645(0x76)]){await _0x4950fc(_0x385157,_0x1f3d6f,'invalidate');return;}let _0x38aceb=_0x1f3d6f['waiters'][_0x4b8645(0x74)]();_0x38aceb?_0x38aceb[_0x4b8645(0x75)](_0x3241d7(_0x385157,_0x1f3d6f)):(_0x1f3d6f[_0x4b8645(0x6f)]=!0x1,_0x1f3d6f[_0x4b8645(0xa7)]=++_0x33589d,_0x1fb53e(_0x385157,_0x1f3d6f));}};}async function _0x4950fc(_0x2d156d,_0x4c809f,_0x3b6911){const _0x11d4a9=_0x16f4af;let _0x3b029a=_0x4c809f[_0x11d4a9(0x87)]['splice'](0x0);_0x4b71d1[_0x11d4a9(0xa0)](_0x2d156d)===_0x4c809f&&_0x4b71d1[_0x11d4a9(0x85)](_0x2d156d);try{await _0x3f8f71(_0x2d156d,_0x4c809f,_0x3b6911);}finally{_0x3b6911&&_0x5bc6fd({'key':_0x2d156d,'reason':_0x3b6911,'type':_0x11d4a9(0xa5)}),_0x4d276e?s(_0x3b029a,l()):_0x5c4c4d(_0x3b029a);}}function _0x1fb53e(_0x40365f,_0x513a67){const _0x3c5278=_0x16f4af;c(_0x513a67),_0x513a67[_0x3c5278(0x9a)]=setTimeout(()=>{const _0x351d34=_0x3c5278;_0x513a67[_0x351d34(0x6f)]||_0x4b71d1[_0x351d34(0xa0)](_0x40365f)!==_0x513a67||(_0x4b71d1['delete'](_0x40365f),_0x3f8f71(_0x40365f,_0x513a67,_0x351d34(0x82))[_0x351d34(0x96)](()=>_0x5bc6fd({'key':_0x40365f,'reason':'ttl','type':_0x351d34(0xa5)}))[_0x351d34(0xa3)](()=>void 0x0));},_0x192fec),_0x513a67[_0x3c5278(0x9a)][_0x3c5278(0x81)]?.();}async function _0x5624a7(){const _0x483f5a=_0x16f4af;for(;_0x4b71d1[_0x483f5a(0xa1)]+_0x254066[_0x483f5a(0xa1)]>_0x5b00ea;){let _0x46e3f;for(let _0x56aa23 of _0x4b71d1)_0x56aa23[0x1][_0x483f5a(0x6f)]||(!_0x46e3f||_0x56aa23[0x1][_0x483f5a(0xa7)]<_0x46e3f[0x1][_0x483f5a(0xa7)])&&(_0x46e3f=_0x56aa23);if(!_0x46e3f)throw new e(_0x483f5a(0x9b),_0x483f5a(0xa4)+_0x5b00ea+_0x483f5a(0x9c));_0x4b71d1[_0x483f5a(0x85)](_0x46e3f[0x0]),await _0x3f8f71(_0x46e3f[0x0],_0x46e3f[0x1],'lru'),_0x5bc6fd({'key':_0x46e3f[0x0],'reason':'lru','type':_0x483f5a(0xa5)});}}async function _0x2db7fe(){const _0x5ee62b=_0x16f4af;let _0x361b33=l(),_0x2843db=[..._0x4b71d1[_0x5ee62b(0x9d)]()];for(let [,_0x59a0bd]of _0x2843db)s(_0x59a0bd['waiters'],_0x361b33);for(let _0x2be566 of _0x254066[_0x5ee62b(0x6e)]())s(_0x2be566,_0x361b33);_0x4b71d1[_0x5ee62b(0x91)]();let _0xc5a3cd=(await Promise[_0x5ee62b(0x8a)]([..._0x2843db[_0x5ee62b(0x94)](async([_0x297eca,_0x1f9924])=>await _0x3f8f71(_0x297eca,_0x1f9924)),..._0x442352]))['find'](_0x3989a7=>_0x3989a7[_0x5ee62b(0x83)]===_0x5ee62b(0x8d));if(_0xc5a3cd?.[_0x5ee62b(0x83)]===_0x5ee62b(0x8d))throw _0xc5a3cd[_0x5ee62b(0x8b)];}function _0x5bc6fd(_0xa60d7c){try{_0x53ca1d['onEvent']?.(_0xa60d7c);}catch{}}function _0x3c9715(){if(_0x4d276e)throw l();}function _0x5c4c4d(_0x33756f){const _0x43708a=_0x16f4af;for(let _0x103e23 of _0x33756f)_0x404fc8[_0x43708a(0x9f)](_0x103e23[_0x43708a(0x8e)])[_0x43708a(0x96)](_0x103e23[_0x43708a(0x75)],_0x103e23['reject']);}async function _0x3f8f71(_0x786c42,_0x4b2067,_0x264736){const _0x3c0300=_0x16f4af;_0x4b2067[_0x3c0300(0x9e)]||(_0x4b2067['closed']=!0x0,c(_0x4b2067),_0x264736&&_0x5bc6fd({'key':_0x786c42,'reason':_0x264736,'type':_0x3c0300(0xa8)}),await _0x53ca1d[_0x3c0300(0x95)][_0x3c0300(0x70)]({'instance':_0x4b2067[_0x3c0300(0x97)],'key':_0x786c42}));}}function i(_0x148a4b,_0x4c5b7c){const _0x1636ad=_0x3886;if(!Number['isFinite'](_0x148a4b)||_0x148a4b<0x0)throw new e(_0x1636ad(0x98),_0x1636ad(0x8f));if(!Number[_0x1636ad(0x84)](_0x4c5b7c)||_0x4c5b7c<=0x0)throw new e(_0x1636ad(0x98),'cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function _0x3df5(){const _0x14d8b3=['invalidated','47282664IlIbtc','code','splice','49832xgprlg','create-start','cache','maxEntries','1889667eNycuM','13067873CJWOxH','958545fnKcQm','unref','ttl','status','isSafeInteger','delete','183534kRIlcV','waiters','now','InstancePoolError','allSettled','reason','create-complete','rejected','input','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','9712908QitOrO','clear','length','10VbnEpy','map','factory','then','instance','INSTANCE_POOL_INVALID_INPUT','invalidate','idleTimer','INSTANCE_POOL_CAPACITY_EXCEEDED','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','entries','closed','acquire','get','size','set','catch','Instance\x20pool\x20capacity\x20','evicted','add','lastIdleSequence','destroy-start','key','cache-hit','values','busy','destroy','name','reject','create','shift','resolve'];_0x3df5=function(){return _0x14d8b3;};return _0x3df5();}function a(_0x3d9be2){const _0x35e2a2=_0x3886;if(_0x3d9be2[_0x35e2a2(0xa9)][_0x35e2a2(0x92)]===0x0)throw new e(_0x35e2a2(0x98),'key\x20must\x20not\x20be\x20empty');}function o(_0x2af5d7,_0x34f753){return new Promise((_0x13d294,_0x4038eb)=>{_0x34f753['push']({'input':_0x2af5d7,'reject':_0x4038eb,'resolve':_0x13d294});});}function _0x3886(_0x3e4e0c,_0x36ecdf){_0x3e4e0c=_0x3e4e0c-0x6d;const _0x3df5a8=_0x3df5();let _0x3886b2=_0x3df5a8[_0x3e4e0c];return _0x3886b2;}function s(_0x522062,_0x5bb5e3){const _0x186c89=_0x3886;for(let _0x30b748 of _0x522062[_0x186c89(0x79)](0x0))_0x30b748[_0x186c89(0x72)](_0x5bb5e3);}function c(_0x5683f5){const _0x1b1378=_0x3886;_0x5683f5[_0x1b1378(0x9a)]!==void 0x0&&(clearTimeout(_0x5683f5['idleTimer']),delete _0x5683f5[_0x1b1378(0x9a)]);}function l(){return new e('INSTANCE_POOL_CLOSED','Instance\x20pool\x20is\x20closed');}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ const _0x1c83e2=_0xfd6e;(function(_0x3c76c9,_0xa7b337){const _0xdf9352=_0xfd6e,_0x1e48f4=_0x3c76c9();while(!![]){try{const _0x5ec824=-parseInt(_0xdf9352(0x11f))/0x1+-parseInt(_0xdf9352(0x136))/0x2*(parseInt(_0xdf9352(0x10c))/0x3)+-parseInt(_0xdf9352(0xff))/0x4+-parseInt(_0xdf9352(0x120))/0x5+parseInt(_0xdf9352(0x117))/0x6*(-parseInt(_0xdf9352(0x128))/0x7)+-parseInt(_0xdf9352(0x122))/0x8+parseInt(_0xdf9352(0x110))/0x9*(parseInt(_0xdf9352(0x138))/0xa);if(_0x5ec824===_0xa7b337)break;else _0x1e48f4['push'](_0x1e48f4['shift']());}catch(_0x33a9f9){_0x1e48f4['push'](_0x1e48f4['shift']());}}}(_0x49dc,0x79952));var e=class extends Error{[_0x1c83e2(0x101)];constructor(_0x4392a6,_0x508fcc,_0x357e59){const _0x3b2b21=_0x1c83e2;super(_0x508fcc,_0x357e59),this[_0x3b2b21(0x125)]='InstancePoolError',this[_0x3b2b21(0x101)]=_0x4392a6;}},t=0x493e0,n=0x14;function r(_0x1dc56a){const _0x36cc4c=_0x1c83e2;let _0x48f1ce=new Map(),_0x37ccbe=new Set(),_0x5d06bb=new Map(),_0x105f3a=_0x1dc56a['cache']?.['idleTtlMs']??t,_0x17e2f7=_0x1dc56a['cache']?.[_0x36cc4c(0x10e)]??n,_0x4fc7f0=!0x1,_0x2d7d16,_0x18e2a7=0x0;i(_0x105f3a,_0x17e2f7);let _0xd9329a={async 'acquire'(_0x4ce204){const _0x15ed89=_0x36cc4c;_0xee3a27(),a(_0x4ce204);let _0xbf269b=_0x48f1ce[_0x15ed89(0x102)](_0x4ce204[_0x15ed89(0x112)]);if(_0xbf269b)return _0xbf269b[_0x15ed89(0x119)]?await o(_0x4ce204,_0xbf269b[_0x15ed89(0x108)]):(c(_0xbf269b),_0xbf269b[_0x15ed89(0x119)]=!0x0,_0x1c143f({'key':_0x4ce204[_0x15ed89(0x112)],'type':'cache-hit'}),_0x1bc676(_0x4ce204[_0x15ed89(0x112)],_0xbf269b));let _0x1a3729=_0x5d06bb[_0x15ed89(0x102)](_0x4ce204['key']);if(_0x1a3729)return await o(_0x4ce204,_0x1a3729);let _0x40e1b2,_0x54b425=new Promise(_0x1647d4=>{_0x40e1b2=_0x1647d4;});_0x37ccbe[_0x15ed89(0x11a)](_0x54b425),_0x5d06bb[_0x15ed89(0x10d)](_0x4ce204[_0x15ed89(0x112)],[]);let _0x2a7b30=Date[_0x15ed89(0x132)]();_0x1c143f({'key':_0x4ce204[_0x15ed89(0x112)],'type':_0x15ed89(0x106)});try{await _0x757412();let _0x4dacb0=await _0x1dc56a[_0x15ed89(0x115)]['create'](_0x4ce204);if(_0x4fc7f0)throw await _0x1dc56a['factory'][_0x15ed89(0x11c)]({'instance':_0x4dacb0,'key':_0x4ce204['key']}),l();let _0x478495={'busy':!0x0,'closed':!0x1,'instance':_0x4dacb0,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x5d06bb['get'](_0x4ce204[_0x15ed89(0x112)])??[]};return _0x48f1ce[_0x15ed89(0x10d)](_0x4ce204[_0x15ed89(0x112)],_0x478495),_0x1c143f({'durationMs':Date[_0x15ed89(0x132)]()-_0x2a7b30,'key':_0x4ce204[_0x15ed89(0x112)],'type':_0x15ed89(0x12c)}),_0x1bc676(_0x4ce204[_0x15ed89(0x112)],_0x478495);}catch(_0x267aa0){throw s(_0x5d06bb[_0x15ed89(0x102)](_0x4ce204[_0x15ed89(0x112)])??[],_0x267aa0),_0x267aa0;}finally{_0x5d06bb[_0x15ed89(0x121)](_0x4ce204[_0x15ed89(0x112)]),_0x37ccbe['delete'](_0x54b425),_0x40e1b2();}},async 'close'(){if(_0x2d7d16)return await _0x2d7d16;_0x4fc7f0=!0x0,_0x2d7d16=_0x529dc4(),await _0x2d7d16;}};return _0xd9329a;function _0x1bc676(_0x1458ba,_0x3ccb32){const _0x2940ac=_0x36cc4c;let _0x458730=!0x1;return{'instance':_0x3ccb32[_0x2940ac(0x126)],'key':_0x1458ba,async 'invalidate'(){const _0x4949c1=_0x2940ac;_0x458730||(_0x458730=!0x0,_0x3ccb32[_0x4949c1(0x105)]=!0x0,await _0x5e0eef(_0x1458ba,_0x3ccb32,_0x4949c1(0x10a)));},async 'release'(){const _0x284a1d=_0x2940ac;if(_0x458730||(_0x458730=!0x0,_0x3ccb32[_0x284a1d(0x133)]))return;if(_0x3ccb32[_0x284a1d(0x105)]){await _0x5e0eef(_0x1458ba,_0x3ccb32,_0x284a1d(0x10a));return;}let _0x4fd01c=_0x3ccb32[_0x284a1d(0x108)][_0x284a1d(0x134)]();_0x4fd01c?_0x4fd01c[_0x284a1d(0x111)](_0x1bc676(_0x1458ba,_0x3ccb32)):(_0x3ccb32[_0x284a1d(0x119)]=!0x1,_0x3ccb32[_0x284a1d(0x137)]=++_0x18e2a7,_0x468b43(_0x1458ba,_0x3ccb32));}};}async function _0x5e0eef(_0x4ea28e,_0x55550f,_0x33be2a){const _0x3b195e=_0x36cc4c;let _0x14bd97=_0x55550f[_0x3b195e(0x108)][_0x3b195e(0x10b)](0x0);_0x48f1ce[_0x3b195e(0x102)](_0x4ea28e)===_0x55550f&&_0x48f1ce[_0x3b195e(0x121)](_0x4ea28e);try{await _0x40e268(_0x4ea28e,_0x55550f,_0x33be2a);}finally{_0x33be2a&&_0x1c143f({'key':_0x4ea28e,'reason':_0x33be2a,'type':_0x3b195e(0x124)}),_0x4fc7f0?s(_0x14bd97,l()):_0x137249(_0x14bd97);}}function _0x468b43(_0x2fcf3a,_0x42419e){const _0x3bdbda=_0x36cc4c;c(_0x42419e),_0x42419e[_0x3bdbda(0x135)]=setTimeout(()=>{const _0x4f78d9=_0x3bdbda;_0x42419e[_0x4f78d9(0x119)]||_0x48f1ce[_0x4f78d9(0x102)](_0x2fcf3a)!==_0x42419e||(_0x48f1ce[_0x4f78d9(0x121)](_0x2fcf3a),_0x40e268(_0x2fcf3a,_0x42419e,_0x4f78d9(0x113))[_0x4f78d9(0x130)](()=>_0x1c143f({'key':_0x2fcf3a,'reason':_0x4f78d9(0x113),'type':_0x4f78d9(0x124)}))[_0x4f78d9(0x12d)](()=>void 0x0));},_0x105f3a),_0x42419e[_0x3bdbda(0x135)][_0x3bdbda(0x100)]?.();}async function _0x757412(){const _0x2deac0=_0x36cc4c;for(;_0x48f1ce[_0x2deac0(0x12b)]+_0x5d06bb['size']>_0x17e2f7;){let _0x36f1ab;for(let _0x318a53 of _0x48f1ce)_0x318a53[0x1][_0x2deac0(0x119)]||(!_0x36f1ab||_0x318a53[0x1][_0x2deac0(0x137)]<_0x36f1ab[0x1][_0x2deac0(0x137)])&&(_0x36f1ab=_0x318a53);if(!_0x36f1ab)throw new e(_0x2deac0(0x12a),'Instance\x20pool\x20capacity\x20'+_0x17e2f7+_0x2deac0(0x109));_0x48f1ce[_0x2deac0(0x121)](_0x36f1ab[0x0]),await _0x40e268(_0x36f1ab[0x0],_0x36f1ab[0x1],'lru'),_0x1c143f({'key':_0x36f1ab[0x0],'reason':_0x2deac0(0x131),'type':_0x2deac0(0x124)});}}async function _0x529dc4(){const _0x2bfb89=_0x36cc4c;let _0x56fe11=l(),_0x8fafd0=[..._0x48f1ce['entries']()];for(let [,_0x42b659]of _0x8fafd0)s(_0x42b659[_0x2bfb89(0x108)],_0x56fe11);for(let _0x5c0a8e of _0x5d06bb[_0x2bfb89(0x13a)]())s(_0x5c0a8e,_0x56fe11);_0x48f1ce[_0x2bfb89(0x104)]();let _0x224298=(await Promise[_0x2bfb89(0x11d)]([..._0x8fafd0[_0x2bfb89(0x118)](async([_0x4863ab,_0x213b77])=>await _0x40e268(_0x4863ab,_0x213b77)),..._0x37ccbe]))[_0x2bfb89(0x129)](_0x40fc16=>_0x40fc16[_0x2bfb89(0xfe)]===_0x2bfb89(0x116));if(_0x224298?.[_0x2bfb89(0xfe)]===_0x2bfb89(0x116))throw _0x224298[_0x2bfb89(0x12e)];}function _0x1c143f(_0x10aa99){try{_0x1dc56a['onEvent']?.(_0x10aa99);}catch{}}function _0xee3a27(){if(_0x4fc7f0)throw l();}function _0x137249(_0x548daf){const _0x59d6b4=_0x36cc4c;for(let _0x45513e of _0x548daf)_0xd9329a['acquire'](_0x45513e[_0x59d6b4(0x11b)])[_0x59d6b4(0x130)](_0x45513e[_0x59d6b4(0x111)],_0x45513e['reject']);}async function _0x40e268(_0x1ecebc,_0x166897,_0x5a0066){const _0x1385ef=_0x36cc4c;_0x166897['closed']||(_0x166897[_0x1385ef(0x133)]=!0x0,c(_0x166897),_0x5a0066&&_0x1c143f({'key':_0x1ecebc,'reason':_0x5a0066,'type':_0x1385ef(0x123)}),await _0x1dc56a['factory']['destroy']({'instance':_0x166897['instance'],'key':_0x1ecebc}));}}function i(_0x6e7992,_0x4da3d4){const _0x2e1dac=_0x1c83e2;if(!Number[_0x2e1dac(0xfd)](_0x6e7992)||_0x6e7992<0x0)throw new e(_0x2e1dac(0x107),_0x2e1dac(0x10f));if(!Number[_0x2e1dac(0x12f)](_0x4da3d4)||_0x4da3d4<=0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0x2e1dac(0x114));}function a(_0x1d5e5a){const _0x49be0c=_0x1c83e2;if(_0x1d5e5a[_0x49be0c(0x112)][_0x49be0c(0x103)]===0x0)throw new e(_0x49be0c(0x107),'key\x20must\x20not\x20be\x20empty');}function o(_0x265bd1,_0x7dc053){return new Promise((_0x4b0423,_0x2067fc)=>{_0x7dc053['push']({'input':_0x265bd1,'reject':_0x2067fc,'resolve':_0x4b0423});});}function s(_0x39b593,_0x4bf63c){const _0x2a2af6=_0x1c83e2;for(let _0x9ebaab of _0x39b593[_0x2a2af6(0x10b)](0x0))_0x9ebaab[_0x2a2af6(0x139)](_0x4bf63c);}function c(_0x2a0255){const _0x896d78=_0x1c83e2;_0x2a0255['idleTimer']!==void 0x0&&(clearTimeout(_0x2a0255['idleTimer']),delete _0x2a0255[_0x896d78(0x135)]);}function _0x49dc(){const _0x3ffc9=['isFinite','status','1064056KWuVLh','unref','code','get','length','clear','invalidated','create-start','INSTANCE_POOL_INVALID_INPUT','waiters','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','invalidate','splice','39EKfxVp','set','maxEntries','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','13854978RbqslK','resolve','key','ttl','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','factory','rejected','222xljLoq','map','busy','add','input','destroy','allSettled','Instance\x20pool\x20is\x20closed','219692iDHhCV','1437130BEumuG','delete','3242216CMiyIh','destroy-start','evicted','name','instance','INSTANCE_POOL_CLOSED','105581mOCPBa','find','INSTANCE_POOL_CAPACITY_EXCEEDED','size','create-complete','catch','reason','isSafeInteger','then','lru','now','closed','shift','idleTimer','129908RrMqvF','lastIdleSequence','20llNPEL','reject','values'];_0x49dc=function(){return _0x3ffc9;};return _0x49dc();}function l(){const _0x5c7644=_0x1c83e2;return new e(_0x5c7644(0x127),_0x5c7644(0x11e));}function _0xfd6e(_0xc7c25a,_0x1edd40){_0xc7c25a=_0xc7c25a-0xfd;const _0x49dcf3=_0x49dc();let _0xfd6eb=_0x49dcf3[_0xc7c25a];return _0xfd6eb;}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/generic-keyed-instance-pool",
3
3
  "type": "module",
4
- "version": "1.5.2",
4
+ "version": "1.6.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",