@univer-cli/generic-keyed-instance-pool 1.0.3 → 1.1.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(_0x28922a,_0x5dbfbf){const _0x456943=_0x3b07,_0x22b42b=_0x28922a();while(!![]){try{const _0x5504ae=parseInt(_0x456943(0x21b))/0x1+parseInt(_0x456943(0x1ef))/0x2+parseInt(_0x456943(0x1f8))/0x3*(parseInt(_0x456943(0x21f))/0x4)+-parseInt(_0x456943(0x20c))/0x5+-parseInt(_0x456943(0x1f1))/0x6*(-parseInt(_0x456943(0x1ed))/0x7)+parseInt(_0x456943(0x209))/0x8*(parseInt(_0x456943(0x1fb))/0x9)+-parseInt(_0x456943(0x228))/0xa*(parseInt(_0x456943(0x1f0))/0xb);if(_0x5504ae===_0x5dbfbf)break;else _0x22b42b['push'](_0x22b42b['shift']());}catch(_0x11c7c0){_0x22b42b['push'](_0x22b42b['shift']());}}}(_0x3a4d,0xa0d4e));var e=class extends Error{['code'];constructor(_0x331bac,_0x258d1c,_0x5b6043){const _0x12d575=_0x3b07;super(_0x258d1c,_0x5b6043),this['name']='InstancePoolError',this[_0x12d575(0x1f4)]=_0x331bac;}},t=0x493e0,n=0x14;function r(_0x538e9b){const _0x253b26=_0x3b07;let _0x23dc9c=new Map(),_0x44e294=new Set(),_0x4d0a1e=new Map(),_0x457a2b=_0x538e9b[_0x253b26(0x215)]?.[_0x253b26(0x216)]??t,_0x5b8053=_0x538e9b[_0x253b26(0x215)]?.[_0x253b26(0x207)]??n,_0x279bc6=!0x1,_0x5da68b,_0x21edf4=0x0;i(_0x457a2b,_0x5b8053);let _0x36de56={async 'acquire'(_0x5860ca){const _0x59c061=_0x253b26;_0x52f60a(),a(_0x5860ca);let _0x366860=_0x23dc9c[_0x59c061(0x1f3)](_0x5860ca[_0x59c061(0x20f)]);if(_0x366860)return _0x366860[_0x59c061(0x220)]?await o(_0x5860ca,_0x366860[_0x59c061(0x1ff)]):(c(_0x366860),_0x366860[_0x59c061(0x220)]=!0x0,_0x49212a({'key':_0x5860ca[_0x59c061(0x20f)],'type':_0x59c061(0x211)}),_0x4b6517(_0x5860ca[_0x59c061(0x20f)],_0x366860));let _0x3423f0=_0x4d0a1e[_0x59c061(0x1f3)](_0x5860ca['key']);if(_0x3423f0)return await o(_0x5860ca,_0x3423f0);let _0x321d04,_0x11cdcb=new Promise(_0x46a6c7=>{_0x321d04=_0x46a6c7;});_0x44e294['add'](_0x11cdcb),_0x4d0a1e[_0x59c061(0x229)](_0x5860ca['key'],[]);let _0x1ea8f9=Date[_0x59c061(0x210)]();_0x49212a({'key':_0x5860ca[_0x59c061(0x20f)],'type':'create-start'});try{await _0x4fbb44();let _0x50e8ae=await _0x538e9b[_0x59c061(0x223)]['create'](_0x5860ca);if(_0x279bc6)throw await _0x538e9b[_0x59c061(0x223)][_0x59c061(0x214)]({'instance':_0x50e8ae,'key':_0x5860ca['key']}),l();let _0x47f394={'busy':!0x0,'closed':!0x1,'instance':_0x50e8ae,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x4d0a1e[_0x59c061(0x1f3)](_0x5860ca[_0x59c061(0x20f)])??[]};return _0x23dc9c[_0x59c061(0x229)](_0x5860ca[_0x59c061(0x20f)],_0x47f394),_0x49212a({'durationMs':Date[_0x59c061(0x210)]()-_0x1ea8f9,'key':_0x5860ca[_0x59c061(0x20f)],'type':'create-complete'}),_0x4b6517(_0x5860ca['key'],_0x47f394);}catch(_0x539061){throw s(_0x4d0a1e[_0x59c061(0x1f3)](_0x5860ca[_0x59c061(0x20f)])??[],_0x539061),_0x539061;}finally{_0x4d0a1e[_0x59c061(0x204)](_0x5860ca[_0x59c061(0x20f)]),_0x44e294[_0x59c061(0x204)](_0x11cdcb),_0x321d04();}},async 'close'(){if(_0x5da68b)return await _0x5da68b;_0x279bc6=!0x0,_0x5da68b=_0x331053(),await _0x5da68b;}};return _0x36de56;function _0x4b6517(_0x252045,_0x486cc7){const _0x3f2559=_0x253b26;let _0x171902=!0x1;return{'instance':_0x486cc7[_0x3f2559(0x222)],'key':_0x252045,async 'invalidate'(){const _0x5bf839=_0x3f2559;_0x171902||(_0x171902=!0x0,_0x486cc7[_0x5bf839(0x225)]=!0x0,await _0x23c2f4(_0x252045,_0x486cc7,_0x5bf839(0x20d)));},async 'release'(){const _0x4d64ad=_0x3f2559;if(_0x171902||(_0x171902=!0x0,_0x486cc7['closed']))return;if(_0x486cc7[_0x4d64ad(0x225)]){await _0x23c2f4(_0x252045,_0x486cc7,_0x4d64ad(0x20d));return;}let _0x571c09=_0x486cc7[_0x4d64ad(0x1ff)][_0x4d64ad(0x201)]();_0x571c09?_0x571c09['resolve'](_0x4b6517(_0x252045,_0x486cc7)):(_0x486cc7[_0x4d64ad(0x220)]=!0x1,_0x486cc7[_0x4d64ad(0x200)]=++_0x21edf4,_0x19759e(_0x252045,_0x486cc7));}};}async function _0x23c2f4(_0x2ea0f6,_0x482861,_0x5a4b40){const _0x5e0a0a=_0x253b26;let _0x5e35c3=_0x482861[_0x5e0a0a(0x1ff)][_0x5e0a0a(0x221)](0x0);_0x23dc9c[_0x5e0a0a(0x1f3)](_0x2ea0f6)===_0x482861&&_0x23dc9c[_0x5e0a0a(0x204)](_0x2ea0f6);try{await _0x4ba81c(_0x2ea0f6,_0x482861,_0x5a4b40);}finally{_0x5a4b40&&_0x49212a({'key':_0x2ea0f6,'reason':_0x5a4b40,'type':'evicted'}),_0x279bc6?s(_0x5e35c3,l()):_0x15bd65(_0x5e35c3);}}function _0x19759e(_0x1dad9f,_0x4b36f4){const _0x1ed2dc=_0x253b26;c(_0x4b36f4),_0x4b36f4[_0x1ed2dc(0x218)]=setTimeout(()=>{const _0xa5e908=_0x1ed2dc;_0x4b36f4['busy']||_0x23dc9c['get'](_0x1dad9f)!==_0x4b36f4||(_0x23dc9c[_0xa5e908(0x204)](_0x1dad9f),_0x4ba81c(_0x1dad9f,_0x4b36f4,'ttl')['then'](()=>_0x49212a({'key':_0x1dad9f,'reason':_0xa5e908(0x21e),'type':_0xa5e908(0x1f7)}))[_0xa5e908(0x20a)](()=>void 0x0));},_0x457a2b),_0x4b36f4[_0x1ed2dc(0x218)][_0x1ed2dc(0x1fd)]?.();}async function _0x4fbb44(){const _0x1ccae5=_0x253b26;for(;_0x23dc9c['size']+_0x4d0a1e[_0x1ccae5(0x203)]>_0x5b8053;){let _0x3c1b2c;for(let _0x507f70 of _0x23dc9c)_0x507f70[0x1][_0x1ccae5(0x220)]||(!_0x3c1b2c||_0x507f70[0x1][_0x1ccae5(0x200)]<_0x3c1b2c[0x1]['lastIdleSequence'])&&(_0x3c1b2c=_0x507f70);if(!_0x3c1b2c)throw new e(_0x1ccae5(0x1f2),'Instance\x20pool\x20capacity\x20'+_0x5b8053+_0x1ccae5(0x1ee));_0x23dc9c['delete'](_0x3c1b2c[0x0]),await _0x4ba81c(_0x3c1b2c[0x0],_0x3c1b2c[0x1],_0x1ccae5(0x226)),_0x49212a({'key':_0x3c1b2c[0x0],'reason':_0x1ccae5(0x226),'type':_0x1ccae5(0x1f7)});}}async function _0x331053(){const _0x13c108=_0x253b26;let _0x7673a1=l(),_0x14b7bc=[..._0x23dc9c[_0x13c108(0x1fc)]()];for(let [,_0x2ebb76]of _0x14b7bc)s(_0x2ebb76[_0x13c108(0x1ff)],_0x7673a1);for(let _0x32e736 of _0x4d0a1e[_0x13c108(0x213)]())s(_0x32e736,_0x7673a1);_0x23dc9c[_0x13c108(0x202)]();let _0x38ff0f=(await Promise[_0x13c108(0x219)]([..._0x14b7bc['map'](async([_0x355d7b,_0x1cf9c0])=>await _0x4ba81c(_0x355d7b,_0x1cf9c0)),..._0x44e294]))['find'](_0x5e5aa9=>_0x5e5aa9[_0x13c108(0x20e)]===_0x13c108(0x206));if(_0x38ff0f?.[_0x13c108(0x20e)]==='rejected')throw _0x38ff0f[_0x13c108(0x21a)];}function _0x49212a(_0x3a9196){const _0xe2dcd9=_0x253b26;try{_0x538e9b[_0xe2dcd9(0x1f9)]?.(_0x3a9196);}catch{}}function _0x52f60a(){if(_0x279bc6)throw l();}function _0x15bd65(_0x146aed){const _0x74b724=_0x253b26;for(let _0x2a02e0 of _0x146aed)_0x36de56[_0x74b724(0x212)](_0x2a02e0[_0x74b724(0x1f6)])[_0x74b724(0x1f5)](_0x2a02e0['resolve'],_0x2a02e0[_0x74b724(0x227)]);}async function _0x4ba81c(_0x4921c6,_0x46621f,_0x2f4acf){const _0x43be81=_0x253b26;_0x46621f[_0x43be81(0x208)]||(_0x46621f[_0x43be81(0x208)]=!0x0,c(_0x46621f),_0x2f4acf&&_0x49212a({'key':_0x4921c6,'reason':_0x2f4acf,'type':_0x43be81(0x224)}),await _0x538e9b['factory']['destroy']({'instance':_0x46621f[_0x43be81(0x222)],'key':_0x4921c6}));}}function i(_0x19f888,_0x27838a){const _0x6a0645=_0x3b07;if(!Number[_0x6a0645(0x21d)](_0x19f888)||_0x19f888<0x0)throw new e(_0x6a0645(0x217),_0x6a0645(0x21c));if(!Number['isSafeInteger'](_0x27838a)||_0x27838a<=0x0)throw new e(_0x6a0645(0x217),'cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function a(_0x428987){const _0xb73e38=_0x3b07;if(_0x428987[_0xb73e38(0x20f)][_0xb73e38(0x205)]===0x0)throw new e(_0xb73e38(0x217),_0xb73e38(0x1ec));}function o(_0x4c986d,_0xc13e50){return new Promise((_0x2a1bad,_0x24ec8d)=>{const _0x1a8fad=_0x3b07;_0xc13e50[_0x1a8fad(0x1fe)]({'input':_0x4c986d,'reject':_0x24ec8d,'resolve':_0x2a1bad});});}function _0x3b07(_0x4611cf,_0x5180cb){_0x4611cf=_0x4611cf-0x1ec;const _0x3a4d06=_0x3a4d();let _0x3b07dd=_0x3a4d06[_0x4611cf];return _0x3b07dd;}function _0x3a4d(){const _0x72fb34=['4497975NSzbfo','invalidate','status','key','now','cache-hit','acquire','values','destroy','cache','idleTtlMs','INSTANCE_POOL_INVALID_INPUT','idleTimer','allSettled','reason','859932rcxhQl','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','isFinite','ttl','13236CkvAeL','busy','splice','instance','factory','destroy-start','invalidated','lru','reject','22710NSWide','set','key\x20must\x20not\x20be\x20empty','175bAkCpP','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','748010vYrCUx','10175oHomKj','30270MLwkIb','INSTANCE_POOL_CAPACITY_EXCEEDED','get','code','then','input','evicted','1137FxNSyl','onEvent','Instance\x20pool\x20is\x20closed','67653TNadAC','entries','unref','push','waiters','lastIdleSequence','shift','clear','size','delete','length','rejected','maxEntries','closed','1112rkfGKP','catch','INSTANCE_POOL_CLOSED'];_0x3a4d=function(){return _0x72fb34;};return _0x3a4d();}function s(_0xd35b93,_0x23af31){const _0x32a824=_0x3b07;for(let _0x4bb184 of _0xd35b93[_0x32a824(0x221)](0x0))_0x4bb184['reject'](_0x23af31);}function c(_0x5e03f3){const _0x571ae0=_0x3b07;_0x5e03f3['idleTimer']!==void 0x0&&(clearTimeout(_0x5e03f3[_0x571ae0(0x218)]),delete _0x5e03f3[_0x571ae0(0x218)]);}function l(){const _0xc78c5f=_0x3b07;return new e(_0xc78c5f(0x20b),_0xc78c5f(0x1fa));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ const _0x3de2d2=_0x3858;(function(_0x484604,_0x2c8b7c){const _0x342572=_0x3858,_0x13fd5a=_0x484604();while(!![]){try{const _0x5ba447=parseInt(_0x342572(0x1e6))/0x1*(-parseInt(_0x342572(0x1be))/0x2)+-parseInt(_0x342572(0x1ee))/0x3+parseInt(_0x342572(0x1c0))/0x4*(-parseInt(_0x342572(0x1bd))/0x5)+parseInt(_0x342572(0x1e7))/0x6+-parseInt(_0x342572(0x1f3))/0x7*(parseInt(_0x342572(0x1ea))/0x8)+parseInt(_0x342572(0x1d6))/0x9+parseInt(_0x342572(0x1c1))/0xa;if(_0x5ba447===_0x2c8b7c)break;else _0x13fd5a['push'](_0x13fd5a['shift']());}catch(_0x54d0ac){_0x13fd5a['push'](_0x13fd5a['shift']());}}}(_0x2be5,0x96fe5));var e=class extends Error{[_0x3de2d2(0x1bb)];constructor(_0x3a1b6b,_0x51ea43,_0xd76070){const _0x419886=_0x3de2d2;super(_0x51ea43,_0xd76070),this[_0x419886(0x1ca)]=_0x419886(0x1db),this[_0x419886(0x1bb)]=_0x3a1b6b;}},t=0x493e0,n=0x14;function _0x3858(_0x19b83e,_0x2d6fbe){_0x19b83e=_0x19b83e-0x1b3;const _0x2be543=_0x2be5();let _0x3858e3=_0x2be543[_0x19b83e];return _0x3858e3;}function r(_0x17afed){const _0x5ce462=_0x3de2d2;let _0x263fda=new Map(),_0x5ad3a9=new Set(),_0x1a764c=new Map(),_0x15ee1e=_0x17afed[_0x5ce462(0x1c8)]?.['idleTtlMs']??t,_0x2af3ce=_0x17afed[_0x5ce462(0x1c8)]?.[_0x5ce462(0x1f2)]??n,_0xfc81f5=!0x1,_0x135331,_0x3b52d2=0x0;i(_0x15ee1e,_0x2af3ce);let _0x401ee6={async 'acquire'(_0x4fc06f){const _0x511bd4=_0x5ce462;_0x1bccd4(),a(_0x4fc06f);let _0x518c59=_0x263fda[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)]);if(_0x518c59)return _0x518c59[_0x511bd4(0x1ce)]?await o(_0x4fc06f,_0x518c59[_0x511bd4(0x1dd)]):(c(_0x518c59),_0x518c59['busy']=!0x0,_0x4e025b({'key':_0x4fc06f[_0x511bd4(0x1d3)],'type':_0x511bd4(0x1d7)}),_0x20fb6d(_0x4fc06f[_0x511bd4(0x1d3)],_0x518c59));let _0x3f1c47=_0x1a764c[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)]);if(_0x3f1c47)return await o(_0x4fc06f,_0x3f1c47);let _0x5eb47e,_0x53a97b=new Promise(_0x53e202=>{_0x5eb47e=_0x53e202;});_0x5ad3a9[_0x511bd4(0x1e3)](_0x53a97b),_0x1a764c[_0x511bd4(0x1ba)](_0x4fc06f['key'],[]);let _0x3f39fe=Date[_0x511bd4(0x1d0)]();_0x4e025b({'key':_0x4fc06f[_0x511bd4(0x1d3)],'type':_0x511bd4(0x1c3)});try{await _0x1838a6();let _0x154d35=await _0x17afed[_0x511bd4(0x1c4)][_0x511bd4(0x1e4)](_0x4fc06f);if(_0xfc81f5)throw await _0x17afed[_0x511bd4(0x1c4)]['destroy']({'instance':_0x154d35,'key':_0x4fc06f[_0x511bd4(0x1d3)]}),l();let _0x2497d1={'busy':!0x0,'closed':!0x1,'instance':_0x154d35,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x1a764c[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)])??[]};return _0x263fda[_0x511bd4(0x1ba)](_0x4fc06f['key'],_0x2497d1),_0x4e025b({'durationMs':Date[_0x511bd4(0x1d0)]()-_0x3f39fe,'key':_0x4fc06f[_0x511bd4(0x1d3)],'type':_0x511bd4(0x1c7)}),_0x20fb6d(_0x4fc06f[_0x511bd4(0x1d3)],_0x2497d1);}catch(_0x380cd7){throw s(_0x1a764c[_0x511bd4(0x1d1)](_0x4fc06f[_0x511bd4(0x1d3)])??[],_0x380cd7),_0x380cd7;}finally{_0x1a764c['delete'](_0x4fc06f[_0x511bd4(0x1d3)]),_0x5ad3a9[_0x511bd4(0x1b6)](_0x53a97b),_0x5eb47e();}},async 'close'(){if(_0x135331)return await _0x135331;_0xfc81f5=!0x0,_0x135331=_0x3c52a8(),await _0x135331;}};return _0x401ee6;function _0x20fb6d(_0x4f921a,_0x463545){const _0x3f710c=_0x5ce462;let _0x2f5640=!0x1;return{'instance':_0x463545[_0x3f710c(0x1c5)],'key':_0x4f921a,async 'invalidate'(){const _0x3fd66c=_0x3f710c;_0x2f5640||(_0x2f5640=!0x0,_0x463545[_0x3fd66c(0x1ef)]=!0x0,await _0x18d7c7(_0x4f921a,_0x463545,_0x3fd66c(0x1ec)));},async 'release'(){const _0x114fc0=_0x3f710c;if(_0x2f5640||(_0x2f5640=!0x0,_0x463545[_0x114fc0(0x1e1)]))return;if(_0x463545['invalidated']){await _0x18d7c7(_0x4f921a,_0x463545,_0x114fc0(0x1ec));return;}let _0x2691a7=_0x463545[_0x114fc0(0x1dd)][_0x114fc0(0x1b4)]();_0x2691a7?_0x2691a7['resolve'](_0x20fb6d(_0x4f921a,_0x463545)):(_0x463545['busy']=!0x1,_0x463545[_0x114fc0(0x1b8)]=++_0x3b52d2,_0x5819f5(_0x4f921a,_0x463545));}};}async function _0x18d7c7(_0x372df0,_0x4c0e8a,_0x40f520){const _0x79210a=_0x5ce462;let _0x100fba=_0x4c0e8a['waiters'][_0x79210a(0x1f1)](0x0);_0x263fda[_0x79210a(0x1d1)](_0x372df0)===_0x4c0e8a&&_0x263fda[_0x79210a(0x1b6)](_0x372df0);try{await _0x32a079(_0x372df0,_0x4c0e8a,_0x40f520);}finally{_0x40f520&&_0x4e025b({'key':_0x372df0,'reason':_0x40f520,'type':_0x79210a(0x1f5)}),_0xfc81f5?s(_0x100fba,l()):_0x50e3a6(_0x100fba);}}function _0x5819f5(_0x16bfea,_0x4cd137){const _0x4cad34=_0x5ce462;c(_0x4cd137),_0x4cd137[_0x4cad34(0x1cf)]=setTimeout(()=>{const _0x212a2f=_0x4cad34;_0x4cd137[_0x212a2f(0x1ce)]||_0x263fda[_0x212a2f(0x1d1)](_0x16bfea)!==_0x4cd137||(_0x263fda[_0x212a2f(0x1b6)](_0x16bfea),_0x32a079(_0x16bfea,_0x4cd137,_0x212a2f(0x1f0))[_0x212a2f(0x1e5)](()=>_0x4e025b({'key':_0x16bfea,'reason':_0x212a2f(0x1f0),'type':_0x212a2f(0x1f5)}))[_0x212a2f(0x1f4)](()=>void 0x0));},_0x15ee1e),_0x4cd137[_0x4cad34(0x1cf)]['unref']?.();}async function _0x1838a6(){const _0x7c0d68=_0x5ce462;for(;_0x263fda[_0x7c0d68(0x1dc)]+_0x1a764c[_0x7c0d68(0x1dc)]>_0x2af3ce;){let _0x32a48a;for(let _0x5f36dd of _0x263fda)_0x5f36dd[0x1]['busy']||(!_0x32a48a||_0x5f36dd[0x1]['lastIdleSequence']<_0x32a48a[0x1][_0x7c0d68(0x1b8)])&&(_0x32a48a=_0x5f36dd);if(!_0x32a48a)throw new e(_0x7c0d68(0x1e0),_0x7c0d68(0x1b7)+_0x2af3ce+_0x7c0d68(0x1d9));_0x263fda['delete'](_0x32a48a[0x0]),await _0x32a079(_0x32a48a[0x0],_0x32a48a[0x1],_0x7c0d68(0x1d4)),_0x4e025b({'key':_0x32a48a[0x0],'reason':_0x7c0d68(0x1d4),'type':'evicted'});}}async function _0x3c52a8(){const _0x24a444=_0x5ce462;let _0x205e8a=l(),_0x2b89e4=[..._0x263fda[_0x24a444(0x1eb)]()];for(let [,_0x141f4b]of _0x2b89e4)s(_0x141f4b[_0x24a444(0x1dd)],_0x205e8a);for(let _0x553f3d of _0x1a764c['values']())s(_0x553f3d,_0x205e8a);_0x263fda[_0x24a444(0x1b3)]();let _0x5dc8a1=(await Promise['allSettled']([..._0x2b89e4[_0x24a444(0x1e8)](async([_0x3840ad,_0x3fccdf])=>await _0x32a079(_0x3840ad,_0x3fccdf)),..._0x5ad3a9]))[_0x24a444(0x1c9)](_0x40d28a=>_0x40d28a[_0x24a444(0x1d2)]===_0x24a444(0x1d5));if(_0x5dc8a1?.['status']===_0x24a444(0x1d5))throw _0x5dc8a1[_0x24a444(0x1ed)];}function _0x4e025b(_0x3f34ab){const _0x3cea08=_0x5ce462;try{_0x17afed[_0x3cea08(0x1c6)]?.(_0x3f34ab);}catch{}}function _0x1bccd4(){if(_0xfc81f5)throw l();}function _0x50e3a6(_0xfcb50d){const _0x57c0c6=_0x5ce462;for(let _0x1f6f26 of _0xfcb50d)_0x401ee6[_0x57c0c6(0x1e2)](_0x1f6f26[_0x57c0c6(0x1de)])[_0x57c0c6(0x1e5)](_0x1f6f26[_0x57c0c6(0x1cc)],_0x1f6f26['reject']);}async function _0x32a079(_0x146b4e,_0x3fe512,_0x288f0e){const _0x5c9440=_0x5ce462;_0x3fe512[_0x5c9440(0x1e1)]||(_0x3fe512['closed']=!0x0,c(_0x3fe512),_0x288f0e&&_0x4e025b({'key':_0x146b4e,'reason':_0x288f0e,'type':_0x5c9440(0x1b5)}),await _0x17afed[_0x5c9440(0x1c4)][_0x5c9440(0x1d8)]({'instance':_0x3fe512[_0x5c9440(0x1c5)],'key':_0x146b4e}));}}function i(_0xdb0969,_0x495104){const _0x22d6e0=_0x3de2d2;if(!Number[_0x22d6e0(0x1cd)](_0xdb0969)||_0xdb0969<0x0)throw new e(_0x22d6e0(0x1b9),_0x22d6e0(0x1c2));if(!Number[_0x22d6e0(0x1df)](_0x495104)||_0x495104<=0x0)throw new e('INSTANCE_POOL_INVALID_INPUT','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer');}function a(_0x9ab5bc){const _0x49042e=_0x3de2d2;if(_0x9ab5bc[_0x49042e(0x1d3)][_0x49042e(0x1e9)]===0x0)throw new e(_0x49042e(0x1b9),_0x49042e(0x1da));}function o(_0xc50cc2,_0x3ffbcb){return new Promise((_0x5333fa,_0x3cbd76)=>{const _0x47fab0=_0x3858;_0x3ffbcb[_0x47fab0(0x1bc)]({'input':_0xc50cc2,'reject':_0x3cbd76,'resolve':_0x5333fa});});}function _0x2be5(){const _0x1d46c5=['push','2752595XeTKxr','28530VXjChU','INSTANCE_POOL_CLOSED','4ScOCVV','22326080czEvHE','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','create-start','factory','instance','onEvent','create-complete','cache','find','name','reject','resolve','isFinite','busy','idleTimer','now','get','status','key','lru','rejected','1572993UqxrHN','cache-hit','destroy','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','key\x20must\x20not\x20be\x20empty','InstancePoolError','size','waiters','input','isSafeInteger','INSTANCE_POOL_CAPACITY_EXCEEDED','closed','acquire','add','create','then','45TcOyfL','3232164XRpSgF','map','length','8BzwOEF','entries','invalidate','reason','2347431QHlVgP','invalidated','ttl','splice','maxEntries','2468823xQWrYc','catch','evicted','clear','shift','destroy-start','delete','Instance\x20pool\x20capacity\x20','lastIdleSequence','INSTANCE_POOL_INVALID_INPUT','set','code'];_0x2be5=function(){return _0x1d46c5;};return _0x2be5();}function s(_0x14ea8f,_0x9968c0){const _0x1ada25=_0x3de2d2;for(let _0x300063 of _0x14ea8f['splice'](0x0))_0x300063[_0x1ada25(0x1cb)](_0x9968c0);}function c(_0x39d811){const _0x345628=_0x3de2d2;_0x39d811[_0x345628(0x1cf)]!==void 0x0&&(clearTimeout(_0x39d811[_0x345628(0x1cf)]),delete _0x39d811[_0x345628(0x1cf)]);}function l(){const _0xcf7438=_0x3de2d2;return new e(_0xcf7438(0x1bf),'Instance\x20pool\x20is\x20closed');}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.0.3",
4
+ "version": "1.1.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",