a2a-memory 0.12.44 → 0.12.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/adapters/anthropic.js +1 -1
  3. package/dist/chunking/chunker.js +1 -1
  4. package/dist/claude/sync.js +1 -1
  5. package/dist/cli/commands/add.js +1 -1
  6. package/dist/cli/commands/claude-sync.js +1 -1
  7. package/dist/cli/commands/cleanup.js +1 -1
  8. package/dist/cli/commands/config.js +1 -1
  9. package/dist/cli/commands/contextrank.js +1 -1
  10. package/dist/cli/commands/edit.js +1 -1
  11. package/dist/cli/commands/embed.js +1 -1
  12. package/dist/cli/commands/export.js +1 -1
  13. package/dist/cli/commands/extract.js +1 -1
  14. package/dist/cli/commands/health.js +1 -1
  15. package/dist/cli/commands/list.js +1 -1
  16. package/dist/cli/commands/migrate-chunks.js +1 -1
  17. package/dist/cli/commands/migrate-file-refs.js +1 -1
  18. package/dist/cli/commands/proficiency.js +1 -1
  19. package/dist/cli/commands/review.js +1 -1
  20. package/dist/cli/commands/rm.js +1 -1
  21. package/dist/cli/commands/search.js +1 -1
  22. package/dist/cli/commands/session-extract.js +1 -1
  23. package/dist/cli/commands/setup-wizard.js +1 -1
  24. package/dist/cli/commands/setup.js +1 -1
  25. package/dist/cli/commands/skill.js +1 -1
  26. package/dist/cli/commands/status.js +1 -1
  27. package/dist/cli/commands/sync.js +1 -1
  28. package/dist/cli/commands/team.js +1 -1
  29. package/dist/cli/commands/usage.js +1 -1
  30. package/dist/cli/index.js +1 -1
  31. package/dist/config/manager.js +1 -1
  32. package/dist/contextrank/edge-builder.js +1 -1
  33. package/dist/contextrank/rank-builder.js +1 -1
  34. package/dist/contextrank/signal-builder.js +1 -1
  35. package/dist/db/database.d.ts +23 -0
  36. package/dist/db/database.js +1 -1
  37. package/dist/db/usage-spool.js +1 -1
  38. package/dist/embedding/e5-provider.js +1 -1
  39. package/dist/embedding/index.js +1 -1
  40. package/dist/embedding/local-provider.js +1 -1
  41. package/dist/embedding/openai-provider.js +1 -1
  42. package/dist/embedding/quantization.js +1 -1
  43. package/dist/extraction/dedup-manager.js +1 -1
  44. package/dist/extraction/emotion-filter.js +1 -1
  45. package/dist/extraction/extractor.js +1 -1
  46. package/dist/extraction/file-reference.js +1 -1
  47. package/dist/extraction/filter.js +1 -1
  48. package/dist/extraction/scorer.js +1 -1
  49. package/dist/extraction/similarity.js +1 -1
  50. package/dist/hooks/client-factory.js +1 -1
  51. package/dist/hooks/post-tool-use.js +1 -1
  52. package/dist/hooks/pre-compact.js +1 -1
  53. package/dist/hooks/session-end.js +1 -1
  54. package/dist/hooks/session-start.js +1 -1
  55. package/dist/hooks/shared.js +1 -1
  56. package/dist/hooks/stop.js +1 -1
  57. package/dist/hooks/user-prompt-submit.js +1 -1
  58. package/dist/i18n/index.js +1 -1
  59. package/dist/i18n/messages.js +1 -1
  60. package/dist/index.js +1 -1
  61. package/dist/lifecycle/cleanup-scheduler.js +1 -1
  62. package/dist/lifecycle/cleanup.d.ts +1 -1
  63. package/dist/lifecycle/cleanup.js +1 -1
  64. package/dist/lifecycle/consolidation.js +1 -1
  65. package/dist/lifecycle/contradiction.js +1 -1
  66. package/dist/lifecycle/embedding-backfill.js +1 -1
  67. package/dist/lifecycle/index.js +1 -1
  68. package/dist/lifecycle/injection-flush.js +1 -1
  69. package/dist/lifecycle/quality-scorer.js +1 -1
  70. package/dist/lifecycle/session-extract.js +1 -1
  71. package/dist/lifecycle/shadow-rebuild.js +1 -1
  72. package/dist/lifecycle/tiering.js +1 -1
  73. package/dist/llm/client.js +1 -1
  74. package/dist/llm/index.js +1 -1
  75. package/dist/proficiency/actr-engine.js +1 -1
  76. package/dist/proficiency/detection.js +1 -1
  77. package/dist/proficiency/index.js +1 -1
  78. package/dist/proficiency/tracker.js +1 -1
  79. package/dist/search/adaptive-router.js +1 -1
  80. package/dist/search/index.js +1 -1
  81. package/dist/search/injection-filter.js +1 -1
  82. package/dist/search/memoryrank-rerank.js +1 -1
  83. package/dist/search/ranker.js +1 -1
  84. package/dist/search/reranker.js +1 -1
  85. package/dist/session/parser.js +1 -1
  86. package/dist/skill/evaluator.js +1 -1
  87. package/dist/skill/index.js +1 -1
  88. package/dist/sync/client.js +1 -1
  89. package/dist/sync/encryption.js +1 -1
  90. package/dist/sync/index.js +1 -1
  91. package/dist/sync/queue.js +1 -1
  92. package/dist/sync/scheduler.js +1 -1
  93. package/dist/sync/synchronizer.js +1 -1
  94. package/dist/sync/team-synchronizer.js +1 -1
  95. package/dist/sync/vector-clock.js +1 -1
  96. package/dist/types/index.js +1 -1
  97. package/dist/utils/keychain.js +1 -1
  98. package/dist/utils/logger.js +1 -1
  99. package/dist/utils/test-isolation.js +1 -1
  100. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x19df18,_0x2ece9e){function _0x19d151(_0x103a94,_0x191877){return _0x4b72(_0x191877- -0x13b,_0x103a94);}function _0x5120e8(_0x31798e,_0x1d8637){return _0x4b72(_0x1d8637-0x113,_0x31798e);}const _0x2ea669=_0x19df18();while(!![]){try{const _0x4ec351=-parseInt(_0x19d151(0x10,0x20))/0x1*(parseInt(_0x5120e8(0x28b,0x2ca))/0x2)+parseInt(_0x5120e8(0x24a,0x22c))/0x3+-parseInt(_0x5120e8(0x214,0x270))/0x4+-parseInt(_0x19d151(0xdb,0x8d))/0x5+-parseInt(_0x19d151(0x2a,-0x30))/0x6+parseInt(_0x19d151(0x25,-0xb))/0x7*(parseInt(_0x19d151(0x84,0x31))/0x8)+parseInt(_0x19d151(0x72,0x1c))/0x9*(parseInt(_0x5120e8(0x1db,0x236))/0xa);if(_0x4ec351===_0x2ece9e)break;else _0x2ea669['push'](_0x2ea669['shift']());}catch(_0x5da493){_0x2ea669['push'](_0x2ea669['shift']());}}}(_0x1c8a,0x98720));import{encryptContent,decryptContent,wrapEncryptedContent,unwrapEncryptedContent}from'./encryption.js';function withStatus(_0x568f01,_0x20f5e4){return _0x568f01['status']=_0x20f5e4,_0x568f01;}function _0x4b72(_0x336e6e,_0x1d3b8c){_0x336e6e=_0x336e6e-0x108;const _0x1c8a13=_0x1c8a();let _0x4b7201=_0x1c8a13[_0x336e6e];if(_0x4b72['mkkOai']===undefined){var _0xd2dbbf=function(_0x24f280){const _0x42f7ab='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x474feb='',_0x5c6719='';for(let _0x4e5166=0x0,_0x3203e0,_0x449e2d,_0x2cb9fd=0x0;_0x449e2d=_0x24f280['charAt'](_0x2cb9fd++);~_0x449e2d&&(_0x3203e0=_0x4e5166%0x4?_0x3203e0*0x40+_0x449e2d:_0x449e2d,_0x4e5166++%0x4)?_0x474feb+=String['fromCharCode'](0xff&_0x3203e0>>(-0x2*_0x4e5166&0x6)):0x0){_0x449e2d=_0x42f7ab['indexOf'](_0x449e2d);}for(let _0x580b9e=0x0,_0x222e5f=_0x474feb['length'];_0x580b9e<_0x222e5f;_0x580b9e++){_0x5c6719+='%'+('00'+_0x474feb['charCodeAt'](_0x580b9e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5c6719);};_0x4b72['CVWAzk']=_0xd2dbbf,_0x4b72['CYIsqi']={},_0x4b72['mkkOai']=!![];}const _0x8397f5=_0x1c8a13[0x0],_0x544d9f=_0x336e6e+_0x8397f5,_0x4557f3=_0x4b72['CYIsqi'][_0x544d9f];return!_0x4557f3?(_0x4b7201=_0x4b72['CVWAzk'](_0x4b7201),_0x4b72['CYIsqi'][_0x544d9f]=_0x4b7201):_0x4b7201=_0x4557f3,_0x4b7201;}export function getErrorStatus(_0x4112c3){function _0xc8d368(_0xc48d06,_0x383953){return _0x4b72(_0x383953-0x2a,_0xc48d06);}return _0x4112c3 instanceof Error?_0x4112c3[_0xc8d368(0x1c4,0x18c)]:undefined;}let _pluginVersion=_0xb3cfa2(0x3b,-0xd);try{const {readFileSync}=await import(_0x4b748f(0xb1,0xb6)),{fileURLToPath}=await import('node:url'),{dirname,join}=await import(_0x4b748f(0x80,0x6d)),__dirname=dirname(fileURLToPath(import.meta.url)),pkg=JSON[_0xb3cfa2(0x8c,0xe7)](readFileSync(join(__dirname,_0x4b748f(0xa3,0xea)+'age.json'),_0x4b748f(0xa4,0x88)));_pluginVersion=pkg['version']||'0.0.0';}catch{}function _0x4b748f(_0x5d4996,_0x5e28ae){return _0x4b72(_0x5d4996- -0xad,_0x5e28ae);}function _0x1c8a(){const _0x318141=['l21LBw9YAwvZ','yw5ZzMvYl2HPCW','zw1IBgu','AwXL','BxpRPBWG64sy7jEi7iQ164Ui64UK','ohr6DwPbvq','zw5HyMXLzezLyq','BwfW','zMLSzw5HBwu','BhrH','DgvZDenVBM5LyW','CMvZDwX0','l21LBw9YAwvZlW','yMfZzvvYBa','Cg9ZDfbYB2zPyW','7zUeioUlPoYlNcdSI5ZRJ4tTLzJSHlJSMPq','Dg9tDhjPBMC','DhLWzq','7jQu7lkTioYGNo2vNdOG7j6G7iUCia','CY9WB3b1BgfYpW','sfruuca0mJi','z2vUzxjHDgvezq','zY9JB250zxH0CW','Dhj1zq','BgLTAxq','svr3qM8','l2fWAs92ms90yq','CMLLCW','CMvXDwvZDe11Ba','AwnPzw5JAwvZ','zMfPBgvKigzVCG','sKTuEgK','Dg90ywXFBM9Kzq','zM9Yy2vnzw1VCG','C3rHDhm','7jQu7lkTioYlNoQWHcdSTiJQS7W6ia','AgfUzgXLrxjYBW','CMLLC0jHDgnO','B2zPy2LLBMn5lW','s2v5','yw5ZzMvYl2nVBq','DgLTzw91Da','z2v0q29TCgf0Aq','Eg9UB215l2nSyq','C3LUyY9HChbSEq','BgLZDfrLyw1Z','zw5JCNLWDgLVBG','qMf0y2G','C2vZC2LVBL9Pza','zw1VCNK','BgfZDf9ZEw5Jzq','C2TPBgXFBwvTBW','Bw9YAwvZ','B2zPy2LLBMn5pW','BgvZl2nOzwnRlq','CgfYC2u','Axq9mq','ANnVBG','CNLgAwXLtgLUAW','C2v0rw5HyMXLza','DgLLCG','DhvYzxm','Aw9Ul2vTB3rPBW','Bwf0CML4','C2v0','BNrLEhq','Bg9J','y2XHC3nPzNLdBW','7j247kADioYlPo2mQa','zgvSzxrLtwvTBW','yNL0zxpSL6ZSLBWG7zwP64Ui','sfruuca0mdm','zxHWB3j0uhjVzG','l2fWAs92ms9Wzq','zw1VCNLgzwvKyG','zgv0ywLS','Bw9YAwvZlW','twvTyMvY','x01t','l3jLAw5MB3jJzq','mJrxBwXTyKW','CgfNzv9ZAxPL','B3j0','ChjVBw90zu1LBq','yMLSAxr5twf0CG','vfLore0','Ewr2C1m','ChjVAMvJDf9Wyq','CLjLC3bVBNnL','l3rLyw1ZlW','rMvHDhvYzxm','DgfNCW','zhvWBgLJyxrL','ufvu','y2XLyxjfBMnYEq','Aw5JBhvKzv9LBq','BgLZDfbYB2zPyW','mtqYmdyYmePYsxvkAa','z2v0u3rHDhm','ieTLEEULVcdTMzxSNBJTLzJSHlG','Aw1WB3j0uhjVzG','l3bYB21VDgu','CNnVBMfSAxPHDa','Cgf0Aa','BgvZl3vWBg9Hza','ue9tva','mtaW','qwjVCNrfCNjVCG','z1vmtuK','s2vABfa','y29UzMLN','yxnZzw1IBgvdBW','revmrvrf','AxnbCNjHEq','l2fWAs92ms9MAq','uNPxCuC','qKftrv9eruXbwq','y3jLyxrLq29UDa','EwfIr2G','AwrIzKm','z2v0ug9WDwXHCG','l21LBwjLCNm','C3rYAw5NAwz5','DxbSB2fKrMLSzq','Bwf4vg9Rzw5Z','twvTB3jPzxm','nJq2nJeYmKXtCxzJyq','sfruuca0mdq','C3vJy2vZCW','yMvKzgLUzW','tufyx1jfvfjjrq','y2f0zwDVCNK','ywjVCNq','yxbWzw5K','zxzLBNqVyMf0yW','yw5HBhL6zuvTBW','CMvXDwvZDa','CMvPBMzVCMnLtq','z2v0vgvHBvn0yq','sMDUz2W','mJyZnZyYn0TYBwDIAG','Cgf0AwjPBgL0Eq','Aw9Us2v5','7zQmioYERoYlNoUpHcdTM4qG7iUK7yYO','BwvZC2fNzq','y2f0zwDVCMLLCW','Bw9YEs1MAwXLCW','zxzLBNq','DxbSAwnHDgu','AgfZ','mJmWmZuZmtb5rxL4DuC','zMLSzq','BMfTzq','zgvJCNLWDe1LBq','Dgrgz20','y29UDgvUDa','B25fBMfIBgvK','y3jLyxrLtwvTBW','B3j5','sfruuca','BM9KztPWyxrO','BI9HBMfSExPL','C2v0rw5JCNLWDa','nJiYotuXCKDmAw5A','vgfNCW','Cg93','zY9YzwXHDgLVBG','AxnfBMnYExb0Aq','AxnFzhvWBgLJyq','zgLMzMLJDwX0Eq','uKvuuLLbqKXfxW','yxbWBhLezwX0yq','BxnN','C3nPzNK','DxbKyxrLtwvTBW','zxjYB3i','B2zMC2v0','AM9PBG','u1rbvfvt','Dg9YEt8','yxbWBgLJyxrPBW','zxH0','BI9QC29U','DgLWyxj0','z2v0vhjHBNnMzq','64sK7yQ47jUm7ygSioYyPoULMdOG','Dg90ywXFBwvTBW','CNLFAwq','l2fWAs92ms9Tzq','B3v0y29Tzq','EuzLzwrIywnRia','Bw9YAwvZl3rHzW','mc4WlJa','7j247kADioYlPo2mQdOGqvbj','C2vHCMnO','lI4VlI4VCgfJAW','DxrMltG','l2fWAs92ms9WCG','zMLSzv9Pza','C2vHCMnOtwvTBW','C3rHCNrZv2L0Aa','w2eYyv0GCMvPBG','owPNyvnNuW','Bw9YAwvZl3nLyq','yw1Z','Bw9YAwvZl2fZCW','mty1mZHlAuzPsgm','BgvUz3rO','ndm0odiWmerSEfDoEG','BM9KztPMCW','ChrPB25lzxK','y29UDgv4Df90yq','l2fWAs92ms90CG','C3rHDhvZ','AxrLBxm','r0vu','DgLVBG','CMvMzxjLBMnLxW'];_0x1c8a=function(){return _0x318141;};return _0x1c8a();}function _0xb3cfa2(_0x1e792c,_0x2df3b8){return _0x4b72(_0x1e792c- -0x112,_0x2df3b8);}export class A2AClient{[_0xb3cfa2(0xc3,0x85)];[_0x4b748f(0xe3,0x98)];[_0x4b748f(0xe8,0x97)+'Key']=null;[_0x4b748f(0xc0,0x82)+'tures']=[];constructor(_0x2aa5d0){function _0x2f8bf5(_0x5920a5,_0x201885){return _0xb3cfa2(_0x5920a5-0x39c,_0x201885);}function _0x1e9b14(_0x2d07db,_0x1dc809){return _0xb3cfa2(_0x1dc809-0xfa,_0x2d07db);}this[_0x2f8bf5(0x45f,0x44a)]=_0x2aa5d0,this[_0x2f8bf5(0x41a,0x47d)]=_0x2aa5d0[_0x1e9b14(0x12d,0x178)]??0xea60;}[_0x4b748f(0xf5,0x153)+_0xb3cfa2(0xaf,0xf8)](_0x2514ca){function _0x2a6814(_0xebd538,_0x131ddf){return _0x4b748f(_0x131ddf- -0x276,_0xebd538);}function _0x5d3b64(_0x3da1cb,_0x20e696){return _0x4b748f(_0x20e696-0x3d1,_0x3da1cb);}this[_0x2a6814(-0x201,-0x1b6)+_0x2a6814(-0x1a5,-0x17f)]=_0x2514ca;}[_0x4b748f(0x82,0xc1)+_0xb3cfa2(0x9,0x3a)](_0x4981a6){function _0x157b3c(_0x5cd944,_0x37f1fd){return _0xb3cfa2(_0x5cd944-0x2f,_0x37f1fd);}if(_0x4981a6[_0x1e722b(-0xa0,-0xcb)]!==0x20)throw new Error('암호화\x20키는\x2032\x20'+_0x1e722b(-0x4f,-0x53)+'다');function _0x1e722b(_0xb0f8e7,_0x3084eb){return _0xb3cfa2(_0xb0f8e7- -0xea,_0x3084eb);}this['encryption'+_0x157b3c(0xab,0xd9)]=_0x4981a6;}[_0x4b748f(0x118,0x183)+_0xb3cfa2(0x4d,0x3b)](){function _0x759a50(_0x178d2f,_0x4237a){return _0xb3cfa2(_0x178d2f-0x2ea,_0x4237a);}this['encryption'+_0x759a50(0x366,0x3b8)]=null;}[_0x4b748f(0x87,0x5c)+_0xb3cfa2(0x17,-0x36)](){function _0x3516d2(_0x2f8484,_0x200c1d){return _0xb3cfa2(_0x2f8484-0x4ba,_0x200c1d);}function _0x36bad3(_0x22c25a,_0x44e79d){return _0xb3cfa2(_0x44e79d- -0x233,_0x22c25a);}return this[_0x36bad3(-0x191,-0x1b0)+_0x3516d2(0x536,0x527)]!==null;}async[_0xb3cfa2(0x18,0x7d)+'ry'](_0x59b3c2){let _0xd820d9=_0x59b3c2[_0x4a90d3(0x18d,0x18d)];if(this[_0x4a90d3(0x1eb,0x1fa)+_0x4a90d3(0x1b0,0x1f3)]){const _0x3eabf1=encryptContent(_0x59b3c2['content'],this[_0x2752b1(0x515,0x540)+_0x4a90d3(0x1d9,0x1f3)]);_0xd820d9=wrapEncryptedContent(_0x3eabf1);}const _0xa8404e=await this[_0x2752b1(0x4cd,0x4c0)]('POST',_0x4a90d3(0x1bb,0x1ae)+_0x2752b1(0x57c,0x546),{'content':_0xd820d9,'category':_0x59b3c2[_0x4a90d3(0x127,0x175)],'tier':_0x59b3c2['tier'],'tags':_0x59b3c2[_0x2752b1(0x593,0x56d)]??[]}),_0x59e008=_0xa8404e;function _0x2752b1(_0x811e34,_0x49d75e){return _0x4b748f(_0x49d75e-0x458,_0x811e34);}function _0x4a90d3(_0x19a459,_0x3a51c4){return _0x4b748f(_0x3a51c4-0x112,_0x19a459);}if(this[_0x2752b1(0x595,0x540)+'Key']&&_0x59e008['content']){const _0x5617e0=unwrapEncryptedContent(_0x59e008[_0x2752b1(0x479,0x4d3)]);_0x5617e0&&(_0x59e008[_0x2752b1(0x4fd,0x4d3)]=decryptContent(_0x5617e0,this[_0x2752b1(0x4f5,0x540)+_0x4a90d3(0x222,0x1f3)]));}return _0x59e008;}async[_0x4b748f(0xa7,0xe8)+_0xb3cfa2(0x70,0x18)](_0x58c75f,_0xc80e4f){const _0x1aedb0=await this[_0x14590c(0x448,0x46d)](_0x1b51c5(0x30f,0x356),_0x1b51c5(0x288,0x2da)+_0x14590c(0x4ca,0x4b0)+'rch',{'query':_0x58c75f,'limit':_0xc80e4f?.[_0x14590c(0x4e8,0x4d7)]??0xa,'category':_0xc80e4f?.[_0x1b51c5(0x24f,0x231)]});function _0x1b51c5(_0x38332d,_0x36ce64){return _0xb3cfa2(_0x38332d-0x251,_0x36ce64);}function _0x14590c(_0x3407d1,_0x50a2d8){return _0xb3cfa2(_0x50a2d8-0x46a,_0x3407d1);}return _0x1aedb0[_0x14590c(0x4d0,0x4bb)]??[];}async['listMemori'+'es'](_0x941c6f){function _0x352681(_0x3cdfaf,_0x4e48e4){return _0xb3cfa2(_0x4e48e4-0x4d5,_0x3cdfaf);}const _0x5e6a8e=new URLSearchParams();if(_0x941c6f?.[_0x352681(0x505,0x542)])_0x5e6a8e[_0x2ae4b8(-0xd,0x2d)](_0x352681(0x562,0x542),_0x941c6f[_0x352681(0x500,0x542)][_0x352681(0x50e,0x53a)]());if(_0x941c6f?.['offset'])_0x5e6a8e[_0x2ae4b8(-0xd,-0x35)]('offset',_0x941c6f['offset'][_0x352681(0x557,0x53a)]());if(_0x941c6f?.['includeEmb'+'edding'])_0x5e6a8e[_0x352681(0x5a1,0x56a)](_0x352681(0x540,0x589)+_0x352681(0x4c4,0x4d1),_0x352681(0x58e,0x541));const _0x34c593='/api/v1/me'+_0x2ae4b8(-0x19,-0x26)+(_0x5e6a8e[_0x2ae4b8(-0x3d,0x24)]()?'?'+_0x5e6a8e[_0x2ae4b8(-0x3d,-0x5d)]():''),_0x3f4240=await this[_0x352681(0x527,0x4d8)](_0x2ae4b8(-0x50,-0x10),_0x34c593),_0x3ebb94=_0x3f4240['items']??[];if(this[_0x2ae4b8(-0x1f,-0x54)+_0x2ae4b8(-0x26,0x46)])return _0x3ebb94[_0x352681(0x559,0x531)](_0x47407a=>this[_0x352681(0x551,0x4e9)+_0x2ae4b8(-0x89,-0x33)](_0x47407a));function _0x2ae4b8(_0x22366b,_0x32b4bc){return _0xb3cfa2(_0x22366b- -0xa2,_0x32b4bc);}return _0x3ebb94;}['decryptMem'+_0x4b748f(0x7e,0x1b)](_0x5229d2){if(!this[_0x23cbb0(0x423,0x3ba)+_0x23cbb0(0x41c,0x44e)])return _0x5229d2;function _0x23cbb0(_0x245dd2,_0x1bf481){return _0xb3cfa2(_0x245dd2-0x3a0,_0x1bf481);}const _0x69bae8={..._0x5229d2};if(_0x69bae8[_0x15b613(-0x2f3,-0x28f)]){if('KeZlP'===_0x23cbb0(0x462,0x435)){const _0x77fcb8=unwrapEncryptedContent(_0x69bae8[_0x23cbb0(0x3b6,0x3c2)]);if(_0x77fcb8)try{_0x69bae8[_0x15b613(-0x2e7,-0x28f)]=decryptContent(_0x77fcb8,this[_0x23cbb0(0x423,0x473)+_0x15b613(-0x258,-0x229)]);}catch{}}else return _0x3a993d instanceof _0xf078a?_0x214c7e[_0x15b613(-0x2b4,-0x255)]:_0x3be431;}function _0x15b613(_0x2bdd61,_0x23589f){return _0xb3cfa2(_0x23589f- -0x2a5,_0x2bdd61);}return _0x69bae8;}async[_0x4b748f(0x8e,0xac)+'ry'](_0x296f58,_0x4985b8){function _0x404ac7(_0xe28c8d,_0x2d2c77){return _0xb3cfa2(_0xe28c8d-0x1e0,_0x2d2c77);}function _0x2553f1(_0x3ecb84,_0x54d63b){return _0xb3cfa2(_0x54d63b- -0x280,_0x3ecb84);}const _0xff895f=await this[_0x2553f1(-0x23c,-0x27d)](_0x404ac7(0x292,0x2e8),'/api/v1/me'+_0x404ac7(0x281,0x28e)+_0x296f58,_0x4985b8);return _0xff895f;}async[_0x4b748f(0xff,0x10e)+'ry'](_0x37cca5){function _0x5b88be(_0x54250b,_0x4bba13){return _0x4b748f(_0x54250b-0x24,_0x4bba13);}function _0x2f98b7(_0xd34821,_0x16e2f4){return _0x4b748f(_0x16e2f4- -0x1b3,_0xd34821);}await this[_0x2f98b7(-0x13b,-0x14b)](_0x5b88be(0x14e,0x14d),_0x2f98b7(-0xfa,-0x117)+'mories/'+_0x37cca5);}async[_0xb3cfa2(0x82,0x58)](){const _0xf2176=await this['request'](_0x7169de(-0x124,-0xf3),'/api/v1/te'+_0x7169de(-0x12f,-0x196));function _0x7169de(_0x477ef3,_0x161ccc){return _0x4b748f(_0x477ef3- -0x1db,_0x161ccc);}function _0x245c1a(_0x5bf0fd,_0x483a79){return _0x4b748f(_0x483a79-0x396,_0x5bf0fd);}if(Array[_0x7169de(-0xb0,-0xf2)](_0xf2176))return _0xf2176;return _0xf2176['items']??[];}async['listTeamMe'+_0x4b748f(0xee,0xb9)](_0x4e6852,_0xd03494){const _0x2a17bc=new URLSearchParams();if(_0xd03494?.[_0x3c12b5(0x3c,0x29)])_0x2a17bc[_0x397d68(0x4bf,0x4fa)](_0x397d68(0x4b9,0x4d2),_0xd03494[_0x397d68(0x485,0x4d2)]['toString']());if(_0xd03494?.[_0x397d68(0x478,0x490)])_0x2a17bc[_0x397d68(0x492,0x4fa)](_0x397d68(0x485,0x490),_0xd03494[_0x3c12b5(-0x6,0x1a)][_0x3c12b5(0x34,0x67)]());function _0x3c12b5(_0x51fbd7,_0x4912f9){return _0x4b748f(_0x51fbd7- -0x96,_0x4912f9);}const _0x271647=_0x2a17bc[_0x3c12b5(0x34,0x0)]();function _0x397d68(_0x3a7a0d,_0x242c04){return _0x4b748f(_0x242c04-0x400,_0x3a7a0d);}const _0x207cd0=_0x3c12b5(0x7d,0xd5)+encodeURIComponent(_0x4e6852)+_0x3c12b5(0x24,0x91)+(_0x271647?'?'+_0x271647:''),_0x38667c=await this[_0x3c12b5(-0x2e,-0x82)]('GET',_0x207cd0);return _0x38667c[_0x3c12b5(0x20,-0x38)]??[];}async['addTeamMem'+'ory'](_0x5e8d0b,_0x4bab05){function _0xeb944c(_0x2da2ea,_0x532168){return _0xb3cfa2(_0x532168-0x2ae,_0x2da2ea);}const _0x5f57ea=await this[_0x1169eb(-0x107,-0x104)]('POST',_0xeb944c(0x2f3,0x35c)+encodeURIComponent(_0x5e8d0b)+_0xeb944c(0x34d,0x303),_0x4bab05);function _0x1169eb(_0x2503a1,_0x17e2c4){return _0xb3cfa2(_0x17e2c4- -0x107,_0x2503a1);}return _0x5f57ea;}async['searchTeam'+_0x4b748f(0x5d,-0x1)](_0x1e8f72,_0xc27c1e,_0x5d2c7d){function _0x5231a2(_0xade65b,_0x57523f){return _0xb3cfa2(_0x57523f-0x48c,_0xade65b);}function _0xa5e7a4(_0x38f584,_0xe1cbe1){return _0xb3cfa2(_0xe1cbe1- -0x1b8,_0x38f584);}const _0x1a683c=await this['request']('POST',_0x5231a2(0x4fd,0x53a)+encodeURIComponent(_0x1e8f72)+(_0x5231a2(0x53f,0x4ed)+_0x5231a2(0x45f,0x4c9)),{'query':_0xc27c1e,'limit':_0x5d2c7d?.[_0x5231a2(0x51f,0x4f9)]??0xa,'category':_0x5d2c7d?.[_0xa5e7a4(-0x16b,-0x1ba)]});return _0x1a683c[_0xa5e7a4(-0x195,-0x167)]??[];}async[_0x4b748f(0xcf,0xbd)+_0xb3cfa2(0x5e,0x9e)](_0x2f10ff,_0x4178e5,_0x117a32){function _0x5d69e3(_0xf37028,_0x2a8b0d){return _0x4b748f(_0xf37028- -0x133,_0x2a8b0d);}function _0x49a824(_0x1fe9e4,_0x425572){return _0x4b748f(_0x1fe9e4- -0x312,_0x425572);}return this['request'](_0x49a824(-0x1ef,-0x225),_0x49a824(-0x1ff,-0x1e2)+encodeURIComponent(_0x2f10ff)+(_0x5d69e3(-0x6d,-0x94)+'sync/delta'),{'memory_id':_0x4178e5,'vector_clock':_0x117a32});}async[_0xb3cfa2(0x26,0xc)](_0x1ffa3d,_0x496ea7,_0x2503b3){function _0x125e5d(_0x27580f,_0x44a457){return _0xb3cfa2(_0x44a457-0x4dd,_0x27580f);}function _0x209905(_0x292cfc,_0x5d8eea){return _0xb3cfa2(_0x5d8eea-0x308,_0x292cfc);}return this[_0x125e5d(0x52a,0x4e0)](_0x125e5d(0x56b,0x59b),'/teams/'+encodeURIComponent(_0x1ffa3d)+(_0x125e5d(0x522,0x53e)+_0x125e5d(0x502,0x55e)),{'memory_id':_0x496ea7,'delta':_0x2503b3});}async['createMemo'+_0x4b748f(0xdf,0xae)](_0x4b312c){function _0x2fd03f(_0x2c8c9a,_0x447788){return _0x4b748f(_0x2c8c9a-0x115,_0x447788);}function _0x344618(_0x52f2b3,_0x36870a){return _0x4b748f(_0x52f2b3- -0xe2,_0x36870a);}const _0x1ee7cc=await this[_0x344618(-0x7a,-0x40)](_0x2fd03f(0x238,0x225),_0x2fd03f(0x1b1,0x16d)+'mories/bat'+'ch',{'items':_0x4b312c});return _0x1ee7cc;}async[_0xb3cfa2(0x5f,0x6a)+_0xb3cfa2(0x53,-0xc)](){function _0x134ede(_0x4e0d9,_0x1b10a6){return _0xb3cfa2(_0x4e0d9- -0x30,_0x1b10a6);}function _0x2ddd0a(_0x51694d,_0x2bc906){return _0xb3cfa2(_0x51694d- -0x14a,_0x2bc906);}try{return await this[_0x134ede(-0x2d,0xe)](_0x134ede(0x22,-0x28),_0x134ede(0x7,-0x1e)+'mories?lim'+_0x2ddd0a(-0xbd,-0x91)),!![];}catch{return![];}}async[_0x4b748f(0x129,0x106)+_0x4b748f(0xfb,0xb5)](_0x3f695e,_0x34ee58){function _0x5c040f(_0x41bd7a,_0xefb0fe){return _0x4b748f(_0xefb0fe-0x327,_0x41bd7a);}function _0x48681e(_0x5eb960,_0x5be1f2){return _0x4b748f(_0x5eb960-0x51,_0x5be1f2);}const _0x4bf6f6=await this[_0x5c040f(0x38b,0x38f)](_0x5c040f(0x42e,0x44a),_0x48681e(0xed,0xfe)+_0x5c040f(0x3b3,0x3d4)+_0x5c040f(0x3cf,0x3e3),{'query':_0x3f695e,'max_memories':_0x34ee58?.['maxMemorie'+'s']??0x5,'max_tokens':_0x34ee58?.[_0x48681e(0xad,0x111)]??0x7d0,'categories':_0x34ee58?.[_0x48681e(0xc2,0x6f)],'tier':_0x34ee58?.[_0x5c040f(0x435,0x41d)]});return _0x4bf6f6;}async['reinforceM'+_0xb3cfa2(0x86,0x29)](_0x1fb879){function _0x1d0835(_0x1b0ea5,_0xbef1ba){return _0xb3cfa2(_0xbef1ba-0x470,_0x1b0ea5);}function _0x27c4e3(_0x547ca4,_0x162b11){return _0xb3cfa2(_0x547ca4- -0x90,_0x162b11);}const _0x163036=await this[_0x1d0835(0x484,0x473)]('POST',_0x1d0835(0x4dd,0x4a7)+_0x1d0835(0x4b3,0x511)+_0x1fb879+_0x27c4e3(0x14,-0x4a));return _0x163036;}async[_0x4b748f(0x69,0x81)+_0x4b748f(0x104,0xf3)+'ack'](_0x53ba13,_0x30c471){function _0x5b646a(_0x35d5c6,_0x4c8b5b){return _0x4b748f(_0x4c8b5b-0x176,_0x35d5c6);}function _0x45268b(_0x303b63,_0x362826){return _0x4b748f(_0x303b63- -0x297,_0x362826);}try{await this[_0x5b646a(0x1ee,0x1de)]('POST',_0x45268b(-0x1fb,-0x240)+_0x5b646a(0x286,0x27c)+_0x53ba13+_0x5b646a(0x295,0x27f),{'success':_0x30c471});}catch(_0x4c7f4a){console[_0x5b646a(0x23a,0x205)](_0x45268b(-0x1ee,-0x190)+_0x45268b(-0x1bc,-0x1b8)+'yFeedback\x20'+_0x45268b(-0x1bf,-0x1c9)+'\x20'+_0x53ba13+':',_0x4c7f4a instanceof Error?_0x4c7f4a[_0x45268b(-0x227,-0x27d)]:String(_0x4c7f4a));}}async[_0xb3cfa2(0xa8,0x6b)+'ory'](_0xb4ef32,_0x45822b){function _0x63dfa(_0x2b7eb9,_0x77265f){return _0xb3cfa2(_0x2b7eb9-0xac,_0x77265f);}function _0x107bdb(_0x347a76,_0x497679){return _0xb3cfa2(_0x347a76-0x2be,_0x497679);}const _0x3abcec=await this[_0x63dfa(0xaf,0x61)](_0x63dfa(0x16a,0x197),_0x107bdb(0x2f5,0x29e)+_0x63dfa(0x14d,0xe8)+_0xb4ef32+_0x63dfa(0x166,0x13f));return _0x3abcec;}async[_0xb3cfa2(0xb7,0x10a)](){function _0x585331(_0x5f0b9b,_0x427ec1){return _0xb3cfa2(_0x5f0b9b- -0x280,_0x427ec1);}const _0x54a1bd=await this[_0x4e3c48(0x244,0x287)](_0x4e3c48(0x293,0x237),_0x4e3c48(0x278,0x22b)+'mories/sta'+'ts');function _0x4e3c48(_0x52e0e9,_0x399369){return _0xb3cfa2(_0x52e0e9-0x241,_0x399369);}return _0x54a1bd;}async[_0xb3cfa2(0xcd,0xe2)+_0x4b748f(0x84,0x4f)](_0x2262dd=0xa){const _0x12896b=new URLSearchParams();_0x12896b[_0x703884(0x3a,0x7a)](_0x703884(0x98,0x52),_0x2262dd[_0x703884(0x87,0x4a)]());const _0x14e044=_0x703884(-0x48,0x1c)+_0x1a92ca(0x20b,0x20e)+_0x1a92ca(0x264,0x23c)+_0x12896b[_0x1a92ca(0x240,0x239)](),_0x479e23=await this[_0x703884(-0x7d,-0x18)]('GET',_0x14e044);function _0x703884(_0x25af5d,_0x12f217){return _0x4b748f(_0x12f217- -0x80,_0x25af5d);}function _0x1a92ca(_0x5930e6,_0x2d33ee){return _0x4b748f(_0x2d33ee-0x16f,_0x5930e6);}return _0x479e23[_0x703884(0x44,0x36)]??[];}async[_0x4b748f(0x6a,0x1f)+'ts'](_0x558306){function _0x25452a(_0x28bdf8,_0x17d368){return _0xb3cfa2(_0x28bdf8-0x1d3,_0x17d368);}const _0x3e7bc4=await this['request'](_0x3096f7(0x45a,0x4bf),_0x3096f7(0x4b6,0x509)+encodeURIComponent(_0x558306)+('/memories/'+_0x3096f7(0x47f,0x498))),_0x7f9a18=_0x3e7bc4,_0x1df23e=_0x7f9a18['stats']??_0x7f9a18;function _0x3096f7(_0x31c360,_0x46457f){return _0xb3cfa2(_0x31c360-0x408,_0x46457f);}return{'totalMemories':_0x1df23e[_0x3096f7(0x43d,0x487)+_0x3096f7(0x478,0x417)]??0x0,'totalNodes':_0x1df23e[_0x3096f7(0x47d,0x45b)+'s']??0x0,'lastSyncedAt':_0x1df23e[_0x3096f7(0x48f,0x423)+'d_at']??null};}async[_0x4b748f(0xc8,0xfe)+'iencyEvent'](_0x391adf){function _0x336d37(_0x25d2ac,_0x1439c2){return _0xb3cfa2(_0x25d2ac-0x2ff,_0x1439c2);}function _0x4b6a4c(_0x31c9e1,_0x51974b){return _0xb3cfa2(_0x51974b-0x21b,_0x31c9e1);}const _0x191c44=await this[_0x4b6a4c(0x24f,0x21e)](_0x4b6a4c(0x289,0x2d9),_0x4b6a4c(0x258,0x25b)+_0x336d37(0x37a,0x3bb)+_0x4b6a4c(0x1d5,0x229),{'skill_memory_id':_0x391adf[_0x4b6a4c(0x294,0x2a3)+_0x336d37(0x335,0x387)],'outcome':_0x391adf[_0x4b6a4c(0x26c,0x253)],'difficulty':_0x391adf[_0x4b6a4c(0x254,0x23f)],'context_tags':_0x391adf[_0x4b6a4c(0x285,0x269)+'gs'],'session_id':_0x391adf[_0x4b6a4c(0x2d0,0x2a0)]});return _0x191c44;}async[_0xb3cfa2(0x63,0x1a)+'iencyEvent'+_0x4b748f(0xe9,0x122)](_0x4030f5){function _0x2c0ce0(_0x364862,_0x1c2db0){return _0xb3cfa2(_0x1c2db0-0x2a3,_0x364862);}function _0x3aa3dd(_0x8f2eb8,_0xcdbf35){return _0xb3cfa2(_0x8f2eb8-0xb8,_0xcdbf35);}await this['request'](_0x3aa3dd(0x176,0x13e),'/api/v1/pr'+_0x2c0ce0(0x38b,0x31e)+_0x3aa3dd(0xb9,0xf3)+'h',{'events':_0x4030f5});}async[_0xb3cfa2(0xb5,0x87)+'iencies'](_0x2d49ee){const _0x222b90=new URLSearchParams();_0x222b90['set'](_0x4ff861(0x1c5,0x17e),_0x4ff861(0x193,0x197));function _0x12bb90(_0x4cf011,_0x4cee7c){return _0xb3cfa2(_0x4cf011-0x381,_0x4cee7c);}if(_0x2d49ee)_0x222b90[_0x4ff861(0x19d,0x16d)](_0x12bb90(0x42d,0x3cd)+'th',_0x2d49ee);function _0x4ff861(_0x16e53c,_0x3a3e58){return _0xb3cfa2(_0x3a3e58-0xd8,_0x16e53c);}const _0x4dcf5a='/api/v1/pr'+_0x4ff861(0x1a7,0x162)+_0x222b90[_0x12bb90(0x3e6,0x41b)](),_0x31ba4d=await this['request']('GET',_0x4dcf5a);return _0x31ba4d['items']??[];}async[_0xb3cfa2(0x2,0x5c)+_0xb3cfa2(0x53,0xaf)](_0x49ba9f){function _0x31690b(_0x2ba5f5,_0x256355){return _0xb3cfa2(_0x2ba5f5-0x43e,_0x256355);}function _0xe1abb8(_0x1fc77e,_0x58fdfd){return _0xb3cfa2(_0x58fdfd- -0x9f,_0x1fc77e);}return this[_0x31690b(0x441,0x49f)]('POST',_0x31690b(0x4dc,0x4a2)+_0x31690b(0x4f9,0x4dc)+_0x31690b(0x4d1,0x513)+_0xe1abb8(-0x2c,-0x83),{'message':_0x49ba9f['slice'](0x0,0x1f4)});}async[_0x4b748f(0x102,0xfe)+_0x4b748f(0xd7,0x129)](_0x1f2ac1,_0x1fc28c){const _0x324e8d=await this[_0x1a6de1(0x4a9,0x47e)](_0x1a6de1(0x564,0x508),'/api/v1/tr'+'ansfer/exp'+'ort',{'source_provider':_0x1f2ac1,'skill_ids':_0x1fc28c??null});function _0x1f7ad9(_0x4b33b8,_0x339ab2){return _0xb3cfa2(_0x339ab2-0x254,_0x4b33b8);}function _0x1a6de1(_0x1fb254,_0x1d248c){return _0xb3cfa2(_0x1fb254-0x4a6,_0x1d248c);}return _0x324e8d;}async[_0x4b748f(0x11e,0x16c)+_0xb3cfa2(0x72,0x3b)](_0x1e6936,_0x11d67c){function _0xa46076(_0x17ebe1,_0x3647a0){return _0x4b748f(_0x3647a0-0x2eb,_0x17ebe1);}const _0x33138d=await this[_0xa46076(0x346,0x353)](_0xa46076(0x403,0x40e),'/api/v1/tr'+'ansfer/imp'+_0xa46076(0x429,0x3f7),{'package':_0x1e6936,'target_provider':_0x11d67c});function _0x194533(_0x460f17,_0x9411d0){return _0x4b748f(_0x460f17- -0x197,_0x9411d0);}return _0x33138d;}async[_0xb3cfa2(0x7f,0x86)+_0xb3cfa2(0xa9,0x102)+'ix'](){const _0x5609f9=await this[_0x2a9a21(0xb4,0xe7)]('GET',_0x2a9a21(0x100,0xe6)+_0xe81c5b(0x471,0x41e)+_0xe81c5b(0x3b1,0x3a9));function _0xe81c5b(_0x3abacc,_0x3d1901){return _0xb3cfa2(_0x3d1901-0x3a1,_0x3abacc);}function _0x2a9a21(_0x429330,_0x17c9a0){return _0xb3cfa2(_0x429330-0xb1,_0x17c9a0);}return _0x5609f9[_0xe81c5b(0x43b,0x435)]??[];}async[_0x4b748f(0x98,0xf1)+'rHistory'](_0x4822cb=0x1){function _0x35e682(_0xaf9b8d,_0x46c46e){return _0x4b748f(_0x46c46e-0x131,_0xaf9b8d);}const _0x24bcb5=new URLSearchParams();_0x24bcb5[_0x35e682(0x20a,0x22b)]('page',_0x4822cb[_0x35e682(0x247,0x1fb)]());function _0x3b6bc6(_0x576e06,_0x4b758c){return _0x4b748f(_0x4b758c-0x27f,_0x576e06);}const _0x1f502e=_0x35e682(0x1c8,0x1e5)+_0x3b6bc6(0x352,0x33a)+_0x35e682(0x1cd,0x1c4)+_0x24bcb5['toString'](),_0x4d2492=await this['request'](_0x35e682(0x22c,0x1e8),_0x1f502e);return _0x4d2492;}async[_0xb3cfa2(-0xa,0xd)](_0x76a83b,_0x55a991){const {readFileSync:_0x5c1ded}=await import(_0x16b6c1(0x544,0x516)),{basename:_0x42d59b}=await import(_0x16b6c1(0x4c2,0x4e5)),_0x9d69d5=_0x5c1ded(_0x76a83b),_0x291670=_0x42d59b(_0x76a83b),_0x28827f=new FormData();_0x28827f['append'](_0x16b6c1(0x4e4,0x4dc),new Blob([_0x9d69d5]),_0x291670);function _0x16b6c1(_0x2a1f07,_0x3e1d59){return _0xb3cfa2(_0x3e1d59-0x4ca,_0x2a1f07);}function _0x59a5a0(_0x8f5784,_0x24c986){return _0xb3cfa2(_0x24c986-0x289,_0x8f5784);}_0x55a991[_0x59a5a0(0x2c3,0x287)]&&(_0x16b6c1(0x566,0x538)!=='qJhpi'?_0x28827f[_0x59a5a0(0x2e4,0x289)](_0x59a5a0(0x2f0,0x287),_0x55a991['category']):_0x5888f2[_0x59a5a0(0x23e,0x289)](_0x59a5a0(0x2f3,0x287),_0x104094[_0x16b6c1(0x4f3,0x4c8)]));_0x55a991[_0x16b6c1(0x5cc,0x57a)]&&_0x55a991[_0x16b6c1(0x5bc,0x57a)][_0x59a5a0(0x29d,0x2d3)]>0x0&&_0x28827f[_0x16b6c1(0x4e1,0x4ca)]('tags',_0x55a991['tags'][_0x16b6c1(0x546,0x4f6)](','));const _0x1a4d26=await this[_0x16b6c1(0x4e1,0x53b)+'tipart'](_0x59a5a0(0x343,0x347),_0x59a5a0(0x355,0x350)+_0x59a5a0(0x372,0x346),_0x28827f),_0x4c6348=_0x1a4d26;return{'id':_0x4c6348[_0x59a5a0(0x26a,0x2ca)],'filename':_0x4c6348[_0x16b6c1(0x593,0x527)]};}async['checkFileD'+_0x4b748f(0x74,0x6a)](_0x4eca12){function _0x5b0c96(_0x3506d0,_0x48092e){return _0x4b748f(_0x3506d0-0x1c3,_0x48092e);}const _0x569b22=await this['request'](_0x5b0c96(0x2e6,0x336),_0x4f4111(0xe5,0x86)+_0x4f4111(-0xf,0x4a)+_0x4f4111(0x97,0x70),{'content_hash':_0x4eca12}),_0x353378=_0x569b22;function _0x4f4111(_0x3d6b0f,_0x283244){return _0x4b748f(_0x283244- -0xa6,_0x3d6b0f);}return{'exists':_0x353378[_0x4f4111(-0x5b,-0x1e)+'te'],'file_id':_0x353378['existing_f'+_0x5b0c96(0x280,0x222)]?.['id']};}async[_0xb3cfa2(0x18,0x2f)+_0x4b748f(0xf4,0x110)](_0x11fcb0,_0x3b2af1,_0x427898){const _0x259b36=await this[_0x38d62d(-0xe3,-0xbc)]('POST',_0x5a58a9(0x3ea,0x40d)+_0x38d62d(-0xd9,-0x88),{'memory_id':_0x11fcb0,'file_id':_0x3b2af1,'reference_type':_0x427898['reference_'+_0x5a58a9(0x419,0x3f7)],'reference_path':_0x427898[_0x5a58a9(0x407,0x409)+_0x38d62d(-0x2a,0x32)]});function _0x5a58a9(_0x3bee57,_0x345e10){return _0xb3cfa2(_0x3bee57-0x3b3,_0x345e10);}function _0x38d62d(_0x4d8504,_0x454faf){return _0xb3cfa2(_0x4d8504- -0xe6,_0x454faf);}return _0x259b36;}async[_0xb3cfa2(0xca,0x10c)+_0x4b748f(0x95,0xdc)](_0x48202d){function _0x36f45f(_0x47c657,_0x2ce387){return _0xb3cfa2(_0x47c657- -0x1e8,_0x2ce387);}function _0x1201fb(_0x2dd046,_0x4ff793){return _0xb3cfa2(_0x2dd046- -0x106,_0x4ff793);}return this[_0x1201fb(-0x103,-0x145)](_0x1201fb(-0x48,-0xa0),'/api/v1/mc'+_0x1201fb(-0x9b,-0xf4),_0x48202d);}async['addContext'+_0x4b748f(0x107,0x114)](_0x1bca6c,_0x3f7865){function _0x49ab6f(_0x226cd5,_0x185766){return _0x4b748f(_0x185766-0x3f3,_0x226cd5);}function _0x55fe07(_0x41382e,_0x34d78e){return _0x4b748f(_0x41382e-0x28a,_0x34d78e);}return this[_0x49ab6f(0x43a,0x45b)](_0x55fe07(0x3ad,0x3b2),'/api/v1/mc'+_0x55fe07(0x35a,0x3a2)+'/'+_0x1bca6c+_0x49ab6f(0x56d,0x526),_0x3f7865);}async['createRela'+_0x4b748f(0xb8,0xe8)](_0x115885){function _0x5565c6(_0x2027a9,_0x5084f2){return _0xb3cfa2(_0x5084f2-0x9d,_0x2027a9);}function _0x304c51(_0x4093bf,_0x1f91cd){return _0xb3cfa2(_0x1f91cd-0x2b1,_0x4093bf);}return this[_0x5565c6(0xfa,0xa0)](_0x304c51(0x3c6,0x36f),'/api/v1/mc'+_0x5565c6(0xcb,0xbe)+'s',_0x115885);}async[_0x4b748f(0xfd,0xc3)+'ntent'](_0x85139c){function _0x1d6ddc(_0x502c25,_0x40ff1c){return _0xb3cfa2(_0x502c25-0x420,_0x40ff1c);}function _0x4d5547(_0x2fd514,_0x255fc9){return _0xb3cfa2(_0x255fc9-0x214,_0x2fd514);}try{const _0xf6d517=await this[_0x4d5547(0x278,0x217)](_0x4d5547(0x312,0x2d2),_0x1d6ddc(0x48f,0x4be)+_0x1d6ddc(0x4a0,0x47b)+_0x1d6ddc(0x448,0x48b),{'content':_0x85139c[_0x1d6ddc(0x436,0x3d1)]['slice'](0x0,0x7d0),'tags':_0x85139c[_0x1d6ddc(0x4d0,0x4ee)]??[],'category':_0x85139c['category']}),_0x14fdd2=_0xf6d517;if(_0x14fdd2[_0x1d6ddc(0x41b,0x40d)]&&_0x14fdd2[_0x1d6ddc(0x480,0x434)])return _0x14fdd2[_0x1d6ddc(0x480,0x495)];return null;}catch{if(_0x4d5547(0x1d0,0x21a)==='PBfzB')_0x340448['error'](_0x1d6ddc(0x464,0x4c4)+_0x1d6ddc(0x496,0x4d1)+_0x1d6ddc(0x459,0x452)+'failed\x20for'+'\x20'+_0x5843f3+':',_0x1bc9b6 instanceof _0x1ad45a?_0x5dd57e[_0x4d5547(0x258,0x21f)]:_0x72ebfc(_0x180e20));else return null;}}static [_0x4b748f(0x8a,0xdf)+'STATUS']=new Set([0x1ad,0x1f4,0x1f6,0x1f7,0x1f8]);static [_0x4b748f(0x62,0x50)+'S']=0x3;static ['BASE_DELAY'+_0xb3cfa2(0xa3,0x47)]=0x3e8;async[_0x4b748f(0x68,0xca)](_0x3aae90,_0xef130e,_0x4c78b6){function _0x515a1c(_0x3922ca,_0x47996c){return _0x4b748f(_0x3922ca-0x6,_0x47996c);}let _0x1e86e3;function _0x5289b6(_0x1fa678,_0x59860d){return _0x4b748f(_0x59860d- -0x82,_0x1fa678);}for(let _0x4f6708=0x0;_0x4f6708<A2AClient['MAX_RETRIE'+'S'];_0x4f6708++){const _0xf64ad7=''+this[_0x5289b6(0xa2,0xa6)][_0x5289b6(0xa7,0x45)]+_0xef130e,_0x317e35=new AbortController(),_0x42960b=setTimeout(()=>_0x317e35[_0x515a1c(0x6a,0x92)](),this[_0x5289b6(0x1f,0x61)]);try{if('LqHMp'==='LqHMp'){const _0x22939f=await fetch(_0xf64ad7,{'method':_0x3aae90,'headers':{'Content-Type':_0x515a1c(0x9a,0x90)+_0x5289b6(-0x1a,0x14),'x-api-key':this[_0x5289b6(0x7b,0xa6)]['apiKey'],'X-Plugin-Version':_pluginVersion,...this[_0x515a1c(0xc6,0x130)+_0x5289b6(0x6a,0x75)][_0x5289b6(0x1e,0x2d)]>0x0&&{'X-Plugin-Features':this[_0x5289b6(0xa,0x3e)+_0x5289b6(0x6a,0x75)][_0x515a1c(0x97,0x63)](',')}},'body':_0x4c78b6?JSON[_0x515a1c(0x13a,0x137)](_0x4c78b6):undefined,'signal':_0x317e35['signal']});clearTimeout(_0x42960b);if(A2AClient['RETRYABLE_'+_0x5289b6(0x14,0x10)][_0x5289b6(-0x4c,-0xd)](_0x22939f[_0x5289b6(0x18,0x33)])&&_0x4f6708<A2AClient[_0x515a1c(0x68,0x81)+'S']-0x1){if(_0x5289b6(-0x4e,-0x8)!==_0x515a1c(0xdf,0xb0)){const _0x272630=A2AClient[_0x515a1c(0x134,0x154)+'_MS']*Math[_0x515a1c(0x8b,0xe3)](0x2,_0x4f6708);await new Promise(_0x44c698=>setTimeout(_0x44c698,_0x272630));continue;}else return null;}!_0x22939f['ok']&&await this[_0x515a1c(0xe4,0x138)+_0x515a1c(0x118,0xf5)](_0x22939f);if(_0x3aae90===_0x515a1c(0x130,0x113)&&_0x22939f[_0x5289b6(-0x24,0x33)]===0xcc){if(_0x5289b6(0xf4,0x8e)!==_0x5289b6(0x5d,0x8e))_0x19bb6b['content']=_0x3f1be1(_0x67efb3,this[_0x5289b6(0x6a,0x66)+_0x515a1c(0xe7,0xc0)]);else return;}return await _0x22939f[_0x5289b6(0x68,0x71)]();}else _0x490ca8+=':\x20'+_0x259b32[_0x5289b6(0x7a,0x83)];}catch(_0x1242aa){clearTimeout(_0x42960b);if(_0x1242aa instanceof Error){if(getErrorStatus(_0x1242aa)!==undefined)throw _0x1242aa;if(_0x1242aa['message'][_0x5289b6(0xa,0x26)](_0x5289b6(0x30,0x7c))||_0x1242aa[_0x515a1c(0x76,0xb4)][_0x515a1c(0xae,0x10f)](_0x5289b6(0x9a,0x7f))||_0x1242aa[_0x515a1c(0x76,0x7b)][_0x515a1c(0xae,0xba)](_0x515a1c(0x65,0x2c))||_0x1242aa[_0x515a1c(0x76,0x9c)]['startsWith'](_0x515a1c(0xd4,0x13b))){if(_0x5289b6(0xaa,0xab)!==_0x5289b6(0xf7,0xab))return this[_0x515a1c(0xee,0x144)+_0x515a1c(0xe7,0xfa)]!==null;else throw _0x1242aa;}if(_0x4f6708<A2AClient['MAX_RETRIE'+'S']-0x1){_0x1e86e3=_0x1242aa;const _0x455b35=A2AClient[_0x515a1c(0x134,0xf0)+_0x5289b6(0xc2,0x86)]*Math[_0x515a1c(0x8b,0xf5)](0x2,_0x4f6708);await new Promise(_0x363bba=>setTimeout(_0x363bba,_0x455b35));continue;}if(_0x1242aa[_0x515a1c(0x7e,0xc7)]===_0x5289b6(0xcd,0xa3))throw new Error(_0x5289b6(0x2f,0x5b)+this['timeout']+_0x515a1c(0xc4,0x6f));throw new Error(_0x515a1c(0x9f,0x85)+_0x1242aa[_0x5289b6(-0x45,-0x12)]);}throw _0x1242aa;}}throw _0x1e86e3??new Error('요청\x20실패:\x20'+A2AClient[_0x515a1c(0x68,0x37)+'S']+_0x515a1c(0x75,0xc5));}async['requestMul'+_0xb3cfa2(0x32,0x91)](_0x26a27e,_0x52cf5b,_0x5ab27c){const _0x3ea353=''+this[_0x3856d0(-0xc,0x3d)][_0x4a8915(-0x206,-0x225)]+_0x52cf5b,_0x20e600=new AbortController();function _0x3856d0(_0x3a6bd8,_0x88cef8){return _0x4b748f(_0x3a6bd8- -0x134,_0x88cef8);}const _0x30d0b1=setTimeout(()=>_0x20e600[_0x3856d0(-0xd0,-0x117)](),this[_0x4a8915(-0x1ea,-0x236)]);function _0x4a8915(_0x3fb426,_0x4c6dc8){return _0x4b748f(_0x3fb426- -0x2cd,_0x4c6dc8);}try{if(_0x4a8915(-0x19d,-0x195)===_0x4a8915(-0x19d,-0x19e)){const _0x3f4a9e=await fetch(_0x3ea353,{'method':_0x26a27e,'headers':{'x-api-key':this['config']['apiKey'],'X-Plugin-Version':_pluginVersion},'body':_0x5ab27c,'signal':_0x20e600['signal']});clearTimeout(_0x30d0b1);if(!_0x3f4a9e['ok']){if(_0x4a8915(-0x1be,-0x157)!==_0x4a8915(-0x1a7,-0x164))await this[_0x4a8915(-0x1ef,-0x1b4)+_0x4a8915(-0x1bb,-0x1a3)](_0x3f4a9e);else throw new _0x263334(_0x4a8915(-0x1f0,-0x1b1)+this['timeout']+'ms를\x20넘었습니다');}return await _0x3f4a9e[_0x3856d0(-0x41,-0x67)]();}else return this[_0x3856d0(-0xcc,-0x10b)](_0x3856d0(-0x11,-0x51),'/api/v1/pe'+'rsonalizat'+_0x3856d0(-0x3c,-0x97)+'n/analyze',{'message':_0x34ee3d['slice'](0x0,0x1f4)});}catch(_0x1cbe61){clearTimeout(_0x30d0b1);if(_0x1cbe61 instanceof Error&&_0x1cbe61['name']==='AbortError')throw new Error(_0x3856d0(-0x57,0xc)+this[_0x3856d0(-0x51,-0x73)]+'ms를\x20넘었습니다');throw _0x1cbe61;}}async['handleErro'+'rResponse'](_0x49330e){function _0x1b111f(_0x4eba84,_0x370450){return _0x4b748f(_0x4eba84-0x1c9,_0x370450);}const _0x3a8e7b=_0x49330e[_0x272fa8(0x2ad,0x25e)];function _0x272fa8(_0x438ee2,_0x507d35){return _0x4b748f(_0x438ee2-0x1f8,_0x507d35);}if(_0x3a8e7b===0x191)throw withStatus(new Error(_0x1b111f(0x26a,0x24e)+_0x1b111f(0x2e6,0x2ec)+'요'),0x191);if(_0x3a8e7b===0x1ad)throw withStatus(new Error(_0x272fa8(0x2c4,0x25f)+_0x1b111f(0x292,0x2a2)),0x1ad);let _0x5a1efe=_0x1b111f(0x248,0x27b)+_0x3a8e7b;try{const _0x16cd18=await _0x49330e[_0x1b111f(0x2bc,0x2ca)]();if(Array[_0x1b111f(0x2f4,0x2d3)](_0x16cd18[_0x1b111f(0x2ce,0x2df)])){const _0x32019d=_0x16cd18[_0x1b111f(0x2ce,0x26f)][_0x272fa8(0x2b9,0x31a)](_0x248736=>{function _0xf6636c(_0x1686b9,_0xa68bb0){return _0x272fa8(_0xa68bb0- -0x1de,_0x1686b9);}function _0x5dc74c(_0x60d77c,_0x53070e){return _0x272fa8(_0x60d77c-0x299,_0x53070e);}const _0x315bb4=Array[_0x5dc74c(0x5bc,0x5e4)](_0x248736[_0xf6636c(0xd1,0x116)])?_0x248736['loc'][_0x5dc74c(0x522,0x550)]('.'):'',_0xe3e706=_0x248736[_0x5dc74c(0x51d,0x504)]??JSON[_0xf6636c(0x19d,0x14e)](_0x248736);return _0x315bb4?_0x315bb4+':\x20'+_0xe3e706:_0xe3e706;})[_0x1b111f(0x25a,0x20d)]('\x20|\x20');_0x5a1efe+=':\x20'+_0x32019d;}else{if(_0x16cd18[_0x272fa8(0x2fd,0x2c2)]){if('idbfC'===_0x1b111f(0x2fa,0x2ce))_0x5a1efe+=':\x20'+_0x16cd18[_0x1b111f(0x2ce,0x327)];else{const _0x5a88a0=_0x2ed43c(_0x3a42a0['content']);_0x5a88a0&&(_0x4ff654[_0x1b111f(0x244,0x27c)]=_0x574e6f(_0x5a88a0,this['encryption'+_0x1b111f(0x2aa,0x2be)]));}}else _0x16cd18['message']&&(_0x5a1efe+=':\x20'+_0x16cd18['message']);}}catch{}throw withStatus(new Error(_0x5a1efe),_0x3a8e7b);}}
1
+ function _0x4894(_0x385606,_0x516eab){_0x385606=_0x385606-0x189;const _0x54a04c=_0x54a0();let _0x4894e1=_0x54a04c[_0x385606];if(_0x4894['BscmVk']===undefined){var _0x2054bb=function(_0x4b18dc){const _0x412590='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25963b='',_0x719a11='';for(let _0x309b81=0x0,_0x2801cb,_0x195f83,_0x2f350f=0x0;_0x195f83=_0x4b18dc['charAt'](_0x2f350f++);~_0x195f83&&(_0x2801cb=_0x309b81%0x4?_0x2801cb*0x40+_0x195f83:_0x195f83,_0x309b81++%0x4)?_0x25963b+=String['fromCharCode'](0xff&_0x2801cb>>(-0x2*_0x309b81&0x6)):0x0){_0x195f83=_0x412590['indexOf'](_0x195f83);}for(let _0x5a3c41=0x0,_0x2b9677=_0x25963b['length'];_0x5a3c41<_0x2b9677;_0x5a3c41++){_0x719a11+='%'+('00'+_0x25963b['charCodeAt'](_0x5a3c41)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x719a11);};_0x4894['FCgsOB']=_0x2054bb,_0x4894['YHjMqI']={},_0x4894['BscmVk']=!![];}const _0x3691d7=_0x54a04c[0x0],_0x6b9254=_0x385606+_0x3691d7,_0x20c256=_0x4894['YHjMqI'][_0x6b9254];return!_0x20c256?(_0x4894e1=_0x4894['FCgsOB'](_0x4894e1),_0x4894['YHjMqI'][_0x6b9254]=_0x4894e1):_0x4894e1=_0x20c256,_0x4894e1;}(function(_0x158780,_0x589a08){function _0x1ac0a8(_0x43a125,_0x2301ef){return _0x4894(_0x2301ef-0x1eb,_0x43a125);}const _0x2afe33=_0x158780();function _0x354eb1(_0x35a425,_0x5bf3a0){return _0x4894(_0x5bf3a0- -0x320,_0x35a425);}while(!![]){try{const _0x3299ae=-parseInt(_0x1ac0a8(0x390,0x389))/0x1*(-parseInt(_0x354eb1(-0x1d1,-0x181))/0x2)+-parseInt(_0x1ac0a8(0x390,0x3c1))/0x3*(parseInt(_0x1ac0a8(0x463,0x420))/0x4)+-parseInt(_0x1ac0a8(0x343,0x39b))/0x5+parseInt(_0x354eb1(-0x106,-0xd4))/0x6+parseInt(_0x354eb1(-0x133,-0x109))/0x7+parseInt(_0x354eb1(-0x12d,-0x160))/0x8+-parseInt(_0x354eb1(-0x145,-0xf6))/0x9;if(_0x3299ae===_0x589a08)break;else _0x2afe33['push'](_0x2afe33['shift']());}catch(_0x1c67c7){_0x2afe33['push'](_0x2afe33['shift']());}}}(_0x54a0,0x7ac11));import{encryptContent,decryptContent,wrapEncryptedContent,unwrapEncryptedContent}from'./encryption.js';function _0x54a0(){const _0x2b5ef2=['AgfUzgXLrxjYBW','mta3mZGYnvDtzxjIBa','zw1VCNK','yxnZzw1IBgvdBW','Dg9YEt8','Dg9tDhjPBMC','Bg9J','yxbPs2v5','BgLTAxq','yw5ZzMvYl2HPCW','BgLZDfrLyw1Z','C3rYAw5NAwz5','zxzLBNqVyMf0yW','BNrLBNq','zw1VCNLgzwvKyG','DMvYC2LVBG','BgLZDfbYB2zPyW','nJCYmtu4ngvWzLrjwG','yw5ZzMvYl2LTCa','uK10Bha','C2vZC2LVBL9Pza','CMLLC0jHDgnO','zhvWBgLJyxrL','y3jLyxrLq29UDa','zNH0EMi','zM9Yy2vnzw1VCG','C2vHCMnO','C2v0','v0Tmv3y','lI4VlI4VCgfJAW','BgLZDfrLyw1nzq','zY9JB250zxH0CW','Bw9YAwvZlW','zgvSzxrLtwvTBW','ue9tva','Cgf0Aa','CMvXDwvZDa','B2zMC2v0','Bw9YEs1MAwXLCW','mJfvrg1byNC','AgfZ','sfruuca0mJi','7zUeioUlPoYlNcdSI5ZRJ4tTLzJSHlJSMPq','AM9PBG','C3LUyY9KzwX0yq','7j247kADioYlPo2mQdOGqvbj','B3v0y29Tzq','sfruuca0mdq','ANnVBG','CgfYC2u','BxpRPBWG64sy7jEi7iQ164Ui64UK','Cg9ZDfbYB2zPyW','Bw9YAwvZp2XPBq','l2fWAs92ms90CG','DgLVBG','B3j5','mc4WlJa','qwjVCNrfCNjVCG','Cgf0AwjPBgL0Eq','CMvZDwX0','Bwf4twvTB3jPzq','Bw9YAwvZl2jHDa','DhLWzq','BM9KztPMCW','w2eYyv0GCMvPBG','s2v5','yxvxve0','l2fWAs92ms9Tzq','BxnN','Eg9UB215l2nSyq','z2vUzxjHDgvezq','Axq9mq','qKftrv9eruXbwq','BgvUz3rO','Bw9YAwvZl2fZCW','C2v0rw5JCNLWDa','zxH0','l2fWAs92ms9TyW','Bwf4vg9Rzw5Z','BNrLEhq','CgfNzq','C3rHDhvZ','yw5ZzMvYl2v4Ca','EMXVz2i','v29frxm','Bw9YAwvZl3n0yq','DgLTzw91Da','y3jLyxrLtwvTBW','l2fWAs92ms90yq','tufyx1jfvfjjrq','y2XLyxjfBMnYEq','ihWG','BI9HBMfSExPL','7jQu7lkTioYlNoQWHcdSTiJQS7W6ia','B3j0','l3rLyw1ZlW','zMLSzq','BwfW','zw5JCNLWDgLVBG','BMfTzq','CLjLC3bVBNnL','x01t','twvTB3jPzxm','DxbSAwnHDgu','ndm0mJq3mwfdAuLVuG','z2v0ug9WDwXHCG','ChjVBw90zu1LBq','yMLSAxr5twf0CG','AwnPzw5JAwvZ','zgvJCNLWDe1LBq','vgfNCW','CNLFAwq','CNDivLe','ywnR','AxnFzhvWBgLJyq','BI9QC29U','yxbWzw5K','BgvZl3vWBg9Hza','AwXL','y29UDgv4Df90yq','Bwf0CML4','AwvUy3LfDMvUDa','BgLZDe1LBw9YAq','mte2nJi1ntfHq1rzrMm','rMvHDhvYzxm','y29UzMLN','BwvZC2fNzq','Cg93','DxbSB2fKrMLSzq','Aw9Ul2vTB3rPBW','CNLgAwXLtgLUAW','CKHPC3rVCNK','l21LBw9YAwvZlW','zxjYB3i','mta4mJKYq0PUBxj6','uKvuuLLbqKXfxW','yMvKzgLUzW','yNL0zxpSL6ZSLBWG7zwP64Ui','DxrMltG','B2zPy2LLBMn5lW','C2TPBgXFBwvTBW','Dhj1zq','BhrH','C2XPy2u','BgvZl2nOzwnRlq','CwfnwKW','zgv0ywLS','CY9WB3b1BgfYpW','Dg90ywXFBwvTBW','zY9YzwXHDgLVBG','l21LBw9YAwvZ','DxbKyxrLtwvTBW','DgLWyxj0','CMvMzxjLBMnLxW','zxHPC3rPBMDFzG','AxnbCNjHEq','Bw9YAwvZ','ntC1nZG0DhPMs29g','AxnfBMnYExb0Aq','BgfZDf9ZEw5Jzq','zwrKAw5N','y2f0zwDVCNK','zw5HyMXLzezLyq','zf9HDa','C3rHDhm','ywDLlMPZB24','AxrLBxm','yw5ZzMvYl2nVBq','EuzLzwrIywnRia','B2zPy2LLBMn5pW','DgLLCG','y2f0zwDVCMLLCW','C09ks0S','z2v0u3rHDhm','C3nPzNK','l2fWAs92ms9Wzq','CMLLCW','l2fWAs92ms90zq','r0vu','ywjVCNq','yw1Z','yw5HBhL6zuvTBW','u1rbvfvt','y2XHC3nPzNLdBW','mtaW','m015Efrzua','ndmWotm0zNrRAMXZ','y29UDgvUDa','DgfNCW','y2HLy2TgAwXLra','revmrvrf','yxbWBgLJyxrPBW','l2fWAs92ms9WCG','twvTyMvY','C3vJy2vZCW','BM9KztPWyxrO','l3jLAw5MB3jJzq','DhvYzxm','C2LNBMfS','C3rHCNrZv2L0Aa','CMvXDwvZDe11Ba','zgLMzMLJDwX0Eq'];_0x54a0=function(){return _0x2b5ef2;};return _0x54a0();}function withStatus(_0x5d2121,_0x16551c){return _0x5d2121['status']=_0x16551c,_0x5d2121;}export function getErrorStatus(_0x1d7425){function _0x4ef29e(_0x33bd38,_0x4beff1){return _0x4894(_0x33bd38- -0x255,_0x4beff1);}return _0x1d7425 instanceof Error?_0x1d7425[_0x4ef29e(-0x55,-0xb7)]:undefined;}let _pluginVersion='0.0.0';try{const {readFileSync}=await import(_0x985964(0x3c0,0x40d)),{fileURLToPath}=await import('node:url'),{dirname,join}=await import(_0x985964(0x37a,0x395)),__dirname=dirname(fileURLToPath(import.meta.url)),pkg=JSON[_0x35cbd2(0xa1,0x9d)](readFileSync(join(__dirname,_0x985964(0x39e,0x3ea)+_0x985964(0x35c,0x324)),_0x35cbd2(0xfa,0xd6)));_pluginVersion=pkg[_0x985964(0x390,0x3e0)]||_0x35cbd2(0xa8,0xec);}catch{}function _0x35cbd2(_0x536651,_0x175d0d){return _0x4894(_0x536651- -0x13f,_0x175d0d);}function _0x985964(_0x44fbc3,_0x1c7a9e){return _0x4894(_0x44fbc3-0x1d2,_0x1c7a9e);}export class A2AClient{['config'];[_0x35cbd2(0xc6,0x12a)];['encryption'+_0x985964(0x3c2,0x3fe)]=null;[_0x35cbd2(0x112,0xda)+_0x985964(0x37c,0x3cf)]=[];constructor(_0x16f1b2){function _0x132ac2(_0x2a071b,_0x1cbc70){return _0x985964(_0x1cbc70-0x5,_0x2a071b);}function _0x26537c(_0x57aa53,_0x4bea65){return _0x985964(_0x57aa53- -0x44f,_0x4bea65);}this[_0x26537c(-0x51,-0xac)]=_0x16f1b2,this['timeout']=_0x16f1b2[_0x26537c(-0x78,-0x86)]??0xea60;}['setEnabled'+_0x35cbd2(0xec,0xfe)](_0xdc5675){function _0x57f599(_0x5ae366,_0x27afcd){return _0x985964(_0x5ae366- -0x1,_0x27afcd);}this[_0x57f599(0x422,0x421)+'tures']=_0xdc5675;}[_0x35cbd2(0xbb,0x74)+'ionKey'](_0x4ea84a){function _0x454bc8(_0x917758,_0x28fc0a){return _0x985964(_0x28fc0a-0x1e5,_0x917758);}if(_0x4ea84a[_0x1f021d(0x37a,0x36f)]!==0x20)throw new Error('암호화\x20키는\x2032\x20'+_0x1f021d(0x3e2,0x3af)+'다');function _0x1f021d(_0x4997e,_0x3870b4){return _0x985964(_0x3870b4- -0x5b,_0x4997e);}this[_0x454bc8(0x599,0x5c8)+_0x1f021d(0x31f,0x367)]=_0x4ea84a;}[_0x985964(0x3db,0x3fe)+'ptionKey'](){function _0x290ddc(_0x281589,_0x565eaf){return _0x985964(_0x281589- -0xf3,_0x565eaf);}this['encryption'+_0x290ddc(0x2cf,0x2e5)]=null;}[_0x985964(0x41f,0x3bb)+'onEnabled'](){function _0x204f10(_0x1ad735,_0x4c8a4a){return _0x35cbd2(_0x4c8a4a-0x127,_0x1ad735);}return this[_0x204f10(0x19f,0x1f9)+'Key']!==null;}async[_0x985964(0x3d8,0x3c3)+'ry'](_0x388673){let _0x3b213f=_0x388673[_0x4869f2(0x272,0x25b)];if(this[_0x587a8f(-0x4e,-0x7d)+_0x587a8f(-0x6f,-0x64)]){const _0xfca9cb=encryptContent(_0x388673[_0x587a8f(-0xbf,-0x89)],this[_0x4869f2(0x2e3,0x2e9)+'Key']);_0x3b213f=wrapEncryptedContent(_0xfca9cb);}const _0x204db4=await this[_0x587a8f(-0x8c,-0xd1)](_0x587a8f(-0x8e,-0x36),_0x4869f2(0x2c4,0x28a)+_0x587a8f(-0x14,-0x58),{'content':_0x3b213f,'category':_0x388673[_0x4869f2(0x322,0x319)],'tier':_0x388673[_0x4869f2(0x261,0x24c)],'tags':_0x388673['tags']??[]});function _0x4869f2(_0x16a9df,_0x6d3732){return _0x985964(_0x16a9df- -0x100,_0x6d3732);}function _0x587a8f(_0xd6365f,_0x295dbc){return _0x985964(_0xd6365f- -0x431,_0x295dbc);}const _0x22f64a=_0x204db4;if(this[_0x4869f2(0x2e3,0x32a)+_0x587a8f(-0x6f,-0xe)]&&_0x22f64a[_0x587a8f(-0xbf,-0x6b)]){const _0x54f429=unwrapEncryptedContent(_0x22f64a[_0x4869f2(0x272,0x20d)]);_0x54f429&&(_0x22f64a['content']=decryptContent(_0x54f429,this[_0x587a8f(-0x4e,-0xac)+'Key']));}return _0x22f64a;}async['searchMemo'+_0x35cbd2(0x56,0x84)](_0x351694,_0x30e069){const _0x35d15f=await this[_0x470a79(0xa5,0x9c)](_0xe38b2d(0x2fc,0x317),_0x470a79(0xc4,0x65)+'mories/sea'+'rch',{'query':_0x351694,'limit':_0x30e069?.['limit']??0xa,'category':_0x30e069?.[_0xe38b2d(0x3af,0x396)]});function _0x470a79(_0x51cde4,_0x321f68){return _0x35cbd2(_0x51cde4-0x11,_0x321f68);}function _0xe38b2d(_0xed4b83,_0x404aea){return _0x35cbd2(_0x404aea-0x285,_0xed4b83);}return _0x35d15f[_0xe38b2d(0x2cd,0x2d1)]??[];}async[_0x35cbd2(0xea,0xb4)+'es'](_0x297dea){const _0xec634e=new URLSearchParams();if(_0x297dea?.['limit'])_0xec634e[_0x387c65(0x571,0x592)](_0x2c364c(-0x41,-0x31),_0x297dea[_0x2c364c(-0x41,-0x76)]['toString']());if(_0x297dea?.[_0x2c364c(-0x24,-0x10)])_0xec634e[_0x2c364c(-0x2e,-0x16)](_0x2c364c(-0x24,-0x47),_0x297dea[_0x387c65(0x5d5,0x59c)][_0x2c364c(-0x44,-0x61)]());if(_0x297dea?.['includeEmb'+_0x2c364c(0x57,0x2d)])_0xec634e['set']('include_em'+_0x2c364c(0x3f,0x21),_0x387c65(0x615,0x604));const _0x4424a2=_0x387c65(0x58b,0x5ba)+_0x2c364c(0x53,0x15)+(_0xec634e[_0x2c364c(-0x44,-0x91)]()?'?'+_0xec634e['toString']():'');function _0x2c364c(_0x535b1d,_0x46276d){return _0x35cbd2(_0x535b1d- -0xb9,_0x46276d);}const _0x390d82=await this[_0x2c364c(-0x25,-0x83)](_0x387c65(0x5a0,0x55f),_0x4424a2),_0x44960d=_0x390d82[_0x2c364c(-0x6d,-0x16)]??[];function _0x387c65(_0xa21538,_0x2193da){return _0x35cbd2(_0x2193da-0x507,_0xa21538);}if(this['encryption'+_0x2c364c(-0x8,-0x1d)])return _0x44960d['map'](_0x4bc603=>this[_0x2c364c(0x24,0x62)+_0x2c364c(-0x12,-0x2a)](_0x4bc603));return _0x44960d;}[_0x35cbd2(0xdd,0x92)+'ory'](_0x238277){function _0x1c6e24(_0x23fb5d,_0x975756){return _0x35cbd2(_0x23fb5d- -0xf1,_0x975756);}function _0x1998ab(_0x4a1538,_0x2cf469){return _0x35cbd2(_0x4a1538-0x4e,_0x2cf469);}if(!this['encryption'+_0x1998ab(0xff,0xec)])return _0x238277;const _0x5f3138={..._0x238277};if(_0x5f3138['content']){const _0x586978=unwrapEncryptedContent(_0x5f3138[_0x1998ab(0xaf,0x110)]);if(_0x586978)try{_0x5f3138['content']=decryptContent(_0x586978,this[_0x1998ab(0x120,0xd5)+_0x1998ab(0xff,0x9b)]);}catch{}}return _0x5f3138;}async[_0x35cbd2(0x107,0x154)+'ry'](_0x14ee08,_0x557c98){function _0x11c81b(_0x32b332,_0x291e91){return _0x985964(_0x32b332- -0x509,_0x291e91);}const _0x26cb36=await this[_0x369b41(0x3cc,0x3b9)]('PUT',_0x369b41(0x3ec,0x3d8)+_0x11c81b(-0x168,-0x145)+_0x14ee08,_0x557c98);function _0x369b41(_0x38e5fc,_0x20f5f5){return _0x985964(_0x20f5f5-0x14,_0x38e5fc);}return _0x26cb36;}async[_0x35cbd2(0x91,0xcd)+'ry'](_0x412ee9){function _0x40ec59(_0x8c1efb,_0x175dcf){return _0x985964(_0x175dcf- -0x361,_0x8c1efb);}function _0x57d160(_0x33eb36,_0xe45181){return _0x985964(_0xe45181-0xdb,_0x33eb36);}await this[_0x57d160(0x48b,0x480)](_0x40ec59(-0x4c,0x14),_0x40ec59(0x4f,0x63)+'mories/'+_0x412ee9);}async[_0x985964(0x38b,0x33c)](){function _0x451346(_0x532a6e,_0x25bfc8){return _0x35cbd2(_0x532a6e- -0x26b,_0x25bfc8);}const _0x4adbd9=await this[_0x451346(-0x1d7,-0x176)](_0x36a8c3(0x23b,0x1ef),_0x451346(-0x214,-0x273)+_0x451346(-0x211,-0x1e7));if(Array[_0x451346(-0x160,-0x151)](_0x4adbd9))return _0x4adbd9;function _0x36a8c3(_0x113e5c,_0x3898ca){return _0x35cbd2(_0x3898ca-0x197,_0x113e5c);}return _0x4adbd9[_0x36a8c3(0x230,0x1e3)]??[];}async[_0x35cbd2(0x8e,0x67)+_0x985964(0x41d,0x446)](_0x14bfe1,_0x18fc44){function _0x372719(_0x3429db,_0x56b8ea){return _0x35cbd2(_0x56b8ea-0xff,_0x3429db);}const _0x5ec880=new URLSearchParams();function _0x89ae19(_0xc68cfc,_0x1bd9ad){return _0x35cbd2(_0xc68cfc- -0x22f,_0x1bd9ad);}if(_0x18fc44?.[_0x89ae19(-0x1b7,-0x1c9)])_0x5ec880[_0x89ae19(-0x1a4,-0x1f4)](_0x89ae19(-0x1b7,-0x1b6),_0x18fc44[_0x372719(0x17c,0x177)][_0x89ae19(-0x1ba,-0x17e)]());if(_0x18fc44?.[_0x89ae19(-0x19a,-0x1e9)])_0x5ec880[_0x89ae19(-0x1a4,-0x19a)](_0x372719(0x1e9,0x194),_0x18fc44[_0x372719(0x15d,0x194)][_0x89ae19(-0x1ba,-0x217)]());const _0x3b8827=_0x5ec880[_0x372719(0x1bd,0x174)](),_0x1055c8='/teams/'+encodeURIComponent(_0x14bfe1)+_0x372719(0x263,0x205)+(_0x3b8827?'?'+_0x3b8827:''),_0x479a54=await this[_0x89ae19(-0x19b,-0x1d2)]('GET',_0x1055c8);return _0x479a54[_0x89ae19(-0x1e3,-0x20e)]??[];}async['addTeamMem'+_0x985964(0x3b8,0x393)](_0x287b54,_0x2eb19a){function _0x2928ff(_0x22d83b,_0xed788d){return _0x35cbd2(_0x22d83b- -0x163,_0xed788d);}function _0x32715e(_0x30e6b6,_0xebc909){return _0x35cbd2(_0x30e6b6- -0x67,_0xebc909);}const _0x5c8ac5=await this[_0x2928ff(-0xcf,-0x7a)](_0x2928ff(-0xd1,-0xe4),'/teams/'+encodeURIComponent(_0x287b54)+'/memories',_0x2eb19a);return _0x5c8ac5;}async['searchTeam'+_0x985964(0x3e7,0x3c4)](_0x5ad5fd,_0x42c402,_0x4a5849){function _0x49790a(_0x204db,_0x552e91){return _0x985964(_0x204db-0xa7,_0x552e91);}function _0x102f3a(_0x8a5ab9,_0x1f37d6){return _0x985964(_0x8a5ab9- -0x2aa,_0x1f37d6);}const _0x2a03be=await this['request']('POST',_0x102f3a(0x136,0xf7)+encodeURIComponent(_0x5ad5fd)+(_0x49790a(0x4ac,0x4ea)+_0x49790a(0x442,0x46d)),{'query':_0x42c402,'limit':_0x4a5849?.['limit']??0xa,'category':_0x4a5849?.[_0x102f3a(0x178,0x161)]});return _0x2a03be[_0x49790a(0x404,0x3a4)]??[];}async[_0x35cbd2(0xb6,0x112)+_0x985964(0x40f,0x44c)](_0x516436,_0x384b67,_0x1716f2){function _0x188c37(_0x3c2b2e,_0x4068ee){return _0x985964(_0x3c2b2e-0x5b,_0x4068ee);}function _0x53d22b(_0x1fb987,_0x10f4ab){return _0x985964(_0x10f4ab- -0x56b,_0x1fb987);}return this[_0x188c37(0x400,0x439)]('POST',_0x188c37(0x43b,0x3e2)+encodeURIComponent(_0x516436)+(_0x53d22b(-0x146,-0x166)+_0x53d22b(-0x1ee,-0x1be)),{'memory_id':_0x384b67,'vector_clock':_0x1716f2});}async['applyDelta'](_0x4a6ca0,_0x2b07fc,_0x5f61ed){function _0x4b6a04(_0xe986c2,_0x2f40e7){return _0x35cbd2(_0xe986c2-0x8a,_0x2f40e7);}function _0x31d503(_0x40fffa,_0x2d3f46){return _0x35cbd2(_0x40fffa-0x4f7,_0x2d3f46);}return this[_0x31d503(0x58b,0x542)]('POST',_0x31d503(0x5c6,0x61f)+encodeURIComponent(_0x4a6ca0)+(_0x31d503(0x5eb,0x5d9)+'sync/apply'),{'memory_id':_0x2b07fc,'delta':_0x5f61ed});}async[_0x985964(0x3d8,0x3d2)+_0x35cbd2(0x85,0xa5)](_0x523c5f){const _0x3cbdc1=await this[_0x591274(0x2a1,0x2fd)](_0x591274(0x29f,0x2d6),'/api/v1/me'+_0x1297c1(0x5da,0x5c9)+'ch',{'items':_0x523c5f});function _0x591274(_0x25323f,_0x454cca){return _0x985964(_0x25323f- -0x104,_0x454cca);}function _0x1297c1(_0x4ad732,_0x2ff2b5){return _0x985964(_0x2ff2b5-0x20b,_0x4ad732);}return _0x3cbdc1;}async['testConnec'+_0x35cbd2(0xa6,0xbf)](){function _0x392625(_0x3e5147,_0x40de9c){return _0x35cbd2(_0x3e5147-0x186,_0x40de9c);}function _0x2e46a9(_0x16a365,_0x5d3971){return _0x35cbd2(_0x16a365-0x5a,_0x5d3971);}try{return await this['request'](_0x2e46a9(0xb2,0xa0),_0x392625(0x239,0x25f)+_0x392625(0x22a,0x1f5)+_0x2e46a9(0x111,0x15b)),!![];}catch{return![];}}async[_0x35cbd2(0x73,0x26)+_0x985964(0x3d0,0x3fe)](_0x4a5f1c,_0x222b0a){function _0x170659(_0x3e7a20,_0xc9d613){return _0x35cbd2(_0x3e7a20-0x20a,_0xc9d613);}function _0x386d87(_0x4c05d,_0x4563d8){return _0x35cbd2(_0x4563d8- -0x153,_0x4c05d);}const _0x5e6e04=await this[_0x386d87(-0xed,-0xbf)](_0x386d87(-0x112,-0xc1),_0x386d87(-0xf1,-0xa0)+_0x386d87(-0xa2,-0x99)+'emble',{'query':_0x4a5f1c,'max_memories':_0x222b0a?.[_0x386d87(-0xa4,-0xa7)+'s']??0x5,'max_tokens':_0x222b0a?.[_0x170659(0x2c8,0x2af)]??0x7d0,'categories':_0x222b0a?.[_0x170659(0x25b,0x262)],'tier':_0x222b0a?.[_0x386d87(-0x130,-0x103)]});return _0x5e6e04;}async['reinforceM'+_0x985964(0x383,0x373)](_0x5e1479){function _0x49742b(_0x269740,_0x534f48){return _0x35cbd2(_0x534f48-0x424,_0x269740);}function _0x208baa(_0x57b06a,_0x21a2e4){return _0x35cbd2(_0x57b06a-0x412,_0x21a2e4);}const _0x500737=await this[_0x49742b(0x4d8,0x4b8)](_0x49742b(0x4c3,0x4b6),'/api/v1/me'+'mories/'+_0x5e1479+_0x208baa(0x47c,0x4cf));return _0x500737;}async['reinforceM'+_0x35cbd2(0x7e,0xa3)+_0x35cbd2(0xe1,0x13c)](_0x4c91bb,_0x5d0ff3){function _0x5494c2(_0x33ce3e,_0xf9d9b3){return _0x35cbd2(_0x33ce3e- -0x11c,_0xf9d9b3);}function _0x268493(_0x3c9bea,_0x369c51){return _0x35cbd2(_0x3c9bea- -0x274,_0x369c51);}try{await this[_0x5494c2(-0x88,-0x66)](_0x268493(-0x1e2,-0x197),_0x268493(-0x1c1,-0x205)+_0x268493(-0x1e4,-0x1d5)+_0x4c91bb+_0x268493(-0x20a,-0x1dc),{'success':_0x5d0ff3});}catch(_0x3fe85d){console[_0x268493(-0x17f,-0x18e)](_0x268493(-0x1c4,-0x1fc)+_0x268493(-0x1eb,-0x240)+_0x5494c2(-0xce,-0xa2)+'failed\x20for'+'\x20'+_0x4c91bb+':',_0x3fe85d instanceof Error?_0x3fe85d[_0x268493(-0x186,-0x1a3)]:String(_0x3fe85d));}}async[_0x985964(0x3eb,0x3b9)+_0x985964(0x3b8,0x3b3)](_0x399576,_0x30ed8f){function _0x4b6945(_0x1dc311,_0x38cee1){return _0x35cbd2(_0x38cee1-0x2cb,_0x1dc311);}const _0xf0fc06=await this[_0x4b6945(0x382,0x35f)](_0x20810a(-0xf4,-0x14c),'/api/v1/me'+'mories/'+_0x399576+'/promote');function _0x20810a(_0x179c22,_0x464a98){return _0x35cbd2(_0x464a98- -0x1de,_0x179c22);}return _0xf0fc06;}async[_0x985964(0x364,0x3ab)](){const _0x5990cc=await this[_0x53bb98(0x97,0xc7)](_0x27d8b0(0x1a7,0x1e2),_0x53bb98(0x13c,0xe6)+_0x53bb98(0xae,0xf8)+'ts');function _0x53bb98(_0x49e36e,_0x347c5f){return _0x985964(_0x347c5f- -0x2de,_0x49e36e);}function _0x27d8b0(_0x53aa56,_0x55555b){return _0x985964(_0x53aa56- -0x1c2,_0x55555b);}return _0x5990cc;}async[_0x35cbd2(0xd9,0x110)+_0x35cbd2(0xde,0xc1)](_0x41d013=0xa){const _0x5265bd=new URLSearchParams();_0x5265bd['set'](_0x313782(0x55d,0x569),_0x41d013[_0x313782(0x57d,0x566)]());const _0x4113fb=_0x313782(0x563,0x5a4)+'mories/tag'+_0x2fd134(0x503,0x543)+_0x5265bd[_0x313782(0x55a,0x566)]();function _0x2fd134(_0x4afb6d,_0x5a9be9){return _0x35cbd2(_0x4afb6d-0x400,_0x5a9be9);}function _0x313782(_0x1885ac,_0x2e37b5){return _0x35cbd2(_0x2e37b5-0x4f1,_0x1885ac);}const _0x37a89a=await this[_0x2fd134(0x494,0x4d7)](_0x313782(0x5a4,0x549),_0x4113fb);return _0x37a89a[_0x2fd134(0x44c,0x442)]??[];}async['getTeamSta'+'ts'](_0x3dbf94){function _0x5e45e1(_0x1cad51,_0x443538){return _0x35cbd2(_0x443538-0x3e7,_0x1cad51);}const _0x1bc7df=await this[_0x5c717b(0x436,0x49a)](_0x5e45e1(0x435,0x43f),_0x5c717b(0x4a2,0x4d5)+encodeURIComponent(_0x3dbf94)+(_0x5e45e1(0x4dd,0x4db)+_0x5c717b(0x433,0x450)));function _0x5c717b(_0x4ee374,_0x55f5a5){return _0x35cbd2(_0x55f5a5-0x406,_0x4ee374);}const _0x4a16cb=_0x1bc7df,_0x5699e9=_0x4a16cb[_0x5c717b(0x45d,0x450)]??_0x4a16cb;return{'totalMemories':_0x5699e9[_0x5c717b(0x565,0x50a)+_0x5e45e1(0x44a,0x43d)]??0x0,'totalNodes':_0x5699e9['total_node'+'s']??0x0,'lastSyncedAt':_0x5699e9[_0x5c717b(0x4b3,0x515)+_0x5e45e1(0x50d,0x4fa)]??null};}async[_0x35cbd2(0xa3,0xa9)+_0x35cbd2(0xe9,0x128)](_0x4ec1b1){function _0x542092(_0x5b879c,_0x44af8a){return _0x985964(_0x44af8a- -0x72,_0x5b879c);}function _0x3a9c38(_0x27c1c1,_0x665ecd){return _0x985964(_0x665ecd- -0x2c4,_0x27c1c1);}const _0x5651f2=await this[_0x542092(0x2ee,0x333)]('POST','/api/v1/pr'+'oficiency/'+'event',{'skill_memory_id':_0x4ec1b1[_0x3a9c38(0x11d,0x149)+_0x542092(0x357,0x37e)],'outcome':_0x4ec1b1[_0x542092(0x358,0x33d)],'difficulty':_0x4ec1b1[_0x3a9c38(0xdc,0xbc)],'context_tags':_0x4ec1b1[_0x3a9c38(0x13f,0x134)+'gs'],'session_id':_0x4ec1b1[_0x542092(0x2e2,0x323)]});return _0x5651f2;}async[_0x985964(0x3b4,0x360)+_0x985964(0x3fa,0x436)+'Batch'](_0x374f80){function _0x421a56(_0xe50d32,_0x1351c7){return _0x985964(_0xe50d32- -0x41f,_0x1351c7);}function _0xc81642(_0x5d3052,_0x106542){return _0x985964(_0x5d3052- -0x4e7,_0x106542);}await this['request'](_0x421a56(-0x7c,-0x9d),'/api/v1/pr'+_0x421a56(-0x13,0x12)+_0xc81642(-0x15a,-0x18d)+'h',{'events':_0x374f80});}async[_0x985964(0x391,0x3be)+'iencies'](_0x53faef){const _0xd27537=new URLSearchParams();function _0x466d06(_0x3e054a,_0x248bc2){return _0x35cbd2(_0x3e054a-0x3df,_0x248bc2);}_0xd27537[_0x19b082(-0x227,-0x1f4)]('page_size',_0x466d06(0x43d,0x455));if(_0x53faef)_0xd27537[_0x19b082(-0x1b5,-0x1f4)]('project_pa'+'th',_0x53faef);const _0x14ee00=_0x466d06(0x445,0x3e1)+_0x19b082(-0x1fa,-0x230)+_0xd27537[_0x466d06(0x454,0x40d)](),_0x2d161b=await this['request'](_0x19b082(-0x227,-0x227),_0x14ee00);function _0x19b082(_0x186214,_0x166ffc){return _0x35cbd2(_0x166ffc- -0x27f,_0x186214);}return _0x2d161b[_0x19b082(-0x24d,-0x233)]??[];}async[_0x985964(0x36c,0x389)+_0x35cbd2(0xa6,0xb2)](_0x1b419c){function _0x3e1055(_0x3dc65f,_0xd7b78e){return _0x985964(_0x3dc65f- -0x8c,_0xd7b78e);}function _0x2a2d36(_0x377bb3,_0x175fa1){return _0x985964(_0x377bb3- -0x71,_0x175fa1);}return this[_0x3e1055(0x319,0x2c6)](_0x3e1055(0x317,0x30d),_0x3e1055(0x2da,0x2db)+'rsonalizat'+_0x3e1055(0x376,0x336)+_0x2a2d36(0x36c,0x377),{'message':_0x1b419c[_0x2a2d36(0x39f,0x35f)](0x0,0x1f4)});}async['exportProf'+_0x985964(0x3ed,0x3a5)](_0x399f59,_0x41f406){const _0x359c15=await this[_0x4e4a70(0x2c4,0x2c1)](_0x35eb83(0x34d,0x2f4),_0x35eb83(0x31c,0x307)+_0x35eb83(0x31a,0x324)+_0x4e4a70(0x2fe,0x362),{'source_provider':_0x399f59,'skill_ids':_0x41f406??null});function _0x35eb83(_0x11a3db,_0x3772fa){return _0x35cbd2(_0x3772fa-0x262,_0x11a3db);}function _0x4e4a70(_0x353aa3,_0x28f7b0){return _0x35cbd2(_0x353aa3-0x230,_0x28f7b0);}return _0x359c15;}async['importProf'+_0x35cbd2(0xdc,0x9c)](_0x31fdf4,_0x28691c){function _0x220044(_0x49e35d,_0x4b083e){return _0x985964(_0x4b083e-0x1e5,_0x49e35d);}function _0x164184(_0x1eda70,_0x2e3838){return _0x985964(_0x2e3838- -0x2aa,_0x1eda70);}const _0x2ea580=await this[_0x220044(0x531,0x58a)](_0x164184(0x116,0xf9),_0x164184(0x15d,0x10c)+_0x164184(0xf8,0xe9)+_0x220044(0x60a,0x5c4),{'package':_0x31fdf4,'target_provider':_0x28691c});return _0x2ea580;}async['getCompati'+_0x35cbd2(0xdb,0x109)+'ix'](){function _0x263a86(_0x4f074b,_0x2cd4bd){return _0x35cbd2(_0x4f074b- -0x2a3,_0x2cd4bd);}const _0x17959f=await this[_0x4e8ab3(0x57a,0x55d)](_0x4e8ab3(0x53e,0x4f7),_0x4e8ab3(0x58b,0x53a)+_0x263a86(-0x256,-0x2ba)+_0x4e8ab3(0x590,0x599));function _0x4e8ab3(_0x170a31,_0x4bae3a){return _0x35cbd2(_0x170a31-0x4e6,_0x4bae3a);}return _0x17959f[_0x263a86(-0x1bb,-0x1e1)]??[];}async['getTransfe'+_0x985964(0x404,0x3c3)](_0x59cba5=0x1){function _0x11003c(_0x58efed,_0x1cff7f){return _0x985964(_0x1cff7f-0x1fe,_0x58efed);}const _0x72f024=new URLSearchParams();_0x72f024[_0x182cc0(0x34d,0x322)](_0x11003c(0x5bc,0x5cf),_0x59cba5['toString']());const _0x3fcb7d='/api/v1/tr'+_0x11003c(0x56e,0x588)+_0x182cc0(0x2fd,0x30b)+_0x72f024[_0x11003c(0x58a,0x584)]();function _0x182cc0(_0x2190b4,_0x12fdfc){return _0x985964(_0x12fdfc- -0x7a,_0x2190b4);}const _0x117641=await this[_0x11003c(0x5ff,0x5a3)](_0x11003c(0x57c,0x567),_0x3fcb7d);return _0x117641;}async[_0x985964(0x401,0x3ca)](_0x41efea,_0x44a000){const {readFileSync:_0x1fef5d}=await import(_0x3a0971(0x5d1,0x621)),{basename:_0x44780b}=await import('node:path'),_0x15b3d7=_0x1fef5d(_0x41efea),_0x25887a=_0x44780b(_0x41efea),_0x1cc0b0=new FormData();_0x1cc0b0[_0x3a0971(0x606,0x5b9)](_0x3a0971(0x5f2,0x5b2),new Blob([_0x15b3d7]),_0x25887a);_0x44a000['category']&&_0x1cc0b0[_0x21a536(0x4c8,0x4b7)](_0x3a0971(0x633,0x65a),_0x44a000[_0x3a0971(0x633,0x5f0)]);_0x44a000['tags']&&_0x44a000[_0x3a0971(0x584,0x530)]['length']>0x0&&_0x1cc0b0['append']('tags',_0x44a000[_0x3a0971(0x584,0x526)][_0x3a0971(0x5bd,0x564)](','));const _0x577386=await this[_0x21a536(0x499,0x441)+_0x3a0971(0x62a,0x647)](_0x3a0971(0x5b4,0x584),'/api/v1/fi'+_0x21a536(0x4e8,0x4b8),_0x1cc0b0);function _0x3a0971(_0x585c33,_0x38a6ea){return _0x35cbd2(_0x585c33-0x522,_0x38a6ea);}function _0x21a536(_0x27eebc,_0x280f79){return _0x35cbd2(_0x280f79-0x3d3,_0x27eebc);}const _0x1a811c=_0x577386;return{'id':_0x1a811c['file_id'],'filename':_0x1a811c['filename']};}async[_0x985964(0x374,0x31e)+_0x35cbd2(0xd7,0x94)](_0x3b5e3c){function _0x13a7e3(_0xf01dc3,_0x196aa5){return _0x985964(_0x196aa5-0x113,_0xf01dc3);}const _0x1d2cfd=await this[_0x58d1ca(0x566,0x547)](_0x58d1ca(0x4eb,0x545),'/api/v1/fi'+_0x13a7e3(0x501,0x524)+_0x58d1ca(0x520,0x539),{'content_hash':_0x3b5e3c}),_0x135842=_0x1d2cfd;function _0x58d1ca(_0xd5a184,_0x12b136){return _0x985964(_0x12b136-0x1a2,_0xd5a184);}return{'exists':_0x135842[_0x58d1ca(0x57c,0x595)+'te'],'file_id':_0x135842[_0x13a7e3(0x580,0x52e)+_0x13a7e3(0x501,0x50a)]?.['id']};}async[_0x985964(0x3d8,0x387)+_0x985964(0x403,0x3d4)](_0x2e0252,_0x576e2a,_0x13b805){const _0xeeb928=await this[_0x1e6d78(-0x19c,-0x1ff)]('POST',_0x1e6d78(-0x219,-0x1e0)+_0x1e6d78(-0x233,-0x1fd),{'memory_id':_0x2e0252,'file_id':_0x576e2a,'reference_type':_0x13b805[_0x5c7ec7(0x378,0x316)+_0x1e6d78(-0x226,-0x1e5)],'reference_path':_0x13b805[_0x1e6d78(-0x1b7,-0x18a)+_0x1e6d78(-0x25a,-0x200)]});function _0x5c7ec7(_0x2052c8,_0x4a7651){return _0x985964(_0x4a7651- -0x104,_0x2052c8);}function _0x1e6d78(_0x454926,_0x44ff7b){return _0x985964(_0x44ff7b- -0x5a4,_0x454926);}return _0xeeb928;}async[_0x35cbd2(0x87,0xe4)+_0x35cbd2(0xbc,0x120)](_0xd952db){function _0x2f24ed(_0x31499f,_0x6c6fc){return _0x985964(_0x31499f- -0x19,_0x6c6fc);}function _0x13fe6f(_0x46a116,_0x29a971){return _0x985964(_0x29a971- -0x23c,_0x46a116);}return this[_0x13fe6f(0x147,0x169)]('POST',_0x2f24ed(0x3b5,0x351)+_0x2f24ed(0x387,0x353),_0xd952db);}async['addContext'+_0x985964(0x378,0x3bf)](_0x3da555,_0x4b7482){function _0x12998d(_0x3860c5,_0x88bfda){return _0x35cbd2(_0x88bfda- -0xdd,_0x3860c5);}function _0xabce8d(_0x1806e0,_0x47bc53){return _0x35cbd2(_0x47bc53-0x51e,_0x1806e0);}return this['request'](_0xabce8d(0x561,0x5b0),_0xabce8d(0x5a8,0x5db)+_0xabce8d(0x54a,0x5ad)+'/'+_0x3da555+'/members',_0x4b7482);}async['createRela'+_0x985964(0x3b7,0x40d)](_0x465975){function _0x276507(_0x2f7fac,_0x2746cb){return _0x985964(_0x2f7fac-0x4,_0x2746cb);}function _0x424a90(_0x3c8f33,_0x373439){return _0x985964(_0x3c8f33- -0x2b,_0x373439);}return this[_0x424a90(0x37a,0x319)]('POST',_0x276507(0x3d2,0x3f1)+_0x424a90(0x3eb,0x40f)+'s',_0x465975);}async[_0x35cbd2(0x5d,0x5b)+_0x985964(0x38e,0x3c8)](_0x1e85f8){function _0x5f2ae9(_0x326a88,_0x27ba2c){return _0x985964(_0x27ba2c- -0xdd,_0x326a88);}function _0x1fd1c7(_0x12cf0c,_0x2b2130){return _0x985964(_0x2b2130-0x35,_0x12cf0c);}try{const _0x3779b1=await this[_0x1fd1c7(0x3e8,0x3da)](_0x1fd1c7(0x3f6,0x3d8),_0x1fd1c7(0x3b1,0x40e)+_0x1fd1c7(0x427,0x3fb)+_0x1fd1c7(0x3f9,0x39a),{'content':_0x1e85f8[_0x1fd1c7(0x3e9,0x3a7)][_0x1fd1c7(0x49c,0x445)](0x0,0x7d0),'tags':_0x1e85f8[_0x1fd1c7(0x3d8,0x3a8)]??[],'category':_0x1e85f8[_0x1fd1c7(0x422,0x457)]}),_0x311ea1=_0x3779b1;if(_0x311ea1[_0x1fd1c7(0x3de,0x3ae)]&&_0x311ea1['result'])return _0x311ea1[_0x1fd1c7(0x3ff,0x3f1)];return null;}catch{return null;}}static [_0x35cbd2(0xf7,0x146)+_0x35cbd2(0x5c,0x82)]=new Set([0x1ad,0x1f4,0x1f6,0x1f7,0x1f8]);static [_0x35cbd2(0xc9,0x95)+'S']=0x3;static [_0x985964(0x3c9,0x3b1)+_0x35cbd2(0xd5,0xf1)]=0x3e8;async['request'](_0x56f157,_0x31773e,_0x5cd6aa){function _0x23c46e(_0x27a99c,_0x553c8c){return _0x35cbd2(_0x27a99c-0xb7,_0x553c8c);}let _0x4428d3;function _0x3e14f4(_0x317bec,_0x915f0c){return _0x35cbd2(_0x915f0c-0x427,_0x317bec);}for(let _0x149b4a=0x0;_0x149b4a<A2AClient[_0x23c46e(0x180,0x1be)+'S'];_0x149b4a++){const _0x2654e7=''+this[_0x23c46e(0x1a4,0x199)]['baseUrl']+_0x31773e,_0x90d85d=new AbortController(),_0x4487a9=setTimeout(()=>_0x90d85d[_0x3e14f4(0x4a7,0x480)](),this[_0x3e14f4(0x506,0x4ed)]);try{const _0x166dd6=await fetch(_0x2654e7,{'method':_0x56f157,'headers':{'Content-Type':_0x3e14f4(0x46c,0x48c)+_0x3e14f4(0x504,0x50a),'x-api-key':this[_0x23c46e(0x1a4,0x151)][_0x23c46e(0x12e,0xd6)],'X-Plugin-Version':_pluginVersion,...this[_0x23c46e(0x1c9,0x174)+_0x23c46e(0x122,0xec)][_0x3e14f4(0x4b2,0x4e0)]>0x0&&{'X-Plugin-Features':this[_0x3e14f4(0x523,0x539)+'tures'][_0x23c46e(0x152,0x10f)](',')}},'body':_0x5cd6aa?JSON[_0x23c46e(0x132,0x121)](_0x5cd6aa):undefined,'signal':_0x90d85d[_0x3e14f4(0x463,0x493)]});clearTimeout(_0x4487a9);if(A2AClient[_0x3e14f4(0x4f9,0x51e)+'STATUS'][_0x3e14f4(0x507,0x4bf)](_0x166dd6['status'])&&_0x149b4a<A2AClient[_0x23c46e(0x180,0x1bb)+'S']-0x1){const _0x114734=A2AClient['BASE_DELAY'+_0x3e14f4(0x51e,0x4fc)]*Math[_0x23c46e(0x1a6,0x17a)](0x2,_0x149b4a);await new Promise(_0xd80edc=>setTimeout(_0xd80edc,_0x114734));continue;}!_0x166dd6['ok']&&await this[_0x3e14f4(0x487,0x497)+_0x23c46e(0x18b,0x1cc)](_0x166dd6);if(_0x56f157==='DELETE'&&_0x166dd6[_0x3e14f4(0x532,0x4e8)]===0xcc)return;return await _0x166dd6[_0x3e14f4(0x4b6,0x4c7)]();}catch(_0x2babcf){clearTimeout(_0x4487a9);if(_0x2babcf instanceof Error){if(_0x23c46e(0x17b,0x185)===_0x23c46e(0x143,0x158))throw _0x2012e7;else{if(getErrorStatus(_0x2babcf)!==undefined){if(_0x23c46e(0x197,0x167)===_0x3e14f4(0x4ea,0x507))throw _0x2babcf;else _0x3e5719+=':\x20'+_0x5eb1db[_0x3e14f4(0x56e,0x529)];}if(_0x2babcf['message']['startsWith']('인증\x20실패')||_0x2babcf[_0x3e14f4(0x4d5,0x515)][_0x23c46e(0x124,0x177)]('HTTP\x20403')||_0x2babcf['message']['startsWith'](_0x3e14f4(0x493,0x4c6))||_0x2babcf[_0x23c46e(0x1a5,0x15c)][_0x23c46e(0x124,0x151)](_0x3e14f4(0x51d,0x4c0))){if(_0x23c46e(0x1b8,0x1e5)!==_0x3e14f4(0x554,0x528))this[_0x3e14f4(0x54d,0x539)+'tures']=_0x1fbb78;else throw _0x2babcf;}if(_0x149b4a<A2AClient[_0x23c46e(0x180,0x157)+'S']-0x1){if('fxtzb'===_0x3e14f4(0x4e0,0x4af)){_0x4428d3=_0x2babcf;const _0x4d2ce7=A2AClient[_0x23c46e(0x16f,0x117)+'_MS']*Math[_0x23c46e(0x1a6,0x1ed)](0x2,_0x149b4a);await new Promise(_0x338e3a=>setTimeout(_0x338e3a,_0x4d2ce7));continue;}else{const _0x4ed9d0=_0x569472[_0x23c46e(0x1b9,0x197)]['map'](_0x247b82=>{const _0x141662=_0xd06128['isArray'](_0x247b82[_0x30e875(0x1ca,0x1e7)])?_0x247b82[_0x36d755(-0x16b,-0x1bf)][_0x36d755(-0x146,-0x18e)]('.'):'',_0x4f0933=_0x247b82[_0x30e875(0x208,0x264)]??_0x387b4b[_0x30e875(0x1cf,0x1e4)](_0x247b82);function _0x36d755(_0x47d4a8,_0x13ffc0){return _0x23c46e(_0x47d4a8- -0x298,_0x13ffc0);}function _0x30e875(_0x3ede95,_0x57ebc1){return _0x23c46e(_0x3ede95-0x9d,_0x57ebc1);}return _0x141662?_0x141662+':\x20'+_0x4f0933:_0x4f0933;})['join']('\x20|\x20');_0x1684ae+=':\x20'+_0x4ed9d0;}}if(_0x2babcf['name']===_0x23c46e(0x160,0x137)){if('fehon'===_0x3e14f4(0x4d2,0x4ea))return _0x4b840c[_0x23c46e(0x188,0x143)](_0x45c123=>this[_0x23c46e(0x194,0x16a)+_0x23c46e(0x15e,0x16d)](_0x45c123));else throw new Error(_0x3e14f4(0x50b,0x4f4)+this[_0x3e14f4(0x545,0x4ed)]+_0x3e14f4(0x50f,0x4c9));}throw new Error('네트워크\x20오류:\x20'+_0x2babcf['message']);}}throw _0x2babcf;}}throw _0x4428d3??new Error('요청\x20실패:\x20'+A2AClient[_0x3e14f4(0x501,0x4f0)+'S']+'회\x20재시도\x20후\x20실패');}async['requestMul'+_0x985964(0x419,0x421)](_0x439558,_0x2df721,_0x4586b6){const _0x18eb28=''+this[_0xc3755f(-0x44,-0x1e)]['baseUrl']+_0x2df721;function _0xc3755f(_0x41842b,_0x259884){return _0x985964(_0x259884- -0x41c,_0x41842b);}const _0x5d827c=new AbortController();function _0x34a04d(_0x1fe329,_0x2c47c1){return _0x985964(_0x2c47c1-0xb2,_0x1fe329);}const _0x14ffff=setTimeout(()=>_0x5d827c[_0xc3755f(-0xcf,-0xb2)](),this[_0xc3755f(-0x9e,-0x45)]);try{if(_0x34a04d(0x3bc,0x415)===_0x34a04d(0x3c2,0x415)){const _0x1e8b23=await fetch(_0x18eb28,{'method':_0x439558,'headers':{'x-api-key':this[_0x34a04d(0x493,0x4b0)]['apiKey'],'X-Plugin-Version':_pluginVersion},'body':_0x4586b6,'signal':_0x5d827c['signal']});return clearTimeout(_0x14ffff),!_0x1e8b23['ok']&&await this[_0x34a04d(0x412,0x433)+_0x34a04d(0x4d1,0x497)](_0x1e8b23),await _0x1e8b23[_0x34a04d(0x41a,0x463)]();}else throw _0x309eab;}catch(_0x53b39d){clearTimeout(_0x14ffff);if(_0x53b39d instanceof Error&&_0x53b39d[_0x34a04d(0x4cc,0x496)]==='AbortError')throw new Error(_0xc3755f(0x1,-0x3e)+this[_0x34a04d(0x4ca,0x489)]+_0x34a04d(0x44c,0x465));throw _0x53b39d;}}async[_0x35cbd2(0x70,0x8d)+_0x985964(0x3e5,0x404)](_0x2b047d){function _0x3c81a2(_0x357ac5,_0x4f9843){return _0x985964(_0x4f9843- -0x36f,_0x357ac5);}const _0xd98338=_0x2b047d[_0x3c81a2(0x33,0x63)];if(_0xd98338===0x191){if('RMtlp'===_0x285159(0xf8,0xc6))throw withStatus(new Error(_0x285159(0x114,0xe0)+'\x20Key를\x20확인하세'+'요'),0x191);else return _0x2801cb[_0x285159(0x165,0x104)]=_0x195f83,_0x2f350f;}if(_0xd98338===0x1ad)throw withStatus(new Error('요청\x20제한:\x20잠시\x20'+_0x285159(0xe9,0xdd)),0x1ad);function _0x285159(_0x58e9ab,_0x33a3e2){return _0x985964(_0x33a3e2- -0x2ce,_0x58e9ab);}let _0x1742f6='HTTP\x20'+_0xd98338;try{if(_0x285159(0xa5,0xf5)!==_0x285159(0x152,0xf5))throw new _0x539d39(_0x285159(0xbc,0x110)+this[_0x285159(0x132,0x109)]+_0x285159(0xc7,0xe5));else{const _0xfe3fa6=await _0x2b047d[_0x285159(0xc2,0xe3)]();if(Array[_0x3c81a2(0xe2,0xad)](_0xfe3fa6[_0x3c81a2(0x80,0xa4)])){const _0x5835ee=_0xfe3fa6[_0x3c81a2(0x99,0xa4)][_0x3c81a2(0x72,0x73)](_0x4da6a3=>{function _0x31a90f(_0x49e9b4,_0x1beb7e){return _0x285159(_0x49e9b4,_0x1beb7e-0x1bd);}const _0x36aa87=Array['isArray'](_0x4da6a3[_0x31a90f(0x249,0x276)])?_0x4da6a3[_0xe3adbc(0x221,0x249)][_0xe3adbc(0x297,0x26e)]('.'):'',_0x5c218b=_0x4da6a3['msg']??JSON[_0x31a90f(0x237,0x27b)](_0x4da6a3);function _0xe3adbc(_0x5d62c4,_0x1fd2f4){return _0x285159(_0x5d62c4,_0x1fd2f4-0x190);}return _0x36aa87?_0x36aa87+':\x20'+_0x5c218b:_0x5c218b;})[_0x285159(0xd7,0xde)](_0x285159(0x13b,0x10e));_0x1742f6+=':\x20'+_0x5835ee;}else{if(_0xfe3fa6[_0x285159(0x14c,0x145)])_0x1742f6+=':\x20'+_0xfe3fa6[_0x3c81a2(0xc6,0xa4)];else _0xfe3fa6['message']&&(_0x1742f6+=':\x20'+_0xfe3fa6['message']);}}}catch{}throw withStatus(new Error(_0x1742f6),_0xd98338);}}
@@ -1 +1 @@
1
- (function(_0x31430f,_0x21dc5d){const _0x13d150=_0x31430f();function _0x1286ff(_0x3590a2,_0x491b89){return _0x505c(_0x491b89-0x147,_0x3590a2);}function _0x23c5dd(_0x5dfd77,_0x54757e){return _0x505c(_0x54757e-0x136,_0x5dfd77);}while(!![]){try{const _0x5dd735=-parseInt(_0x1286ff(0x2c2,0x2b5))/0x1*(parseInt(_0x23c5dd(0x2b6,0x2bd))/0x2)+parseInt(_0x23c5dd(0x2b0,0x298))/0x3*(-parseInt(_0x1286ff(0x2c5,0x2b8))/0x4)+-parseInt(_0x23c5dd(0x2c1,0x2c2))/0x5*(parseInt(_0x1286ff(0x2c5,0x2b1))/0x6)+-parseInt(_0x23c5dd(0x2a0,0x2b2))/0x7+parseInt(_0x23c5dd(0x299,0x29b))/0x8*(-parseInt(_0x23c5dd(0x2c4,0x2b9))/0x9)+parseInt(_0x23c5dd(0x2af,0x2b8))/0xa+parseInt(_0x23c5dd(0x2c6,0x2c5))/0xb;if(_0x5dd735===_0x21dc5d)break;else _0x13d150['push'](_0x13d150['shift']());}catch(_0x5195b4){_0x13d150['push'](_0x13d150['shift']());}}}(_0x400e,0x82fc3));function _0x400e(){const _0x32b5ed=['C3rYAw5N','ruXftuvova','zgf0yq','64Ui64UKicJTMitSNQW6ia','7j6e67kG65sPioUZTE2yUo2zLcdSI6tTJkG','y29Uy2f0','yNL0zu9MzNnLDa','DxbKyxrL','C3nYq00','yNL0zuXLBMD0Aa','mZiWnZK2meDgvuXJEG','BwvZC2fNzq','zw5JCNLWDgvK','CgfYC2u','DxrMltG','EvvstMi','odC2mZC2mgjtsMfTrG','nZeXwej3y0rR','7jwu7zI47zMu65cCioYEHoUYOoUuQsdRJBa','7jwu7zI47zMuio2cPoUkLca','qLLurvnFuevsxW','mZCYB2X6sKLK','y2LWAgvYDgv4Da','C2HHnteY','Dg9tDhjPBMC','z2v0qxv0AfrHzW','mZe3nZe4nvb3yvriBq','DgfN','zNjVBq','mJmXotG1odjZC2D3AgK','BgvUz3rO','mti5mtm1oxrdyvnNDq','yNvMzMvY','igj5DgvZ7jES7jw8io2vQq','oti5mJbIuLDrwKK','zMLUywW','ioUnSoYDTo2eScdRS4dSOBaP','ywvZlti1nI1NyW','DuvdAeG','nLrjwLbSAa','C3vIyxjYyxK','yMfZzty0','C2v0qxv0AfrHzW','mZHzvMrrD3O','B2jQzwn0','wuHRvha','ng5YB092Aa'];_0x400e=function(){return _0x32b5ed;};return _0x400e();}function _0xeb7ffa(_0x1c2da6,_0x743cb4){return _0x505c(_0x1c2da6- -0xe3,_0x743cb4);}import{randomBytes,createCipheriv,createDecipheriv,pbkdf2Sync}from'node:crypto';const ALGORITHM=_0x3e707a(0x2b4,0x2b9)+'m',KEY_LENGTH=0x20,IV_LENGTH=0xc,TAG_LENGTH=0x10,SALT_LENGTH=0x10,PBKDF2_ITERATIONS=0x186a0,PBKDF2_DIGEST=_0xeb7ffa(0xa6,0x94);export function generateEncryptionKey(){return randomBytes(KEY_LENGTH);}function _0x3e707a(_0x35edd0,_0x5232f4){return _0x505c(_0x5232f4-0x151,_0x35edd0);}export function deriveKey(_0x5a4d06,_0x48a5d8){const _0x3cfa2f=_0x48a5d8??randomBytes(SALT_LENGTH),_0x1f7962=pbkdf2Sync(_0x5a4d06,_0x3cfa2f,PBKDF2_ITERATIONS,KEY_LENGTH,PBKDF2_DIGEST);return{'key':_0x1f7962,'salt':_0x3cfa2f};}function _0x505c(_0x343546,_0x11ad83){_0x343546=_0x343546-0x161;const _0x400e40=_0x400e();let _0x505c18=_0x400e40[_0x343546];if(_0x505c['PHOspl']===undefined){var _0x4e2850=function(_0x4789ca){const _0x13fbb1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1871cc='',_0x57da76='';for(let _0x1a20fd=0x0,_0x1ce73e,_0x560307,_0x47e626=0x0;_0x560307=_0x4789ca['charAt'](_0x47e626++);~_0x560307&&(_0x1ce73e=_0x1a20fd%0x4?_0x1ce73e*0x40+_0x560307:_0x560307,_0x1a20fd++%0x4)?_0x1871cc+=String['fromCharCode'](0xff&_0x1ce73e>>(-0x2*_0x1a20fd&0x6)):0x0){_0x560307=_0x13fbb1['indexOf'](_0x560307);}for(let _0x40cd31=0x0,_0x3ffbcc=_0x1871cc['length'];_0x40cd31<_0x3ffbcc;_0x40cd31++){_0x57da76+='%'+('00'+_0x1871cc['charCodeAt'](_0x40cd31)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x57da76);};_0x505c['bSPRWe']=_0x4e2850,_0x505c['mJErGs']={},_0x505c['PHOspl']=!![];}const _0xe3f830=_0x400e40[0x0],_0x1a727d=_0x343546+_0xe3f830,_0x480d17=_0x505c['mJErGs'][_0x1a727d];return!_0x480d17?(_0x505c18=_0x505c['bSPRWe'](_0x505c18),_0x505c['mJErGs'][_0x1a727d]=_0x505c18):_0x505c18=_0x480d17,_0x505c18;}export function encryptContent(_0x5220ed,_0x3946e0){if(_0x3946e0[_0x460c52(0x268,0x27b)]!==KEY_LENGTH)throw new Error(_0x42e6ce(0x12c,0x13a)+KEY_LENGTH+('\x20bytes여야\x20합'+_0x42e6ce(0x124,0x12a))+_0x3946e0[_0x42e6ce(0x108,0x116)]+')');function _0x42e6ce(_0x3c5216,_0x16a117){return _0xeb7ffa(_0x16a117-0x98,_0x3c5216);}const _0x1e5c55=randomBytes(IV_LENGTH),_0x51790c=createCipheriv(ALGORITHM,_0x3946e0,_0x1e5c55),_0x1b909b=Buffer[_0x42e6ce(0x135,0x143)](_0x5220ed,_0x42e6ce(0x124,0x135)),_0x3c48d1=Buffer[_0x42e6ce(0x130,0x12c)]([_0x51790c[_0x42e6ce(0x140,0x12e)](_0x1b909b),_0x51790c[_0x460c52(0x286,0x280)]()]),_0x39aa1b=_0x51790c[_0x460c52(0x294,0x2a5)]();function _0x460c52(_0x13a2cf,_0x49fd57){return _0xeb7ffa(_0x49fd57-0x1fd,_0x13a2cf);}return{'ciphertext':_0x3c48d1[_0x42e6ce(0x140,0x13f)](_0x460c52(0x294,0x286)),'iv':_0x1e5c55[_0x460c52(0x295,0x2a4)]('base64'),'tag':_0x39aa1b[_0x42e6ce(0x133,0x13f)](_0x460c52(0x28d,0x286))};}export function decryptContent(_0x268e42,_0x15f08e){if(_0x15f08e['length']!==KEY_LENGTH)throw new Error(_0x62b59d(0x441,0x429)+KEY_LENGTH+('\x20bytes여야\x20합'+_0x550510(0x150,0x156))+_0x15f08e[_0x62b59d(0x41c,0x405)]+')');function _0x550510(_0x412388,_0x143df4){return _0xeb7ffa(_0x143df4-0xc4,_0x412388);}const _0x489e34=Buffer[_0x62b59d(0x436,0x432)](_0x268e42['iv'],_0x550510(0x138,0x14d)),_0x314bff=Buffer[_0x550510(0x15e,0x16f)](_0x268e42[_0x550510(0x17e,0x169)],'base64'),_0x54bd87=Buffer[_0x550510(0x15d,0x16f)](_0x268e42['tag'],_0x62b59d(0x40a,0x410));function _0x62b59d(_0x34ae60,_0x485292){return _0xeb7ffa(_0x485292-0x387,_0x34ae60);}const _0x3b5561=createDecipheriv(ALGORITHM,_0x15f08e,_0x489e34);_0x3b5561['setAuthTag'](_0x54bd87);try{const _0x56aef6=Buffer[_0x62b59d(0x423,0x41b)]([_0x3b5561[_0x550510(0x16b,0x15a)](_0x314bff),_0x3b5561[_0x550510(0x14f,0x147)]()]);return _0x56aef6[_0x62b59d(0x443,0x42e)](_0x62b59d(0x42c,0x424));}catch(_0x7a4d7){if(_0x7a4d7 instanceof Error)throw new Error('복호화\x20실패:\x20'+_0x7a4d7[_0x550510(0x173,0x15e)]+('\x20(잘못된\x20키\x20또는'+_0x62b59d(0x3f9,0x40b)));throw _0x7a4d7;}}export function encryptEmbedding(_0x4316c0,_0x3e9bc8){const _0x2a99bf=new Float64Array(_0x4316c0),_0x201a7b=Buffer[_0x42beb7(-0x20b,-0x20d)](_0x2a99bf['buffer']);function _0xf3d099(_0x5f2889,_0x32c65d){return _0xeb7ffa(_0x32c65d- -0x74,_0x5f2889);}const _0x187f33=randomBytes(IV_LENGTH),_0x41fe26=createCipheriv(ALGORITHM,_0x3e9bc8,_0x187f33),_0x302f83=Buffer[_0xf3d099(0x2b,0x20)]([_0x41fe26[_0xf3d099(0xf,0x22)](_0x201a7b),_0x41fe26['final']()]),_0xd6cf25=_0x41fe26[_0x42beb7(-0x1ff,-0x210)]();function _0x42beb7(_0x42e196,_0x2b8085){return _0xeb7ffa(_0x2b8085- -0x2b8,_0x42e196);}const _0x3dfd24=Buffer['concat']([_0x187f33,_0xd6cf25,_0x302f83]);return _0x3dfd24[_0x42beb7(-0x21c,-0x211)](_0x42beb7(-0x21c,-0x22f));}export function decryptEmbedding(_0x43e3a1,_0x49c8a6){const _0x24a16c=Buffer[_0x890a64(0x52,0x68)](_0x43e3a1,_0x5e27c0(-0x1d0,-0x1db));if(_0x24a16c['length']<IV_LENGTH+TAG_LENGTH){if(_0x890a64(0x2d,0x2f)===_0x5e27c0(-0x1e5,-0x1d7))return _0x1a20fd(_0x1ce73e);else throw new Error(_0x890a64(0x48,0x45)+'이터가\x20너무\x20짧습니'+'다');}const _0x2fe197=_0x24a16c['subarray'](0x0,IV_LENGTH),_0x347fdf=_0x24a16c[_0x890a64(0x2f,0x24)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x3fe4e8=_0x24a16c[_0x890a64(0x2f,0x32)](IV_LENGTH+TAG_LENGTH);function _0x890a64(_0x406f48,_0x14f894){return _0x3e707a(_0x14f894,_0x406f48- -0x28d);}function _0x5e27c0(_0x115ecb,_0x204ef4){return _0x3e707a(_0x115ecb,_0x204ef4- -0x498);}const _0x2e7694=createDecipheriv(ALGORITHM,_0x49c8a6,_0x2fe197);_0x2e7694[_0x5e27c0(-0x1e1,-0x1da)](_0x347fdf);try{const _0x1b6198=Buffer[_0x5e27c0(-0x1e4,-0x1d0)]([_0x2e7694[_0x890a64(0x3d,0x3a)](_0x3fe4e8),_0x2e7694[_0x890a64(0x2a,0x3c)]()]),_0x1cd840=new Float64Array(_0x1b6198[_0x890a64(0x27,0x3a)],_0x1b6198[_0x5e27c0(-0x1d7,-0x1cf)],_0x1b6198['byteLength']/Float64Array[_0x5e27c0(-0x1b7,-0x1c1)+_0x890a64(0x37,0x35)]);return Array[_0x5e27c0(-0x1ab,-0x1b9)](_0x1cd840);}catch(_0x46ff0b){if(_0x46ff0b instanceof Error)throw new Error(_0x890a64(0x3a,0x34)+':\x20'+_0x46ff0b[_0x890a64(0x41,0x47)]);throw _0x46ff0b;}}export function isValidEncryptedPayload(_0x2eccbf){if(typeof _0x2eccbf!==_0x54c4e5(0x111,0x10c)||_0x2eccbf===null)return![];const _0x1af25c=_0x2eccbf;function _0x54c4e5(_0x34525f,_0x256533){return _0x3e707a(_0x34525f,_0x256533- -0x1b4);}function _0x7518f2(_0x5e5809,_0x2ae75f){return _0x3e707a(_0x5e5809,_0x2ae75f-0x35);}return typeof _0x1af25c[_0x54c4e5(0x11f,0x125)]===_0x7518f2(0x304,0x2f8)&&typeof _0x1af25c['iv']===_0x7518f2(0x306,0x2f8)&&typeof _0x1af25c['tag']===_0x54c4e5(0xfe,0x10f);}export function wrapEncryptedContent(_0xdc5040){function _0x59d45c(_0x100034,_0x19e651){return _0xeb7ffa(_0x19e651- -0xd4,_0x100034);}return JSON['stringify']({'encrypted':!![],'data':_0xdc5040[_0x59d45c(-0x24,-0x2f)],'iv':_0xdc5040['iv'],'tag':_0xdc5040['tag']});}export function unwrapEncryptedContent(_0x64ed2b){function _0x44791f(_0x48acbd,_0x53d9a2){return _0x3e707a(_0x53d9a2,_0x48acbd- -0x133);}function _0x5e0801(_0x308f5d,_0x1a2af6){return _0x3e707a(_0x308f5d,_0x1a2af6-0x211);}try{if(_0x5e0801(0x4e4,0x4dc)===_0x5e0801(0x4d0,0x4dc)){const _0x165dab=JSON[_0x5e0801(0x4df,0x4e1)](_0x64ed2b);if(_0x165dab[_0x44791f(0x19c,0x189)]!==!![])return null;if(typeof _0x165dab[_0x44791f(0x192,0x188)]!=='string'||typeof _0x165dab['iv']!=='string'||typeof _0x165dab[_0x44791f(0x1ab,0x19f)]!==_0x5e0801(0x4e6,0x4d4))return null;return{'ciphertext':_0x165dab[_0x44791f(0x192,0x1a1)],'iv':_0x165dab['iv'],'tag':_0x165dab[_0x44791f(0x1ab,0x19a)]};}else{const _0x4c17cc=_0xf01974[_0x5e0801(0x4cf,0x4d9)]([_0x4de0d7[_0x44791f(0x197,0x181)](_0xd73bc0),_0x44eb2e[_0x44791f(0x184,0x192)]()]),_0x476c0e=new _0x281937(_0x4c17cc[_0x44791f(0x181,0x184)],_0x4c17cc[_0x44791f(0x196,0x1a1)],_0x4c17cc[_0x5e0801(0x4e3,0x4dd)]/_0x583642[_0x5e0801(0x4eb,0x4e8)+_0x5e0801(0x4c5,0x4d5)]);return _0x504e35[_0x5e0801(0x4f8,0x4f0)](_0x476c0e);}}catch{if(_0x44791f(0x19f,0x187)===_0x5e0801(0x4d7,0x4e3))return null;else throw new _0x186b37(_0x44791f(0x1a3,0x1ba)+_0x4521a6+(_0x5e0801(0x4d3,0x4c6)+_0x5e0801(0x4c0,0x4d7))+_0x2fa030[_0x5e0801(0x4b7,0x4c3)]+')');}}
1
+ (function(_0x657c06,_0x4fbed5){const _0xb35314=_0x657c06();function _0x6b23ee(_0x1881a9,_0x14ebd1){return _0x1b21(_0x14ebd1- -0x1bc,_0x1881a9);}function _0x1d4611(_0x46ffa6,_0x177cb5){return _0x1b21(_0x46ffa6-0x3e4,_0x177cb5);}while(!![]){try{const _0x17ef9d=parseInt(_0x1d4611(0x532,0x53c))/0x1*(parseInt(_0x1d4611(0x521,0x518))/0x2)+parseInt(_0x1d4611(0x512,0x4fb))/0x3*(parseInt(_0x1d4611(0x518,0x52e))/0x4)+-parseInt(_0x6b23ee(-0x76,-0x86))/0x5+parseInt(_0x6b23ee(-0x79,-0x89))/0x6*(parseInt(_0x6b23ee(-0xa4,-0x8d))/0x7)+-parseInt(_0x1d4611(0x52a,0x529))/0x8+-parseInt(_0x6b23ee(-0x84,-0x7e))/0x9*(-parseInt(_0x6b23ee(-0x86,-0x90))/0xa)+parseInt(_0x6b23ee(-0x54,-0x69))/0xb;if(_0x17ef9d===_0x4fbed5)break;else _0xb35314['push'](_0xb35314['shift']());}catch(_0x25dd99){_0xb35314['push'](_0xb35314['shift']());}}}(_0x3bbb,0xa7cc8));import{randomBytes,createCipheriv,createDecipheriv,pbkdf2Sync}from'node:crypto';function _0x3e5a0c(_0x36673f,_0x618de1){return _0x1b21(_0x36673f-0x3bc,_0x618de1);}const ALGORITHM=_0x3e5a0c(0x504,0x501)+'m';function _0x215ac8(_0xafab07,_0x2cbcc2){return _0x1b21(_0x2cbcc2-0x19a,_0xafab07);}function _0x3bbb(){const _0x539840=['C3vIyxjYyxK','7j207ysW6RcaioUeIoUSTcdSP6FSIRxRI4G','C2vAvha','zNjVBq','yNL0zu9MzNnLDa','B2jQzwn0','mtiXntq2mePeuejMqG','CgfYC2u','mtmWmZi5wNbjCKzV','n0XlAw9NqG','C3rYAw5N','C2HHnteY','qLLurvnFuevsxW','nde2odaXnhLeugjhvG','mtjPseXTtMS','yMfZzty0','ndu5nZe2nvnvAgrYCa','BwvZC2fNzq','y29Uy2f0','z2v0qxv0AfrHzW','icJSNPJRQRVRKjWG7ykKioUyKoUkLa','DxrMltG','DgfN','mJK0mZy0rgzHshPj','mZz3wvzRzMy','BgvUz3rO','C3rYAw5NAwz5','y2LWAgvYDgv4Da','67o17zI47zMuioYlPo2mQdOG','zw5JCNLWDgvK','64Ui64UKicJTMitSNQW6ia','zMLUywW','otG3ntyWogreEKvjsW','ioUnSoYDTo2eScdRS4dSOBaP','ywvZlti1nI1NyW','7j6e67kG65sPioUZTE2yUo2zLcdSI6tTJkG','yNL0zuXLBMD0Aa','7jwu7zI47zMuio2cPoUkLca','Dg9tDhjPBMC','AvHAEwe','nhjXt0Hyyq','zgf0yq','yNvMzMvY','DxbKyxrL','C2v0qxv0AfrHzW','mtaZntqWntHJDgveEeq'];_0x3bbb=function(){return _0x539840;};return _0x3bbb();}const KEY_LENGTH=0x20,IV_LENGTH=0xc,TAG_LENGTH=0x10,SALT_LENGTH=0x10,PBKDF2_ITERATIONS=0x186a0,PBKDF2_DIGEST=_0x3e5a0c(0x4ed,0x4dc);function _0x1b21(_0x2db135,_0x5e0be4){_0x2db135=_0x2db135-0x126;const _0x3bbbfa=_0x3bbb();let _0x1b21a7=_0x3bbbfa[_0x2db135];if(_0x1b21['PzUThP']===undefined){var _0x5d7fc2=function(_0x242800){const _0x8777ca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xac7de='',_0x322864='';for(let _0x1c3fc5=0x0,_0x1b8ef4,_0x3c5e43,_0x3c7da3=0x0;_0x3c5e43=_0x242800['charAt'](_0x3c7da3++);~_0x3c5e43&&(_0x1b8ef4=_0x1c3fc5%0x4?_0x1b8ef4*0x40+_0x3c5e43:_0x3c5e43,_0x1c3fc5++%0x4)?_0xac7de+=String['fromCharCode'](0xff&_0x1b8ef4>>(-0x2*_0x1c3fc5&0x6)):0x0){_0x3c5e43=_0x8777ca['indexOf'](_0x3c5e43);}for(let _0x8f6f28=0x0,_0x1fede4=_0xac7de['length'];_0x8f6f28<_0x1fede4;_0x8f6f28++){_0x322864+='%'+('00'+_0xac7de['charCodeAt'](_0x8f6f28)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x322864);};_0x1b21['KxwMlr']=_0x5d7fc2,_0x1b21['axdTvk']={},_0x1b21['PzUThP']=!![];}const _0x14a04f=_0x3bbbfa[0x0],_0x50203a=_0x2db135+_0x14a04f,_0x3ae3d6=_0x1b21['axdTvk'][_0x50203a];return!_0x3ae3d6?(_0x1b21a7=_0x1b21['KxwMlr'](_0x1b21a7),_0x1b21['axdTvk'][_0x50203a]=_0x1b21a7):_0x1b21a7=_0x3ae3d6,_0x1b21a7;}export function generateEncryptionKey(){return randomBytes(KEY_LENGTH);}export function deriveKey(_0xe2f588,_0x62ec39){const _0x23381f=_0x62ec39??randomBytes(SALT_LENGTH),_0x4e445d=pbkdf2Sync(_0xe2f588,_0x23381f,PBKDF2_ITERATIONS,KEY_LENGTH,PBKDF2_DIGEST);return{'key':_0x4e445d,'salt':_0x23381f};}export function encryptContent(_0x599ff7,_0x5c481b){if(_0x5c481b[_0x192839(0x13c,0x12c)]!==KEY_LENGTH)throw new Error(_0x1add81(-0x1a2,-0x1ac)+KEY_LENGTH+('\x20bytes여야\x20합'+_0x1add81(-0x1b8,-0x1b3))+_0x5c481b[_0x192839(0x11e,0x12c)]+')');const _0x6344b2=randomBytes(IV_LENGTH),_0x256cbc=createCipheriv(ALGORITHM,_0x5c481b,_0x6344b2),_0x1a4db3=Buffer['from'](_0x599ff7,_0x192839(0x128,0x128));function _0x1add81(_0x3714bf,_0x5f3059){return _0x215ac8(_0x3714bf,_0x5f3059- -0x491);}const _0x1f246e=Buffer[_0x1add81(-0x1be,-0x1bf)]([_0x256cbc[_0x1add81(-0x1a4,-0x1a6)](_0x1a4db3),_0x256cbc[_0x1add81(-0x19c,-0x1b2)]()]);function _0x192839(_0x53123d,_0x4aa0a4){return _0x215ac8(_0x53123d,_0x4aa0a4- -0x1ad);}const _0x4cff48=_0x256cbc['getAuthTag']();return{'ciphertext':_0x1f246e[_0x192839(0x144,0x139)]('base64'),'iv':_0x6344b2[_0x192839(0x14f,0x139)](_0x1add81(-0x1b8,-0x1c2)),'tag':_0x4cff48[_0x192839(0x145,0x139)](_0x1add81(-0x1d8,-0x1c2))};}export function decryptContent(_0xaa5d84,_0x4c4038){if(_0x4c4038['length']!==KEY_LENGTH)throw new Error('암호화\x20키는\x20'+KEY_LENGTH+('\x20bytes여야\x20합'+_0x5b5e7e(0x107,0x11b))+_0x4c4038[_0x495e59(-0x19b,-0x19d)]+')');function _0x5b5e7e(_0x485f17,_0x4e9304){return _0x3e5a0c(_0x485f17- -0x3f9,_0x4e9304);}function _0x495e59(_0x540079,_0x4f411b){return _0x3e5a0c(_0x540079- -0x696,_0x4f411b);}const _0x55ba37=Buffer[_0x495e59(-0x1b1,-0x1b4)](_0xaa5d84['iv'],'base64'),_0x5742d5=Buffer[_0x5b5e7e(0xec,0xf6)](_0xaa5d84[_0x5b5e7e(0x104,0x115)],'base64'),_0x4fbbf0=Buffer[_0x495e59(-0x1b1,-0x1a0)](_0xaa5d84[_0x495e59(-0x19e,-0x1a1)],'base64'),_0x4e8f6d=createDecipheriv(ALGORITHM,_0x4c4038,_0x55ba37);_0x4e8f6d['setAuthTag'](_0x4fbbf0);try{if(_0x495e59(-0x1b2,-0x1c3)!=='ZQuZo'){const _0x45e8aa=Buffer[_0x495e59(-0x1a2,-0x18d)]([_0x4e8f6d[_0x5b5e7e(0x114,0x107)](_0x5742d5),_0x4e8f6d[_0x5b5e7e(0x108,0x101)]()]);return _0x45e8aa[_0x5b5e7e(0x10f,0xfa)](_0x5b5e7e(0xfe,0xe8));}else return _0xe83238[_0x495e59(-0x19a,-0x18e)]({'encrypted':!![],'data':_0xe61595[_0x5b5e7e(0x104,0xfe)],'iv':_0x2e87ea['iv'],'tag':_0x2088ff[_0x495e59(-0x19e,-0x1a1)]});}catch(_0x1bfb5b){if(_0x1bfb5b instanceof Error)throw new Error(_0x5b5e7e(0x105,0xf7)+_0x1bfb5b['message']+(_0x495e59(-0x1a0,-0x189)+_0x5b5e7e(0x10a,0x11c)));throw _0x1bfb5b;}}export function encryptEmbedding(_0x260712,_0x5864f7){const _0x3348ad=new Float64Array(_0x260712),_0x38390b=Buffer[_0x51510c(0x3a5,0x3b7)](_0x3348ad[_0x3cfd5d(-0x1ba,-0x1c9)]);function _0x3cfd5d(_0x4cf5da,_0x5d4bfb){return _0x215ac8(_0x4cf5da,_0x5d4bfb- -0x4b3);}const _0x5f4466=randomBytes(IV_LENGTH),_0x1c9182=createCipheriv(ALGORITHM,_0x5864f7,_0x5f4466),_0x3fc3ce=Buffer[_0x51510c(0x3b7,0x3c6)]([_0x1c9182['update'](_0x38390b),_0x1c9182['final']()]),_0x30582c=_0x1c9182[_0x3cfd5d(-0x1f1,-0x1e0)](),_0xe0754c=Buffer[_0x3cfd5d(-0x1ed,-0x1e1)]([_0x5f4466,_0x30582c,_0x3fc3ce]);function _0x51510c(_0x2107f6,_0x521b34){return _0x215ac8(_0x2107f6,_0x521b34-0xf4);}return _0xe0754c[_0x51510c(0x3d7,0x3da)](_0x51510c(0x3da,0x3c3));}export function decryptEmbedding(_0x3dccaa,_0x29f44d){const _0x3fa3e9=Buffer[_0x290e99(0x39d,0x3ad)](_0x3dccaa,'base64');function _0x290e99(_0x31eb83,_0x27be5a){return _0x3e5a0c(_0x31eb83- -0x148,_0x27be5a);}if(_0x3fa3e9[_0x290e99(0x3b3,0x3c0)]<IV_LENGTH+TAG_LENGTH)throw new Error('암호화된\x20임베딩\x20데'+_0x290e99(0x39b,0x38e)+'다');function _0x58fa06(_0xc19027,_0x4fbb7f){return _0x3e5a0c(_0x4fbb7f- -0x4b0,_0xc19027);}const _0x132150=_0x3fa3e9[_0x58fa06(0x2c,0x32)](0x0,IV_LENGTH),_0x22a1dd=_0x3fa3e9[_0x290e99(0x39a,0x3af)](IV_LENGTH,IV_LENGTH+TAG_LENGTH),_0x6f7bad=_0x3fa3e9[_0x58fa06(0x47,0x32)](IV_LENGTH+TAG_LENGTH),_0x2af3dd=createDecipheriv(ALGORITHM,_0x29f44d,_0x132150);_0x2af3dd[_0x290e99(0x3c6,0x3c6)](_0x22a1dd);try{const _0x318c93=Buffer[_0x58fa06(0x2d,0x44)]([_0x2af3dd['update'](_0x6f7bad),_0x2af3dd[_0x290e99(0x3b9,0x3cc)]()]),_0x3ff7e1=new Float64Array(_0x318c93[_0x58fa06(0x4e,0x5c)],_0x318c93[_0x58fa06(0x27,0x36)],_0x318c93[_0x58fa06(0x42,0x56)]/Float64Array[_0x58fa06(0x47,0x3e)+'ELEMENT']);return Array['from'](_0x3ff7e1);}catch(_0x41e132){if(_0x41e132 instanceof Error)throw new Error(_0x58fa06(0x53,0x55)+':\x20'+_0x41e132[_0x290e99(0x3ab,0x3b2)]);throw _0x41e132;}}export function isValidEncryptedPayload(_0x491673){if(typeof _0x491673!==_0x10fe9d(0x439,0x43c)||_0x491673===null)return![];function _0xed1af7(_0x2c6000,_0x36e0c0){return _0x215ac8(_0x36e0c0,_0x2c6000- -0x96);}const _0x34d8db=_0x491673;function _0x10fe9d(_0x391451,_0x1a9f0e){return _0x215ac8(_0x391451,_0x1a9f0e-0x177);}return typeof _0x34d8db[_0xed1af7(0x245,0x22e)]===_0xed1af7(0x234,0x242)&&typeof _0x34d8db['iv']==='string'&&typeof _0x34d8db[_0xed1af7(0x240,0x23c)]===_0x10fe9d(0x446,0x441);}export function wrapEncryptedContent(_0x1031af){function _0x3ce83b(_0x1fc9df,_0x5c864a){return _0x3e5a0c(_0x5c864a- -0x1ab,_0x1fc9df);}function _0xcdad28(_0x27bc40,_0x368c3c){return _0x3e5a0c(_0x27bc40- -0x300,_0x368c3c);}return JSON[_0x3ce83b(0x33b,0x351)]({'encrypted':!![],'data':_0x1031af[_0x3ce83b(0x363,0x352)],'iv':_0x1031af['iv'],'tag':_0x1031af[_0xcdad28(0x1f8,0x20f)]});}export function unwrapEncryptedContent(_0x191a55){function _0x2f60c7(_0x37a652,_0x331f3e){return _0x3e5a0c(_0x331f3e- -0x11e,_0x37a652);}function _0x10eb94(_0x414319,_0x109b77){return _0x3e5a0c(_0x414319- -0x47b,_0x109b77);}try{const _0xb168ad=JSON[_0x2f60c7(0x3d5,0x3cb)](_0x191a55);if(_0xb168ad[_0x2f60c7(0x3d9,0x3e1)]!==!![])return null;if(typeof _0xb168ad[_0x10eb94(0x90,0x8c)]!=='string'||typeof _0xb168ad['iv']!==_0x2f60c7(0x3df,0x3ce)||typeof _0xb168ad[_0x10eb94(0x7d,0x89)]!==_0x2f60c7(0x3d2,0x3ce))return _0x10eb94(0x8e,0x90)!==_0x10eb94(0x8e,0x81)?_0x1c3fc5(_0x1b8ef4):null;return{'ciphertext':_0xb168ad[_0x10eb94(0x90,0xa3)],'iv':_0xb168ad['iv'],'tag':_0xb168ad['tag']};}catch{return null;}}
@@ -1 +1 @@
1
- function _0x1b81(){var _0x191462=['mtm3mde0nvbwyvjotW','oxzlzvvvEa','mti2nZHerMnJEvG','mZy1nJGWoez6y1LcyG','mtm2mZCWmJrYy21brhC','otC1nZK3mefXCxjMzW','ntKYB2LrsKLX','ntu1nNzADePZAG','mtiXmvPRsKXmCG','mJCWnJeYmhbKBgrzDW'];_0x1b81=function(){return _0x191462;};return _0x1b81();}(function(_0x372a7f,_0x5bb50e){function _0x5f27a7(_0x1def89,_0x428c43){return _0x5ad8(_0x428c43- -0x85,_0x1def89);}function _0xf97706(_0x1196d9,_0x400bea){return _0x5ad8(_0x1196d9- -0x296,_0x400bea);}var _0x4c13f2=_0x372a7f();while(!![]){try{var _0x30ddc3=parseInt(_0xf97706(-0x204,-0x207))/0x1*(-parseInt(_0x5f27a7(0x12,0xe))/0x2)+parseInt(_0x5f27a7(0x13,0x10))/0x3+parseInt(_0xf97706(-0x207,-0x209))/0x4+-parseInt(_0xf97706(-0x200,-0x205))/0x5+parseInt(_0xf97706(-0x1fe,-0x201))/0x6*(parseInt(_0xf97706(-0x202,-0x200))/0x7)+parseInt(_0xf97706(-0x206,-0x203))/0x8+parseInt(_0x5f27a7(0x14,0x12))/0x9*(-parseInt(_0x5f27a7(0xf,0xc))/0xa);if(_0x30ddc3===_0x5bb50e)break;else _0x4c13f2['push'](_0x4c13f2['shift']());}catch(_0x39a0ec){_0x4c13f2['push'](_0x4c13f2['shift']());}}}(_0x1b81,0xf2311));export{A2AClient}from'./client.js';function _0x5ad8(_0x41be4b,_0x15891b){_0x41be4b=_0x41be4b-0x8f;var _0x1b8147=_0x1b81();var _0x5ad833=_0x1b8147[_0x41be4b];if(_0x5ad8['rrJydJ']===undefined){var _0x544f93=function(_0x207771){var _0x5a9ff6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5e8587='',_0x82acbd='';for(var _0x455d9d=0x0,_0x45a870,_0x291a6b,_0x38791d=0x0;_0x291a6b=_0x207771['charAt'](_0x38791d++);~_0x291a6b&&(_0x45a870=_0x455d9d%0x4?_0x45a870*0x40+_0x291a6b:_0x291a6b,_0x455d9d++%0x4)?_0x5e8587+=String['fromCharCode'](0xff&_0x45a870>>(-0x2*_0x455d9d&0x6)):0x0){_0x291a6b=_0x5a9ff6['indexOf'](_0x291a6b);}for(var _0x58a726=0x0,_0x42383e=_0x5e8587['length'];_0x58a726<_0x42383e;_0x58a726++){_0x82acbd+='%'+('00'+_0x5e8587['charCodeAt'](_0x58a726)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x82acbd);};_0x5ad8['BdEVqP']=_0x544f93,_0x5ad8['jZyHCM']={},_0x5ad8['rrJydJ']=!![];}var _0x3b22dc=_0x1b8147[0x0],_0x2554dc=_0x41be4b+_0x3b22dc,_0x49c8c9=_0x5ad8['jZyHCM'][_0x2554dc];return!_0x49c8c9?(_0x5ad833=_0x5ad8['BdEVqP'](_0x5ad833),_0x5ad8['jZyHCM'][_0x2554dc]=_0x5ad833):_0x5ad833=_0x49c8c9,_0x5ad833;}export{MemorySynchronizer}from'./synchronizer.js';export{SyncQueue,mapCategory,mapTier}from'./queue.js';export{LocalVectorClock}from'./vector-clock.js';export{TeamSynchronizer}from'./team-synchronizer.js';export{SyncScheduler}from'./scheduler.js';export{encryptContent,decryptContent,encryptEmbedding,decryptEmbedding,deriveKey,generateEncryptionKey,wrapEncryptedContent,unwrapEncryptedContent,isValidEncryptedPayload}from'./encryption.js';
1
+ (function(_0x57e8ce,_0x1fc7c7){function _0x446537(_0x86cd45,_0xa821e1){return _0x4be4(_0x86cd45-0x120,_0xa821e1);}var _0x16bdb1=_0x57e8ce();function _0x4b3027(_0x1321fc,_0x1c515c){return _0x4be4(_0x1321fc-0x51,_0x1c515c);}while(!![]){try{var _0x279c3b=parseInt(_0x446537(0x262,0x267))/0x1+-parseInt(_0x446537(0x260,0x25d))/0x2*(parseInt(_0x4b3027(0x194,0x194))/0x3)+-parseInt(_0x446537(0x25e,0x25e))/0x4+-parseInt(_0x4b3027(0x18c,0x188))/0x5*(-parseInt(_0x4b3027(0x190,0x18c))/0x6)+parseInt(_0x446537(0x25d,0x25c))/0x7+-parseInt(_0x446537(0x25c,0x25c))/0x8+parseInt(_0x446537(0x261,0x265))/0x9;if(_0x279c3b===_0x1fc7c7)break;else _0x16bdb1['push'](_0x16bdb1['shift']());}catch(_0x110a62){_0x16bdb1['push'](_0x16bdb1['shift']());}}}(_0xea5d,0x77e9f));function _0x4be4(_0xa7af3b,_0x17d541){_0xa7af3b=_0xa7af3b-0x13b;var _0xea5d0d=_0xea5d();var _0x4be47f=_0xea5d0d[_0xa7af3b];if(_0x4be4['uZvaTt']===undefined){var _0x3d5277=function(_0x492dd2){var _0x4f01ed='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x297478='',_0x5eee24='';for(var _0xa10454=0x0,_0x12cc7c,_0x3c7c7a,_0x362b1f=0x0;_0x3c7c7a=_0x492dd2['charAt'](_0x362b1f++);~_0x3c7c7a&&(_0x12cc7c=_0xa10454%0x4?_0x12cc7c*0x40+_0x3c7c7a:_0x3c7c7a,_0xa10454++%0x4)?_0x297478+=String['fromCharCode'](0xff&_0x12cc7c>>(-0x2*_0xa10454&0x6)):0x0){_0x3c7c7a=_0x4f01ed['indexOf'](_0x3c7c7a);}for(var _0xdd0f16=0x0,_0x2a30c5=_0x297478['length'];_0xdd0f16<_0x2a30c5;_0xdd0f16++){_0x5eee24+='%'+('00'+_0x297478['charCodeAt'](_0xdd0f16)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5eee24);};_0x4be4['WXfyPM']=_0x3d5277,_0x4be4['bdCpug']={},_0x4be4['uZvaTt']=!![];}var _0x1f6fde=_0xea5d0d[0x0],_0x20c181=_0xa7af3b+_0x1f6fde,_0x171dd3=_0x4be4['bdCpug'][_0x20c181];return!_0x171dd3?(_0x4be47f=_0x4be4['WXfyPM'](_0x4be47f),_0x4be4['bdCpug'][_0x20c181]=_0x4be47f):_0x4be47f=_0x171dd3,_0x4be47f;}function _0xea5d(){var _0x27c719=['mJaXBLbqsw5S','mtmXodm3me9Mz1vUDW','ntu4mZaWmfbOCw9vrG','otm0ntq5rKHQtwjm','mJm4mdG3mLnSufrQBa','nNbwwxb1rW','mJmXndbvCe5iqwC','mta3mda0nZHsuMTyy2S','otCZmZi3y29XrvHO'];_0xea5d=function(){return _0x27c719;};return _0xea5d();}export{A2AClient}from'./client.js';export{MemorySynchronizer}from'./synchronizer.js';export{SyncQueue,mapCategory,mapTier}from'./queue.js';export{LocalVectorClock}from'./vector-clock.js';export{TeamSynchronizer}from'./team-synchronizer.js';export{SyncScheduler}from'./scheduler.js';export{encryptContent,decryptContent,encryptEmbedding,decryptEmbedding,deriveKey,generateEncryptionKey,wrapEncryptedContent,unwrapEncryptedContent,isValidEncryptedPayload}from'./encryption.js';
@@ -1 +1 @@
1
- (function(_0x5e2547,_0x2aba71){function _0x263e7f(_0x2e50a1,_0x11c339){return _0x133e(_0x11c339-0x3a2,_0x2e50a1);}function _0x54ab5d(_0xbf7538,_0x4fb4b7){return _0x133e(_0x4fb4b7-0x20a,_0xbf7538);}const _0x4c3e8c=_0x5e2547();while(!![]){try{const _0x5cd79e=parseInt(_0x54ab5d(0x32d,0x305))/0x1+-parseInt(_0x263e7f(0x4ab,0x4a8))/0x2*(-parseInt(_0x54ab5d(0x32a,0x31f))/0x3)+parseInt(_0x54ab5d(0x2fb,0x319))/0x4+parseInt(_0x263e7f(0x4e1,0x4c5))/0x5*(parseInt(_0x263e7f(0x4c5,0x4a0))/0x6)+parseInt(_0x263e7f(0x4df,0x4e0))/0x7*(parseInt(_0x263e7f(0x4a2,0x4d4))/0x8)+parseInt(_0x54ab5d(0x32b,0x349))/0x9*(-parseInt(_0x54ab5d(0x372,0x344))/0xa)+-parseInt(_0x54ab5d(0x34d,0x35d))/0xb;if(_0x5cd79e===_0x2aba71)break;else _0x4c3e8c['push'](_0x4c3e8c['shift']());}catch(_0x211a79){_0x4c3e8c['push'](_0x4c3e8c['shift']());}}}(_0x37f6,0x2a012));import{createHash}from'node:crypto';function _0x37f6(){const _0x52dd66=['zMLSDgvY','nZa0s1HeB2Pr','BwvZC2fNzq','y2f0zwDVCNK','67cW7lMyioYlPo2mQdOG','CMf0zuXPBwL0zq','y29UDMvUDgLVBG','ktOG','y2H1BMTjBMrLEa','ntu1ntbYDwfzs1i','z2v0vw5ZEw5Jzq','C2L6zq','C2XPy2u','mJu5mdDrr3jMyuC','ntqWsfHZEfjl','ChvZAejHDgnOzq','u3LUy01LBw9YAq','C2v0','zxjYB3jZ','DgfNCW','Bwf0y2G','yuzrBMW','BgLTAxq','A0DMs24','zMfPBgvK','y3jLyxrLtwvTBW','zgLNzxn0','DhvZ','BM93','rMX5sha','Agv4','7jEq7isCioYERoYlNoUpHcK','icJRI6tSNyWGzMX1C2G','ywrK','nda2ndi4vKTlBuT5','CMvTB3rLswq','7yoa7j6e7jwe7jUdoIa','DxbKyxrLtwvTBW','CM91BMq','zgvSzxrLu3LUyW','DMrHwxi','y3jLyxrLza','z2v0ugvUzgLUzW','C3vIC3rYAw5N','Dgvjza','7ikT7kcCioYlPo2mQcaO','mta1mZn3wLzusMW','CgfYzw50swq','zgvSzxrLtwvTBW','mtHqturWrfq','CgvUzgLUzW','AgfZ','BwfYA1rVBwjZDa','AwrZ','y3jLyxrLzef0','CMLLC0jHDgnO','BNqG','mZq0nZrgzK5Ts2y','B25Lu3LUy2vK','u3rHDhvZ','BM90igzVDw5K','qLnMtxu','CMvZzxrtEw5JqG','ChvZAa','z2v0','CgfYzw50ihjLBq','mJi5mZuYCezrEuTf','y29UDgvUDa','Dg9mB3DLCKnHCW','7zAjihbLBMrPBMCG','C2vTyw50Awm','BgvUz3rO','m0LjDvDjzq','zfrVBwjZDg9Uzq','C2v0u3LUy1n0yq','z2v0u3LUy1n0yq','Dg9Uzxm','y2H1BMTuB3rHBa','q291BNq','zw5XDwv1zq','7kce7zMylcdRI6tSNyWGzMX1','6RcCioUVUoYYMoUMRa','C2JSL5dSHjWG7j6SChvZAa','DgLTzw91De1Z','C3LUy2vK','C2HHmJu2','mJe5mtCWBhbMA1Py','qvvvreS','DxbKyxrL','Bwf4','y2XPzw50','y29Uy3vYCMvUyW','CxvHBgL0EvnJBW','ChvZAgvK','B3rLx2LKioUVUo2zLEYDUa','BwfW','6Rg0ioYEKoUpMsbYzxnLDa','zhvYyxrPB24','BwvTB3j5swq','Aw5JBhvKzxm'];_0x37f6=function(){return _0x52dd66;};return _0x37f6();}function _0x19fe66(_0xc8f315,_0x521dc5){return _0x133e(_0x521dc5-0x3b2,_0xc8f315);}import{getErrorStatus}from'./client.js';const CATEGORY_MAP={'preference':_0x19fe66(0x4c9,0x4e9),'rule':'convention'},TIER_MAP={'procedural':_0x19fe66(0x4b6,0x4c5)};function _0x133e(_0x11f70f,_0xce2b12){_0x11f70f=_0x11f70f-0xf3;const _0x37f6f8=_0x37f6();let _0x133ee5=_0x37f6f8[_0x11f70f];if(_0x133e['gUUXRp']===undefined){var _0x92916d=function(_0x2369fa){const _0x234375='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57cc18='',_0x20497e='';for(let _0x577f77=0x0,_0x50f71b,_0x238b31,_0x337ca6=0x0;_0x238b31=_0x2369fa['charAt'](_0x337ca6++);~_0x238b31&&(_0x50f71b=_0x577f77%0x4?_0x50f71b*0x40+_0x238b31:_0x238b31,_0x577f77++%0x4)?_0x57cc18+=String['fromCharCode'](0xff&_0x50f71b>>(-0x2*_0x577f77&0x6)):0x0){_0x238b31=_0x234375['indexOf'](_0x238b31);}for(let _0x22c4db=0x0,_0xcedc2f=_0x57cc18['length'];_0x22c4db<_0xcedc2f;_0x22c4db++){_0x20497e+='%'+('00'+_0x57cc18['charCodeAt'](_0x22c4db)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20497e);};_0x133e['yBGqQg']=_0x92916d,_0x133e['oFWdVf']={},_0x133e['gUUXRp']=!![];}const _0x3262a2=_0x37f6f8[0x0],_0xaf576=_0x11f70f+_0x3262a2,_0x40c040=_0x133e['oFWdVf'][_0xaf576];return!_0x40c040?(_0x133ee5=_0x133e['yBGqQg'](_0x133ee5),_0x133e['oFWdVf'][_0xaf576]=_0x133ee5):_0x133ee5=_0x40c040,_0x133ee5;}export function mapCategory(_0x28222f){return CATEGORY_MAP[_0x28222f]??_0x28222f;}export function mapTier(_0x131386){return TIER_MAP[_0x131386]??_0x131386;}function computeContentHash(_0x47ada1){function _0x2ce039(_0x5115da,_0x533da1){return _0x1e4f49(_0x5115da-0xe,_0x533da1);}function _0x9c4df4(_0x21f909,_0x4d4bb0){return _0x1e4f49(_0x4d4bb0-0x371,_0x21f909);}return createHash(_0x2ce039(-0x6,0x8))[_0x9c4df4(0x331,0x360)](_0x47ada1['trim']()[_0x2ce039(-0x17,-0x9)+'e']())[_0x2ce039(0x23,0x52)](_0x2ce039(0x27,-0x8))[_0x2ce039(-0x30,-0x15)](0x0,0x10);}function _0x1e4f49(_0xd5eabf,_0x5bbed0){return _0x133e(_0xd5eabf- -0x136,_0x5bbed0);}export class SyncQueue{['db'];['client'];constructor(_0x5b7a85,_0x333c6b){function _0x5006a6(_0x4b9fa2,_0x48a391){return _0x1e4f49(_0x4b9fa2- -0x153,_0x48a391);}this['db']=_0x5b7a85,this[_0x5006a6(-0x162,-0x147)]=_0x333c6b;}[_0x1e4f49(-0x1a,-0x26)](_0x45c744){function _0x18bcb7(_0x82637c,_0x4c6a3d){return _0x1e4f49(_0x4c6a3d- -0x24b,_0x82637c);}function _0x1018b8(_0x468449,_0x465ace){return _0x1e4f49(_0x465ace-0x75,_0x468449);}this['db'][_0x1018b8(0x68,0x56)+_0x1018b8(0xab,0x8b)](_0x45c744,null,_0x1018b8(0x29,0x3e));}async['flush'](_0x25bd31){const _0x38aca2=Date[_0x2ad23c(-0x1b4,-0x1a2)](),_0x3c3496=_0x25bd31?.[_0x2ad23c(-0x1e1,-0x1ef)]??0x493e0,_0x3dbe00={'pushed':0x0,'failed':0x0,'errors':[],'duration':0x0,'syncedItems':[]},_0x540708=0x64,_0x4d11cd=this['db'][_0x3063e0(0x196,0x1b1)+_0x3063e0(0x1e0,0x1f2)+'es']();if(_0x4d11cd[_0x2ad23c(-0x1ed,-0x204)]===0x0)return _0x3dbe00[_0x2ad23c(-0x1d3,-0x1a4)]=Date[_0x3063e0(0x1ec,0x1cc)]()-_0x38aca2,_0x3dbe00;const _0x3cd422=new Map();function _0x3063e0(_0x30a0fa,_0x62fe97){return _0x19fe66(_0x62fe97,_0x30a0fa- -0x313);}const _0x185029=_0x4d11cd[_0x3063e0(0x1d0,0x1a7)](_0x5b25c2=>{const _0x42c1c9=computeContentHash(_0x5b25c2['content']);function _0x3ce319(_0x59aab3,_0xedccd4){return _0x3063e0(_0xedccd4-0x69,_0x59aab3);}if(_0x3cd422['has'](_0x42c1c9))return this['db'][_0x4cef7e(0xba,0xb3)+_0x3ce319(0x27d,0x254)](_0x5b25c2['id'],null,_0x4cef7e(0xc1,0xbd)),![];_0x3cd422[_0x4cef7e(0xd3,0xde)](_0x42c1c9,_0x5b25c2['id']);function _0x4cef7e(_0x2f4636,_0x4c8ffd){return _0x3063e0(_0x4c8ffd- -0x103,_0x2f4636);}return!![];}),_0x3a8518=_0x185029[_0x2ad23c(-0x1d0,-0x1e5)](_0x4fb08c=>!_0x4fb08c[_0x3063e0(0x19b,0x1cc)]),_0x578140=_0x185029[_0x2ad23c(-0x1d0,-0x1e6)](_0x1f31bd=>!!_0x1f31bd[_0x2ad23c(-0x205,-0x224)]),_0x4adc73=new Map();function _0x2ad23c(_0x520842,_0x713c1e){return _0x19fe66(_0x713c1e,_0x520842- -0x6b3);}for(const _0x4a6468 of _0x578140){if(_0x4a6468[_0x3063e0(0x19b,0x178)]&&!_0x4adc73[_0x3063e0(0x19f,0x192)](_0x4a6468['parentId'])){const _0x153056=this['db'][_0x3063e0(0x1b7,0x1b8)+_0x2ad23c(-0x1b5,-0x183)](_0x4a6468['parentId']);_0x153056?.[_0x3063e0(0x1f3,0x1db)]&&_0x4adc73[_0x2ad23c(-0x1bf,-0x1c2)](_0x4a6468['parentId'],_0x153056[_0x3063e0(0x1f3,0x208)]);}}await this[_0x3063e0(0x1df,0x1db)+'s'](_0x3a8518,_0x540708,_0x38aca2,_0x3c3496,_0x3dbe00,_0x4adc73);if(_0x578140[_0x2ad23c(-0x1ed,-0x1dc)]>0x0&&(_0x3c3496===0x0||Date[_0x3063e0(0x1ec,0x1cc)]()-_0x38aca2<_0x3c3496)){const _0x585068=_0x578140[_0x2ad23c(-0x1d0,-0x1a6)](_0x3c7c8a=>_0x4adc73[_0x3063e0(0x19f,0x1a8)](_0x3c7c8a[_0x2ad23c(-0x205,-0x1ea)])),_0xaece12=_0x578140[_0x3063e0(0x1d0,0x1a6)](_0x435a9d=>!_0x4adc73[_0x2ad23c(-0x201,-0x225)](_0x435a9d[_0x2ad23c(-0x205,-0x235)]));if(_0xaece12[_0x3063e0(0x1b3,0x1ba)]>0x0){if(_0x2ad23c(-0x1bb,-0x1b0)!==_0x3063e0(0x194,0x18a))_0x3dbe00['errors'][_0x3063e0(0x1ab,0x1d4)](_0xaece12[_0x3063e0(0x1b3,0x1a9)]+('개\x20child\x20—\x20'+_0x2ad23c(-0x1f3,-0x1d7)+_0x2ad23c(-0x1d6,-0x1e8)+_0x3063e0(0x1f0,0x1c9)+_0x3063e0(0x1ef,0x1e0)));else return{'memoryId':_0x5203e5[_0x3063e0(0x1ce,0x19f)],'ok':!![],'rateLimited':![],'msg':''};}await this[_0x3063e0(0x1df,0x1fa)+'s'](_0x585068,_0x540708,_0x38aca2,_0x3c3496,_0x3dbe00,_0x4adc73);}return _0x3dbe00['duration']=Date[_0x3063e0(0x1ec,0x200)]()-_0x38aca2,_0x3dbe00;}async[_0x1e4f49(0xa,0x1d)+'s'](_0x196c35,_0x522553,_0x215953,_0x5681a6,_0x15ff2a,_0x54e1de){function _0x59d377(_0x57e3a6,_0x5d8219){return _0x19fe66(_0x57e3a6,_0x5d8219- -0x35c);}function _0x4fa92b(_0x4b4669,_0x405be8){return _0x19fe66(_0x4b4669,_0x405be8- -0x5d3);}for(let _0x2f7807=0x0;_0x2f7807<_0x196c35[_0x4fa92b(-0xdd,-0x10d)];_0x2f7807+=_0x522553){if(_0x5681a6>0x0&&Date[_0x59d377(0x177,0x1a3)]()-_0x215953>_0x5681a6){if(_0x59d377(0x1bf,0x19e)!=='kGfKn')this['db'][_0x4fa92b(-0xc0,-0xcb)+'ry'](_0x18c8db,{'qualityScore':_0x19a430});else{const _0x57a6c0=_0x196c35['length']-_0x2f7807;_0x15ff2a[_0x59d377(0x198,0x199)]['push'](_0x59d377(0x1bd,0x1ab)+_0x57a6c0+_0x4fa92b(-0xfa,-0x103)),_0x15ff2a[_0x59d377(0x1cb,0x19f)]+=_0x57a6c0;break;}}const _0x359e07=_0x196c35[_0x59d377(0x17e,0x193)](_0x2f7807,_0x2f7807+_0x522553);try{const _0x2e5a69=new Map(),_0x3e00c1=await this[_0x59d377(0x19f,0x17d)][_0x59d377(0x173,0x1a0)+_0x59d377(0x12a,0x15a)](_0x359e07[_0x4fa92b(-0x109,-0xf5)](_0x20624a=>{function _0xd67f00(_0x2f0ed2,_0x113eaa){return _0x59d377(_0x113eaa,_0x2f0ed2- -0x1b1);}function _0x4227b3(_0x46d023,_0x270163){return _0x59d377(_0x46d023,_0x270163- -0x90);}if(_0xd67f00(-0x51,-0x42)===_0xd67f00(-0x37,-0xd))_0x500c2f[_0x4227b3(0x132,0x108)](_0x494589['parentId'],_0x4fa8ec[_0x4227b3(0x10b,0x11a)]);else{const _0x4f5f52=_0x20624a[_0xd67f00(-0x32,-0x31)+'re']!==undefined?Math[_0x4227b3(0x87,0xb9)](_0x20624a['qualitySco'+'re']*0x3e8)/0x3e8:undefined;return _0x2e5a69[_0xd67f00(-0x19,0x4)](_0x20624a['id'],_0x4f5f52),{'content':_0x20624a[_0xd67f00(-0x4b,-0x1c)],'category':mapCategory(_0x20624a[_0xd67f00(-0x27,-0x1e)]),'tier':_0xd67f00(-0x48,-0x60),'tags':_0x20624a[_0xd67f00(-0x17,-0x2)],'created_at':_0x20624a[_0x4227b3(0xf1,0xc9)],'parent_id':_0x20624a[_0xd67f00(-0x5f,-0x8a)]?_0x54e1de['get'](_0x20624a[_0xd67f00(-0x5f,-0x75)]):undefined,'chunk_index':_0x20624a[_0x4227b3(0xfa,0xff)]??undefined,'chunk_total':_0x20624a[_0x4227b3(0xdd,0xe0)]??undefined,'quality_score':_0x4f5f52};}}));for(let _0x478524=0x0;_0x478524<_0x3e00c1['ids'][_0x4fa92b(-0x127,-0x10d)];_0x478524++){if(_0x478524<_0x359e07[_0x59d377(0x162,0x16a)]&&_0x3e00c1['ids'][_0x478524]){const _0x40ecd4=_0x359e07[_0x478524]['id'],_0x11271c=_0x2e5a69[_0x59d377(0x18e,0x163)](_0x40ecd4);if(_0x11271c!==undefined&&_0x359e07[_0x478524]['qualitySco'+'re']===undefined)try{this['db'][_0x4fa92b(-0xea,-0xcb)+'ry'](_0x40ecd4,{'qualityScore':_0x11271c});}catch{}this['db'][_0x4fa92b(-0xf9,-0x10a)+_0x4fa92b(-0xd9,-0xd5)](_0x40ecd4,_0x3e00c1[_0x4fa92b(-0xfd,-0x11f)][_0x478524],'synced'),_0x54e1de[_0x4fa92b(-0xbd,-0xdf)](_0x40ecd4,_0x3e00c1[_0x4fa92b(-0x133,-0x11f)][_0x478524]),_0x15ff2a['syncedItem'+'s']['push']({'localId':_0x40ecd4,'remoteId':_0x3e00c1[_0x4fa92b(-0x10b,-0x11f)][_0x478524]});}}_0x15ff2a[_0x4fa92b(-0x11d,-0xf7)]+=_0x3e00c1[_0x4fa92b(-0x13a,-0x12b)],_0x15ff2a['failed']+=_0x3e00c1['failed'];if(_0x3e00c1[_0x4fa92b(-0xd4,-0xde)]['length']>0x0){const _0x1d77e5=new Set(),_0x429be8=/Parent memory not found:\s*parent_id\s*'([^']+)'/;for(const _0x102e3c of _0x3e00c1[_0x59d377(0x1af,0x199)]){const _0x3db52d=_0x102e3c[_0x59d377(0x19d,0x19b)](_0x429be8);if(_0x3db52d)_0x1d77e5[_0x59d377(0x1ab,0x1a8)](_0x3db52d[0x1]);}if(_0x1d77e5[_0x59d377(0x1a3,0x192)]>0x0){let _0x129811=0x0;for(const _0x35f2f6 of _0x1d77e5){_0x129811+=this['db'][_0x4fa92b(-0x12d,-0x116)+'yStaleRemo'+_0x4fa92b(-0x11f,-0x128)](_0x35f2f6);}_0x129811>0x0&&_0x15ff2a['errors'][_0x4fa92b(-0xfe,-0x115)]('stale\x20pare'+_0x59d377(0x167,0x15b)+_0x1d77e5['size']+(_0x4fa92b(-0xf4,-0xf4)+'\x20(')+_0x129811+(_0x4fa92b(-0x114,-0x10f)+_0x4fa92b(-0x104,-0x104)+_0x4fa92b(-0xf1,-0x102)+')'));}_0x15ff2a['errors'][_0x4fa92b(-0x123,-0x115)](..._0x3e00c1['errors']);}}catch(_0x2a4430){_0x15ff2a['errors']['push'](_0x4fa92b(-0x114,-0xec)+(_0x2a4430 instanceof Error?_0x2a4430[_0x4fa92b(-0xfb,-0xee)]:String(_0x2a4430))),_0x15ff2a['failed']+=_0x359e07[_0x59d377(0x191,0x16a)];}}}async['flushTombs'+_0x1e4f49(-0x1d,-0x39)](_0x3f29f4){const _0xa792e2=Date['now'](),_0x192482=_0x3f29f4?.['timeoutMs']??0x0;function _0x2cdeb3(_0x293c57,_0x5c4388){return _0x19fe66(_0x293c57,_0x5c4388-0x20);}const _0x2e1b21=_0x3f29f4?.[_0x2cdeb3(0x511,0x519)]??Number['MAX_SAFE_I'+'NTEGER'];function _0x29b100(_0x186060,_0x5113db){return _0x19fe66(_0x186060,_0x5113db- -0xe5);}const _0x1c0d0f=Math[_0x29b100(0x3c4,0x3f3)](0x1,_0x3f29f4?.[_0x29b100(0x3f8,0x3f5)+'y']??0x1),_0x19610b=this['db'][_0x29b100(0x425,0x408)+_0x2cdeb3(0x4fb,0x4e8)+'s']();let _0x109e86=0x0;const _0x2f47c4=[],_0x3d70ba=[];for(const _0x5d4367 of _0x19610b){if('FlyHp'===_0x2cdeb3(0x518,0x520)){const _0x1e5126=this['db']['getSyncSta'+_0x29b100(0x420,0x419)](_0x5d4367[_0x2cdeb3(0x4db,0x501)]);if(!_0x1e5126?.[_0x29b100(0x438,0x421)]){this['db']['markTombst'+_0x29b100(0x3c4,0x3d4)](_0x5d4367[_0x2cdeb3(0x4f6,0x501)]),this['db'][_0x29b100(0x3c1,0x3c1)+_0x29b100(0x3ab,0x3d5)](_0x5d4367[_0x2cdeb3(0x52e,0x501)]);continue;}_0x3d70ba[_0x29b100(0x3bb,0x3d9)]({'memoryId':_0x5d4367[_0x2cdeb3(0x4d3,0x501)],'remoteId':_0x1e5126[_0x29b100(0x40e,0x421)]});}else return this['db'][_0x29b100(0x3c7,0x3c4)+_0x29b100(0x3fe,0x40e)+'es']()[_0x2cdeb3(0x4ed,0x4e6)];}const _0x2dc046=_0x3d70ba[_0x29b100(0x3f4,0x40a)](0x0,_0x2e1b21),_0x1f2290=()=>_0x192482>0x0&&Date[_0x29b100(0x42d,0x41a)]()-_0xa792e2>=_0x192482;let _0x3289c8=![];for(let _0x26229c=0x0;_0x26229c<_0x2dc046[_0x2cdeb3(0x4dc,0x4e6)];_0x26229c+=_0x1c0d0f){if(_0x1f2290()){_0x3289c8=!![];break;}const _0x567d74=_0x2dc046[_0x29b100(0x3de,0x40a)](_0x26229c,_0x26229c+_0x1c0d0f),_0x6d602b=await Promise['all'](_0x567d74[_0x2cdeb3(0x4e8,0x4fe)](async _0x2b8079=>{function _0x5ba226(_0x5435ab,_0x1ae465){return _0x2cdeb3(_0x5435ab,_0x1ae465- -0x10d);}function _0x11f233(_0x2cb55b,_0x1b6804){return _0x2cdeb3(_0x2cb55b,_0x1b6804- -0x4a9);}try{return await this[_0x11f233(0x3a,0x50)][_0x11f233(-0xb,0x26)+'ry'](_0x2b8079['remoteId']),{'memoryId':_0x2b8079[_0x11f233(0x4d,0x58)],'ok':!![],'rateLimited':![],'msg':''};}catch(_0xf3cf25){const _0x4a1e9a=_0xf3cf25 instanceof Error?_0xf3cf25[_0x5ba226(0x3c6,0x3f8)]:String(_0xf3cf25),_0x1fd07b=getErrorStatus(_0xf3cf25);if(_0x1fd07b===0x194||_0x4a1e9a[_0x5ba226(0x411,0x3f5)](_0x5ba226(0x3ee,0x3ce))||_0x4a1e9a[_0x11f233(0x3e,0x59)]('Not\x20Found'))return{'memoryId':_0x2b8079[_0x5ba226(0x41a,0x3f4)],'ok':!![],'rateLimited':![],'msg':''};return{'memoryId':_0x2b8079[_0x11f233(0x7d,0x58)],'ok':![],'rateLimited':_0x1fd07b===0x1ad,'msg':_0x4a1e9a};}}));for(const _0x4ed8a2 of _0x6d602b){if(_0x4ed8a2['ok'])this['db'][_0x2cdeb3(0x4dc,0x4d3)+_0x2cdeb3(0x4fa,0x4d9)](_0x4ed8a2['memoryId']),this['db'][_0x2cdeb3(0x4ae,0x4c6)+_0x2cdeb3(0x4f5,0x4da)](_0x4ed8a2[_0x29b100(0x3d8,0x3fc)]),_0x109e86++;else{_0x2f47c4[_0x2cdeb3(0x4f5,0x4de)](_0x2cdeb3(0x4cf,0x4cc)+_0x4ed8a2[_0x29b100(0x409,0x3fc)]+_0x29b100(0x421,0x405)+_0x4ed8a2['msg']);if(_0x4ed8a2[_0x29b100(0x3d6,0x403)+'d'])_0x3289c8=!![];}}if(_0x3289c8)break;}return{'deleted':_0x109e86,'errors':_0x2f47c4,'remaining':Math[_0x29b100(0x3ed,0x3f3)](0x0,_0x3d70ba[_0x29b100(0x3c6,0x3e1)]-_0x109e86),'stopped':_0x3289c8};}[_0x19fe66(0x499,0x4a9)+_0x1e4f49(-0x1b,0x16)](){function _0x59e815(_0x438366,_0x288ba0){return _0x19fe66(_0x288ba0,_0x438366- -0x6d);}return this['db']['getPending'+_0x59e815(0x486,0x4ac)+'es']()['length'];}}
1
+ function _0x1336aa(_0x92394a,_0x1ff251){return _0x271e(_0x92394a-0x12d,_0x1ff251);}(function(_0xf0a2c5,_0x55bbcc){function _0xa04f19(_0x2460b1,_0x5b4da0){return _0x271e(_0x5b4da0- -0x3ba,_0x2460b1);}function _0x26a5b7(_0x347ea0,_0x256c47){return _0x271e(_0x256c47-0x27b,_0x347ea0);}const _0x5c5416=_0xf0a2c5();while(!![]){try{const _0x477f17=parseInt(_0xa04f19(-0x2ae,-0x283))/0x1+parseInt(_0x26a5b7(0x3ca,0x398))/0x2*(parseInt(_0xa04f19(-0x2ce,-0x2b9))/0x3)+-parseInt(_0xa04f19(-0x252,-0x26b))/0x4*(-parseInt(_0xa04f19(-0x292,-0x287))/0x5)+parseInt(_0xa04f19(-0x2b2,-0x29f))/0x6+parseInt(_0x26a5b7(0x3cc,0x3b1))/0x7*(-parseInt(_0x26a5b7(0x36a,0x397))/0x8)+-parseInt(_0xa04f19(-0x2e1,-0x2cc))/0x9+parseInt(_0x26a5b7(0x361,0x390))/0xa*(parseInt(_0x26a5b7(0x3d2,0x3bf))/0xb);if(_0x477f17===_0x55bbcc)break;else _0x5c5416['push'](_0x5c5416['shift']());}catch(_0x4762c1){_0x5c5416['push'](_0x5c5416['shift']());}}}(_0x27cd,0xe9954));function _0x53e3b8(_0x296075,_0x4e5c7){return _0x271e(_0x4e5c7-0x42,_0x296075);}import{createHash}from'node:crypto';import{getErrorStatus}from'./client.js';function _0x271e(_0x5b5fdf,_0x5d0bc2){_0x5b5fdf=_0x5b5fdf-0xed;const _0x27cdd9=_0x27cd();let _0x271e4d=_0x27cdd9[_0x5b5fdf];if(_0x271e['NffnDJ']===undefined){var _0x1c9207=function(_0x49cccd){const _0x4c616b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1588b4='',_0x44b27f='';for(let _0x3c46f0=0x0,_0x128e8b,_0x3ff3b5,_0x1ad1ac=0x0;_0x3ff3b5=_0x49cccd['charAt'](_0x1ad1ac++);~_0x3ff3b5&&(_0x128e8b=_0x3c46f0%0x4?_0x128e8b*0x40+_0x3ff3b5:_0x3ff3b5,_0x3c46f0++%0x4)?_0x1588b4+=String['fromCharCode'](0xff&_0x128e8b>>(-0x2*_0x3c46f0&0x6)):0x0){_0x3ff3b5=_0x4c616b['indexOf'](_0x3ff3b5);}for(let _0xb9c6bc=0x0,_0x31c748=_0x1588b4['length'];_0xb9c6bc<_0x31c748;_0xb9c6bc++){_0x44b27f+='%'+('00'+_0x1588b4['charCodeAt'](_0xb9c6bc)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44b27f);};_0x271e['PLuXgP']=_0x1c9207,_0x271e['cWDsyJ']={},_0x271e['NffnDJ']=!![];}const _0x3296b7=_0x27cdd9[0x0],_0x20c70=_0x5b5fdf+_0x3296b7,_0x184088=_0x271e['cWDsyJ'][_0x20c70];return!_0x184088?(_0x271e4d=_0x271e['PLuXgP'](_0x271e4d),_0x271e['cWDsyJ'][_0x20c70]=_0x271e4d):_0x271e4d=_0x184088,_0x271e4d;}const CATEGORY_MAP={'preference':_0x1336aa(0x250,0x260),'rule':_0x1336aa(0x250,0x238)},TIER_MAP={'procedural':'semantic'};export function mapCategory(_0x532f8d){return CATEGORY_MAP[_0x532f8d]??_0x532f8d;}export function mapTier(_0x599804){return TIER_MAP[_0x599804]??_0x599804;}function _0x27cd(){const _0x1ae08f=['C2vTyw50Awm','BM90igzVDw5K','DgLTzw91De1Z','ChvZAa','DxbKyxrL','CgfYzw50ihjLBq','C3rHBguGCgfYzq','6Rg0ioYEKoUpMsbYzxnLDa','zMfPBgvK','y29UDgvUDa','tM90iezVDw5K','su5ktNi','B3rLx2LKioUVUo2zLEYDUa','ntrPwenSyKe','ChvZAgvK','CMvTB3rLswq','Evn0ywXLuMvTBW','6RcCignOAwXKiokaLca','z2v0vw5ZEw5Jzq','C3vIC3rYAw5N','CgfYzw50swq','Dg9mB3DLCKnHCW','tufyx1nbrKvFsq','CgvUzgLUzW','y3jLyxrLtwvTBW','Aw5JBhvKzxm','zhvYyxrPB24','C3LUy2vK','y2f0zwDVCNK','CxvHBgL0EvnJBW','y3jLyxrLzef0','icJRI6tSNyWGzMX1C2G','ywXS','mtbcBhb4shG','Bwf4','u3rHDhvZ','C2v0u3LUy1n0yq','CMLLC0jHDgnO','DgfNCW','otu5ntK4wuXfwe1l','mtzQDNvSsgG','ntaWmKnJvMn6Aq','zhjdCM0','zMX1C2HuB21ICW','B25Lu3LUy2vK','DxbKyxrLtwvTBW','zgvSzxrLu3LUyW','y29UDMvUDgLVBG','DhjPBq','BgvUz3rO','67cW7lMyioYlPo2mQdOG','z2v0u3LUy1n0yq','BwvZC2fNzq','y29Uy3vYCMvUyW','CM91BMq','7zAjihbLBMrPBMCG','BeTlqKO','C2v0','AgfZ','BwfW','DhvZ','BxnN','qMzQvLG','mty3mgP3zKDcuG','z2v0','ChvZAejHDgnOzq','nJu0mZm5mhzuwwHcAq','mtuWnZK4mu9yDwX4uG','Agv4','CMvZzxrtEw5JqG','y2H1BMTuB3rHBa','zxjYB3jZ','y2H1BMTjBMrLEa','zMLSDgvY','7kce7zMylcdRI6tSNyWGzMX1','7ikT7kcCioYlPo2mQcaO','zgvSzxrLtwvTBW','tMLbDwO','z2v0ugvUzgLUzW','Dgvjza','mty3mJu4odvTEgnwrge','C2XPy2u','C2HHmJu2','zgLNzxn0','ktOG','AwrZ','zw5XDwv1zq','C2JSL5dSHjWG7j6SChvZAa','7yoa7j6e7jwe7jUdoIa','BM93','Dg9Uzxm','nZC2oe9iEhHrua','y2XPzw50','BwvTB3j5swq','BwfYA1rVBwjZDa','otuWmJe5mw1jvvrsvG','uvHfBMq','CMf0zuXPBwL0zq','BgLTAxq','zuzvA0G','D3bUzw8'];_0x27cd=function(){return _0x1ae08f;};return _0x27cd();}function computeContentHash(_0x7d6037){function _0x2d04d4(_0x221c34,_0x1e1706){return _0x1336aa(_0x221c34- -0x3a4,_0x1e1706);}function _0xbf194(_0x2e300e,_0x3da575){return _0x1336aa(_0x3da575-0x9c,_0x2e300e);}return createHash(_0xbf194(0x315,0x30f))[_0xbf194(0x2a9,0x2c1)](_0x7d6037[_0xbf194(0x310,0x2ed)]()[_0x2d04d4(-0x16e,-0x190)+'e']())[_0xbf194(0x31b,0x310)](_0x2d04d4(-0x13f,-0x166))[_0xbf194(0x2b6,0x2d0)](0x0,0x10);}export class SyncQueue{['db'];[_0x1336aa(0x27d,0x274)];constructor(_0x4eaeb2,_0x12e340){function _0x3986b9(_0x19fdc7,_0x2b2313){return _0x1336aa(_0x2b2313-0x104,_0x19fdc7);}this['db']=_0x4eaeb2,this[_0x3986b9(0x366,0x381)]=_0x12e340;}[_0x1336aa(0x277,0x25f)](_0x101cbe){function _0x4bc2fd(_0x101578,_0x56059b){return _0x53e3b8(_0x56059b,_0x101578-0x2bf);}function _0x4ad8f0(_0x595d81,_0xab0caa){return _0x53e3b8(_0xab0caa,_0x595d81-0x343);}this['db'][_0x4ad8f0(0x49d,0x495)+'tus'](_0x101cbe,null,_0x4bc2fd(0x40c,0x409));}async['flush'](_0x4ffb55){const _0x4b8d92=Date[_0x11ecaf(0x2c4,0x2a5)](),_0x5e3c83=_0x4ffb55?.[_0x11ecaf(0x27b,0x24e)]??0x493e0,_0x393a66={'pushed':0x0,'failed':0x0,'errors':[],'duration':0x0,'syncedItems':[]},_0x3d801a=0x64,_0x149d7c=this['db']['getPending'+'SyncMemori'+'es']();if(_0x149d7c['length']===0x0)return _0x393a66[_0x44148b(0x12e,0x107)]=Date[_0x44148b(0x16d,0x189)]()-_0x4b8d92,_0x393a66;const _0x568dfa=new Map(),_0xe42160=_0x149d7c[_0x44148b(0x15d,0x12c)](_0x8fea84=>{const _0x3393a5=computeContentHash(_0x8fea84[_0x12e326(-0xbd,-0xb0)]);function _0x1f8876(_0x4b2883,_0x2b6ba2){return _0x44148b(_0x2b6ba2- -0x270,_0x4b2883);}if(_0x568dfa[_0x12e326(-0x84,-0x7f)](_0x3393a5))return this['db'][_0x1f8876(-0x142,-0x138)+_0x1f8876(-0x140,-0x120)](_0x8fea84['id'],null,_0x12e326(-0x8b,-0x9e)),![];_0x568dfa[_0x12e326(-0x7f,-0x80)](_0x3393a5,_0x8fea84['id']);function _0x12e326(_0x26900e,_0x461fdc){return _0x44148b(_0x461fdc- -0x1cd,_0x26900e);}return!![];}),_0x15b967=_0xe42160[_0x11ecaf(0x26b,0x295)](_0x3063e0=>!_0x3063e0[_0x44148b(0x128,0x129)]),_0x472b10=_0xe42160[_0x11ecaf(0x281,0x295)](_0x484e29=>!!_0x484e29[_0x44148b(0x128,0x135)]),_0x5c0ac0=new Map();for(const _0x4e5bae of _0x472b10){if('gwGUF'===_0x11ecaf(0x284,0x276)){const _0x4d498b=_0x3c5fa2[_0x44148b(0x131,0x164)+'re']!==_0x2ecf0a?_0x57cf7e[_0x11ecaf(0x26a,0x282)](_0x107112[_0x44148b(0x131,0x148)+'re']*0x3e8)/0x3e8:_0x1158e9;return _0x2f582[_0x44148b(0x14d,0x12a)](_0x43bd9c['id'],_0x4d498b),{'content':_0x57afc3[_0x44148b(0x11d,0xf9)],'category':_0x3fdc12(_0x177bf3[_0x44148b(0x130,0x11b)]),'tier':_0x11ecaf(0x26e,0x24c),'tags':_0x392901[_0x11ecaf(0x295,0x272)],'created_at':_0xc4a4a4[_0x11ecaf(0x257,0x26a)],'parent_id':_0x45d2e9['parentId']?_0x433392[_0x11ecaf(0x264,0x28c)](_0x5baa16[_0x11ecaf(0x23e,0x260)]):_0x51b5ca,'chunk_index':_0x4b90e1[_0x11ecaf(0x281,0x294)]??_0x4a104a,'chunk_total':_0x5a29d9[_0x11ecaf(0x2c2,0x292)]??_0x3e7da6,'quality_score':_0x4d498b};}else{if(_0x4e5bae[_0x44148b(0x128,0x157)]&&!_0x5c0ac0[_0x11ecaf(0x268,0x286)](_0x4e5bae[_0x11ecaf(0x27f,0x260)])){const _0x119154=this['db'][_0x11ecaf(0x27b,0x27f)+_0x11ecaf(0x29a,0x288)](_0x4e5bae[_0x11ecaf(0x284,0x260)]);_0x119154?.[_0x44148b(0x123,0x133)]&&_0x5c0ac0['set'](_0x4e5bae[_0x11ecaf(0x245,0x260)],_0x119154['remoteId']);}}}await this['pushBatche'+'s'](_0x15b967,_0x3d801a,_0x4b8d92,_0x5e3c83,_0x393a66,_0x5c0ac0);if(_0x472b10['length']>0x0&&(_0x5e3c83===0x0||Date[_0x44148b(0x16d,0x166)]()-_0x4b8d92<_0x5e3c83)){const _0x5f2822=_0x472b10[_0x44148b(0x15d,0x12c)](_0x36185a=>_0x5c0ac0[_0x11ecaf(0x27b,0x286)](_0x36185a[_0x11ecaf(0x271,0x260)])),_0x39658c=_0x472b10['filter'](_0x34c28b=>!_0x5c0ac0[_0x11ecaf(0x2ac,0x286)](_0x34c28b[_0x11ecaf(0x293,0x260)]));_0x39658c['length']>0x0&&('FioDb'===_0x11ecaf(0x2a3,0x28a)?(_0x36fd5e[_0x11ecaf(0x283,0x293)][_0x11ecaf(0x23c,0x24f)](_0x11ecaf(0x26f,0x27e)+(_0x124085 instanceof _0x356e51?_0x2b9891[_0x11ecaf(0x27c,0x280)]:_0xa7c41c(_0x5782a9))),_0x14c5fb['failed']+=_0x4fbd50['length']):_0x393a66['errors']['push'](_0x39658c['length']+(_0x44148b(0x125,0x155)+_0x11ecaf(0x243,0x251)+_0x44148b(0x120,0x120)+_0x44148b(0x133,0x11a)+'에서\x20재시도)'))),await this[_0x11ecaf(0x2a4,0x28d)+'s'](_0x5f2822,_0x3d801a,_0x4b8d92,_0x5e3c83,_0x393a66,_0x5c0ac0);}_0x393a66['duration']=Date[_0x44148b(0x16d,0x143)]()-_0x4b8d92;function _0x44148b(_0x1f5f22,_0x306dcf){return _0x1336aa(_0x1f5f22- -0x10d,_0x306dcf);}function _0x11ecaf(_0x45cf3b,_0x3589e5){return _0x1336aa(_0x3589e5-0x2b,_0x45cf3b);}return _0x393a66;}async[_0x53e3b8(0x168,0x177)+'s'](_0x5ad97c,_0x1d0657,_0x17cf93,_0x7a44fe,_0x4cfbf5,_0x35e6eb){function _0x1d087f(_0xd9aaf8,_0x321c64){return _0x1336aa(_0x321c64-0x24,_0xd9aaf8);}function _0x34bf64(_0xad9c21,_0x49d9eb){return _0x1336aa(_0x49d9eb- -0x416,_0xad9c21);}for(let _0x1a93b0=0x0;_0x1a93b0<_0x5ad97c[_0x34bf64(-0x1d4,-0x1c4)];_0x1a93b0+=_0x1d0657){if(_0x7a44fe>0x0&&Date[_0x34bf64(-0x1b8,-0x19c)]()-_0x17cf93>_0x7a44fe){const _0x3752df=_0x5ad97c[_0x1d087f(0x253,0x276)]-_0x1a93b0;_0x4cfbf5['errors'][_0x1d087f(0x26b,0x248)](_0x1d087f(0x2c3,0x29d)+_0x3752df+'개\x20미처리'),_0x4cfbf5[_0x34bf64(-0x1bc,-0x1ed)]+=_0x3752df;break;}const _0x2ec46f=_0x5ad97c[_0x34bf64(-0x17c,-0x1a4)](_0x1a93b0,_0x1a93b0+_0x1d0657);try{const _0x361a19=new Map(),_0x1a13db=await this[_0x1d087f(0x2b7,0x2a1)][_0x34bf64(-0x1d4,-0x1dd)+_0x1d087f(0x248,0x26a)](_0x2ec46f['map'](_0x382a10=>{function _0x17b6dd(_0x2fccd9,_0x5ede7e){return _0x34bf64(_0x2fccd9,_0x5ede7e-0x313);}const _0x2dd301=_0x382a10[_0x365eba(0x2ef,0x312)+'re']!==undefined?Math['round'](_0x382a10[_0x365eba(0x2ef,0x2f4)+'re']*0x3e8)/0x3e8:undefined;function _0x365eba(_0xa3be1a,_0x4ce785){return _0x34bf64(_0x4ce785,_0xa3be1a-0x4c7);}return _0x361a19['set'](_0x382a10['id'],_0x2dd301),{'content':_0x382a10[_0x365eba(0x2db,0x2f7)],'category':mapCategory(_0x382a10[_0x17b6dd(0x152,0x13a)]),'tier':_0x365eba(0x2d2,0x2f7),'tags':_0x382a10[_0x365eba(0x2f8,0x2f5)],'created_at':_0x382a10['createdAt'],'parent_id':_0x382a10[_0x17b6dd(0x155,0x132)]?_0x35e6eb[_0x365eba(0x312,0x339)](_0x382a10[_0x365eba(0x2e6,0x316)]):undefined,'chunk_index':_0x382a10[_0x17b6dd(0x159,0x166)]??undefined,'chunk_total':_0x382a10['chunkTotal']??undefined,'quality_score':_0x2dd301};}));for(let _0x584339=0x0;_0x584339<_0x1a13db[_0x34bf64(-0x17e,-0x1a0)][_0x34bf64(-0x1b0,-0x1c4)];_0x584339++){if(_0x584339<_0x2ec46f[_0x1d087f(0x246,0x276)]&&_0x1a13db[_0x34bf64(-0x1bd,-0x1a0)][_0x584339]){const _0x49652c=_0x2ec46f[_0x584339]['id'],_0x16cf8a=_0x361a19[_0x34bf64(-0x1b5,-0x1b5)](_0x49652c);if(_0x16cf8a!==undefined&&_0x2ec46f[_0x584339][_0x34bf64(-0x1db,-0x1d8)+'re']===undefined)try{this['db'][_0x1d087f(0x249,0x272)+'ry'](_0x49652c,{'qualityScore':_0x16cf8a});}catch{}this['db'][_0x1d087f(0x29c,0x269)+_0x34bf64(-0x1a4,-0x1b9)](_0x49652c,_0x1a13db[_0x1d087f(0x2cc,0x29a)][_0x584339],_0x34bf64(-0x1aa,-0x1da)),_0x35e6eb[_0x1d087f(0x2aa,0x27e)](_0x49652c,_0x1a13db[_0x1d087f(0x289,0x29a)][_0x584339]),_0x4cfbf5['syncedItem'+'s']['push']({'localId':_0x49652c,'remoteId':_0x1a13db['ids'][_0x584339]});}}_0x4cfbf5[_0x1d087f(0x253,0x253)]+=_0x1a13db['created'],_0x4cfbf5[_0x1d087f(0x237,0x24d)]+=_0x1a13db[_0x34bf64(-0x1e8,-0x1ed)];if(_0x1a13db[_0x34bf64(-0x1b4,-0x1ae)]['length']>0x0){const _0x1df136=new Set(),_0x5f5589=/Parent memory not found:\s*parent_id\s*'([^']+)'/;for(const _0x1a40b1 of _0x1a13db[_0x1d087f(0x2b6,0x28c)]){const _0x25c31e=_0x1a40b1['match'](_0x5f5589);if(_0x25c31e)_0x1df136['add'](_0x25c31e[0x1]);}if(_0x1df136['size']>0x0){if(_0x34bf64(-0x1b2,-0x1bd)===_0x1d087f(0x229,0x250))return _0x24b5dd[_0x260c6b]??_0x3602f6;else{let _0x549e08=0x0;for(const _0x2e6d32 of _0x1df136){_0x549e08+=this['db'][_0x34bf64(-0x1a0,-0x1b0)+_0x1d087f(0x239,0x255)+_0x1d087f(0x2c0,0x294)](_0x2e6d32);}if(_0x549e08>0x0){if(_0x34bf64(-0x1da,-0x1fa)===_0x1d087f(0x2a3,0x292)){if(_0x3d555f[_0x34bf64(-0x1f5,-0x1e1)]&&!_0x40ea71['has'](_0x2aa74e[_0x34bf64(-0x20d,-0x1e1)])){const _0x4febba=this['db'][_0x1d087f(0x269,0x278)+'tus'](_0x58e40a['parentId']);_0x4febba?.[_0x1d087f(0x22e,0x254)]&&_0x26a68e[_0x1d087f(0x267,0x27e)](_0x17c243[_0x1d087f(0x254,0x259)],_0x4febba[_0x1d087f(0x242,0x254)]);}}else _0x4cfbf5[_0x1d087f(0x2b5,0x28c)][_0x1d087f(0x253,0x248)](_0x34bf64(-0x1e4,-0x1ef)+'nt\x20'+_0x1df136['size']+(_0x1d087f(0x274,0x24c)+'\x20(')+_0x549e08+(_0x1d087f(0x24c,0x27c)+_0x34bf64(-0x1b4,-0x1ab)+_0x34bf64(-0x18d,-0x19e)+')'));}}}_0x4cfbf5[_0x34bf64(-0x19b,-0x1ae)][_0x1d087f(0x278,0x248)](..._0x1a13db[_0x34bf64(-0x19c,-0x1ae)]);}}catch(_0x5b9241){_0x4cfbf5[_0x1d087f(0x267,0x28c)][_0x1d087f(0x237,0x248)](_0x1d087f(0x290,0x277)+(_0x5b9241 instanceof Error?_0x5b9241[_0x34bf64(-0x1ea,-0x1c1)]:String(_0x5b9241))),_0x4cfbf5['failed']+=_0x2ec46f[_0x34bf64(-0x1ae,-0x1c4)];}}}async[_0x53e3b8(0x190,0x161)+_0x53e3b8(0x19a,0x190)](_0x3da5bb){const _0x5c0f95=Date[_0x4c2fee(0x3e4,0x3b2)](),_0x2faa96=_0x3da5bb?.[_0x50cd8b(0x3d6,0x3c2)]??0x0;function _0x4c2fee(_0x29040c,_0x1fca97){return _0x53e3b8(_0x1fca97,_0x29040c-0x255);}const _0x4ac8d3=_0x3da5bb?.[_0x50cd8b(0x3c6,0x3bd)]??Number[_0x4c2fee(0x3a1,0x3b8)+'NTEGER'],_0x4e5450=Math['max'](0x1,_0x3da5bb?.[_0x50cd8b(0x418,0x3f5)+'y']??0x1),_0x4402f1=this['db'][_0x50cd8b(0x3f9,0x3d2)+'dTombstone'+'s']();let _0x2b19b0=0x0;const _0x2da470=[],_0x1fe20e=[];for(const _0x45f56 of _0x4402f1){const _0x1cb7b4=this['db'][_0x4c2fee(0x3be,0x3c7)+_0x4c2fee(0x3c7,0x3b6)](_0x45f56[_0x50cd8b(0x432,0x41d)]);if(!_0x1cb7b4?.[_0x4c2fee(0x39a,0x3b3)]){this['db'][_0x4c2fee(0x384,0x395)+_0x50cd8b(0x3c2,0x3ec)](_0x45f56[_0x4c2fee(0x3e8,0x418)]),this['db'][_0x4c2fee(0x3b9,0x3a2)+_0x4c2fee(0x3ae,0x3e0)](_0x45f56['memoryId']);continue;}_0x1fe20e[_0x4c2fee(0x38e,0x37d)]({'memoryId':_0x45f56[_0x50cd8b(0x3fd,0x41d)],'remoteId':_0x1cb7b4['remoteId']});}const _0x4449da=_0x1fe20e['slice'](0x0,_0x4ac8d3),_0x4a88f2=()=>_0x2faa96>0x0&&Date[_0x4c2fee(0x3e4,0x3fb)]()-_0x5c0f95>=_0x2faa96;let _0x39bd90=![];function _0x50cd8b(_0x549cff,_0x3e4937){return _0x53e3b8(_0x549cff,_0x3e4937-0x28a);}for(let _0x1de78e=0x0;_0x1de78e<_0x4449da['length'];_0x1de78e+=_0x4e5450){if(_0x4a88f2()){_0x39bd90=!![];break;}const _0x4f71a3=_0x4449da[_0x4c2fee(0x3dc,0x3f5)](_0x1de78e,_0x1de78e+_0x4e5450),_0x27ec38=await Promise[_0x50cd8b(0x3d1,0x3e0)](_0x4f71a3[_0x4c2fee(0x3c6,0x3cd)](async _0x38a52d=>{function _0xffb107(_0x26f9e1,_0x9eec54){return _0x50cd8b(_0x26f9e1,_0x9eec54- -0x213);}function _0x220b3f(_0x17c379,_0x497bf3){return _0x50cd8b(_0x497bf3,_0x17c379- -0x110);}if('KNoMa'!=='ftGrG')try{return await this[_0x220b3f(0x30c,0x307)][_0x220b3f(0x2fc,0x2ce)+'ry'](_0x38a52d['remoteId']),{'memoryId':_0x38a52d[_0x220b3f(0x30d,0x33d)],'ok':!![],'rateLimited':![],'msg':''};}catch(_0x4966f1){if('EGOIb'===_0xffb107(0x19d,0x1ab)){if(_0x1c27e5['ok'])this['db'][_0x220b3f(0x2a9,0x2a3)+'oneSynced'](_0x479a5b[_0x220b3f(0x30d,0x2ed)]),this['db'][_0x220b3f(0x2de,0x2d4)+_0x220b3f(0x2d3,0x2f9)](_0x41ece1[_0x220b3f(0x30d,0x2f2)]),_0x10f0f6++;else{_0x12b6e1['push'](_0xffb107(0x1e0,0x1f8)+_0x452c2d[_0x220b3f(0x30d,0x337)]+_0x220b3f(0x304,0x333)+_0x2d0d1a[_0xffb107(0x1e5,0x1ea)]);if(_0x4b2be7[_0xffb107(0x19b,0x1a9)+'d'])_0x47d819=!![];}}else{const _0x537571=_0x4966f1 instanceof Error?_0x4966f1[_0x220b3f(0x2e4,0x304)]:String(_0x4966f1),_0x34a390=getErrorStatus(_0x4966f1);if(_0x34a390===0x194||_0x537571[_0x220b3f(0x2c9,0x2ce)](_0x220b3f(0x2b1,0x2c1))||_0x537571[_0xffb107(0x1f3,0x1c6)](_0xffb107(0x1ce,0x1b7)))return{'memoryId':_0x38a52d['memoryId'],'ok':!![],'rateLimited':![],'msg':''};return{'memoryId':_0x38a52d[_0xffb107(0x222,0x20a)],'ok':![],'rateLimited':_0x34a390===0x1ad,'msg':_0x537571};}}else this['db'][_0x220b3f(0x2dd,0x30b)+'ry'](_0x133099,{'qualityScore':_0x26294c});}));for(const _0x1e6f17 of _0x27ec38){if(_0x1e6f17['ok'])this['db'][_0x50cd8b(0x3bf,0x3b9)+_0x4c2fee(0x3b7,0x3e1)](_0x1e6f17['memoryId']),this['db'][_0x4c2fee(0x3b9,0x3bc)+_0x50cd8b(0x3b8,0x3e3)](_0x1e6f17[_0x4c2fee(0x3e8,0x413)]),_0x2b19b0++;else{if(_0x50cd8b(0x3bf,0x3bf)==='wpneo'){_0x2da470[_0x4c2fee(0x38e,0x37c)](_0x4c2fee(0x3d6,0x3da)+_0x1e6f17[_0x4c2fee(0x3e8,0x3d7)]+_0x4c2fee(0x3df,0x3e1)+_0x1e6f17[_0x4c2fee(0x3c8,0x3d7)]);if(_0x1e6f17[_0x4c2fee(0x387,0x37d)+'d'])_0x39bd90=!![];}else return{'memoryId':_0x4b752b['memoryId'],'ok':!![],'rateLimited':![],'msg':''};}}if(_0x39bd90)break;}return{'deleted':_0x2b19b0,'errors':_0x2da470,'remaining':Math[_0x50cd8b(0x408,0x3e2)](0x0,_0x1fe20e[_0x50cd8b(0x3e0,0x3f1)]-_0x2b19b0),'stopped':_0x39bd90};}[_0x1336aa(0x26f,0x25f)+'Count'](){function _0x1bb6d4(_0x50837c,_0x506129){return _0x53e3b8(_0x50837c,_0x506129- -0x13b);}return this['db'][_0x1bb6d4(0x6c,0x49)+'SyncMemori'+'es']()['length'];}}
@@ -1 +1 @@
1
- (function(_0x23658d,_0x528fa5){function _0x6fadd1(_0xec2dbb,_0x304c3b){return _0x37ca(_0x304c3b- -0x34b,_0xec2dbb);}const _0x47d99c=_0x23658d();function _0x28e474(_0x5bda7c,_0xaa461a){return _0x37ca(_0x5bda7c- -0x236,_0xaa461a);}while(!![]){try{const _0xc454e9=-parseInt(_0x6fadd1(-0x23f,-0x254))/0x1*(parseInt(_0x28e474(-0x143,-0x131))/0x2)+parseInt(_0x6fadd1(-0x27e,-0x261))/0x3+-parseInt(_0x28e474(-0x13e,-0x15b))/0x4+-parseInt(_0x28e474(-0x12e,-0x123))/0x5+parseInt(_0x28e474(-0x153,-0x14d))/0x6+-parseInt(_0x28e474(-0x123,-0x140))/0x7*(parseInt(_0x28e474(-0x117,-0x123))/0x8)+parseInt(_0x28e474(-0x144,-0x129))/0x9;if(_0xc454e9===_0x528fa5)break;else _0x47d99c['push'](_0x47d99c['shift']());}catch(_0x1dc6e6){_0x47d99c['push'](_0x47d99c['shift']());}}}(_0x1eb4,0x43a10));function _0x1c86e8(_0x245709,_0x321130){return _0x37ca(_0x245709- -0xa3,_0x321130);}function _0x37ca(_0x1b8859,_0x5d7452){_0x1b8859=_0x1b8859-0xe2;const _0x1eb4f6=_0x1eb4();let _0x37ca09=_0x1eb4f6[_0x1b8859];if(_0x37ca['tVtVRj']===undefined){var _0x486fea=function(_0x4b5eaf){const _0x47e7ef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a175b='',_0x32480f='';for(let _0x9b1ea2=0x0,_0x39fe42,_0x25be02,_0x41ce64=0x0;_0x25be02=_0x4b5eaf['charAt'](_0x41ce64++);~_0x25be02&&(_0x39fe42=_0x9b1ea2%0x4?_0x39fe42*0x40+_0x25be02:_0x25be02,_0x9b1ea2++%0x4)?_0x2a175b+=String['fromCharCode'](0xff&_0x39fe42>>(-0x2*_0x9b1ea2&0x6)):0x0){_0x25be02=_0x47e7ef['indexOf'](_0x25be02);}for(let _0x45fd33=0x0,_0x52f7c1=_0x2a175b['length'];_0x45fd33<_0x52f7c1;_0x45fd33++){_0x32480f+='%'+('00'+_0x2a175b['charCodeAt'](_0x45fd33)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x32480f);};_0x37ca['FilScn']=_0x486fea,_0x37ca['qMLWpn']={},_0x37ca['tVtVRj']=!![];}const _0x69f19f=_0x1eb4f6[0x0],_0x59bc23=_0x1b8859+_0x69f19f,_0xc2ff07=_0x37ca['qMLWpn'][_0x59bc23];return!_0xc2ff07?(_0x37ca09=_0x37ca['FilScn'](_0x37ca09),_0x37ca['qMLWpn'][_0x59bc23]=_0x37ca09):_0x37ca09=_0xc2ff07,_0x37ca09;}function _0x8a67f0(_0x1b3cc2,_0x4dd8fd){return _0x37ca(_0x4dd8fd- -0x2f2,_0x1b3cc2);}function _0x1eb4(){const _0x3eae8b=['CKjczLu','CNvUBMLUzW','u2nOzwr1BgvYia','idW9idaP','C3rHCNrLzef0','zgLZywjSzwqGka','B25tEw5J','uvHSu0K','z2v0u3rHDhvZ','CgLUzW','C3rVCa','mtG5ntmXnw1ezfPKzG','C3LUy05VDW','C3LUy0nVDw50','C3LUyW','yNzMu24','AxntEw5JAw5N','C3LUy09Uu3rHCG','DgLTzxi','CMvZCYWGC2TPCa','tLbirNO','zxrLza','mJK4nJLgt2DqreC','Dg9ju09tDhjPBG','wKnozKq','BM5PBMC','Aw50zxj2ywXnCW','ywXYzwfKEsbYDq','BgvUz3rO','EM5pu1u','Dw5Yzwy','ChvZAgvK','zvLZuNm','AxnsDw5UAw5N','mta0DLLjEhjV','B3b0Aw9UCW','mJK4nZKXmevcrffivG','C3rHCNq','BgfZDfjLC3vSDa','rhzeEha','zxjYB3i','D2fYBG','Aw5MBW','mtC0mtm4wNrsvhnJ','swjNALa','C3LUy2HYB25PEG','BgfZDfn5BMnbDa','ChvSBgvK','DgLJAYbLCNjVCG','C3rVChbLza','C3LUy2LUzW','nJiZnZuZmvH5vLzAsq','mZe2nK9Iyw9fBa','B2jQzwn0','zhKGAw4GChjVzW','u3LUyYbJB21WBa','mtq1D0rruxLO','mtiZmJa1mMPpyujdra','zxjYB3jZ','DgLJAW','Bg9Nz2vY','z2v0vgLTzq'];_0x1eb4=function(){return _0x3eae8b;};return _0x1eb4();}export class SyncScheduler{[_0x1c86e8(0x49,0x36)+'er'];['options'];[_0x1c86e8(0x58,0x45)];[_0x1c86e8(0x6c,0x8b)]=null;['running']=![];[_0x1c86e8(0x4e,0x5e)]=![];[_0x1c86e8(0x67,0x5b)]=0x0;['lastSyncAt']=null;['lastResult']=null;[_0x1c86e8(0x5e,0x67)]=null;constructor(_0x9e809f,_0x51a2d2,_0x5225cd){function _0xd68d5d(_0x1f2fc5,_0x10e497){return _0x8a67f0(_0x10e497,_0x1f2fc5-0x46d);}this[_0xd68d5d(0x267,0x253)+'er']=_0x9e809f;function _0x4e3c2e(_0x3e5cfc,_0x1d8c0a){return _0x8a67f0(_0x1d8c0a,_0x3e5cfc- -0x5b);}this['options']=_0x51a2d2,this[_0x4e3c2e(-0x252,-0x260)]=_0x5225cd;}async[_0x8a67f0(-0x21a,-0x20e)](){if(this['running']){this[_0x4755d8(-0x291,-0x27d)]?.[_0x33d905(-0x2de,-0x2eb)]('Scheduler\x20'+_0x4755d8(-0x274,-0x275)+_0x4755d8(-0x276,-0x283));return;}if(this[_0x33d905(-0x2ee,-0x2f1)][_0x4755d8(-0x275,-0x26b)]<=0x0){this['logger']?.[_0x33d905(-0x2e9,-0x2eb)](_0x4755d8(-0x28d,-0x27c)+_0x33d905(-0x2de,-0x2d1)+_0x4755d8(-0x275,-0x272)+_0x33d905(-0x2e1,-0x2d3));return;}function _0x4755d8(_0x8fc2eb,_0x197b83){return _0x1c86e8(_0x8fc2eb- -0x2e9,_0x197b83);}this['running']=!![],this[_0x33d905(-0x2ea,-0x2d2)]=new Date(),this[_0x33d905(-0x2f4,-0x2d8)]?.[_0x4755d8(-0x2a3,-0x2bf)](_0x33d905(-0x2dd,-0x2d4)+'started',{'intervalMs':this[_0x4755d8(-0x2aa,-0x28c)][_0x33d905(-0x2c4,-0x2bc)]});if(this['options'][_0x4755d8(-0x27e,-0x298)+'t']!==![]){if(_0x33d905(-0x2ac,-0x2b9)!==_0x4755d8(-0x272,-0x25e)){const _0x285379=new _0x4b14de(this[_0x4755d8(-0x28b,-0x29b)]['getTime']()+this[_0x33d905(-0x2d7,-0x2f1)][_0x33d905(-0x2cd,-0x2bc)]);_0x17f366=_0x285379['toISOStrin'+'g']();}else await this['tick']();}this[_0x33d905(-0x2dc,-0x2c4)]=setInterval(()=>{function _0x489034(_0x1ee72e,_0x21e78d){return _0x33d905(_0x1ee72e,_0x21e78d-0x662);}function _0x70f30b(_0x1a9727,_0x5018a6){return _0x33d905(_0x1a9727,_0x5018a6-0x777);}_0x70f30b(0x4bb,0x4b9)!==_0x70f30b(0x491,0x48a)?this[_0x489034(0x37c,0x389)]()['catch'](_0x418908=>{function _0x43520e(_0x5ee7e6,_0x59efc0){return _0x70f30b(_0x5ee7e6,_0x59efc0- -0x5ef);}function _0x342a3b(_0x34b7dd,_0x18bbda){return _0x70f30b(_0x18bbda,_0x34b7dd- -0x134);}_0x342a3b(0x381,0x38d)!==_0x342a3b(0x36d,0x365)?this[_0x43520e(-0x144,-0x150)]?.['error']('Scheduler\x20'+_0x342a3b(0x35f,0x361),_0x418908 instanceof Error?_0x418908:new Error(String(_0x418908))):(this['synchroniz'+'er']=_0x39fe42,this[_0x342a3b(0x352,0x351)]=_0x25be02,this['logger']=_0x41ce64);}):this['logger']?.[_0x70f30b(0x488,0x48b)](_0x70f30b(0x4b3,0x4a3)+'tick\x20error',_0x1ea5ba instanceof _0x3c41b0?_0x993771:new _0x128c23(_0x452568(_0x5d1b6b)));},this['options'][_0x33d905(-0x2b1,-0x2bc)]);function _0x33d905(_0x5b9651,_0x3cf5ad){return _0x1c86e8(_0x3cf5ad- -0x330,_0x5b9651);}this[_0x4755d8(-0x27d,-0x286)]&&typeof this[_0x33d905(-0x2cc,-0x2c4)]===_0x33d905(-0x2de,-0x2df)&&_0x4755d8(-0x271,-0x25b)in this[_0x33d905(-0x2c5,-0x2c4)]&&this[_0x33d905(-0x2cd,-0x2c4)][_0x4755d8(-0x271,-0x283)]();}[_0x8a67f0(-0x206,-0x1eb)](){if(!this[_0x51177f(0x2bc,0x2a2)])return;function _0x241be8(_0x36e56f,_0x3973ec){return _0x8a67f0(_0x3973ec,_0x36e56f-0x275);}this[_0x51177f(0x2a3,0x2b3)]&&(clearInterval(this[_0x51177f(0x2d0,0x2b3)]),this[_0x241be8(0x92,0x87)]=null);function _0x51177f(_0x4f5f06,_0x34a7c3){return _0x8a67f0(_0x4f5f06,_0x34a7c3-0x496);}this['running']=![],this[_0x241be8(0x7e,0x87)]?.['info'](_0x51177f(0x2bf,0x2a3)+_0x51177f(0x277,0x294),{'syncCount':this[_0x51177f(0x2bc,0x2ae)]});}[_0x1c86e8(0x7b,0x7e)](){function _0x55fb17(_0x1b18df,_0x4f5906){return _0x1c86e8(_0x4f5906- -0x196,_0x1b18df);}return this[_0x55fb17(-0x14b,-0x13b)];}[_0x1c86e8(0x6a,0x6b)](){function _0x373bcd(_0x46d35b,_0x498598){return _0x1c86e8(_0x498598-0x127,_0x46d35b);}return this[_0x373bcd(0x15d,0x175)];}[_0x8a67f0(-0x1f3,-0x1ed)](){let _0xd12aa7=null;function _0x4aa347(_0x302e4b,_0xcf8920){return _0x1c86e8(_0x302e4b-0x19c,_0xcf8920);}function _0x38cea0(_0x5023ad,_0x5e7330){return _0x1c86e8(_0x5023ad- -0x25d,_0x5e7330);}if(this[_0x4aa347(0x1f7,0x1f6)]&&this['lastSyncAt']){const _0x7f61e0=new Date(this['lastSyncAt'][_0x38cea0(-0x204,-0x21f)]()+this[_0x4aa347(0x1db,0x1bf)][_0x4aa347(0x210,0x210)]);_0xd12aa7=_0x7f61e0[_0x38cea0(-0x1ec,-0x203)+'g']();}else{if(this[_0x38cea0(-0x202,-0x1e3)]&&this[_0x4aa347(0x1fa,0x1f3)]){if(_0x4aa347(0x1e4,0x1f1)===_0x38cea0(-0x1fc,-0x210))return this['running'];else{const _0x36ba7d=new Date(this[_0x4aa347(0x1fa,0x1ff)][_0x38cea0(-0x204,-0x221)]()+this[_0x4aa347(0x1db,0x1e7)]['intervalMs']);_0xd12aa7=_0x36ba7d[_0x4aa347(0x20d,0x1f9)+'g']();}}}return{'running':this[_0x4aa347(0x1f7,0x1dc)],'syncing':this['syncing'],'syncCount':this[_0x4aa347(0x203,0x211)],'lastSyncAt':this[_0x38cea0(-0x213,-0x20a)]?.[_0x38cea0(-0x1ec,-0x1d9)+'g']()??null,'lastResult':this[_0x4aa347(0x1de,0x1e4)],'intervalMs':this['options'][_0x38cea0(-0x1e9,-0x1e5)],'nextSyncAt':_0xd12aa7};}async[_0x8a67f0(-0x1dd,-0x1e9)](){function _0x563315(_0xc1ae3f,_0x294669){return _0x1c86e8(_0x294669- -0xa,_0xc1ae3f);}return this[_0x563315(0x68,0x4d)]();}async[_0x1c86e8(0x57,0x3d)](){if(this['syncing']){if(_0x171ac8(-0x1ed,-0x200)!==_0x171ac8(-0x212,-0x200)){if(!this[_0x40c110(0x440,0x432)])return;this[_0x40c110(0x456,0x443)]&&(_0x3c49b8(this['timer']),this[_0x40c110(0x459,0x443)]=null),this[_0x171ac8(-0x20a,-0x21f)]=![],this[_0x171ac8(-0x231,-0x222)]?.[_0x40c110(0x408,0x41d)](_0x40c110(0x448,0x433)+_0x171ac8(-0x212,-0x22d),{'syncCount':this[_0x40c110(0x44c,0x43e)]});}else return this[_0x171ac8(-0x204,-0x222)]?.['debug']('Sync\x20alrea'+_0x171ac8(-0x241,-0x228)+_0x171ac8(-0x1f4,-0x20d)+_0x40c110(0x433,0x43a)),null;}function _0x40c110(_0x419bcd,_0x284246){return _0x8a67f0(_0x419bcd,_0x284246-0x626);}this['syncing']=!![];function _0x171ac8(_0x192f70,_0x5df3de){return _0x8a67f0(_0x192f70,_0x5df3de- -0x2b);}try{const _0x27fe98=await this[_0x40c110(0x436,0x420)+'er'][_0x171ac8(-0x222,-0x212)]();return this['syncCount']++,this['lastSyncAt']=new Date(),this[_0x171ac8(-0x222,-0x238)]=_0x27fe98,this[_0x171ac8(-0x239,-0x222)]?.[_0x171ac8(-0x251,-0x234)](_0x40c110(0x43c,0x42a)+_0x171ac8(-0x1ee,-0x20b),{'pushed':_0x27fe98[_0x171ac8(-0x212,-0x201)],'pulled':_0x27fe98[_0x40c110(0x413,0x422)],'errors':_0x27fe98[_0x40c110(0x412,0x42d)][_0x171ac8(-0x20d,-0x204)],'duration':_0x27fe98['duration']}),this['options'][_0x171ac8(-0x223,-0x21a)]?.(_0x27fe98),_0x27fe98;}catch(_0x21e8dc){const _0x370e1a=_0x21e8dc instanceof Error?_0x21e8dc:new Error(String(_0x21e8dc));return this[_0x40c110(0x43d,0x42f)]?.[_0x40c110(0x40b,0x41b)]('Sync\x20faile'+'d',_0x370e1a),this['options']['onError']?.(_0x370e1a),null;}finally{if('bvfSn'===_0x40c110(0x454,0x440))this[_0x171ac8(-0x20d,-0x22c)]=![];else{let _0x33949f=null;if(this[_0x171ac8(-0x23d,-0x21f)]&&this['lastSyncAt']){const _0x4139e3=new _0x1778c9(this[_0x171ac8(-0x211,-0x230)]['getTime']()+this[_0x171ac8(-0x236,-0x23b)][_0x171ac8(-0x1ef,-0x206)]);_0x33949f=_0x4139e3['toISOStrin'+'g']();}else{if(this[_0x171ac8(-0x238,-0x21f)]&&this['startedAt']){const _0xa5db83=new _0x544b81(this[_0x171ac8(-0x20b,-0x21c)]['getTime']()+this['options'][_0x171ac8(-0x1f7,-0x206)]);_0x33949f=_0xa5db83[_0x171ac8(-0x20f,-0x209)+'g']();}}return{'running':this[_0x40c110(0x44f,0x432)],'syncing':this[_0x40c110(0x42a,0x425)],'syncCount':this[_0x40c110(0x42c,0x43e)],'lastSyncAt':this[_0x171ac8(-0x228,-0x230)]?.[_0x40c110(0x45b,0x448)+'g']()??null,'lastResult':this[_0x40c110(0x42a,0x419)],'intervalMs':this[_0x40c110(0x407,0x416)][_0x40c110(0x431,0x44b)],'nextSyncAt':_0x33949f};}}}}
1
+ function _0x2047(_0x2f9357,_0x498202){_0x2f9357=_0x2f9357-0x14e;const _0x16be23=_0x16be();let _0x2047de=_0x16be23[_0x2f9357];if(_0x2047['hGhpVc']===undefined){var _0x46cd95=function(_0x345342){const _0xb12f3f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5acc26='',_0x24f877='';for(let _0x2a4015=0x0,_0x1d961a,_0x33a5e3,_0x4aeb16=0x0;_0x33a5e3=_0x345342['charAt'](_0x4aeb16++);~_0x33a5e3&&(_0x1d961a=_0x2a4015%0x4?_0x1d961a*0x40+_0x33a5e3:_0x33a5e3,_0x2a4015++%0x4)?_0x5acc26+=String['fromCharCode'](0xff&_0x1d961a>>(-0x2*_0x2a4015&0x6)):0x0){_0x33a5e3=_0xb12f3f['indexOf'](_0x33a5e3);}for(let _0x430676=0x0,_0x543e0e=_0x5acc26['length'];_0x430676<_0x543e0e;_0x430676++){_0x24f877+='%'+('00'+_0x5acc26['charCodeAt'](_0x430676)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24f877);};_0x2047['yNKmzI']=_0x46cd95,_0x2047['gebCTN']={},_0x2047['hGhpVc']=!![];}const _0x102e9d=_0x16be23[0x0],_0xbd93ec=_0x2f9357+_0x102e9d,_0x3ff6e3=_0x2047['gebCTN'][_0xbd93ec];return!_0x3ff6e3?(_0x2047de=_0x2047['yNKmzI'](_0x2047de),_0x2047['gebCTN'][_0xbd93ec]=_0x2047de):_0x2047de=_0x3ff6e3,_0x2047de;}function _0x526feb(_0x257a7c,_0x2f4a1a){return _0x2047(_0x257a7c-0x164,_0x2f4a1a);}function _0xb80674(_0x542a00,_0x11e059){return _0x2047(_0x542a00- -0x3b9,_0x11e059);}(function(_0x57b6a9,_0x4c6b4e){function _0x46e707(_0x2dcd0e,_0x45e3ca){return _0x2047(_0x2dcd0e- -0x201,_0x45e3ca);}function _0x489e1b(_0x291681,_0x1b7574){return _0x2047(_0x291681- -0x36a,_0x1b7574);}const _0xd9f3ab=_0x57b6a9();while(!![]){try{const _0x106c5b=-parseInt(_0x489e1b(-0x21b,-0x203))/0x1*(parseInt(_0x46e707(-0x8d,-0x73))/0x2)+-parseInt(_0x489e1b(-0x21a,-0x233))/0x3+parseInt(_0x46e707(-0x7d,-0x98))/0x4*(-parseInt(_0x489e1b(-0x204,-0x1f4))/0x5)+parseInt(_0x46e707(-0x94,-0xa2))/0x6*(parseInt(_0x46e707(-0xa7,-0xb8))/0x7)+-parseInt(_0x489e1b(-0x208,-0x21b))/0x8*(parseInt(_0x489e1b(-0x1f7,-0x1f3))/0x9)+-parseInt(_0x46e707(-0x8a,-0x95))/0xa+parseInt(_0x46e707(-0xab,-0xc1))/0xb;if(_0x106c5b===_0x4c6b4e)break;else _0xd9f3ab['push'](_0xd9f3ab['shift']());}catch(_0x4daed7){_0xd9f3ab['push'](_0xd9f3ab['shift']());}}}(_0x16be,0xa0466));function _0x16be(){const _0xa01b7e=['C3LUy05VDW','DgLJAW','C3rHCNrLza','ovrAChfNva','nhbYAK1Suq','u3LUyYbMywLSzq','AxnsDw5UAw5N','mZaWnZG2mfvxvKjfEa','zgLZywjSzwqGka','zgvIDwC','B2jQzwn0','DgLJAYbLCNjVCG','D2fYBG','zhKGAw4GChjVzW','B3b0Aw9UCW','rNnsC3m','zxjYB3i','Dw5Yzwy','BM5PBMC','C3rHCNq','nfbUrvvlDW','u2nOzwr1BgvYia','BgfZDfjLC3vSDa','ChvZAgvK','Aw50zxj2ywXnCW','zgXgqMy','idW9idaP','BgvUz3rO','nJqWntu4wgz3Bhf6','mJG4ntC1mwf2re91CG','BgfZDfn5BMnbDa','tgvZA3O','CMvZCYWGC2TPCa','y2f0y2G','Bg9Nz2vY','ndqZndG3mdb4u1Phq2e','C3LUy0nVDw50','C3LUy09Uu3rHCG','zxjYB3jZ','nZuXmZy4mvriufviAW','z2v0vgLTzq','B25tEw5J','CNvUBMLUzW','Dg9ju09tDhjPBG','DgLTzxi','Aw5MBW','sgr1wvG','oti4mdeZnLbWzfztvW','C3LUy2HYB25PEG','Be1ltg4','C3rVCa','mZCYmZGWnxDVC3DzDW','C3rHCNrLzef0','zhvYyxrPB24','Dunxrxq','C3LUyW','C3LUy2LUzW','CgLUzW','nMLOsfHQra','ywXYzwfKEsbYDq','B25fCNjVCG'];_0x16be=function(){return _0xa01b7e;};return _0x16be();}export class SyncScheduler{[_0xb80674(-0x256,-0x24f)+'er'];[_0xb80674(-0x23b,-0x256)];[_0xb80674(-0x264,-0x280)];['timer']=null;['running']=![];[_0x526feb(0x2cf,0x2ce)]=![];[_0x526feb(0x2bb,0x2c5)]=0x0;['lastSyncAt']=null;[_0xb80674(-0x233,-0x24d)]=null;[_0xb80674(-0x252,-0x26e)]=null;constructor(_0x213274,_0x4466a9,_0x26d086){function _0x469089(_0x22d7fc,_0x3bbb2e){return _0x526feb(_0x3bbb2e- -0x4f,_0x22d7fc);}this[_0xe38a1(0x231,0x21d)+'er']=_0x213274,this[_0xe38a1(0x22d,0x238)]=_0x4466a9;function _0xe38a1(_0x441f35,_0x18e9bf){return _0x526feb(_0x18e9bf- -0xaa,_0x441f35);}this['logger']=_0x26d086;}async[_0x526feb(0x2e7,0x2f6)](){if(this[_0xaa8e13(0x2ef,0x2e4)]){this['logger']?.[_0x510d66(0x2b,0x26)]('Scheduler\x20'+_0x510d66(0x1d,0x37)+_0x510d66(0x31,0x1a));return;}if(this[_0xaa8e13(0x310,0x2fc)][_0xaa8e13(0x31a,0x314)]<=0x0){if('WCTin'==='zwBXY')this[_0x510d66(0x20,0xc)]()[_0xaa8e13(0x2e6,0x2d1)](_0x3ae44f=>{function _0x242fad(_0x106c97,_0x34d2c2){return _0x510d66(_0x106c97-0x2b8,_0x34d2c2);}function _0x4e0b80(_0x2a557,_0x4a7d63){return _0x510d66(_0x4a7d63-0x31e,_0x2a557);}this[_0x4e0b80(0x326,0x322)]?.[_0x4e0b80(0x369,0x34d)]('Scheduler\x20'+'tick\x20error',_0x3ae44f instanceof _0x4a4184?_0x3ae44f:new _0x1a0195(_0x255176(_0x3ae44f)));});else{this['logger']?.['warn'](_0x510d66(0x34,0x25)+_0x510d66(0x27,0x15)+'intervalMs'+_0xaa8e13(0x31c,0x338));return;}}this[_0x510d66(0xc,0x14)]=!![];function _0x510d66(_0x2235b5,_0x58216c){return _0xb80674(_0x2235b5-0x268,_0x58216c);}this[_0x510d66(0x16,0x1b)]=new Date(),this[_0x510d66(0x4,0x14)]?.[_0xaa8e13(0x2f2,0x2ec)](_0x510d66(0x34,0x22)+_0xaa8e13(0x304,0x322),{'intervalMs':this[_0xaa8e13(0x310,0x30d)][_0x510d66(0x37,0x38)]});if(this[_0xaa8e13(0x310,0x309)][_0xaa8e13(0x2ea,0x2dd)+'t']!==![]){if(_0x510d66(0x18,-0x5)!=='uCWEt'){this[_0xaa8e13(0x2e7,0x2cd)]?.[_0x510d66(0x2b,0x22)](_0x510d66(0x34,0x4b)+'already\x20ru'+_0xaa8e13(0x314,0x321));return;}else await this[_0x510d66(0x20,0x2c)]();}function _0xaa8e13(_0x31be2e,_0x2ed91d){return _0xb80674(_0x31be2e-0x54b,_0x2ed91d);}this[_0xaa8e13(0x2f1,0x2e1)]=setInterval(()=>{function _0xea573a(_0x34c7a8,_0x458259){return _0xaa8e13(_0x458259- -0x1fd,_0x34c7a8);}function _0x32118a(_0x2f7e0f,_0x46662e){return _0xaa8e13(_0x2f7e0f- -0x513,_0x46662e);}if('nzgyL'!==_0xea573a(0x113,0xf9))this[_0xea573a(0xf1,0x106)]()['catch'](_0x4a649d=>{function _0x1289bb(_0x24ea0b,_0x53d0f9){return _0x32118a(_0x53d0f9-0x66d,_0x24ea0b);}function _0x3c7bce(_0x353310,_0x57b18a){return _0x32118a(_0x353310- -0x54,_0x57b18a);}if(_0x3c7bce(-0x283,-0x285)===_0x3c7bce(-0x24c,-0x250)){this[_0x1289bb(0x456,0x441)]?.[_0x3c7bce(-0x259,-0x245)](_0x3c7bce(-0x250,-0x246)+_0x1289bb(0x459,0x464)+_0x3c7bce(-0x24d,-0x25c)+_0x1289bb(0x464,0x476));return;}else this[_0x3c7bce(-0x280,-0x274)]?.[_0x1289bb(0x45f,0x46c)]('Scheduler\x20'+_0x1289bb(0x448,0x467),_0x4a649d instanceof Error?_0x4a649d:new Error(String(_0x4a649d)));});else return this['logger']?.['debug']('Sync\x20alrea'+'dy\x20in\x20prog'+_0xea573a(0xdd,0xe8)+_0xea573a(0xfa,0x101)),null;},this[_0x510d66(0x2d,0x28)][_0xaa8e13(0x31a,0x300)]),this[_0x510d66(0xe,0x19)]&&typeof this[_0x510d66(0xe,0x25)]===_0xaa8e13(0x30c,0x2f3)&&_0x510d66(0x30,0x48)in this[_0xaa8e13(0x2f1,0x2ef)]&&this[_0xaa8e13(0x2f1,0x2d9)][_0xaa8e13(0x313,0x309)]();}[_0xb80674(-0x254,-0x25f)](){if(!this[_0x223e5c(0x53,0x51)])return;function _0x5995e7(_0x365c8e,_0x571873){return _0xb80674(_0x571873-0x779,_0x365c8e);}this['timer']&&(clearInterval(this[_0x5995e7(0x523,0x51f)]),this[_0x5995e7(0x51b,0x51f)]=null);function _0x223e5c(_0x5c1364,_0x36ec32){return _0xb80674(_0x36ec32-0x2ad,_0x5c1364);}this[_0x5995e7(0x532,0x51d)]=![],this[_0x5995e7(0x50d,0x515)]?.[_0x5995e7(0x527,0x520)](_0x223e5c(0x72,0x79)+'stopped',{'syncCount':this[_0x223e5c(0x55,0x4b)]});}[_0xb80674(-0x243,-0x246)](){return this['running'];}['isSyncing'](){function _0x462479(_0x2af9c3,_0x377f9f){return _0xb80674(_0x2af9c3-0x2e9,_0x377f9f);}return this[_0x462479(0x9b,0x80)];}['getStatus'](){function _0x3c8015(_0x3b1768,_0x1f4154){return _0xb80674(_0x1f4154-0xa0,_0x3b1768);}function _0x17bb35(_0x518166,_0x1b8dc7){return _0xb80674(_0x1b8dc7-0x4ef,_0x518166);}let _0x21989b=null;if(this[_0x17bb35(0x286,0x293)]&&this[_0x17bb35(0x2a2,0x287)]){const _0x343f98=new Date(this[_0x3c8015(-0x1e6,-0x1c8)][_0x3c8015(-0x1dc,-0x1be)]()+this[_0x17bb35(0x2af,0x2b4)][_0x17bb35(0x2b1,0x2be)]);_0x21989b=_0x343f98[_0x3c8015(-0x1a6,-0x1bb)+'g']();}else{if(this[_0x3c8015(-0x1c1,-0x1bc)]&&this['startedAt']){if(_0x17bb35(0x2b1,0x297)===_0x3c8015(-0x18d,-0x19a))return this[_0x17bb35(0x277,0x293)];else{const _0x1dc97d=new Date(this['startedAt'][_0x3c8015(-0x1a4,-0x1be)]()+this['options']['intervalMs']);_0x21989b=_0x1dc97d[_0x17bb35(0x287,0x294)+'g']();}}}return{'running':this[_0x3c8015(-0x1d8,-0x1bc)],'syncing':this[_0x3c8015(-0x1a5,-0x1ae)],'syncCount':this[_0x3c8015(-0x1ca,-0x1c2)],'lastSyncAt':this[_0x17bb35(0x28f,0x287)]?.['toISOStrin'+'g']()??null,'lastResult':this[_0x17bb35(0x2ae,0x2bc)],'intervalMs':this[_0x17bb35(0x2b2,0x2b4)]['intervalMs'],'nextSyncAt':_0x21989b};}async[_0x526feb(0x2d4,0x2bd)](){function _0x96b00(_0x26b8d6,_0x1cef03){return _0xb80674(_0x26b8d6-0x6a,_0x1cef03);}return this[_0x96b00(-0x1de,-0x1d7)]();}async['tick'](){function _0x129c49(_0x3794f3,_0x59034b){return _0xb80674(_0x3794f3-0x456,_0x59034b);}if(this[_0x1b5080(-0x18a,-0x170)])return this[_0x1b5080(-0x183,-0x186)]?.[_0x129c49(0x216,0x212)]('Sync\x20alrea'+_0x1b5080(-0x169,-0x15e)+_0x1b5080(-0x181,-0x188)+_0x129c49(0x209,0x211)),null;function _0x1b5080(_0x170fb2,_0x26ba84){return _0xb80674(_0x26ba84-0xde,_0x170fb2);}this[_0x1b5080(-0x161,-0x170)]=!![];try{const _0x283a34=await this[_0x129c49(0x200,0x20a)+'er'][_0x1b5080(-0x189,-0x171)]();return this['syncCount']++,this[_0x129c49(0x1ee,0x1ff)]=new Date(),this[_0x1b5080(-0x16c,-0x155)]=_0x283a34,this[_0x1b5080(-0x197,-0x186)]?.[_0x129c49(0x1fd,0x1e4)]('Sync\x20compl'+'eted',{'pushed':_0x283a34[_0x129c49(0x224,0x235)],'pulled':_0x283a34['pulled'],'errors':_0x283a34[_0x129c49(0x1f6,0x209)][_0x1b5080(-0x1ac,-0x18d)],'duration':_0x283a34[_0x1b5080(-0x17a,-0x173)]}),this[_0x1b5080(-0x170,-0x15d)][_0x129c49(0x1f9,0x211)]?.(_0x283a34),_0x283a34;}catch(_0xe5e9b9){if('nKgzb'!=='EXqWx'){const _0x2586cf=_0xe5e9b9 instanceof Error?_0xe5e9b9:new Error(String(_0xe5e9b9));return this[_0x129c49(0x1f2,0x1fd)]?.['error']('Sync\x20faile'+'d',_0x2586cf),this[_0x1b5080(-0x154,-0x15d)][_0x129c49(0x20c,0x21a)]?.(_0x2586cf),null;}else{const _0x41071c=_0x529d98 instanceof _0x508552?_0x423d9f:new _0x6020b9(_0x2af303(_0x3b95ca));return this['logger']?.[_0x1b5080(-0x14e,-0x15b)](_0x129c49(0x212,0x1fb)+'d',_0x41071c),this['options'][_0x129c49(0x20c,0x21c)]?.(_0x41071c),null;}}finally{this[_0x1b5080(-0x16f,-0x170)]=![];}}}
@@ -1 +1 @@
1
- (function(_0x5a8b32,_0x20a696){function _0x39502a(_0x259f91,_0x4e9756){return _0x1829(_0x259f91-0x326,_0x4e9756);}function _0x5982a3(_0x3451e0,_0x17c4fb){return _0x1829(_0x3451e0-0x26b,_0x17c4fb);}const _0x3645f8=_0x5a8b32();while(!![]){try{const _0x391139=-parseInt(_0x39502a(0x40c,0x432))/0x1*(-parseInt(_0x39502a(0x437,0x40e))/0x2)+-parseInt(_0x39502a(0x44c,0x430))/0x3*(parseInt(_0x5982a3(0x38e,0x39a))/0x4)+-parseInt(_0x39502a(0x408,0x3ec))/0x5+parseInt(_0x39502a(0x43c,0x44f))/0x6+-parseInt(_0x39502a(0x41f,0x401))/0x7*(parseInt(_0x39502a(0x426,0x42d))/0x8)+-parseInt(_0x5982a3(0x365,0x386))/0x9*(-parseInt(_0x39502a(0x434,0x424))/0xa)+parseInt(_0x5982a3(0x393,0x3a5))/0xb;if(_0x391139===_0x20a696)break;else _0x3645f8['push'](_0x3645f8['shift']());}catch(_0x1d1542){_0x3645f8['push'](_0x3645f8['shift']());}}}(_0x12f9,0x30b36));import{SyncQueue,mapCategory,mapTier}from'./queue.js';function _0x3a0f2a(_0x1ba1a7,_0x52d649){return _0x1829(_0x1ba1a7- -0x15b,_0x52d649);}import{TeamSynchronizer}from'./team-synchronizer.js';function _0x1829(_0xfa4c17,_0x37e716){_0xfa4c17=_0xfa4c17-0xdc;const _0x12f93f=_0x12f9();let _0x182915=_0x12f93f[_0xfa4c17];if(_0x1829['COkfsL']===undefined){var _0x26dc7a=function(_0x10acb2){const _0x440498='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x469c57='',_0x1f1216='';for(let _0xc3fbaf=0x0,_0x28d4d2,_0x319472,_0x2f31fc=0x0;_0x319472=_0x10acb2['charAt'](_0x2f31fc++);~_0x319472&&(_0x28d4d2=_0xc3fbaf%0x4?_0x28d4d2*0x40+_0x319472:_0x319472,_0xc3fbaf++%0x4)?_0x469c57+=String['fromCharCode'](0xff&_0x28d4d2>>(-0x2*_0xc3fbaf&0x6)):0x0){_0x319472=_0x440498['indexOf'](_0x319472);}for(let _0x1b62f4=0x0,_0x522d0e=_0x469c57['length'];_0x1b62f4<_0x522d0e;_0x1b62f4++){_0x1f1216+='%'+('00'+_0x469c57['charCodeAt'](_0x1b62f4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f1216);};_0x1829['pbDmcf']=_0x26dc7a,_0x1829['htoQZt']={},_0x1829['COkfsL']=!![];}const _0x17c316=_0x12f93f[0x0],_0x124540=_0xfa4c17+_0x17c316,_0x1462da=_0x1829['htoQZt'][_0x124540];return!_0x1462da?(_0x182915=_0x1829['pbDmcf'](_0x182915),_0x1829['htoQZt'][_0x124540]=_0x182915):_0x182915=_0x1462da,_0x182915;}function _0x12f9(){const _0x395b94=['y2H1BMTFDg90yq','y2f0zwDVCNK','zhvYyxrPB24','DgLTzw91De1Z','ignVBNnLy3v0Aq','CMvJB3jKrMfPBa','BgvUz3rO','zxbPC29KAwm','twzQz3K','Bwf4rMfPBhvYzq','zxjYB3jZ','C2f2zuvTyMvKza','BgfZDezHAwX1CG','mtq5nJaXmhn5ELHyrq','CvnPD2q','zxnZ','CxvLDwu','muzJzKfLDa','ywnJzxnZx2nVDq','BM93','AxndAxjJDwL0tW','y29VBgrVD25nCW','ChvSBgvK','C0nVDw50','Bwf4','C3LUy2vK','vMrkBgK','C0LWDLC','q25TwMW','z2v0ugvUzgLUzW','B3jL','ChvSBa','CMvJB3jKu3vJyW','io2sGcdSI6tTJkG6ia','C2v0u3LUy1n0yq','tLruBK0','nZa3sfbhr1rj','mtqZotfkCfPzBMC','C3LUy0rLBhrH','zuf0','DMuGzMfPBhvYzq','oIb0B28GBwfUEq','DxjL','mtq0mJrwuLntCey','DxbKyxrLzf9HDa','CgvU','CgfYzw50x2LK','66Mu66QO66ASia','qLzVEK4','q291BNq','y2vKqxq','ChvZAgvK','y29UDgvUDa','DgfNCW','BwvYz2vby2nLCW','DhvZ','y2XPzw50','mJq0mfzpwejWvq','vMLZsLO','BM9KzuLK','nJeXndm4yxLLwu1S','C3LUyW','zw1IzwrKAw5N','zwfRzxiGB3bLBG','z2v0u3rHDhvZ','mJe1mteYzLnTC1rH','CxvHBgL0Ev9ZyW','ChvZAa','qNLszw1VDgvjza','DxbKyxrLzef0','C29YDa','zw1VCNLdB3vUDa','C3LUy0XVy2fS','q2LYy3vPDcbICG','DgvHBvbHDgG','zMX1C2G','DgLLCG','Aw5N','ngLVBer4AG','y29UzMXPy3rZ','zMLUze1LBw9YEq','nJm1mdCZr3Doq291','BwvZC2fNzq','mtC2odiXn1DyzgrjEq','zMfPBhvYzxm'];_0x12f9=function(){return _0x395b94;};return _0x12f9();}function _0x597272(_0x4f85d8,_0x7be974){return _0x1829(_0x7be974- -0x1e5,_0x4f85d8);}const DEFAULT_PAGE_SIZE=0x64;export class MemorySynchronizer{['db'];[_0x3a0f2a(-0x4e,-0x73)];[_0x3a0f2a(-0x3c,-0x32)];[_0x597272(-0xb4,-0xd5)];[_0x597272(-0xf3,-0x100)];[_0x597272(-0xd9,-0xbc)]=0x0;['lastFailur'+_0x3a0f2a(-0x5f,-0x87)]=0x0;[_0x3a0f2a(-0x7d,-0xa4)+'s']=0x3;[_0x597272(-0x102,-0xfb)]=0x7530;constructor(_0x23da5f,_0x4ea759,_0x53d916,_0x3d175a){function _0x1411d8(_0x47f973,_0x5f5ab3){return _0x597272(_0x5f5ab3,_0x47f973-0x23b);}this['db']=_0x23da5f,this['client']=_0x4ea759,this[_0x56f016(0x117,0x110)]=_0x53d916;function _0x56f016(_0x190071,_0x193bfb){return _0x597272(_0x190071,_0x193bfb-0x1d6);}this[_0x56f016(0xdf,0x101)]=_0x3d175a,this[_0x1411d8(0x13b,0x14d)]=new SyncQueue(_0x23da5f,_0x4ea759);}[_0x3a0f2a(-0x72,-0x79)+_0x3a0f2a(-0x59,-0x4b)](){if(this[_0x45a1de(0x175,0x193)]<this['maxFailure'+'s'])return![];function _0x45a1de(_0x4780ec,_0x376ea2){return _0x3a0f2a(_0x376ea2-0x1c5,_0x4780ec);}function _0x3b49e3(_0x43b27a,_0x84a5d8){return _0x3a0f2a(_0x43b27a-0x17b,_0x84a5d8);}return Date[_0x45a1de(0x143,0x152)]()-this['lastFailur'+_0x3b49e3(0x11c,0x116)]<this[_0x3b49e3(0x10a,0xf8)];}['recordSucc'+_0x3a0f2a(-0x77,-0x74)](){function _0xd74592(_0x192898,_0x31b82c){return _0x597272(_0x31b82c,_0x192898- -0x135);}this[_0xd74592(-0x1f1,-0x1f2)]=0x0;}['recordFail'+_0x597272(-0xfe,-0xe6)](){this['failures']++;function _0x13115d(_0x2cc41d,_0xa2bf93){return _0x597272(_0xa2bf93,_0x2cc41d-0x70);}function _0x3652d1(_0x49f045,_0x2e536){return _0x597272(_0x2e536,_0x49f045- -0x1aa);}this[_0x13115d(-0x94,-0x6b)+_0x13115d(-0x79,-0x8c)]=Date['now']();}async[_0x597272(-0xef,-0xd3)](){function _0x5c0b99(_0x5a2f99,_0x34cc56){return _0x597272(_0x34cc56,_0x5a2f99-0x248);}if(this[_0x5c0b99(0x182,0x1a9)]&&this[_0x153d90(0x452,0x42b)]){if(_0x153d90(0x3fc,0x420)!=='VJhPL'){const _0x375f0a=new TeamSynchronizer(this['db'],this['client'],this[_0x153d90(0x42a,0x43a)],this[_0x153d90(0x44c,0x42b)]),_0x465b78=await _0x375f0a[_0x153d90(0x42b,0x416)]();return{'pushed':_0x465b78[_0x5c0b99(0x16b,0x148)],'pulled':_0x465b78[_0x5c0b99(0x14e,0x15f)],'conflicts':_0x465b78[_0x5c0b99(0x187,0x1b1)],'errors':_0x465b78[_0x153d90(0x3d3,0x3fa)],'duration':_0x465b78[_0x153d90(0x469,0x447)]};}else _0x5f1a3f[_0x5c0b99(0x142,0x152)][_0x153d90(0x419,0x433)](_0x314213[_0x5c0b99(0x18a,0x19a)]);}function _0x153d90(_0x5a5226,_0x28dea2){return _0x597272(_0x5a5226,_0x28dea2-0x500);}return this[_0x153d90(0x452,0x438)]();}async[_0x597272(-0x9e,-0xc8)](){const _0x1eb9df=Date['now'](),_0x49b00f={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{if(_0xc7331c(0x30e,0x2e9)===_0xc7331c(0x30e,0x304)){const _0x176b5f=await this[_0x33682e(-0xc4,-0xbf)]();_0x49b00f[_0x33682e(-0xf8,-0xcf)]=_0x176b5f[_0x33682e(-0xc6,-0xcf)],_0x49b00f['errors']['push'](..._0x176b5f[_0x33682e(-0x120,-0xf8)]);const _0x1dd214=await this[_0xc7331c(0x313,0x339)]();_0x49b00f['pulled']=_0x1dd214[_0x33682e(-0xd5,-0xec)],_0x49b00f[_0x33682e(-0x8d,-0xb3)]=_0x1dd214['conflicts'],_0x49b00f['errors'][_0xc7331c(0x337,0x32a)](..._0x1dd214['errors']);}else _0x5357dd[_0xc7331c(0x2fe,0x320)][_0xc7331c(0x337,0x334)](_0x33682e(-0xd5,-0xd3)+_0x1232d1['id']+_0x33682e(-0xb8,-0xe1)+_0x149fe6[_0xc7331c(0x346,0x350)]);}catch(_0x5d9eaf){_0x5d9eaf instanceof Error&&_0x49b00f[_0xc7331c(0x2fe,0x2e1)][_0xc7331c(0x337,0x33b)](_0x5d9eaf['message']);}function _0xc7331c(_0x4a47c0,_0x59509b){return _0x3a0f2a(_0x4a47c0-0x37a,_0x59509b);}_0x49b00f[_0x33682e(-0x89,-0xab)]=Date[_0x33682e(-0x100,-0xef)]()-_0x1eb9df;function _0x33682e(_0x320be5,_0x5cc61b){return _0x3a0f2a(_0x5cc61b- -0x7c,_0x320be5);}return _0x49b00f;}async[_0x3a0f2a(-0x43,-0x2c)](_0x1ef013){function _0x517640(_0x558336,_0x549b34){return _0x3a0f2a(_0x558336- -0x28d,_0x549b34);}if(this['isCircuitO'+_0x517640(-0x2e6,-0x2fe)]())return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x517640(-0x2ca,-0x2c5)+_0x517640(-0x2d4,-0x2e3)+_0x517640(-0x2ea,-0x2eb)+'\x20consecuti'+_0x517640(-0x2eb,-0x2ce)+'s'],'duration':0x0};const _0x509254=Date[_0x517640(-0x300,-0x2ff)]();function _0x3e88f2(_0x319dab,_0x3dce61){return _0x3a0f2a(_0x3dce61-0x1df,_0x319dab);}try{const _0x3fdaf0=await this[_0x517640(-0x303,-0x319)][_0x517640(-0x2c8,-0x2af)]({'timeoutMs':_0x1ef013?.[_0x3e88f2(0x18c,0x1b1)]}),_0x49e5da=await this[_0x3e88f2(0x179,0x169)]['flushTombs'+'tones'](),_0xc4dd8a=[..._0x3fdaf0['errors'],..._0x49e5da['errors']];return _0xc4dd8a[_0x3e88f2(0x19e,0x1b4)]>0x0?this['recordFail'+_0x517640(-0x2e9,-0x2d0)]():this[_0x517640(-0x2f3,-0x2df)+_0x3e88f2(0x160,0x168)](),{'pushed':_0x3fdaf0[_0x517640(-0x2e0,-0x2d7)],'pulled':_0x49e5da['deleted'],'conflicts':0x0,'errors':_0xc4dd8a,'duration':Date['now']()-_0x509254};}catch(_0x270700){this[_0x3e88f2(0x19f,0x1b3)+_0x517640(-0x2e9,-0x2f5)]();throw _0x270700;}}async[_0x597272(-0xf0,-0xf1)](){if(this['isCircuitO'+_0xf93273(-0x26e,-0x25f)]()){if(_0x266014(0x2c,0x30)==='VisJZ')return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x266014(0x4a,0x3f)+_0x266014(0x52,0x35)+_0x266014(0x41,0x1f)+_0x266014(0x6c,0x4f)+_0x266014(0x20,0x1e)+'s'],'duration':0x0};else this['db']['saveEmbedd'+_0x266014(0x21,0x43)](_0x255f3a['id'],_0x260973[_0x266014(0x53,0x34)]);}function _0x266014(_0x189918,_0x304c8c){return _0x3a0f2a(_0x304c8c-0x7c,_0x189918);}const _0x1f58ee=Date[_0x266014(0x2b,0x9)](),_0x3d95cf={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{let _0x503fa1=0x0,_0x457e5a=!![];while(_0x457e5a){const _0x5e6ccf=await this[_0x266014(0x13,0x2e)]['listMemori'+'es']({'limit':DEFAULT_PAGE_SIZE,'offset':_0x503fa1,'includeEmbedding':!![]});if(_0x5e6ccf[_0xf93273(-0x223,-0x231)]===0x0){if('BpYce'==='cfASI')this[_0xf93273(-0x212,-0x232)+_0x266014(0xa,0x20)]();else{_0x457e5a=![];break;}}_0x5e6ccf[_0xf93273(-0x222,-0x246)]((_0x38e635,_0x1d5b3f)=>{function _0x5c04ba(_0x454ff3,_0x447076){return _0xf93273(_0x454ff3,_0x447076-0x2cd);}function _0x2aae92(_0x505705,_0x3e4178){return _0xf93273(_0x3e4178,_0x505705-0x5ec);}if(_0x2aae92(0x37b,0x387)!==_0x5c04ba(0x64,0x5c)){const _0x398278=this['db']['createMemo'+'ry']({'content':_0x28aad6[_0x5c04ba(0x96,0x75)],'category':_0x59f1a9(_0x529f47[_0x5c04ba(0x95,0x97)]),'tier':_0x412b4f(_0x45e2e5[_0x5c04ba(0xa9,0x8d)]??_0x5c04ba(0x55,0x48)),'tags':_0x47bdb6[_0x5c04ba(0x90,0x76)]??[],'parentId':_0x1b52e0[_0x5c04ba(0x5e,0x6f)]??_0xe90e7c,'chunkIndex':_0x2b868c['chunk_inde'+'x']??_0x35b28f,'chunkTotal':_0x27173e[_0x2aae92(0x3b5,0x3b0)+'l']??_0x405001,'qualityScore':_0x1dbc9e['quality_sc'+_0x2aae92(0x37e,0x3a8)]??_0x24d16a});_0x2a5935['access_cou'+'nt']&&_0x2f8b68[_0x5c04ba(0x6d,0x53)+'nt']>0x0&&this['db'][_0x2aae92(0x396,0x3bf)+'sCount'](_0x398278['id'],_0x239d17[_0x5c04ba(0x38,0x53)+'nt']),_0xf2832f[_0x5c04ba(0x5e,0x7f)]&&_0x58d037['embedding'][_0x5c04ba(0xb2,0x9c)]>0x0&&this['db'][_0x5c04ba(0x4b,0x4c)+_0x5c04ba(0xa4,0x8e)](_0x398278['id'],_0x1b6c35[_0x5c04ba(0xa0,0x7f)]),this['db'][_0x5c04ba(0x80,0x63)+_0x5c04ba(0x8a,0x78)](_0x398278['id'],_0x1ca23d['id'],_0x2aae92(0x379,0x39d)),_0x5650c1['pulled']++;}else{const _0x313334=_0x38e635[_0x2aae92(0x38e,0x3ab)]?0x1:0x0,_0x2a3656=_0x1d5b3f['parent_id']?0x1:0x0;return _0x313334-_0x2a3656;}});for(const _0x26bb33 of _0x5e6ccf){try{const _0x3191f5=this['db'][_0x266014(0x21,0x46)+_0x266014(0x15,0x3a)](_0x26bb33['id']);if(!_0x3191f5){const _0x3827c3=this['db']['createMemo'+'ry']({'content':_0x26bb33[_0xf93273(-0x280,-0x258)],'category':mapCategory(_0x26bb33[_0xf93273(-0x261,-0x236)]),'tier':mapTier(_0x26bb33[_0x266014(0x64,0x42)]??_0xf93273(-0x271,-0x285)),'tags':_0x26bb33['tags']??[],'parentId':_0x26bb33[_0x266014(0x26,0x24)]??undefined,'chunkIndex':_0x26bb33['chunk_inde'+'x']??undefined,'chunkTotal':_0x26bb33['chunk_tota'+'l']??undefined,'qualityScore':_0x26bb33[_0x266014(0x5d,0x38)+_0x266014(0x33,0x14)]??undefined});_0x26bb33[_0x266014(0x11,0x8)+'nt']&&_0x26bb33[_0xf93273(-0x269,-0x27a)+'nt']>0x0&&this['db'][_0xf93273(-0x267,-0x256)+_0x266014(-0x19,0xd)](_0x3827c3['id'],_0x26bb33[_0xf93273(-0x29c,-0x27a)+'nt']),_0x26bb33[_0xf93273(-0x266,-0x24e)]&&_0x26bb33[_0x266014(0x39,0x34)][_0x266014(0x68,0x51)]>0x0&&this['db']['saveEmbedd'+'ing'](_0x3827c3['id'],_0x26bb33['embedding']),this['db']['setSyncSta'+_0xf93273(-0x24f,-0x255)](_0x3827c3['id'],_0x26bb33['id'],'synced'),_0x3d95cf[_0xf93273(-0x284,-0x276)]++;}else{const _0x1cbf55=new Date(_0x26bb33[_0xf93273(-0x25f,-0x260)]),_0x5539a1=new Date(_0x3191f5[_0x266014(0x17,0x3b)]);_0x1cbf55>_0x5539a1&&(this['db']['updateMemo'+'ry'](_0x3191f5['id'],{'content':_0x26bb33[_0xf93273(-0x27d,-0x258)],'category':mapCategory(_0x26bb33[_0x266014(0x68,0x4c)]),'tier':mapTier(_0x26bb33[_0x266014(0x69,0x42)]??_0x3191f5['tier']),'tags':_0x26bb33[_0xf93273(-0x27a,-0x257)]??_0x3191f5[_0x266014(0x15,0x2b)],'qualityScore':_0x26bb33[_0xf93273(-0x236,-0x24a)+'ore']??undefined}),_0x26bb33[_0xf93273(-0x258,-0x27a)+'nt']!==undefined&&this['db'][_0xf93273(-0x268,-0x256)+_0xf93273(-0x273,-0x275)](_0x3191f5['id'],_0x26bb33[_0xf93273(-0x264,-0x27a)+'nt']),_0x26bb33[_0xf93273(-0x228,-0x24e)]&&_0x26bb33[_0xf93273(-0x235,-0x24e)]['length']>0x0&&this['db'][_0x266014(-0xe,0x1)+_0xf93273(-0x256,-0x23f)](_0x3191f5['id'],_0x26bb33[_0x266014(0x5c,0x34)]),this['db'][_0x266014(-0x9,0x18)+'tus'](_0x3191f5['id'],_0x26bb33['id'],_0x266014(0x4,0xf)),_0x3d95cf[_0xf93273(-0x258,-0x23d)]++);}}catch(_0x1f71ef){_0xf93273(-0x294,-0x270)===_0x266014(0x1,0x12)?_0x1f71ef instanceof Error&&_0x3d95cf['errors'][_0x266014(0x11,0x39)](_0x266014(0x47,0x25)+_0x26bb33['id']+'\x20풀\x20실패:\x20'+_0x1f71ef[_0x266014(0x68,0x48)]):(this['db']=_0x522d0e,this[_0xf93273(-0x273,-0x254)]=_0x3791dd,this[_0x266014(0x65,0x40)]=_0x8d850f,this['nodeId']=_0x17336a,this['queue']=new _0x239036(_0x199cbe,_0x4aee5c));}}_0x5e6ccf[_0x266014(0x6d,0x51)]<DEFAULT_PAGE_SIZE?_0x457e5a=![]:_0x503fa1+=DEFAULT_PAGE_SIZE;}this[_0x266014(0xd,0x16)+_0x266014(-0xa,0x5)]();}catch(_0x218858){_0x266014(-0x7,0x19)===_0x266014(-0x6,0x4)?this[_0xf93273(-0x211,-0x238)]=0x0:(this[_0x266014(0x5d,0x50)+_0xf93273(-0x276,-0x262)](),_0x218858 instanceof Error&&_0x3d95cf['errors']['push'](_0x218858[_0x266014(0x20,0x48)]));}_0x3d95cf['duration']=Date[_0x266014(0x2a,0x9)]()-_0x1f58ee;function _0xf93273(_0x13c80e,_0x53ea53){return _0x3a0f2a(_0x53ea53- -0x206,_0x13c80e);}return _0x3d95cf;}async[_0x3a0f2a(-0x46,-0x48)](){const _0x1bb27f=this[_0x1076a4(0x2ca,0x2dc)][_0x43f553(0x2c7,0x2b8)+_0x43f553(0x2a6,0x2cc)]();let _0x5d1800=0x0;function _0x1076a4(_0x25704d,_0x47b138){return _0x597272(_0x47b138,_0x25704d-0x3ca);}try{if(_0x43f553(0x29b,0x2a3)===_0x43f553(0x2cd,0x2a3)){const _0x459c90=await this[_0x1076a4(0x2f2,0x2f4)]['listMemori'+'es']({'limit':0x2710}),_0x53ab8d=this['db']['getSyncedM'+_0x1076a4(0x301,0x300)]();_0x5d1800=Math[_0x1076a4(0x2d2,0x2db)](0x0,_0x459c90['length']-_0x53ab8d);}else this[_0x43f553(0x2f2,0x2f5)+_0x1076a4(0x2e4,0x2df)](),_0x48de29 instanceof _0x2d26ff&&_0x3bf5a8[_0x1076a4(0x2c4,0x2de)]['push'](_0x3f2e93[_0x43f553(0x2ed,0x2ed)]);}catch{}const _0x564d99=this['db']['getLastSyn'+_0x1076a4(0x2ec,0x2c3)]();function _0x43f553(_0x35228d,_0x5d6bc2){return _0x597272(_0x35228d,_0x5d6bc2-0x3ab);}return{'pendingPush':_0x1bb27f,'pendingPull':_0x5d1800,'lastSyncedAt':_0x564d99??undefined};}}
1
+ function _0x553eec(_0x29b3bb,_0x38a41b){return _0x470f(_0x38a41b-0x11f,_0x29b3bb);}(function(_0xac9082,_0x30bd7e){const _0x43ffd8=_0xac9082();function _0x234ac3(_0x2b8f82,_0x4d1aa9){return _0x470f(_0x2b8f82- -0xfe,_0x4d1aa9);}function _0x1ff972(_0x1bf2d6,_0x6ffc46){return _0x470f(_0x6ffc46-0x110,_0x1bf2d6);}while(!![]){try{const _0x266ff4=-parseInt(_0x234ac3(-0xc,-0x31))/0x1+parseInt(_0x1ff972(0x1ef,0x211))/0x2*(parseInt(_0x1ff972(0x242,0x224))/0x3)+-parseInt(_0x234ac3(-0xf,-0x39))/0x4*(parseInt(_0x1ff972(0x1fd,0x219))/0x5)+parseInt(_0x234ac3(-0x1a,-0x33))/0x6*(-parseInt(_0x1ff972(0x230,0x227))/0x7)+parseInt(_0x234ac3(-0x36,-0xf))/0x8+-parseInt(_0x234ac3(-0x17,-0xe))/0x9*(parseInt(_0x234ac3(0xe,0x2a))/0xa)+parseInt(_0x234ac3(-0x1b,-0x11))/0xb;if(_0x266ff4===_0x30bd7e)break;else _0x43ffd8['push'](_0x43ffd8['shift']());}catch(_0x38ea1d){_0x43ffd8['push'](_0x43ffd8['shift']());}}}(_0x369d,0xa0b83));import{SyncQueue,mapCategory,mapTier}from'./queue.js';function _0x369d(){const _0x373fbf=['mJHIq0DZELu','CgvU','y29UDgvUDa','DxbKyxrLzef0','twTqu3G','oda4nZC4neHnq1nmCq','Bwf4rMfPBhvYzq','CxvLDwu','AxndAxjJDwL0tW','DxjL','svfWqwW','CgfYzw50x2LK','DgLTzw91De1Z','zgvSzxrLza','CMvJB3jKrMfPBa','zw1VCNLdB3vUDa','66Mu66QO66ASia','DgLLCG','DgfNCW','q2LYy3vPDcbICG','CxvHBgL0Ev9ZyW','zwfRzxiGB3bLBG','B3jL','y2vKqxq','z2v0ugvUzgLUzW','z2v0tgfZDfn5BG','ChvZAgvK','ywnJzxnZx2nVDq','ENzXCwC','zhvYyxrPB24','zMfPBhvYzxm','C3LUy2vK','mti4mJKZmdbku2XkuNO','otmYodC0ywrnC1H3','BwvYz2vby2nLCW','y2H1BMTFDg90yq','mtC1mdqXow9dq25xuq','vLvmwNG','ignVBNnLy3v0Aq','y2XPzw50','DxbKyxrLzf9HDa','ChvSBa','BgLZDe1LBw9YAq','zKXvExO','nfvzALzIBq','zuf0','oIb0B28GBwfUEq','mta1mJy0me5bugHgDW','y29UzMXPy3rZ','y2f0zwDVCNK','zxnZ','zxjYB3jZ','BgvUz3rO','y29VBgrVD25nCW','C0nVDw50','zw1IzwrKAw5N','BwvZC2fNzq','C2f2zuvTyMvKza','ChvZAa','z2v0u3LUy2vKtq','C3LUy0XVy2fS','DgvHBvbHDgG','mtKZmdbzB3rgtha','BgfZDezHAwX1CG','zMX1C2G','DxbKyxrLtwvTBW','Aw5N','C2v0u3LUy1n0yq','C29YDa','DMuGzMfPBhvYzq','mJmWmJu5nxrzC3jpra','BM9KzuLK','ChvSBgvK','mtbHwLfSuuq','qNLszw1VDgvjza','BM93','y3jLyxrLtwvTBW','y2H1BMTFAw5Kzq','DhvZ','io2sGcdSI6tTJkG6ia','q291BNq','mJuYufnpvujH','zMLUze1LBw9YEq','zMX1C2HuB21ICW'];_0x369d=function(){return _0x373fbf;};return _0x369d();}function _0x307d3c(_0x17391e,_0x2c9e4f){return _0x470f(_0x2c9e4f- -0x135,_0x17391e);}function _0x470f(_0x34e240,_0x5f53d2){_0x34e240=_0x34e240-0xc5;const _0x369d06=_0x369d();let _0x470fd9=_0x369d06[_0x34e240];if(_0x470f['BMnoDo']===undefined){var _0x2d468d=function(_0x3919f4){const _0x38e3f9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1152f9='',_0x44c66a='';for(let _0x49d989=0x0,_0x210828,_0x18f19e,_0xe2c94c=0x0;_0x18f19e=_0x3919f4['charAt'](_0xe2c94c++);~_0x18f19e&&(_0x210828=_0x49d989%0x4?_0x210828*0x40+_0x18f19e:_0x18f19e,_0x49d989++%0x4)?_0x1152f9+=String['fromCharCode'](0xff&_0x210828>>(-0x2*_0x49d989&0x6)):0x0){_0x18f19e=_0x38e3f9['indexOf'](_0x18f19e);}for(let _0x4769b6=0x0,_0x4fa262=_0x1152f9['length'];_0x4769b6<_0x4fa262;_0x4769b6++){_0x44c66a+='%'+('00'+_0x1152f9['charCodeAt'](_0x4769b6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x44c66a);};_0x470f['LJqyTH']=_0x2d468d,_0x470f['jLYreL']={},_0x470f['BMnoDo']=!![];}const _0x5b98f6=_0x369d06[0x0],_0x2e0d0f=_0x34e240+_0x5b98f6,_0x568b81=_0x470f['jLYreL'][_0x2e0d0f];return!_0x568b81?(_0x470fd9=_0x470f['LJqyTH'](_0x470fd9),_0x470f['jLYreL'][_0x2e0d0f]=_0x470fd9):_0x470fd9=_0x568b81,_0x470fd9;}import{TeamSynchronizer}from'./team-synchronizer.js';const DEFAULT_PAGE_SIZE=0x64;export class MemorySynchronizer{['db'];[_0x307d3c(-0x47,-0x4b)];[_0x553eec(0x211,0x21f)];[_0x553eec(0x231,0x229)];[_0x553eec(0x1f2,0x1e9)];[_0x307d3c(-0x3d,-0x54)]=0x0;[_0x553eec(0x244,0x221)+_0x553eec(0x217,0x20f)]=0x0;[_0x307d3c(-0x8d,-0x6c)+'s']=0x3;[_0x307d3c(-0x22,-0x3d)]=0x7530;constructor(_0x1ec8a5,_0x938ad0,_0x316fc0,_0x2e6968){function _0xd5d1ac(_0x5abf64,_0x454fc0){return _0x553eec(_0x5abf64,_0x454fc0-0x275);}function _0x26cdfe(_0x4c6c62,_0x1f7075){return _0x553eec(_0x1f7075,_0x4c6c62- -0x138);}this['db']=_0x1ec8a5,this[_0xd5d1ac(0x470,0x47e)]=_0x938ad0,this[_0x26cdfe(0xe7,0x10f)]=_0x316fc0,this[_0x26cdfe(0xf1,0x119)]=_0x2e6968,this[_0xd5d1ac(0x455,0x45e)]=new SyncQueue(_0x1ec8a5,_0x938ad0);}[_0x307d3c(-0x7b,-0x6a)+_0x307d3c(-0x33,-0x1d)](){if(this[_0x5b7fb6(0xd3,0xad)]<this[_0x5b7fb6(0xbb,0x95)+'s'])return![];function _0x5b7fb6(_0xdc5809,_0x37f49b){return _0x307d3c(_0xdc5809,_0x37f49b-0x101);}function _0x216e75(_0x2c6428,_0x4672c2){return _0x307d3c(_0x4672c2,_0x2c6428-0xa7);}return Date[_0x216e75(0x80,0x8e)]()-this[_0x5b7fb6(0xb1,0xce)+_0x5b7fb6(0xe3,0xbc)]<this[_0x5b7fb6(0xad,0xc4)];}['recordSucc'+_0x553eec(0x23d,0x214)](){function _0x16a0df(_0x7cb91f,_0x551fe2){return _0x553eec(_0x7cb91f,_0x551fe2-0x279);}this[_0x16a0df(0x493,0x479)]=0x0;}[_0x553eec(0x211,0x1f0)+'ure'](){function _0xf7ddcd(_0x38af31,_0x15e841){return _0x553eec(_0x15e841,_0x38af31- -0x240);}this[_0x520b32(0xc6,0xcd)]++;function _0x520b32(_0x427653,_0x5c50b9){return _0x553eec(_0x5c50b9,_0x427653- -0x13a);}this[_0x520b32(0xe7,0xcc)+'eAt']=Date[_0x520b32(0xf3,0xf4)]();}async['sync'](){function _0x863b42(_0x1b8632,_0x4285b4){return _0x553eec(_0x4285b4,_0x1b8632-0x230);}if(this['teamPath']&&this[_0x863b42(0x459,0x477)]){const _0x5425df=new TeamSynchronizer(this['db'],this[_0x2cc5ca(-0x91,-0x90)],this[_0x2cc5ca(-0x93,-0x7a)],this[_0x2cc5ca(-0x9a,-0x70)]),_0x117e8a=await _0x5425df['syncDelta']();return{'pushed':_0x117e8a[_0x2cc5ca(-0xb9,-0x9d)],'pulled':_0x117e8a[_0x863b42(0x45a,0x449)],'conflicts':_0x117e8a[_0x863b42(0x442,0x422)],'errors':_0x117e8a['errors'],'duration':_0x117e8a[_0x863b42(0x42f,0x458)]};}function _0x2cc5ca(_0x113b12,_0x143bca){return _0x553eec(_0x113b12,_0x143bca- -0x299);}return this[_0x863b42(0x44e,0x46c)]();}async[_0x553eec(0x239,0x21e)](){function _0x1743e5(_0x55cfbc,_0x20ebe1){return _0x307d3c(_0x55cfbc,_0x20ebe1-0x14e);}const _0x38ffcd=Date[_0x1743e5(0x118,0x127)]();function _0x5a9cdd(_0x4c4f7f,_0x2d2c47){return _0x307d3c(_0x2d2c47,_0x4c4f7f-0x4d6);}const _0x303260={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{const _0x204caa=await this[_0x1743e5(0xf7,0x116)]();_0x303260[_0x5a9cdd(0x47e,0x462)]=_0x204caa[_0x1743e5(0xe0,0xf6)],_0x303260['errors'][_0x1743e5(0x107,0x116)](..._0x204caa[_0x1743e5(0xf6,0x10f)]);const _0xff5052=await this[_0x5a9cdd(0x48d,0x465)]();_0x303260[_0x1743e5(0x115,0x124)]=_0xff5052['pulled'],_0x303260[_0x1743e5(0x116,0x10c)]=_0xff5052[_0x1743e5(0xea,0x10c)],_0x303260[_0x1743e5(0x110,0x10f)][_0x1743e5(0x13c,0x116)](..._0xff5052['errors']);}catch(_0x2ad760){_0x2ad760 instanceof Error&&_0x303260['errors'][_0x5a9cdd(0x49e,0x474)](_0x2ad760[_0x1743e5(0x131,0x114)]);}return _0x303260['duration']=Date[_0x1743e5(0x116,0x127)]()-_0x38ffcd,_0x303260;}async[_0x553eec(0x1fc,0x21c)](_0x542ed8){if(this[_0x382702(0x21c,0x228)+_0x382702(0x269,0x285)]())return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x5be079(-0x19c,-0x18b)+_0x5be079(-0x19a,-0x1b6)+_0x5be079(-0x181,-0x16f)+'\x20consecuti'+_0x382702(0x259,0x238)+'s'],'duration':0x0};const _0x2d26b0=Date['now']();function _0x5be079(_0x4bb990,_0x32e089){return _0x307d3c(_0x32e089,_0x4bb990- -0x13d);}function _0x382702(_0x5a0235,_0x257951){return _0x307d3c(_0x257951,_0x5a0235-0x286);}try{const _0x21b91e=await this[_0x382702(0x21b,0x223)][_0x5be079(-0x16f,-0x165)]({'timeoutMs':_0x542ed8?.[_0x382702(0x220,0x22c)]}),_0x470eb3=await this[_0x382702(0x21b,0x233)][_0x5be079(-0x15c,-0x13a)+'tones'](),_0x2a8859=[..._0x21b91e['errors'],..._0x470eb3['errors']];return _0x2a8859['length']>0x0?_0x5be079(-0x1ab,-0x1a1)==='MkPSx'?this[_0x382702(0x222,0x233)+_0x382702(0x21d,0x21d)]():_0x24d59b['errors'][_0x382702(0x24e,0x22b)](_0x5be079(-0x19f,-0x180)+_0x3714c3['id']+'\x20풀\x20실패:\x20'+_0x3c24ba[_0x5be079(-0x177,-0x183)]):this['recordSucc'+_0x5be079(-0x17d,-0x158)](),{'pushed':_0x21b91e[_0x382702(0x22e,0x217)],'pulled':_0x470eb3[_0x382702(0x221,0x234)],'conflicts':0x0,'errors':_0x2a8859,'duration':Date['now']()-_0x2d26b0};}catch(_0x55782e){this[_0x5be079(-0x1a1,-0x18a)+_0x382702(0x21d,0x23a)]();throw _0x55782e;}}async['pull'](){function _0x3bca7a(_0x1d5638,_0x5284cb){return _0x307d3c(_0x1d5638,_0x5284cb-0x42f);}if(this[_0x647864(0x3d5,0x3b4)+'pen']())return{'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[_0x647864(0x3e0,0x3ba)+_0x3bca7a(0x3f9,0x3d2)+':\x20too\x20many'+_0x647864(0x3f3,0x3f7)+_0x647864(0x412,0x423)+'s'],'duration':0x0};const _0x411f61=Date[_0x647864(0x418,0x3f6)](),_0x593d74={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{let _0x41c9ea=0x0,_0x4f454c=!![];while(_0x4f454c){const _0x47b8e8=await this[_0x3bca7a(0x3ea,0x3e4)]['listMemori'+'es']({'limit':DEFAULT_PAGE_SIZE,'offset':_0x41c9ea,'includeEmbedding':!![]});if(_0x47b8e8['length']===0x0){_0x4f454c=![];break;}_0x47b8e8[_0x3bca7a(0x411,0x401)]((_0x4d886f,_0x23b1ae)=>{function _0x30a398(_0x42c632,_0x4491e4){return _0x647864(_0x42c632- -0x61e,_0x4491e4);}function _0x3fa7e8(_0x23f38a,_0x32fded){return _0x647864(_0x32fded- -0x2ae,_0x23f38a);}if(_0x3fa7e8(0x131,0x14a)!==_0x30a398(-0x226,-0x249)){const _0xb1d349=_0x1b6863[_0x30a398(-0x246,-0x25f)]?0x1:0x0,_0xa9b8d6=_0x14428d[_0x30a398(-0x246,-0x25e)]?0x1:0x0;return _0xb1d349-_0xa9b8d6;}else{const _0x5bd5e7=_0x4d886f[_0x3fa7e8(0x146,0x12a)]?0x1:0x0,_0x5ee387=_0x23b1ae['parent_id']?0x1:0x0;return _0x5bd5e7-_0x5ee387;}});for(const _0x28bc69 of _0x47b8e8){try{const _0x26abcd=this['db'][_0x3bca7a(0x3f0,0x40f)+_0x3bca7a(0x400,0x407)](_0x28bc69['id']);if(!_0x26abcd){const _0x9e8f66=this['db'][_0x647864(0x419,0x42e)+'ry']({'content':_0x28bc69[_0x647864(0x3cf,0x3a7)],'category':mapCategory(_0x28bc69[_0x3bca7a(0x3e1,0x3ee)]),'tier':mapTier(_0x28bc69[_0x647864(0x3de,0x3fa)]??'episodic'),'tags':_0x28bc69[_0x3bca7a(0x3b6,0x3cf)]??[],'parentId':_0x28bc69[_0x3bca7a(0x3ac,0x3c8)]??undefined,'chunkIndex':_0x28bc69[_0x647864(0x41a,0x400)+'x']??undefined,'chunkTotal':_0x28bc69[_0x647864(0x3f0,0x40a)+'l']??undefined,'qualityScore':_0x28bc69[_0x647864(0x3e1,0x3e7)+_0x3bca7a(0x3c0,0x3d3)]??undefined});_0x28bc69[_0x3bca7a(0x3fc,0x3d8)+'nt']&&_0x28bc69[_0x3bca7a(0x3af,0x3d8)+'nt']>0x0&&this['db'][_0x647864(0x3ef,0x3cd)+_0x3bca7a(0x3da,0x3f3)](_0x9e8f66['id'],_0x28bc69[_0x3bca7a(0x3af,0x3d8)+'nt']),_0x28bc69[_0x647864(0x404,0x3fa)]&&_0x28bc69[_0x3bca7a(0x3da,0x3f4)][_0x3bca7a(0x3c8,0x3f1)]>0x0&&this['db'][_0x3bca7a(0x3f7,0x3f6)+'ing'](_0x9e8f66['id'],_0x28bc69[_0x647864(0x404,0x3e8)]),this['db'][_0x3bca7a(0x41d,0x400)+'tus'](_0x9e8f66['id'],_0x28bc69['id'],_0x3bca7a(0x3f2,0x3dc)),_0x593d74[_0x647864(0x415,0x419)]++;}else{const _0x6f723e=new Date(_0x28bc69[_0x647864(0x3f5,0x3d7)]),_0x4e7952=new Date(_0x26abcd[_0x647864(0x3d0,0x3d8)]);_0x6f723e>_0x4e7952&&(this['db'][_0x647864(0x40e,0x422)+'ry'](_0x26abcd['id'],{'content':_0x28bc69['content'],'category':mapCategory(_0x28bc69[_0x647864(0x3fe,0x3de)]),'tier':mapTier(_0x28bc69[_0x647864(0x3de,0x3d5)]??_0x26abcd[_0x3bca7a(0x3c0,0x3ce)]),'tags':_0x28bc69['tags']??_0x26abcd[_0x647864(0x3df,0x3dc)],'qualityScore':_0x28bc69[_0x3bca7a(0x3b7,0x3d1)+_0x3bca7a(0x3d8,0x3d3)]??undefined}),_0x28bc69[_0x3bca7a(0x3ec,0x3d8)+'nt']!==undefined&&this['db']['mergeAcces'+_0x647864(0x403,0x401)](_0x26abcd['id'],_0x28bc69[_0x3bca7a(0x3c5,0x3d8)+'nt']),_0x28bc69[_0x3bca7a(0x40f,0x3f4)]&&_0x28bc69[_0x647864(0x404,0x3da)][_0x3bca7a(0x410,0x3f1)]>0x0&&this['db']['saveEmbedd'+'ing'](_0x26abcd['id'],_0x28bc69[_0x647864(0x404,0x404)]),this['db'][_0x647864(0x410,0x3f1)+_0x3bca7a(0x400,0x40b)](_0x26abcd['id'],_0x28bc69['id'],'synced'),_0x593d74['conflicts']++);}}catch(_0x4a11f3){_0x4a11f3 instanceof Error&&_0x593d74[_0x647864(0x400,0x427)][_0x3bca7a(0x3f0,0x3f7)](_0x647864(0x3dd,0x3eb)+_0x28bc69['id']+_0x3bca7a(0x3f1,0x40c)+_0x4a11f3['message']);}}_0x47b8e8[_0x3bca7a(0x3de,0x3f1)]<DEFAULT_PAGE_SIZE?_0x647864(0x3e9,0x3d1)===_0x647864(0x3d7,0x3cf)?this['db']['saveEmbedd'+_0x647864(0x40f,0x3fc)](_0x15f90b['id'],_0x331604[_0x3bca7a(0x400,0x3f4)]):_0x4f454c=![]:_0x41c9ea+=DEFAULT_PAGE_SIZE;}this['recordSucc'+_0x647864(0x3ff,0x3fc)]();}catch(_0x43a66f){this['recordFail'+'ure'](),_0x43a66f instanceof Error&&(_0x3bca7a(0x405,0x3e2)===_0x3bca7a(0x408,0x3e2)?_0x593d74[_0x3bca7a(0x3dc,0x3f0)][_0x3bca7a(0x3f8,0x3f7)](_0x43a66f[_0x647864(0x405,0x40c)]):_0x580f72 instanceof _0x377c80&&_0x552011['errors'][_0x647864(0x407,0x3f9)](_0x37c206[_0x647864(0x405,0x408)]));}function _0x647864(_0x57d3df,_0x54a2ec){return _0x307d3c(_0x54a2ec,_0x57d3df-0x43f);}return _0x593d74[_0x3bca7a(0x3f0,0x3da)]=Date[_0x3bca7a(0x3e7,0x408)]()-_0x411f61,_0x593d74;}async['getStatus'](){function _0x3aa113(_0x138aa4,_0x13314e){return _0x553eec(_0x138aa4,_0x13314e- -0x3e);}const _0x53db7e=this['queue'][_0x1d1863(-0x15d,-0x179)+_0x3aa113(0x21c,0x1f4)]();let _0x33235b=0x0;function _0x1d1863(_0x4d6066,_0x224ff0){return _0x553eec(_0x224ff0,_0x4d6066- -0x357);}try{const _0x308f2e=await this[_0x3aa113(0x1d7,0x1cb)][_0x3aa113(0x1b7,0x1ce)+'es']({'limit':0x2710}),_0x1d864d=this['db'][_0x3aa113(0x1d6,0x1df)+_0x1d1863(-0x166,-0x17b)]();_0x33235b=Math['max'](0x0,_0x308f2e[_0x3aa113(0x1c3,0x1d8)]-_0x1d864d);}catch{}const _0x11c31b=this['db'][_0x3aa113(0x1cc,0x1bd)+_0x1d1863(-0x15e,-0x17e)]();return{'pendingPush':_0x53db7e,'pendingPull':_0x33235b,'lastSyncedAt':_0x11c31b??undefined};}}
@@ -1 +1 @@
1
- (function(_0x2293c2,_0x4dc862){function _0x36f341(_0x53d45b,_0x295f1e){return _0xe425(_0x295f1e-0x207,_0x53d45b);}const _0x1d6d59=_0x2293c2();function _0x4545ae(_0x5ebe4e,_0x3403cb){return _0xe425(_0x5ebe4e- -0x237,_0x3403cb);}while(!![]){try{const _0x345b94=-parseInt(_0x4545ae(-0x73,-0x93))/0x1+parseInt(_0x4545ae(-0xae,-0xd6))/0x2+parseInt(_0x36f341(0x397,0x3b2))/0x3*(-parseInt(_0x4545ae(-0x78,-0x69))/0x4)+-parseInt(_0x36f341(0x3a2,0x3b3))/0x5+parseInt(_0x36f341(0x3a4,0x3b4))/0x6+parseInt(_0x36f341(0x3b8,0x3d2))/0x7*(-parseInt(_0x36f341(0x388,0x38c))/0x8)+-parseInt(_0x36f341(0x402,0x3d8))/0x9*(-parseInt(_0x36f341(0x3d5,0x3c2))/0xa);if(_0x345b94===_0x4dc862)break;else _0x1d6d59['push'](_0x1d6d59['shift']());}catch(_0x3f52c2){_0x1d6d59['push'](_0x1d6d59['shift']());}}}(_0x16bf,0x53c0c));function _0x45fe84(_0x509b76,_0x30d7bb){return _0xe425(_0x509b76- -0x28f,_0x30d7bb);}function _0x16bf(){const _0x2ba167=['7isC67keioYxSoQYScdSI6tTJkG6ia','AwvZ','zxjYB3jZ','zhvYyxrPB24','zcbMB3iG','ywrKvgvHBu1LBq','tfDxihjLC29SDq','uhvZAcbMywLSzq','y29UDgvUDa','BwvZC2fNzq','C2v0u3LUy1n0yq','yMvMB3jL','DgvZDenVBM5LyW','zw1IzwrKAw5N','yM9iEMu','u3LUy01LBw9YAq','y2vKqxq','Bw9YAwvZ','C2f2zvzLy3rVCG','BwvYz2u','y2XPzw50','B3jL','y29UzMXPy3rZ','C2f2zuvTyMvKza','Aw5JCMvTzw50','BgvUz3rO','ChvSBa','CxvHBgL0Ev9ZyW','DxbKyxrLtwvTBW','Bg9JAW','DgfNCW','z2v0tgfZDfn5BG','mZiXmZLZt3bvrMK','mte1otiZmeXpzg5ODG','mJa5mtK2mhrOwhrQBq','y29UzMXPy3q','qNLszw1VDgvjza','DhvZ','ywnJzxnZx2nVDq','BM93','DxbKyxrLzf9HDa','Aw5N','ChvZAcdQSBtRHiJRNia','DgLLCG','y2f0zwDVCNK','DxbKyxrLzef0','z2v0ugvUzgLUzW','ChvZAfrVvgvHBq','mJb6AxPJEKe','DgLVBG','y29Uy3vYCMvUDa','qwHmDgO','mJbjrNbxvKC','ChvZAcdRTOJQSia','BwvTB3j5swq','y29TCgfYzq','ChvZAa','ndGXnduWuMzru2nq','zMLUze1LBw9YEq','C3vJy2vZCW','z2v0vMvJDg9YqW','Dg9ku09o','q2XVy2S','C3LUy2vK','mZvQwwj1D0S','ChvSBgvK','B3j5','ywrKu3LUy0HPCW','z2v0vgvHBvn0yq','AgfZ','mZC1nZCYnwLPtu9ysW','BwvYz2vby2nLCW','BM9KzuLK','Dg9YEq','z2v0twvTB3j5','EKTMBM0','ChvSBezYB21uzq','ChvZAgvK','ode5nZy4yMT2tuHb','z2v0vw5ZEw5Jzq','DgvHBvbHDgG','y3jLyxrLtwvTBW','odC3mte2Du5ZquvQ','C0nVDw50'];_0x16bf=function(){return _0x2ba167;};return _0x16bf();}import{LocalVectorClock}from'./vector-clock.js';import{mapCategory,mapTier}from'./queue.js';function _0x190573(_0x2a19af,_0x3a65a8){return _0xe425(_0x2a19af-0x1e2,_0x3a65a8);}function _0xe425(_0x3e11ae,_0x18418d){_0x3e11ae=_0x3e11ae-0x182;const _0x16bf43=_0x16bf();let _0xe42567=_0x16bf43[_0x3e11ae];if(_0xe425['vuFCVd']===undefined){var _0x55a8ef=function(_0x1c7d97){const _0x6f7c3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x13c431='',_0x332fcb='';for(let _0x2a5696=0x0,_0x36ca4f,_0x5d4077,_0x3dad58=0x0;_0x5d4077=_0x1c7d97['charAt'](_0x3dad58++);~_0x5d4077&&(_0x36ca4f=_0x2a5696%0x4?_0x36ca4f*0x40+_0x5d4077:_0x5d4077,_0x2a5696++%0x4)?_0x13c431+=String['fromCharCode'](0xff&_0x36ca4f>>(-0x2*_0x2a5696&0x6)):0x0){_0x5d4077=_0x6f7c3['indexOf'](_0x5d4077);}for(let _0x26f9bb=0x0,_0x357d11=_0x13c431['length'];_0x26f9bb<_0x357d11;_0x26f9bb++){_0x332fcb+='%'+('00'+_0x13c431['charCodeAt'](_0x26f9bb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x332fcb);};_0xe425['WaMCXM']=_0x55a8ef,_0xe425['sbDwCL']={},_0xe425['vuFCVd']=!![];}const _0x242e31=_0x16bf43[0x0],_0x32673f=_0x3e11ae+_0x242e31,_0x241f49=_0xe425['sbDwCL'][_0x32673f];return!_0x241f49?(_0xe42567=_0xe425['WaMCXM'](_0xe42567),_0xe425['sbDwCL'][_0x32673f]=_0xe42567):_0xe42567=_0x241f49,_0xe42567;}const PAGE_SIZE=0x64;export class TeamSynchronizer{['db'];[_0x45fe84(-0xf0,-0x10a)];[_0x45fe84(-0x108,-0x121)];[_0x190573(0x3b5,0x3bb)];constructor(_0x478724,_0x5b8582,_0xfd0b6a,_0x3c779a){this['db']=_0x478724,this[_0xb0f8e3(0x46,0x41)]=_0x5b8582,this['teamPath']=_0xfd0b6a;function _0xb0f8e3(_0x4252a3,_0x1fb036){return _0x45fe84(_0x4252a3-0x136,_0x1fb036);}this['nodeId']=_0x3c779a;}async['syncDelta'](){const _0xed9613=Date['now'](),_0x31a13f={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};function _0x346d2a(_0xbddf3c,_0x2c87ad){return _0x190573(_0x2c87ad- -0x348,_0xbddf3c);}function _0x1fe871(_0x6e6979,_0x50f053){return _0x190573(_0x50f053-0x187,_0x6e6979);}try{const _0x1f19f8=await this['client'][_0x346d2a(0x54,0x31)+_0x1fe871(0x538,0x525)]();if(!_0x1f19f8)return _0x31a13f[_0x1fe871(0x50d,0x4f6)]['push'](_0x1fe871(0x4e3,0x4f4)+_0x1fe871(0x531,0x51e)),_0x31a13f[_0x346d2a(0x3f,0x28)]=Date[_0x346d2a(0x29,0x4c)]()-_0xed9613,_0x31a13f;const _0x1115c2=new Set(this['db'][_0x1fe871(0x4cc,0x4ef)+'dTombstone'+'s']()['map'](_0x2e591f=>_0x2e591f[_0x346d2a(0x3e,0x5b)])),_0x10ae50=this['db'][_0x346d2a(0x61,0x53)+'SyncMemori'+'es']();for(const _0x3299c8 of _0x10ae50){if(_0x1115c2[_0x346d2a(0x68,0x6a)](_0x3299c8['id']))continue;try{const _0xc2d042=new LocalVectorClock(this['nodeId'],this['db'][_0x346d2a(0x81,0x61)+_0x1fe871(0x535,0x511)](_0x3299c8['id'])??undefined);_0xc2d042['increment'](),await this[_0x346d2a(0x32,0x39)][_0x1fe871(0x50d,0x4f9)+'ory'](this[_0x346d2a(0x29,0x21)],{'content':_0x3299c8[_0x1fe871(0x519,0x4fc)],'category':_0x3299c8['category'],'tier':_0x3299c8[_0x1fe871(0x53f,0x51f)],'tags':_0x3299c8[_0x346d2a(0x53,0x43)]}),this['db'][_0x346d2a(0x49,0x37)+_0x346d2a(0x89,0x63)](_0x3299c8['id'],_0xc2d042['toJSON']()),this['db'][_0x346d2a(0x56,0x2f)+'tus'](_0x3299c8['id'],null,_0x346d2a(0x77,0x64)),this['db']['addSyncHis'+_0x346d2a(0x80,0x6e)](_0x346d2a(0x5e,0x5d),_0x3299c8['id'],_0x346d2a(0x6a,0x60)),_0x31a13f[_0x346d2a(0x3,0x1e)]++;}catch(_0x3d100a){if('xKrBX'===_0x346d2a(0x53,0x58)){const _0x4d391c=new _0x3abc9d(_0x327298[_0x1fe871(0x53f,0x51c)]),_0xb175e5=new _0x3622f5(_0x3a000f[_0x1fe871(0x503,0x521)]);_0x4d391c>_0xb175e5&&(this['db'][_0x346d2a(0x5c,0x41)+'ry'](_0x11f1f6['id'],{'content':_0x543edb[_0x346d2a(0x1a,0x2d)],'category':_0x3550e7(_0x42abed['category']),'tier':_0x50f4f1(_0x3017f8[_0x346d2a(0x51,0x50)]??_0xa3ce0[_0x346d2a(0x3f,0x50)]),'tags':_0x2585f7['tags']??_0x4c8fa4[_0x1fe871(0x4f2,0x512)],'qualityScore':_0x3bd3a5[_0x1fe871(0x4e5,0x50f)+_0x346d2a(0x61,0x3a)]??_0xef6df9}),_0x1cd70a[_0x1fe871(0x523,0x501)]&&_0x6a6e38[_0x346d2a(0x10,0x32)][_0x346d2a(0x28,0x3e)]>0x0&&this['db']['saveEmbedd'+_0x346d2a(0x27,0x4e)](_0x4697b2['id'],_0x2afc9c[_0x346d2a(0x26,0x32)])),_0x156e80[_0x1fe871(0x522,0x51a)+'nt']!==_0x4fb347&&this['db'][_0x346d2a(0x84,0x6c)+_0x346d2a(0x31,0x24)](_0x350e2c['id'],_0x1c38b1[_0x1fe871(0x531,0x51a)+'nt']),_0x31c2b0['merge'](_0x42d4f2),this['db'][_0x1fe871(0x50a,0x506)+'Clock'](_0x4a7f0a['id'],_0x2b0d7f['toJSON']()),this['db'][_0x346d2a(0x3c,0x2f)+'tus'](_0x2ca0e7['id'],_0x38ac73['id'],_0x346d2a(0x70,0x64)),this['db']['addSyncHis'+_0x346d2a(0x8e,0x6e)](_0x1fe871(0x511,0x517),_0x21df0f['id'],'success',_0x346d2a(0x1a,0x2b)+_0x1fe871(0x52d,0x525)),_0x19115f++;}else{const _0x395375=_0x3d100a instanceof Error?_0x3d100a[_0x1fe871(0x4f8,0x4fd)]:String(_0x3d100a);this['db']['addSyncHis'+_0x346d2a(0x49,0x6e)](_0x346d2a(0x5a,0x5d),_0x3299c8['id'],'failed',_0x395375),_0x31a13f['errors'][_0x1fe871(0x53c,0x52c)](_0x1fe871(0x4fd,0x4fb)+_0x346d2a(0x14,0x29)+_0x3299c8['id']+':\x20'+_0x395375);}}}const _0x246dc7=await this[_0x1fe871(0x4d2,0x4ec)+'am']();_0x31a13f['pulled']=_0x246dc7[_0x346d2a(0x7e,0x66)],_0x31a13f[_0x346d2a(0x5d,0x3b)]=_0x246dc7['conflicts'];}catch(_0x2bbfbc){_0x31a13f['errors'][_0x1fe871(0x542,0x52c)](_0x2bbfbc instanceof Error?_0x2bbfbc[_0x346d2a(0x17,0x2e)]:String(_0x2bbfbc));}return _0x31a13f['duration']=Date[_0x1fe871(0x534,0x51b)]()-_0xed9613,_0x31a13f;}async[_0x45fe84(-0xd5,-0xdb)](_0x35a159){function _0x5514ac(_0x2459d7,_0x3932a2){return _0x190573(_0x2459d7- -0x3a3,_0x3932a2);}const _0x465f39=await this[_0x5514ac(-0x22,-0x26)][_0x5514ac(-0x2a,-0x10)+'tion']();if(!_0x465f39)throw new Error(_0x5514ac(-0x36,-0x47)+_0x5514ac(-0x1,0x23));function _0x5eef8c(_0x116321,_0x4c195b){return _0x190573(_0x4c195b- -0x14,_0x116321);}for(const _0xa58f0e of _0x35a159){const _0x3bab34=this['db'][_0x5514ac(0x14,-0x7)](_0xa58f0e);if(!_0x3bab34)continue;const _0x675334=new LocalVectorClock(this[_0x5514ac(0x12,0x1d)],this['db']['getVectorC'+_0x5eef8c(0x396,0x376)](_0xa58f0e)??undefined);_0x675334[_0x5eef8c(0x367,0x371)](),await this['client'][_0x5eef8c(0x34c,0x35e)+_0x5514ac(0xc,0x6)](this[_0x5eef8c(0x32c,0x355)],{'content':_0x3bab34[_0x5eef8c(0x34f,0x361)],'category':_0x3bab34[_0x5514ac(-0xa,-0x2c)],'tier':_0x3bab34[_0x5eef8c(0x36a,0x384)],'tags':_0x3bab34[_0x5514ac(-0x18,-0x32)]}),this['db']['saveVector'+_0x5514ac(0x8,0x25)](_0xa58f0e,_0x675334['toJSON']()),this['db'][_0x5514ac(-0x2c,-0xa)+_0x5514ac(-0x11,-0x26)](_0xa58f0e,null,_0x5eef8c(0x3c2,0x398)),this['db'][_0x5514ac(0xd,0x2a)+_0x5eef8c(0x3b1,0x3a2)](_0x5514ac(0x2,-0x1e),_0xa58f0e,_0x5eef8c(0x3a0,0x394));}}async[_0x190573(0x365,0x37a)+'am'](){let _0x313244=0x0;function _0x342769(_0x518c57,_0x346e06){return _0x190573(_0x518c57- -0x1a6,_0x346e06);}let _0x5a0867=0x0,_0x2670a8=0x0;const _0x559da8=0x3e8;let _0x447556=0x0;function _0x45b0f9(_0x5ed7c1,_0x3f4619){return _0x190573(_0x5ed7c1- -0x1fa,_0x3f4619);}while(_0x447556<_0x559da8){_0x447556++;const _0x3857d2=await this[_0x45b0f9(0x187,0x1a0)]['listTeamMe'+_0x342769(0x1d8,0x200)](this[_0x342769(0x1c3,0x1af)],{'limit':PAGE_SIZE,'offset':_0x2670a8});if(_0x3857d2[_0x45b0f9(0x18c,0x193)]===0x0)break;for(const _0x535e35 of _0x3857d2){const _0x3a67a8=this['db'][_0x45b0f9(0x1ad,0x1cf)+_0x45b0f9(0x197,0x18c)](_0x535e35['id']);if(!_0x3a67a8){const _0x2dbb45=this['db'][_0x45b0f9(0x170,0x185)+'ry']({'content':_0x535e35[_0x45b0f9(0x17b,0x193)],'category':mapCategory(_0x535e35[_0x342769(0x1f3,0x200)]),'tier':mapTier(_0x535e35[_0x342769(0x1f2,0x202)]??'episodic'),'tags':_0x535e35['tags']??[],'qualityScore':_0x535e35[_0x342769(0x1e2,0x1ee)+_0x45b0f9(0x188,0x17c)]??undefined});_0x535e35[_0x45b0f9(0x199,0x190)+'nt']&&_0x535e35['access_cou'+'nt']>0x0&&this['db'][_0x45b0f9(0x1ba,0x1d2)+_0x45b0f9(0x172,0x18b)](_0x2dbb45['id'],_0x535e35[_0x45b0f9(0x199,0x1b9)+'nt']),_0x535e35[_0x45b0f9(0x180,0x19c)]&&_0x535e35['embedding'][_0x45b0f9(0x18c,0x1b5)]>0x0&&this['db'][_0x45b0f9(0x18a,0x191)+_0x45b0f9(0x19c,0x172)](_0x2dbb45['id'],_0x535e35[_0x45b0f9(0x180,0x156)]),this['db'][_0x45b0f9(0x17d,0x164)+_0x342769(0x1ec,0x1d6)](_0x2dbb45['id'],_0x535e35['id'],_0x45b0f9(0x1b2,0x196)),this['db'][_0x342769(0x20a,0x20f)+'tory']('pull',_0x2dbb45['id'],'success'),_0x313244++;}else{const _0x3c5ae1=this['db'][_0x45b0f9(0x1af,0x1c2)+_0x45b0f9(0x190,0x1a2)](_0x3a67a8['id'])??{},_0x272ab8=new LocalVectorClock(this[_0x45b0f9(0x1bb,0x1ce)],_0x3c5ae1),_0x439aca=_0x535e35['vector_clo'+'ck']??{},_0xd6b5a9=_0x272ab8[_0x45b0f9(0x1aa,0x1cb)](_0x439aca);if(_0xd6b5a9===_0x45b0f9(0x17e,0x1a7))this['db'][_0x45b0f9(0x18f,0x1a3)+'ry'](_0x3a67a8['id'],{'content':_0x535e35[_0x342769(0x1cf,0x1ba)],'category':mapCategory(_0x535e35[_0x342769(0x1f3,0x1c9)]),'tier':mapTier(_0x535e35[_0x342769(0x1f2,0x20e)]??_0x3a67a8[_0x342769(0x1f2,0x1d3)]),'tags':_0x535e35['tags']??_0x3a67a8[_0x45b0f9(0x191,0x1a7)],'qualityScore':_0x535e35[_0x45b0f9(0x18e,0x179)+_0x45b0f9(0x188,0x1a3)]??undefined}),_0x535e35[_0x45b0f9(0x199,0x1b9)+'nt']!==undefined&&this['db'][_0x45b0f9(0x1ba,0x197)+_0x342769(0x1c6,0x1c0)](_0x3a67a8['id'],_0x535e35[_0x45b0f9(0x199,0x1a7)+'nt']),_0x535e35[_0x342769(0x1d4,0x1f2)]&&_0x535e35[_0x342769(0x1d4,0x1ba)][_0x342769(0x1e0,0x1c2)]>0x0&&this['db'][_0x342769(0x1de,0x1cc)+_0x342769(0x1f0,0x218)](_0x3a67a8['id'],_0x535e35['embedding']),_0x272ab8[_0x342769(0x1da,0x1f7)](_0x439aca),this['db'][_0x342769(0x1d9,0x1ba)+_0x45b0f9(0x1b1,0x199)](_0x3a67a8['id'],_0x272ab8[_0x342769(0x204,0x204)]()),this['db'][_0x45b0f9(0x17d,0x19e)+_0x45b0f9(0x198,0x1b2)](_0x3a67a8['id'],_0x535e35['id'],_0x45b0f9(0x1b2,0x1cc)),this['db'][_0x45b0f9(0x1b6,0x193)+_0x45b0f9(0x1bc,0x1bc)](_0x45b0f9(0x18d,0x1ac),_0x3a67a8['id'],'success'),_0x313244++;else{if(_0xd6b5a9===_0x45b0f9(0x1a5,0x1b0)){if(_0x342769(0x1d5,0x1f3)!==_0x45b0f9(0x16a,0x185)){const _0x20ceea=new Date(_0x535e35[_0x45b0f9(0x19b,0x17f)]),_0x23bc64=new Date(_0x3a67a8[_0x342769(0x1f4,0x20a)]);_0x20ceea>_0x23bc64&&(this['db'][_0x342769(0x1e3,0x1ec)+'ry'](_0x3a67a8['id'],{'content':_0x535e35['content'],'category':mapCategory(_0x535e35['category']),'tier':mapTier(_0x535e35[_0x45b0f9(0x19e,0x1aa)]??_0x3a67a8[_0x342769(0x1f2,0x1cf)]),'tags':_0x535e35['tags']??_0x3a67a8['tags'],'qualityScore':_0x535e35['quality_sc'+_0x342769(0x1dc,0x1ed)]??undefined}),_0x535e35[_0x45b0f9(0x180,0x18c)]&&_0x535e35[_0x45b0f9(0x180,0x17b)][_0x342769(0x1e0,0x1b6)]>0x0&&this['db'][_0x45b0f9(0x18a,0x160)+_0x342769(0x1f0,0x1f5)](_0x3a67a8['id'],_0x535e35['embedding'])),_0x535e35['access_cou'+'nt']!==undefined&&this['db'][_0x45b0f9(0x1ba,0x1ca)+_0x45b0f9(0x172,0x18f)](_0x3a67a8['id'],_0x535e35[_0x45b0f9(0x199,0x179)+'nt']),_0x272ab8['merge'](_0x439aca),this['db'][_0x45b0f9(0x185,0x19f)+_0x342769(0x205,0x1e0)](_0x3a67a8['id'],_0x272ab8[_0x342769(0x204,0x20d)]()),this['db']['setSyncSta'+_0x342769(0x1ec,0x1d1)](_0x3a67a8['id'],_0x535e35['id'],_0x342769(0x206,0x1e2)),this['db'][_0x45b0f9(0x1b6,0x19a)+'tory']('conflict',_0x3a67a8['id'],_0x45b0f9(0x1ae,0x18e),_0x45b0f9(0x179,0x180)+_0x342769(0x1f8,0x1f6)),_0x5a0867++;}else this['db'][_0x45b0f9(0x1ba,0x1a7)+_0x45b0f9(0x172,0x189)](_0x32de22['id'],_0x5119e8[_0x342769(0x1ed,0x1ed)+'nt']);}}}}if(_0x3857d2[_0x342769(0x1e0,0x206)]<PAGE_SIZE)break;_0x2670a8+=PAGE_SIZE;}return{'pulled':_0x313244,'conflicts':_0x5a0867};}async[_0x45fe84(-0xc0,-0xa6)+'tus'](){function _0x643365(_0x44a1c3,_0x134dc4){return _0x45fe84(_0x134dc4-0x4e3,_0x44a1c3);}function _0x249665(_0x2dbf39,_0xd4356f){return _0x45fe84(_0x2dbf39-0x34d,_0xd4356f);}const _0x18f695=this['db']['getStats'](),_0x34a7d0=this['db']['getPending'+_0x249665(0x258,0x24a)+'es']()['length'],_0x169465=this['db'][_0x643365(0x3ff,0x3fe)+_0x643365(0x3f3,0x3ef)]();return{'teamPath':this[_0x643365(0x3cf,0x3db)],'nodeId':this[_0x249665(0x291,0x267)],'localMemoryCount':_0x18f695['totalMemor'+_0x249665(0x24a,0x236)],'pendingSync':_0x34a7d0,'lastSyncedAt':_0x169465??undefined};}}
1
+ (function(_0x5d031f,_0x3bc1f2){function _0x2ff4fb(_0x39181d,_0x114f2d){return _0x16b2(_0x114f2d- -0x2d6,_0x39181d);}const _0x21e56f=_0x5d031f();function _0x70308b(_0xe90907,_0x3d3788){return _0x16b2(_0x3d3788-0x100,_0xe90907);}while(!![]){try{const _0x267fd4=parseInt(_0x70308b(0x26d,0x27d))/0x1*(-parseInt(_0x2ff4fb(-0x11c,-0x133))/0x2)+parseInt(_0x2ff4fb(-0x139,-0x127))/0x3+parseInt(_0x2ff4fb(-0x132,-0x126))/0x4*(-parseInt(_0x70308b(0x287,0x2aa))/0x5)+-parseInt(_0x2ff4fb(-0x13d,-0x14d))/0x6*(-parseInt(_0x70308b(0x2dc,0x2c1))/0x7)+parseInt(_0x70308b(0x2a9,0x283))/0x8+-parseInt(_0x70308b(0x2b6,0x290))/0x9+-parseInt(_0x2ff4fb(-0x123,-0x140))/0xa*(-parseInt(_0x70308b(0x298,0x2b2))/0xb);if(_0x267fd4===_0x3bc1f2)break;else _0x21e56f['push'](_0x21e56f['shift']());}catch(_0x5ae927){_0x21e56f['push'](_0x21e56f['shift']());}}}(_0x2ecc,0xe7e00));import{LocalVectorClock}from'./vector-clock.js';function _0x2ecc(){const _0x5810a9=['zMLUze1LBw9YEq','y2vKqxq','Aw5N','C3vJy2vZCW','BwvYz2vby2nLCW','ChvZAa','nJa1me9Ot0HfBW','ChvSBa','ywrKu3LUy0HPCW','AwvZ','u3LUy01LBw9YAq','mZy4mZaXnNrlzgzvBq','mZy3nK10vu1fEq','BM93','mtffsNjpvgG','y29TCgfYzq','DgfNCW','y2f0zwDVCNK','z2v0u3rHDhm','BwvTB3j5swq','ChvZAcdQSBtRHiJRNia','DgvZDenVBM5LyW','BM9KzuLK','Bw9YAwvZ','zw1IzwrKAw5N','C0nVDw50','ywnJzxnZx2nVDq','B3jL','ChvSBezYB21uzq','mtm1muLwEg5wBW','z2v0vgvHBvn0yq','DxbKyxrLtwvTBW','7isC67keioYxSoQYScdSI6tTJkG6ia','DgvHBvbHDgG','DhvZ','B3j5','yMvMB3jL','mtqYBMHjr3fR','z2v0ugvUzgLUzW','C2f2zvzLy3rVCG','Dg9ku09o','zxbPC29KAwm','ChvSBgvK','otmXmdy0oejJturVsq','y29UzMXPy3q','z2v0twvTB3j5','BwvZC2fNzq','Dg90ywXnzw1VCG','q2XVy2S','mty2odzMDhPgu3C','Dg9YEq','C3LUy2vK','C2f2zuvTyMvKza','BgvUz3rO','C2v0u3LUy1n0yq','BwvYz2u','otC5mtaYofL0tg9etG','zfrVBwjZDg9Uzq','CxvHBgL0Ev9ZyW','qNLszw1VDgvjza','tfDxihjLC29SDq','qKLorhi','nZq4nZK0mhHiC3bWEq','DgLVBG','C3LUy0rLBhrH','zcbMB3iG','zxjYB3jZ','y2XPzw50','uhvZAcbMywLSzq','Bg9JAW','Aw5JCMvTzw50','y29UzMXPy3rZ','ChvZAfrVvgvHBq','y29UDgvUDa','DgLLCG','nZqYohbdvMDkrW'];_0x2ecc=function(){return _0x5810a9;};return _0x2ecc();}function _0x1e18be(_0x13dd51,_0x13054b){return _0x16b2(_0x13dd51-0x26b,_0x13054b);}import{mapCategory,mapTier}from'./queue.js';function _0x16b2(_0x512f6a,_0x147e7d){_0x512f6a=_0x512f6a-0x179;const _0x2ecc30=_0x2ecc();let _0x16b23f=_0x2ecc30[_0x512f6a];if(_0x16b2['WHpElx']===undefined){var _0x3e0a83=function(_0x3e718d){const _0x1b3b9c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5f28dc='',_0x432cec='';for(let _0x5360a5=0x0,_0x80d769,_0x1dbfe3,_0x25c981=0x0;_0x1dbfe3=_0x3e718d['charAt'](_0x25c981++);~_0x1dbfe3&&(_0x80d769=_0x5360a5%0x4?_0x80d769*0x40+_0x1dbfe3:_0x1dbfe3,_0x5360a5++%0x4)?_0x5f28dc+=String['fromCharCode'](0xff&_0x80d769>>(-0x2*_0x5360a5&0x6)):0x0){_0x1dbfe3=_0x1b3b9c['indexOf'](_0x1dbfe3);}for(let _0x425541=0x0,_0x4681a5=_0x5f28dc['length'];_0x425541<_0x4681a5;_0x425541++){_0x432cec+='%'+('00'+_0x5f28dc['charCodeAt'](_0x425541)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x432cec);};_0x16b2['mLgifb']=_0x3e0a83,_0x16b2['jnRjav']={},_0x16b2['WHpElx']=!![];}const _0x5cdea4=_0x2ecc30[0x0],_0x41c884=_0x512f6a+_0x5cdea4,_0x5df437=_0x16b2['jnRjav'][_0x41c884];return!_0x5df437?(_0x16b23f=_0x16b2['mLgifb'](_0x16b23f),_0x16b2['jnRjav'][_0x41c884]=_0x16b23f):_0x16b23f=_0x5df437,_0x16b23f;}const PAGE_SIZE=0x64;function _0x42fcb2(_0x2076e9,_0x4fe1a1){return _0x16b2(_0x2076e9-0x336,_0x4fe1a1);}export class TeamSynchronizer{['db'];[_0x1e18be(0x406,0x3f1)];[_0x1e18be(0x3e4,0x404)];[_0x1e18be(0x425,0x42b)];constructor(_0x5d16fc,_0x2595e8,_0x32493d,_0x31747f){this['db']=_0x5d16fc,this[_0x4a6108(0x406,0x3ee)]=_0x2595e8,this[_0x4a6108(0x3e4,0x3fa)]=_0x32493d;function _0x11381f(_0x19af29,_0x5cc585){return _0x42fcb2(_0x5cc585- -0x541,_0x19af29);}function _0x4a6108(_0x9667c8,_0x7070f6){return _0x42fcb2(_0x9667c8- -0xcb,_0x7070f6);}this[_0x4a6108(0x425,0x435)]=_0x31747f;}async[_0x42fcb2(0x4ce,0x4c3)](){function _0x4956eb(_0x2918c4,_0x56bbf5){return _0x42fcb2(_0x56bbf5- -0xb,_0x2918c4);}const _0x1e9a8e=Date[_0x10a218(0x404,0x427)](),_0x57e15a={'pushed':0x0,'pulled':0x0,'conflicts':0x0,'errors':[],'duration':0x0};try{const _0x2afbd9=await this[_0x10a218(0x40d,0x411)][_0x4956eb(0x4ca,0x4e4)+_0x4956eb(0x4e8,0x4c2)]();if(!_0x2afbd9)return _0x57e15a[_0x4956eb(0x4bb,0x4c5)][_0x10a218(0x41b,0x41f)](_0x4956eb(0x4ed,0x4ef)+_0x10a218(0x443,0x42e)),_0x57e15a['duration']=Date[_0x10a218(0x42d,0x427)]()-_0x1e9a8e,_0x57e15a;const _0x5401f0=new Set(this['db']['getUnsynce'+_0x4956eb(0x4c8,0x4bc)+'s']()['map'](_0x4a627a=>_0x4a627a[_0x10a218(0x444,0x42d)])),_0x40fb0d=this['db'][_0x4956eb(0x4ad,0x4a9)+_0x10a218(0x44a,0x424)+'es']();for(const _0x5c8cab of _0x40fb0d){if(_0x5401f0['has'](_0x5c8cab['id']))continue;try{const _0x4989cb=new LocalVectorClock(this[_0x4956eb(0x4dd,0x4e5)],this['db']['getVectorC'+_0x10a218(0x3f8,0x413)](_0x5c8cab['id'])??undefined);_0x4989cb[_0x10a218(0x420,0x414)](),await this[_0x10a218(0x3f5,0x411)]['addTeamMem'+_0x10a218(0x3ec,0x3f1)](this[_0x4956eb(0x4ae,0x4a4)],{'content':_0x5c8cab[_0x10a218(0x40d,0x417)],'category':_0x5c8cab[_0x4956eb(0x4e8,0x4e0)],'tier':_0x5c8cab[_0x10a218(0x425,0x418)],'tags':_0x5c8cab['tags']}),this['db'][_0x4956eb(0x4b3,0x4aa)+'Clock'](_0x5c8cab['id'],_0x4989cb[_0x10a218(0x3d1,0x3f6)]()),this['db']['setSyncSta'+_0x4956eb(0x481,0x4a5)](_0x5c8cab['id'],null,_0x4956eb(0x4c4,0x4b6)),this['db'][_0x4956eb(0x4b5,0x4d7)+'tory'](_0x10a218(0x425,0x41f),_0x5c8cab['id'],'success'),_0x57e15a['pushed']++;}catch(_0x3245e0){const _0x58c6ac=_0x3245e0 instanceof Error?_0x3245e0[_0x10a218(0x417,0x3fc)]:String(_0x3245e0);this['db'][_0x4956eb(0x4b1,0x4d7)+'tory'](_0x10a218(0x403,0x41f),_0x5c8cab['id'],'failed',_0x58c6ac),_0x57e15a[_0x4956eb(0x4cc,0x4c5)][_0x4956eb(0x4ba,0x4d4)](_0x4956eb(0x4a4,0x4c7)+_0x10a218(0x416,0x40f)+_0x5c8cab['id']+':\x20'+_0x58c6ac);}}const _0x83c19c=await this[_0x4956eb(0x50e,0x4eb)+'am']();_0x57e15a[_0x4956eb(0x4c1,0x4ad)]=_0x83c19c[_0x4956eb(0x4b8,0x4ad)],_0x57e15a[_0x10a218(0x436,0x415)]=_0x83c19c[_0x4956eb(0x4ea,0x4ca)];}catch(_0x8cd4f3){_0x57e15a[_0x10a218(0x424,0x410)][_0x4956eb(0x4c6,0x4d4)](_0x8cd4f3 instanceof Error?_0x8cd4f3[_0x4956eb(0x4bb,0x4b1)]:String(_0x8cd4f3));}_0x57e15a['duration']=Date[_0x4956eb(0x501,0x4dc)]()-_0x1e9a8e;function _0x10a218(_0x5b67bc,_0xfc8f03){return _0x42fcb2(_0xfc8f03- -0xc0,_0x5b67bc);}return _0x57e15a;}async[_0x1e18be(0x40b,0x430)](_0x1c58b4){const _0x42c5d8=await this[_0x138bac(0x143,0x12d)][_0x80fa56(-0x140,-0x11c)+_0x138bac(0x142,0x129)]();function _0x80fa56(_0x58f5f8,_0x9161f9){return _0x42fcb2(_0x58f5f8- -0x62f,_0x9161f9);}function _0x138bac(_0x4fd4e0,_0x4ffb50){return _0x42fcb2(_0x4ffb50- -0x3a4,_0x4fd4e0);}if(!_0x42c5d8)throw new Error(_0x80fa56(-0x135,-0x13a)+'push\x20불가');for(const _0x5b9890 of _0x1c58b4){const _0x1df8f2=this['db'][_0x138bac(0x117,0x117)](_0x5b9890);if(!_0x1df8f2)continue;const _0x375685=new LocalVectorClock(this[_0x80fa56(-0x13f,-0x123)],this['db']['getVectorC'+_0x138bac(0x139,0x12f)](_0x5b9890)??undefined);_0x375685['increment'](),await this[_0x138bac(0x129,0x12d)]['addTeamMem'+_0x80fa56(-0x17e,-0x189)](this['teamPath'],{'content':_0x1df8f2['content'],'category':_0x1df8f2[_0x138bac(0x151,0x147)],'tier':_0x1df8f2['tier'],'tags':_0x1df8f2[_0x138bac(0x13a,0x146)]}),this['db'][_0x80fa56(-0x17a,-0x15e)+_0x138bac(0xff,0x11a)](_0x5b9890,_0x375685[_0x138bac(0x11f,0x112)]()),this['db'][_0x80fa56(-0x16b,-0x170)+'tus'](_0x5b9890,null,_0x138bac(0x11a,0x11d)),this['db'][_0x80fa56(-0x14d,-0x16f)+_0x138bac(0x141,0x11c)]('push',_0x5b9890,_0x80fa56(-0x152,-0x133));}}async[_0x1e18be(0x42b,0x446)+'am'](){let _0x1c4daa=0x0;function _0x51c1b6(_0x13c531,_0x2dc2f1){return _0x42fcb2(_0x2dc2f1-0xb1,_0x13c531);}function _0x28ef7e(_0x208918,_0x50daf3){return _0x42fcb2(_0x208918-0x52,_0x50daf3);}let _0x4bbb91=0x0,_0x51ffbe=0x0;const _0x2570e6=0x3e8;let _0xa7924f=0x0;while(_0xa7924f<_0x2570e6){_0xa7924f++;const _0x4cff74=await this['client']['listTeamMe'+_0x28ef7e(0x543,0x55e)](this[_0x51c1b6(0x558,0x560)],{'limit':PAGE_SIZE,'offset':_0x51ffbe});if(_0x4cff74[_0x51c1b6(0x579,0x574)]===0x0)break;for(const _0x234427 of _0x4cff74){const _0x39496c=this['db'][_0x28ef7e(0x52c,0x51e)+_0x51c1b6(0x58f,0x57a)](_0x234427['id']);if(!_0x39496c){const _0x4ce91a=this['db']['createMemo'+'ry']({'content':_0x234427[_0x28ef7e(0x529,0x503)],'category':mapCategory(_0x234427[_0x51c1b6(0x587,0x59c)]),'tier':mapTier(_0x234427[_0x51c1b6(0x56b,0x589)]??_0x51c1b6(0x550,0x568)),'tags':_0x234427[_0x28ef7e(0x53c,0x53d)]??[],'qualityScore':_0x234427['quality_sc'+'ore']??undefined});_0x234427[_0x51c1b6(0x582,0x5a5)+'nt']&&_0x234427['access_cou'+'nt']>0x0&&this['db']['mergeAcces'+'sCount'](_0x4ce91a['id'],_0x234427[_0x28ef7e(0x546,0x553)+'nt']),_0x234427[_0x28ef7e(0x544,0x526)]&&_0x234427[_0x28ef7e(0x544,0x530)][_0x28ef7e(0x515,0x521)]>0x0&&this['db']['saveEmbedd'+'ing'](_0x4ce91a['id'],_0x234427[_0x28ef7e(0x544,0x521)]),this['db']['setSyncSta'+'tus'](_0x4ce91a['id'],_0x234427['id'],'synced'),this['db'][_0x28ef7e(0x534,0x516)+_0x51c1b6(0x55d,0x571)](_0x51c1b6(0x56c,0x592),_0x4ce91a['id'],_0x51c1b6(0x582,0x58e)),_0x1c4daa++;}else{if(_0x51c1b6(0x57e,0x57c)!==_0x51c1b6(0x572,0x57c))this['db'][_0x28ef7e(0x514,0x50e)+_0x28ef7e(0x52e,0x552)](_0xdb50f0['id'],_0xd8f4bf['embedding']);else{const _0x4b7918=this['db']['getVectorC'+_0x28ef7e(0x525,0x542)](_0x39496c['id'])??{},_0x14f7a8=new LocalVectorClock(this[_0x51c1b6(0x59a,0x5a1)],_0x4b7918),_0x55cc8d=_0x234427['vector_clo'+'ck']??{},_0x5e0149=_0x14f7a8[_0x28ef7e(0x53b,0x55c)](_0x55cc8d);if(_0x5e0149===_0x51c1b6(0x585,0x563))this['db'][_0x51c1b6(0x5a2,0x5aa)+'ry'](_0x39496c['id'],{'content':_0x234427[_0x51c1b6(0x56d,0x588)],'category':mapCategory(_0x234427[_0x28ef7e(0x53d,0x542)]),'tier':mapTier(_0x234427['tier']??_0x39496c[_0x51c1b6(0x578,0x589)]),'tags':_0x234427['tags']??_0x39496c[_0x51c1b6(0x57e,0x59b)],'qualityScore':_0x234427[_0x51c1b6(0x593,0x579)+'ore']??undefined}),_0x234427['access_cou'+'nt']!==undefined&&this['db']['mergeAcces'+_0x28ef7e(0x545,0x537)](_0x39496c['id'],_0x234427[_0x28ef7e(0x546,0x555)+'nt']),_0x234427[_0x28ef7e(0x544,0x56a)]&&_0x234427[_0x51c1b6(0x598,0x5a3)]['length']>0x0&&this['db']['saveEmbedd'+_0x51c1b6(0x58a,0x58d)](_0x39496c['id'],_0x234427['embedding']),_0x14f7a8[_0x51c1b6(0x596,0x576)](_0x55cc8d),this['db'][_0x51c1b6(0x54c,0x566)+_0x51c1b6(0x590,0x56f)](_0x39496c['id'],_0x14f7a8['toJSON']()),this['db'][_0x28ef7e(0x516,0x527)+_0x51c1b6(0x54a,0x561)](_0x39496c['id'],_0x234427['id'],_0x28ef7e(0x513,0x528)),this['db'][_0x51c1b6(0x57b,0x593)+_0x51c1b6(0x552,0x571)](_0x51c1b6(0x575,0x592),_0x39496c['id'],_0x51c1b6(0x57d,0x58e)),_0x1c4daa++;else{if(_0x5e0149==='concurrent'){const _0x370533=new Date(_0x234427['updated_at']),_0x4e39f2=new Date(_0x39496c['updatedAt']);_0x370533>_0x4e39f2&&(this['db'][_0x28ef7e(0x54b,0x52c)+'ry'](_0x39496c['id'],{'content':_0x234427[_0x51c1b6(0x592,0x588)],'category':mapCategory(_0x234427['category']),'tier':mapTier(_0x234427[_0x28ef7e(0x52a,0x525)]??_0x39496c[_0x28ef7e(0x52a,0x541)]),'tags':_0x234427[_0x51c1b6(0x596,0x59b)]??_0x39496c[_0x51c1b6(0x594,0x59b)],'qualityScore':_0x234427[_0x51c1b6(0x56f,0x579)+_0x28ef7e(0x547,0x551)]??undefined}),_0x234427[_0x28ef7e(0x544,0x52a)]&&_0x234427[_0x51c1b6(0x5b9,0x5a3)][_0x51c1b6(0x567,0x574)]>0x0&&this['db'][_0x28ef7e(0x514,0x511)+_0x51c1b6(0x579,0x58d)](_0x39496c['id'],_0x234427[_0x51c1b6(0x5a6,0x5a3)])),_0x234427['access_cou'+'nt']!==undefined&&this['db'][_0x51c1b6(0x587,0x58f)+_0x51c1b6(0x5a3,0x5a4)](_0x39496c['id'],_0x234427[_0x51c1b6(0x5b4,0x5a5)+'nt']),_0x14f7a8[_0x51c1b6(0x56a,0x576)](_0x55cc8d),this['db'][_0x51c1b6(0x566,0x566)+'Clock'](_0x39496c['id'],_0x14f7a8[_0x51c1b6(0x587,0x567)]()),this['db'][_0x28ef7e(0x516,0x535)+_0x51c1b6(0x56f,0x561)](_0x39496c['id'],_0x234427['id'],'synced'),this['db'][_0x51c1b6(0x597,0x593)+_0x51c1b6(0x56c,0x571)](_0x51c1b6(0x57a,0x56b),_0x39496c['id'],_0x51c1b6(0x596,0x58e),_0x28ef7e(0x51c,0x52c)+_0x28ef7e(0x51f,0x4fd)),_0x4bbb91++;}}}}}if(_0x4cff74[_0x28ef7e(0x515,0x515)]<PAGE_SIZE)break;_0x51ffbe+=PAGE_SIZE;}return{'pulled':_0x1c4daa,'conflicts':_0x4bbb91};}async[_0x42fcb2(0x4f8,0x4f1)+_0x42fcb2(0x4b0,0x494)](){const _0x5232a4=this['db'][_0x6c08c7(0x479,0x46e)]();function _0xaec36(_0x453f30,_0x56a497){return _0x42fcb2(_0x453f30- -0x2da,_0x56a497);}function _0x6c08c7(_0x407468,_0x2e213d){return _0x42fcb2(_0x2e213d- -0x7e,_0x407468);}const _0x401bd6=this['db'][_0xaec36(0x1da,0x1bd)+'SyncMemori'+'es']()[_0xaec36(0x1e9,0x1db)],_0x486ade=this['db']['getLastSyn'+_0xaec36(0x201,0x20d)]();return{'teamPath':this[_0xaec36(0x1d5,0x1c4)],'nodeId':this[_0xaec36(0x216,0x20a)],'localMemoryCount':_0x5232a4[_0x6c08c7(0x420,0x43f)+_0xaec36(0x209,0x206)],'pendingSync':_0x401bd6,'lastSyncedAt':_0x486ade??undefined};}}