@kedem/okdb 2.0.2 → 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 _0x5d9723=_0x1c48;(function(_0x7b3288,_0x1e77e3){const _0x3a940c=_0x1c48,_0x2aa19a=_0x7b3288();while(!![]){try{const _0x17d052=-parseInt(_0x3a940c(0x16f))/0x1*(-parseInt(_0x3a940c(0x14d))/0x2)+parseInt(_0x3a940c(0xfc))/0x3+parseInt(_0x3a940c(0x160))/0x4+parseInt(_0x3a940c(0x19a))/0x5+-parseInt(_0x3a940c(0xf1))/0x6+parseInt(_0x3a940c(0x139))/0x7+-parseInt(_0x3a940c(0x144))/0x8*(parseInt(_0x3a940c(0x183))/0x9);if(_0x17d052===_0x1e77e3)break;else _0x2aa19a['push'](_0x2aa19a['shift']());}catch(_0x324ba6){_0x2aa19a['push'](_0x2aa19a['shift']());}}}(_0x4d27,0x59acb));var require$$0$1=require('worker_threads'),require$$0=require('fs'),require$$1=require(_0x5d9723(0xfb)),require$$2=require('os'),require$$3=require(_0x5d9723(0x1ae));function getDefaultExportFromCjs(_0x124f37){const _0x5a2354=_0x5d9723;return _0x124f37&&_0x124f37[_0x5a2354(0x10f)]&&Object[_0x5a2354(0x19f)][_0x5a2354(0xfd)][_0x5a2354(0xfa)](_0x124f37,_0x5a2354(0x18d))?_0x124f37['default']:_0x124f37;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x1e91ec=_0x5d9723;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x345904=require$$0,_0x46cc06=require$$1,_0x328227=require$$2,_0x580c4c=require$$3;function _0x10d821(){const _0x3dc868=_0x1c48;return Date[_0x3dc868(0x110)]();}function _0x5dbfe3(_0x12e329){const _0x2f1626=_0x1c48;try{return _0x345904[_0x2f1626(0x1ab)](_0x12e329);}catch{return![];}}function _0x29f223(_0xd30bbb){const _0x1b5369=_0x1c48;try{return _0x345904[_0x1b5369(0x108)](_0xd30bbb,_0x1b5369(0x184));}catch{return null;}}function _0x10dc9b(_0x3b4888,_0x1fc42e){const _0x1b8d03=_0x1c48,_0x43777e=_0x3b4888+_0x1b8d03(0x138)+_0x580c4c['randomBytes'](0x6)['toString']('hex');_0x345904[_0x1b8d03(0xef)](_0x43777e,_0x1fc42e),_0x345904[_0x1b8d03(0x10c)](_0x43777e,_0x3b4888);}function _0x4404df(_0x13d5db,_0x412ceb=0x10){const _0x3dbbc4=_0x1c48,_0x584f40=String(Math[_0x3dbbc4(0x188)](0x0,Math[_0x3dbbc4(0x143)](_0x13d5db||0x0)));return _0x584f40['length']>=_0x412ceb?_0x584f40:'0'[_0x3dbbc4(0x1a9)](_0x412ceb-_0x584f40[_0x3dbbc4(0x116)])+_0x584f40;}return snapshotStore=class _0xcbd1c9{constructor({dir:_0x5c5c3c,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x158765=_0x1c48;if(!_0x5c5c3c)throw new Error(_0x158765(0x18b));this[_0x158765(0x156)]=_0x5c5c3c,this[_0x158765(0x121)]=_0x46cc06[_0x158765(0x125)](_0x5c5c3c,'snapshots'),this[_0x158765(0x199)]=_0x46cc06[_0x158765(0x125)](_0x5c5c3c,_0x158765(0x10a)),this[_0x158765(0x181)]=_0x46cc06[_0x158765(0x125)](_0x5c5c3c,_0x158765(0x189)),this[_0x158765(0x104)]=keepSnapshots,this[_0x158765(0x16e)]=log,_0x345904[_0x158765(0x152)](this[_0x158765(0x156)],{'recursive':!![]}),_0x345904['mkdirSync'](this[_0x158765(0x121)],{'recursive':!![]});}[_0x1e91ec(0x13a)](_0x5ca890){const _0x5a021f=_0x1e91ec;return _0x46cc06[_0x5a021f(0x125)](this[_0x5a021f(0x121)],_0x5ca890);}[_0x1e91ec(0x18a)](_0x29ea46){const _0x24bd35=_0x1e91ec,_0x3873bf=this['_snapshotDir'](_0x29ea46);return{'dir':_0x3873bf,'index':_0x46cc06[_0x24bd35(0x125)](_0x3873bf,_0x24bd35(0x190)),'labels':_0x46cc06[_0x24bd35(0x125)](_0x3873bf,'labels.json'),'state':_0x46cc06['join'](_0x3873bf,'state.json')};}[_0x1e91ec(0x12b)](){const _0x591180=_0x1e91ec;if(!_0x5dbfe3(this['currentPath']))return null;const _0x3a7f4b=_0x29f223(this[_0x591180(0x199)]);if(!_0x3a7f4b)return null;const _0x5d6e40=String(_0x3a7f4b)[_0x591180(0x1a2)]();return _0x5d6e40||null;}[_0x1e91ec(0x13c)](){const _0x58bcef=_0x1e91ec,_0x586b8c=this[_0x58bcef(0x12b)]();if(!_0x586b8c)return 0x0;const _0x2b58c2=Number(_0x586b8c);return Number[_0x58bcef(0x157)](_0x2b58c2)?_0x2b58c2:0x0;}[_0x1e91ec(0xfe)](){const _0x37cef5=_0x1e91ec;try{return _0x345904[_0x37cef5(0x150)](this[_0x37cef5(0x121)],{'withFileTypes':!![]})[_0x37cef5(0xf8)](_0x10fc48=>_0x10fc48[_0x37cef5(0x149)]())[_0x37cef5(0x197)](_0x17d72a=>_0x17d72a[_0x37cef5(0x113)])[_0x37cef5(0xf8)](_0x28b77d=>!_0x28b77d[_0x37cef5(0x12c)]('.tmp-'))[_0x37cef5(0xf8)](_0x24b2fb=>!_0x24b2fb[_0x37cef5(0x12c)]('_tmp-'))[_0x37cef5(0x1aa)]();}catch{return[];}}[_0x1e91ec(0x194)](){const _0x32c1f8=_0x1e91ec,_0x3c8e8a=this[_0x32c1f8(0x12b)]();if(_0x3c8e8a)return _0x3c8e8a;const _0x279810=this['listSnapshotIds']();if(!_0x279810[_0x32c1f8(0x116)])return null;return _0x279810[_0x279810[_0x32c1f8(0x116)]-0x1];}['cleanupTmpDirs']({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0x4e372d=_0x1e91ec;let _0x57bf93;try{_0x57bf93=_0x345904[_0x4e372d(0x150)](this['snapshotsDir'],{'withFileTypes':!![]});}catch{return;}const _0x191cb4=_0x10d821()-maxAgeMs;for(const _0x278651 of _0x57bf93){if(!_0x278651[_0x4e372d(0x149)]())continue;const _0x522422=_0x278651[_0x4e372d(0x113)];if(!_0x522422[_0x4e372d(0x12c)](_0x4e372d(0x138))&&!_0x522422[_0x4e372d(0x12c)](_0x4e372d(0x167)))continue;const _0x579bd0=_0x46cc06[_0x4e372d(0x125)](this['snapshotsDir'],_0x522422);try{const _0x471aff=_0x345904['statSync'](_0x579bd0);if(_0x471aff[_0x4e372d(0x11d)]>_0x191cb4)continue;}catch{}try{_0x345904[_0x4e372d(0x13d)](_0x579bd0,{'recursive':!![],'force':!![]});}catch{}}}['prune']({keep:keep=null}={}){const _0x34acc0=_0x1e91ec,_0x5b54f6=Math[_0x34acc0(0x188)](0x1,Math[_0x34acc0(0x143)](keep??this[_0x34acc0(0x104)]??0x3)),_0x4491a5=this[_0x34acc0(0xfe)]();if(_0x4491a5[_0x34acc0(0x116)]<=_0x5b54f6)return;const _0x493d97=this[_0x34acc0(0x12b)](),_0x1e66da=_0x4491a5[_0x34acc0(0x136)](0x0,Math[_0x34acc0(0x188)](0x0,_0x4491a5[_0x34acc0(0x116)]-_0x5b54f6));for(const _0x55b3aa of _0x1e66da){if(_0x493d97&&_0x55b3aa===_0x493d97)continue;const _0x107e19=this[_0x34acc0(0x13a)](_0x55b3aa);try{_0x345904['rmSync'](_0x107e19,{'recursive':!![],'force':!![]});}catch{}}}async['loadSnapshot'](_0x686024,_0x2a58de){const _0x435f53=_0x1e91ec;if(!_0x686024)throw new Error(_0x435f53(0x12d));const _0x996bdb=this[_0x435f53(0x18a)](_0x686024);if(!_0x5dbfe3(_0x996bdb[_0x435f53(0x185)])||!_0x5dbfe3(_0x996bdb[_0x435f53(0x159)])||!_0x5dbfe3(_0x996bdb[_0x435f53(0x16d)]))throw new Error(_0x435f53(0x177)+_0x686024);const _0x5d3bb6=await _0x2a58de(_0x996bdb);return _0x5d3bb6||{};}async[_0x1e91ec(0x146)](_0x11c72c,_0x2a0c17,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x2016e2=_0x1e91ec,_0x32c447=Number(_0x11c72c);if(!Number[_0x2016e2(0x157)](_0x32c447)||_0x32c447<0x0)throw new Error(_0x2016e2(0x179));const _0x2219f4=_0x4404df(_0x32c447),_0x128639=this[_0x2016e2(0x13a)](_0x2219f4),_0x224ac0=_0x46cc06[_0x2016e2(0x125)](this['snapshotsDir'],'.tmp-'+_0x2219f4+'-'+_0x580c4c[_0x2016e2(0x123)](0x6)[_0x2016e2(0x16c)](_0x2016e2(0x151)));_0x345904[_0x2016e2(0x152)](_0x224ac0,{'recursive':!![]});const _0x8df3f3={'dir':_0x224ac0,'index':_0x46cc06[_0x2016e2(0x125)](_0x224ac0,'index.hnsw'),'labels':_0x46cc06[_0x2016e2(0x125)](_0x224ac0,_0x2016e2(0x142)),'state':_0x46cc06[_0x2016e2(0x125)](_0x224ac0,_0x2016e2(0xec))};await _0x2a0c17(_0x8df3f3,{'id':_0x2219f4,'clock':_0x32c447});const _0x58549a=JSON['stringify']({'pid':process['pid'],'host':_0x328227[_0x2016e2(0x196)](),'at':_0x10d821()}),_0x31a329=_0x10d821();let _0x191fbb=null;const _0x506e64=()=>{const _0xfda629=_0x2016e2;try{const _0x9418cc=JSON[_0xfda629(0x14f)](_0x345904[_0xfda629(0x108)](this[_0xfda629(0x181)],'utf8'));if(_0x9418cc['at']&&_0x10d821()-_0x9418cc['at']>staleLockMaxAgeMs){const _0x12fe6d=_0x10d821()-_0x9418cc['at'],_0x2885e9=_0xfda629(0x171)+Math[_0xfda629(0x17c)](_0x12fe6d/0x3e8)+_0xfda629(0x148)+_0x9418cc['pid']+',\x20host:\x20'+_0x9418cc[_0xfda629(0x187)]+_0xfda629(0x120)+'This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.';this[_0xfda629(0x16e)]?.[_0xfda629(0xf7)]?this[_0xfda629(0x16e)][_0xfda629(0xf7)](_0x2885e9):console[_0xfda629(0xf7)]('[SnapshotStore]',_0x2885e9);try{_0x345904[_0xfda629(0x161)](this['lockPath']);}catch{}return!![];}}catch{try{_0x345904[_0xfda629(0x161)](this[_0xfda629(0x181)]);}catch{}}return![];},_0x4bcc6b=()=>{const _0x5ce8f5=_0x2016e2;try{return _0x191fbb=_0x345904[_0x5ce8f5(0x147)](this[_0x5ce8f5(0x181)],'wx'),_0x345904['writeFileSync'](_0x191fbb,_0x58549a),!![];}catch(_0x3f78fa){if(_0x3f78fa&&_0x3f78fa[_0x5ce8f5(0x106)]===_0x5ce8f5(0x1a4))return![];throw _0x3f78fa;}};if(!_0x4bcc6b()){_0x506e64(),_0x4bcc6b();if(_0x191fbb==null&&lockTimeoutMs>0x0)while(_0x10d821()-_0x31a329<lockTimeoutMs){await new Promise(_0x3771b2=>setTimeout(_0x3771b2,0x19));if(_0x4bcc6b())break;_0x506e64();}}if(_0x191fbb==null){try{_0x345904[_0x2016e2(0x13d)](_0x224ac0,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x2016e2(0x132)};}try{const _0x55ceb8=this[_0x2016e2(0x13c)]();if(_0x32c447<=_0x55ceb8){try{_0x345904['rmSync'](_0x224ac0,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x2016e2(0x193),'currentClock':_0x55ceb8};}if(!_0x5dbfe3(_0x128639))_0x345904[_0x2016e2(0x10c)](_0x224ac0,_0x128639);else try{_0x345904[_0x2016e2(0x13d)](_0x224ac0,{'recursive':!![],'force':!![]});}catch{}return _0x10dc9b(this['currentPath'],_0x2219f4+'\x0a'),this[_0x2016e2(0x127)]({'keep':keep}),{'published':!![],'currentClock':_0x32c447};}finally{try{_0x345904[_0x2016e2(0x11b)](_0x191fbb);}catch{}try{_0x345904[_0x2016e2(0x161)](this[_0x2016e2(0x181)]);}catch{}}}},snapshotStore;}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x38e6d0=_0x5d9723;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0xcb80f2=require$$0;class _0x1589a6{constructor(){const _0x124796=_0x1c48;this[_0x124796(0x118)]=new Map(),this[_0x124796(0x10b)]=new Map(),this[_0x124796(0x1a5)]=0x0,this['_tombstoneCount']=0x0;}async[_0x38e6d0(0x15b)](){const _0x22a1a1=_0x38e6d0;this[_0x22a1a1(0x118)]=new Map(),this[_0x22a1a1(0x10b)]=new Map(),this[_0x22a1a1(0x1a5)]=0x0,this['_tombstoneCount']=0x0;}async[_0x38e6d0(0x126)](_0x5a6a43){const _0x1ba00a=_0x38e6d0;if(!_0x5a6a43||!_0xcb80f2[_0x1ba00a(0x1ab)](_0x5a6a43))return await this[_0x1ba00a(0x15b)](),!![];let _0x2189da;try{_0x2189da=_0xcb80f2['readFileSync'](_0x5a6a43,_0x1ba00a(0x184));}catch{return await this[_0x1ba00a(0x15b)](),!![];}let _0x574f1e;try{_0x574f1e=JSON[_0x1ba00a(0x14f)](_0x2189da);}catch{return await this['reset'](),!![];}const _0x161dd6=Array[_0x1ba00a(0x135)](_0x574f1e?.['entries'])?_0x574f1e[_0x1ba00a(0x19b)]:[],_0x464c8b=Number['isInteger'](_0x574f1e?.[_0x1ba00a(0x1a5)])?_0x574f1e[_0x1ba00a(0x1a5)]:0x0,_0x5129bf=new Map(),_0x420a41=new Map();let _0x462c1e=-0x1;for(const _0x5138ad of _0x161dd6){if(!Array[_0x1ba00a(0x135)](_0x5138ad)||_0x5138ad[_0x1ba00a(0x116)]!==0x2)continue;const _0x7214c7=Number(_0x5138ad[0x0]),_0x4b0bd8=String(_0x5138ad[0x1]??'');if(!Number[_0x1ba00a(0x13e)](_0x7214c7)||_0x7214c7<0x0)continue;if(!_0x4b0bd8)continue;_0x5129bf[_0x1ba00a(0x174)](_0x4b0bd8,_0x7214c7),_0x420a41[_0x1ba00a(0x174)](_0x7214c7,_0x4b0bd8);if(_0x7214c7>_0x462c1e)_0x462c1e=_0x7214c7;}return this[_0x1ba00a(0x118)]=_0x5129bf,this[_0x1ba00a(0x10b)]=_0x420a41,this[_0x1ba00a(0x1a5)]=Math[_0x1ba00a(0x188)](_0x464c8b,_0x462c1e+0x1,0x0),this[_0x1ba00a(0x1ad)]=0x0,!![];}['labelForExisting'](_0x4ab4c0){const _0x46c82a=_0x38e6d0;return this[_0x46c82a(0x118)]['get'](_0x4ab4c0);}[_0x38e6d0(0x16a)](_0xa296c){const _0x5d410e=_0x38e6d0;let _0xb95365=this[_0x5d410e(0x118)]['get'](_0xa296c);if(_0xb95365!==undefined)return _0xb95365;return _0xb95365=this['nextLabel']++,this[_0x5d410e(0x118)]['set'](_0xa296c,_0xb95365),this[_0x5d410e(0x10b)][_0x5d410e(0x174)](_0xb95365,_0xa296c),_0xb95365;}['tombstone'](_0x160680){const _0x4ee6f8=_0x38e6d0,_0x560917=this[_0x4ee6f8(0x118)][_0x4ee6f8(0x103)](_0x160680);if(_0x560917===undefined)return;this[_0x4ee6f8(0x118)][_0x4ee6f8(0x130)](_0x160680),this[_0x4ee6f8(0x10b)][_0x4ee6f8(0x130)](_0x560917),this[_0x4ee6f8(0x1ad)]++;}[_0x38e6d0(0x166)](_0x26c214){const _0xeafa1f=_0x38e6d0;return this[_0xeafa1f(0x10b)][_0xeafa1f(0x103)](_0x26c214)??null;}[_0x38e6d0(0xf2)](){const _0x5edf28=_0x38e6d0;return this[_0x5edf28(0x118)][_0x5edf28(0xf2)];}['tombstoneCount'](){return this['_tombstoneCount'];}async['snapshotTo'](_0xff4df2){const _0x45e5a6=_0x38e6d0,_0x48ab51=_0xff4df2+_0x45e5a6(0x164),_0x148619=[];for(const [_0x20a51f,_0x293946]of this[_0x45e5a6(0x10b)][_0x45e5a6(0x19b)]()){_0x148619[_0x45e5a6(0x155)]([_0x20a51f,_0x293946]);}_0x148619['sort']((_0x4c8e52,_0x18c17c)=>_0x4c8e52[0x0]-_0x18c17c[0x0]);const _0x3cc12b={'version':0x1,'nextLabel':this[_0x45e5a6(0x1a5)],'entries':_0x148619};_0xcb80f2[_0x45e5a6(0xef)](_0x48ab51,JSON['stringify'](_0x3cc12b)),_0xcb80f2[_0x45e5a6(0x10c)](_0x48ab51,_0xff4df2);}}return labelMap=_0x1589a6,labelMap;}function _0x1c48(_0xb7e499,_0x1ac29){_0xb7e499=_0xb7e499-0xec;const _0x4d278f=_0x4d27();let _0x1c4891=_0x4d278f[_0xb7e499];return _0x1c4891;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x24827f=requireSnapshotStore(),_0x2cd85c=requireLabelMap(),_0xebfecb=0x1;let _0x45e1a6=null;function _0x4b08d0(){const _0xddad30=_0x1c48;if(_0x45e1a6)return _0x45e1a6;try{return _0x45e1a6=require(_0xddad30(0x134)),_0x45e1a6;}catch(_0x2cc775){const _0x29685a=new Error(_0xddad30(0x15d)+('for\x20Node\x20'+process[_0xddad30(0x168)]['node']+_0xddad30(0x192)+process[_0xddad30(0x1a6)]+'/'+process[_0xddad30(0x11c)]+'.\x20')+_0xddad30(0x18c)+(_0xddad30(0x17b)+(_0x2cc775?.[_0xddad30(0xff)]||String(_0x2cc775))));_0x29685a[_0xddad30(0x106)]=_0xddad30(0x15e),_0x29685a[_0xddad30(0x16b)]=_0x2cc775;throw _0x29685a;}}return hnsw=function _0x23b48a(_0x114a84={},{dims:_0x3351fd,dir:_0x1ddae6}){const _0x3c8419=_0x1c48,_0x343edc=_0x4b08d0();if(!_0x3351fd||_0x3351fd<=0x0)throw new Error('hnsw\x20algorithm\x20requires\x20dims\x20>\x200');if(!_0x1ddae6)throw new Error(_0x3c8419(0x170));const _0x44cd0a={'metric':_0x114a84[_0x3c8419(0x107)]??'cosine','M':_0x114a84['M']??0x10,'efConstruction':_0x114a84[_0x3c8419(0x182)]??0xc8,'efSearch':_0x114a84[_0x3c8419(0x1ac)]??0x40,'maxElements':_0x114a84[_0x3c8419(0x1a7)]??0x400,'growFactor':_0x114a84[_0x3c8419(0x145)]??0x2,'snapshotEveryChanges':_0x114a84[_0x3c8419(0x102)]??0xc350,'keepSnapshots':_0x114a84['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x114a84[_0x3c8419(0x137)]??0x6*0x36ee80},_0x4a17ca=new _0x24827f({'dir':_0x1ddae6,'keepSnapshots':_0x44cd0a[_0x3c8419(0x104)]}),_0x9edba9=new _0x2cd85c();let _0x1177b8=null,_0x4afaa7=0x0,_0x17aaf9=null,_0x4ec3d3=Promise[_0x3c8419(0x19e)]();const _0x308f47=_0x5dd674=>{const _0x5a9303=_0x3c8419;return _0x4ec3d3=_0x4ec3d3[_0x5a9303(0x18e)](_0x5dd674),_0x4ec3d3;};async function _0x2b7801(_0x3d4193){const _0x380b6d=_0x3c8419;await _0x9edba9[_0x380b6d(0x15b)]();const _0x5dd4ea=_0x3d4193?await _0x3d4193():[],_0x2f6db5=Math[_0x380b6d(0x188)](_0x44cd0a[_0x380b6d(0x1a7)],Math[_0x380b6d(0x169)](_0x5dd4ea[_0x380b6d(0x116)]*(_0x44cd0a[_0x380b6d(0x145)]||1.2)),0x1);_0x1177b8=new _0x343edc[(_0x380b6d(0x100))](_0x44cd0a[_0x380b6d(0x107)],_0x3351fd),_0x1177b8[_0x380b6d(0x1a1)]({'maxElements':_0x2f6db5,'efConstruction':_0x44cd0a['efConstruction'],'M':_0x44cd0a['M']});for(const {key:_0x839b0d,vector:_0x3902fc}of _0x5dd4ea){if(!(_0x3902fc instanceof Float32Array)||_0x3902fc[_0x380b6d(0x116)]!==_0x3351fd)continue;const _0x436d9b=_0x9edba9[_0x380b6d(0x16a)](_0x839b0d);_0x1177b8[_0x380b6d(0xf6)](Array[_0x380b6d(0x14a)](_0x3902fc),_0x436d9b);}_0x1177b8['setEf'](_0x44cd0a[_0x380b6d(0x1ac)]),_0x4afaa7=0x0;}async function _0x3ed6b2(_0xf23f0d){const _0x5218e7=_0x3c8419;if(!_0x1177b8||!_0xf23f0d)return![];const _0x57eb37=await _0x4a17ca['publishSnapshot'](_0xf23f0d,async _0x507ee8=>{const _0xcd0993=_0x1c48;_0x1177b8[_0xcd0993(0x101)](_0x507ee8[_0xcd0993(0x185)]),await _0x9edba9[_0xcd0993(0x154)](_0x507ee8[_0xcd0993(0x159)]);const _0x5e318f=require$$0;_0x5e318f[_0xcd0993(0xef)](_0x507ee8[_0xcd0993(0x16d)],JSON[_0xcd0993(0x112)]({'manifestVersion':_0xebfecb,'dims':_0x3351fd,'metric':_0x44cd0a[_0xcd0993(0x107)],'clock':_0xf23f0d,'snapshotAt':Date[_0xcd0993(0x110)]()},null,0x2));},{'keep':_0x44cd0a[_0x5218e7(0x104)]});if(_0x57eb37?.[_0x5218e7(0x198)])_0x4afaa7=0x0;return _0x57eb37?.[_0x5218e7(0x198)]??![];}async function _0xcb8695(){const _0x55e20a=_0x3c8419,_0x228895=_0x4a17ca[_0x55e20a(0x12b)]()||_0x4a17ca[_0x55e20a(0x194)]();if(!_0x228895)return null;let _0x2e4ff3,_0x173c06=![];return await _0x4a17ca[_0x55e20a(0x10e)](_0x228895,async _0x27576b=>{const _0x58df93=_0x55e20a,_0x8ed50d=require$$0;_0x2e4ff3=JSON['parse'](_0x8ed50d[_0x58df93(0x108)](_0x27576b[_0x58df93(0x16d)],_0x58df93(0x184)));if(_0x2e4ff3[_0x58df93(0x17f)]!==_0xebfecb||_0x2e4ff3[_0x58df93(0x133)]!==_0x3351fd||_0x2e4ff3[_0x58df93(0x107)]!==_0x44cd0a['metric']){_0x2e4ff3=null;return;}await _0x9edba9['loadFrom'](_0x27576b[_0x58df93(0x159)]),_0x1177b8=new _0x343edc[(_0x58df93(0x100))](_0x44cd0a[_0x58df93(0x107)],_0x3351fd),_0x1177b8[_0x58df93(0x14c)](_0x27576b[_0x58df93(0x185)]),_0x1177b8['setEf'](_0x44cd0a[_0x58df93(0x1ac)]),_0x173c06=!![];}),_0x173c06?_0x2e4ff3?.[_0x55e20a(0x129)]??0x0:null;}return{async 'load'(_0x161517){return _0x308f47(async()=>{_0x4a17ca['cleanupTmpDirs']({'maxAgeMs':_0x44cd0a['tmpMaxAgeMs']}),_0x17aaf9=_0x161517??null;const _0x12f62a=await _0xcb8695();if(_0x12f62a!=null)return _0x12f62a;return await _0x2b7801(_0x161517),null;});},async 'add'(_0x4d044a,_0x578cc7,_0x32782b){return _0x308f47(async()=>{const _0x539889=_0x1c48;if(!_0x1177b8)return;const _0x14dd07=_0x9edba9[_0x539889(0x16a)](_0x4d044a);try{_0x1177b8[_0x539889(0x17d)](_0x14dd07);}catch{}_0x1177b8[_0x539889(0x17a)]()>=_0x1177b8[_0x539889(0x13b)]()&&(_0x44cd0a['maxElements']=Math[_0x539889(0x169)](_0x1177b8[_0x539889(0x13b)]()*(_0x44cd0a[_0x539889(0x145)]||0x2)),await _0x2b7801(_0x17aaf9)),_0x1177b8[_0x539889(0xf6)](Array[_0x539889(0x14a)](_0x578cc7),_0x14dd07),_0x4afaa7++,_0x4afaa7>=_0x44cd0a[_0x539889(0x102)]&&await _0x3ed6b2(_0x32782b??Date[_0x539889(0x110)]());});},async 'remove'(_0x3e6d86){return _0x308f47(async()=>{const _0x48a1c7=_0x1c48;if(!_0x1177b8)return;const _0x5730a6=_0x9edba9['labelForExisting'](_0x3e6d86);if(_0x5730a6===undefined)return;try{_0x1177b8[_0x48a1c7(0x17d)](_0x5730a6);}catch{}_0x9edba9[_0x48a1c7(0x12e)](_0x3e6d86),_0x4afaa7++;});},'search'(_0x32d694,{limit:limit=0xa,efSearch:_0x40e7d1}={}){const _0x12e524=_0x3c8419;if(!_0x1177b8)return[];if(Number[_0x12e524(0x13e)](_0x40e7d1))_0x1177b8['setEf'](_0x40e7d1);const _0xa6456e=Math[_0x12e524(0x105)](limit,_0x1177b8[_0x12e524(0x17a)]()||0x1),{neighbors:_0x51ca7d,distances:_0x87d1be}=_0x1177b8[_0x12e524(0x1a8)](Array['from'](_0x32d694),_0xa6456e),_0x258647=[];for(let _0x21035d=0x0;_0x21035d<_0x51ca7d[_0x12e524(0x116)];_0x21035d++){const _0x241c1b=_0x9edba9[_0x12e524(0x166)](_0x51ca7d[_0x21035d]);if(!_0x241c1b)continue;const _0x43720b=_0x44cd0a[_0x12e524(0x107)]===_0x12e524(0xf5)?Math[_0x12e524(0x188)](0x0,0x1-_0x87d1be[_0x21035d]):0x1/(0x1+_0x87d1be[_0x21035d]);_0x258647[_0x12e524(0x155)]({'key':_0x241c1b,'score':_0x43720b});}return _0x258647;},async 'snapshot'(_0x58eacc=Date['now']()){return _0x308f47(()=>_0x3ed6b2(_0x58eacc));},async 'rebuild'(_0x1d30b0){return _0x308f47(()=>{if(_0x1d30b0!=null)_0x17aaf9=_0x1d30b0;return _0x2b7801(_0x1d30b0??_0x17aaf9);});},async 'stop'(){return _0x308f47(()=>_0x3ed6b2(Date['now']()));},'count'(){const _0xcaaf64=_0x3c8419;return _0x9edba9[_0xcaaf64(0xf2)]();},'info'(){const _0x4997d9=_0x3c8419;return{'algorithm':'hnsw','metric':_0x44cd0a[_0x4997d9(0x107)],'M':_0x44cd0a['M'],'efConstruction':_0x44cd0a[_0x4997d9(0x182)],'efSearch':_0x44cd0a[_0x4997d9(0x1ac)],'maxElements':_0x1177b8?.[_0x4997d9(0x13b)]()??_0x44cd0a[_0x4997d9(0x1a7)],'count':_0x9edba9['size'](),'changesSince':_0x4afaa7,'snapshotDir':_0x1ddae6,'latestSnapshot':_0x4a17ca[_0x4997d9(0x12b)]()??null};}};},hnsw;}var flat,hasRequiredFlat;function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x40fcaf(_0x334306={}){const _0x3049d7=new Map();return{async 'load'(_0x2f8e33){const _0x3c3a70=_0x1c48;_0x3049d7[_0x3c3a70(0x122)]();if(_0x2f8e33)for(const {key:_0x514173,vector:_0x5c927a}of await _0x2f8e33()){_0x3049d7[_0x3c3a70(0x174)](_0x514173,_0x5c927a);}},async 'add'(_0x273668,_0x50644e,_0x50ede1){_0x3049d7['set'](_0x273668,_0x50644e);},async 'remove'(_0x5ede1a){_0x3049d7['delete'](_0x5ede1a);},'search'(_0x53e0bf,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x20d20c=_0x1c48,_0x532771=[];for(const [_0x1dd733,_0x5aaa23]of _0x3049d7){const _0x44f410=_0x3172b1(_0x53e0bf,_0x5aaa23);if(_0x44f410>=threshold)_0x532771[_0x20d20c(0x155)]({'key':_0x1dd733,'score':_0x44f410});}return _0x532771[_0x20d20c(0x1aa)]((_0x1727ff,_0x572370)=>_0x572370[_0x20d20c(0x111)]-_0x1727ff[_0x20d20c(0x111)]),_0x532771[_0x20d20c(0x136)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0x22d622){await this['load'](_0x22d622);},async 'stop'(){},'count'(){const _0x2cc280=_0x1c48;return _0x3049d7[_0x2cc280(0xf2)];},'info'(){const _0x48e0df=_0x1c48;return{'algorithm':_0x48e0df(0x175),'count':_0x3049d7[_0x48e0df(0xf2)]};}};};function _0x3172b1(_0x533fcd,_0x384619){const _0x302dc0=_0x1c48;let _0x49cb5b=0x0,_0x3595f3=0x0,_0x1f1c7e=0x0;for(let _0x423f43=0x0;_0x423f43<_0x533fcd[_0x302dc0(0x116)];_0x423f43++){_0x49cb5b+=_0x533fcd[_0x423f43]*_0x384619[_0x423f43],_0x3595f3+=_0x533fcd[_0x423f43]*_0x533fcd[_0x423f43],_0x1f1c7e+=_0x384619[_0x423f43]*_0x384619[_0x423f43];}const _0x28092e=Math[_0x302dc0(0x180)](_0x3595f3)*Math[_0x302dc0(0x180)](_0x1f1c7e);return _0x28092e===0x0?0x0:_0x49cb5b/_0x28092e;}return flat;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x331db4=require$$0,_0x22c2e0=require$$1,_0x21ddde=requireSnapshotStore(),_0x5b84fb=requireLabelMap(),_0x150291=0x1;let _0x5ae5ee=null;function _0x5b4fda(){const _0x474e08=_0x1c48;if(_0x5ae5ee)return _0x5ae5ee;try{return _0x5ae5ee=require(_0x474e08(0x11a)),_0x5ae5ee;}catch(_0x5aa8c5){const _0x36a7a3=new Error(_0x474e08(0x17e)+('for\x20Node\x20'+process[_0x474e08(0x168)][_0x474e08(0x128)]+_0x474e08(0x192)+process[_0x474e08(0x1a6)]+'/'+process[_0x474e08(0x11c)]+'.\x20')+'Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20'+(_0x474e08(0x17b)+(_0x5aa8c5?.[_0x474e08(0xff)]||String(_0x5aa8c5))));_0x36a7a3[_0x474e08(0x106)]='USEARCH_BINDINGS_UNAVAILABLE',_0x36a7a3[_0x474e08(0x16b)]=_0x5aa8c5;throw _0x36a7a3;}}function _0x7dfc2c(_0x8adad1,_0x2d1064){const _0x581c78=_0x1c48;switch(_0x8adad1){case _0x581c78(0xf5):return _0x2d1064[_0x581c78(0xee)][_0x581c78(0x131)];case'l2':return _0x2d1064[_0x581c78(0xee)]['L2sq'];case'ip':return _0x2d1064[_0x581c78(0xee)]['IP'];default:return _0x2d1064[_0x581c78(0xee)][_0x581c78(0x131)];}}return usearch=function _0x42197d(_0x34d748={},{dims:_0x150d99,dir:_0x4688a1}){const _0x2b4070=_0x1c48,_0x382513=_0x5b4fda();if(!_0x150d99||_0x150d99<=0x0)throw new Error(_0x2b4070(0x140));if(!_0x4688a1)throw new Error(_0x2b4070(0x172));const _0x2679cf={'metric':_0x34d748[_0x2b4070(0x107)]??_0x2b4070(0xf5),'connectivity':_0x34d748[_0x2b4070(0x14b)]??0x10,'expansionAdd':_0x34d748[_0x2b4070(0x186)]??0x80,'expansionSearch':_0x34d748[_0x2b4070(0x178)]??0x40,'snapshotEveryChanges':_0x34d748[_0x2b4070(0x102)]??0xc350,'keepSnapshots':_0x34d748[_0x2b4070(0x104)]??0x2,'tmpMaxAgeMs':_0x34d748['tmpMaxAgeMs']??0x6*0x36ee80,'heartbeatIntervalMs':_0x34d748['heartbeatIntervalMs']??0x1388,'writerLockMaxAgeMs':_0x34d748['writerLockMaxAgeMs']??0x3a98,'viewRefreshMs':_0x34d748[_0x2b4070(0x195)]??0x3e8},_0x1123f9=new _0x21ddde({'dir':_0x4688a1,'keepSnapshots':_0x2679cf['keepSnapshots']}),_0x245a84=_0x22c2e0[_0x2b4070(0x125)](_0x4688a1,_0x2b4070(0x1a0));let _0x443738=new _0x5b84fb(),_0x307914=null,_0x452547=0x0,_0x3970a5=null,_0x255685=![],_0x119e6e=null,_0x779145=null,_0x2d6bf8=0x0,_0x2558d7=![],_0x4ba730=Promise[_0x2b4070(0x19e)]();const _0x10b7aa=_0x45a098=>{const _0x2366a1=_0x2b4070;return _0x4ba730=_0x4ba730[_0x2366a1(0x18e)](_0x45a098),_0x4ba730;};function _0x296b9c(){const _0x1cb783=_0x2b4070;return new _0x382513[(_0x1cb783(0xed))]({'dimensions':_0x150d99,'metric':_0x7dfc2c(_0x2679cf[_0x1cb783(0x107)],_0x382513),'quantization':_0x382513[_0x1cb783(0x10d)][_0x1cb783(0x109)],'connectivity':_0x2679cf[_0x1cb783(0x14b)],'expansion_add':_0x2679cf[_0x1cb783(0x186)],'expansion_search':_0x2679cf[_0x1cb783(0x178)],'multi':![]});}function _0x459730(_0x19a0e9){return _0x19a0e9 instanceof Float32Array?_0x19a0e9:new Float32Array(_0x19a0e9);}function _0x5267a2(){const _0x244231=_0x2b4070,_0x3062ba=JSON['stringify']({'pid':process[_0x244231(0x173)],'at':Date['now']()}),_0x36aa75=()=>{const _0x1561b8=_0x244231;try{const _0x2859a1=_0x331db4[_0x1561b8(0x147)](_0x245a84,'wx');return _0x331db4[_0x1561b8(0xef)](_0x2859a1,_0x3062ba),_0x331db4['closeSync'](_0x2859a1),!![];}catch(_0xb999a2){if(_0xb999a2?.[_0x1561b8(0x106)]===_0x1561b8(0x1a4))return![];throw _0xb999a2;}};if(_0x36aa75())return!![];try{const _0x24d035=JSON[_0x244231(0x14f)](_0x331db4[_0x244231(0x108)](_0x245a84,'utf8')),_0x4f95ca=Date[_0x244231(0x110)]()-(_0x24d035['at']??0x0);if(_0x4f95ca<_0x2679cf[_0x244231(0x1a3)])return![];}catch{}try{_0x331db4['unlinkSync'](_0x245a84);}catch{}return _0x36aa75();}function _0x1601c0(){const _0x453c98=_0x2b4070;if(_0x119e6e)clearInterval(_0x119e6e);_0x119e6e=setInterval(()=>{const _0x3a2587=_0x1c48;try{_0x331db4['writeFileSync'](_0x245a84,JSON[_0x3a2587(0x112)]({'pid':process[_0x3a2587(0x173)],'at':Date[_0x3a2587(0x110)]()}));}catch{}},_0x2679cf[_0x453c98(0x163)]),_0x119e6e[_0x453c98(0x117)]();}function _0x56bff9(){const _0x2583cc=_0x2b4070;_0x119e6e&&(clearInterval(_0x119e6e),_0x119e6e=null);try{const _0x25ba0d=JSON[_0x2583cc(0x14f)](_0x331db4[_0x2583cc(0x108)](_0x245a84,_0x2583cc(0x184)));if(_0x25ba0d['pid']===process[_0x2583cc(0x173)])_0x331db4[_0x2583cc(0x161)](_0x245a84);}catch{}}async function _0x2ffca7(_0x3d6a78){const _0x151297=_0x2b4070;_0x443738=new _0x5b84fb(),await _0x443738[_0x151297(0x15b)](),_0x307914=_0x296b9c();const _0x120de6=_0x3d6a78?await _0x3d6a78():[];for(const {key:_0x3ebdbb,vector:_0x8eba82}of _0x120de6){if(!(_0x8eba82 instanceof Float32Array)||_0x8eba82[_0x151297(0x116)]!==_0x150d99)continue;const _0x3c9e4a=_0x443738[_0x151297(0x16a)](_0x3ebdbb);_0x307914[_0x151297(0x176)](BigInt(_0x3c9e4a),_0x8eba82);}_0x452547=0x0;}async function _0x8229c9(_0x2f81c9){const _0x124ffe=_0x2b4070;if(!_0x307914||!_0x2f81c9)return![];const _0x44e595=await _0x1123f9['publishSnapshot'](_0x2f81c9,async _0x8aee87=>{const _0x3bf445=_0x1c48;_0x307914['save'](_0x8aee87[_0x3bf445(0x185)]),await _0x443738[_0x3bf445(0x154)](_0x8aee87['labels']),_0x331db4[_0x3bf445(0xef)](_0x8aee87[_0x3bf445(0x16d)],JSON[_0x3bf445(0x112)]({'manifestVersion':_0x150291,'algorithm':_0x3bf445(0x11a),'dims':_0x150d99,'metric':_0x2679cf[_0x3bf445(0x107)],'clock':_0x2f81c9,'snapshotAt':Date[_0x3bf445(0x110)]()},null,0x2));},{'keep':_0x2679cf[_0x124ffe(0x104)]});if(_0x44e595?.[_0x124ffe(0x198)])_0x452547=0x0;return _0x44e595?.[_0x124ffe(0x198)]??![];}async function _0x5249a7(){const _0xe77c88=_0x2b4070,_0x494093=_0x1123f9['readCurrentId']()||_0x1123f9[_0xe77c88(0x194)]();if(!_0x494093)return null;let _0x4093fe,_0x58357c=![];return await _0x1123f9[_0xe77c88(0x10e)](_0x494093,async _0x45c36c=>{const _0x3c0e2e=_0xe77c88;_0x4093fe=JSON['parse'](_0x331db4[_0x3c0e2e(0x108)](_0x45c36c[_0x3c0e2e(0x16d)],_0x3c0e2e(0x184)));if(_0x4093fe['manifestVersion']!==_0x150291||_0x4093fe[_0x3c0e2e(0x11e)]!==_0x3c0e2e(0x11a)||_0x4093fe[_0x3c0e2e(0x133)]!==_0x150d99||_0x4093fe['metric']!==_0x2679cf[_0x3c0e2e(0x107)]){_0x4093fe=null;return;}_0x443738=new _0x5b84fb(),await _0x443738[_0x3c0e2e(0x126)](_0x45c36c[_0x3c0e2e(0x159)]),_0x307914=_0x296b9c(),_0x307914[_0x3c0e2e(0x12a)](_0x45c36c[_0x3c0e2e(0x185)]),_0x58357c=!![];}),_0x58357c?_0x4093fe?.['clock']??0x0:null;}async function _0x34ac4b(_0xeef5af){const _0x3e9ba0=_0x2b4070;if(!_0xeef5af)return![];let _0x562c5b=![];try{await _0x1123f9[_0x3e9ba0(0x10e)](_0xeef5af,async _0x525ffa=>{const _0x10e481=_0x3e9ba0,_0x25ff3e=JSON[_0x10e481(0x14f)](_0x331db4[_0x10e481(0x108)](_0x525ffa['state'],_0x10e481(0x184)));if(_0x25ff3e[_0x10e481(0x17f)]!==_0x150291||_0x25ff3e['algorithm']!==_0x10e481(0x11a)||_0x25ff3e['dims']!==_0x150d99||_0x25ff3e['metric']!==_0x2679cf[_0x10e481(0x107)])return;const _0x1cb34b=new _0x5b84fb();await _0x1cb34b[_0x10e481(0x126)](_0x525ffa[_0x10e481(0x159)]);const _0x1d6a6c=_0x296b9c();_0x1d6a6c[_0x10e481(0xf9)](_0x525ffa[_0x10e481(0x185)]),_0x307914=_0x1d6a6c,_0x443738=_0x1cb34b,_0x779145=_0xeef5af,_0x562c5b=!![];});}catch{}return _0x562c5b;}async function _0x567084(_0x36c06e){try{await _0x34ac4b(_0x36c06e);}finally{_0x2558d7=![];}}function _0x1172d8(){const _0x8c6e93=_0x2b4070,_0x148e4a=Date[_0x8c6e93(0x110)]();if(_0x148e4a-_0x2d6bf8<_0x2679cf[_0x8c6e93(0x195)])return;_0x2d6bf8=_0x148e4a;if(_0x2558d7)return;const _0x3190a8=_0x1123f9[_0x8c6e93(0x12b)]()||_0x1123f9[_0x8c6e93(0x194)]();if(!_0x3190a8||_0x3190a8===_0x779145)return;_0x2558d7=!![],_0x567084(_0x3190a8);}async function _0x1669df(){const _0x3390e7=_0x2b4070;_0x255685=!![],_0x1601c0();if(_0x779145)try{const _0x377f3f=new _0x5b84fb();let _0xe50273=![];await _0x1123f9[_0x3390e7(0x10e)](_0x779145,async _0x323e8a=>{const _0x2818f1=_0x3390e7;await _0x377f3f[_0x2818f1(0x126)](_0x323e8a['labels']);const _0x1a6a32=_0x296b9c();_0x1a6a32[_0x2818f1(0x12a)](_0x323e8a[_0x2818f1(0x185)]),_0x307914=_0x1a6a32,_0x443738=_0x377f3f,_0xe50273=!![];});if(_0xe50273)return;}catch{}await _0x2ffca7(_0x3970a5);}return{async 'load'(_0x29bcd1){return _0x10b7aa(async()=>{const _0x1cc0fd=_0x1c48;_0x1123f9['cleanupTmpDirs']({'maxAgeMs':_0x2679cf[_0x1cc0fd(0x137)]}),_0x3970a5=_0x29bcd1??null,_0x255685=_0x5267a2();if(_0x255685){_0x1601c0();const _0x55e575=await _0x5249a7();if(_0x55e575!=null)return _0x55e575;return await _0x2ffca7(_0x29bcd1),null;}const _0x8fe272=_0x1123f9['readCurrentId']()||_0x1123f9['latestSnapshotId']();return await _0x34ac4b(_0x8fe272),null;});},async 'add'(_0x42f7d7,_0x2c47ad,_0x2e43de){return _0x10b7aa(async()=>{const _0xe88bee=_0x1c48;if(!_0x255685){if(!_0x5267a2())return;await _0x1669df();}if(!_0x307914)return;const _0x2c944f=_0x443738['labelForExisting'](_0x42f7d7);if(_0x2c944f!==undefined)try{_0x307914[_0xe88bee(0xf3)](BigInt(_0x2c944f));}catch{}const _0x1ec210=_0x443738[_0xe88bee(0x16a)](_0x42f7d7);_0x307914[_0xe88bee(0x176)](BigInt(_0x1ec210),_0x459730(_0x2c47ad)),_0x452547++,_0x452547>=_0x2679cf[_0xe88bee(0x102)]&&await _0x8229c9(_0x2e43de??Date[_0xe88bee(0x110)]());});},async 'remove'(_0x2c2649){return _0x10b7aa(async()=>{const _0xce1cdd=_0x1c48;if(!_0x255685){if(!_0x5267a2())return;await _0x1669df();}if(!_0x307914)return;const _0x14f845=_0x443738[_0xce1cdd(0x158)](_0x2c2649);if(_0x14f845===undefined)return;try{_0x307914[_0xce1cdd(0xf3)](BigInt(_0x14f845));}catch{}_0x443738['tombstone'](_0x2c2649),_0x452547++;});},'search'(_0x37ef27,{limit:limit=0xa}={}){const _0x40b99f=_0x2b4070;if(!_0x255685)_0x1172d8();if(!_0x307914)return[];const _0x1c6d80=_0x307914['size']();if(_0x1c6d80===0x0)return[];const _0x32a6c5=Math[_0x40b99f(0x105)](limit,_0x1c6d80),_0xa5191c=_0x307914[_0x40b99f(0x15c)](_0x459730(_0x37ef27),_0x32a6c5,0x0),_0x23c61e=[],_0x46af8f=_0xa5191c['keys'],_0x577c48=_0xa5191c['distances'];for(let _0x40b12c=0x0;_0x40b12c<_0x46af8f[_0x40b99f(0x116)];_0x40b12c++){const _0x5b34b6=_0x46af8f[_0x40b12c];if(_0x5b34b6===0xffffffffffffffffn)continue;const _0x5853e4=Number(_0x5b34b6),_0x86cdc5=_0x443738['keyForLabel'](_0x5853e4);if(!_0x86cdc5)continue;const _0x3ab99e=_0x577c48[_0x40b12c];let _0x589e91;if(_0x2679cf[_0x40b99f(0x107)]==='cosine')_0x589e91=Math[_0x40b99f(0x188)](0x0,0x1-_0x3ab99e);else{if(_0x2679cf[_0x40b99f(0x107)]==='ip')_0x589e91=-_0x3ab99e;else _0x589e91=0x1/(0x1+_0x3ab99e);}_0x23c61e[_0x40b99f(0x155)]({'key':_0x86cdc5,'score':_0x589e91});}return _0x23c61e;},async 'snapshot'(_0x14dbef=Date[_0x2b4070(0x110)]()){if(!_0x255685)return![];return _0x10b7aa(()=>_0x8229c9(_0x14dbef));},async 'rebuild'(_0x4d2a2b){if(!_0x255685)return;return _0x10b7aa(()=>{if(_0x4d2a2b!=null)_0x3970a5=_0x4d2a2b;return _0x2ffca7(_0x4d2a2b??_0x3970a5);});},async 'stop'(){return _0x10b7aa(async()=>{const _0x7eaf5e=_0x1c48;_0x255685&&(await _0x8229c9(Date[_0x7eaf5e(0x110)]()),_0x56bff9());});},'count'(){return _0x443738['size']();},'info'(){const _0x3f5eba=_0x2b4070;return{'algorithm':_0x3f5eba(0x11a),'role':_0x255685?_0x3f5eba(0xf4):_0x3f5eba(0x153),'metric':_0x2679cf[_0x3f5eba(0x107)],'connectivity':_0x2679cf[_0x3f5eba(0x14b)],'expansionAdd':_0x2679cf[_0x3f5eba(0x186)],'expansionSearch':_0x2679cf['expansionSearch'],'count':_0x443738['size'](),'size':_0x307914?.[_0x3f5eba(0xf2)]?.()??0x0,'capacity':_0x307914?.[_0x3f5eba(0x19d)]?.()??0x0,'changesSince':_0x255685?_0x452547:null,'viewedSnapshot':_0x779145??null,'snapshotDir':_0x4688a1,'latestSnapshot':_0x1123f9['readCurrentId']()??null};}};},usearch;}var hasRequiredAlgorithmWorkerThread;function requireAlgorithmWorkerThread(){const _0x42c583=_0x5d9723;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x201451,workerData:_0x2f559d}=require$$0$1,{algorithmName:_0xace9ee,algorithmConfig:_0x1e3fb6,dims:_0x248756,dir:_0x49c376}=_0x2f559d;let _0x475095;if(_0xace9ee===_0x42c583(0x15a))_0x475095=requireHnsw()(_0x1e3fb6,{'dims':_0x248756,'dir':_0x49c376});else{if(_0xace9ee==='flat')_0x475095=requireFlat()(_0x1e3fb6,{'dims':_0x248756,'dir':_0x49c376});else{if(_0xace9ee===_0x42c583(0x11a))_0x475095=requireUsearch()(_0x1e3fb6,{'dims':_0x248756,'dir':_0x49c376});else throw new Error(_0x42c583(0x114)+_0xace9ee+'\x22');}}function _0x268492(){const _0x4217f6=_0x42c583;try{_0x201451[_0x4217f6(0x15f)]({'op':_0x4217f6(0x191),'count':_0x475095['count'](),'info':_0x475095['info'](),'memory':process[_0x4217f6(0x115)]()});}catch{}}return _0x201451['on']('message',async _0x44c121=>{const _0x22bc21=_0x42c583,{id:_0x42ef68,op:_0x44103f,args:_0x2f79b7}=_0x44c121;try{let _0x1f04bf;switch(_0x44103f){case _0x22bc21(0x12a):{const _0x270873=(_0x2f79b7[_0x22bc21(0xf0)]||[])[_0x22bc21(0x197)](_0x422230=>({'key':_0x422230['key'],'vector':_0x422230[_0x22bc21(0x14e)]instanceof Float32Array?_0x422230['vector']:new Float32Array(_0x422230['vector'])}));_0x1f04bf=await _0x475095[_0x22bc21(0x12a)](async()=>_0x270873),_0x268492();break;}case _0x22bc21(0x176):{const _0x383253=_0x2f79b7[_0x22bc21(0x14e)]instanceof Float32Array?_0x2f79b7[_0x22bc21(0x14e)]:new Float32Array(_0x2f79b7[_0x22bc21(0x14e)]);await _0x475095[_0x22bc21(0x176)](_0x2f79b7['key'],_0x383253,_0x2f79b7[_0x22bc21(0x129)]??undefined),_0x268492(),_0x1f04bf=null;break;}case'remove':{await _0x475095[_0x22bc21(0xf3)](_0x2f79b7['key']),_0x268492(),_0x1f04bf=null;break;}case _0x22bc21(0x15c):{const _0x3cbc45=_0x2f79b7[_0x22bc21(0x12f)]instanceof Float32Array?_0x2f79b7[_0x22bc21(0x12f)]:new Float32Array(_0x2f79b7['queryVec']);_0x1f04bf=_0x475095[_0x22bc21(0x15c)](_0x3cbc45,_0x2f79b7[_0x22bc21(0x165)]||{});break;}case _0x22bc21(0x19c):{_0x1f04bf=await _0x475095['snapshot'](_0x2f79b7['clock']),_0x268492();break;}case _0x22bc21(0x119):{const _0x459d05=(_0x2f79b7['vectors']||[])[_0x22bc21(0x197)](_0x4c3127=>({'key':_0x4c3127[_0x22bc21(0x18f)],'vector':_0x4c3127[_0x22bc21(0x14e)]instanceof Float32Array?_0x4c3127[_0x22bc21(0x14e)]:new Float32Array(_0x4c3127[_0x22bc21(0x14e)])}));await _0x475095['rebuild'](async()=>_0x459d05),_0x268492(),_0x1f04bf=null;break;}case _0x22bc21(0x11f):{await _0x475095[_0x22bc21(0x11f)](),_0x268492(),_0x1f04bf=null;break;}case _0x22bc21(0x162):{_0x1f04bf=_0x475095[_0x22bc21(0x162)]();break;}case'info':{_0x1f04bf=_0x475095['info']();break;}default:throw new Error(_0x22bc21(0x124)+_0x44103f+'\x22');}_0x201451[_0x22bc21(0x15f)]({'id':_0x42ef68,'result':_0x1f04bf});}catch(_0x480998){_0x201451['postMessage']({'id':_0x42ef68,'error':{'message':_0x480998?.[_0x22bc21(0xff)]||String(_0x480998),'code':_0x480998?.['code']}});}}),_0x201451[_0x42c583(0x15f)]({'op':_0x42c583(0x13f)}),algorithmWorkerThread$1;}function _0x4d27(){const _0x5943a4=['index','expansionAdd','host','max','SNAPSHOT.LOCK','_snapshotPaths','SnapshotStore\x20requires\x20dir','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20','default','then','key','index.hnsw','sync','\x20on\x20','stale','latestSnapshotId','viewRefreshMs','hostname','map','published','currentPath','3156075RSQlGE','entries','snapshot','capacity','resolve','prototype','WRITER.LOCK','initIndex','trim','writerLockMaxAgeMs','EEXIST','nextLabel','platform','maxElements','searchKnn','repeat','sort','existsSync','efSearch','_tombstoneCount','crypto','state.json','Index','MetricKind','writeFileSync','vectors','2062848pRfapE','size','remove','writer','cosine','addPoint','warn','filter','view','call','path','2100399SiIAFw','hasOwnProperty','listSnapshotIds','message','HierarchicalNSW','writeIndexSync','snapshotEveryChanges','get','keepSnapshots','min','code','metric','readFileSync','F32','CURRENT','labelToKey','renameSync','ScalarKind','loadSnapshot','__esModule','now','score','stringify','name','Unknown\x20algorithm:\x20\x22','memoryUsage','length','unref','keyToLabel','rebuild','usearch','closeSync','arch','mtimeMs','algorithm','stop',').\x20','snapshotsDir','clear','randomBytes','Unknown\x20op:\x20\x22','join','loadFrom','prune','node','clock','load','readCurrentId','startsWith','snapshot\x20id\x20required','tombstone','queryVec','delete','Cos','lock_busy','dims','hnswlib-node','isArray','slice','tmpMaxAgeMs','.tmp-','141827ccqMdw','_snapshotDir','getMaxElements','readCurrentClock','rmSync','isInteger','ready','usearch\x20algorithm\x20requires\x20dims\x20>\x200','exports','labels.json','trunc','15622032tXEATv','growFactor','publishSnapshot','openSync','s,\x20pid:\x20','isDirectory','from','connectivity','readIndexSync','27674gnaGvg','vector','parse','readdirSync','hex','mkdirSync','reader','snapshotTo','push','dir','isFinite','labelForExisting','labels','hnsw','reset','search','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','HNSW_BINDINGS_UNAVAILABLE','postMessage','2924424gOTFfy','unlinkSync','count','heartbeatIntervalMs','.tmp','opts','keyForLabel','_tmp-','versions','ceil','labelForEphemeral','cause','toString','state','log','42OlzvqZ','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20','usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','pid','set','flat','add','snapshot\x20incomplete:\x20','expansionSearch','candidateClock\x20must\x20be\x20finite\x20>=\x200','getCurrentCount','Original\x20error:\x20','round','markDelete','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','manifestVersion','sqrt','lockPath','efConstruction','9hXakiP','utf8'];_0x4d27=function(){return _0x5943a4;};return _0x4d27();}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module[_0x5d9723(0x141)]=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;
|