@kedem/okdb 2.6.0 → 2.6.1
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/CHANGELOG.md +8 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- 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/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-doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to `@kedem/okdb` are documented here. Format loosely follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/); versions follow [SemVer](https://semver.org/).
|
|
5
5
|
Dates are release dates.
|
|
6
6
|
|
|
7
|
+
## [2.6.1] - 2026-09-28
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Depends on `@kedem/okjs` `^1.4.0` (was `~1.3.3`, which kept okdb on okjs 1.3.x). okjs 1.4.0 calls a
|
|
12
|
+
function-valued attr `default` once per instance; the admin has no callback defaults, so nothing
|
|
13
|
+
else changes. The `^` range follows future okjs 1.x minors.
|
|
14
|
+
|
|
7
15
|
## [2.6.0] - 2026-09-28
|
|
8
16
|
|
|
9
17
|
### Changed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x411a8a=_0x3360;(function(_0x5d24de,_0x2e375b){const _0x43bc65=_0x3360,_0x51d1cc=_0x5d24de();while(!![]){try{const _0x505d6d=-parseInt(_0x43bc65(0x15b))/0x1+parseInt(_0x43bc65(0x1e1))/0x2+-parseInt(_0x43bc65(0x1c9))/0x3*(parseInt(_0x43bc65(0x174))/0x4)+-parseInt(_0x43bc65(0x18d))/0x5+-parseInt(_0x43bc65(0x14c))/0x6*(parseInt(_0x43bc65(0x204))/0x7)+parseInt(_0x43bc65(0x179))/0x8*(-parseInt(_0x43bc65(0x210))/0x9)+-parseInt(_0x43bc65(0x19f))/0xa*(-parseInt(_0x43bc65(0x1f2))/0xb);if(_0x505d6d===_0x2e375b)break;else _0x51d1cc['push'](_0x51d1cc['shift']());}catch(_0x148a38){_0x51d1cc['push'](_0x51d1cc['shift']());}}}(_0xf898,0x3f4c9));var require$$0$1=require(_0x411a8a(0x206)),require$$0=require('fs'),require$$1=require(_0x411a8a(0x13a)),require$$2=require('os'),require$$3=require('crypto');function getDefaultExportFromCjs(_0xb9f058){const _0x26fe23=_0x411a8a;return _0xb9f058&&_0xb9f058['__esModule']&&Object[_0x26fe23(0x155)][_0x26fe23(0x140)]['call'](_0xb9f058,_0x26fe23(0x144))?_0xb9f058['default']:_0xb9f058;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x3f9bb8=_0x411a8a;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x4c53a2=require$$0,_0x4be99c=require$$1,_0x47663e=require$$2,_0x5b3eef=require$$3;function _0x314cff(){const _0x3a921a=_0x3360;return Date[_0x3a921a(0x1d3)]();}function _0x1c7671(_0x5dd966){const _0x1406fd=_0x3360;try{return _0x4c53a2[_0x1406fd(0x16f)](_0x5dd966);}catch{return![];}}function _0x227608(_0xaff088){const _0x5b4627=_0x3360;try{return _0x4c53a2['readFileSync'](_0xaff088,_0x5b4627(0x1d1));}catch{return null;}}function _0x2b7fea(_0x7ee79a,_0x433d43){const _0x3d1615=_0x3360,_0x4d408b=_0x7ee79a+_0x3d1615(0x167)+_0x5b3eef[_0x3d1615(0x156)](0x6)[_0x3d1615(0x177)]('hex');_0x4c53a2['writeFileSync'](_0x4d408b,_0x433d43),_0x4c53a2['renameSync'](_0x4d408b,_0x7ee79a);}function _0x23a340(_0x58b888,_0x311861=0x10){const _0xdb6f3f=_0x3360,_0x54deaf=String(Math[_0xdb6f3f(0x1fd)](0x0,Math[_0xdb6f3f(0x190)](_0x58b888||0x0)));return _0x54deaf[_0xdb6f3f(0x13e)]>=_0x311861?_0x54deaf:'0'[_0xdb6f3f(0x1c5)](_0x311861-_0x54deaf[_0xdb6f3f(0x13e)])+_0x54deaf;}return snapshotStore=class _0x98bed1{constructor({dir:_0x25d246,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x56c459=_0x3360;if(!_0x25d246)throw new Error(_0x56c459(0x152));this[_0x56c459(0x1b2)]=_0x25d246,this[_0x56c459(0x1b6)]=_0x4be99c['join'](_0x25d246,_0x56c459(0x203)),this['currentPath']=_0x4be99c[_0x56c459(0x1fc)](_0x25d246,'CURRENT'),this[_0x56c459(0x176)]=_0x4be99c['join'](_0x25d246,'SNAPSHOT.LOCK'),this[_0x56c459(0x1b1)]=keepSnapshots,this['log']=log,_0x4c53a2['mkdirSync'](this['dir'],{'recursive':!![]}),_0x4c53a2['mkdirSync'](this[_0x56c459(0x1b6)],{'recursive':!![]});}[_0x3f9bb8(0x146)](_0x3c7e59){const _0x3bf1d5=_0x3f9bb8;return _0x4be99c[_0x3bf1d5(0x1fc)](this[_0x3bf1d5(0x1b6)],_0x3c7e59);}[_0x3f9bb8(0x185)](_0x2ec8a0){const _0x44f4f7=_0x3f9bb8,_0x225a9f=this[_0x44f4f7(0x146)](_0x2ec8a0);return{'dir':_0x225a9f,'index':_0x4be99c[_0x44f4f7(0x1fc)](_0x225a9f,_0x44f4f7(0x19c)),'labels':_0x4be99c[_0x44f4f7(0x1fc)](_0x225a9f,_0x44f4f7(0x18f)),'state':_0x4be99c[_0x44f4f7(0x1fc)](_0x225a9f,_0x44f4f7(0x195))};}[_0x3f9bb8(0x169)](){const _0x11ffd1=_0x3f9bb8;if(!_0x1c7671(this['currentPath']))return null;const _0x2dce65=_0x227608(this['currentPath']);if(!_0x2dce65)return null;const _0x34a23a=String(_0x2dce65)[_0x11ffd1(0x172)]();return _0x34a23a||null;}[_0x3f9bb8(0x1f7)](){const _0x2be7df=_0x3f9bb8,_0x401c68=this[_0x2be7df(0x169)]();if(!_0x401c68)return 0x0;const _0x324b01=Number(_0x401c68);return Number[_0x2be7df(0x137)](_0x324b01)?_0x324b01:0x0;}[_0x3f9bb8(0x1f0)](){const _0x26b299=_0x3f9bb8;try{return _0x4c53a2['readdirSync'](this['snapshotsDir'],{'withFileTypes':!![]})[_0x26b299(0x1bd)](_0x352391=>_0x352391[_0x26b299(0x1b7)]())['map'](_0xc97598=>_0xc97598[_0x26b299(0x187)])[_0x26b299(0x1bd)](_0x6b8892=>!_0x6b8892[_0x26b299(0x20d)](_0x26b299(0x167)))[_0x26b299(0x1bd)](_0x4958b5=>!_0x4958b5[_0x26b299(0x20d)]('_tmp-'))[_0x26b299(0x1e8)]();}catch{return[];}}['latestSnapshotId'](){const _0x2b45d6=_0x3f9bb8,_0x68c4c1=this[_0x2b45d6(0x169)]();if(_0x68c4c1)return _0x68c4c1;const _0x28ea46=this['listSnapshotIds']();if(!_0x28ea46[_0x2b45d6(0x13e)])return null;return _0x28ea46[_0x28ea46[_0x2b45d6(0x13e)]-0x1];}[_0x3f9bb8(0x18a)]({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0x26d7e2=_0x3f9bb8;let _0x5b952b;try{_0x5b952b=_0x4c53a2[_0x26d7e2(0x178)](this['snapshotsDir'],{'withFileTypes':!![]});}catch{return;}const _0x5dcf2b=_0x314cff()-maxAgeMs;for(const _0x20107d of _0x5b952b){if(!_0x20107d[_0x26d7e2(0x1b7)]())continue;const _0x15f42e=_0x20107d['name'];if(!_0x15f42e[_0x26d7e2(0x20d)](_0x26d7e2(0x167))&&!_0x15f42e['startsWith']('_tmp-'))continue;const _0xec5ba0=_0x4be99c['join'](this[_0x26d7e2(0x1b6)],_0x15f42e);try{const _0xee369e=_0x4c53a2[_0x26d7e2(0x1d6)](_0xec5ba0);if(_0xee369e[_0x26d7e2(0x188)]>_0x5dcf2b)continue;}catch{}try{_0x4c53a2[_0x26d7e2(0x19a)](_0xec5ba0,{'recursive':!![],'force':!![]});}catch{}}}[_0x3f9bb8(0x19e)]({keep:keep=null}={}){const _0xca7d=_0x3f9bb8,_0x38c5bd=Math[_0xca7d(0x1fd)](0x1,Math[_0xca7d(0x190)](keep??this[_0xca7d(0x1b1)]??0x3)),_0xb78c83=this[_0xca7d(0x1f0)]();if(_0xb78c83[_0xca7d(0x13e)]<=_0x38c5bd)return;const _0x497e83=this[_0xca7d(0x169)](),_0x5dc50e=_0xb78c83['slice'](0x0,Math[_0xca7d(0x1fd)](0x0,_0xb78c83[_0xca7d(0x13e)]-_0x38c5bd));for(const _0x5d284f of _0x5dc50e){if(_0x497e83&&_0x5d284f===_0x497e83)continue;const _0x459e89=this[_0xca7d(0x146)](_0x5d284f);try{_0x4c53a2[_0xca7d(0x19a)](_0x459e89,{'recursive':!![],'force':!![]});}catch{}}}async[_0x3f9bb8(0x196)](_0x4b42d7,_0x1a75b1){const _0x281b5a=_0x3f9bb8;if(!_0x4b42d7)throw new Error('snapshot\x20id\x20required');const _0x2928c2=this[_0x281b5a(0x185)](_0x4b42d7);if(!_0x1c7671(_0x2928c2[_0x281b5a(0x20f)])||!_0x1c7671(_0x2928c2[_0x281b5a(0x1aa)])||!_0x1c7671(_0x2928c2['state']))throw new Error(_0x281b5a(0x139)+_0x4b42d7);const _0x5d10b5=await _0x1a75b1(_0x2928c2);return _0x5d10b5||{};}async[_0x3f9bb8(0x17b)](_0x50b311,_0x2f7e5e,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0xf8598f=_0x3f9bb8,_0x3cfa61=Number(_0x50b311);if(!Number['isFinite'](_0x3cfa61)||_0x3cfa61<0x0)throw new Error('candidateClock\x20must\x20be\x20finite\x20>=\x200');const _0x51bf80=_0x23a340(_0x3cfa61),_0xa056f=this[_0xf8598f(0x146)](_0x51bf80),_0x5db989=_0x4be99c[_0xf8598f(0x1fc)](this[_0xf8598f(0x1b6)],'.tmp-'+_0x51bf80+'-'+_0x5b3eef[_0xf8598f(0x156)](0x6)[_0xf8598f(0x177)](_0xf8598f(0x16e)));_0x4c53a2['mkdirSync'](_0x5db989,{'recursive':!![]});const _0x9f9f37={'dir':_0x5db989,'index':_0x4be99c[_0xf8598f(0x1fc)](_0x5db989,_0xf8598f(0x19c)),'labels':_0x4be99c[_0xf8598f(0x1fc)](_0x5db989,_0xf8598f(0x18f)),'state':_0x4be99c[_0xf8598f(0x1fc)](_0x5db989,_0xf8598f(0x195))};await _0x2f7e5e(_0x9f9f37,{'id':_0x51bf80,'clock':_0x3cfa61});const _0x5d3161=JSON[_0xf8598f(0x1c1)]({'pid':process[_0xf8598f(0x16d)],'host':_0x47663e[_0xf8598f(0x1e2)](),'at':_0x314cff()}),_0x37e36c=_0x314cff();let _0x43f168=null;const _0x393aa4=()=>{const _0x236cd9=_0xf8598f;try{const _0x4640ce=JSON[_0x236cd9(0x1a5)](_0x4c53a2[_0x236cd9(0x15a)](this[_0x236cd9(0x176)],_0x236cd9(0x1d1)));if(_0x4640ce['at']&&_0x314cff()-_0x4640ce['at']>staleLockMaxAgeMs){const _0x8603cd=_0x314cff()-_0x4640ce['at'],_0xa5adc2=_0x236cd9(0x1ca)+Math[_0x236cd9(0x1df)](_0x8603cd/0x3e8)+'s,\x20pid:\x20'+_0x4640ce[_0x236cd9(0x16d)]+',\x20host:\x20'+_0x4640ce[_0x236cd9(0x1b9)]+_0x236cd9(0x183)+_0x236cd9(0x197);this[_0x236cd9(0x200)]?.['warn']?this[_0x236cd9(0x200)][_0x236cd9(0x15c)](_0xa5adc2):console[_0x236cd9(0x15c)](_0x236cd9(0x1f1),_0xa5adc2);try{_0x4c53a2[_0x236cd9(0x211)](this[_0x236cd9(0x176)]);}catch{}return!![];}}catch{try{_0x4c53a2[_0x236cd9(0x211)](this['lockPath']);}catch{}}return![];},_0x5a7777=()=>{const _0x3bae38=_0xf8598f;try{return _0x43f168=_0x4c53a2[_0x3bae38(0x205)](this[_0x3bae38(0x176)],'wx'),_0x4c53a2[_0x3bae38(0x1a2)](_0x43f168,_0x5d3161),!![];}catch(_0xa4407b){if(_0xa4407b&&_0xa4407b[_0x3bae38(0x1a8)]===_0x3bae38(0x173))return![];throw _0xa4407b;}};if(!_0x5a7777()){_0x393aa4(),_0x5a7777();if(_0x43f168==null&&lockTimeoutMs>0x0)while(_0x314cff()-_0x37e36c<lockTimeoutMs){await new Promise(_0xd326bb=>setTimeout(_0xd326bb,0x19));if(_0x5a7777())break;_0x393aa4();}}if(_0x43f168==null){try{_0x4c53a2[_0xf8598f(0x19a)](_0x5db989,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0xf8598f(0x1a6)};}try{const _0x39d4e8=this['readCurrentClock']();if(_0x3cfa61<=_0x39d4e8){try{_0x4c53a2['rmSync'](_0x5db989,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0xf8598f(0x16b),'currentClock':_0x39d4e8};}if(!_0x1c7671(_0xa056f))_0x4c53a2['renameSync'](_0x5db989,_0xa056f);else try{_0x4c53a2[_0xf8598f(0x19a)](_0x5db989,{'recursive':!![],'force':!![]});}catch{}return _0x2b7fea(this[_0xf8598f(0x1a0)],_0x51bf80+'\x0a'),this[_0xf8598f(0x19e)]({'keep':keep}),{'published':!![],'currentClock':_0x3cfa61};}finally{try{_0x4c53a2[_0xf8598f(0x1c6)](_0x43f168);}catch{}try{_0x4c53a2['unlinkSync'](this[_0xf8598f(0x176)]);}catch{}}}},snapshotStore;}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x59ee78=_0x411a8a;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x457479=require$$0;class _0x566074{constructor(){const _0x2389ff=_0x3360;this[_0x2389ff(0x1d5)]=new Map(),this[_0x2389ff(0x1c2)]=new Map(),this[_0x2389ff(0x1ce)]=0x0,this[_0x2389ff(0x1ab)]=0x0,this[_0x2389ff(0x208)]=new Map(),this[_0x2389ff(0x1ed)]=!![];}async[_0x59ee78(0x158)](){const _0x1cbafd=_0x59ee78;this['keyToLabel']=new Map(),this['labelToKey']=new Map(),this[_0x1cbafd(0x208)]=new Map(),this[_0x1cbafd(0x1ed)]=!![],this[_0x1cbafd(0x1ce)]=0x0,this[_0x1cbafd(0x1ab)]=0x0;}async[_0x59ee78(0x1bc)](_0x53bca9){const _0x2dc9fd=_0x59ee78;if(!_0x53bca9||!_0x457479[_0x2dc9fd(0x16f)](_0x53bca9))return await this[_0x2dc9fd(0x158)](),!![];let _0x252971;try{_0x252971=_0x457479['readFileSync'](_0x53bca9,_0x2dc9fd(0x1d1));}catch{return await this['reset'](),!![];}let _0x28e232;try{_0x28e232=JSON[_0x2dc9fd(0x1a5)](_0x252971);}catch{return await this[_0x2dc9fd(0x158)](),!![];}const _0x596a25=Array[_0x2dc9fd(0x15e)](_0x28e232?.[_0x2dc9fd(0x1f8)])?_0x28e232[_0x2dc9fd(0x1f8)]:[],_0x4d37ae=Number[_0x2dc9fd(0x1cd)](_0x28e232?.[_0x2dc9fd(0x1ce)])?_0x28e232[_0x2dc9fd(0x1ce)]:0x0,_0x33ba0b=new Map(),_0x5cdb6c=new Map(),_0x1c67ec=new Map(),_0x2e692b=_0x28e232?.[_0x2dc9fd(0x1ff)]>=0x2;let _0x2fb4a1=-0x1;for(const _0x365f9c of _0x596a25){if(!Array['isArray'](_0x365f9c)||_0x365f9c[_0x2dc9fd(0x13e)]<0x2)continue;const _0x3bab59=Number(_0x365f9c[0x0]),_0x35060b=String(_0x365f9c[0x1]??'');if(!Number[_0x2dc9fd(0x1cd)](_0x3bab59)||_0x3bab59<0x0)continue;if(!_0x35060b)continue;_0x33ba0b[_0x2dc9fd(0x192)](_0x35060b,_0x3bab59),_0x5cdb6c[_0x2dc9fd(0x192)](_0x3bab59,_0x35060b);if(_0x2e692b&&typeof _0x365f9c[0x2]===_0x2dc9fd(0x1e5))_0x1c67ec['set'](_0x35060b,_0x365f9c[0x2]);if(_0x3bab59>_0x2fb4a1)_0x2fb4a1=_0x3bab59;}return this[_0x2dc9fd(0x1d5)]=_0x33ba0b,this[_0x2dc9fd(0x1c2)]=_0x5cdb6c,this[_0x2dc9fd(0x208)]=_0x1c67ec,this['hasFingerprints']=_0x2e692b,this[_0x2dc9fd(0x1ce)]=Math[_0x2dc9fd(0x1fd)](_0x4d37ae,_0x2fb4a1+0x1,0x0),this['_tombstoneCount']=0x0,!![];}[_0x59ee78(0x1e7)](_0x3a44d5){const _0x19f545=_0x59ee78;return this[_0x19f545(0x1d5)]['get'](_0x3a44d5);}[_0x59ee78(0x17a)](_0x495a32){const _0x321245=_0x59ee78;let _0x374793=this[_0x321245(0x1d5)][_0x321245(0x1de)](_0x495a32);if(_0x374793!==undefined)return _0x374793;return _0x374793=this[_0x321245(0x1ce)]++,this[_0x321245(0x1d5)][_0x321245(0x192)](_0x495a32,_0x374793),this[_0x321245(0x1c2)][_0x321245(0x192)](_0x374793,_0x495a32),_0x374793;}[_0x59ee78(0x141)](_0x521bd0,_0x43e25a){const _0x3dba14=_0x59ee78;if(_0x43e25a==null)this[_0x3dba14(0x208)][_0x3dba14(0x1fa)](_0x521bd0);else this[_0x3dba14(0x208)]['set'](_0x521bd0,_0x43e25a);}['fingerprintOf'](_0x17d5de){const _0x1e3c66=_0x59ee78;return this['keyToFp'][_0x1e3c66(0x1de)](_0x17d5de);}[_0x59ee78(0x1f6)](){const _0x2b8dfb=_0x59ee78;return this['keyToLabel'][_0x2b8dfb(0x1f6)]();}[_0x59ee78(0x19d)](_0x419344){const _0x521e03=_0x59ee78,_0x40390b=this['keyToLabel'][_0x521e03(0x1de)](_0x419344);if(_0x40390b===undefined)return;this[_0x521e03(0x208)][_0x521e03(0x1fa)](_0x419344),this['keyToLabel'][_0x521e03(0x1fa)](_0x419344),this[_0x521e03(0x1c2)][_0x521e03(0x1fa)](_0x40390b),this[_0x521e03(0x1ab)]++;}[_0x59ee78(0x15f)](_0x4e6d15){const _0xc14b9d=_0x59ee78;return this[_0xc14b9d(0x1c2)][_0xc14b9d(0x1de)](_0x4e6d15)??null;}[_0x59ee78(0x1d7)](){const _0x1fa7cf=_0x59ee78;return this[_0x1fa7cf(0x1d5)][_0x1fa7cf(0x1d7)];}[_0x59ee78(0x1ba)](){const _0x418319=_0x59ee78;return this[_0x418319(0x1ab)];}async[_0x59ee78(0x1d9)](_0xb8a06f){const _0x29e7bb=_0x59ee78,_0x1fcb26=_0xb8a06f+_0x29e7bb(0x14e),_0x26edd2=[];for(const [_0x4efbe0,_0x2368d4]of this['labelToKey'][_0x29e7bb(0x1f8)]()){const _0x2beef3=this[_0x29e7bb(0x208)][_0x29e7bb(0x1de)](_0x2368d4);_0x26edd2[_0x29e7bb(0x1db)](_0x2beef3==null?[_0x4efbe0,_0x2368d4]:[_0x4efbe0,_0x2368d4,_0x2beef3]);}_0x26edd2[_0x29e7bb(0x1e8)]((_0x32e39d,_0x3934a0)=>_0x32e39d[0x0]-_0x3934a0[0x0]);const _0xdab971={'version':0x2,'nextLabel':this[_0x29e7bb(0x1ce)],'entries':_0x26edd2};_0x457479['writeFileSync'](_0x1fcb26,JSON['stringify'](_0xdab971)),_0x457479['renameSync'](_0x1fcb26,_0xb8a06f);}}return labelMap=_0x566074,labelMap;}var indexConvergence,hasRequiredIndexConvergence;function requireIndexConvergence(){if(hasRequiredIndexConvergence)return indexConvergence;hasRequiredIndexConvergence=0x1;function _0x45875b(_0x19d9e5){const _0x4cdda8=_0x3360,_0x4bd3c3=new Uint32Array(_0x19d9e5[_0x4cdda8(0x160)],_0x19d9e5[_0x4cdda8(0x193)],_0x19d9e5[_0x4cdda8(0x13e)]);let _0xb16848=0x811c9dc5,_0x3b7b77=0x9747b28c;for(let _0x255208=0x0;_0x255208<_0x4bd3c3['length'];_0x255208++){const _0xf00792=_0x4bd3c3[_0x255208];_0xb16848=Math[_0x4cdda8(0x1c4)](_0xb16848^_0xf00792,0x1000193)>>>0x0;let _0x32a963=Math['imul'](_0xf00792,0xcc9e2d51);_0x32a963=_0x32a963<<0xf|_0x32a963>>>0x11,_0x3b7b77=Math[_0x4cdda8(0x1c4)](_0x3b7b77^Math[_0x4cdda8(0x1c4)](_0x32a963,0x1b873593),0x5)+0xe6546b64,_0x3b7b77>>>=0x0;}return _0x3b7b77=Math['imul'](_0x3b7b77^_0x3b7b77>>>0x10,0x85ebca6b)>>>0x0,(_0xb16848>>>0x0)*0x100000+(_0x3b7b77&0xfffff);}function _0x1cf236(_0x1ee843,_0x4d7168,_0x2c24c4,{upsert:_0x3866ca,remove:_0x80d818}){const _0x439a2e=_0x3360,_0x461013=new Set();let _0x1201e8=0x0,_0x33a711=0x0,_0x4b6d0f=0x0;for(const {key:_0x3a90fd,vector:_0x336ec7}of _0x4d7168){if(!(_0x336ec7 instanceof Float32Array)||_0x336ec7['length']!==_0x2c24c4)continue;_0x461013[_0x439a2e(0x166)](_0x3a90fd);const _0x5570b7=_0x45875b(_0x336ec7),_0xdcba40=_0x1ee843[_0x439a2e(0x1e7)](_0x3a90fd)!==undefined;if(_0xdcba40&&_0x1ee843[_0x439a2e(0x1d2)](_0x3a90fd)===_0x5570b7)continue;_0x3866ca(_0x3a90fd,_0x336ec7,_0x5570b7);if(_0xdcba40)_0x33a711++;else _0x1201e8++;}for(const _0x149a8d of[..._0x1ee843[_0x439a2e(0x1f6)]()]){if(_0x461013['has'](_0x149a8d))continue;_0x80d818(_0x149a8d),_0x4b6d0f++;}return{'added':_0x1201e8,'changed':_0x33a711,'removed':_0x4b6d0f};}return indexConvergence={'fingerprint':_0x45875b,'reconcileIndex':_0x1cf236},indexConvergence;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x54f145=requireSnapshotStore(),_0x485af6=requireLabelMap(),{fingerprint:_0x2de35c,reconcileIndex:_0x5e77f0}=requireIndexConvergence(),_0x2d5043=0x1;let _0x35cf99=null;function _0x417f74(){const _0x4b9297=_0x3360;if(_0x35cf99)return _0x35cf99;try{return _0x35cf99=require(_0x4b9297(0x165)),_0x35cf99;}catch(_0x3984a8){const _0x4c8792=new Error(_0x4b9297(0x207)+('for\x20Node\x20'+process[_0x4b9297(0x154)][_0x4b9297(0x1ef)]+_0x4b9297(0x18b)+process[_0x4b9297(0x171)]+'/'+process[_0x4b9297(0x17f)]+'.\x20')+'Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20'+(_0x4b9297(0x209)+(_0x3984a8?.[_0x4b9297(0x194)]||String(_0x3984a8))));_0x4c8792[_0x4b9297(0x1a8)]=_0x4b9297(0x150),_0x4c8792['cause']=_0x3984a8;throw _0x4c8792;}}return hnsw=function _0x37105b(_0x504cb7={},{dims:_0x234f83,dir:_0x3d57de}){const _0x3e2d51=_0x3360,_0x15eb2f=_0x417f74();if(!_0x234f83||_0x234f83<=0x0)throw new Error(_0x3e2d51(0x191));if(!_0x3d57de)throw new Error(_0x3e2d51(0x16a));const _0x12439f={'metric':_0x504cb7[_0x3e2d51(0x1bb)]??_0x3e2d51(0x164),'M':_0x504cb7['M']??0x10,'efConstruction':_0x504cb7[_0x3e2d51(0x17c)]??0xc8,'efSearch':_0x504cb7[_0x3e2d51(0x189)]??0x40,'maxElements':_0x504cb7[_0x3e2d51(0x199)]??0x400,'growFactor':_0x504cb7[_0x3e2d51(0x1a7)]??0x2,'snapshotEveryChanges':_0x504cb7[_0x3e2d51(0x16c)]??0xc350,'keepSnapshots':_0x504cb7[_0x3e2d51(0x1b1)]??0x2,'tmpMaxAgeMs':_0x504cb7[_0x3e2d51(0x14b)]??0x6*0x36ee80},_0x5af97f=new _0x54f145({'dir':_0x3d57de,'keepSnapshots':_0x12439f[_0x3e2d51(0x1b1)]}),_0x4ae3f8=new _0x485af6();let _0x4d2f6f=null,_0x2aad23=0x0,_0x3f94fe=null,_0x3443fb=Promise[_0x3e2d51(0x15d)]();const _0x29d3ee=_0x4c3d30=>{const _0x1b7dac=_0x3e2d51,_0xca8759=_0x3443fb[_0x1b7dac(0x182)](_0x4c3d30);return _0x3443fb=_0xca8759[_0x1b7dac(0x1e3)](()=>{}),_0xca8759;};async function _0x4aa06a(_0x9c3c31){const _0x3a9bf0=_0x3e2d51;await _0x4ae3f8[_0x3a9bf0(0x158)](),_0x9c3c31=_0x9c3c31??[];const _0x2fbec9=Math[_0x3a9bf0(0x1fd)](_0x12439f[_0x3a9bf0(0x199)],Math[_0x3a9bf0(0x1b4)](_0x9c3c31[_0x3a9bf0(0x13e)]*(_0x12439f[_0x3a9bf0(0x1a7)]||1.2)),0x1);_0x4d2f6f=new _0x15eb2f[(_0x3a9bf0(0x20e))](_0x12439f[_0x3a9bf0(0x1bb)],_0x234f83),_0x4d2f6f[_0x3a9bf0(0x212)]({'maxElements':_0x2fbec9,'efConstruction':_0x12439f[_0x3a9bf0(0x17c)],'M':_0x12439f['M']});for(const {key:_0x614cd7,vector:_0x51b01c}of _0x9c3c31){if(!(_0x51b01c instanceof Float32Array)||_0x51b01c[_0x3a9bf0(0x13e)]!==_0x234f83)continue;_0x48794c(_0x614cd7,_0x51b01c);}_0x4d2f6f['setEf'](_0x12439f[_0x3a9bf0(0x189)]),_0x2aad23=0x0;}async function _0x3b1929(_0x5d2d03){return _0x4aa06a(_0x5d2d03?await _0x5d2d03():[]);}function _0x2fe010(){const _0x3fc628=_0x3e2d51;if(_0x4d2f6f[_0x3fc628(0x1a9)]()<_0x4d2f6f[_0x3fc628(0x201)]())return;const _0x2a1f2b=Math[_0x3fc628(0x1b4)](_0x4d2f6f[_0x3fc628(0x201)]()*(_0x12439f[_0x3fc628(0x1a7)]||0x2));_0x4d2f6f[_0x3fc628(0x175)](_0x2a1f2b),_0x12439f[_0x3fc628(0x199)]=_0x2a1f2b;}function _0x48794c(_0x46eea8,_0x2a2574,_0x45e167){const _0x2311d5=_0x3e2d51,_0x68ac10=_0x4ae3f8['labelForEphemeral'](_0x46eea8);try{_0x4d2f6f[_0x2311d5(0x1ac)](_0x68ac10);}catch{}_0x2fe010(),_0x4d2f6f[_0x2311d5(0x1ae)](Array[_0x2311d5(0x159)](_0x2a2574),_0x68ac10),_0x4ae3f8[_0x2311d5(0x141)](_0x46eea8,_0x45e167??_0x2de35c(_0x2a2574));}function _0x3632c3(_0x589f94){const _0x5b1cac=_0x3e2d51,_0x23ffb7=_0x4ae3f8[_0x5b1cac(0x1e7)](_0x589f94);if(_0x23ffb7===undefined)return![];try{_0x4d2f6f[_0x5b1cac(0x1ac)](_0x23ffb7);}catch{}return _0x4ae3f8[_0x5b1cac(0x19d)](_0x589f94),!![];}function _0x1364c1(){const _0x5ac049=_0x3e2d51;return Math[_0x5ac049(0x1fd)](Date[_0x5ac049(0x1d3)](),_0x5af97f[_0x5ac049(0x1f7)]()+0x1);}async function _0x32caba(_0x1e5788){const _0x2135e3=_0x3e2d51;if(!_0x4d2f6f||!_0x1e5788)return![];const _0x208883=await _0x5af97f[_0x2135e3(0x17b)](_0x1e5788,async _0x1cb882=>{const _0x5a8e65=_0x2135e3;_0x4d2f6f[_0x5a8e65(0x13c)](_0x1cb882['index']),await _0x4ae3f8[_0x5a8e65(0x1d9)](_0x1cb882[_0x5a8e65(0x1aa)]);const _0x445bc5=require$$0;_0x445bc5[_0x5a8e65(0x1a2)](_0x1cb882[_0x5a8e65(0x180)],JSON[_0x5a8e65(0x1c1)]({'manifestVersion':_0x2d5043,'dims':_0x234f83,'metric':_0x12439f[_0x5a8e65(0x1bb)],'clock':_0x1e5788,'snapshotAt':Date[_0x5a8e65(0x1d3)]()},null,0x2));},{'keep':_0x12439f['keepSnapshots']});if(_0x208883?.[_0x2135e3(0x170)])_0x2aad23=0x0;return _0x208883?.[_0x2135e3(0x170)]??![];}async function _0x265c82(){const _0x1efb6b=_0x3e2d51,_0x1e1aa2=_0x5af97f[_0x1efb6b(0x169)]()||_0x5af97f[_0x1efb6b(0x1a1)]();if(!_0x1e1aa2)return null;let _0x1111dc,_0x2e3f84=![];return await _0x5af97f[_0x1efb6b(0x196)](_0x1e1aa2,async _0x1c8968=>{const _0x4f1ec1=_0x1efb6b,_0x56b1ce=require$$0;_0x1111dc=JSON[_0x4f1ec1(0x1a5)](_0x56b1ce['readFileSync'](_0x1c8968[_0x4f1ec1(0x180)],_0x4f1ec1(0x1d1)));if(_0x1111dc[_0x4f1ec1(0x14a)]!==_0x2d5043||_0x1111dc['dims']!==_0x234f83||_0x1111dc[_0x4f1ec1(0x1bb)]!==_0x12439f[_0x4f1ec1(0x1bb)]){_0x1111dc=null;return;}await _0x4ae3f8['loadFrom'](_0x1c8968['labels']),_0x4d2f6f=new _0x15eb2f[(_0x4f1ec1(0x20e))](_0x12439f[_0x4f1ec1(0x1bb)],_0x234f83),_0x4d2f6f[_0x4f1ec1(0x13d)](_0x1c8968[_0x4f1ec1(0x20f)]),_0x4d2f6f[_0x4f1ec1(0x147)](_0x12439f[_0x4f1ec1(0x189)]),_0x2e3f84=!![];}),_0x2e3f84?_0x1111dc?.[_0x1efb6b(0x149)]??0x0:null;}return{async 'load'(_0x384906){return _0x29d3ee(async()=>{const _0x6a0cb2=_0x3360;_0x5af97f[_0x6a0cb2(0x18a)]({'maxAgeMs':_0x12439f[_0x6a0cb2(0x14b)]}),_0x3f94fe=_0x384906??null;const _0x129666=await _0x265c82(),_0x10e57d=_0x384906?await _0x384906():null;if(_0x129666!=null){if(_0x10e57d){if(!_0x4ae3f8[_0x6a0cb2(0x1ed)])return await _0x4aa06a(_0x10e57d),null;const _0x3318f3=_0x5e77f0(_0x4ae3f8,_0x10e57d,_0x234f83,{'upsert':_0x48794c,'remove':_0x3632c3});_0x2aad23+=_0x3318f3['added']+_0x3318f3[_0x6a0cb2(0x18c)]+_0x3318f3[_0x6a0cb2(0x1e4)];}return _0x129666;}return await _0x4aa06a(_0x10e57d),null;});},async 'add'(_0x3bb990,_0x35ba64,_0x465b42){return _0x29d3ee(async()=>{const _0x543a82=_0x3360;if(!_0x4d2f6f)return;const _0x426abf=_0x35ba64 instanceof Float32Array?_0x35ba64:new Float32Array(_0x35ba64),_0x127152=_0x2de35c(_0x426abf);if(_0x4ae3f8[_0x543a82(0x1d2)](_0x3bb990)===_0x127152)return;_0x48794c(_0x3bb990,_0x426abf,_0x127152),_0x2aad23++,_0x2aad23>=_0x12439f[_0x543a82(0x16c)]&&await _0x32caba(_0x1364c1());});},async 'remove'(_0x3f5987){return _0x29d3ee(async()=>{if(!_0x4d2f6f)return;if(_0x3632c3(_0x3f5987))_0x2aad23++;});},'search'(_0x2490d1,{limit:limit=0xa,efSearch:_0x1f1d12}={}){const _0x1c0788=_0x3e2d51;if(!_0x4d2f6f)return[];if(Number[_0x1c0788(0x1cd)](_0x1f1d12))_0x4d2f6f[_0x1c0788(0x147)](_0x1f1d12);const _0x5dd90f=Math[_0x1c0788(0x1be)](limit,_0x4d2f6f[_0x1c0788(0x1a9)]()||0x1),{neighbors:_0x59af5c,distances:_0x117a06}=_0x4d2f6f['searchKnn'](Array['from'](_0x2490d1),_0x5dd90f),_0x2c6a55=[];for(let _0x1d2947=0x0;_0x1d2947<_0x59af5c['length'];_0x1d2947++){const _0x1e228e=_0x4ae3f8['keyForLabel'](_0x59af5c[_0x1d2947]);if(!_0x1e228e)continue;const _0x2f27a4=_0x12439f[_0x1c0788(0x1bb)]==='cosine'?Math[_0x1c0788(0x1fd)](0x0,0x1-_0x117a06[_0x1d2947]):0x1/(0x1+_0x117a06[_0x1d2947]);_0x2c6a55[_0x1c0788(0x1db)]({'key':_0x1e228e,'score':_0x2f27a4});}return _0x2c6a55;},async 'snapshot'(_0x535015){return _0x29d3ee(()=>_0x32caba(_0x535015??_0x1364c1()));},async 'rebuild'(_0x2216aa){return _0x29d3ee(()=>{if(_0x2216aa!=null)_0x3f94fe=_0x2216aa;return _0x3b1929(_0x2216aa??_0x3f94fe);});},async 'stop'(){return _0x29d3ee(()=>_0x2aad23>0x0||!_0x5af97f['readCurrentId']()?_0x32caba(_0x1364c1()):![]);},'count'(){const _0x183791=_0x3e2d51;return _0x4ae3f8[_0x183791(0x1d7)]();},'info'(){const _0x1c1c62=_0x3e2d51;return{'algorithm':_0x1c1c62(0x161),'metric':_0x12439f['metric'],'M':_0x12439f['M'],'efConstruction':_0x12439f[_0x1c1c62(0x17c)],'efSearch':_0x12439f['efSearch'],'maxElements':_0x4d2f6f?.[_0x1c1c62(0x201)]()??_0x12439f[_0x1c1c62(0x199)],'count':_0x4ae3f8[_0x1c1c62(0x1d7)](),'changesSince':_0x2aad23,'snapshotDir':_0x3d57de,'latestSnapshot':_0x5af97f[_0x1c1c62(0x169)]()??null};}};},hnsw;}var flat,hasRequiredFlat;function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x513a18(_0x4ef6b0={}){const _0x52a722=new Map();return{async 'load'(_0x508d61){const _0x10f2e4=_0x3360;_0x52a722[_0x10f2e4(0x1f4)]();if(_0x508d61)for(const {key:_0x1b8429,vector:_0x2bc3d9}of await _0x508d61()){_0x52a722[_0x10f2e4(0x192)](_0x1b8429,_0x2bc3d9);}},async 'add'(_0x3bb4f9,_0xd25fee,_0x15f88b){_0x52a722['set'](_0x3bb4f9,_0xd25fee);},async 'remove'(_0x429e2a){const _0x3a979f=_0x3360;_0x52a722[_0x3a979f(0x1fa)](_0x429e2a);},'search'(_0x3e9127,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x2c3f6d=_0x3360,_0x32b0a0=[];for(const [_0x20ea7d,_0x2b0218]of _0x52a722){const _0x4ace62=_0x3b3f81(_0x3e9127,_0x2b0218);if(_0x4ace62>=threshold)_0x32b0a0[_0x2c3f6d(0x1db)]({'key':_0x20ea7d,'score':_0x4ace62});}return _0x32b0a0[_0x2c3f6d(0x1e8)]((_0x5a390e,_0x413499)=>_0x413499[_0x2c3f6d(0x1b0)]-_0x5a390e[_0x2c3f6d(0x1b0)]),_0x32b0a0[_0x2c3f6d(0x184)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0x5b6a08){await this['load'](_0x5b6a08);},async 'stop'(){},'count'(){const _0x4fa636=_0x3360;return _0x52a722[_0x4fa636(0x1d7)];},'info'(){const _0x326fb5=_0x3360;return{'algorithm':'flat','count':_0x52a722[_0x326fb5(0x1d7)]};}};};function _0x3b3f81(_0xc33ad6,_0x32c139){const _0x4074d3=_0x3360;let _0x4fe58f=0x0,_0x57ba46=0x0,_0x4cde42=0x0;for(let _0x57199e=0x0;_0x57199e<_0xc33ad6[_0x4074d3(0x13e)];_0x57199e++){_0x4fe58f+=_0xc33ad6[_0x57199e]*_0x32c139[_0x57199e],_0x57ba46+=_0xc33ad6[_0x57199e]*_0xc33ad6[_0x57199e],_0x4cde42+=_0x32c139[_0x57199e]*_0x32c139[_0x57199e];}const _0x3548bf=Math[_0x4074d3(0x168)](_0x57ba46)*Math['sqrt'](_0x4cde42);return _0x3548bf===0x0?0x0:_0x4fe58f/_0x3548bf;}return flat;}var writerLock,hasRequiredWriterLock;function requireWriterLock(){if(hasRequiredWriterLock)return writerLock;hasRequiredWriterLock=0x1;const _0x21b32d=require$$0,_0x1eba11=require$$1,_0x42d6fb=require$$3;return writerLock=function _0x26572c(_0x191b84,{maxAgeMs:maxAgeMs=0x3a98,heartbeatMs:heartbeatMs=0x1388,onLost:onLost=null}={}){const _0x58495a=_0x3360,_0x5b46a4=_0x1eba11['join'](_0x191b84,_0x58495a(0x1bf)),_0x202fb8=_0x42d6fb[_0x58495a(0x156)](0x8)[_0x58495a(0x177)](_0x58495a(0x16e));let _0x23738d=![],_0x333818=null;const _0x35c5df=()=>JSON[_0x58495a(0x1c1)]({'pid':process[_0x58495a(0x16d)],'token':_0x202fb8,'at':Date[_0x58495a(0x1d3)]()});function _0x276e6c(){const _0x39ad31=_0x58495a;try{return JSON[_0x39ad31(0x1a5)](_0x21b32d['readFileSync'](_0x5b46a4,'utf8'));}catch(_0x1fa527){return _0x1fa527?.[_0x39ad31(0x1a8)]===_0x39ad31(0x1a3)?null:{'unreadable':!![]};}}function _0x24b572(){const _0x13a988=_0x58495a;try{const _0x443b59=_0x21b32d['openSync'](_0x5b46a4,'wx');try{_0x21b32d['writeFileSync'](_0x443b59,_0x35c5df());}finally{_0x21b32d[_0x13a988(0x1c6)](_0x443b59);}return!![];}catch(_0x151c10){if(_0x151c10?.[_0x13a988(0x1a8)]===_0x13a988(0x173))return![];throw _0x151c10;}}function _0x19f3d9(_0x41771f){const _0x59c296=_0x58495a;if(!_0x41771f)return!![];if(_0x41771f[_0x59c296(0x1c3)])return!![];return Date[_0x59c296(0x1d3)]()-(_0x41771f['at']??0x0)>=maxAgeMs;}function _0x5936fe(){if(_0x333818)clearInterval(_0x333818);_0x333818=null;}function _0x24a783(){_0x5936fe(),_0x333818=setInterval(()=>{const _0x3ed6d7=_0x3360,_0x2c37d3=_0x276e6c();if(_0x2c37d3&&!_0x2c37d3['unreadable']&&_0x2c37d3[_0x3ed6d7(0x1f3)]!==_0x202fb8){_0x23738d=![],_0x5936fe();try{onLost?.();}catch{}return;}try{_0x21b32d[_0x3ed6d7(0x1a2)](_0x5b46a4,_0x35c5df());}catch{}},heartbeatMs),_0x333818['unref']?.();}function _0x378c0a(){const _0x47c563=_0x58495a,_0x1950fc=_0x276e6c();return!!_0x1950fc&&_0x1950fc[_0x47c563(0x1f3)]===_0x202fb8;}return{'path':_0x5b46a4,'token':_0x202fb8,'acquire'(){const _0x1471e1=_0x58495a,_0x323493=_0x276e6c();if(_0x323493&&_0x323493[_0x1471e1(0x1f3)]===_0x202fb8){_0x23738d=!![];if(!_0x333818)_0x24a783();return!![];}let _0x11c64c=_0x24b572();if(!_0x11c64c&&_0x19f3d9(_0x276e6c())){try{_0x21b32d[_0x1471e1(0x211)](_0x5b46a4);}catch{}_0x11c64c=_0x24b572();}if(_0x11c64c&&!_0x378c0a())_0x11c64c=![];_0x23738d=_0x11c64c;if(_0x11c64c)_0x24a783();return _0x11c64c;},'held'(){return _0x23738d;},'isFree'(){const _0x395dfb=_0x58495a,_0xd2d633=_0x276e6c();if(_0xd2d633&&_0xd2d633[_0x395dfb(0x1f3)]===_0x202fb8)return![];return _0x19f3d9(_0xd2d633);},'release'(){const _0x2d49c2=_0x58495a;_0x5936fe();if(!_0x23738d)return;_0x23738d=![];if(_0x378c0a())try{_0x21b32d[_0x2d49c2(0x211)](_0x5b46a4);}catch{}}};},writerLock;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x34fdf8=require$$0,_0x4da061=requireSnapshotStore(),_0x1b8eaf=requireLabelMap(),_0x477a91=requireWriterLock(),{fingerprint:_0x600b9d,reconcileIndex:_0x551732}=requireIndexConvergence(),_0x55cb33=0x1;let _0x89b0e1=null;function _0x3a5d57(){const _0x636f8b=_0x3360;if(_0x89b0e1)return _0x89b0e1;try{return _0x89b0e1=require(_0x636f8b(0x1ea)),_0x89b0e1;}catch(_0x21157c){const _0x3142f4=new Error(_0x636f8b(0x1ad)+(_0x636f8b(0x14f)+process[_0x636f8b(0x154)][_0x636f8b(0x1ef)]+_0x636f8b(0x18b)+process[_0x636f8b(0x171)]+'/'+process[_0x636f8b(0x17f)]+'.\x20')+_0x636f8b(0x1cc)+(_0x636f8b(0x209)+(_0x21157c?.['message']||String(_0x21157c))));_0x3142f4['code']=_0x636f8b(0x157),_0x3142f4[_0x636f8b(0x1d0)]=_0x21157c;throw _0x3142f4;}}function _0x53ac1f(_0x189d98,_0x26118d){const _0x86ade4=_0x3360;switch(_0x189d98){case _0x86ade4(0x164):return _0x26118d[_0x86ade4(0x1c7)][_0x86ade4(0x181)];case'l2':return _0x26118d[_0x86ade4(0x1c7)][_0x86ade4(0x1dc)];case'ip':return _0x26118d['MetricKind']['IP'];default:return _0x26118d[_0x86ade4(0x1c7)][_0x86ade4(0x181)];}}return usearch=function _0x5a8de2(_0x185273={},{dims:_0x353d90,dir:_0x148319,fetchAll:fetchAll=null,onChange:onChange=null}={}){const _0x4eac58=_0x3360,_0x32c73c=_0x3a5d57();if(!_0x353d90||_0x353d90<=0x0)throw new Error(_0x4eac58(0x1c0));if(!_0x148319)throw new Error(_0x4eac58(0x1b5));const _0x3d096e={'metric':_0x185273[_0x4eac58(0x1bb)]??'cosine','connectivity':_0x185273[_0x4eac58(0x18e)]??0x10,'expansionAdd':_0x185273[_0x4eac58(0x142)]??0x80,'expansionSearch':_0x185273['expansionSearch']??0x40,'snapshotEveryChanges':_0x185273[_0x4eac58(0x16c)]??0xc350,'snapshotMaxLagMs':_0x185273[_0x4eac58(0x1da)]??0x2710,'keepSnapshots':_0x185273[_0x4eac58(0x1b1)]??0x2,'tmpMaxAgeMs':_0x185273[_0x4eac58(0x14b)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x185273[_0x4eac58(0x1b8)]??0x1388,'writerLockMaxAgeMs':_0x185273[_0x4eac58(0x1d8)]??0x3a98,'viewRefreshMs':_0x185273['viewRefreshMs']??0x3e8},_0x2265b5=new _0x4da061({'dir':_0x148319,'keepSnapshots':_0x3d096e[_0x4eac58(0x1b1)]}),_0x4c44c7=_0x477a91(_0x148319,{'maxAgeMs':_0x3d096e[_0x4eac58(0x1d8)],'heartbeatMs':_0x3d096e[_0x4eac58(0x1b8)],'onLost':()=>{const _0x27b79d=_0x4eac58;_0x152239(_0x350547)[_0x27b79d(0x1e3)](()=>{});}});let _0x2c882b=new _0x1b8eaf(),_0x1589ee=null,_0x10dc8b=0x0,_0x232238=null,_0x30625d=![],_0x4fa1ff=![],_0xf59148=null,_0x1b3ef5=0x0,_0x1ee4d9=null,_0x26a863=0x0,_0x16d624=![],_0x2cab22=Promise[_0x4eac58(0x15d)]();const _0x152239=_0x141c3c=>{const _0x276faa=_0x4eac58,_0x55b6ca=_0x2cab22[_0x276faa(0x182)](_0x141c3c);return _0x2cab22=_0x55b6ca['catch'](()=>{}),_0x55b6ca;},_0x344d08=()=>{try{onChange?.();}catch{}};function _0x16ad58(){const _0x5965fd=_0x4eac58;return new _0x32c73c[(_0x5965fd(0x145))]({'dimensions':_0x353d90,'metric':_0x53ac1f(_0x3d096e['metric'],_0x32c73c),'quantization':_0x32c73c['ScalarKind'][_0x5965fd(0x14d)],'connectivity':_0x3d096e[_0x5965fd(0x18e)],'expansion_add':_0x3d096e[_0x5965fd(0x142)],'expansion_search':_0x3d096e['expansionSearch'],'multi':![]});}function _0x506f22(_0x568469){return _0x568469 instanceof Float32Array?_0x568469:new Float32Array(_0x568469);}function _0x4e2215(){const _0x29caf8=_0x4eac58;if(fetchAll)return fetchAll();if(_0x232238)return _0x232238();return Promise[_0x29caf8(0x15d)](null);}function _0x1538ce(_0x569297,_0x11b077,_0x39015e){const _0x386ae4=_0x4eac58,_0x5d7af9=_0x2c882b['labelForExisting'](_0x569297);if(_0x5d7af9!==undefined)try{_0x1589ee[_0x386ae4(0x198)](BigInt(_0x5d7af9));}catch{}const _0x454b5a=_0x2c882b[_0x386ae4(0x17a)](_0x569297);_0x1589ee['add'](BigInt(_0x454b5a),_0x11b077),_0x2c882b[_0x386ae4(0x141)](_0x569297,_0x39015e??_0x600b9d(_0x11b077));}function _0x7bdc90(_0x309fdd){const _0xe8ab7d=_0x4eac58,_0x12199a=_0x2c882b[_0xe8ab7d(0x1e7)](_0x309fdd);if(_0x12199a===undefined)return![];try{_0x1589ee[_0xe8ab7d(0x198)](BigInt(_0x12199a));}catch{}return _0x2c882b[_0xe8ab7d(0x19d)](_0x309fdd),!![];}function _0x203455(_0x5b7955){const _0x4f0b8d=_0x4eac58;_0x2c882b=new _0x1b8eaf(),_0x1589ee=_0x16ad58();for(const {key:_0x3e1259,vector:_0x59723a}of _0x5b7955??[]){if(!(_0x59723a instanceof Float32Array)||_0x59723a[_0x4f0b8d(0x13e)]!==_0x353d90)continue;_0x1538ce(_0x3e1259,_0x59723a);}_0x10dc8b=0x0;}function _0x14cd4d(){const _0x493f91=_0x4eac58;return Math[_0x493f91(0x1fd)](Date[_0x493f91(0x1d3)](),_0x2265b5[_0x493f91(0x1f7)]()+0x1);}function _0xf41a60(){if(_0xf59148)clearTimeout(_0xf59148);_0xf59148=null;}function _0x4a5cf0(){const _0x2dce64=_0x4eac58;if(!_0x3d096e[_0x2dce64(0x1da)]||_0xf59148||!_0x4fa1ff||_0x10dc8b<=0x0)return;const _0x39b302=Math[_0x2dce64(0x1fd)](_0x3d096e['snapshotMaxLagMs'],0xa*_0x1b3ef5);_0xf59148=setTimeout(()=>{const _0x572119=_0x2dce64;_0xf59148=null,_0x152239(async()=>{if(_0x4fa1ff&&_0x10dc8b>0x0)await _0x59cb25();_0x4a5cf0(),_0x344d08();})[_0x572119(0x1e3)](()=>{});},_0x39b302),_0xf59148['unref']?.();}async function _0x59cb25(_0x399e9d){const _0x3cff7f=_0x4eac58;if(!_0x1589ee)return![];const _0x1f589b=_0x399e9d??_0x14cd4d(),_0x223fbc=Date[_0x3cff7f(0x1d3)](),_0x5d8800=await _0x2265b5[_0x3cff7f(0x17b)](_0x1f589b,async _0x2952bf=>{const _0x4155e0=_0x3cff7f;_0x1589ee['save'](_0x2952bf[_0x4155e0(0x20f)]),await _0x2c882b[_0x4155e0(0x1d9)](_0x2952bf[_0x4155e0(0x1aa)]),_0x34fdf8[_0x4155e0(0x1a2)](_0x2952bf[_0x4155e0(0x180)],JSON[_0x4155e0(0x1c1)]({'manifestVersion':_0x55cb33,'algorithm':_0x4155e0(0x1ea),'dims':_0x353d90,'metric':_0x3d096e[_0x4155e0(0x1bb)],'clock':_0x1f589b,'snapshotAt':Date[_0x4155e0(0x1d3)]()},null,0x2));},{'keep':_0x3d096e[_0x3cff7f(0x1b1)]});return _0x1b3ef5=Date[_0x3cff7f(0x1d3)]()-_0x223fbc,_0x5d8800?.[_0x3cff7f(0x170)]&&(_0x10dc8b=0x0,_0xf41a60()),_0x5d8800?.['published']??![];}function _0x506b5d(){const _0x3eacd1=_0x4eac58;_0x10dc8b++;if(_0x10dc8b>=_0x3d096e[_0x3eacd1(0x16c)])return _0x59cb25();return _0x4a5cf0(),null;}async function _0xaf012b(){const _0x19bc92=_0x4eac58,_0x474862=_0x2265b5[_0x19bc92(0x169)]()||_0x2265b5[_0x19bc92(0x1a1)]();if(!_0x474862)return null;let _0x18c8e6,_0x5b1e51=![];try{await _0x2265b5['loadSnapshot'](_0x474862,async _0x2ebb0e=>{const _0x51c970=_0x19bc92;_0x18c8e6=JSON[_0x51c970(0x1a5)](_0x34fdf8[_0x51c970(0x15a)](_0x2ebb0e[_0x51c970(0x180)],_0x51c970(0x1d1)));if(_0x18c8e6[_0x51c970(0x14a)]!==_0x55cb33||_0x18c8e6['algorithm']!==_0x51c970(0x1ea)||_0x18c8e6['dims']!==_0x353d90||_0x18c8e6[_0x51c970(0x1bb)]!==_0x3d096e[_0x51c970(0x1bb)]){_0x18c8e6=null;return;}const _0x23bf68=new _0x1b8eaf();await _0x23bf68[_0x51c970(0x1bc)](_0x2ebb0e[_0x51c970(0x1aa)]);const _0x31d84e=_0x16ad58();_0x31d84e['load'](_0x2ebb0e[_0x51c970(0x20f)]),_0x2c882b=_0x23bf68,_0x1589ee=_0x31d84e,_0x5b1e51=!![];});}catch{return null;}return _0x5b1e51?_0x18c8e6?.[_0x19bc92(0x149)]??0x0:null;}async function _0x373334(_0x1b7fa9){const _0x253fbb=_0x4eac58;_0x1ee4d9=null;const _0x3b2aad=await _0xaf012b();if(_0x3b2aad!=null){_0x10dc8b=0x0;if(_0x1b7fa9){if(!_0x2c882b[_0x253fbb(0x1ed)])return _0x203455(_0x1b7fa9),await _0x59cb25(),null;const _0x120d1d=_0x551732(_0x2c882b,_0x1b7fa9,_0x353d90,{'upsert':_0x1538ce,'remove':_0x7bdc90}),_0x539008=_0x120d1d[_0x253fbb(0x148)]+_0x120d1d['changed']+_0x120d1d['removed'];_0x539008>0x0&&(_0x10dc8b+=_0x539008,await _0x59cb25());}return _0x3b2aad;}_0x203455(_0x1b7fa9??[]);if(_0x1589ee[_0x253fbb(0x1d7)]()>0x0)await _0x59cb25();return null;}async function _0x491f0c(){_0x4fa1ff=!![],await _0x373334(await _0x4e2215());}async function _0x350547(){const _0x7d666=_0x4eac58;if(!_0x4fa1ff)return;_0x4fa1ff=![],_0xf41a60(),_0x10dc8b=0x0;const _0x328d32=_0x2265b5['readCurrentId']()||_0x2265b5[_0x7d666(0x1a1)]();await _0x2f108f(_0x328d32),_0x344d08();}async function _0x2f108f(_0x500516){const _0x2b5eff=_0x4eac58;if(!_0x500516)return![];let _0xd86ef0=![];try{await _0x2265b5[_0x2b5eff(0x196)](_0x500516,async _0x5ae4db=>{const _0x3dd516=_0x2b5eff,_0x5621af=JSON[_0x3dd516(0x1a5)](_0x34fdf8['readFileSync'](_0x5ae4db[_0x3dd516(0x180)],_0x3dd516(0x1d1)));if(_0x5621af[_0x3dd516(0x14a)]!==_0x55cb33||_0x5621af[_0x3dd516(0x1cb)]!=='usearch'||_0x5621af[_0x3dd516(0x1dd)]!==_0x353d90||_0x5621af[_0x3dd516(0x1bb)]!==_0x3d096e[_0x3dd516(0x1bb)])return;const _0x4a8c02=new _0x1b8eaf();await _0x4a8c02['loadFrom'](_0x5ae4db[_0x3dd516(0x1aa)]);const _0x586b7d=_0x16ad58();_0x586b7d[_0x3dd516(0x1f5)](_0x5ae4db[_0x3dd516(0x20f)]),_0x1589ee=_0x586b7d,_0x2c882b=_0x4a8c02,_0x1ee4d9=_0x500516,_0xd86ef0=!![];});}catch{}return _0xd86ef0;}function _0x45a2e2(){const _0x90d16f=_0x4eac58,_0x4a5c77=Date[_0x90d16f(0x1d3)]();if(_0x4a5c77-_0x26a863<_0x3d096e[_0x90d16f(0x143)])return;_0x26a863=_0x4a5c77;if(_0x16d624)return;if(_0x4c44c7[_0x90d16f(0x1cf)]()){_0x16d624=!![],_0x152239(async()=>{const _0x5d96ec=_0x90d16f;!_0x4fa1ff&&_0x30625d&&_0x4c44c7[_0x5d96ec(0x1e0)]()&&(await _0x491f0c(),_0x344d08());})['catch'](()=>{})[_0x90d16f(0x20c)](()=>{_0x16d624=![];});return;}const _0x567491=_0x2265b5['readCurrentId']()||_0x2265b5[_0x90d16f(0x1a1)]();if(!_0x567491||_0x567491===_0x1ee4d9)return;_0x16d624=!![],_0x152239(async()=>{if(!_0x4fa1ff&&await _0x2f108f(_0x567491))_0x344d08();})[_0x90d16f(0x1e3)](()=>{})[_0x90d16f(0x20c)](()=>{_0x16d624=![];});}return{async 'load'(_0x2ba566){return _0x152239(async()=>{const _0x2adb2a=_0x3360;_0x2265b5['cleanupTmpDirs']({'maxAgeMs':_0x3d096e[_0x2adb2a(0x14b)]}),_0x232238=_0x2ba566??null,_0x4fa1ff=_0x4c44c7[_0x2adb2a(0x1e0)]();let _0x5097bc=null;if(_0x4fa1ff)_0x5097bc=await _0x373334(_0x2ba566?await _0x2ba566():null);else{const _0xbb28b=_0x2265b5['readCurrentId']()||_0x2265b5[_0x2adb2a(0x1a1)]();await _0x2f108f(_0xbb28b);}return _0x30625d=!![],_0x5097bc;});},async 'add'(_0x4b31de,_0x41fa76,_0x17c45c){return _0x152239(async()=>{const _0x1641a9=_0x3360;if(!_0x30625d)return;const _0x10e6b3=_0x506f22(_0x41fa76);if(!_0x4fa1ff){if(!_0x4c44c7[_0x1641a9(0x1e0)]())return;await _0x491f0c();}if(!_0x1589ee)return;const _0x1656f8=_0x600b9d(_0x10e6b3);if(_0x2c882b[_0x1641a9(0x1d2)](_0x4b31de)===_0x1656f8)return;_0x1538ce(_0x4b31de,_0x10e6b3,_0x1656f8),await _0x506b5d();});},async 'remove'(_0xd0521){return _0x152239(async()=>{const _0x40630a=_0x3360;if(!_0x30625d)return;if(!_0x4fa1ff){if(!_0x4c44c7[_0x40630a(0x1e0)]())return;await _0x491f0c();}if(!_0x1589ee)return;if(_0x7bdc90(_0xd0521))await _0x506b5d();});},'search'(_0x308c9b,{limit:limit=0xa}={}){const _0x46d4e1=_0x4eac58;if(!_0x4fa1ff&&_0x30625d)_0x45a2e2();if(!_0x1589ee)return[];const _0x1c0d6a=_0x1589ee[_0x46d4e1(0x1d7)]();if(_0x1c0d6a===0x0)return[];const _0x15bf2d=Math[_0x46d4e1(0x1be)](limit,_0x1c0d6a),_0x4625f9=_0x1589ee[_0x46d4e1(0x186)](_0x506f22(_0x308c9b),_0x15bf2d,0x0),_0x2c6acf=[],_0x5ccebc=_0x4625f9[_0x46d4e1(0x1f6)],_0xc370e2=_0x4625f9[_0x46d4e1(0x1ec)];for(let _0x2f613a=0x0;_0x2f613a<_0x5ccebc[_0x46d4e1(0x13e)];_0x2f613a++){const _0x32b79e=_0x5ccebc[_0x2f613a];if(_0x32b79e===0xffffffffffffffffn)continue;const _0x2452d0=Number(_0x32b79e),_0x1df56e=_0x2c882b[_0x46d4e1(0x15f)](_0x2452d0);if(!_0x1df56e)continue;const _0x397e38=_0xc370e2[_0x2f613a];let _0x2fdbeb;if(_0x3d096e[_0x46d4e1(0x1bb)]===_0x46d4e1(0x164))_0x2fdbeb=Math[_0x46d4e1(0x1fd)](0x0,0x1-_0x397e38);else{if(_0x3d096e[_0x46d4e1(0x1bb)]==='ip')_0x2fdbeb=-_0x397e38;else _0x2fdbeb=0x1/(0x1+_0x397e38);}_0x2c6acf['push']({'key':_0x1df56e,'score':_0x2fdbeb});}return _0x2c6acf;},async 'snapshot'(_0x1bc1c9){return _0x152239(()=>_0x4fa1ff?_0x59cb25(_0x1bc1c9??undefined):![]);},async 'rebuild'(_0x3fd021){return _0x152239(async()=>{if(_0x3fd021!=null)_0x232238=_0x3fd021;if(!_0x4fa1ff){if(!_0x4c44c7['acquire']())return;_0x4fa1ff=!![];}const _0x1d7ac2=_0x3fd021?await _0x3fd021():await _0x4e2215();_0x203455(_0x1d7ac2??[]),_0x30625d=!![],await _0x59cb25();});},async 'stop'(){return _0x152239(async()=>{const _0x2b6c8c=_0x3360;_0xf41a60();if(_0x4fa1ff){if(_0x10dc8b>0x0||!_0x2265b5[_0x2b6c8c(0x169)]())await _0x59cb25();_0x4c44c7['release']();}_0x4fa1ff=![],_0x30625d=![];});},'count'(){const _0x4f8c4c=_0x4eac58;return _0x2c882b[_0x4f8c4c(0x1d7)]();},'info'(){const _0x50d4d1=_0x4eac58;return{'algorithm':_0x50d4d1(0x1ea),'role':_0x4fa1ff?_0x50d4d1(0x1fe):_0x50d4d1(0x151),'metric':_0x3d096e['metric'],'connectivity':_0x3d096e[_0x50d4d1(0x18e)],'expansionAdd':_0x3d096e[_0x50d4d1(0x142)],'expansionSearch':_0x3d096e[_0x50d4d1(0x1a4)],'snapshotEveryChanges':_0x3d096e[_0x50d4d1(0x16c)],'snapshotMaxLagMs':_0x3d096e[_0x50d4d1(0x1da)],'count':_0x2c882b[_0x50d4d1(0x1d7)](),'size':_0x1589ee?.['size']?.()??0x0,'capacity':_0x1589ee?.[_0x50d4d1(0x17e)]?.()??0x0,'changesSince':_0x4fa1ff?_0x10dc8b:null,'viewedSnapshot':_0x1ee4d9??null,'snapshotDir':_0x148319,'latestSnapshot':_0x2265b5['readCurrentId']()??null};}};},usearch;}function _0x3360(_0x507d4c,_0x4efcc0){_0x507d4c=_0x507d4c-0x137;const _0xf898a6=_0xf898();let _0x336086=_0xf898a6[_0x507d4c];return _0x336086;}var hasRequiredAlgorithmWorkerThread;function _0xf898(){const _0x31d5a2=['state','Cos','then',').\x20','slice','_snapshotPaths','search','name','mtimeMs','efSearch','cleanupTmpDirs','\x20on\x20','changed','343425OUhjUb','connectivity','labels.json','trunc','hnsw\x20algorithm\x20requires\x20dims\x20>\x200','set','byteOffset','message','state.json','loadSnapshot','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','remove','maxElements','rmSync','fetchAll','index.hnsw','tombstone','prune','130yzmpmq','currentPath','latestSnapshotId','writeFileSync','ENOENT','expansionSearch','parse','lock_busy','growFactor','code','getCurrentCount','labels','_tombstoneCount','markDelete','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','addPoint','info','score','keepSnapshots','dir','hasRows','ceil','usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','snapshotsDir','isDirectory','heartbeatIntervalMs','host','tombstoneCount','metric','loadFrom','filter','min','WRITER.LOCK','usearch\x20algorithm\x20requires\x20dims\x20>\x200','stringify','labelToKey','unreadable','imul','repeat','closeSync','MetricKind','sync','14307jWvVMa','Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20','algorithm','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20','isInteger','nextLabel','isFree','cause','utf8','fingerprintOf','now','opts','keyToLabel','statSync','size','writerLockMaxAgeMs','snapshotTo','snapshotMaxLagMs','push','L2sq','dims','get','round','acquire','199972QJUfql','hostname','catch','removed','number','snapshot','labelForExisting','sort','stop','usearch','map','distances','hasFingerprints','memoryUsage','node','listSnapshotIds','[SnapshotStore]','1329691SCCBHz','token','clear','view','keys','readCurrentClock','entries','key','delete','vector','join','max','writer','version','log','getMaxElements','error','snapshots','2114hBOaMP','openSync','worker_threads','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','keyToFp','Original\x20error:\x20','postMessage','rebuild','finally','startsWith','HierarchicalNSW','index','299457guVLyq','unlinkSync','initIndex','isFinite','vectors','snapshot\x20incomplete:\x20','path','count','writeIndexSync','readIndexSync','length','fid','hasOwnProperty','setFingerprint','expansionAdd','viewRefreshMs','default','Index','_snapshotDir','setEf','added','clock','manifestVersion','tmpMaxAgeMs','4314REZsKz','F32','.tmp','for\x20Node\x20','HNSW_BINDINGS_UNAVAILABLE','reader','SnapshotStore\x20requires\x20dir','fetchAllResult','versions','prototype','randomBytes','USEARCH_BINDINGS_UNAVAILABLE','reset','from','readFileSync','321592UbeCpQ','warn','resolve','isArray','keyForLabel','buffer','hnsw','queryVec','load','cosine','hnswlib-node','add','.tmp-','sqrt','readCurrentId','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','stale','snapshotEveryChanges','pid','hex','existsSync','published','platform','trim','EEXIST','368xjBbaS','resizeIndex','lockPath','toString','readdirSync','88ZvsHIg','labelForEphemeral','publishSnapshot','efConstruction','exports','capacity','arch'];_0xf898=function(){return _0x31d5a2;};return _0xf898();}function requireAlgorithmWorkerThread(){const _0x5a9244=_0x411a8a;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x39657c,workerData:_0x2e9a2c}=require$$0$1,{algorithmName:_0x4d9990,algorithmConfig:_0x5d2978,dims:_0x47ab32,dir:_0x367ab9}=_0x2e9a2c;let _0x23ebfc=0x1;const _0x3dbc45=new Map();function _0x30f8ee(){const _0x4ca2da=_0x23ebfc++;return new Promise((_0x45cfd0,_0x2aa460)=>{const _0x5362fb=_0x3360;_0x3dbc45['set'](_0x4ca2da,{'resolve':_0x45cfd0,'reject':_0x2aa460}),_0x39657c[_0x5362fb(0x20a)]({'op':_0x5362fb(0x19b),'fid':_0x4ca2da});});}const _0x1e5994={'dims':_0x47ab32,'dir':_0x367ab9,'fetchAll':_0x30f8ee,'onChange':()=>_0x394040()};let _0x58ede8;if(_0x4d9990==='hnsw')_0x58ede8=requireHnsw()(_0x5d2978,_0x1e5994);else{if(_0x4d9990==='flat')_0x58ede8=requireFlat()(_0x5d2978,_0x1e5994);else{if(_0x4d9990==='usearch')_0x58ede8=requireUsearch()(_0x5d2978,_0x1e5994);else throw new Error('Unknown\x20algorithm:\x20\x22'+_0x4d9990+'\x22');}}function _0x394040(){const _0x2f47eb=_0x3360;try{_0x39657c[_0x2f47eb(0x20a)]({'op':_0x2f47eb(0x1c8),'count':_0x58ede8['count'](),'info':_0x58ede8['info'](),'memory':process[_0x2f47eb(0x1ee)]()});}catch{}}function _0x53cb3d(_0x2f8988){const _0x47e6a0=_0x3360;return(_0x2f8988||[])[_0x47e6a0(0x1eb)](_0x5c4ba4=>({'key':_0x5c4ba4[_0x47e6a0(0x1f9)],'vector':_0x5c4ba4[_0x47e6a0(0x1fb)]instanceof Float32Array?_0x5c4ba4[_0x47e6a0(0x1fb)]:new Float32Array(_0x5c4ba4[_0x47e6a0(0x1fb)])}));}return _0x39657c['on'](_0x5a9244(0x194),async _0x652f4b=>{const _0x4637a0=_0x5a9244;if(_0x652f4b['op']===_0x4637a0(0x153)){const _0x26d255=_0x3dbc45[_0x4637a0(0x1de)](_0x652f4b[_0x4637a0(0x13f)]);if(!_0x26d255)return;_0x3dbc45[_0x4637a0(0x1fa)](_0x652f4b[_0x4637a0(0x13f)]);if(_0x652f4b['error'])_0x26d255['reject'](new Error(_0x652f4b[_0x4637a0(0x202)]));else _0x26d255[_0x4637a0(0x15d)](_0x53cb3d(_0x652f4b[_0x4637a0(0x138)]));return;}const {id:_0x3f5885,op:_0x588d31,args:_0x354909}=_0x652f4b;try{let _0x16369b;switch(_0x588d31){case _0x4637a0(0x163):{_0x16369b=await _0x58ede8[_0x4637a0(0x163)](_0x354909[_0x4637a0(0x1b3)]?_0x30f8ee:null),_0x394040();break;}case _0x4637a0(0x166):{const _0x48cec9=_0x354909[_0x4637a0(0x1fb)]instanceof Float32Array?_0x354909['vector']:new Float32Array(_0x354909['vector']);await _0x58ede8[_0x4637a0(0x166)](_0x354909[_0x4637a0(0x1f9)],_0x48cec9,_0x354909[_0x4637a0(0x149)]??undefined),_0x394040(),_0x16369b=null;break;}case _0x4637a0(0x198):{await _0x58ede8[_0x4637a0(0x198)](_0x354909[_0x4637a0(0x1f9)]),_0x394040(),_0x16369b=null;break;}case'search':{const _0x14087a=_0x354909[_0x4637a0(0x162)]instanceof Float32Array?_0x354909[_0x4637a0(0x162)]:new Float32Array(_0x354909['queryVec']);_0x16369b=_0x58ede8[_0x4637a0(0x186)](_0x14087a,_0x354909[_0x4637a0(0x1d4)]||{});break;}case _0x4637a0(0x1e6):{_0x16369b=await _0x58ede8['snapshot'](_0x354909[_0x4637a0(0x149)]),_0x394040();break;}case'rebuild':{const _0x4ec9e3=_0x53cb3d(_0x354909[_0x4637a0(0x138)]);await _0x58ede8[_0x4637a0(0x20b)](async()=>_0x4ec9e3),_0x394040(),_0x16369b=null;break;}case _0x4637a0(0x1e9):{await _0x58ede8[_0x4637a0(0x1e9)](),_0x394040(),_0x16369b=null;break;}case'count':{_0x16369b=_0x58ede8[_0x4637a0(0x13b)]();break;}case _0x4637a0(0x1af):{_0x16369b=_0x58ede8[_0x4637a0(0x1af)]();break;}default:throw new Error('Unknown\x20op:\x20\x22'+_0x588d31+'\x22');}_0x39657c[_0x4637a0(0x20a)]({'id':_0x3f5885,'result':_0x16369b});}catch(_0x307a2d){_0x39657c[_0x4637a0(0x20a)]({'id':_0x3f5885,'error':{'message':_0x307a2d?.[_0x4637a0(0x194)]||String(_0x307a2d),'code':_0x307a2d?.[_0x4637a0(0x1a8)]}});}}),_0x39657c[_0x5a9244(0x20a)]({'op':'ready'}),algorithmWorkerThread$1;}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module[_0x411a8a(0x17d)]=algorithmWorkerThread;
|
|
1
|
+
'use strict';const _0x32915a=_0x2ae3;(function(_0x1df81f,_0x3ebcb9){const _0x41de4d=_0x2ae3,_0x451717=_0x1df81f();while(!![]){try{const _0x52d290=-parseInt(_0x41de4d(0x213))/0x1*(parseInt(_0x41de4d(0x20e))/0x2)+-parseInt(_0x41de4d(0x205))/0x3*(-parseInt(_0x41de4d(0x1ec))/0x4)+-parseInt(_0x41de4d(0x1dd))/0x5*(-parseInt(_0x41de4d(0x1e8))/0x6)+parseInt(_0x41de4d(0x1f2))/0x7+parseInt(_0x41de4d(0x15e))/0x8*(-parseInt(_0x41de4d(0x1ef))/0x9)+-parseInt(_0x41de4d(0x182))/0xa+parseInt(_0x41de4d(0x1f0))/0xb;if(_0x52d290===_0x3ebcb9)break;else _0x451717['push'](_0x451717['shift']());}catch(_0x3cf8b4){_0x451717['push'](_0x451717['shift']());}}}(_0x45b2,0x9696f));var require$$0$1=require('worker_threads'),require$$0=require('fs'),require$$1=require(_0x32915a(0x1d7)),require$$2=require('os'),require$$3=require(_0x32915a(0x184));function getDefaultExportFromCjs(_0x18e4fc){const _0x5b95c8=_0x32915a;return _0x18e4fc&&_0x18e4fc[_0x5b95c8(0x226)]&&Object[_0x5b95c8(0x1ee)]['hasOwnProperty'][_0x5b95c8(0x1db)](_0x18e4fc,'default')?_0x18e4fc['default']:_0x18e4fc;}var algorithmWorkerThread$1={},snapshotStore,hasRequiredSnapshotStore;function requireSnapshotStore(){const _0x548126=_0x32915a;if(hasRequiredSnapshotStore)return snapshotStore;hasRequiredSnapshotStore=0x1;const _0x1ed5eb=require$$0,_0x4920a1=require$$1,_0x245f8d=require$$2,_0x1eee95=require$$3;function _0x4a1110(){return Date['now']();}function _0x258fc3(_0x3c76af){try{return _0x1ed5eb['existsSync'](_0x3c76af);}catch{return![];}}function _0x718d27(_0x7659b6){const _0xf9e39f=_0x2ae3;try{return _0x1ed5eb[_0xf9e39f(0x1aa)](_0x7659b6,_0xf9e39f(0x1e7));}catch{return null;}}function _0x1ceb6a(_0x5d3a31,_0x3e1645){const _0x3abea1=_0x2ae3,_0x3a697f=_0x5d3a31+_0x3abea1(0x172)+_0x1eee95[_0x3abea1(0x1b8)](0x6)[_0x3abea1(0x1dc)]('hex');_0x1ed5eb[_0x3abea1(0x1e6)](_0x3a697f,_0x3e1645),_0x1ed5eb[_0x3abea1(0x1d1)](_0x3a697f,_0x5d3a31);}function _0x540748(_0x283935,_0x1238d3=0x10){const _0x2ff74d=_0x2ae3,_0x2e8055=String(Math[_0x2ff74d(0x1f3)](0x0,Math['trunc'](_0x283935||0x0)));return _0x2e8055['length']>=_0x1238d3?_0x2e8055:'0'[_0x2ff74d(0x1b4)](_0x1238d3-_0x2e8055[_0x2ff74d(0x220)])+_0x2e8055;}return snapshotStore=class _0xb17d2b{constructor({dir:_0x25ae81,keepSnapshots:keepSnapshots=0x3,log:log=null}={}){const _0x174605=_0x2ae3;if(!_0x25ae81)throw new Error('SnapshotStore\x20requires\x20dir');this[_0x174605(0x171)]=_0x25ae81,this['snapshotsDir']=_0x4920a1[_0x174605(0x1e9)](_0x25ae81,'snapshots'),this[_0x174605(0x1a3)]=_0x4920a1[_0x174605(0x1e9)](_0x25ae81,_0x174605(0x1fb)),this['lockPath']=_0x4920a1[_0x174605(0x1e9)](_0x25ae81,_0x174605(0x16d)),this[_0x174605(0x1f5)]=keepSnapshots,this[_0x174605(0x18e)]=log,_0x1ed5eb['mkdirSync'](this[_0x174605(0x171)],{'recursive':!![]}),_0x1ed5eb[_0x174605(0x203)](this[_0x174605(0x165)],{'recursive':!![]});}[_0x548126(0x1b0)](_0x184646){return _0x4920a1['join'](this['snapshotsDir'],_0x184646);}[_0x548126(0x212)](_0x596518){const _0x4507ea=_0x548126,_0x3e48f0=this[_0x4507ea(0x1b0)](_0x596518);return{'dir':_0x3e48f0,'index':_0x4920a1[_0x4507ea(0x1e9)](_0x3e48f0,_0x4507ea(0x17e)),'labels':_0x4920a1[_0x4507ea(0x1e9)](_0x3e48f0,'labels.json'),'state':_0x4920a1[_0x4507ea(0x1e9)](_0x3e48f0,_0x4507ea(0x187))};}[_0x548126(0x168)](){const _0x240ace=_0x548126;if(!_0x258fc3(this[_0x240ace(0x1a3)]))return null;const _0x5ad268=_0x718d27(this[_0x240ace(0x1a3)]);if(!_0x5ad268)return null;const _0x54bc46=String(_0x5ad268)['trim']();return _0x54bc46||null;}[_0x548126(0x217)](){const _0x46c819=_0x548126,_0x19c760=this[_0x46c819(0x168)]();if(!_0x19c760)return 0x0;const _0x4b5644=Number(_0x19c760);return Number[_0x46c819(0x1a0)](_0x4b5644)?_0x4b5644:0x0;}[_0x548126(0x21a)](){const _0xf3597b=_0x548126;try{return _0x1ed5eb[_0xf3597b(0x14d)](this[_0xf3597b(0x165)],{'withFileTypes':!![]})[_0xf3597b(0x1fd)](_0x2b38ce=>_0x2b38ce[_0xf3597b(0x1ab)]())[_0xf3597b(0x1c5)](_0x513e7b=>_0x513e7b[_0xf3597b(0x1c9)])[_0xf3597b(0x1fd)](_0x430e5e=>!_0x430e5e[_0xf3597b(0x189)](_0xf3597b(0x172)))[_0xf3597b(0x1fd)](_0x262422=>!_0x262422[_0xf3597b(0x189)](_0xf3597b(0x1e0)))[_0xf3597b(0x197)]();}catch{return[];}}['latestSnapshotId'](){const _0x4c3bc1=_0x548126,_0x5e3402=this['readCurrentId']();if(_0x5e3402)return _0x5e3402;const _0x52a6f0=this[_0x4c3bc1(0x21a)]();if(!_0x52a6f0[_0x4c3bc1(0x220)])return null;return _0x52a6f0[_0x52a6f0[_0x4c3bc1(0x220)]-0x1];}[_0x548126(0x209)]({maxAgeMs:maxAgeMs=0x6*0x36ee80}={}){const _0x56c5b5=_0x548126;let _0x4684cb;try{_0x4684cb=_0x1ed5eb[_0x56c5b5(0x14d)](this[_0x56c5b5(0x165)],{'withFileTypes':!![]});}catch{return;}const _0x447359=_0x4a1110()-maxAgeMs;for(const _0x2920d6 of _0x4684cb){if(!_0x2920d6[_0x56c5b5(0x1ab)]())continue;const _0x86aaba=_0x2920d6[_0x56c5b5(0x1c9)];if(!_0x86aaba[_0x56c5b5(0x189)](_0x56c5b5(0x172))&&!_0x86aaba['startsWith'](_0x56c5b5(0x1e0)))continue;const _0x151ea2=_0x4920a1[_0x56c5b5(0x1e9)](this['snapshotsDir'],_0x86aaba);try{const _0x1fea57=_0x1ed5eb[_0x56c5b5(0x21c)](_0x151ea2);if(_0x1fea57[_0x56c5b5(0x1c6)]>_0x447359)continue;}catch{}try{_0x1ed5eb[_0x56c5b5(0x198)](_0x151ea2,{'recursive':!![],'force':!![]});}catch{}}}[_0x548126(0x1d4)]({keep:keep=null}={}){const _0x15b35c=_0x548126,_0x19670e=Math['max'](0x1,Math[_0x15b35c(0x15d)](keep??this['keepSnapshots']??0x3)),_0x82d43c=this[_0x15b35c(0x21a)]();if(_0x82d43c[_0x15b35c(0x220)]<=_0x19670e)return;const _0x3dfd52=this[_0x15b35c(0x168)](),_0x39c399=_0x82d43c[_0x15b35c(0x166)](0x0,Math[_0x15b35c(0x1f3)](0x0,_0x82d43c[_0x15b35c(0x220)]-_0x19670e));for(const _0xdd249c of _0x39c399){if(_0x3dfd52&&_0xdd249c===_0x3dfd52)continue;const _0x2683f2=this[_0x15b35c(0x1b0)](_0xdd249c);try{_0x1ed5eb[_0x15b35c(0x198)](_0x2683f2,{'recursive':!![],'force':!![]});}catch{}}}async[_0x548126(0x17c)](_0x3927c2,_0x21045a){const _0x422f81=_0x548126;if(!_0x3927c2)throw new Error(_0x422f81(0x17a));const _0x24d778=this[_0x422f81(0x212)](_0x3927c2);if(!_0x258fc3(_0x24d778[_0x422f81(0x1de)])||!_0x258fc3(_0x24d778['labels'])||!_0x258fc3(_0x24d778[_0x422f81(0x188)]))throw new Error('snapshot\x20incomplete:\x20'+_0x3927c2);const _0x5bc28b=await _0x21045a(_0x24d778);return _0x5bc28b||{};}async['publishSnapshot'](_0xa201ff,_0x59c06a,{keep:keep=null,lockTimeoutMs:lockTimeoutMs=0x0,staleLockMaxAgeMs:staleLockMaxAgeMs=0xea60}={}){const _0x589530=_0x548126,_0x52106e=Number(_0xa201ff);if(!Number[_0x589530(0x1a0)](_0x52106e)||_0x52106e<0x0)throw new Error('candidateClock\x20must\x20be\x20finite\x20>=\x200');const _0x100918=_0x540748(_0x52106e),_0x1da536=this[_0x589530(0x1b0)](_0x100918),_0x13b842=_0x4920a1[_0x589530(0x1e9)](this[_0x589530(0x165)],_0x589530(0x172)+_0x100918+'-'+_0x1eee95[_0x589530(0x1b8)](0x6)[_0x589530(0x1dc)](_0x589530(0x216)));_0x1ed5eb[_0x589530(0x203)](_0x13b842,{'recursive':!![]});const _0xbab257={'dir':_0x13b842,'index':_0x4920a1[_0x589530(0x1e9)](_0x13b842,'index.hnsw'),'labels':_0x4920a1[_0x589530(0x1e9)](_0x13b842,_0x589530(0x1bd)),'state':_0x4920a1[_0x589530(0x1e9)](_0x13b842,_0x589530(0x187))};await _0x59c06a(_0xbab257,{'id':_0x100918,'clock':_0x52106e});const _0xbf6d05=JSON[_0x589530(0x18c)]({'pid':process[_0x589530(0x1c1)],'host':_0x245f8d[_0x589530(0x20b)](),'at':_0x4a1110()}),_0x34660f=_0x4a1110();let _0x7baf93=null;const _0x5117ce=()=>{const _0x3b8b19=_0x589530;try{const _0x107fae=JSON[_0x3b8b19(0x1ad)](_0x1ed5eb[_0x3b8b19(0x1aa)](this['lockPath'],'utf8'));if(_0x107fae['at']&&_0x4a1110()-_0x107fae['at']>staleLockMaxAgeMs){const _0x1fbf96=_0x4a1110()-_0x107fae['at'],_0x4f620e='Breaking\x20stale\x20snapshot\x20lock\x20(age:\x20'+Math[_0x3b8b19(0x158)](_0x1fbf96/0x3e8)+_0x3b8b19(0x1b7)+_0x107fae[_0x3b8b19(0x1c1)]+_0x3b8b19(0x194)+_0x107fae['host']+_0x3b8b19(0x185)+_0x3b8b19(0x207);this[_0x3b8b19(0x18e)]?.[_0x3b8b19(0x1f7)]?this['log'][_0x3b8b19(0x1f7)](_0x4f620e):console[_0x3b8b19(0x1f7)](_0x3b8b19(0x1f1),_0x4f620e);try{_0x1ed5eb['unlinkSync'](this['lockPath']);}catch{}return!![];}}catch{try{_0x1ed5eb[_0x3b8b19(0x1e4)](this[_0x3b8b19(0x191)]);}catch{}}return![];},_0x6cc1ae=()=>{const _0x5b8656=_0x589530;try{return _0x7baf93=_0x1ed5eb['openSync'](this[_0x5b8656(0x191)],'wx'),_0x1ed5eb['writeFileSync'](_0x7baf93,_0xbf6d05),!![];}catch(_0x3d3c6c){if(_0x3d3c6c&&_0x3d3c6c[_0x5b8656(0x1ba)]===_0x5b8656(0x21f))return![];throw _0x3d3c6c;}};if(!_0x6cc1ae()){_0x5117ce(),_0x6cc1ae();if(_0x7baf93==null&&lockTimeoutMs>0x0)while(_0x4a1110()-_0x34660f<lockTimeoutMs){await new Promise(_0x1c4cd4=>setTimeout(_0x1c4cd4,0x19));if(_0x6cc1ae())break;_0x5117ce();}}if(_0x7baf93==null){try{_0x1ed5eb['rmSync'](_0x13b842,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':'lock_busy'};}try{const _0x1f3c35=this['readCurrentClock']();if(_0x52106e<=_0x1f3c35){try{_0x1ed5eb[_0x589530(0x198)](_0x13b842,{'recursive':!![],'force':!![]});}catch{}return{'published':![],'reason':_0x589530(0x1df),'currentClock':_0x1f3c35};}if(!_0x258fc3(_0x1da536))_0x1ed5eb[_0x589530(0x1d1)](_0x13b842,_0x1da536);else try{_0x1ed5eb['rmSync'](_0x13b842,{'recursive':!![],'force':!![]});}catch{}return _0x1ceb6a(this[_0x589530(0x1a3)],_0x100918+'\x0a'),this[_0x589530(0x1d4)]({'keep':keep}),{'published':!![],'currentClock':_0x52106e};}finally{try{_0x1ed5eb[_0x589530(0x1d6)](_0x7baf93);}catch{}try{_0x1ed5eb['unlinkSync'](this[_0x589530(0x191)]);}catch{}}}},snapshotStore;}function _0x45b2(){const _0x3da40b=['mtimeMs','tombstone','isArray','name','reader','loadFrom','efConstruction','publishSnapshot','unreadable','Original\x20error:\x20','vectors','renameSync','MetricKind','imul','prune','get','closeSync','path','growFactor','efSearch','remove','call','toString','40905KgdwRb','index','stale','_tmp-','snapshotEveryChanges','metric','changed','unlinkSync','addPoint','writeFileSync','utf8','132YNefxC','join','usearch\x20algorithm\x20requires\x20dims\x20>\x200','vector','119108rudVqS','token','prototype','3159909WNaaMm','9421225NWXjSf','[SnapshotStore]','4660012eRqCKP','max','buffer','keepSnapshots','queryVec','warn','manifestVersion','fingerprintOf','reset','CURRENT','writer','filter','acquire','usearch','getMaxElements','finally','byteOffset','mkdirSync','exports','99DraHah','version','This\x20is\x20risky\x20on\x20slow\x20disks\x20or\x20overloaded\x20machines.\x20Consider\x20increasing\x20staleLockMaxAgeMs\x20if\x20this\x20happens\x20frequently.','F32','cleanupTmpDirs','key','hostname','labelForEphemeral','stop','994EGuEXQ','snapshotMaxLagMs','release','keys','_snapshotPaths','203TvBJbY','maxElements','initIndex','hex','readCurrentClock','tmpMaxAgeMs','.tmp','listSnapshotIds','clock','statSync','delete','labelToKey','EEXIST','length','published','arch','WRITER.LOCK','score','hasFingerprints','__esModule','expansionSearch','ceil','expansionAdd','readdirSync','catch','getCurrentCount','snapshotTo','message','USEARCH_BINDINGS_UNAVAILABLE','added','platform','hnsw','viewRefreshMs','sqrt','round','keyToLabel','heartbeatIntervalMs','latestSnapshotId','_tombstoneCount','trunc','24exclUt','setEf','cause','info','setFingerprint','labels','size','snapshotsDir','slice','resolve','readCurrentId','algorithm','rebuild','load','isFree','SNAPSHOT.LOCK','isInteger','node','keyForLabel','dir','.tmp-','save','tombstoneCount','dims','fid','count','HierarchicalNSW','nextLabel','snapshot\x20id\x20required','set','loadSnapshot','readIndexSync','index.hnsw','HNSW_BINDINGS_UNAVAILABLE','flat','cosine','9138050dSAoTg','existsSync','crypto',').\x20','error','state.json','state','startsWith','\x20on\x20','entries','stringify','Unknown\x20algorithm:\x20\x22','log','min','Index','lockPath','distances','HNSW\x20algorithm\x20unavailable:\x20the\x20native\x20\x22hnswlib-node\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20',',\x20host:\x20','fetchAllResult','searchKnn','sort','rmSync','removed','connectivity','Cos','postMessage','snapshot','push','L2sq','isFinite','now','clear','currentPath','unref','versions','Unknown\x20op:\x20\x22','from','keyToFp','hasRows','readFileSync','isDirectory','ENOENT','parse','usearch\x20algorithm\x20unavailable:\x20the\x20native\x20\x22usearch\x22\x20bindings\x20could\x20not\x20be\x20loaded\x20','has','_snapshotDir','opts','sync','view','repeat','then','labelForExisting','s,\x20pid:\x20','randomBytes','writerLockMaxAgeMs','code','openSync','search','labels.json','Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22\x20instead.\x20','hnsw\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage','ScalarKind','pid','ready','markDelete','add','map'];_0x45b2=function(){return _0x3da40b;};return _0x45b2();}var labelMap,hasRequiredLabelMap;function requireLabelMap(){const _0x17acc9=_0x32915a;if(hasRequiredLabelMap)return labelMap;hasRequiredLabelMap=0x1;const _0x360809=require$$0;class _0x2fb9fb{constructor(){const _0x5c28fc=_0x2ae3;this[_0x5c28fc(0x159)]=new Map(),this[_0x5c28fc(0x21e)]=new Map(),this['nextLabel']=0x0,this[_0x5c28fc(0x15c)]=0x0,this['keyToFp']=new Map(),this[_0x5c28fc(0x225)]=!![];}async['reset'](){const _0x44dc5d=_0x2ae3;this['keyToLabel']=new Map(),this['labelToKey']=new Map(),this['keyToFp']=new Map(),this[_0x44dc5d(0x225)]=!![],this[_0x44dc5d(0x179)]=0x0,this['_tombstoneCount']=0x0;}async[_0x17acc9(0x1cb)](_0x50249b){const _0x11da58=_0x17acc9;if(!_0x50249b||!_0x360809[_0x11da58(0x183)](_0x50249b))return await this['reset'](),!![];let _0x1b4c7b;try{_0x1b4c7b=_0x360809[_0x11da58(0x1aa)](_0x50249b,_0x11da58(0x1e7));}catch{return await this['reset'](),!![];}let _0x11c2ab;try{_0x11c2ab=JSON[_0x11da58(0x1ad)](_0x1b4c7b);}catch{return await this[_0x11da58(0x1fa)](),!![];}const _0x5d33b2=Array['isArray'](_0x11c2ab?.[_0x11da58(0x18b)])?_0x11c2ab['entries']:[],_0x3c6c0c=Number[_0x11da58(0x16e)](_0x11c2ab?.['nextLabel'])?_0x11c2ab[_0x11da58(0x179)]:0x0,_0x26b5cc=new Map(),_0x101884=new Map(),_0xc2d1ee=new Map(),_0x5acf4d=_0x11c2ab?.[_0x11da58(0x206)]>=0x2;let _0x27ef7e=-0x1;for(const _0x225090 of _0x5d33b2){if(!Array[_0x11da58(0x1c8)](_0x225090)||_0x225090['length']<0x2)continue;const _0x5f4124=Number(_0x225090[0x0]),_0x4714bb=String(_0x225090[0x1]??'');if(!Number[_0x11da58(0x16e)](_0x5f4124)||_0x5f4124<0x0)continue;if(!_0x4714bb)continue;_0x26b5cc[_0x11da58(0x17b)](_0x4714bb,_0x5f4124),_0x101884[_0x11da58(0x17b)](_0x5f4124,_0x4714bb);if(_0x5acf4d&&typeof _0x225090[0x2]==='number')_0xc2d1ee[_0x11da58(0x17b)](_0x4714bb,_0x225090[0x2]);if(_0x5f4124>_0x27ef7e)_0x27ef7e=_0x5f4124;}return this['keyToLabel']=_0x26b5cc,this['labelToKey']=_0x101884,this['keyToFp']=_0xc2d1ee,this[_0x11da58(0x225)]=_0x5acf4d,this[_0x11da58(0x179)]=Math[_0x11da58(0x1f3)](_0x3c6c0c,_0x27ef7e+0x1,0x0),this[_0x11da58(0x15c)]=0x0,!![];}[_0x17acc9(0x1b6)](_0x598f68){const _0x16021a=_0x17acc9;return this[_0x16021a(0x159)]['get'](_0x598f68);}['labelForEphemeral'](_0x8e8e81){const _0x24168b=_0x17acc9;let _0x3965cb=this[_0x24168b(0x159)]['get'](_0x8e8e81);if(_0x3965cb!==undefined)return _0x3965cb;return _0x3965cb=this['nextLabel']++,this[_0x24168b(0x159)][_0x24168b(0x17b)](_0x8e8e81,_0x3965cb),this[_0x24168b(0x21e)][_0x24168b(0x17b)](_0x3965cb,_0x8e8e81),_0x3965cb;}[_0x17acc9(0x162)](_0x354d3f,_0x7e954c){const _0x174b88=_0x17acc9;if(_0x7e954c==null)this[_0x174b88(0x1a8)][_0x174b88(0x21d)](_0x354d3f);else this[_0x174b88(0x1a8)]['set'](_0x354d3f,_0x7e954c);}[_0x17acc9(0x1f9)](_0x273804){const _0x59794a=_0x17acc9;return this['keyToFp'][_0x59794a(0x1d5)](_0x273804);}[_0x17acc9(0x211)](){const _0x3bdc3a=_0x17acc9;return this[_0x3bdc3a(0x159)][_0x3bdc3a(0x211)]();}[_0x17acc9(0x1c7)](_0x495b72){const _0x1a554d=_0x17acc9,_0x5b9dc7=this[_0x1a554d(0x159)][_0x1a554d(0x1d5)](_0x495b72);if(_0x5b9dc7===undefined)return;this[_0x1a554d(0x1a8)]['delete'](_0x495b72),this[_0x1a554d(0x159)][_0x1a554d(0x21d)](_0x495b72),this['labelToKey']['delete'](_0x5b9dc7),this['_tombstoneCount']++;}['keyForLabel'](_0x42de17){const _0x187518=_0x17acc9;return this['labelToKey'][_0x187518(0x1d5)](_0x42de17)??null;}[_0x17acc9(0x164)](){const _0x11a848=_0x17acc9;return this['keyToLabel'][_0x11a848(0x164)];}[_0x17acc9(0x174)](){const _0x1da980=_0x17acc9;return this[_0x1da980(0x15c)];}async[_0x17acc9(0x150)](_0x2a4d5e){const _0xde470d=_0x17acc9,_0x4da0a0=_0x2a4d5e+_0xde470d(0x219),_0x44e6f2=[];for(const [_0x32e9f7,_0x318bba]of this[_0xde470d(0x21e)]['entries']()){const _0x2c5ea9=this['keyToFp'][_0xde470d(0x1d5)](_0x318bba);_0x44e6f2['push'](_0x2c5ea9==null?[_0x32e9f7,_0x318bba]:[_0x32e9f7,_0x318bba,_0x2c5ea9]);}_0x44e6f2[_0xde470d(0x197)]((_0x5a450b,_0x2e6e7c)=>_0x5a450b[0x0]-_0x2e6e7c[0x0]);const _0x1ca6ee={'version':0x2,'nextLabel':this[_0xde470d(0x179)],'entries':_0x44e6f2};_0x360809['writeFileSync'](_0x4da0a0,JSON['stringify'](_0x1ca6ee)),_0x360809['renameSync'](_0x4da0a0,_0x2a4d5e);}}return labelMap=_0x2fb9fb,labelMap;}var indexConvergence,hasRequiredIndexConvergence;function requireIndexConvergence(){if(hasRequiredIndexConvergence)return indexConvergence;hasRequiredIndexConvergence=0x1;function _0x5a804f(_0x4d1333){const _0x41408c=_0x2ae3,_0x4416cc=new Uint32Array(_0x4d1333[_0x41408c(0x1f4)],_0x4d1333[_0x41408c(0x202)],_0x4d1333[_0x41408c(0x220)]);let _0x3dd85e=0x811c9dc5,_0x2e6cc0=0x9747b28c;for(let _0x1d24f3=0x0;_0x1d24f3<_0x4416cc[_0x41408c(0x220)];_0x1d24f3++){const _0x237df1=_0x4416cc[_0x1d24f3];_0x3dd85e=Math['imul'](_0x3dd85e^_0x237df1,0x1000193)>>>0x0;let _0x7b0e2f=Math[_0x41408c(0x1d3)](_0x237df1,0xcc9e2d51);_0x7b0e2f=_0x7b0e2f<<0xf|_0x7b0e2f>>>0x11,_0x2e6cc0=Math[_0x41408c(0x1d3)](_0x2e6cc0^Math[_0x41408c(0x1d3)](_0x7b0e2f,0x1b873593),0x5)+0xe6546b64,_0x2e6cc0>>>=0x0;}return _0x2e6cc0=Math[_0x41408c(0x1d3)](_0x2e6cc0^_0x2e6cc0>>>0x10,0x85ebca6b)>>>0x0,(_0x3dd85e>>>0x0)*0x100000+(_0x2e6cc0&0xfffff);}function _0x337c54(_0x5aac3b,_0x54c115,_0x4a0401,{upsert:_0x3bc055,remove:_0x10b731}){const _0x3c858e=_0x2ae3,_0x6491f3=new Set();let _0x1d78fd=0x0,_0x41b551=0x0,_0x590fa7=0x0;for(const {key:_0x5d4e39,vector:_0x1ccb57}of _0x54c115){if(!(_0x1ccb57 instanceof Float32Array)||_0x1ccb57[_0x3c858e(0x220)]!==_0x4a0401)continue;_0x6491f3['add'](_0x5d4e39);const _0xd574a0=_0x5a804f(_0x1ccb57),_0x6fac46=_0x5aac3b[_0x3c858e(0x1b6)](_0x5d4e39)!==undefined;if(_0x6fac46&&_0x5aac3b['fingerprintOf'](_0x5d4e39)===_0xd574a0)continue;_0x3bc055(_0x5d4e39,_0x1ccb57,_0xd574a0);if(_0x6fac46)_0x41b551++;else _0x1d78fd++;}for(const _0x225e10 of[..._0x5aac3b[_0x3c858e(0x211)]()]){if(_0x6491f3[_0x3c858e(0x1af)](_0x225e10))continue;_0x10b731(_0x225e10),_0x590fa7++;}return{'added':_0x1d78fd,'changed':_0x41b551,'removed':_0x590fa7};}return indexConvergence={'fingerprint':_0x5a804f,'reconcileIndex':_0x337c54},indexConvergence;}var hnsw,hasRequiredHnsw;function requireHnsw(){if(hasRequiredHnsw)return hnsw;hasRequiredHnsw=0x1;const _0x53101e=requireSnapshotStore(),_0x279357=requireLabelMap(),{fingerprint:_0x27d122,reconcileIndex:_0x5df7d9}=requireIndexConvergence(),_0x5e55ff=0x1;let _0x1dc935=null;function _0x4ffab2(){const _0x4fc9f4=_0x2ae3;if(_0x1dc935)return _0x1dc935;try{return _0x1dc935=require('hnswlib-node'),_0x1dc935;}catch(_0x15fc06){const _0x944bcb=new Error(_0x4fc9f4(0x193)+('for\x20Node\x20'+process['versions'][_0x4fc9f4(0x16f)]+'\x20on\x20'+process[_0x4fc9f4(0x154)]+'/'+process['arch']+'.\x20')+_0x4fc9f4(0x1be)+(_0x4fc9f4(0x1cf)+(_0x15fc06?.[_0x4fc9f4(0x151)]||String(_0x15fc06))));_0x944bcb[_0x4fc9f4(0x1ba)]=_0x4fc9f4(0x17f),_0x944bcb[_0x4fc9f4(0x160)]=_0x15fc06;throw _0x944bcb;}}return hnsw=function _0x2ec8e6(_0x125cb8={},{dims:_0x426e9c,dir:_0x1756b2}){const _0x3c51e6=_0x2ae3,_0x178c4d=_0x4ffab2();if(!_0x426e9c||_0x426e9c<=0x0)throw new Error('hnsw\x20algorithm\x20requires\x20dims\x20>\x200');if(!_0x1756b2)throw new Error(_0x3c51e6(0x1bf));const _0x8200e5={'metric':_0x125cb8[_0x3c51e6(0x1e2)]??_0x3c51e6(0x181),'M':_0x125cb8['M']??0x10,'efConstruction':_0x125cb8[_0x3c51e6(0x1cc)]??0xc8,'efSearch':_0x125cb8[_0x3c51e6(0x1d9)]??0x40,'maxElements':_0x125cb8[_0x3c51e6(0x214)]??0x400,'growFactor':_0x125cb8[_0x3c51e6(0x1d8)]??0x2,'snapshotEveryChanges':_0x125cb8['snapshotEveryChanges']??0xc350,'keepSnapshots':_0x125cb8['keepSnapshots']??0x2,'tmpMaxAgeMs':_0x125cb8[_0x3c51e6(0x218)]??0x6*0x36ee80},_0x2231b5=new _0x53101e({'dir':_0x1756b2,'keepSnapshots':_0x8200e5[_0x3c51e6(0x1f5)]}),_0x4c605f=new _0x279357();let _0x1f3350=null,_0x1efaaa=0x0,_0x5d6ce4=null,_0x4908a1=Promise[_0x3c51e6(0x167)]();const _0x3e9f4f=_0x53514e=>{const _0x56fe34=_0x3c51e6,_0x2c20f9=_0x4908a1[_0x56fe34(0x1b5)](_0x53514e);return _0x4908a1=_0x2c20f9[_0x56fe34(0x14e)](()=>{}),_0x2c20f9;};async function _0x494d2d(_0x229e1c){const _0x15d26d=_0x3c51e6;await _0x4c605f['reset'](),_0x229e1c=_0x229e1c??[];const _0xd56b3=Math['max'](_0x8200e5['maxElements'],Math[_0x15d26d(0x14b)](_0x229e1c[_0x15d26d(0x220)]*(_0x8200e5[_0x15d26d(0x1d8)]||1.2)),0x1);_0x1f3350=new _0x178c4d[(_0x15d26d(0x178))](_0x8200e5[_0x15d26d(0x1e2)],_0x426e9c),_0x1f3350[_0x15d26d(0x215)]({'maxElements':_0xd56b3,'efConstruction':_0x8200e5[_0x15d26d(0x1cc)],'M':_0x8200e5['M']});for(const {key:_0x288827,vector:_0x1006ff}of _0x229e1c){if(!(_0x1006ff instanceof Float32Array)||_0x1006ff[_0x15d26d(0x220)]!==_0x426e9c)continue;_0x38664a(_0x288827,_0x1006ff);}_0x1f3350[_0x15d26d(0x15f)](_0x8200e5[_0x15d26d(0x1d9)]),_0x1efaaa=0x0;}async function _0x2427ce(_0x1a3ebd){return _0x494d2d(_0x1a3ebd?await _0x1a3ebd():[]);}function _0x902404(){const _0x622bd2=_0x3c51e6;if(_0x1f3350['getCurrentCount']()<_0x1f3350['getMaxElements']())return;const _0x9e64c=Math['ceil'](_0x1f3350[_0x622bd2(0x200)]()*(_0x8200e5[_0x622bd2(0x1d8)]||0x2));_0x1f3350['resizeIndex'](_0x9e64c),_0x8200e5[_0x622bd2(0x214)]=_0x9e64c;}function _0x38664a(_0x383195,_0x580eed,_0x13dd4c){const _0x22dedd=_0x3c51e6,_0x5c89c1=_0x4c605f[_0x22dedd(0x20c)](_0x383195);try{_0x1f3350[_0x22dedd(0x1c3)](_0x5c89c1);}catch{}_0x902404(),_0x1f3350[_0x22dedd(0x1e5)](Array[_0x22dedd(0x1a7)](_0x580eed),_0x5c89c1),_0x4c605f['setFingerprint'](_0x383195,_0x13dd4c??_0x27d122(_0x580eed));}function _0x78e5f8(_0x4c916d){const _0x22d756=_0x3c51e6,_0x2c9185=_0x4c605f[_0x22d756(0x1b6)](_0x4c916d);if(_0x2c9185===undefined)return![];try{_0x1f3350[_0x22d756(0x1c3)](_0x2c9185);}catch{}return _0x4c605f[_0x22d756(0x1c7)](_0x4c916d),!![];}function _0x47d220(){const _0x2ce7db=_0x3c51e6;return Math[_0x2ce7db(0x1f3)](Date[_0x2ce7db(0x1a1)](),_0x2231b5['readCurrentClock']()+0x1);}async function _0x41d1ec(_0x1a75fb){const _0x5bf9a4=_0x3c51e6;if(!_0x1f3350||!_0x1a75fb)return![];const _0x37a5c5=await _0x2231b5[_0x5bf9a4(0x1cd)](_0x1a75fb,async _0x3f4c6b=>{const _0x1f5e8e=_0x5bf9a4;_0x1f3350['writeIndexSync'](_0x3f4c6b[_0x1f5e8e(0x1de)]),await _0x4c605f[_0x1f5e8e(0x150)](_0x3f4c6b['labels']);const _0x1444e7=require$$0;_0x1444e7[_0x1f5e8e(0x1e6)](_0x3f4c6b[_0x1f5e8e(0x188)],JSON['stringify']({'manifestVersion':_0x5e55ff,'dims':_0x426e9c,'metric':_0x8200e5[_0x1f5e8e(0x1e2)],'clock':_0x1a75fb,'snapshotAt':Date[_0x1f5e8e(0x1a1)]()},null,0x2));},{'keep':_0x8200e5[_0x5bf9a4(0x1f5)]});if(_0x37a5c5?.[_0x5bf9a4(0x221)])_0x1efaaa=0x0;return _0x37a5c5?.[_0x5bf9a4(0x221)]??![];}async function _0x35c75d(){const _0x4043e7=_0x3c51e6,_0x3eeb7=_0x2231b5[_0x4043e7(0x168)]()||_0x2231b5[_0x4043e7(0x15b)]();if(!_0x3eeb7)return null;let _0x548a18,_0x5487ab=![];return await _0x2231b5['loadSnapshot'](_0x3eeb7,async _0x5b510b=>{const _0x8663b4=_0x4043e7,_0x79508a=require$$0;_0x548a18=JSON[_0x8663b4(0x1ad)](_0x79508a[_0x8663b4(0x1aa)](_0x5b510b[_0x8663b4(0x188)],'utf8'));if(_0x548a18[_0x8663b4(0x1f8)]!==_0x5e55ff||_0x548a18['dims']!==_0x426e9c||_0x548a18[_0x8663b4(0x1e2)]!==_0x8200e5[_0x8663b4(0x1e2)]){_0x548a18=null;return;}await _0x4c605f['loadFrom'](_0x5b510b[_0x8663b4(0x163)]),_0x1f3350=new _0x178c4d[(_0x8663b4(0x178))](_0x8200e5['metric'],_0x426e9c),_0x1f3350[_0x8663b4(0x17d)](_0x5b510b[_0x8663b4(0x1de)]),_0x1f3350['setEf'](_0x8200e5[_0x8663b4(0x1d9)]),_0x5487ab=!![];}),_0x5487ab?_0x548a18?.[_0x4043e7(0x21b)]??0x0:null;}return{async 'load'(_0xfc1a92){return _0x3e9f4f(async()=>{const _0x4c7da7=_0x2ae3;_0x2231b5[_0x4c7da7(0x209)]({'maxAgeMs':_0x8200e5[_0x4c7da7(0x218)]}),_0x5d6ce4=_0xfc1a92??null;const _0x1a4887=await _0x35c75d(),_0x3c5eb1=_0xfc1a92?await _0xfc1a92():null;if(_0x1a4887!=null){if(_0x3c5eb1){if(!_0x4c605f[_0x4c7da7(0x225)])return await _0x494d2d(_0x3c5eb1),null;const _0x4202ad=_0x5df7d9(_0x4c605f,_0x3c5eb1,_0x426e9c,{'upsert':_0x38664a,'remove':_0x78e5f8});_0x1efaaa+=_0x4202ad['added']+_0x4202ad[_0x4c7da7(0x1e3)]+_0x4202ad[_0x4c7da7(0x199)];}return _0x1a4887;}return await _0x494d2d(_0x3c5eb1),null;});},async 'add'(_0x7dfe03,_0x2aaecb,_0x3b0aab){return _0x3e9f4f(async()=>{const _0x1c7b8c=_0x2ae3;if(!_0x1f3350)return;const _0x7e0b6b=_0x2aaecb instanceof Float32Array?_0x2aaecb:new Float32Array(_0x2aaecb),_0x47535e=_0x27d122(_0x7e0b6b);if(_0x4c605f[_0x1c7b8c(0x1f9)](_0x7dfe03)===_0x47535e)return;_0x38664a(_0x7dfe03,_0x7e0b6b,_0x47535e),_0x1efaaa++,_0x1efaaa>=_0x8200e5['snapshotEveryChanges']&&await _0x41d1ec(_0x47d220());});},async 'remove'(_0x2f7eba){return _0x3e9f4f(async()=>{if(!_0x1f3350)return;if(_0x78e5f8(_0x2f7eba))_0x1efaaa++;});},'search'(_0x537d8e,{limit:limit=0xa,efSearch:_0x4e8e6b}={}){const _0xfc0c53=_0x3c51e6;if(!_0x1f3350)return[];if(Number[_0xfc0c53(0x16e)](_0x4e8e6b))_0x1f3350[_0xfc0c53(0x15f)](_0x4e8e6b);const _0x14ea70=Math[_0xfc0c53(0x18f)](limit,_0x1f3350[_0xfc0c53(0x14f)]()||0x1),{neighbors:_0x5c66c2,distances:_0x4bfe06}=_0x1f3350[_0xfc0c53(0x196)](Array[_0xfc0c53(0x1a7)](_0x537d8e),_0x14ea70),_0x3c9568=[];for(let _0x260286=0x0;_0x260286<_0x5c66c2[_0xfc0c53(0x220)];_0x260286++){const _0x572dab=_0x4c605f[_0xfc0c53(0x170)](_0x5c66c2[_0x260286]);if(!_0x572dab)continue;const _0x53ae12=_0x8200e5['metric']==='cosine'?Math[_0xfc0c53(0x1f3)](0x0,0x1-_0x4bfe06[_0x260286]):0x1/(0x1+_0x4bfe06[_0x260286]);_0x3c9568[_0xfc0c53(0x19e)]({'key':_0x572dab,'score':_0x53ae12});}return _0x3c9568;},async 'snapshot'(_0x336c5d){return _0x3e9f4f(()=>_0x41d1ec(_0x336c5d??_0x47d220()));},async 'rebuild'(_0x544a45){return _0x3e9f4f(()=>{if(_0x544a45!=null)_0x5d6ce4=_0x544a45;return _0x2427ce(_0x544a45??_0x5d6ce4);});},async 'stop'(){return _0x3e9f4f(()=>_0x1efaaa>0x0||!_0x2231b5['readCurrentId']()?_0x41d1ec(_0x47d220()):![]);},'count'(){const _0x22388f=_0x3c51e6;return _0x4c605f[_0x22388f(0x164)]();},'info'(){const _0x1de7b4=_0x3c51e6;return{'algorithm':_0x1de7b4(0x155),'metric':_0x8200e5[_0x1de7b4(0x1e2)],'M':_0x8200e5['M'],'efConstruction':_0x8200e5[_0x1de7b4(0x1cc)],'efSearch':_0x8200e5['efSearch'],'maxElements':_0x1f3350?.[_0x1de7b4(0x200)]()??_0x8200e5[_0x1de7b4(0x214)],'count':_0x4c605f[_0x1de7b4(0x164)](),'changesSince':_0x1efaaa,'snapshotDir':_0x1756b2,'latestSnapshot':_0x2231b5[_0x1de7b4(0x168)]()??null};}};},hnsw;}var flat,hasRequiredFlat;function _0x2ae3(_0x20a140,_0x36cdf4){_0x20a140=_0x20a140-0x14b;const _0x45b2bb=_0x45b2();let _0x2ae303=_0x45b2bb[_0x20a140];return _0x2ae303;}function requireFlat(){if(hasRequiredFlat)return flat;hasRequiredFlat=0x1,flat=function _0x23b635(_0x46f692={}){const _0x1c85d6=new Map();return{async 'load'(_0xbc5441){const _0x4f6f2e=_0x2ae3;_0x1c85d6[_0x4f6f2e(0x1a2)]();if(_0xbc5441)for(const {key:_0x9c0e61,vector:_0x44e736}of await _0xbc5441()){_0x1c85d6['set'](_0x9c0e61,_0x44e736);}},async 'add'(_0x5cdfdc,_0x4248f0,_0x3b90ce){_0x1c85d6['set'](_0x5cdfdc,_0x4248f0);},async 'remove'(_0x3cbbfa){const _0x5a5d0f=_0x2ae3;_0x1c85d6[_0x5a5d0f(0x21d)](_0x3cbbfa);},'search'(_0x310c00,{limit:limit=0xa,threshold:threshold=0x0}={}){const _0x333a7e=_0x2ae3,_0x1550c2=[];for(const [_0x3e83a1,_0xa0b248]of _0x1c85d6){const _0xfae984=_0x19c989(_0x310c00,_0xa0b248);if(_0xfae984>=threshold)_0x1550c2[_0x333a7e(0x19e)]({'key':_0x3e83a1,'score':_0xfae984});}return _0x1550c2[_0x333a7e(0x197)]((_0x7a0ca1,_0x443dbc)=>_0x443dbc['score']-_0x7a0ca1[_0x333a7e(0x224)]),_0x1550c2[_0x333a7e(0x166)](0x0,limit);},async 'snapshot'(){return![];},async 'rebuild'(_0xeb912b){const _0x5c4c4b=_0x2ae3;await this[_0x5c4c4b(0x16b)](_0xeb912b);},async 'stop'(){},'count'(){return _0x1c85d6['size'];},'info'(){const _0x545930=_0x2ae3;return{'algorithm':_0x545930(0x180),'count':_0x1c85d6[_0x545930(0x164)]};}};};function _0x19c989(_0x5abefc,_0x7160bc){const _0x53305f=_0x2ae3;let _0x46b7bb=0x0,_0x586a7d=0x0,_0x258e0b=0x0;for(let _0x47661f=0x0;_0x47661f<_0x5abefc[_0x53305f(0x220)];_0x47661f++){_0x46b7bb+=_0x5abefc[_0x47661f]*_0x7160bc[_0x47661f],_0x586a7d+=_0x5abefc[_0x47661f]*_0x5abefc[_0x47661f],_0x258e0b+=_0x7160bc[_0x47661f]*_0x7160bc[_0x47661f];}const _0x10699e=Math[_0x53305f(0x157)](_0x586a7d)*Math[_0x53305f(0x157)](_0x258e0b);return _0x10699e===0x0?0x0:_0x46b7bb/_0x10699e;}return flat;}var writerLock,hasRequiredWriterLock;function requireWriterLock(){if(hasRequiredWriterLock)return writerLock;hasRequiredWriterLock=0x1;const _0x116da4=require$$0,_0x364306=require$$1,_0x3a86ca=require$$3;return writerLock=function _0x29b072(_0xf21bfb,{maxAgeMs:maxAgeMs=0x3a98,heartbeatMs:heartbeatMs=0x1388,onLost:onLost=null}={}){const _0x4700c0=_0x2ae3,_0x59bebb=_0x364306['join'](_0xf21bfb,_0x4700c0(0x223)),_0x9f1274=_0x3a86ca[_0x4700c0(0x1b8)](0x8)['toString'](_0x4700c0(0x216));let _0x49550f=![],_0x2f4384=null;const _0x32d6ef=()=>JSON[_0x4700c0(0x18c)]({'pid':process[_0x4700c0(0x1c1)],'token':_0x9f1274,'at':Date[_0x4700c0(0x1a1)]()});function _0x1f671a(){const _0x2729a1=_0x4700c0;try{return JSON[_0x2729a1(0x1ad)](_0x116da4[_0x2729a1(0x1aa)](_0x59bebb,'utf8'));}catch(_0x1e4aa3){return _0x1e4aa3?.[_0x2729a1(0x1ba)]===_0x2729a1(0x1ac)?null:{'unreadable':!![]};}}function _0x955afd(){const _0x383ff4=_0x4700c0;try{const _0x15f9e0=_0x116da4[_0x383ff4(0x1bb)](_0x59bebb,'wx');try{_0x116da4[_0x383ff4(0x1e6)](_0x15f9e0,_0x32d6ef());}finally{_0x116da4[_0x383ff4(0x1d6)](_0x15f9e0);}return!![];}catch(_0x58550a){if(_0x58550a?.[_0x383ff4(0x1ba)]===_0x383ff4(0x21f))return![];throw _0x58550a;}}function _0x25d031(_0x2d771f){const _0x56add3=_0x4700c0;if(!_0x2d771f)return!![];if(_0x2d771f[_0x56add3(0x1ce)])return!![];return Date[_0x56add3(0x1a1)]()-(_0x2d771f['at']??0x0)>=maxAgeMs;}function _0x3342f4(){if(_0x2f4384)clearInterval(_0x2f4384);_0x2f4384=null;}function _0x39e34f(){const _0x45a533=_0x4700c0;_0x3342f4(),_0x2f4384=setInterval(()=>{const _0x25230c=_0x2ae3,_0x5958e4=_0x1f671a();if(_0x5958e4&&!_0x5958e4[_0x25230c(0x1ce)]&&_0x5958e4[_0x25230c(0x1ed)]!==_0x9f1274){_0x49550f=![],_0x3342f4();try{onLost?.();}catch{}return;}try{_0x116da4[_0x25230c(0x1e6)](_0x59bebb,_0x32d6ef());}catch{}},heartbeatMs),_0x2f4384[_0x45a533(0x1a4)]?.();}function _0x167835(){const _0x365dc5=_0x4700c0,_0x4d363b=_0x1f671a();return!!_0x4d363b&&_0x4d363b[_0x365dc5(0x1ed)]===_0x9f1274;}return{'path':_0x59bebb,'token':_0x9f1274,'acquire'(){const _0x3c772e=_0x4700c0,_0x1214af=_0x1f671a();if(_0x1214af&&_0x1214af[_0x3c772e(0x1ed)]===_0x9f1274){_0x49550f=!![];if(!_0x2f4384)_0x39e34f();return!![];}let _0x34b409=_0x955afd();if(!_0x34b409&&_0x25d031(_0x1f671a())){try{_0x116da4[_0x3c772e(0x1e4)](_0x59bebb);}catch{}_0x34b409=_0x955afd();}if(_0x34b409&&!_0x167835())_0x34b409=![];_0x49550f=_0x34b409;if(_0x34b409)_0x39e34f();return _0x34b409;},'held'(){return _0x49550f;},'isFree'(){const _0x3a8795=_0x1f671a();if(_0x3a8795&&_0x3a8795['token']===_0x9f1274)return![];return _0x25d031(_0x3a8795);},'release'(){const _0x541f36=_0x4700c0;_0x3342f4();if(!_0x49550f)return;_0x49550f=![];if(_0x167835())try{_0x116da4[_0x541f36(0x1e4)](_0x59bebb);}catch{}}};},writerLock;}var usearch,hasRequiredUsearch;function requireUsearch(){if(hasRequiredUsearch)return usearch;hasRequiredUsearch=0x1;const _0x5a43de=require$$0,_0x2a16a7=requireSnapshotStore(),_0x523c2e=requireLabelMap(),_0x1c0792=requireWriterLock(),{fingerprint:_0x3ede1e,reconcileIndex:_0x191cf8}=requireIndexConvergence(),_0x559b58=0x1;let _0xfe5fb3=null;function _0x1cd05b(){const _0x3863c7=_0x2ae3;if(_0xfe5fb3)return _0xfe5fb3;try{return _0xfe5fb3=require(_0x3863c7(0x1ff)),_0xfe5fb3;}catch(_0x23cb08){const _0x5c92eb=new Error(_0x3863c7(0x1ae)+('for\x20Node\x20'+process[_0x3863c7(0x1a5)]['node']+_0x3863c7(0x18a)+process[_0x3863c7(0x154)]+'/'+process[_0x3863c7(0x222)]+'.\x20')+'Install\x20compatible\x20bindings\x20or\x20use\x20algorithm\x20\x22flat\x22/\x22hnsw\x22\x20instead.\x20'+(_0x3863c7(0x1cf)+(_0x23cb08?.[_0x3863c7(0x151)]||String(_0x23cb08))));_0x5c92eb[_0x3863c7(0x1ba)]=_0x3863c7(0x152),_0x5c92eb['cause']=_0x23cb08;throw _0x5c92eb;}}function _0x13bb08(_0x28ede8,_0xaec556){const _0x3ca4b4=_0x2ae3;switch(_0x28ede8){case _0x3ca4b4(0x181):return _0xaec556[_0x3ca4b4(0x1d2)][_0x3ca4b4(0x19b)];case'l2':return _0xaec556[_0x3ca4b4(0x1d2)][_0x3ca4b4(0x19f)];case'ip':return _0xaec556[_0x3ca4b4(0x1d2)]['IP'];default:return _0xaec556[_0x3ca4b4(0x1d2)][_0x3ca4b4(0x19b)];}}return usearch=function _0x457858(_0x1116ff={},{dims:_0x2e7d8f,dir:_0xa7b5e7,fetchAll:fetchAll=null,onChange:onChange=null}={}){const _0x1a2e9f=_0x2ae3,_0x4851ee=_0x1cd05b();if(!_0x2e7d8f||_0x2e7d8f<=0x0)throw new Error(_0x1a2e9f(0x1ea));if(!_0xa7b5e7)throw new Error('usearch\x20algorithm\x20requires\x20dir\x20for\x20snapshot\x20storage');const _0x463dff={'metric':_0x1116ff[_0x1a2e9f(0x1e2)]??_0x1a2e9f(0x181),'connectivity':_0x1116ff[_0x1a2e9f(0x19a)]??0x10,'expansionAdd':_0x1116ff['expansionAdd']??0x80,'expansionSearch':_0x1116ff[_0x1a2e9f(0x227)]??0x40,'snapshotEveryChanges':_0x1116ff['snapshotEveryChanges']??0xc350,'snapshotMaxLagMs':_0x1116ff[_0x1a2e9f(0x20f)]??0x2710,'keepSnapshots':_0x1116ff[_0x1a2e9f(0x1f5)]??0x2,'tmpMaxAgeMs':_0x1116ff[_0x1a2e9f(0x218)]??0x6*0x36ee80,'heartbeatIntervalMs':_0x1116ff['heartbeatIntervalMs']??0x1388,'writerLockMaxAgeMs':_0x1116ff[_0x1a2e9f(0x1b9)]??0x3a98,'viewRefreshMs':_0x1116ff[_0x1a2e9f(0x156)]??0x3e8},_0x57ab0b=new _0x2a16a7({'dir':_0xa7b5e7,'keepSnapshots':_0x463dff[_0x1a2e9f(0x1f5)]}),_0x5c3b98=_0x1c0792(_0xa7b5e7,{'maxAgeMs':_0x463dff[_0x1a2e9f(0x1b9)],'heartbeatMs':_0x463dff[_0x1a2e9f(0x15a)],'onLost':()=>{_0x547400(_0x10cf55)['catch'](()=>{});}});let _0x5f53c0=new _0x523c2e(),_0x386485=null,_0x1f36f3=0x0,_0x46522c=null,_0x759f25=![],_0x552ccc=![],_0x5d2ce8=null,_0x79d82f=0x0,_0x3575fc=null,_0x2902cf=0x0,_0x1286f5=![],_0x428ddf=Promise[_0x1a2e9f(0x167)]();const _0x547400=_0x49cc14=>{const _0x357178=_0x1a2e9f,_0x553ca=_0x428ddf[_0x357178(0x1b5)](_0x49cc14);return _0x428ddf=_0x553ca[_0x357178(0x14e)](()=>{}),_0x553ca;},_0x2f6144=()=>{try{onChange?.();}catch{}};function _0x259fd7(){const _0x546b78=_0x1a2e9f;return new _0x4851ee[(_0x546b78(0x190))]({'dimensions':_0x2e7d8f,'metric':_0x13bb08(_0x463dff[_0x546b78(0x1e2)],_0x4851ee),'quantization':_0x4851ee[_0x546b78(0x1c0)][_0x546b78(0x208)],'connectivity':_0x463dff[_0x546b78(0x19a)],'expansion_add':_0x463dff[_0x546b78(0x14c)],'expansion_search':_0x463dff['expansionSearch'],'multi':![]});}function _0x347006(_0x403957){return _0x403957 instanceof Float32Array?_0x403957:new Float32Array(_0x403957);}function _0x22e641(){const _0x1591eb=_0x1a2e9f;if(fetchAll)return fetchAll();if(_0x46522c)return _0x46522c();return Promise[_0x1591eb(0x167)](null);}function _0x2e200b(_0xa882d0,_0x49f550,_0x47ce42){const _0x4175d9=_0x1a2e9f,_0x379bf6=_0x5f53c0['labelForExisting'](_0xa882d0);if(_0x379bf6!==undefined)try{_0x386485[_0x4175d9(0x1da)](BigInt(_0x379bf6));}catch{}const _0x5e7ccd=_0x5f53c0[_0x4175d9(0x20c)](_0xa882d0);_0x386485[_0x4175d9(0x1c4)](BigInt(_0x5e7ccd),_0x49f550),_0x5f53c0[_0x4175d9(0x162)](_0xa882d0,_0x47ce42??_0x3ede1e(_0x49f550));}function _0x2607fe(_0x4c51e9){const _0x5a0cf5=_0x1a2e9f,_0x3bb70f=_0x5f53c0['labelForExisting'](_0x4c51e9);if(_0x3bb70f===undefined)return![];try{_0x386485[_0x5a0cf5(0x1da)](BigInt(_0x3bb70f));}catch{}return _0x5f53c0[_0x5a0cf5(0x1c7)](_0x4c51e9),!![];}function _0x14b688(_0x237bb2){_0x5f53c0=new _0x523c2e(),_0x386485=_0x259fd7();for(const {key:_0xb9ba2e,vector:_0x454c67}of _0x237bb2??[]){if(!(_0x454c67 instanceof Float32Array)||_0x454c67['length']!==_0x2e7d8f)continue;_0x2e200b(_0xb9ba2e,_0x454c67);}_0x1f36f3=0x0;}function _0xdb7604(){const _0x3fbae1=_0x1a2e9f;return Math[_0x3fbae1(0x1f3)](Date[_0x3fbae1(0x1a1)](),_0x57ab0b['readCurrentClock']()+0x1);}function _0x23b9f1(){if(_0x5d2ce8)clearTimeout(_0x5d2ce8);_0x5d2ce8=null;}function _0x56c481(){const _0x4f2a65=_0x1a2e9f;if(!_0x463dff[_0x4f2a65(0x20f)]||_0x5d2ce8||!_0x552ccc||_0x1f36f3<=0x0)return;const _0x572541=Math[_0x4f2a65(0x1f3)](_0x463dff[_0x4f2a65(0x20f)],0xa*_0x79d82f);_0x5d2ce8=setTimeout(()=>{const _0x1adc57=_0x4f2a65;_0x5d2ce8=null,_0x547400(async()=>{if(_0x552ccc&&_0x1f36f3>0x0)await _0x3725c7();_0x56c481(),_0x2f6144();})[_0x1adc57(0x14e)](()=>{});},_0x572541),_0x5d2ce8[_0x4f2a65(0x1a4)]?.();}async function _0x3725c7(_0xfc37a2){const _0x488233=_0x1a2e9f;if(!_0x386485)return![];const _0x30aeba=_0xfc37a2??_0xdb7604(),_0x2d93a5=Date['now'](),_0x546fbb=await _0x57ab0b[_0x488233(0x1cd)](_0x30aeba,async _0x1a7544=>{const _0x58288a=_0x488233;_0x386485[_0x58288a(0x173)](_0x1a7544[_0x58288a(0x1de)]),await _0x5f53c0['snapshotTo'](_0x1a7544[_0x58288a(0x163)]),_0x5a43de['writeFileSync'](_0x1a7544['state'],JSON[_0x58288a(0x18c)]({'manifestVersion':_0x559b58,'algorithm':_0x58288a(0x1ff),'dims':_0x2e7d8f,'metric':_0x463dff[_0x58288a(0x1e2)],'clock':_0x30aeba,'snapshotAt':Date['now']()},null,0x2));},{'keep':_0x463dff[_0x488233(0x1f5)]});return _0x79d82f=Date[_0x488233(0x1a1)]()-_0x2d93a5,_0x546fbb?.[_0x488233(0x221)]&&(_0x1f36f3=0x0,_0x23b9f1()),_0x546fbb?.[_0x488233(0x221)]??![];}function _0x1c8484(){const _0x57ce5d=_0x1a2e9f;_0x1f36f3++;if(_0x1f36f3>=_0x463dff[_0x57ce5d(0x1e1)])return _0x3725c7();return _0x56c481(),null;}async function _0x388689(){const _0x7a981d=_0x1a2e9f,_0xa9ff37=_0x57ab0b[_0x7a981d(0x168)]()||_0x57ab0b[_0x7a981d(0x15b)]();if(!_0xa9ff37)return null;let _0x1bc35b,_0x42bbf0=![];try{await _0x57ab0b[_0x7a981d(0x17c)](_0xa9ff37,async _0x6c0321=>{const _0xdcfd52=_0x7a981d;_0x1bc35b=JSON[_0xdcfd52(0x1ad)](_0x5a43de[_0xdcfd52(0x1aa)](_0x6c0321[_0xdcfd52(0x188)],_0xdcfd52(0x1e7)));if(_0x1bc35b['manifestVersion']!==_0x559b58||_0x1bc35b[_0xdcfd52(0x169)]!==_0xdcfd52(0x1ff)||_0x1bc35b[_0xdcfd52(0x175)]!==_0x2e7d8f||_0x1bc35b[_0xdcfd52(0x1e2)]!==_0x463dff['metric']){_0x1bc35b=null;return;}const _0x4c75de=new _0x523c2e();await _0x4c75de['loadFrom'](_0x6c0321[_0xdcfd52(0x163)]);const _0x56e2a6=_0x259fd7();_0x56e2a6['load'](_0x6c0321[_0xdcfd52(0x1de)]),_0x5f53c0=_0x4c75de,_0x386485=_0x56e2a6,_0x42bbf0=!![];});}catch{return null;}return _0x42bbf0?_0x1bc35b?.[_0x7a981d(0x21b)]??0x0:null;}async function _0x31f902(_0x395e79){const _0x38888b=_0x1a2e9f;_0x3575fc=null;const _0x2bad56=await _0x388689();if(_0x2bad56!=null){_0x1f36f3=0x0;if(_0x395e79){if(!_0x5f53c0['hasFingerprints'])return _0x14b688(_0x395e79),await _0x3725c7(),null;const _0x3257fc=_0x191cf8(_0x5f53c0,_0x395e79,_0x2e7d8f,{'upsert':_0x2e200b,'remove':_0x2607fe}),_0x88c38a=_0x3257fc[_0x38888b(0x153)]+_0x3257fc[_0x38888b(0x1e3)]+_0x3257fc[_0x38888b(0x199)];_0x88c38a>0x0&&(_0x1f36f3+=_0x88c38a,await _0x3725c7());}return _0x2bad56;}_0x14b688(_0x395e79??[]);if(_0x386485[_0x38888b(0x164)]()>0x0)await _0x3725c7();return null;}async function _0x3fa17b(){_0x552ccc=!![],await _0x31f902(await _0x22e641());}async function _0x10cf55(){const _0x2ba427=_0x1a2e9f;if(!_0x552ccc)return;_0x552ccc=![],_0x23b9f1(),_0x1f36f3=0x0;const _0x302639=_0x57ab0b[_0x2ba427(0x168)]()||_0x57ab0b['latestSnapshotId']();await _0x4deb4b(_0x302639),_0x2f6144();}async function _0x4deb4b(_0x100711){if(!_0x100711)return![];let _0x348ba7=![];try{await _0x57ab0b['loadSnapshot'](_0x100711,async _0x52d3c5=>{const _0x1a9f05=_0x2ae3,_0x2a72a4=JSON[_0x1a9f05(0x1ad)](_0x5a43de[_0x1a9f05(0x1aa)](_0x52d3c5['state'],_0x1a9f05(0x1e7)));if(_0x2a72a4[_0x1a9f05(0x1f8)]!==_0x559b58||_0x2a72a4[_0x1a9f05(0x169)]!==_0x1a9f05(0x1ff)||_0x2a72a4[_0x1a9f05(0x175)]!==_0x2e7d8f||_0x2a72a4['metric']!==_0x463dff[_0x1a9f05(0x1e2)])return;const _0x14afbb=new _0x523c2e();await _0x14afbb['loadFrom'](_0x52d3c5[_0x1a9f05(0x163)]);const _0x22d821=_0x259fd7();_0x22d821[_0x1a9f05(0x1b3)](_0x52d3c5[_0x1a9f05(0x1de)]),_0x386485=_0x22d821,_0x5f53c0=_0x14afbb,_0x3575fc=_0x100711,_0x348ba7=!![];});}catch{}return _0x348ba7;}function _0xf6a125(){const _0x31f720=_0x1a2e9f,_0x39cb76=Date[_0x31f720(0x1a1)]();if(_0x39cb76-_0x2902cf<_0x463dff[_0x31f720(0x156)])return;_0x2902cf=_0x39cb76;if(_0x1286f5)return;if(_0x5c3b98[_0x31f720(0x16c)]()){_0x1286f5=!![],_0x547400(async()=>{const _0x1586b5=_0x31f720;!_0x552ccc&&_0x759f25&&_0x5c3b98[_0x1586b5(0x1fe)]()&&(await _0x3fa17b(),_0x2f6144());})[_0x31f720(0x14e)](()=>{})['finally'](()=>{_0x1286f5=![];});return;}const _0x1c0409=_0x57ab0b[_0x31f720(0x168)]()||_0x57ab0b[_0x31f720(0x15b)]();if(!_0x1c0409||_0x1c0409===_0x3575fc)return;_0x1286f5=!![],_0x547400(async()=>{if(!_0x552ccc&&await _0x4deb4b(_0x1c0409))_0x2f6144();})[_0x31f720(0x14e)](()=>{})[_0x31f720(0x201)](()=>{_0x1286f5=![];});}return{async 'load'(_0x3317d1){return _0x547400(async()=>{const _0x5e060f=_0x2ae3;_0x57ab0b[_0x5e060f(0x209)]({'maxAgeMs':_0x463dff[_0x5e060f(0x218)]}),_0x46522c=_0x3317d1??null,_0x552ccc=_0x5c3b98[_0x5e060f(0x1fe)]();let _0x5d2601=null;if(_0x552ccc)_0x5d2601=await _0x31f902(_0x3317d1?await _0x3317d1():null);else{const _0x13d8fb=_0x57ab0b[_0x5e060f(0x168)]()||_0x57ab0b[_0x5e060f(0x15b)]();await _0x4deb4b(_0x13d8fb);}return _0x759f25=!![],_0x5d2601;});},async 'add'(_0x1a5f8c,_0x46a731,_0x27811f){return _0x547400(async()=>{const _0x556928=_0x2ae3;if(!_0x759f25)return;const _0x7ff633=_0x347006(_0x46a731);if(!_0x552ccc){if(!_0x5c3b98[_0x556928(0x1fe)]())return;await _0x3fa17b();}if(!_0x386485)return;const _0xc5cea3=_0x3ede1e(_0x7ff633);if(_0x5f53c0['fingerprintOf'](_0x1a5f8c)===_0xc5cea3)return;_0x2e200b(_0x1a5f8c,_0x7ff633,_0xc5cea3),await _0x1c8484();});},async 'remove'(_0x2a580c){return _0x547400(async()=>{if(!_0x759f25)return;if(!_0x552ccc){if(!_0x5c3b98['acquire']())return;await _0x3fa17b();}if(!_0x386485)return;if(_0x2607fe(_0x2a580c))await _0x1c8484();});},'search'(_0xe4cbf5,{limit:limit=0xa}={}){const _0xf7d16c=_0x1a2e9f;if(!_0x552ccc&&_0x759f25)_0xf6a125();if(!_0x386485)return[];const _0x56b693=_0x386485[_0xf7d16c(0x164)]();if(_0x56b693===0x0)return[];const _0x276d00=Math['min'](limit,_0x56b693),_0x51c4b9=_0x386485[_0xf7d16c(0x1bc)](_0x347006(_0xe4cbf5),_0x276d00,0x0),_0x38ec94=[],_0x58ebff=_0x51c4b9[_0xf7d16c(0x211)],_0x562ce0=_0x51c4b9[_0xf7d16c(0x192)];for(let _0x6f74d0=0x0;_0x6f74d0<_0x58ebff[_0xf7d16c(0x220)];_0x6f74d0++){const _0x4b6263=_0x58ebff[_0x6f74d0];if(_0x4b6263===0xffffffffffffffffn)continue;const _0xe48fde=Number(_0x4b6263),_0x15b1c1=_0x5f53c0[_0xf7d16c(0x170)](_0xe48fde);if(!_0x15b1c1)continue;const _0x27ac6f=_0x562ce0[_0x6f74d0];let _0x4c6c36;if(_0x463dff[_0xf7d16c(0x1e2)]===_0xf7d16c(0x181))_0x4c6c36=Math[_0xf7d16c(0x1f3)](0x0,0x1-_0x27ac6f);else{if(_0x463dff['metric']==='ip')_0x4c6c36=-_0x27ac6f;else _0x4c6c36=0x1/(0x1+_0x27ac6f);}_0x38ec94[_0xf7d16c(0x19e)]({'key':_0x15b1c1,'score':_0x4c6c36});}return _0x38ec94;},async 'snapshot'(_0x5dcd1e){return _0x547400(()=>_0x552ccc?_0x3725c7(_0x5dcd1e??undefined):![]);},async 'rebuild'(_0x87f41e){return _0x547400(async()=>{if(_0x87f41e!=null)_0x46522c=_0x87f41e;if(!_0x552ccc){if(!_0x5c3b98['acquire']())return;_0x552ccc=!![];}const _0x4baf96=_0x87f41e?await _0x87f41e():await _0x22e641();_0x14b688(_0x4baf96??[]),_0x759f25=!![],await _0x3725c7();});},async 'stop'(){return _0x547400(async()=>{const _0x27660a=_0x2ae3;_0x23b9f1();if(_0x552ccc){if(_0x1f36f3>0x0||!_0x57ab0b[_0x27660a(0x168)]())await _0x3725c7();_0x5c3b98[_0x27660a(0x210)]();}_0x552ccc=![],_0x759f25=![];});},'count'(){return _0x5f53c0['size']();},'info'(){const _0x20f966=_0x1a2e9f;return{'algorithm':'usearch','role':_0x552ccc?_0x20f966(0x1fc):_0x20f966(0x1ca),'metric':_0x463dff[_0x20f966(0x1e2)],'connectivity':_0x463dff[_0x20f966(0x19a)],'expansionAdd':_0x463dff[_0x20f966(0x14c)],'expansionSearch':_0x463dff[_0x20f966(0x227)],'snapshotEveryChanges':_0x463dff[_0x20f966(0x1e1)],'snapshotMaxLagMs':_0x463dff[_0x20f966(0x20f)],'count':_0x5f53c0['size'](),'size':_0x386485?.['size']?.()??0x0,'capacity':_0x386485?.['capacity']?.()??0x0,'changesSince':_0x552ccc?_0x1f36f3:null,'viewedSnapshot':_0x3575fc??null,'snapshotDir':_0xa7b5e7,'latestSnapshot':_0x57ab0b[_0x20f966(0x168)]()??null};}};},usearch;}var hasRequiredAlgorithmWorkerThread;function requireAlgorithmWorkerThread(){const _0x3254b8=_0x32915a;if(hasRequiredAlgorithmWorkerThread)return algorithmWorkerThread$1;hasRequiredAlgorithmWorkerThread=0x1;const {parentPort:_0x5a9f04,workerData:_0x5dd5c2}=require$$0$1,{algorithmName:_0x5b8e3b,algorithmConfig:_0x503a97,dims:_0x568561,dir:_0x31a30a}=_0x5dd5c2;let _0x3bbd46=0x1;const _0x12fde1=new Map();function _0x1407aa(){const _0x497fa3=_0x3bbd46++;return new Promise((_0x1b7008,_0x36a10c)=>{const _0x4a3053=_0x2ae3;_0x12fde1[_0x4a3053(0x17b)](_0x497fa3,{'resolve':_0x1b7008,'reject':_0x36a10c}),_0x5a9f04['postMessage']({'op':'fetchAll','fid':_0x497fa3});});}const _0x1fbf2c={'dims':_0x568561,'dir':_0x31a30a,'fetchAll':_0x1407aa,'onChange':()=>_0x192b04()};let _0x424660;if(_0x5b8e3b===_0x3254b8(0x155))_0x424660=requireHnsw()(_0x503a97,_0x1fbf2c);else{if(_0x5b8e3b==='flat')_0x424660=requireFlat()(_0x503a97,_0x1fbf2c);else{if(_0x5b8e3b===_0x3254b8(0x1ff))_0x424660=requireUsearch()(_0x503a97,_0x1fbf2c);else throw new Error(_0x3254b8(0x18d)+_0x5b8e3b+'\x22');}}function _0x192b04(){const _0x59ffd4=_0x3254b8;try{_0x5a9f04[_0x59ffd4(0x19c)]({'op':_0x59ffd4(0x1b2),'count':_0x424660[_0x59ffd4(0x177)](),'info':_0x424660[_0x59ffd4(0x161)](),'memory':process['memoryUsage']()});}catch{}}function _0x1a519e(_0x1a52d6){const _0x401a38=_0x3254b8;return(_0x1a52d6||[])[_0x401a38(0x1c5)](_0x2c1a64=>({'key':_0x2c1a64[_0x401a38(0x20a)],'vector':_0x2c1a64['vector']instanceof Float32Array?_0x2c1a64[_0x401a38(0x1eb)]:new Float32Array(_0x2c1a64[_0x401a38(0x1eb)])}));}return _0x5a9f04['on'](_0x3254b8(0x151),async _0x2e98ff=>{const _0x2c0033=_0x3254b8;if(_0x2e98ff['op']===_0x2c0033(0x195)){const _0x45a615=_0x12fde1[_0x2c0033(0x1d5)](_0x2e98ff[_0x2c0033(0x176)]);if(!_0x45a615)return;_0x12fde1['delete'](_0x2e98ff[_0x2c0033(0x176)]);if(_0x2e98ff[_0x2c0033(0x186)])_0x45a615['reject'](new Error(_0x2e98ff['error']));else _0x45a615[_0x2c0033(0x167)](_0x1a519e(_0x2e98ff[_0x2c0033(0x1d0)]));return;}const {id:_0x3c93a6,op:_0x3dab34,args:_0x34f973}=_0x2e98ff;try{let _0x185be2;switch(_0x3dab34){case _0x2c0033(0x16b):{_0x185be2=await _0x424660[_0x2c0033(0x16b)](_0x34f973[_0x2c0033(0x1a9)]?_0x1407aa:null),_0x192b04();break;}case _0x2c0033(0x1c4):{const _0x355003=_0x34f973[_0x2c0033(0x1eb)]instanceof Float32Array?_0x34f973[_0x2c0033(0x1eb)]:new Float32Array(_0x34f973[_0x2c0033(0x1eb)]);await _0x424660[_0x2c0033(0x1c4)](_0x34f973[_0x2c0033(0x20a)],_0x355003,_0x34f973[_0x2c0033(0x21b)]??undefined),_0x192b04(),_0x185be2=null;break;}case _0x2c0033(0x1da):{await _0x424660[_0x2c0033(0x1da)](_0x34f973[_0x2c0033(0x20a)]),_0x192b04(),_0x185be2=null;break;}case'search':{const _0x5d2adf=_0x34f973[_0x2c0033(0x1f6)]instanceof Float32Array?_0x34f973[_0x2c0033(0x1f6)]:new Float32Array(_0x34f973[_0x2c0033(0x1f6)]);_0x185be2=_0x424660[_0x2c0033(0x1bc)](_0x5d2adf,_0x34f973[_0x2c0033(0x1b1)]||{});break;}case _0x2c0033(0x19d):{_0x185be2=await _0x424660[_0x2c0033(0x19d)](_0x34f973['clock']),_0x192b04();break;}case _0x2c0033(0x16a):{const _0x2df0ff=_0x1a519e(_0x34f973[_0x2c0033(0x1d0)]);await _0x424660[_0x2c0033(0x16a)](async()=>_0x2df0ff),_0x192b04(),_0x185be2=null;break;}case _0x2c0033(0x20d):{await _0x424660[_0x2c0033(0x20d)](),_0x192b04(),_0x185be2=null;break;}case _0x2c0033(0x177):{_0x185be2=_0x424660[_0x2c0033(0x177)]();break;}case _0x2c0033(0x161):{_0x185be2=_0x424660[_0x2c0033(0x161)]();break;}default:throw new Error(_0x2c0033(0x1a6)+_0x3dab34+'\x22');}_0x5a9f04[_0x2c0033(0x19c)]({'id':_0x3c93a6,'result':_0x185be2});}catch(_0x5cf521){_0x5a9f04[_0x2c0033(0x19c)]({'id':_0x3c93a6,'error':{'message':_0x5cf521?.['message']||String(_0x5cf521),'code':_0x5cf521?.[_0x2c0033(0x1ba)]}});}}),_0x5a9f04[_0x3254b8(0x19c)]({'op':_0x3254b8(0x1c2)}),algorithmWorkerThread$1;}var algorithmWorkerThreadExports=requireAlgorithmWorkerThread(),algorithmWorkerThread=getDefaultExportFromCjs(algorithmWorkerThreadExports);module[_0x32915a(0x204)]=algorithmWorkerThread;
|