@kedem/okdb 2.0.3 → 2.0.4
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/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/OKDB-ARCHITECTURE.md +16 -2
- package/docs/embeddings.md +11 -7
- package/docs/pipelines.md +12 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/layouts/_default.ok.html +3 -1
- package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +1 -0
- package/public/sections/embeddings/modals/replace-embedder-modal.ok.js +1 -0
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
- package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +1 -0
- package/public/sections/embeddings/parts/pipeline-try-search.ok.js +1 -0
- package/public/sections/engines/engine-ui-utils.js +1 -1
- package/public/sections/engines/index.ok.html +1 -1
- package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
- package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
- package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
- package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
- package/public/sections/functions/index.ok.html +1 -1
- package/public/sections/system/index.ok.html +1 -1
- package/public/sections/system/parts/system-locks-panel.ok.js +1 -1
- package/public/sections/system/parts/system-storage-panel.ok.js +1 -0
- package/public/sections/views/index.ok.html +1 -1
- package/public/stores/auth-store.js +1 -1
- package/public/stores/events-store.js +1 -1
- package/public/styles.css +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
- package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/manifest.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
- package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
- package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
- package/public/sections/db/parts/db-pipelines-panel.ok.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x17a610=_0x1175;(function(_0x5aa8c1,_0x4b8d91){const _0x34f178=_0x1175,_0x3ac28c=_0x5aa8c1();while(!![]){try{const _0x4a61b9=parseInt(_0x34f178(0x233))/0x1+-parseInt(_0x34f178(0x249))/0x2*(-parseInt(_0x34f178(0x225))/0x3)+-parseInt(_0x34f178(0x23b))/0x4*(-parseInt(_0x34f178(0x1fc))/0x5)+-parseInt(_0x34f178(0x2a2))/0x6+parseInt(_0x34f178(0x1f4))/0x7+parseInt(_0x34f178(0x229))/0x8*(parseInt(_0x34f178(0x25a))/0x9)+-parseInt(_0x34f178(0x232))/0xa;if(_0x4a61b9===_0x4b8d91)break;else _0x3ac28c['push'](_0x3ac28c['shift']());}catch(_0x29521c){_0x3ac28c['push'](_0x3ac28c['shift']());}}}(_0x3184,0xc0b18));function _0x1175(_0xeaa21f,_0x589efa){_0xeaa21f=_0xeaa21f-0x1f1;const _0x3184fa=_0x3184();let _0x1175ea=_0x3184fa[_0xeaa21f];return _0x1175ea;}var require$$0$1=require(_0x17a610(0x26a)),require$$0=require('fs'),require$$1=require(_0x17a610(0x289)),require$$2=require('os'),require$$3=require(_0x17a610(0x212));function getDefaultExportFromCjs(_0x65fe63){const _0x19f965=_0x17a610;return _0x65fe63&&_0x65fe63['__esModule']&&Object[_0x19f965(0x25e)][_0x19f965(0x23d)][_0x19f965(0x23f)](_0x65fe63,_0x19f965(0x214))?_0x65fe63[_0x19f965(0x214)]:_0x65fe63;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x370a8e=_0x17a610;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x6a1a19=require$$0,_0x3f4bbf=require$$1,_0x3eb238=require$$2,_0x3ade1c=require$$3;function _0x2b5c01(){const _0x475414=_0x1175;return Date[_0x475414(0x2ae)]();}function _0x4638f0(_0x335703){const _0x12d808=_0x1175;try{return _0x6a1a19[_0x12d808(0x262)](_0x335703);}catch{return![];}}function _0x111ae0(_0x4fa91b){const _0x4885fd=_0x1175;try{return _0x6a1a19[_0x4885fd(0x291)](_0x4fa91b,_0x4885fd(0x242));}catch{return null;}}function _0x1471b4(_0x20dd39,_0x598d48){const _0x5835e2=_0x1175,_0x5f04df=_0x20dd39+_0x5835e2(0x26d)+_0x3ade1c[_0x5835e2(0x23c)](0x6)[_0x5835e2(0x25b)](_0x5835e2(0x263));_0x6a1a19[_0x5835e2(0x219)](_0x5f04df,_0x598d48),_0x6a1a19['renameSync'](_0x5f04df,_0x20dd39);}function _0x148bf4(_0x1b7bc3,_0x499799=0x10){const _0x435edd=_0x1175,_0x44f02d=String(Math[_0x435edd(0x298)](0x0,Math[_0x435edd(0x293)](_0x1b7bc3||0x0)));return _0x44f02d['length']>=_0x499799?_0x44f02d:'0'[_0x435edd(0x224)](_0x499799-_0x44f02d[_0x435edd(0x27a)])+_0x44f02d;}return snapshotStore=class _0x2c3949{constructor({dir:_0x170959,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0xe5830=_0x1175;if(!_0x170959)throw new Error(_0xe5830(0x25d));this[_0xe5830(0x27e)]=_0x170959,this[_0xe5830(0x23e)]=_0x3f4bbf[_0xe5830(0x217)](_0x170959,_0xe5830(0x27d)),this[_0xe5830(0x255)]=_0x3f4bbf['join'](_0x170959,_0xe5830(0x2ac)),this[_0xe5830(0x29f)]=_0x3f4bbf[_0xe5830(0x217)](_0x170959,_0xe5830(0x1fd)),this[_0xe5830(0x241)]=keepSnapshots,this[_0xe5830(0x21d)]=log,_0x6a1a19[_0xe5830(0x203)](this[_0xe5830(0x27e)],{'recursive':!![]}),_0x6a1a19['mkdirSync'](this[_0xe5830(0x23e)],{'recursive':!![]});}['_snapshotDir'](_0xf47ab){const _0x59417f=_0x1175;return _0x3f4bbf[_0x59417f(0x217)](this[_0x59417f(0x23e)],_0xf47ab);}[_0x370a8e(0x28d)](_0x2dd473){const _0x2b2fab=_0x370a8e,_0x99932e=this[_0x2b2fab(0x209)](_0x2dd473);return{'dir':_0x99932e,'index':_0x3f4bbf['join'](_0x99932e,_0x2b2fab(0x230)),'labels':_0x3f4bbf['join'](_0x99932e,'labels.json'),'state':_0x3f4bbf[_0x2b2fab(0x217)](_0x99932e,_0x2b2fab(0x261))};}[_0x370a8e(0x297)](){const _0x6598c9=_0x370a8e;if(!_0x4638f0(this[_0x6598c9(0x255)]))return null;const _0x1c3d0c=_0x111ae0(this[_0x6598c9(0x255)]);if(!_0x1c3d0c)return null;const _0x48cd3e=String(_0x1c3d0c)[_0x6598c9(0x258)]();return _0x48cd3e||null;}[_0x370a8e(0x277)](){const _0x83a714=_0x370a8e,_0xe40ced=this[_0x83a714(0x297)]();if(!_0xe40ced)return 0x0;const _0x2f6ca3=Number(_0xe40ced);return Number[_0x83a714(0x256)](_0x2f6ca3)?_0x2f6ca3:0x0;}[_0x370a8e(0x236)](){const _0x59e740=_0x370a8e;try{return _0x6a1a19[_0x59e740(0x220)](this[_0x59e740(0x23e)],{'withFileTypes':!![]})[_0x59e740(0x21c)](_0xc45bf4=>_0xc45bf4['isDirectory']())[_0x59e740(0x1f8)](_0x42bb74=>_0x42bb74[_0x59e740(0x22d)])[_0x59e740(0x21c)](_0x2759c5=>!_0x2759c5[_0x59e740(0x28b)](_0x59e740(0x26d)))[_0x59e740(0x21c)](_0x511115=>!_0x511115['startsWith'](_0x59e740(0x265)))[_0x59e740(0x207)]();}catch{return[];}}['latestSnapshotId'](){const _0x5ec473=_0x370a8e,_0x44f036=this['readCurrentId']();if(_0x44f036)return _0x44f036;const _0x224b4a=this[_0x5ec473(0x236)]();if(!_0x224b4a[_0x5ec473(0x27a)])return null;return _0x224b4a[_0x224b4a[_0x5ec473(0x27a)]-0x1];}['cleanupTmpDirs']({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0x1739fb=_0x370a8e;let _0x29e5fa;try{_0x29e5fa=_0x6a1a19[_0x1739fb(0x220)](this[_0x1739fb(0x23e)],{'withFileTypes':!![]});}catch{return;}const _0x79d640=_0x2b5c01()-maxAgeMs;for(const _0x576f3f of _0x29e5fa){if(!_0x576f3f['isDirectory']())continue;const _0x4d36eb=_0x576f3f[_0x1739fb(0x22d)];if(!_0x4d36eb[_0x1739fb(0x28b)](_0x1739fb(0x26d))&&!_0x4d36eb[_0x1739fb(0x28b)]('_tmp-'))continue;const _0x2e7f5c=_0x3f4bbf['join'](this[_0x1739fb(0x23e)],_0x4d36eb);try{const _0x443eab=_0x6a1a19[_0x1739fb(0x1f1)](_0x2e7f5c);if(_0x443eab[_0x1739fb(0x231)]>_0x79d640)continue;}catch{}try{_0x6a1a19['rmSync'](_0x2e7f5c,{'recursive':!![],'force':!![]});}catch{}}}[_0x370a8e(0x226)]({keep:keep=null}={}){const _0x48e8c8=_0x370a8e,_0x545aec=Math['max'](0x1,Math[_0x48e8c8(0x293)](keep??this[_0x48e8c8(0x241)]??0x3)),_0x411dec=this[_0x48e8c8(0x236)]();if(_0x411dec['length']<=_0x545aec)return;const _0xdf814a=this['readCurrentId'](),_0x111d59=_0x411dec['slice'](0x0,Math[_0x48e8c8(0x298)](0x0,_0x411dec[_0x48e8c8(0x27a)]-_0x545aec));for(const _0x1d0b20 of _0x111d59){if(_0xdf814a&&_0x1d0b20===_0xdf814a)continue;const _0xccc572=this[_0x48e8c8(0x209)](_0x1d0b20);try{_0x6a1a19[_0x48e8c8(0x283)](_0xccc572,{'recursive':!![],'force':!![]});}catch{}}}async[_0x370a8e(0x237)](_0x2b7a63,_0x4e1b26){const _0x1f9e5c=_0x370a8e;if(!_0x2b7a63)throw new Error(_0x1f9e5c(0x1fe));const _0xab9a61=this[_0x1f9e5c(0x28d)](_0x2b7a63);if(!_0x4638f0(_0xab9a61[_0x1f9e5c(0x29a)])||!_0x4638f0(_0xab9a61['labels'])||!_0x4638f0(_0xab9a61[_0x1f9e5c(0x20c)]))throw new Error(_0x1f9e5c(0x2aa)+_0x2b7a63);const _0x2a24a4=await _0x4e1b26(_0xab9a61);return _0x2a24a4||{};}async[_0x370a8e(0x27b)](_0xcab7f4,_0x34efa4,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x37eafd=_0x370a8e,_0xc2640=Number(_0xcab7f4);if(!Number['isFinite'](_0xc2640)||_0xc2640<0x0)throw new Error(_0x37eafd(0x254));const _0x127af3=_0x148bf4(_0xc2640),_0x26258f=this['_snapshotDir'](_0x127af3),_0x35b04c=_0x3f4bbf[_0x37eafd(0x217)](this[_0x37eafd(0x23e)],_0x37eafd(0x26d)+_0x127af3+'-'+_0x3ade1c['randomBytes'](0x6)['toString'](_0x37eafd(0x263)));_0x6a1a19[_0x37eafd(0x203)](_0x35b04c,{'recursive':!![]});const _0x7f655b={'dir':_0x35b04c,'index':_0x3f4bbf['join'](_0x35b04c,_0x37eafd(0x230)),'labels':_0x3f4bbf['join'](_0x35b04c,'labels.json'),'state':_0x3f4bbf['join'](_0x35b04c,_0x37eafd(0x261))};await _0x34efa4(_0x7f655b,{'id':_0x127af3,'clock':_0xc2640});const _0x136c8e=JSON[_0x37eafd(0x272)]({'pid':process[_0x37eafd(0x1f5)],'host':_0x3eb238[_0x37eafd(0x275)](),'at':_0x2b5c01()}),_0x65711b=_0x2b5c01();let _0x4113e6=null;const _0x425c70=()=>{const _0x1bde4c=_0x37eafd;try{const _0x1ad4e3=JSON[_0x1bde4c(0x234)](_0x6a1a19[_0x1bde4c(0x291)](this[_0x1bde4c(0x29f)],_0x1bde4c(0x242)));if(_0x1ad4e3['at']&&_0x2b5c01()-_0x1ad4e3['at']>staleLockMaxAgeMs){const _0x529174=_0x2b5c01()-_0x1ad4e3['at'],_0x3bc7cb=_0x1bde4c(0x20f)+Math[_0x1bde4c(0x2a3)](_0x529174/0x3e8)+'s,\x20pid:\x20'+_0x1ad4e3[_0x1bde4c(0x1f5)]+_0x1bde4c(0x2af)+_0x1ad4e3['host']+').\x20'+_0x1bde4c(0x2a7);this[_0x1bde4c(0x21d)]?.[_0x1bde4c(0x28f)]?this[_0x1bde4c(0x21d)][_0x1bde4c(0x28f)](_0x3bc7cb):console[_0x1bde4c(0x28f)](_0x1bde4c(0x2a8),_0x3bc7cb);try{_0x6a1a19[_0x1bde4c(0x294)](this[_0x1bde4c(0x29f)]);}catch{}return!![];}}catch{try{_0x6a1a19[_0x1bde4c(0x294)](this[_0x1bde4c(0x29f)]);}catch{}}return![];},_0x2f2a4d=()=>{const _0x41a2c6=_0x37eafd;try{return _0x4113e6=_0x6a1a19[_0x41a2c6(0x238)](this[_0x41a2c6(0x29f)],'wx'),_0x6a1a19[_0x41a2c6(0x219)](_0x4113e6,_0x136c8e),!![];}catch(_0x27ba79){if(_0x27ba79&&_0x27ba79['code']==='EEXIST')return![];throw _0x27ba79;}};if(!_0x2f2a4d()){_0x425c70(),_0x2f2a4d();if(_0x4113e6==null&&lockTimeoutMs>0x0)while(_0x2b5c01()-_0x65711b<lockTimeoutMs){await new Promise(_0x21b32f=>setTimeout(_0x21b32f,0x19));if(_0x2f2a4d())break;_0x425c70();}}if(_0x4113e6==null){try{_0x6a1a19['rmSync'](_0x35b04c,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x37eafd(0x201)};}try{const _0x70ae7f=this['readCurrentClock']();if(_0xc2640<=_0x70ae7f){try{_0x6a1a19[_0x37eafd(0x283)](_0x35b04c,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':'stale','currentClock':_0x70ae7f};}if(!_0x4638f0(_0x26258f))_0x6a1a19[_0x37eafd(0x20d)](_0x35b04c,_0x26258f);else try{_0x6a1a19[_0x37eafd(0x283)](_0x35b04c,{'recursive':!![],'force':!![]});}catch{}return _0x1471b4(this[_0x37eafd(0x255)],_0x127af3+'\x0a'),this[_0x37eafd(0x226)]({'keep':keep}),{'published':!![],'currentClock':_0xc2640};}finally{try{_0x6a1a19['closeSync'](_0x4113e6);}catch{}try{_0x6a1a19[_0x37eafd(0x294)](this['lockPath']);}catch{}}}},snapshotStore;}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x775057=_0x17a610;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x2de497=require$$0;class _0x2f4207{constructor(){const _0x546b7a=_0x1175;this['keyToLabel']=new Map(),this['labelToKey']=new Map(),this[_0x546b7a(0x268)]=0x0,this[_0x546b7a(0x2a1)]=0x0;}async[_0x775057(0x250)](){const _0x85c815=_0x775057;this[_0x85c815(0x28e)]=new Map(),this[_0x85c815(0x24c)]=new Map(),this['nextLabel']=0x0,this[_0x85c815(0x2a1)]=0x0;}async[_0x775057(0x27f)](_0x1c27c7){const _0xb04b8c=_0x775057;if(!_0x1c27c7||!_0x2de497[_0xb04b8c(0x262)](_0x1c27c7))return await this[_0xb04b8c(0x250)](),!![];let _0x15857d;try{_0x15857d=_0x2de497[_0xb04b8c(0x291)](_0x1c27c7,_0xb04b8c(0x242));}catch{return await this[_0xb04b8c(0x250)](),!![];}let _0x66fcb;try{_0x66fcb=JSON[_0xb04b8c(0x234)](_0x15857d);}catch{return await this[_0xb04b8c(0x250)](),!![];}const _0x359794=Array[_0xb04b8c(0x273)](_0x66fcb?.[_0xb04b8c(0x204)])?_0x66fcb['entries']:[],_0x1af14e=Number[_0xb04b8c(0x21e)](_0x66fcb?.['nextLabel'])?_0x66fcb[_0xb04b8c(0x268)]:0x0,_0x3d1dbe=new Map(),_0x203530=new Map();let _0x5f3bd4=-0x1;for(const _0x4e2225 of _0x359794){if(!Array['isArray'](_0x4e2225)||_0x4e2225[_0xb04b8c(0x27a)]!==0x2)continue;const _0x284260=Number(_0x4e2225[0x0]),_0x48d135=String(_0x4e2225[0x1]??'');if(!Number['isInteger'](_0x284260)||_0x284260<0x0)continue;if(!_0x48d135)continue;_0x3d1dbe[_0xb04b8c(0x246)](_0x48d135,_0x284260),_0x203530[_0xb04b8c(0x246)](_0x284260,_0x48d135);if(_0x284260>_0x5f3bd4)_0x5f3bd4=_0x284260;}return this[_0xb04b8c(0x28e)]=_0x3d1dbe,this['labelToKey']=_0x203530,this[_0xb04b8c(0x268)]=Math[_0xb04b8c(0x298)](_0x1af14e,_0x5f3bd4+0x1,0x0),this['_tombstoneCount']=0x0,!![];}[_0x775057(0x22b)](_0x42fe5a){const _0x36e546=_0x775057;return this[_0x36e546(0x28e)][_0x36e546(0x228)](_0x42fe5a);}['labelForEphemeral'](_0x5d110a){const _0x4a83e9=_0x775057;let _0x3a92ba=this['keyToLabel'][_0x4a83e9(0x228)](_0x5d110a);if(_0x3a92ba!==undefined)return _0x3a92ba;return _0x3a92ba=this[_0x4a83e9(0x268)]++,this['keyToLabel'][_0x4a83e9(0x246)](_0x5d110a,_0x3a92ba),this[_0x4a83e9(0x24c)][_0x4a83e9(0x246)](_0x3a92ba,_0x5d110a),_0x3a92ba;}['tombstone'](_0x543717){const _0x30fcb2=_0x775057,_0x101959=this[_0x30fcb2(0x28e)][_0x30fcb2(0x228)](_0x543717);if(_0x101959===undefined)return;this[_0x30fcb2(0x28e)][_0x30fcb2(0x260)](_0x543717),this[_0x30fcb2(0x24c)][_0x30fcb2(0x260)](_0x101959),this[_0x30fcb2(0x2a1)]++;}[_0x775057(0x21b)](_0xac14f7){return this['labelToKey']['get'](_0xac14f7)??null;}[_0x775057(0x284)](){const _0x1c6aed=_0x775057;return this[_0x1c6aed(0x28e)][_0x1c6aed(0x284)];}[_0x775057(0x1f9)](){const _0x15572=_0x775057;return this[_0x15572(0x2a1)];}async[_0x775057(0x252)](_0x4bba8e){const _0x4d2e04=_0x775057,_0x2f4e10=_0x4bba8e+'.tmp',_0x4debb0=[];for(const [_0x3cc4c4,_0x73dff]of this[_0x4d2e04(0x24c)][_0x4d2e04(0x204)]()){_0x4debb0[_0x4d2e04(0x2a4)]([_0x3cc4c4,_0x73dff]);}_0x4debb0[_0x4d2e04(0x207)]((_0x10c649,_0x37958e)=>_0x10c649[0x0]-_0x37958e[0x0]);const _0x45b6e1={'version':0x1,'nextLabel':this[_0x4d2e04(0x268)],'entries':_0x4debb0};_0x2de497['writeFileSync'](_0x2f4e10,JSON[_0x4d2e04(0x272)](_0x45b6e1)),_0x2de497[_0x4d2e04(0x20d)](_0x2f4e10,_0x4bba8e);}}return labelMap=_0x2f4207,labelMap;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x51ff29=requireSnapshotStore(),_0x21b06e=requireLabelMap(),_0x2432e5=0x1;let _0x417611=null;function _0x52b187(){const _0x3ca9aa=_0x1175;if(_0x417611)return _0x417611;try{return _0x417611=require(_0x3ca9aa(0x264)),_0x417611;}catch(_0x3636be){const _0x31f751=new Error(_0x3ca9aa(0x22a)+(_0x3ca9aa(0x21f)+process[_0x3ca9aa(0x27c)][_0x3ca9aa(0x286)]+'\x20on\x20'+process[_0x3ca9aa(0x29b)]+'/'+process['arch']+'.\x20')+_0x3ca9aa(0x244)+('Original\x20error:\x20'+(_0x3636be?.[_0x3ca9aa(0x276)]||String(_0x3636be))));_0x31f751[_0x3ca9aa(0x25c)]=_0x3ca9aa(0x282),_0x31f751['cause']=_0x3636be;throw _0x31f751;}}return hnsw=function _0x3d43ae(_0x52149d={},{dims:_0x9750b8,dir:_0x3f86a5}){const _0x16e209=_0x1175,_0x2255c5=_0x52b187();if(!_0x9750b8||_0x9750b8<=0x0)throw new Error('hnsw\x20algorithm\x20requires\x20dims\x20>\x200');if(!_0x3f86a5)throw new Error('hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage');const _0x2787af={'metric':_0x52149d[_0x16e209(0x2ad)]??_0x16e209(0x227),'M':_0x52149d['M']??0x10,'efConstruction':_0x52149d[_0x16e209(0x26b)]??0xc8,'efSearch':_0x52149d[_0x16e209(0x2a0)]??0x40,'maxElements':_0x52149d[_0x16e209(0x20b)]??0x400,'growFactor':_0x52149d[_0x16e209(0x271)]??0x2,'snapshotEveryChanges':_0x52149d[_0x16e209(0x267)]??0xc350,'keepSnapshots':_0x52149d['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x52149d[_0x16e209(0x221)]??0x6*0x36ee80},_0x53e047=new _0x51ff29({'dir':_0x3f86a5,'keepSnapshots':_0x2787af[_0x16e209(0x241)]}),_0x4d3d0e=new _0x21b06e();let _0x42f1f9=null,_0x5646d6=0x0,_0x45d112=null,_0x8f601=Promise[_0x16e209(0x292)]();const _0x1a288a=_0x3f85ac=>{const _0x220a39=_0x16e209;return _0x8f601=_0x8f601[_0x220a39(0x2ab)](_0x3f85ac),_0x8f601;};async function _0x2d3f42(_0x56502e){const _0x77017d=_0x16e209;await _0x4d3d0e[_0x77017d(0x250)]();const _0x168826=_0x56502e?await _0x56502e():[],_0x47d336=Math[_0x77017d(0x298)](_0x2787af['maxElements'],Math['ceil'](_0x168826['length']*(_0x2787af[_0x77017d(0x271)]||1.2)),0x1);_0x42f1f9=new _0x2255c5[(_0x77017d(0x29e))](_0x2787af[_0x77017d(0x2ad)],_0x9750b8),_0x42f1f9[_0x77017d(0x245)]({'maxElements':_0x47d336,'efConstruction':_0x2787af[_0x77017d(0x26b)],'M':_0x2787af['M']});for(const {key:_0x218e6b,vector:_0x4913c0}of _0x168826){if(!(_0x4913c0 instanceof Float32Array)||_0x4913c0[_0x77017d(0x27a)]!==_0x9750b8)continue;const _0x4b9b77=_0x4d3d0e[_0x77017d(0x296)](_0x218e6b);_0x42f1f9[_0x77017d(0x1fa)](Array[_0x77017d(0x24b)](_0x4913c0),_0x4b9b77);}_0x42f1f9[_0x77017d(0x1f2)](_0x2787af[_0x77017d(0x2a0)]),_0x5646d6=0x0;}async function _0x38f2e8(_0x1d1ad9){const _0xdddbd3=_0x16e209;if(!_0x42f1f9||!_0x1d1ad9)return![];const _0x2eded7=await _0x53e047[_0xdddbd3(0x27b)](_0x1d1ad9,async _0x2be5fc=>{const _0x3356a4=_0xdddbd3;_0x42f1f9[_0x3356a4(0x22f)](_0x2be5fc['index']),await _0x4d3d0e[_0x3356a4(0x252)](_0x2be5fc[_0x3356a4(0x1f6)]);const _0x2964b5=require$$0;_0x2964b5[_0x3356a4(0x219)](_0x2be5fc['state'],JSON['stringify']({'manifestVersion':_0x2432e5,'dims':_0x9750b8,'metric':_0x2787af[_0x3356a4(0x2ad)],'clock':_0x1d1ad9,'snapshotAt':Date[_0x3356a4(0x2ae)]()},null,0x2));},{'keep':_0x2787af['keepSnapshots']});if(_0x2eded7?.[_0xdddbd3(0x222)])_0x5646d6=0x0;return _0x2eded7?.['published']??![];}async function _0x46e900(){const _0x31edac=_0x16e209,_0xf61fc=_0x53e047['readCurrentId']()||_0x53e047['latestSnapshotId']();if(!_0xf61fc)return null;let _0x48158b,_0x1f7a4a=![];return await _0x53e047[_0x31edac(0x237)](_0xf61fc,async _0xbbdd16=>{const _0x564ab3=_0x31edac,_0x5ec796=require$$0;_0x48158b=JSON[_0x564ab3(0x234)](_0x5ec796[_0x564ab3(0x291)](_0xbbdd16[_0x564ab3(0x20c)],_0x564ab3(0x242)));if(_0x48158b[_0x564ab3(0x1fb)]!==_0x2432e5||_0x48158b[_0x564ab3(0x285)]!==_0x9750b8||_0x48158b[_0x564ab3(0x2ad)]!==_0x2787af[_0x564ab3(0x2ad)]){_0x48158b=null;return;}await _0x4d3d0e[_0x564ab3(0x27f)](_0xbbdd16[_0x564ab3(0x1f6)]),_0x42f1f9=new _0x2255c5[(_0x564ab3(0x29e))](_0x2787af[_0x564ab3(0x2ad)],_0x9750b8),_0x42f1f9['readIndexSync'](_0xbbdd16[_0x564ab3(0x29a)]),_0x42f1f9[_0x564ab3(0x1f2)](_0x2787af[_0x564ab3(0x2a0)]),_0x1f7a4a=!![];}),_0x1f7a4a?_0x48158b?.['clock']??0x0:null;}return{async 'load'(_0x25ca53){return _0x1a288a(async()=>{const _0x5653b4=_0x1175;_0x53e047['cleanupTmpDirs']({'maxAgeMs':_0x2787af[_0x5653b4(0x221)]}),_0x45d112=_0x25ca53??null;const _0x5c67fb=await _0x46e900();if(_0x5c67fb!=null)return _0x5c67fb;return await _0x2d3f42(_0x25ca53),null;});},async 'add'(_0x560a48,_0x3ed5dd,_0x977727){return _0x1a288a(async()=>{const _0x2edaa3=_0x1175;if(!_0x42f1f9)return;const _0x249091=_0x4d3d0e[_0x2edaa3(0x296)](_0x560a48);try{_0x42f1f9[_0x2edaa3(0x24d)](_0x249091);}catch{}_0x42f1f9[_0x2edaa3(0x26f)]()>=_0x42f1f9[_0x2edaa3(0x20a)]()&&(_0x2787af['maxElements']=Math[_0x2edaa3(0x213)](_0x42f1f9[_0x2edaa3(0x20a)]()*(_0x2787af[_0x2edaa3(0x271)]||0x2)),await _0x2d3f42(_0x45d112)),_0x42f1f9[_0x2edaa3(0x1fa)](Array['from'](_0x3ed5dd),_0x249091),_0x5646d6++,_0x5646d6>=_0x2787af[_0x2edaa3(0x267)]&&await _0x38f2e8(_0x977727??Date[_0x2edaa3(0x2ae)]());});},async 'remove'(_0x4f1423){return _0x1a288a(async()=>{const _0x1575a4=_0x1175;if(!_0x42f1f9)return;const _0x49e827=_0x4d3d0e['labelForExisting'](_0x4f1423);if(_0x49e827===undefined)return;try{_0x42f1f9[_0x1575a4(0x24d)](_0x49e827);}catch{}_0x4d3d0e['tombstone'](_0x4f1423),_0x5646d6++;});},'search'(_0xe5c4f4,{limit:limit=0xa,efSearch:_0x4651a9}={}){const _0x5b544b=_0x16e209;if(!_0x42f1f9)return[];if(Number[_0x5b544b(0x21e)](_0x4651a9))_0x42f1f9[_0x5b544b(0x1f2)](_0x4651a9);const _0x351318=Math[_0x5b544b(0x2a6)](limit,_0x42f1f9[_0x5b544b(0x26f)]()||0x1),{neighbors:_0x3aae26,distances:_0x429499}=_0x42f1f9['searchKnn'](Array[_0x5b544b(0x24b)](_0xe5c4f4),_0x351318),_0x27c4ca=[];for(let _0x19da9b=0x0;_0x19da9b<_0x3aae26[_0x5b544b(0x27a)];_0x19da9b++){const _0x445bab=_0x4d3d0e[_0x5b544b(0x21b)](_0x3aae26[_0x19da9b]);if(!_0x445bab)continue;const _0x4681cb=_0x2787af[_0x5b544b(0x2ad)]===_0x5b544b(0x227)?Math[_0x5b544b(0x298)](0x0,0x1-_0x429499[_0x19da9b]):0x1/(0x1+_0x429499[_0x19da9b]);_0x27c4ca[_0x5b544b(0x2a4)]({'key':_0x445bab,'score':_0x4681cb});}return _0x27c4ca;},async 'snapshot'(_0x2c2ec5=Date[_0x16e209(0x2ae)]()){return _0x1a288a(()=>_0x38f2e8(_0x2c2ec5));},async 'rebuild'(_0x23b239){return _0x1a288a(()=>{if(_0x23b239!=null)_0x45d112=_0x23b239;return _0x2d3f42(_0x23b239??_0x45d112);});},async 'stop'(){const _0x1358bd=_0x16e209;return _0x1a288a(()=>_0x38f2e8(Date[_0x1358bd(0x2ae)]()));},'count'(){const _0x293a78=_0x16e209;return _0x4d3d0e[_0x293a78(0x284)]();},'info'(){const _0x3fca79=_0x16e209;return{'algorithm':_0x3fca79(0x269),'metric':_0x2787af[_0x3fca79(0x2ad)],'M':_0x2787af['M'],'efConstruction':_0x2787af[_0x3fca79(0x26b)],'efSearch':_0x2787af['efSearch'],'maxElements':_0x42f1f9?.[_0x3fca79(0x20a)]()??_0x2787af[_0x3fca79(0x20b)],'count':_0x4d3d0e[_0x3fca79(0x284)](),'changesSince':_0x5646d6,'snapshotDir':_0x3f86a5,'latestSnapshot':_0x53e047['readCurrentId']()??null};}};},hnsw;}var flat,hasRequiredFlat;function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x34e319(_0x4d3af4={}){const _0x24d5fa=new Map();return{async 'load'(_0x539e8a){const _0x4d807b=_0x1175;_0x24d5fa[_0x4d807b(0x24a)]();if(_0x539e8a)for(const {key:_0x2e2f5f,vector:_0x10e28c}of await _0x539e8a()){_0x24d5fa[_0x4d807b(0x246)](_0x2e2f5f,_0x10e28c);}},async 'add'(_0x4ea022,_0x4e3e7a,_0x52e9cd){const _0x4d5ea1=_0x1175;_0x24d5fa[_0x4d5ea1(0x246)](_0x4ea022,_0x4e3e7a);},async 'remove'(_0x5ed828){_0x24d5fa['delete'](_0x5ed828);},'search'(_0x378ea9,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x3a594a=_0x1175,_0x2eb2d1=[];for(const [_0x54fab0,_0x4b0f63]of _0x24d5fa){const _0x31984b=_0xa0cd63(_0x378ea9,_0x4b0f63);if(_0x31984b>=threshold)_0x2eb2d1['push']({'key':_0x54fab0,'score':_0x31984b});}return _0x2eb2d1[_0x3a594a(0x207)]((_0x3f93bf,_0x382a61)=>_0x382a61[_0x3a594a(0x278)]-_0x3f93bf[_0x3a594a(0x278)]),_0x2eb2d1[_0x3a594a(0x266)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0x530a29){const _0xbb8f03=_0x1175;await this[_0xbb8f03(0x24f)](_0x530a29);},async 'stop'(){},'count'(){const _0x20488a=_0x1175;return _0x24d5fa[_0x20488a(0x284)];},'info'(){const _0x2ff7d0=_0x1175;return{'algorithm':_0x2ff7d0(0x223),'count':_0x24d5fa[_0x2ff7d0(0x284)]};}};};function _0xa0cd63(_0x59c8c7,_0x3d54fb){const _0x3e73c2=_0x1175;let _0x409ea3=0x0,_0x4d1444=0x0,_0x34db69=0x0;for(let _0x2f8bbc=0x0;_0x2f8bbc<_0x59c8c7[_0x3e73c2(0x27a)];_0x2f8bbc++){_0x409ea3+=_0x59c8c7[_0x2f8bbc]*_0x3d54fb[_0x2f8bbc],_0x4d1444+=_0x59c8c7[_0x2f8bbc]*_0x59c8c7[_0x2f8bbc],_0x34db69+=_0x3d54fb[_0x2f8bbc]*_0x3d54fb[_0x2f8bbc];}const _0x697ecc=Math[_0x3e73c2(0x239)](_0x4d1444)*Math[_0x3e73c2(0x239)](_0x34db69);return _0x697ecc===0x0?0x0:_0x409ea3/_0x697ecc;}return flat;}var usearch,hasRequiredUsearch;function _0x3184(){const _0xf2d0f5=['sqrt','info','260ovpZQg','randomBytes','hasOwnProperty','snapshotsDir','call','F32','keepSnapshots','utf8','rebuild','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20','initIndex','set','Unknown\x20algorithm:\x20\x22','MetricKind','2812450jxmHNJ','clear','from','labelToKey','markDelete','writerLockMaxAgeMs','load','reset','search','snapshotTo','remove','candidateClock\x20must\x20be\x20finite\x20>=\x200','currentPath','isFinite','save','trim','expansionAdd','46080uyNtGE','toString','code','SnapshotStore\x20requires\x20dir','prototype','usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','delete','state.json','existsSync','hex','hnswlib-node','_tmp-','slice','snapshotEveryChanges','nextLabel','hnsw','worker_threads','efConstruction','EEXIST','.tmp-','count','getCurrentCount','unref','growFactor','stringify','isArray','Cos','hostname','message','readCurrentClock','score','vectors','length','publishSnapshot','versions','snapshots','dir','loadFrom','heartbeatIntervalMs','algorithm','HNSW_BINDINGS_UNAVAILABLE','rmSync','size','dims','node','snapshot','USEARCH_BINDINGS_UNAVAILABLE','path','cleanupTmpDirs','startsWith','writer','_snapshotPaths','keyToLabel','warn','Unknown\x20op:\x20\x22','readFileSync','resolve','trunc','unlinkSync','add','labelForEphemeral','readCurrentId','max','key','index','platform','usearch','distances','HierarchicalNSW','lockPath','efSearch','_tombstoneCount','894078Niklxp','round','push','Original\x20error:\x20','min','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','[SnapshotStore]','ready','snapshot\x20incomplete:\x20','then','CURRENT','metric','now',',\x20host:\x20','statSync','setEf','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20','1191274oYRIbJ','pid','labels','cause','map','tombstoneCount','addPoint','manifestVersion','31480MjcfXr','SNAPSHOT.LOCK','snapshot\x20id\x20required','view','WRITER.LOCK','lock_busy','usearch\x20algorithm\x20requires\x20dims\x20>\x200','mkdirSync','entries','arch','postMessage','sort','vector','_snapshotDir','getMaxElements','maxElements','state','renameSync','viewRefreshMs','Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20','connectivity','queryVec','crypto','ceil','default','expansionSearch','sync','join','stop','writeFileSync','ScalarKind','keyForLabel','filter','log','isInteger','for\x20Node\x20','readdirSync','tmpMaxAgeMs','published','flat','repeat','3XeApec','prune','cosine','get','1000AHnsdC','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','labelForExisting','clock','name','latestSnapshotId','writeIndexSync','index.hnsw','mtimeMs','32245590KlIfDb','1537197nfYCRV','parse','reader','listSnapshotIds','loadSnapshot','openSync'];_0x3184=function(){return _0xf2d0f5;};return _0x3184();}function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x426392=require$$0,_0x436b14=require$$1,_0x4311a9=requireSnapshotStore(),_0x4de447=requireLabelMap(),_0x2134f9=0x1;let _0x320475=null;function _0x514b94(){const _0x138de2=_0x1175;if(_0x320475)return _0x320475;try{return _0x320475=require(_0x138de2(0x29c)),_0x320475;}catch(_0x525210){const _0x14e1c5=new Error('usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20'+(_0x138de2(0x21f)+process[_0x138de2(0x27c)][_0x138de2(0x286)]+'\x20on\x20'+process['platform']+'/'+process[_0x138de2(0x205)]+'.\x20')+_0x138de2(0x1f3)+(_0x138de2(0x2a5)+(_0x525210?.[_0x138de2(0x276)]||String(_0x525210))));_0x14e1c5[_0x138de2(0x25c)]=_0x138de2(0x288),_0x14e1c5[_0x138de2(0x1f7)]=_0x525210;throw _0x14e1c5;}}function _0x2661ee(_0x46b114,_0x43e508){const _0x1b76f7=_0x1175;switch(_0x46b114){case _0x1b76f7(0x227):return _0x43e508[_0x1b76f7(0x248)][_0x1b76f7(0x274)];case'l2':return _0x43e508[_0x1b76f7(0x248)]['L2sq'];case'ip':return _0x43e508[_0x1b76f7(0x248)]['IP'];default:return _0x43e508[_0x1b76f7(0x248)][_0x1b76f7(0x274)];}}return usearch=function _0x388e15(_0x418755={},{dims:_0x3d560f,dir:_0x7cfa48}){const _0x2cce55=_0x1175,_0x5bf937=_0x514b94();if(!_0x3d560f||_0x3d560f<=0x0)throw new Error(_0x2cce55(0x202));if(!_0x7cfa48)throw new Error(_0x2cce55(0x25f));const _0x3ff729={'metric':_0x418755['metric']??_0x2cce55(0x227),'connectivity':_0x418755[_0x2cce55(0x210)]??0x10,'expansionAdd':_0x418755[_0x2cce55(0x259)]??0x80,'expansionSearch':_0x418755[_0x2cce55(0x215)]??0x40,'snapshotEveryChanges':_0x418755['snapshotEveryChanges']??0xc350,'keepSnapshots':_0x418755['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x418755[_0x2cce55(0x221)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x418755[_0x2cce55(0x280)]??0x1388,'writerLockMaxAgeMs':_0x418755['writerLockMaxAgeMs']??0x3a98,'viewRefreshMs':_0x418755[_0x2cce55(0x20e)]??0x3e8},_0x438acd=new _0x4311a9({'dir':_0x7cfa48,'keepSnapshots':_0x3ff729['keepSnapshots']}),_0x652dae=_0x436b14[_0x2cce55(0x217)](_0x7cfa48,_0x2cce55(0x200));let _0x14aaf3=new _0x4de447(),_0x44f088=null,_0x44a687=0x0,_0x38c804=null,_0x30960f=![],_0x4af6f5=null,_0x38048f=null,_0x2897aa=0x0,_0x3c3f9f=![],_0x1c9712=Promise['resolve']();const _0x282672=_0x6dbdc=>{return _0x1c9712=_0x1c9712['then'](_0x6dbdc),_0x1c9712;};function _0xa1edf3(){const _0x3e2139=_0x2cce55;return new _0x5bf937['Index']({'dimensions':_0x3d560f,'metric':_0x2661ee(_0x3ff729['metric'],_0x5bf937),'quantization':_0x5bf937[_0x3e2139(0x21a)][_0x3e2139(0x240)],'connectivity':_0x3ff729['connectivity'],'expansion_add':_0x3ff729[_0x3e2139(0x259)],'expansion_search':_0x3ff729[_0x3e2139(0x215)],'multi':![]});}function _0x3e9719(_0x32e528){return _0x32e528 instanceof Float32Array?_0x32e528:new Float32Array(_0x32e528);}function _0x1c7fe5(){const _0x33758c=_0x2cce55,_0x5bbb45=JSON[_0x33758c(0x272)]({'pid':process[_0x33758c(0x1f5)],'at':Date['now']()}),_0x530256=()=>{const _0x2d6619=_0x33758c;try{const _0x51e6bd=_0x426392['openSync'](_0x652dae,'wx');return _0x426392[_0x2d6619(0x219)](_0x51e6bd,_0x5bbb45),_0x426392['closeSync'](_0x51e6bd),!![];}catch(_0x424526){if(_0x424526?.[_0x2d6619(0x25c)]===_0x2d6619(0x26c))return![];throw _0x424526;}};if(_0x530256())return!![];try{const _0x43939d=JSON[_0x33758c(0x234)](_0x426392[_0x33758c(0x291)](_0x652dae,_0x33758c(0x242))),_0x5cf560=Date[_0x33758c(0x2ae)]()-(_0x43939d['at']??0x0);if(_0x5cf560<_0x3ff729[_0x33758c(0x24e)])return![];}catch{}try{_0x426392[_0x33758c(0x294)](_0x652dae);}catch{}return _0x530256();}function _0x2716e2(){const _0x49347f=_0x2cce55;if(_0x4af6f5)clearInterval(_0x4af6f5);_0x4af6f5=setInterval(()=>{const _0x4da07c=_0x1175;try{_0x426392[_0x4da07c(0x219)](_0x652dae,JSON[_0x4da07c(0x272)]({'pid':process[_0x4da07c(0x1f5)],'at':Date[_0x4da07c(0x2ae)]()}));}catch{}},_0x3ff729[_0x49347f(0x280)]),_0x4af6f5[_0x49347f(0x270)]();}function _0x22a92c(){const _0x3feb09=_0x2cce55;_0x4af6f5&&(clearInterval(_0x4af6f5),_0x4af6f5=null);try{const _0xd05316=JSON[_0x3feb09(0x234)](_0x426392[_0x3feb09(0x291)](_0x652dae,_0x3feb09(0x242)));if(_0xd05316[_0x3feb09(0x1f5)]===process[_0x3feb09(0x1f5)])_0x426392[_0x3feb09(0x294)](_0x652dae);}catch{}}async function _0x2a577f(_0x3e8726){const _0x58fdfb=_0x2cce55;_0x14aaf3=new _0x4de447(),await _0x14aaf3[_0x58fdfb(0x250)](),_0x44f088=_0xa1edf3();const _0x3fdf8e=_0x3e8726?await _0x3e8726():[];for(const {key:_0x40291b,vector:_0x57fa77}of _0x3fdf8e){if(!(_0x57fa77 instanceof Float32Array)||_0x57fa77[_0x58fdfb(0x27a)]!==_0x3d560f)continue;const _0x2d39f6=_0x14aaf3['labelForEphemeral'](_0x40291b);_0x44f088[_0x58fdfb(0x295)](BigInt(_0x2d39f6),_0x57fa77);}_0x44a687=0x0;}async function _0x2db92d(_0x5aca81){const _0x89dc06=_0x2cce55;if(!_0x44f088||!_0x5aca81)return![];const _0xa169b2=await _0x438acd['publishSnapshot'](_0x5aca81,async _0x268daf=>{const _0x2e8aec=_0x1175;_0x44f088[_0x2e8aec(0x257)](_0x268daf[_0x2e8aec(0x29a)]),await _0x14aaf3[_0x2e8aec(0x252)](_0x268daf['labels']),_0x426392[_0x2e8aec(0x219)](_0x268daf[_0x2e8aec(0x20c)],JSON[_0x2e8aec(0x272)]({'manifestVersion':_0x2134f9,'algorithm':_0x2e8aec(0x29c),'dims':_0x3d560f,'metric':_0x3ff729[_0x2e8aec(0x2ad)],'clock':_0x5aca81,'snapshotAt':Date[_0x2e8aec(0x2ae)]()},null,0x2));},{'keep':_0x3ff729[_0x89dc06(0x241)]});if(_0xa169b2?.[_0x89dc06(0x222)])_0x44a687=0x0;return _0xa169b2?.[_0x89dc06(0x222)]??![];}async function _0x2ebf74(){const _0x1214f0=_0x2cce55,_0x3dd19a=_0x438acd['readCurrentId']()||_0x438acd['latestSnapshotId']();if(!_0x3dd19a)return null;let _0x2740d6,_0x551682=![];return await _0x438acd['loadSnapshot'](_0x3dd19a,async _0x408ab3=>{const _0x50fefd=_0x1175;_0x2740d6=JSON[_0x50fefd(0x234)](_0x426392[_0x50fefd(0x291)](_0x408ab3[_0x50fefd(0x20c)],'utf8'));if(_0x2740d6[_0x50fefd(0x1fb)]!==_0x2134f9||_0x2740d6['algorithm']!==_0x50fefd(0x29c)||_0x2740d6[_0x50fefd(0x285)]!==_0x3d560f||_0x2740d6[_0x50fefd(0x2ad)]!==_0x3ff729['metric']){_0x2740d6=null;return;}_0x14aaf3=new _0x4de447(),await _0x14aaf3[_0x50fefd(0x27f)](_0x408ab3[_0x50fefd(0x1f6)]),_0x44f088=_0xa1edf3(),_0x44f088[_0x50fefd(0x24f)](_0x408ab3[_0x50fefd(0x29a)]),_0x551682=!![];}),_0x551682?_0x2740d6?.[_0x1214f0(0x22c)]??0x0:null;}async function _0x1d778b(_0x2a6759){const _0x5893a1=_0x2cce55;if(!_0x2a6759)return![];let _0x5847aa=![];try{await _0x438acd[_0x5893a1(0x237)](_0x2a6759,async _0x111291=>{const _0x245a46=_0x5893a1,_0x29273f=JSON[_0x245a46(0x234)](_0x426392['readFileSync'](_0x111291[_0x245a46(0x20c)],'utf8'));if(_0x29273f[_0x245a46(0x1fb)]!==_0x2134f9||_0x29273f[_0x245a46(0x281)]!==_0x245a46(0x29c)||_0x29273f[_0x245a46(0x285)]!==_0x3d560f||_0x29273f[_0x245a46(0x2ad)]!==_0x3ff729[_0x245a46(0x2ad)])return;const _0x578eee=new _0x4de447();await _0x578eee['loadFrom'](_0x111291[_0x245a46(0x1f6)]);const _0x4d8fe5=_0xa1edf3();_0x4d8fe5[_0x245a46(0x1ff)](_0x111291[_0x245a46(0x29a)]),_0x44f088=_0x4d8fe5,_0x14aaf3=_0x578eee,_0x38048f=_0x2a6759,_0x5847aa=!![];});}catch{}return _0x5847aa;}async function _0x3fc2b6(_0x2a6dcb){try{await _0x1d778b(_0x2a6dcb);}finally{_0x3c3f9f=![];}}function _0x108279(){const _0x4afbb1=_0x2cce55,_0x511e61=Date['now']();if(_0x511e61-_0x2897aa<_0x3ff729[_0x4afbb1(0x20e)])return;_0x2897aa=_0x511e61;if(_0x3c3f9f)return;const _0x164d99=_0x438acd[_0x4afbb1(0x297)]()||_0x438acd[_0x4afbb1(0x22e)]();if(!_0x164d99||_0x164d99===_0x38048f)return;_0x3c3f9f=!![],_0x3fc2b6(_0x164d99);}async function _0x225b42(){_0x30960f=!![],_0x2716e2();if(_0x38048f)try{const _0x4f50cf=new _0x4de447();let _0x1a8d02=![];await _0x438acd['loadSnapshot'](_0x38048f,async _0x3b61e9=>{const _0x42ab77=_0x1175;await _0x4f50cf['loadFrom'](_0x3b61e9['labels']);const _0x15b889=_0xa1edf3();_0x15b889['load'](_0x3b61e9[_0x42ab77(0x29a)]),_0x44f088=_0x15b889,_0x14aaf3=_0x4f50cf,_0x1a8d02=!![];});if(_0x1a8d02)return;}catch{}await _0x2a577f(_0x38c804);}return{async 'load'(_0xad75ab){return _0x282672(async()=>{const _0x3c6127=_0x1175;_0x438acd[_0x3c6127(0x28a)]({'maxAgeMs':_0x3ff729[_0x3c6127(0x221)]}),_0x38c804=_0xad75ab??null,_0x30960f=_0x1c7fe5();if(_0x30960f){_0x2716e2();const _0x24183a=await _0x2ebf74();if(_0x24183a!=null)return _0x24183a;return await _0x2a577f(_0xad75ab),null;}const _0x4b0e99=_0x438acd[_0x3c6127(0x297)]()||_0x438acd[_0x3c6127(0x22e)]();return await _0x1d778b(_0x4b0e99),null;});},async 'add'(_0x3bf360,_0x1c9df6,_0x5be8cb){return _0x282672(async()=>{const _0x5913a1=_0x1175;if(!_0x30960f){if(!_0x1c7fe5())return;await _0x225b42();}if(!_0x44f088)return;const _0x2ca7b8=_0x14aaf3[_0x5913a1(0x22b)](_0x3bf360);if(_0x2ca7b8!==undefined)try{_0x44f088[_0x5913a1(0x253)](BigInt(_0x2ca7b8));}catch{}const _0x41dda6=_0x14aaf3['labelForEphemeral'](_0x3bf360);_0x44f088[_0x5913a1(0x295)](BigInt(_0x41dda6),_0x3e9719(_0x1c9df6)),_0x44a687++,_0x44a687>=_0x3ff729[_0x5913a1(0x267)]&&await _0x2db92d(_0x5be8cb??Date[_0x5913a1(0x2ae)]());});},async 'remove'(_0x447af4){return _0x282672(async()=>{const _0x23ae2c=_0x1175;if(!_0x30960f){if(!_0x1c7fe5())return;await _0x225b42();}if(!_0x44f088)return;const _0x4bb7d1=_0x14aaf3[_0x23ae2c(0x22b)](_0x447af4);if(_0x4bb7d1===undefined)return;try{_0x44f088['remove'](BigInt(_0x4bb7d1));}catch{}_0x14aaf3['tombstone'](_0x447af4),_0x44a687++;});},'search'(_0x274603,{limit:limit=0xa}={}){const _0x52b9be=_0x2cce55;if(!_0x30960f)_0x108279();if(!_0x44f088)return[];const _0x28812b=_0x44f088[_0x52b9be(0x284)]();if(_0x28812b===0x0)return[];const _0x5cfc10=Math['min'](limit,_0x28812b),_0x596eef=_0x44f088[_0x52b9be(0x251)](_0x3e9719(_0x274603),_0x5cfc10,0x0),_0x46dacd=[],_0x2b0dd1=_0x596eef['keys'],_0x421c9f=_0x596eef[_0x52b9be(0x29d)];for(let _0x1b2896=0x0;_0x1b2896<_0x2b0dd1[_0x52b9be(0x27a)];_0x1b2896++){const _0xa59151=_0x2b0dd1[_0x1b2896];if(_0xa59151===0xffffffffffffffffn)continue;const _0x554a31=Number(_0xa59151),_0x438bd6=_0x14aaf3[_0x52b9be(0x21b)](_0x554a31);if(!_0x438bd6)continue;const _0x2f39a6=_0x421c9f[_0x1b2896];let _0x300e59;if(_0x3ff729[_0x52b9be(0x2ad)]===_0x52b9be(0x227))_0x300e59=Math[_0x52b9be(0x298)](0x0,0x1-_0x2f39a6);else{if(_0x3ff729[_0x52b9be(0x2ad)]==='ip')_0x300e59=-_0x2f39a6;else _0x300e59=0x1/(0x1+_0x2f39a6);}_0x46dacd[_0x52b9be(0x2a4)]({'key':_0x438bd6,'score':_0x300e59});}return _0x46dacd;},async 'snapshot'(_0x4b5807=Date[_0x2cce55(0x2ae)]()){if(!_0x30960f)return![];return _0x282672(()=>_0x2db92d(_0x4b5807));},async 'rebuild'(_0xf2874c){if(!_0x30960f)return;return _0x282672(()=>{if(_0xf2874c!=null)_0x38c804=_0xf2874c;return _0x2a577f(_0xf2874c??_0x38c804);});},async 'stop'(){return _0x282672(async()=>{_0x30960f&&(await _0x2db92d(Date['now']()),_0x22a92c());});},'count'(){const _0x577c9a=_0x2cce55;return _0x14aaf3[_0x577c9a(0x284)]();},'info'(){const _0x6230f2=_0x2cce55;return{'algorithm':'usearch','role':_0x30960f?_0x6230f2(0x28c):_0x6230f2(0x235),'metric':_0x3ff729[_0x6230f2(0x2ad)],'connectivity':_0x3ff729['connectivity'],'expansionAdd':_0x3ff729[_0x6230f2(0x259)],'expansionSearch':_0x3ff729['expansionSearch'],'count':_0x14aaf3['size'](),'size':_0x44f088?.[_0x6230f2(0x284)]?.()??0x0,'capacity':_0x44f088?.['capacity']?.()??0x0,'changesSince':_0x30960f?_0x44a687:null,'viewedSnapshot':_0x38048f??null,'snapshotDir':_0x7cfa48,'latestSnapshot':_0x438acd[_0x6230f2(0x297)]()??null};}};},usearch;}var hasRequiredAlgorithmWorkerThread;function requireAlgorithmWorkerThread(){const _0x19548e=_0x17a610;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x4a611c,workerData:_0x2e28e2}=require$$0$1,{algorithmName:_0x2d1105,algorithmConfig:_0x12bf94,dims:_0x403932,dir:_0x5b7f30}=_0x2e28e2;let _0x2e52e2;if(_0x2d1105==='hnsw')_0x2e52e2=requireHnsw()(_0x12bf94,{'dims':_0x403932,'dir':_0x5b7f30});else{if(_0x2d1105===_0x19548e(0x223))_0x2e52e2=requireFlat()(_0x12bf94,{'dims':_0x403932,'dir':_0x5b7f30});else{if(_0x2d1105===_0x19548e(0x29c))_0x2e52e2=requireUsearch()(_0x12bf94,{'dims':_0x403932,'dir':_0x5b7f30});else throw new Error(_0x19548e(0x247)+_0x2d1105+'\x22');}}function _0x28efd3(){const _0x4a5509=_0x19548e;try{_0x4a611c['postMessage']({'op':_0x4a5509(0x216),'count':_0x2e52e2[_0x4a5509(0x26e)](),'info':_0x2e52e2[_0x4a5509(0x23a)](),'memory':process['memoryUsage']()});}catch{}}return _0x4a611c['on'](_0x19548e(0x276),async _0x211025=>{const _0x5c3fa1=_0x19548e,{id:_0x11e043,op:_0x4dca37,args:_0x313105}=_0x211025;try{let _0x59d08c;switch(_0x4dca37){case _0x5c3fa1(0x24f):{const _0x117b59=(_0x313105[_0x5c3fa1(0x279)]||[])[_0x5c3fa1(0x1f8)](_0x533b5b=>({'key':_0x533b5b[_0x5c3fa1(0x299)],'vector':_0x533b5b[_0x5c3fa1(0x208)]instanceof Float32Array?_0x533b5b[_0x5c3fa1(0x208)]:new Float32Array(_0x533b5b['vector'])}));_0x59d08c=await _0x2e52e2['load'](async()=>_0x117b59),_0x28efd3();break;}case _0x5c3fa1(0x295):{const _0x362525=_0x313105[_0x5c3fa1(0x208)]instanceof Float32Array?_0x313105[_0x5c3fa1(0x208)]:new Float32Array(_0x313105[_0x5c3fa1(0x208)]);await _0x2e52e2['add'](_0x313105['key'],_0x362525,_0x313105[_0x5c3fa1(0x22c)]??undefined),_0x28efd3(),_0x59d08c=null;break;}case _0x5c3fa1(0x253):{await _0x2e52e2[_0x5c3fa1(0x253)](_0x313105[_0x5c3fa1(0x299)]),_0x28efd3(),_0x59d08c=null;break;}case _0x5c3fa1(0x251):{const _0x19a897=_0x313105[_0x5c3fa1(0x211)]instanceof Float32Array?_0x313105[_0x5c3fa1(0x211)]:new Float32Array(_0x313105[_0x5c3fa1(0x211)]);_0x59d08c=_0x2e52e2[_0x5c3fa1(0x251)](_0x19a897,_0x313105['opts']||{});break;}case _0x5c3fa1(0x287):{_0x59d08c=await _0x2e52e2[_0x5c3fa1(0x287)](_0x313105[_0x5c3fa1(0x22c)]),_0x28efd3();break;}case _0x5c3fa1(0x243):{const _0x4c7373=(_0x313105[_0x5c3fa1(0x279)]||[])[_0x5c3fa1(0x1f8)](_0x52dc8a=>({'key':_0x52dc8a['key'],'vector':_0x52dc8a['vector']instanceof Float32Array?_0x52dc8a[_0x5c3fa1(0x208)]:new Float32Array(_0x52dc8a[_0x5c3fa1(0x208)])}));await _0x2e52e2[_0x5c3fa1(0x243)](async()=>_0x4c7373),_0x28efd3(),_0x59d08c=null;break;}case'stop':{await _0x2e52e2[_0x5c3fa1(0x218)](),_0x28efd3(),_0x59d08c=null;break;}case _0x5c3fa1(0x26e):{_0x59d08c=_0x2e52e2[_0x5c3fa1(0x26e)]();break;}case _0x5c3fa1(0x23a):{_0x59d08c=_0x2e52e2['info']();break;}default:throw new Error(_0x5c3fa1(0x290)+_0x4dca37+'\x22');}_0x4a611c[_0x5c3fa1(0x206)]({'id':_0x11e043,'result':_0x59d08c});}catch(_0x53ffd9){_0x4a611c['postMessage']({'id':_0x11e043,'error':{'message':_0x53ffd9?.[_0x5c3fa1(0x276)]||String(_0x53ffd9),'code':_0x53ffd9?.[_0x5c3fa1(0x25c)]}});}}),_0x4a611c[_0x19548e(0x206)]({'op':_0x19548e(0x2a9)}),algorithmWorkerThread$1;}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module['exports']=algorithmWorkerThread;
|
|
1
|
+
'use strict';const _0x3bc273=_0x367f;(function(_0x123b69,_0x3322f2){const _0x5ef58f=_0x367f,_0x549ed7=_0x123b69();while(!![]){try{const _0xcfb224=parseInt(_0x5ef58f(0x26f))/0x1*(-parseInt(_0x5ef58f(0x219))/0x2)+-parseInt(_0x5ef58f(0x28d))/0x3*(-parseInt(_0x5ef58f(0x25f))/0x4)+parseInt(_0x5ef58f(0x222))/0x5+-parseInt(_0x5ef58f(0x214))/0x6+parseInt(_0x5ef58f(0x2a0))/0x7*(parseInt(_0x5ef58f(0x207))/0x8)+-parseInt(_0x5ef58f(0x270))/0x9+parseInt(_0x5ef58f(0x2a6))/0xa*(-parseInt(_0x5ef58f(0x248))/0xb);if(_0xcfb224===_0x3322f2)break;else _0x549ed7['push'](_0x549ed7['shift']());}catch(_0x17a70d){_0x549ed7['push'](_0x549ed7['shift']());}}}(_0x473c,0x2a396));var require$$0$1=require(_0x3bc273(0x1e1)),require$$0=require('fs'),require$$1=require(_0x3bc273(0x1eb)),require$$2=require('os'),require$$3=require(_0x3bc273(0x1e7));function _0x473c(){const _0x2da2d8=['warn','resolve','manifestVersion','Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20','usearch\x20algorithm\x20requires\x20dims\x20>\x200','hex','.tmp-','candidateClock\x20must\x20be\x20finite\x20>=\x200','hostname','snapshot\x20incomplete:\x20','publishSnapshot','readFileSync','length','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20','stop','writer','HNSW_BINDINGS_UNAVAILABLE','12hLHBnJ','Cos','published',',\x20host:\x20','hnsw\x20algorithm\x20requires\x20dims\x20>\x200','entries','keepSnapshots','SNAPSHOT.LOCK','get','view','Unknown\x20op:\x20\x22','dir','for\x20Node\x20','utf8','loadFrom','SnapshotStore\x20requires\x20dir','unlinkSync','usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','USEARCH_BINDINGS_UNAVAILABLE','14707WvyHFd','pid','labels','maxElements','setEf','labelForEphemeral','40ervnYT','vectors','worker_threads','vector','rebuild',').\x20','stringify','writerLockMaxAgeMs','crypto','flat','round','labelToKey','path','_snapshotDir','searchKnn','load','delete','postMessage','cosine','memoryUsage','name','loadSnapshot','HierarchicalNSW','initIndex','hasOwnProperty','_tmp-','isFinite','writeFileSync','min','s,\x20pid:\x20','push','markDelete','lockPath','viewRefreshMs','from','getCurrentCount','size','state','usearch','MetricKind','1016aPgjMM','host','metric','hnsw','isArray','keyForLabel','keyToLabel','score','versions','then','key','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','prune','108396EUukpT','toString','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','snapshotEveryChanges','randomBytes','178gbPKqw','rmSync','max','snapshot','opts','Index','index','tombstoneCount','sqrt','1215480deqSVG','ScalarKind','readCurrentClock','efConstruction','lock_busy','exports','_snapshotPaths','growFactor','closeSync','algorithm','trim','join','dims','save','search','readdirSync','expansionSearch','info','reset','index.hnsw','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','arch','node','repeat','map','startsWith','addPoint','count','WRITER.LOCK','labelForExisting','clear','writeIndexSync','snapshotsDir','Unknown\x20algorithm:\x20\x22','isDirectory','readCurrentId','mkdirSync','readIndexSync','149501GDoWyF','heartbeatIntervalMs','latestSnapshotId','listSnapshotIds','now','filter','clock','platform','slice','L2sq','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20','expansionAdd','sort','[SnapshotStore]','\x20on\x20','currentPath','state.json','capacity','cleanupTmpDirs','tombstone','efSearch','add','reader','250768RGDNUQ','renameSync','EEXIST','labels.json','tmpMaxAgeMs','CURRENT','remove','keys','Original\x20error:\x20','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','stale','isInteger','getMaxElements','parse','log','queryVec','3869zhYqjI','1538730BWtOFo','nextLabel','message','set','code','connectivity','_tombstoneCount','trunc','__esModule','.tmp','cause','mtimeMs'];_0x473c=function(){return _0x2da2d8;};return _0x473c();}function _0x367f(_0x51f2ff,_0x3258b9){_0x51f2ff=_0x51f2ff-0x1e1;const _0x473c5a=_0x473c();let _0x367fc8=_0x473c5a[_0x51f2ff];return _0x367fc8;}function getDefaultExportFromCjs(_0x34b559){const _0x4c0de4=_0x3bc273;return _0x34b559&&_0x34b559[_0x4c0de4(0x278)]&&Object['prototype'][_0x4c0de4(0x1f7)]['call'](_0x34b559,'default')?_0x34b559['default']:_0x34b559;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x3c8457=_0x3bc273;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x285e94=require$$0,_0x17b750=require$$1,_0x116b46=require$$2,_0x1f7340=require$$3;function _0x5c918a(){const _0x12ab72=_0x367f;return Date[_0x12ab72(0x24c)]();}function _0x307479(_0x48e810){try{return _0x285e94['existsSync'](_0x48e810);}catch{return![];}}function _0x52834d(_0x4fea65){const _0x3dee04=_0x367f;try{return _0x285e94[_0x3dee04(0x287)](_0x4fea65,'utf8');}catch{return null;}}function _0x3bd1a7(_0x394159,_0x53a298){const _0x1cabb2=_0x367f,_0x585d1=_0x394159+'.tmp-'+_0x1f7340[_0x1cabb2(0x218)](0x6)[_0x1cabb2(0x215)](_0x1cabb2(0x281));_0x285e94[_0x1cabb2(0x1fa)](_0x585d1,_0x53a298),_0x285e94[_0x1cabb2(0x260)](_0x585d1,_0x394159);}function _0x2ee52c(_0x4c68b7,_0x291e05=0x10){const _0x5ff7f=_0x367f,_0x219b32=String(Math['max'](0x0,Math[_0x5ff7f(0x277)](_0x4c68b7||0x0)));return _0x219b32['length']>=_0x291e05?_0x219b32:'0'[_0x5ff7f(0x239)](_0x291e05-_0x219b32[_0x5ff7f(0x288)])+_0x219b32;}return snapshotStore=class _0xc430b1{constructor({dir:_0xf0fb8a,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x4d17ac=_0x367f;if(!_0xf0fb8a)throw new Error(_0x4d17ac(0x29c));this['dir']=_0xf0fb8a,this['snapshotsDir']=_0x17b750['join'](_0xf0fb8a,'snapshots'),this[_0x4d17ac(0x257)]=_0x17b750[_0x4d17ac(0x22d)](_0xf0fb8a,_0x4d17ac(0x264)),this['lockPath']=_0x17b750[_0x4d17ac(0x22d)](_0xf0fb8a,_0x4d17ac(0x294)),this['keepSnapshots']=keepSnapshots,this[_0x4d17ac(0x26d)]=log,_0x285e94[_0x4d17ac(0x246)](this[_0x4d17ac(0x298)],{'recursive':!![]}),_0x285e94[_0x4d17ac(0x246)](this[_0x4d17ac(0x242)],{'recursive':!![]});}[_0x3c8457(0x1ec)](_0x5ca193){const _0x4d6d79=_0x3c8457;return _0x17b750[_0x4d6d79(0x22d)](this['snapshotsDir'],_0x5ca193);}[_0x3c8457(0x228)](_0x2c1a90){const _0x100df0=_0x3c8457,_0x3887ca=this[_0x100df0(0x1ec)](_0x2c1a90);return{'dir':_0x3887ca,'index':_0x17b750[_0x100df0(0x22d)](_0x3887ca,_0x100df0(0x235)),'labels':_0x17b750[_0x100df0(0x22d)](_0x3887ca,_0x100df0(0x262)),'state':_0x17b750[_0x100df0(0x22d)](_0x3887ca,_0x100df0(0x258))};}[_0x3c8457(0x245)](){const _0x76bd97=_0x3c8457;if(!_0x307479(this[_0x76bd97(0x257)]))return null;const _0x5643d8=_0x52834d(this['currentPath']);if(!_0x5643d8)return null;const _0x4de0e6=String(_0x5643d8)[_0x76bd97(0x22c)]();return _0x4de0e6||null;}[_0x3c8457(0x224)](){const _0x301b83=_0x3c8457,_0x2584a3=this[_0x301b83(0x245)]();if(!_0x2584a3)return 0x0;const _0x41d964=Number(_0x2584a3);return Number['isFinite'](_0x41d964)?_0x41d964:0x0;}[_0x3c8457(0x24b)](){const _0xad10c7=_0x3c8457;try{return _0x285e94[_0xad10c7(0x231)](this[_0xad10c7(0x242)],{'withFileTypes':!![]})[_0xad10c7(0x24d)](_0xf1858=>_0xf1858[_0xad10c7(0x244)]())[_0xad10c7(0x23a)](_0x1827a0=>_0x1827a0[_0xad10c7(0x1f3)])[_0xad10c7(0x24d)](_0x3c9671=>!_0x3c9671[_0xad10c7(0x23b)](_0xad10c7(0x282)))[_0xad10c7(0x24d)](_0xcc37c9=>!_0xcc37c9[_0xad10c7(0x23b)](_0xad10c7(0x1f8)))[_0xad10c7(0x254)]();}catch{return[];}}[_0x3c8457(0x24a)](){const _0x3d3c7b=_0x3c8457,_0x1b9524=this[_0x3d3c7b(0x245)]();if(_0x1b9524)return _0x1b9524;const _0x540a3c=this[_0x3d3c7b(0x24b)]();if(!_0x540a3c['length'])return null;return _0x540a3c[_0x540a3c['length']-0x1];}[_0x3c8457(0x25a)]({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0x38cf0a=_0x3c8457;let _0x5f4c4e;try{_0x5f4c4e=_0x285e94[_0x38cf0a(0x231)](this['snapshotsDir'],{'withFileTypes':!![]});}catch{return;}const _0x50cf0e=_0x5c918a()-maxAgeMs;for(const _0x4d3293 of _0x5f4c4e){if(!_0x4d3293[_0x38cf0a(0x244)]())continue;const _0x2c11e5=_0x4d3293[_0x38cf0a(0x1f3)];if(!_0x2c11e5[_0x38cf0a(0x23b)](_0x38cf0a(0x282))&&!_0x2c11e5[_0x38cf0a(0x23b)](_0x38cf0a(0x1f8)))continue;const _0x963ba3=_0x17b750[_0x38cf0a(0x22d)](this[_0x38cf0a(0x242)],_0x2c11e5);try{const _0x55295f=_0x285e94['statSync'](_0x963ba3);if(_0x55295f[_0x38cf0a(0x27b)]>_0x50cf0e)continue;}catch{}try{_0x285e94[_0x38cf0a(0x21a)](_0x963ba3,{'recursive':!![],'force':!![]});}catch{}}}[_0x3c8457(0x213)]({keep:keep=null}={}){const _0x2e211f=_0x3c8457,_0xab641c=Math[_0x2e211f(0x21b)](0x1,Math[_0x2e211f(0x277)](keep??this['keepSnapshots']??0x3)),_0x5ebfb8=this[_0x2e211f(0x24b)]();if(_0x5ebfb8['length']<=_0xab641c)return;const _0x3aedeb=this['readCurrentId'](),_0x4b22bb=_0x5ebfb8[_0x2e211f(0x250)](0x0,Math[_0x2e211f(0x21b)](0x0,_0x5ebfb8[_0x2e211f(0x288)]-_0xab641c));for(const _0x1e81cc of _0x4b22bb){if(_0x3aedeb&&_0x1e81cc===_0x3aedeb)continue;const _0xfde217=this['_snapshotDir'](_0x1e81cc);try{_0x285e94[_0x2e211f(0x21a)](_0xfde217,{'recursive':!![],'force':!![]});}catch{}}}async[_0x3c8457(0x1f4)](_0x4284df,_0x2f8ca3){const _0x35066a=_0x3c8457;if(!_0x4284df)throw new Error('snapshot\x20id\x20required');const _0x4f6ae7=this[_0x35066a(0x228)](_0x4284df);if(!_0x307479(_0x4f6ae7[_0x35066a(0x21f)])||!_0x307479(_0x4f6ae7['labels'])||!_0x307479(_0x4f6ae7['state']))throw new Error(_0x35066a(0x285)+_0x4284df);const _0x298592=await _0x2f8ca3(_0x4f6ae7);return _0x298592||{};}async[_0x3c8457(0x286)](_0x41180c,_0x36a57b,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x509e1d=_0x3c8457,_0x22f2c5=Number(_0x41180c);if(!Number[_0x509e1d(0x1f9)](_0x22f2c5)||_0x22f2c5<0x0)throw new Error(_0x509e1d(0x283));const _0x125730=_0x2ee52c(_0x22f2c5),_0x8e943f=this[_0x509e1d(0x1ec)](_0x125730),_0x3f3e84=_0x17b750[_0x509e1d(0x22d)](this[_0x509e1d(0x242)],_0x509e1d(0x282)+_0x125730+'-'+_0x1f7340['randomBytes'](0x6)[_0x509e1d(0x215)](_0x509e1d(0x281)));_0x285e94[_0x509e1d(0x246)](_0x3f3e84,{'recursive':!![]});const _0x6763c9={'dir':_0x3f3e84,'index':_0x17b750[_0x509e1d(0x22d)](_0x3f3e84,'index.hnsw'),'labels':_0x17b750[_0x509e1d(0x22d)](_0x3f3e84,_0x509e1d(0x262)),'state':_0x17b750[_0x509e1d(0x22d)](_0x3f3e84,'state.json')};await _0x36a57b(_0x6763c9,{'id':_0x125730,'clock':_0x22f2c5});const _0x2b45c9=JSON[_0x509e1d(0x1e5)]({'pid':process[_0x509e1d(0x2a1)],'host':_0x116b46[_0x509e1d(0x284)](),'at':_0x5c918a()}),_0x1904f5=_0x5c918a();let _0x3cba14=null;const _0x3f55fe=()=>{const _0x209046=_0x509e1d;try{const _0x18a32b=JSON[_0x209046(0x26c)](_0x285e94[_0x209046(0x287)](this['lockPath'],_0x209046(0x29a)));if(_0x18a32b['at']&&_0x5c918a()-_0x18a32b['at']>staleLockMaxAgeMs){const _0x4c73bd=_0x5c918a()-_0x18a32b['at'],_0x319f50=_0x209046(0x27f)+Math[_0x209046(0x1e9)](_0x4c73bd/0x3e8)+_0x209046(0x1fc)+_0x18a32b[_0x209046(0x2a1)]+_0x209046(0x290)+_0x18a32b[_0x209046(0x208)]+_0x209046(0x1e4)+_0x209046(0x216);this['log']?.[_0x209046(0x27c)]?this['log']['warn'](_0x319f50):console[_0x209046(0x27c)](_0x209046(0x255),_0x319f50);try{_0x285e94['unlinkSync'](this[_0x209046(0x1ff)]);}catch{}return!![];}}catch{try{_0x285e94[_0x209046(0x29d)](this[_0x209046(0x1ff)]);}catch{}}return![];},_0x2e2e5a=()=>{const _0x486fda=_0x509e1d;try{return _0x3cba14=_0x285e94['openSync'](this[_0x486fda(0x1ff)],'wx'),_0x285e94[_0x486fda(0x1fa)](_0x3cba14,_0x2b45c9),!![];}catch(_0x4ff2b7){if(_0x4ff2b7&&_0x4ff2b7[_0x486fda(0x274)]===_0x486fda(0x261))return![];throw _0x4ff2b7;}};if(!_0x2e2e5a()){_0x3f55fe(),_0x2e2e5a();if(_0x3cba14==null&&lockTimeoutMs>0x0)while(_0x5c918a()-_0x1904f5<lockTimeoutMs){await new Promise(_0x1464ef=>setTimeout(_0x1464ef,0x19));if(_0x2e2e5a())break;_0x3f55fe();}}if(_0x3cba14==null){try{_0x285e94['rmSync'](_0x3f3e84,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x509e1d(0x226)};}try{const _0x465cfe=this[_0x509e1d(0x224)]();if(_0x22f2c5<=_0x465cfe){try{_0x285e94['rmSync'](_0x3f3e84,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x509e1d(0x269),'currentClock':_0x465cfe};}if(!_0x307479(_0x8e943f))_0x285e94['renameSync'](_0x3f3e84,_0x8e943f);else try{_0x285e94[_0x509e1d(0x21a)](_0x3f3e84,{'recursive':!![],'force':!![]});}catch{}return _0x3bd1a7(this['currentPath'],_0x125730+'\x0a'),this[_0x509e1d(0x213)]({'keep':keep}),{'published':!![],'currentClock':_0x22f2c5};}finally{try{_0x285e94[_0x509e1d(0x22a)](_0x3cba14);}catch{}try{_0x285e94[_0x509e1d(0x29d)](this[_0x509e1d(0x1ff)]);}catch{}}}},snapshotStore;}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x8ec2b4=_0x3bc273;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x515940=require$$0;class _0xafa7e{constructor(){const _0x21439d=_0x367f;this['keyToLabel']=new Map(),this[_0x21439d(0x1ea)]=new Map(),this[_0x21439d(0x271)]=0x0,this['_tombstoneCount']=0x0;}async[_0x8ec2b4(0x234)](){const _0x5134e0=_0x8ec2b4;this['keyToLabel']=new Map(),this[_0x5134e0(0x1ea)]=new Map(),this[_0x5134e0(0x271)]=0x0,this['_tombstoneCount']=0x0;}async['loadFrom'](_0x3d131b){const _0x19a300=_0x8ec2b4;if(!_0x3d131b||!_0x515940['existsSync'](_0x3d131b))return await this['reset'](),!![];let _0x5da851;try{_0x5da851=_0x515940['readFileSync'](_0x3d131b,_0x19a300(0x29a));}catch{return await this[_0x19a300(0x234)](),!![];}let _0x1b8241;try{_0x1b8241=JSON[_0x19a300(0x26c)](_0x5da851);}catch{return await this[_0x19a300(0x234)](),!![];}const _0x4b9a19=Array[_0x19a300(0x20b)](_0x1b8241?.['entries'])?_0x1b8241['entries']:[],_0xedde0e=Number[_0x19a300(0x26a)](_0x1b8241?.[_0x19a300(0x271)])?_0x1b8241[_0x19a300(0x271)]:0x0,_0x512ae4=new Map(),_0x279764=new Map();let _0x25de5d=-0x1;for(const _0x1d1c00 of _0x4b9a19){if(!Array['isArray'](_0x1d1c00)||_0x1d1c00['length']!==0x2)continue;const _0x39a19b=Number(_0x1d1c00[0x0]),_0x2dbcc9=String(_0x1d1c00[0x1]??'');if(!Number['isInteger'](_0x39a19b)||_0x39a19b<0x0)continue;if(!_0x2dbcc9)continue;_0x512ae4[_0x19a300(0x273)](_0x2dbcc9,_0x39a19b),_0x279764[_0x19a300(0x273)](_0x39a19b,_0x2dbcc9);if(_0x39a19b>_0x25de5d)_0x25de5d=_0x39a19b;}return this[_0x19a300(0x20d)]=_0x512ae4,this[_0x19a300(0x1ea)]=_0x279764,this[_0x19a300(0x271)]=Math['max'](_0xedde0e,_0x25de5d+0x1,0x0),this[_0x19a300(0x276)]=0x0,!![];}[_0x8ec2b4(0x23f)](_0x20f183){const _0x4f62d6=_0x8ec2b4;return this['keyToLabel'][_0x4f62d6(0x295)](_0x20f183);}[_0x8ec2b4(0x2a5)](_0x21be76){const _0xade0e6=_0x8ec2b4;let _0x3d3a5b=this['keyToLabel'][_0xade0e6(0x295)](_0x21be76);if(_0x3d3a5b!==undefined)return _0x3d3a5b;return _0x3d3a5b=this[_0xade0e6(0x271)]++,this[_0xade0e6(0x20d)][_0xade0e6(0x273)](_0x21be76,_0x3d3a5b),this[_0xade0e6(0x1ea)][_0xade0e6(0x273)](_0x3d3a5b,_0x21be76),_0x3d3a5b;}['tombstone'](_0x5a32bf){const _0x254ce3=_0x8ec2b4,_0x202c07=this[_0x254ce3(0x20d)][_0x254ce3(0x295)](_0x5a32bf);if(_0x202c07===undefined)return;this[_0x254ce3(0x20d)][_0x254ce3(0x1ef)](_0x5a32bf),this[_0x254ce3(0x1ea)][_0x254ce3(0x1ef)](_0x202c07),this[_0x254ce3(0x276)]++;}[_0x8ec2b4(0x20c)](_0xb4d191){const _0x55ea7a=_0x8ec2b4;return this['labelToKey'][_0x55ea7a(0x295)](_0xb4d191)??null;}[_0x8ec2b4(0x203)](){return this['keyToLabel']['size'];}[_0x8ec2b4(0x220)](){return this['_tombstoneCount'];}async['snapshotTo'](_0x476b8c){const _0x5b0357=_0x8ec2b4,_0x5ac4d9=_0x476b8c+_0x5b0357(0x279),_0x19afce=[];for(const [_0x1a67ac,_0x333c29]of this[_0x5b0357(0x1ea)][_0x5b0357(0x292)]()){_0x19afce[_0x5b0357(0x1fd)]([_0x1a67ac,_0x333c29]);}_0x19afce['sort']((_0xce504e,_0xccfc9d)=>_0xce504e[0x0]-_0xccfc9d[0x0]);const _0x5dfd1c={'version':0x1,'nextLabel':this[_0x5b0357(0x271)],'entries':_0x19afce};_0x515940[_0x5b0357(0x1fa)](_0x5ac4d9,JSON['stringify'](_0x5dfd1c)),_0x515940[_0x5b0357(0x260)](_0x5ac4d9,_0x476b8c);}}return labelMap=_0xafa7e,labelMap;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x541796=requireSnapshotStore(),_0x33fa5f=requireLabelMap(),_0x1d84f0=0x1;let _0x53b02b=null;function _0x5bc5a3(){const _0x456b9a=_0x367f;if(_0x53b02b)return _0x53b02b;try{return _0x53b02b=require('hnswlib-node'),_0x53b02b;}catch(_0x5aca96){const _0x19d1c2=new Error(_0x456b9a(0x212)+(_0x456b9a(0x299)+process[_0x456b9a(0x20f)]['node']+'\x20on\x20'+process[_0x456b9a(0x24f)]+'/'+process[_0x456b9a(0x237)]+'.\x20')+_0x456b9a(0x289)+(_0x456b9a(0x267)+(_0x5aca96?.[_0x456b9a(0x272)]||String(_0x5aca96))));_0x19d1c2[_0x456b9a(0x274)]=_0x456b9a(0x28c),_0x19d1c2[_0x456b9a(0x27a)]=_0x5aca96;throw _0x19d1c2;}}return hnsw=function _0x538edb(_0x35df62={},{dims:_0x4ddcda,dir:_0x2d82a5}){const _0x5957c9=_0x367f,_0x1fce7f=_0x5bc5a3();if(!_0x4ddcda||_0x4ddcda<=0x0)throw new Error(_0x5957c9(0x291));if(!_0x2d82a5)throw new Error(_0x5957c9(0x268));const _0x25395d={'metric':_0x35df62[_0x5957c9(0x209)]??_0x5957c9(0x1f1),'M':_0x35df62['M']??0x10,'efConstruction':_0x35df62[_0x5957c9(0x225)]??0xc8,'efSearch':_0x35df62[_0x5957c9(0x25c)]??0x40,'maxElements':_0x35df62[_0x5957c9(0x2a3)]??0x400,'growFactor':_0x35df62['growFactor']??0x2,'snapshotEveryChanges':_0x35df62['snapshotEveryChanges']??0xc350,'keepSnapshots':_0x35df62['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x35df62[_0x5957c9(0x263)]??0x6*0x36ee80},_0xcb5183=new _0x541796({'dir':_0x2d82a5,'keepSnapshots':_0x25395d[_0x5957c9(0x293)]}),_0x119295=new _0x33fa5f();let _0x2a3eea=null,_0xb1739b=0x0,_0x25f320=null,_0x2126c1=Promise['resolve']();const _0x42c9b8=_0x5b26e8=>{const _0x22848d=_0x5957c9;return _0x2126c1=_0x2126c1[_0x22848d(0x210)](_0x5b26e8),_0x2126c1;};async function _0x577ad2(_0x5b7018){const _0x25dadf=_0x5957c9;await _0x119295[_0x25dadf(0x234)]();const _0x441735=_0x5b7018?await _0x5b7018():[],_0xd1f91e=Math[_0x25dadf(0x21b)](_0x25395d['maxElements'],Math['ceil'](_0x441735[_0x25dadf(0x288)]*(_0x25395d[_0x25dadf(0x229)]||1.2)),0x1);_0x2a3eea=new _0x1fce7f[(_0x25dadf(0x1f5))](_0x25395d[_0x25dadf(0x209)],_0x4ddcda),_0x2a3eea[_0x25dadf(0x1f6)]({'maxElements':_0xd1f91e,'efConstruction':_0x25395d[_0x25dadf(0x225)],'M':_0x25395d['M']});for(const {key:_0x1c59f9,vector:_0x4735e9}of _0x441735){if(!(_0x4735e9 instanceof Float32Array)||_0x4735e9['length']!==_0x4ddcda)continue;const _0x1e9887=_0x119295[_0x25dadf(0x2a5)](_0x1c59f9);_0x2a3eea[_0x25dadf(0x23c)](Array[_0x25dadf(0x201)](_0x4735e9),_0x1e9887);}_0x2a3eea[_0x25dadf(0x2a4)](_0x25395d[_0x25dadf(0x25c)]),_0xb1739b=0x0;}async function _0x2901a1(_0x58a781){const _0x4194ab=_0x5957c9;if(!_0x2a3eea||!_0x58a781)return![];const _0x460b33=await _0xcb5183[_0x4194ab(0x286)](_0x58a781,async _0x1ac449=>{const _0x19f048=_0x4194ab;_0x2a3eea[_0x19f048(0x241)](_0x1ac449[_0x19f048(0x21f)]),await _0x119295['snapshotTo'](_0x1ac449['labels']);const _0x39c4d3=require$$0;_0x39c4d3['writeFileSync'](_0x1ac449['state'],JSON[_0x19f048(0x1e5)]({'manifestVersion':_0x1d84f0,'dims':_0x4ddcda,'metric':_0x25395d[_0x19f048(0x209)],'clock':_0x58a781,'snapshotAt':Date['now']()},null,0x2));},{'keep':_0x25395d[_0x4194ab(0x293)]});if(_0x460b33?.[_0x4194ab(0x28f)])_0xb1739b=0x0;return _0x460b33?.[_0x4194ab(0x28f)]??![];}async function _0x72778(){const _0x5c33ff=_0x5957c9,_0x5d6265=_0xcb5183[_0x5c33ff(0x245)]()||_0xcb5183[_0x5c33ff(0x24a)]();if(!_0x5d6265)return null;let _0x228f8f,_0x3c65db=![];return await _0xcb5183['loadSnapshot'](_0x5d6265,async _0x557e4c=>{const _0x280291=_0x5c33ff,_0x3ca802=require$$0;_0x228f8f=JSON[_0x280291(0x26c)](_0x3ca802['readFileSync'](_0x557e4c['state'],'utf8'));if(_0x228f8f[_0x280291(0x27e)]!==_0x1d84f0||_0x228f8f[_0x280291(0x22e)]!==_0x4ddcda||_0x228f8f[_0x280291(0x209)]!==_0x25395d['metric']){_0x228f8f=null;return;}await _0x119295[_0x280291(0x29b)](_0x557e4c[_0x280291(0x2a2)]),_0x2a3eea=new _0x1fce7f['HierarchicalNSW'](_0x25395d[_0x280291(0x209)],_0x4ddcda),_0x2a3eea[_0x280291(0x247)](_0x557e4c[_0x280291(0x21f)]),_0x2a3eea[_0x280291(0x2a4)](_0x25395d[_0x280291(0x25c)]),_0x3c65db=!![];}),_0x3c65db?_0x228f8f?.[_0x5c33ff(0x24e)]??0x0:null;}return{async 'load'(_0x26dc5a){return _0x42c9b8(async()=>{_0xcb5183['cleanupTmpDirs']({'maxAgeMs':_0x25395d['tmpMaxAgeMs']}),_0x25f320=_0x26dc5a??null;const _0x1016c0=await _0x72778();if(_0x1016c0!=null)return _0x1016c0;return await _0x577ad2(_0x26dc5a),null;});},async 'add'(_0x2af905,_0xca2c7e,_0xe47a19){return _0x42c9b8(async()=>{const _0x186d52=_0x367f;if(!_0x2a3eea)return;const _0x3c21e5=_0x119295[_0x186d52(0x2a5)](_0x2af905);try{_0x2a3eea[_0x186d52(0x1fe)](_0x3c21e5);}catch{}_0x2a3eea[_0x186d52(0x202)]()>=_0x2a3eea[_0x186d52(0x26b)]()&&(_0x25395d['maxElements']=Math['ceil'](_0x2a3eea[_0x186d52(0x26b)]()*(_0x25395d[_0x186d52(0x229)]||0x2)),await _0x577ad2(_0x25f320)),_0x2a3eea[_0x186d52(0x23c)](Array['from'](_0xca2c7e),_0x3c21e5),_0xb1739b++,_0xb1739b>=_0x25395d[_0x186d52(0x217)]&&await _0x2901a1(_0xe47a19??Date[_0x186d52(0x24c)]());});},async 'remove'(_0x148078){return _0x42c9b8(async()=>{const _0x55e464=_0x367f;if(!_0x2a3eea)return;const _0x1f8573=_0x119295[_0x55e464(0x23f)](_0x148078);if(_0x1f8573===undefined)return;try{_0x2a3eea[_0x55e464(0x1fe)](_0x1f8573);}catch{}_0x119295['tombstone'](_0x148078),_0xb1739b++;});},'search'(_0xc00b0f,{limit:limit=0xa,efSearch:_0x150bb1}={}){const _0x27a070=_0x5957c9;if(!_0x2a3eea)return[];if(Number['isInteger'](_0x150bb1))_0x2a3eea[_0x27a070(0x2a4)](_0x150bb1);const _0x39e15f=Math['min'](limit,_0x2a3eea['getCurrentCount']()||0x1),{neighbors:_0x2e99f0,distances:_0x553a83}=_0x2a3eea[_0x27a070(0x1ed)](Array[_0x27a070(0x201)](_0xc00b0f),_0x39e15f),_0x3cde3b=[];for(let _0x1821df=0x0;_0x1821df<_0x2e99f0['length'];_0x1821df++){const _0x234fdc=_0x119295[_0x27a070(0x20c)](_0x2e99f0[_0x1821df]);if(!_0x234fdc)continue;const _0x50003a=_0x25395d[_0x27a070(0x209)]===_0x27a070(0x1f1)?Math[_0x27a070(0x21b)](0x0,0x1-_0x553a83[_0x1821df]):0x1/(0x1+_0x553a83[_0x1821df]);_0x3cde3b[_0x27a070(0x1fd)]({'key':_0x234fdc,'score':_0x50003a});}return _0x3cde3b;},async 'snapshot'(_0x5ce703=Date[_0x5957c9(0x24c)]()){return _0x42c9b8(()=>_0x2901a1(_0x5ce703));},async 'rebuild'(_0xeef308){return _0x42c9b8(()=>{if(_0xeef308!=null)_0x25f320=_0xeef308;return _0x577ad2(_0xeef308??_0x25f320);});},async 'stop'(){const _0x3739d4=_0x5957c9;return _0x42c9b8(()=>_0x2901a1(Date[_0x3739d4(0x24c)]()));},'count'(){const _0x4cf120=_0x5957c9;return _0x119295[_0x4cf120(0x203)]();},'info'(){const _0x20600d=_0x5957c9;return{'algorithm':_0x20600d(0x20a),'metric':_0x25395d[_0x20600d(0x209)],'M':_0x25395d['M'],'efConstruction':_0x25395d[_0x20600d(0x225)],'efSearch':_0x25395d['efSearch'],'maxElements':_0x2a3eea?.['getMaxElements']()??_0x25395d['maxElements'],'count':_0x119295[_0x20600d(0x203)](),'changesSince':_0xb1739b,'snapshotDir':_0x2d82a5,'latestSnapshot':_0xcb5183[_0x20600d(0x245)]()??null};}};},hnsw;}var flat,hasRequiredFlat;function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x295f46(_0x1bb07d={}){const _0x344189=new Map();return{async 'load'(_0xc72cdb){const _0x59120a=_0x367f;_0x344189[_0x59120a(0x240)]();if(_0xc72cdb)for(const {key:_0x2f928a,vector:_0x21d32e}of await _0xc72cdb()){_0x344189['set'](_0x2f928a,_0x21d32e);}},async 'add'(_0x5cd79c,_0xeaddf2,_0x57ceb5){const _0x47cad4=_0x367f;_0x344189[_0x47cad4(0x273)](_0x5cd79c,_0xeaddf2);},async 'remove'(_0x310178){const _0x1a6f97=_0x367f;_0x344189[_0x1a6f97(0x1ef)](_0x310178);},'search'(_0x59e26b,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x3d1793=_0x367f,_0x891113=[];for(const [_0x2861dd,_0x45db91]of _0x344189){const _0x208474=_0x5b3972(_0x59e26b,_0x45db91);if(_0x208474>=threshold)_0x891113[_0x3d1793(0x1fd)]({'key':_0x2861dd,'score':_0x208474});}return _0x891113[_0x3d1793(0x254)]((_0x4e1aad,_0x6eb561)=>_0x6eb561[_0x3d1793(0x20e)]-_0x4e1aad[_0x3d1793(0x20e)]),_0x891113['slice'](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0x4565b8){const _0x5aa608=_0x367f;await this[_0x5aa608(0x1ee)](_0x4565b8);},async 'stop'(){},'count'(){const _0x48a6b3=_0x367f;return _0x344189[_0x48a6b3(0x203)];},'info'(){const _0x88f726=_0x367f;return{'algorithm':_0x88f726(0x1e8),'count':_0x344189[_0x88f726(0x203)]};}};};function _0x5b3972(_0x3ccd12,_0xb035e5){const _0x1fde3f=_0x367f;let _0xb24a28=0x0,_0x3b054a=0x0,_0x1db28f=0x0;for(let _0x208854=0x0;_0x208854<_0x3ccd12[_0x1fde3f(0x288)];_0x208854++){_0xb24a28+=_0x3ccd12[_0x208854]*_0xb035e5[_0x208854],_0x3b054a+=_0x3ccd12[_0x208854]*_0x3ccd12[_0x208854],_0x1db28f+=_0xb035e5[_0x208854]*_0xb035e5[_0x208854];}const _0xc3fae3=Math[_0x1fde3f(0x221)](_0x3b054a)*Math[_0x1fde3f(0x221)](_0x1db28f);return _0xc3fae3===0x0?0x0:_0xb24a28/_0xc3fae3;}return flat;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x1cce8c=require$$0,_0x22d6bb=require$$1,_0x54f043=requireSnapshotStore(),_0x43aa99=requireLabelMap(),_0x5da1fe=0x1;let _0x34c52d=null;function _0x5e029b(){const _0x21b8d1=_0x367f;if(_0x34c52d)return _0x34c52d;try{return _0x34c52d=require('usearch'),_0x34c52d;}catch(_0x359e54){const _0x373647=new Error(_0x21b8d1(0x236)+(_0x21b8d1(0x299)+process[_0x21b8d1(0x20f)][_0x21b8d1(0x238)]+_0x21b8d1(0x256)+process['platform']+'/'+process['arch']+'.\x20')+_0x21b8d1(0x252)+(_0x21b8d1(0x267)+(_0x359e54?.['message']||String(_0x359e54))));_0x373647[_0x21b8d1(0x274)]=_0x21b8d1(0x29f),_0x373647[_0x21b8d1(0x27a)]=_0x359e54;throw _0x373647;}}function _0x206ba2(_0x43b47c,_0x46ee72){const _0x2fed94=_0x367f;switch(_0x43b47c){case _0x2fed94(0x1f1):return _0x46ee72[_0x2fed94(0x206)][_0x2fed94(0x28e)];case'l2':return _0x46ee72['MetricKind'][_0x2fed94(0x251)];case'ip':return _0x46ee72[_0x2fed94(0x206)]['IP'];default:return _0x46ee72['MetricKind'][_0x2fed94(0x28e)];}}return usearch=function _0x4f6ce5(_0x6c6818={},{dims:_0x362e39,dir:_0x4e3e63}){const _0x876788=_0x367f,_0x14108d=_0x5e029b();if(!_0x362e39||_0x362e39<=0x0)throw new Error(_0x876788(0x280));if(!_0x4e3e63)throw new Error(_0x876788(0x29e));const _0x157144={'metric':_0x6c6818[_0x876788(0x209)]??_0x876788(0x1f1),'connectivity':_0x6c6818['connectivity']??0x10,'expansionAdd':_0x6c6818[_0x876788(0x253)]??0x80,'expansionSearch':_0x6c6818[_0x876788(0x232)]??0x40,'snapshotEveryChanges':_0x6c6818[_0x876788(0x217)]??0xc350,'keepSnapshots':_0x6c6818[_0x876788(0x293)]??0x2,'tmpMaxAgeMs':_0x6c6818[_0x876788(0x263)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x6c6818['heartbeatIntervalMs']??0x1388,'writerLockMaxAgeMs':_0x6c6818['writerLockMaxAgeMs']??0x3a98,'viewRefreshMs':_0x6c6818[_0x876788(0x200)]??0x3e8},_0x5a420c=new _0x54f043({'dir':_0x4e3e63,'keepSnapshots':_0x157144[_0x876788(0x293)]}),_0xad7b00=_0x22d6bb['join'](_0x4e3e63,_0x876788(0x23e));let _0x2066bf=new _0x43aa99(),_0x414fcc=null,_0x5d6d1f=0x0,_0x41ec4e=null,_0x5bbf93=![],_0x2d6a65=null,_0x4d84ef=null,_0x2487f4=0x0,_0x4fdbb8=![],_0x1f9e24=Promise[_0x876788(0x27d)]();const _0x21645b=_0x5f3b3d=>{const _0x567d01=_0x876788;return _0x1f9e24=_0x1f9e24[_0x567d01(0x210)](_0x5f3b3d),_0x1f9e24;};function _0x563174(){const _0x22487b=_0x876788;return new _0x14108d[(_0x22487b(0x21e))]({'dimensions':_0x362e39,'metric':_0x206ba2(_0x157144[_0x22487b(0x209)],_0x14108d),'quantization':_0x14108d[_0x22487b(0x223)]['F32'],'connectivity':_0x157144['connectivity'],'expansion_add':_0x157144['expansionAdd'],'expansion_search':_0x157144[_0x22487b(0x232)],'multi':![]});}function _0x2014a8(_0x2b4afc){return _0x2b4afc instanceof Float32Array?_0x2b4afc:new Float32Array(_0x2b4afc);}function _0x4eb11d(){const _0x34ae85=_0x876788,_0x33de8c=JSON[_0x34ae85(0x1e5)]({'pid':process[_0x34ae85(0x2a1)],'at':Date['now']()}),_0x30f068=()=>{const _0x63619b=_0x34ae85;try{const _0x18412d=_0x1cce8c['openSync'](_0xad7b00,'wx');return _0x1cce8c[_0x63619b(0x1fa)](_0x18412d,_0x33de8c),_0x1cce8c['closeSync'](_0x18412d),!![];}catch(_0x56862d){if(_0x56862d?.['code']===_0x63619b(0x261))return![];throw _0x56862d;}};if(_0x30f068())return!![];try{const _0x513ee1=JSON['parse'](_0x1cce8c[_0x34ae85(0x287)](_0xad7b00,_0x34ae85(0x29a))),_0x4f4317=Date[_0x34ae85(0x24c)]()-(_0x513ee1['at']??0x0);if(_0x4f4317<_0x157144[_0x34ae85(0x1e6)])return![];}catch{}try{_0x1cce8c[_0x34ae85(0x29d)](_0xad7b00);}catch{}return _0x30f068();}function _0x4c2e0d(){const _0x1e071a=_0x876788;if(_0x2d6a65)clearInterval(_0x2d6a65);_0x2d6a65=setInterval(()=>{const _0x40aa64=_0x367f;try{_0x1cce8c['writeFileSync'](_0xad7b00,JSON[_0x40aa64(0x1e5)]({'pid':process['pid'],'at':Date[_0x40aa64(0x24c)]()}));}catch{}},_0x157144[_0x1e071a(0x249)]),_0x2d6a65['unref']();}function _0x50f27b(){const _0x4c6f66=_0x876788;_0x2d6a65&&(clearInterval(_0x2d6a65),_0x2d6a65=null);try{const _0x552c2a=JSON[_0x4c6f66(0x26c)](_0x1cce8c[_0x4c6f66(0x287)](_0xad7b00,_0x4c6f66(0x29a)));if(_0x552c2a[_0x4c6f66(0x2a1)]===process[_0x4c6f66(0x2a1)])_0x1cce8c[_0x4c6f66(0x29d)](_0xad7b00);}catch{}}async function _0xe3f54b(_0x18e3e3){const _0x5e1394=_0x876788;_0x2066bf=new _0x43aa99(),await _0x2066bf['reset'](),_0x414fcc=_0x563174();const _0x174711=_0x18e3e3?await _0x18e3e3():[];for(const {key:_0x6b3aca,vector:_0x3e52f6}of _0x174711){if(!(_0x3e52f6 instanceof Float32Array)||_0x3e52f6[_0x5e1394(0x288)]!==_0x362e39)continue;const _0x503bb1=_0x2066bf[_0x5e1394(0x2a5)](_0x6b3aca);_0x414fcc[_0x5e1394(0x25d)](BigInt(_0x503bb1),_0x3e52f6);}_0x5d6d1f=0x0;}async function _0x4f6163(_0x41d2fb){const _0x40ae80=_0x876788;if(!_0x414fcc||!_0x41d2fb)return![];const _0x46ebde=await _0x5a420c[_0x40ae80(0x286)](_0x41d2fb,async _0x3a4491=>{const _0x537b4a=_0x40ae80;_0x414fcc[_0x537b4a(0x22f)](_0x3a4491[_0x537b4a(0x21f)]),await _0x2066bf['snapshotTo'](_0x3a4491[_0x537b4a(0x2a2)]),_0x1cce8c[_0x537b4a(0x1fa)](_0x3a4491[_0x537b4a(0x204)],JSON[_0x537b4a(0x1e5)]({'manifestVersion':_0x5da1fe,'algorithm':_0x537b4a(0x205),'dims':_0x362e39,'metric':_0x157144[_0x537b4a(0x209)],'clock':_0x41d2fb,'snapshotAt':Date['now']()},null,0x2));},{'keep':_0x157144['keepSnapshots']});if(_0x46ebde?.[_0x40ae80(0x28f)])_0x5d6d1f=0x0;return _0x46ebde?.['published']??![];}async function _0x4e908e(){const _0x1cba7a=_0x876788,_0x2e0ade=_0x5a420c[_0x1cba7a(0x245)]()||_0x5a420c[_0x1cba7a(0x24a)]();if(!_0x2e0ade)return null;let _0x377ab9,_0x5bd66b=![];return await _0x5a420c[_0x1cba7a(0x1f4)](_0x2e0ade,async _0x1bc570=>{const _0x14d039=_0x1cba7a;_0x377ab9=JSON[_0x14d039(0x26c)](_0x1cce8c['readFileSync'](_0x1bc570[_0x14d039(0x204)],'utf8'));if(_0x377ab9[_0x14d039(0x27e)]!==_0x5da1fe||_0x377ab9[_0x14d039(0x22b)]!==_0x14d039(0x205)||_0x377ab9[_0x14d039(0x22e)]!==_0x362e39||_0x377ab9[_0x14d039(0x209)]!==_0x157144[_0x14d039(0x209)]){_0x377ab9=null;return;}_0x2066bf=new _0x43aa99(),await _0x2066bf[_0x14d039(0x29b)](_0x1bc570[_0x14d039(0x2a2)]),_0x414fcc=_0x563174(),_0x414fcc[_0x14d039(0x1ee)](_0x1bc570['index']),_0x5bd66b=!![];}),_0x5bd66b?_0x377ab9?.[_0x1cba7a(0x24e)]??0x0:null;}async function _0x2b907a(_0x76f202){const _0x2c49b3=_0x876788;if(!_0x76f202)return![];let _0x4e2b85=![];try{await _0x5a420c[_0x2c49b3(0x1f4)](_0x76f202,async _0x34666e=>{const _0x38a12a=_0x2c49b3,_0x1b6ab7=JSON[_0x38a12a(0x26c)](_0x1cce8c[_0x38a12a(0x287)](_0x34666e[_0x38a12a(0x204)],_0x38a12a(0x29a)));if(_0x1b6ab7[_0x38a12a(0x27e)]!==_0x5da1fe||_0x1b6ab7['algorithm']!=='usearch'||_0x1b6ab7['dims']!==_0x362e39||_0x1b6ab7[_0x38a12a(0x209)]!==_0x157144[_0x38a12a(0x209)])return;const _0x5d901f=new _0x43aa99();await _0x5d901f[_0x38a12a(0x29b)](_0x34666e['labels']);const _0x5a0d70=_0x563174();_0x5a0d70[_0x38a12a(0x296)](_0x34666e[_0x38a12a(0x21f)]),_0x414fcc=_0x5a0d70,_0x2066bf=_0x5d901f,_0x4d84ef=_0x76f202,_0x4e2b85=!![];});}catch{}return _0x4e2b85;}async function _0x18668d(_0x5edf29){try{await _0x2b907a(_0x5edf29);}finally{_0x4fdbb8=![];}}function _0x3be047(){const _0x170c38=_0x876788,_0x2f38fc=Date[_0x170c38(0x24c)]();if(_0x2f38fc-_0x2487f4<_0x157144[_0x170c38(0x200)])return;_0x2487f4=_0x2f38fc;if(_0x4fdbb8)return;const _0x3e394c=_0x5a420c[_0x170c38(0x245)]()||_0x5a420c[_0x170c38(0x24a)]();if(!_0x3e394c||_0x3e394c===_0x4d84ef)return;_0x4fdbb8=!![],_0x18668d(_0x3e394c);}async function _0xd163b2(){const _0x192972=_0x876788;_0x5bbf93=!![],_0x4c2e0d();if(_0x4d84ef)try{const _0x135e14=new _0x43aa99();let _0x256fe5=![];await _0x5a420c[_0x192972(0x1f4)](_0x4d84ef,async _0xd429d0=>{const _0x32037b=_0x192972;await _0x135e14[_0x32037b(0x29b)](_0xd429d0[_0x32037b(0x2a2)]);const _0x2c450f=_0x563174();_0x2c450f[_0x32037b(0x1ee)](_0xd429d0[_0x32037b(0x21f)]),_0x414fcc=_0x2c450f,_0x2066bf=_0x135e14,_0x256fe5=!![];});if(_0x256fe5)return;}catch{}await _0xe3f54b(_0x41ec4e);}return{async 'load'(_0x1122da){return _0x21645b(async()=>{const _0x4c9264=_0x367f;_0x5a420c[_0x4c9264(0x25a)]({'maxAgeMs':_0x157144[_0x4c9264(0x263)]}),_0x41ec4e=_0x1122da??null,_0x5bbf93=_0x4eb11d();if(_0x5bbf93){_0x4c2e0d();const _0x4a3c75=await _0x4e908e();if(_0x4a3c75!=null)return _0x4a3c75;return await _0xe3f54b(_0x1122da),null;}const _0xf431ca=_0x5a420c[_0x4c9264(0x245)]()||_0x5a420c['latestSnapshotId']();return await _0x2b907a(_0xf431ca),null;});},async 'add'(_0x465b1e,_0x11a9dc,_0x395bfb){return _0x21645b(async()=>{const _0x29572a=_0x367f;if(!_0x5bbf93){if(!_0x4eb11d())return;await _0xd163b2();}if(!_0x414fcc)return;const _0x29de2e=_0x2066bf['labelForExisting'](_0x465b1e);if(_0x29de2e!==undefined)try{_0x414fcc[_0x29572a(0x265)](BigInt(_0x29de2e));}catch{}const _0x5c0cf8=_0x2066bf[_0x29572a(0x2a5)](_0x465b1e);_0x414fcc[_0x29572a(0x25d)](BigInt(_0x5c0cf8),_0x2014a8(_0x11a9dc)),_0x5d6d1f++,_0x5d6d1f>=_0x157144['snapshotEveryChanges']&&await _0x4f6163(_0x395bfb??Date[_0x29572a(0x24c)]());});},async 'remove'(_0x47ff39){return _0x21645b(async()=>{const _0x6d8fee=_0x367f;if(!_0x5bbf93){if(!_0x4eb11d())return;await _0xd163b2();}if(!_0x414fcc)return;const _0x16debf=_0x2066bf[_0x6d8fee(0x23f)](_0x47ff39);if(_0x16debf===undefined)return;try{_0x414fcc['remove'](BigInt(_0x16debf));}catch{}_0x2066bf[_0x6d8fee(0x25b)](_0x47ff39),_0x5d6d1f++;});},'search'(_0x104204,{limit:limit=0xa}={}){const _0x5e717b=_0x876788;if(!_0x5bbf93)_0x3be047();if(!_0x414fcc)return[];const _0x10f14a=_0x414fcc[_0x5e717b(0x203)]();if(_0x10f14a===0x0)return[];const _0x35e4d4=Math[_0x5e717b(0x1fb)](limit,_0x10f14a),_0x20a305=_0x414fcc['search'](_0x2014a8(_0x104204),_0x35e4d4,0x0),_0xa02ba5=[],_0x3aa0f0=_0x20a305[_0x5e717b(0x266)],_0x40bb14=_0x20a305['distances'];for(let _0x2d00d2=0x0;_0x2d00d2<_0x3aa0f0[_0x5e717b(0x288)];_0x2d00d2++){const _0x2f31b4=_0x3aa0f0[_0x2d00d2];if(_0x2f31b4===0xffffffffffffffffn)continue;const _0x378835=Number(_0x2f31b4),_0x1cc698=_0x2066bf['keyForLabel'](_0x378835);if(!_0x1cc698)continue;const _0x111ca2=_0x40bb14[_0x2d00d2];let _0x9e9dce;if(_0x157144['metric']===_0x5e717b(0x1f1))_0x9e9dce=Math[_0x5e717b(0x21b)](0x0,0x1-_0x111ca2);else{if(_0x157144[_0x5e717b(0x209)]==='ip')_0x9e9dce=-_0x111ca2;else _0x9e9dce=0x1/(0x1+_0x111ca2);}_0xa02ba5[_0x5e717b(0x1fd)]({'key':_0x1cc698,'score':_0x9e9dce});}return _0xa02ba5;},async 'snapshot'(_0x1e27f3=Date[_0x876788(0x24c)]()){if(!_0x5bbf93)return![];return _0x21645b(()=>_0x4f6163(_0x1e27f3));},async 'rebuild'(_0x3c9881){if(!_0x5bbf93)return;return _0x21645b(()=>{if(_0x3c9881!=null)_0x41ec4e=_0x3c9881;return _0xe3f54b(_0x3c9881??_0x41ec4e);});},async 'stop'(){return _0x21645b(async()=>{const _0x180447=_0x367f;_0x5bbf93&&(await _0x4f6163(Date[_0x180447(0x24c)]()),_0x50f27b());});},'count'(){return _0x2066bf['size']();},'info'(){const _0x3759f8=_0x876788;return{'algorithm':_0x3759f8(0x205),'role':_0x5bbf93?_0x3759f8(0x28b):_0x3759f8(0x25e),'metric':_0x157144[_0x3759f8(0x209)],'connectivity':_0x157144[_0x3759f8(0x275)],'expansionAdd':_0x157144[_0x3759f8(0x253)],'expansionSearch':_0x157144['expansionSearch'],'count':_0x2066bf[_0x3759f8(0x203)](),'size':_0x414fcc?.[_0x3759f8(0x203)]?.()??0x0,'capacity':_0x414fcc?.[_0x3759f8(0x259)]?.()??0x0,'changesSince':_0x5bbf93?_0x5d6d1f:null,'viewedSnapshot':_0x4d84ef??null,'snapshotDir':_0x4e3e63,'latestSnapshot':_0x5a420c['readCurrentId']()??null};}};},usearch;}var hasRequiredAlgorithmWorkerThread;function requireAlgorithmWorkerThread(){const _0x6c7885=_0x3bc273;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x5aae58,workerData:_0x321609}=require$$0$1,{algorithmName:_0x9a993e,algorithmConfig:_0x4a7e1d,dims:_0x202f58,dir:_0x24a161}=_0x321609;let _0x37a8fa;if(_0x9a993e==='hnsw')_0x37a8fa=requireHnsw()(_0x4a7e1d,{'dims':_0x202f58,'dir':_0x24a161});else{if(_0x9a993e===_0x6c7885(0x1e8))_0x37a8fa=requireFlat()(_0x4a7e1d,{'dims':_0x202f58,'dir':_0x24a161});else{if(_0x9a993e===_0x6c7885(0x205))_0x37a8fa=requireUsearch()(_0x4a7e1d,{'dims':_0x202f58,'dir':_0x24a161});else throw new Error(_0x6c7885(0x243)+_0x9a993e+'\x22');}}function _0x561365(){const _0x442d2d=_0x6c7885;try{_0x5aae58['postMessage']({'op':'sync','count':_0x37a8fa[_0x442d2d(0x23d)](),'info':_0x37a8fa['info'](),'memory':process[_0x442d2d(0x1f2)]()});}catch{}}return _0x5aae58['on'](_0x6c7885(0x272),async _0x49c86f=>{const _0x4b66ed=_0x6c7885,{id:_0x6a0c45,op:_0x7353e5,args:_0x2b0c53}=_0x49c86f;try{let _0x3a5f02;switch(_0x7353e5){case _0x4b66ed(0x1ee):{const _0xc7a386=(_0x2b0c53['vectors']||[])[_0x4b66ed(0x23a)](_0x27ca5f=>({'key':_0x27ca5f[_0x4b66ed(0x211)],'vector':_0x27ca5f['vector']instanceof Float32Array?_0x27ca5f['vector']:new Float32Array(_0x27ca5f[_0x4b66ed(0x1e2)])}));_0x3a5f02=await _0x37a8fa[_0x4b66ed(0x1ee)](async()=>_0xc7a386),_0x561365();break;}case'add':{const _0x2452ea=_0x2b0c53[_0x4b66ed(0x1e2)]instanceof Float32Array?_0x2b0c53[_0x4b66ed(0x1e2)]:new Float32Array(_0x2b0c53[_0x4b66ed(0x1e2)]);await _0x37a8fa['add'](_0x2b0c53['key'],_0x2452ea,_0x2b0c53[_0x4b66ed(0x24e)]??undefined),_0x561365(),_0x3a5f02=null;break;}case'remove':{await _0x37a8fa[_0x4b66ed(0x265)](_0x2b0c53['key']),_0x561365(),_0x3a5f02=null;break;}case _0x4b66ed(0x230):{const _0x52ef41=_0x2b0c53[_0x4b66ed(0x26e)]instanceof Float32Array?_0x2b0c53[_0x4b66ed(0x26e)]:new Float32Array(_0x2b0c53[_0x4b66ed(0x26e)]);_0x3a5f02=_0x37a8fa[_0x4b66ed(0x230)](_0x52ef41,_0x2b0c53[_0x4b66ed(0x21d)]||{});break;}case _0x4b66ed(0x21c):{_0x3a5f02=await _0x37a8fa['snapshot'](_0x2b0c53['clock']),_0x561365();break;}case'rebuild':{const _0x5d72c0=(_0x2b0c53[_0x4b66ed(0x2a7)]||[])['map'](_0xebba30=>({'key':_0xebba30['key'],'vector':_0xebba30['vector']instanceof Float32Array?_0xebba30[_0x4b66ed(0x1e2)]:new Float32Array(_0xebba30['vector'])}));await _0x37a8fa[_0x4b66ed(0x1e3)](async()=>_0x5d72c0),_0x561365(),_0x3a5f02=null;break;}case _0x4b66ed(0x28a):{await _0x37a8fa[_0x4b66ed(0x28a)](),_0x561365(),_0x3a5f02=null;break;}case _0x4b66ed(0x23d):{_0x3a5f02=_0x37a8fa['count']();break;}case _0x4b66ed(0x233):{_0x3a5f02=_0x37a8fa[_0x4b66ed(0x233)]();break;}default:throw new Error(_0x4b66ed(0x297)+_0x7353e5+'\x22');}_0x5aae58[_0x4b66ed(0x1f0)]({'id':_0x6a0c45,'result':_0x3a5f02});}catch(_0x4ffb06){_0x5aae58[_0x4b66ed(0x1f0)]({'id':_0x6a0c45,'error':{'message':_0x4ffb06?.[_0x4b66ed(0x272)]||String(_0x4ffb06),'code':_0x4ffb06?.['code']}});}}),_0x5aae58['postMessage']({'op':'ready'}),algorithmWorkerThread$1;}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module[_0x3bc273(0x227)]=algorithmWorkerThread;
|