@myagentroam/node 0.9.37 → 0.9.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connector.js +1 -1
- package/dist/runner/mar-agent/generated-images.js +1 -1
- package/dist/runner/mar-agent/hosted-conversation-runtime.js +1 -1
- package/dist/service/bubblewrap-sandbox-executor.js +1 -1
- package/dist/service/hosted-conversation-node-service.js +1 -1
- package/dist/service/run-attachment-service.js +1 -1
- package/dist/service/run-workbench-service.js +1 -1
- package/dist/service/workspace-change-service.js +1 -1
- package/dist/service/workspace-file-service.js +1 -1
- package/dist/service/workspace-workbench-service.js +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0x241074=_0x3fd3;(function(_0xd89b2d,_0x563bc5){const _0x1a2552=_0x3fd3,_0x24309f=_0xd89b2d();while(!![]){try{const _0x50e2bd=-parseInt(_0x1a2552(0x235))/(0x1766+-0x5b6+-0x11af)*(parseInt(_0x1a2552(0x263))/(-0x22a0+-0x1e1f+-0x1*-0x40c1))+-parseInt(_0x1a2552(0x2f2))/(-0xa*0x35b+0x25ae+0x41d*-0x1)+-parseInt(_0x1a2552(0x22b))/(0x1*0x1d89+0x14e4+-0x3269)+-parseInt(_0x1a2552(0x26a))/(0x1f72+-0x13d*-0x2+-0x21*0x107)*(parseInt(_0x1a2552(0x261))/(0x19e8*-0x1+0x1*-0xfba+0x29a8))+-parseInt(_0x1a2552(0x2b1))/(0x249b*0x1+0x1ba+-0x264e)*(parseInt(_0x1a2552(0x2fe))/(0x2e6+0xf9*0x13+-0x1559*0x1))+-parseInt(_0x1a2552(0x34e))/(0xd07+-0x1cd6+-0x1a*-0x9c)+parseInt(_0x1a2552(0x227))/(-0x2608+-0x86*-0x1f+-0x15d8*-0x1);if(_0x50e2bd===_0x563bc5)break;else _0x24309f['push'](_0x24309f['shift']());}catch(_0x33d083){_0x24309f['push'](_0x24309f['shift']());}}}(_0x22ba,0x4e0a9+0x37f60+-0x58b09*-0x1));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,open,readFile,readlink,readdir,realpath,rename,rm,utimes}from'node:fs/promises';import{isAbsolute,join,relative,resolve,sep}from'node:path';import{conversationTemplateDraftSchema,conversationTemplateSummarySchema,hostedConversationConfigUpdateInputSchema,hostedConversationCreateInputSchema,hostedConversationDeleteResultSchema,hostedConversationFileDeleteInputSchema,hostedConversationFileDeleteResultSchema,hostedConversationFileReadInputSchema,hostedConversationFileReadResultSchema,hostedConversationFilesSchema,hostedConversationIdInputSchema,hostedConversationListInputSchema,hostedConversationListPageSchema,hostedConversationMessageInputSchema,hostedConversationMetadataUpdateInputSchema,hostedConversationSnapshotSchema,hostedConversationSummarySchema,hostedConversationUnwatchInputSchema,hostedConversationUploadChunkInputSchema,hostedConversationUploadControlInputSchema,hostedConversationUploadCreateInputSchema,hostedConversationUploadPreflightInputSchema,hostedConversationUploadPreflightResultSchema,hostedConversationUploadSchema,hostedConversationWatchInputSchema,marAgentRuntimeModelConfigurationSchema,mcpInstallationConfigurationSchema,mcpRuntimeDescriptorSchema}from'@myagentroam/protocol';import{sessionTitleFromFirstMessage}from'../util/node-operation-parsers.js';import{safeErrorCode}from'../util/safe-error.js';import{SessionWatchSlotCoordinator}from'./session-watch-slot-coordinator.js';const HOST_POLICY_VERSION=-0x1*0x59f+-0x26f6+0x2c96,MAX_FILE_READ_BYTES=(0x4*-0x863+0x1*-0x164e+0x39da)*(-0x4bf*0x3+-0x1ed2+-0x13*-0x295),WATCH_TTL_MS=0x4*-0x2ef+-0x8a59+-0x12b*-0x117,RUNTIME_LINK_ROOTS=[_0x241074(0x33a),_0x241074(0x24d),_0x241074(0x253),_0x241074(0x35a),_0x241074(0x22e)],RESERVED_SANDBOX_ROOTS=[_0x241074(0x31e),_0x241074(0x248),_0x241074(0x2d2),_0x241074(0x33a),_0x241074(0x24d),_0x241074(0x253),_0x241074(0x35a),_0x241074(0x22e),_0x241074(0x318),_0x241074(0x309),_0x241074(0x24a),_0x241074(0x330)];export class HostedConversationNodeService{[_0x241074(0x239)];[_0x241074(0x34c)];['id'];[_0x241074(0x24f)]=new Map();[_0x241074(0x256)]=new Map();[_0x241074(0x2b5)]=new Map();[_0x241074(0x362)]=new Map();[_0x241074(0x29a)]=new Map();[_0x241074(0x33d)]=new Set();[_0x241074(0x2b3)]=new Map();[_0x241074(0x380)]=new Map();[_0x241074(0x374)]=new Set();[_0x241074(0x311)]=new Map();[_0x241074(0x233)]=new Set();[_0x241074(0x23e)];[_0x241074(0x345)]=![];[_0x241074(0x2ff)]=0x1*-0x1916+-0x1*0x1a69+0x337f;[_0x241074(0x21c)]=-0x957+-0x1785+0x20dc;constructor(_0x45f3a0){const _0xff20ac=_0x241074;this[_0xff20ac(0x239)]=_0x45f3a0,this[_0xff20ac(0x34c)]=_0x45f3a0[_0xff20ac(0x34c)]??Date[_0xff20ac(0x34c)],this['id']=_0x45f3a0['id']??randomUUID,this[_0xff20ac(0x23e)]=_0x45f3a0[_0xff20ac(0x23e)]??new SessionWatchSlotCoordinator();}[_0x241074(0x30a)](){const _0x1a382b=_0x241074;return{'conversation.hosted.list':_0x16d8d4=>this[_0x1a382b(0x32c)](_0x16d8d4),'conversation.hosted.create':_0x5ea73a=>this[_0x1a382b(0x232)](_0x5ea73a),'conversation.hosted.get':_0x5639aa=>this[_0x1a382b(0x364)](_0x5639aa),'conversation.hosted.watch':_0x1ff0de=>this[_0x1a382b(0x203)](_0x1ff0de),'conversation.hosted.unwatch':_0xce3663=>this[_0x1a382b(0x275)](_0xce3663),'conversation.hosted.message':_0x8f6ab7=>this[_0x1a382b(0x39f)](_0x8f6ab7),'conversation.hosted.interrupt':_0x450388=>this[_0x1a382b(0x2ae)](_0x450388),'conversation.hosted.config.update':_0x3d2908=>this[_0x1a382b(0x2e6)](_0x3d2908),'conversation.hosted.metadata.update':_0x1c941d=>this[_0x1a382b(0x21e)](_0x1c941d),'conversation.hosted.files.list':_0x55fee0=>this[_0x1a382b(0x250)](_0x55fee0),'conversation.hosted.file.read':_0x3eba40=>this[_0x1a382b(0x369)](_0x3eba40),'conversation.hosted.file.delete':_0x40fc2f=>this[_0x1a382b(0x1fe)](_0x40fc2f),'conversation.hosted.files.upload.preflight':_0x4c2320=>this[_0x1a382b(0x319)](_0x4c2320),'conversation.hosted.files.upload.create':_0x19d7b7=>this[_0x1a382b(0x247)](_0x19d7b7),'conversation.hosted.files.upload.chunk':_0x29d1f6=>this[_0x1a382b(0x25d)](_0x29d1f6),'conversation.hosted.files.upload.status':_0x29a1e0=>this[_0x1a382b(0x368)](_0x29a1e0),'conversation.hosted.files.upload.complete':_0x161c17=>this[_0x1a382b(0x2bd)](_0x161c17),'conversation.hosted.files.upload.cancel':_0x4a79c8=>this[_0x1a382b(0x31b)](_0x4a79c8),'conversation.hosted.delete':_0x9e513c=>this[_0x1a382b(0x38c)](_0x9e513c)};}[_0x241074(0x334)](){const _0x588bcb=_0x241074;if(this[_0x588bcb(0x345)]||this[_0x588bcb(0x256)][_0x588bcb(0x393)]>0x104+-0x6bb*0x3+0x132d*0x1||this[_0x588bcb(0x2b5)][_0x588bcb(0x393)]>-0x7*-0x3be+0x1d6+-0x1c08||this[_0x588bcb(0x362)][_0x588bcb(0x393)]>0xd*-0x135+-0x578+-0x1*-0x1529)return undefined;return this[_0x588bcb(0x345)]=!![],()=>{const _0x20e5a4=_0x588bcb;this[_0x20e5a4(0x345)]=![];};}[_0x241074(0x32c)](_0x2eb05a){const _0x13a232=_0x241074,_0x44938c=hostedRequest(_0x2eb05a),_0x2a7dfe=hostedConversationListInputSchema[_0x13a232(0x36a)](_0x44938c[_0x13a232(0x30e)]),_0x21d8f6=this[_0x13a232(0x239)][_0x13a232(0x286)][_0x13a232(0x300)]({'userId':_0x44938c[_0x13a232(0x324)],'limit':_0x2a7dfe[_0x13a232(0x312)],..._0x2a7dfe[_0x13a232(0x331)]===undefined?{}:{'cursor':_0x2a7dfe[_0x13a232(0x331)]}});return hostedConversationListPageSchema[_0x13a232(0x36a)]({..._0x21d8f6,'items':_0x21d8f6[_0x13a232(0x27b)][_0x13a232(0x2f7)](_0x6d2457=>({..._0x6d2457,'activity':this[_0x13a232(0x323)](_0x6d2457['id'])}))});}[_0x241074(0x232)](_0x3bcf3c){const _0x565a05=_0x241074;if(this[_0x565a05(0x345)])return Promise[_0x565a05(0x1f8)](new Error(_0x565a05(0x381)));const _0x27af45=hostedRequest(_0x3bcf3c),_0x21c04b=hostedConversationCreateInputSchema[_0x565a05(0x36a)](_0x27af45[_0x565a05(0x30e)]),_0x3973c4=conversationTemplateSummarySchema[_0x565a05(0x36a)](_0x27af45[_0x565a05(0x2cd)]),_0x37d28c=runtimeModels(_0x27af45[_0x565a05(0x2f4)]);if(_0x3973c4['id']!==_0x21c04b[_0x565a05(0x38b)]||_0x3973c4[_0x565a05(0x36d)]!==this[_0x565a05(0x239)][_0x565a05(0x36d)]()||!_0x3973c4[_0x565a05(0x2a0)]||_0x3973c4[_0x565a05(0x23c)]!==_0x565a05(0x2fd)||_0x3973c4[_0x565a05(0x21d)]===null)throw new Error(_0x565a05(0x316));const _0x191d9d=_0x27af45[_0x565a05(0x324)]+'\x00'+_0x21c04b[_0x565a05(0x36e)],_0x3c6362=this[_0x565a05(0x24f)][_0x565a05(0x364)](_0x191d9d);if(_0x3c6362!==undefined)return _0x3c6362;const _0x5349d1=this[_0x565a05(0x239)][_0x565a05(0x286)][_0x565a05(0x372)](_0x27af45[_0x565a05(0x324)],_0x21c04b[_0x565a05(0x36e)]);if(_0x5349d1!==undefined)return this[_0x565a05(0x25c)](_0x27af45[_0x565a05(0x324)],_0x5349d1['id'],_0x37d28c);const _0x2b6d20=this[_0x565a05(0x35c)](_0x27af45[_0x565a05(0x324)],_0x21c04b[_0x565a05(0x36e)],_0x3973c4,_0x37d28c,_0x27af45[_0x565a05(0x31d)]);return this[_0x565a05(0x24f)][_0x565a05(0x38e)](_0x191d9d,_0x2b6d20),void _0x2b6d20[_0x565a05(0x2a2)](()=>this[_0x565a05(0x24f)][_0x565a05(0x38c)](_0x191d9d))[_0x565a05(0x373)](()=>undefined),_0x2b6d20;}async[_0x241074(0x35c)](_0x258602,_0x5caac5,_0x5b325b,_0xb6868c,_0xc3ecd0){const _0x5d0997=_0x241074;await this[_0x5d0997(0x239)][_0x5d0997(0x2e2)]?.();const _0x3d22c2=await this[_0x5d0997(0x231)](_0x5b325b[_0x5d0997(0x21d)],_0x5b325b['id'],!![]),_0x5024ce=selectModel(_0x3d22c2,_0xb6868c,_0x3d22c2[_0x5d0997(0x332)][_0x5d0997(0x3a1)]),_0x5ce241=this['id'](),_0x38bfea=await this[_0x5d0997(0x239)][_0x5d0997(0x286)][_0x5d0997(0x370)](_0x258602,_0x5ce241),_0x111b8d=this[_0x5d0997(0x399)](_0x38bfea[_0x5d0997(0x32e)],_0x3d22c2),_0x5842c1=this[_0x5d0997(0x284)](_0x38bfea[_0x5d0997(0x32e)],_0x3d22c2);let _0xbb0f77;try{const _0x5deda5=await this[_0x5d0997(0x239)][_0x5d0997(0x266)][_0x5d0997(0x27f)]({'conversationId':_0x5ce241,'homeDirectory':_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2dc)],'workspaceDirectory':_0x3d22c2[_0x5d0997(0x397)],'systemInstruction':systemInstruction(_0x3d22c2),'defaultModelId':_0x5024ce['id'],'models':networkModels(allowedModels(_0x3d22c2,_0xb6868c),_0x3d22c2[_0x5d0997(0x270)][_0x5d0997(0x2e8)]),..._0xc3ecd0===undefined?{}:{'runtimeScopeId':_0xc3ecd0},'pathMounts':_0x111b8d,'processExecutor':_0x5842c1});_0xbb0f77=_0x5deda5[_0x5d0997(0x265)];const _0x1e796b=this[_0x5d0997(0x34c)](),_0x4adff5={'id':_0x5ce241,'nodeId':this[_0x5d0997(0x239)][_0x5d0997(0x36d)](),'sessionId':_0xbb0f77,'templateId':_0x5b325b['id'],'templateName':_0x5b325b[_0x5d0997(0x2e3)],'activeVersionId':_0x3d22c2['id'],'title':_0x5b325b[_0x5d0997(0x2e3)],'titleSource':_0x5d0997(0x314),'pinnedAt':null,'status':_0x5d0997(0x2fd),'modelId':_0x5024ce['id'],'createdAt':_0x1e796b,'updatedAt':_0x1e796b,'lastActivityAt':_0x1e796b,'userStorageKey':_0x38bfea[_0x5d0997(0x356)],'conversationStorageKey':_0x38bfea[_0x5d0997(0x2f9)],'clientRequestId':_0x5caac5,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0x3d22c2[_0x5d0997(0x270)][_0x5d0997(0x296)][_0x5d0997(0x20e)]}},_0x408257=await this[_0x5d0997(0x239)][_0x5d0997(0x286)][_0x5d0997(0x35c)](_0x4adff5);return _0x408257['id']!==_0x5ce241&&(await this[_0x5d0997(0x239)][_0x5d0997(0x266)][_0x5d0997(0x245)]({'conversationId':_0x5ce241,'sessionId':_0xbb0f77,'homeDirectory':_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2dc)]})[_0x5d0997(0x373)](()=>undefined),await rm(_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2ec)],{'recursive':!![],'force':!![]})),this[_0x5d0997(0x25c)](_0x258602,_0x408257['id'],_0xb6868c);}catch(_0x1042f3){if(_0xbb0f77!==undefined)await this[_0x5d0997(0x239)][_0x5d0997(0x266)][_0x5d0997(0x245)]({'conversationId':_0x5ce241,'sessionId':_0xbb0f77,'homeDirectory':_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2dc)]})[_0x5d0997(0x373)](()=>undefined);await rm(_0x38bfea[_0x5d0997(0x32e)][_0x5d0997(0x2ec)],{'recursive':!![],'force':!![]})[_0x5d0997(0x373)](()=>undefined);throw _0x1042f3;}}async[_0x241074(0x364)](_0x2091b9){const _0x325d2b=_0x241074,_0xc4df7c=hostedRequest(_0x2091b9),_0x1d4483=hostedConversationIdInputSchema[_0x325d2b(0x36a)](_0xc4df7c[_0x325d2b(0x30e)]);return this[_0x325d2b(0x25c)](_0xc4df7c[_0x325d2b(0x324)],_0x1d4483[_0x325d2b(0x351)],runtimeModels(_0xc4df7c[_0x325d2b(0x2f4)]),_0xc4df7c[_0x325d2b(0x2b6)]);}async[_0x241074(0x25c)](_0x256219,_0x57c267,_0x20d313,_0x3bab81=![]){const _0xcb5452=_0x241074;let _0x58daf6=this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x2c9)](_0x256219,_0x57c267);if(_0x3bab81)_0x58daf6=await this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x387)](_0x256219,_0x57c267,this[_0xcb5452(0x34c)]());const _0x540f94=await this[_0xcb5452(0x231)](_0x58daf6[_0xcb5452(0x347)],_0x58daf6[_0xcb5452(0x38b)]),_0x34acec=networkModels(allowedModels(_0x540f94,_0x20d313),_0x540f94[_0xcb5452(0x270)][_0xcb5452(0x2e8)]),_0x4151a4=this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x2be)](_0x256219,_0x58daf6['id']),_0x54eb42=await this[_0xcb5452(0x239)][_0xcb5452(0x266)][_0xcb5452(0x2d6)]({'conversationId':_0x58daf6['id'],'sessionId':_0x58daf6[_0xcb5452(0x265)],'homeDirectory':_0x4151a4[_0xcb5452(0x2dc)],'modelId':_0x58daf6[_0xcb5452(0x2d1)]});return hostedConversationSnapshotSchema[_0xcb5452(0x36a)]({'conversation':this[_0xcb5452(0x326)](_0x58daf6),'template':templateSummary(_0x58daf6,_0x540f94[_0xcb5452(0x270)]),'run':this[_0xcb5452(0x2b5)][_0xcb5452(0x364)](_0x58daf6['id'])?.[_0xcb5452(0x201)]??null,'turns':_0x54eb42,'files':this[_0xcb5452(0x239)][_0xcb5452(0x286)][_0xcb5452(0x250)](_0x256219,_0x58daf6['id']),'models':_0x34acec[_0xcb5452(0x2f7)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0x241074(0x203)](_0x17a893){const _0x47ddb4=_0x241074,_0xe1c744=hostedRequest(_0x17a893),_0x219248=hostedConversationWatchInputSchema[_0x47ddb4(0x36a)](_0xe1c744[_0x47ddb4(0x30e)]),_0x2fa171=this[_0x47ddb4(0x239)][_0x47ddb4(0x286)][_0x47ddb4(0x2c9)](_0xe1c744[_0x47ddb4(0x324)],_0x219248[_0x47ddb4(0x351)]);if(this[_0x47ddb4(0x233)][_0x47ddb4(0x382)](_0x2fa171['id']))throw new Error(_0x47ddb4(0x365));const _0x2913f6=requireWatchSessionHash(_0xe1c744[_0x47ddb4(0x336)]),_0x1dfb50=watchOwnerKey(_0x2913f6,_0x219248[_0x47ddb4(0x35d)]);if(_0x219248[_0x47ddb4(0x22a)]===_0x47ddb4(0x32d)){const _0x28f44c=this[_0x47ddb4(0x311)][_0x47ddb4(0x364)](_0x1dfb50);if(_0x28f44c===undefined||!this[_0x47ddb4(0x23e)][_0x47ddb4(0x2a5)](_0x1dfb50,_0x28f44c[_0x47ddb4(0x218)])||_0x28f44c[_0x47ddb4(0x2d4)]!==_0x219248[_0x47ddb4(0x2d4)]||_0x28f44c[_0x47ddb4(0x351)]!==_0x219248[_0x47ddb4(0x351)]||_0x28f44c[_0x47ddb4(0x324)]!==_0xe1c744[_0x47ddb4(0x324)]||_0x28f44c[_0x47ddb4(0x277)]<=Date[_0x47ddb4(0x34c)]()){this[_0x47ddb4(0x36b)](_0x1dfb50);throw new Error(_0x47ddb4(0x2e1));}return _0x28f44c[_0x47ddb4(0x277)]=Date[_0x47ddb4(0x34c)]()+WATCH_TTL_MS,clearTimeout(_0x28f44c[_0x47ddb4(0x33e)]),_0x28f44c[_0x47ddb4(0x33e)]=this[_0x47ddb4(0x346)](_0x1dfb50),this[_0x47ddb4(0x379)](_0x28f44c);}const _0x634604=runtimeModels(_0xe1c744[_0x47ddb4(0x2f4)]),_0x315b8e=this[_0x47ddb4(0x311)][_0x47ddb4(0x364)](_0x1dfb50);if(_0x315b8e!==undefined&&this[_0x47ddb4(0x23e)][_0x47ddb4(0x2a5)](_0x1dfb50,_0x315b8e[_0x47ddb4(0x218)])&&_0x315b8e[_0x47ddb4(0x2d4)]===_0x219248[_0x47ddb4(0x2d4)]&&_0x315b8e[_0x47ddb4(0x351)]===_0x219248[_0x47ddb4(0x351)]&&_0x315b8e[_0x47ddb4(0x324)]===_0xe1c744[_0x47ddb4(0x324)]&&_0x315b8e[_0x47ddb4(0x277)]>Date[_0x47ddb4(0x34c)]())return _0x315b8e[_0x47ddb4(0x277)]=Date[_0x47ddb4(0x34c)]()+WATCH_TTL_MS,clearTimeout(_0x315b8e[_0x47ddb4(0x33e)]),_0x315b8e[_0x47ddb4(0x33e)]=this[_0x47ddb4(0x346)](_0x1dfb50),this[_0x47ddb4(0x379)](_0x315b8e);this[_0x47ddb4(0x36b)](_0x1dfb50);const _0x5338e7=this[_0x47ddb4(0x23e)][_0x47ddb4(0x279)](_0x1dfb50,_0x47ddb4(0x355),()=>this[_0x47ddb4(0x36b)](_0x1dfb50)),_0x23d4c5={'ownerKey':_0x1dfb50,'slotToken':_0x5338e7,'sessionHash':_0x2913f6,'workbenchConnectionId':_0x219248[_0x47ddb4(0x35d)],'watchId':_0x219248[_0x47ddb4(0x2d4)],'conversationId':_0x219248[_0x47ddb4(0x351)],'templateId':_0x2fa171[_0x47ddb4(0x38b)],'userId':_0xe1c744[_0x47ddb4(0x324)],'models':_0x634604,'nodeGeneration':this[_0x47ddb4(0x239)][_0x47ddb4(0x1fc)]?.()??_0x47ddb4(0x339),'pendingEvents':[],'expiresAt':Date[_0x47ddb4(0x34c)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x23d4c5[_0x47ddb4(0x33e)]=this[_0x47ddb4(0x346)](_0x1dfb50),this[_0x47ddb4(0x311)][_0x47ddb4(0x38e)](_0x1dfb50,_0x23d4c5),void this[_0x47ddb4(0x26f)](_0x23d4c5),this[_0x47ddb4(0x379)](_0x23d4c5);}[_0x241074(0x275)](_0x2ffadd){const _0x4f9420=_0x241074,_0x3e63ac=hostedRequest(_0x2ffadd),_0x3bac8d=hostedConversationUnwatchInputSchema[_0x4f9420(0x36a)](_0x3e63ac[_0x4f9420(0x30e)]);this[_0x4f9420(0x239)][_0x4f9420(0x286)][_0x4f9420(0x2c9)](_0x3e63ac[_0x4f9420(0x324)],_0x3bac8d[_0x4f9420(0x351)]);const _0x129360=watchOwnerKey(requireWatchSessionHash(_0x3e63ac[_0x4f9420(0x336)]),_0x3bac8d[_0x4f9420(0x35d)]),_0x220d18=this[_0x4f9420(0x311)][_0x4f9420(0x364)](_0x129360);if(_0x220d18?.[_0x4f9420(0x2d4)]===_0x3bac8d[_0x4f9420(0x2d4)]&&_0x220d18[_0x4f9420(0x351)]===_0x3bac8d[_0x4f9420(0x351)]&&_0x220d18[_0x4f9420(0x324)]===_0x3e63ac[_0x4f9420(0x324)])this[_0x4f9420(0x36b)](_0x129360);return{'unwatched':!![]};}[_0x241074(0x208)](_0x39a30e,_0x5bde9f){const _0x326813=_0x241074;return this[_0x326813(0x206)](_0x39a30e,{'conversationId':_0x39a30e,'kind':_0x326813(0x266),'runtimeEvent':_0x5bde9f});}[_0x241074(0x396)](_0x3771d1){const _0x30afbb=_0x241074;return this[_0x30afbb(0x233)][_0x30afbb(0x382)](_0x3771d1)||this[_0x30afbb(0x2b5)][_0x30afbb(0x382)](_0x3771d1)||this[_0x30afbb(0x362)][_0x30afbb(0x382)](_0x3771d1)||[...this[_0x30afbb(0x311)][_0x30afbb(0x2cf)]()][_0x30afbb(0x343)](_0x112147=>_0x112147[_0x30afbb(0x351)]===_0x3771d1)||[...this[_0x30afbb(0x2b3)][_0x30afbb(0x2cf)]()][_0x30afbb(0x343)](_0x32b5fc=>_0x32b5fc[_0x30afbb(0x351)]===_0x3771d1&&_0x32b5fc[_0x30afbb(0x23c)]===_0x30afbb(0x24c))||[...this[_0x30afbb(0x256)][_0x30afbb(0x29b)]()][_0x30afbb(0x343)](_0x1a5565=>_0x1a5565[_0x30afbb(0x28f)](_0x3771d1+'\x00'));}[_0x241074(0x22f)](_0x17414c){const _0x443d5c=_0x241074;if(this[_0x443d5c(0x396)](_0x17414c))return undefined;return this[_0x443d5c(0x233)][_0x443d5c(0x333)](_0x17414c),()=>{const _0xdb450=_0x443d5c;this[_0xdb450(0x233)][_0xdb450(0x38c)](_0x17414c);};}async[_0x241074(0x30f)](_0x272ea4){const _0x50b5be=_0x241074,_0x323628=this[_0x50b5be(0x239)][_0x50b5be(0x286)][_0x50b5be(0x2ea)](_0x272ea4);await this[_0x50b5be(0x239)][_0x50b5be(0x266)][_0x50b5be(0x245)]({'conversationId':_0x272ea4['id'],'sessionId':_0x272ea4[_0x50b5be(0x265)],'homeDirectory':_0x323628[_0x50b5be(0x2dc)]})[_0x50b5be(0x373)](()=>undefined);}[_0x241074(0x243)](){const _0x109186=_0x241074;for(const [_0x565e46,_0x3ae693]of this[_0x109186(0x2b5)]){const _0x40524a=runInterruptionKey(_0x565e46,_0x3ae693[_0x109186(0x201)]['id']);this[_0x109186(0x33d)][_0x109186(0x333)](_0x40524a);if(!_0x3ae693[_0x109186(0x353)]())this[_0x109186(0x33d)][_0x109186(0x38c)](_0x40524a);}for(const _0x5a9a3b of[...this[_0x109186(0x311)][_0x109186(0x29b)]()])this[_0x109186(0x36b)](_0x5a9a3b);}[_0x241074(0x39f)](_0x2ac759){const _0x833956=_0x241074;if(this[_0x833956(0x345)])return Promise[_0x833956(0x1f8)](new Error(_0x833956(0x381)));const _0x3ec4c9=hostedRequest(_0x2ac759),_0x355e3b=hostedConversationMessageInputSchema[_0x833956(0x36a)](_0x3ec4c9[_0x833956(0x30e)]),_0x25f3b4=_0x355e3b[_0x833956(0x351)]+'\x00'+_0x355e3b[_0x833956(0x344)],_0x3fb563=this[_0x833956(0x256)][_0x833956(0x364)](_0x25f3b4);if(_0x3fb563!==undefined)return _0x3fb563;const _0x463b49=this[_0x833956(0x239)][_0x833956(0x286)][_0x833956(0x251)](_0x3ec4c9[_0x833956(0x324)],_0x355e3b[_0x833956(0x351)],_0x355e3b[_0x833956(0x344)]);if(_0x463b49!==undefined){const _0x7f9ed4=this[_0x833956(0x239)][_0x833956(0x286)][_0x833956(0x2c9)](_0x3ec4c9[_0x833956(0x324)],_0x355e3b[_0x833956(0x351)]);return Promise[_0x833956(0x2bb)]({'conversation':this[_0x833956(0x326)](_0x7f9ed4),'run':runFromMessage(_0x463b49)});}if([...this[_0x833956(0x256)][_0x833956(0x29b)]()][_0x833956(0x343)](_0x1f131a=>_0x1f131a[_0x833956(0x28f)](_0x355e3b[_0x833956(0x351)]+'\x00')))return Promise[_0x833956(0x1f8)](new Error(_0x833956(0x2d3)));const _0x263748=this[_0x833956(0x272)](_0x3ec4c9,_0x355e3b);return this[_0x833956(0x256)][_0x833956(0x38e)](_0x25f3b4,_0x263748),void _0x263748[_0x833956(0x2a2)](()=>this[_0x833956(0x256)][_0x833956(0x38c)](_0x25f3b4))[_0x833956(0x373)](()=>undefined),_0x263748;}async[_0x241074(0x272)](_0x54c95e,_0x558e78){const _0x2ac5d8=_0x241074;let _0x529447=this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x2c9)](_0x54c95e[_0x2ac5d8(0x324)],_0x558e78[_0x2ac5d8(0x351)]);if(this[_0x2ac5d8(0x233)][_0x2ac5d8(0x382)](_0x529447['id']))throw new Error(_0x2ac5d8(0x365));if(_0x529447[_0x2ac5d8(0x23c)]!==_0x2ac5d8(0x2fd))throw new Error(_0x2ac5d8(0x365));if(this[_0x2ac5d8(0x2b5)][_0x2ac5d8(0x382)](_0x529447['id']))throw new Error(_0x2ac5d8(0x2d3));const _0xcd21f3=sessionTitleFromFirstMessage(_0x558e78[_0x2ac5d8(0x2c4)]),_0x1ec4ea=_0xcd21f3[_0x2ac5d8(0x315)]>0xaed+-0x43+-0xaaa&&!this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x2c7)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id']),_0x4cc58c=runtimeModels(_0x54c95e[_0x2ac5d8(0x2f4)]),_0x4c27fd=this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x2be)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id']);let _0x3c14bd,_0x131e95,_0x1f7264,_0xfbfb8c;const _0x46ee90=_0x529447[_0x2ac5d8(0x2b6)]?undefined:this[_0x2ac5d8(0x29e)](_0x529447[_0x2ac5d8(0x38b)]);if(_0x46ee90!==undefined&&_0x46ee90!==_0x529447[_0x2ac5d8(0x347)]){const _0x351f28=_0x529447[_0x2ac5d8(0x347)],_0x240538=_0x46ee90;try{_0x3c14bd=await this[_0x2ac5d8(0x231)](_0x240538,_0x529447[_0x2ac5d8(0x38b)],!![]),_0x131e95=selectModel(_0x3c14bd,_0x4cc58c,_0x558e78[_0x2ac5d8(0x2d1)]??_0x3c14bd[_0x2ac5d8(0x332)][_0x2ac5d8(0x3a1)]),_0x1f7264=resolveMcpServers(_0x3c14bd,this[_0x2ac5d8(0x239)][_0x2ac5d8(0x254)]??process.env),this[_0x2ac5d8(0x399)](_0x4c27fd,_0x3c14bd),this[_0x2ac5d8(0x284)](_0x4c27fd,_0x3c14bd),_0xfbfb8c={'previousVersionId':_0x351f28,'targetVersionId':_0x240538};}catch(_0x11f9bc){this[_0x2ac5d8(0x260)](_0x529447,_0x351f28,_0x240538,_0x11f9bc);throw new Error(_0x2ac5d8(0x1f9));}}else _0x3c14bd=await this[_0x2ac5d8(0x231)](_0x529447[_0x2ac5d8(0x347)],_0x529447[_0x2ac5d8(0x38b)],!![]),_0x131e95=selectModel(_0x3c14bd,_0x4cc58c,_0x558e78[_0x2ac5d8(0x2d1)]??_0x529447[_0x2ac5d8(0x2d1)]);const _0x44887a=await Promise[_0x2ac5d8(0x32b)](_0x558e78[_0x2ac5d8(0x388)][_0x2ac5d8(0x2f7)](_0x763e65=>this[_0x2ac5d8(0x225)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id'],_0x763e65))),_0x518e77=attachmentPrompt(_0x558e78[_0x2ac5d8(0x2c4)],_0x44887a),_0x4847ce=join(_0x4c27fd[_0x2ac5d8(0x252)],_0x2ac5d8(0x322)+randomUUID());await mkdir(_0x4847ce,{'mode':0x1c0}),this[_0x2ac5d8(0x1f5)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447,_0x2ac5d8(0x34a),this[_0x2ac5d8(0x34c)]());const _0x50efa9=[];let _0x4b0615=![];const _0x40777b=await this[_0x2ac5d8(0x239)][_0x2ac5d8(0x266)][_0x2ac5d8(0x299)]({'conversationId':_0x529447['id'],'sessionId':_0x529447[_0x2ac5d8(0x265)],'clientMessageId':_0x558e78[_0x2ac5d8(0x344)],'userPrompt':_0x558e78[_0x2ac5d8(0x2c4)],'prompt':_0x518e77,'attachmentIds':_0x558e78[_0x2ac5d8(0x388)],'access':_0x2ac5d8(0x32f),'modelId':_0x131e95['id'],'models':networkModels(allowedModels(_0x3c14bd,_0x4cc58c),_0x3c14bd[_0x2ac5d8(0x270)][_0x2ac5d8(0x2e8)]),..._0x54c95e[_0x2ac5d8(0x31d)]===undefined?{}:{'runtimeScopeId':_0x54c95e[_0x2ac5d8(0x31d)]},'systemInstruction':systemInstruction(_0x3c14bd),'homeDirectory':_0x4c27fd[_0x2ac5d8(0x2dc)],'workspaceDirectory':_0x3c14bd[_0x2ac5d8(0x397)],'temporaryDirectory':_0x4847ce,'pathMounts':this[_0x2ac5d8(0x399)](_0x4c27fd,_0x3c14bd),'processExecutor':this[_0x2ac5d8(0x284)](_0x4c27fd,_0x3c14bd,_0x4847ce),'mcpServers':_0x1f7264??resolveMcpServers(_0x3c14bd,this[_0x2ac5d8(0x239)][_0x2ac5d8(0x254)]??process.env),'webAccess':_0x3c14bd[_0x2ac5d8(0x270)][_0x2ac5d8(0x2e8)]!==_0x2ac5d8(0x34f),'onEvent':_0x515810=>{const _0x325bd1=_0x2ac5d8;if(_0x4b0615)this[_0x325bd1(0x208)](_0x529447['id'],_0x515810);else _0x50efa9[_0x325bd1(0x281)](_0x515810);}})[_0x2ac5d8(0x373)](async _0x2db936=>{const _0x554a8d=_0x2ac5d8;this[_0x554a8d(0x1f5)](_0x54c95e[_0x554a8d(0x324)],_0x529447,_0x554a8d(0x28e),this[_0x554a8d(0x34c)]()),await rm(_0x4847ce,{'recursive':!![],'force':!![]})[_0x554a8d(0x373)](()=>undefined);if(_0xfbfb8c!==undefined){this[_0x554a8d(0x260)](_0x529447,_0xfbfb8c[_0x554a8d(0x395)],_0xfbfb8c[_0x554a8d(0x38f)],_0x2db936);throw new Error(_0x554a8d(0x1f9));}throw _0x2db936;}),_0x359f51=_0x40777b[_0x2ac5d8(0x201)][_0x2ac5d8(0x305)];let _0x3870de=![],_0x4db001;try{this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x37f)]({'conversationId':_0x529447['id'],'clientMessageId':_0x558e78[_0x2ac5d8(0x344)],'runId':_0x40777b[_0x2ac5d8(0x201)]['id'],'userTextPresent':_0xcd21f3[_0x2ac5d8(0x315)]>-0x85d*-0x1+-0x1052+0x7f5,'status':_0x2ac5d8(0x288),'createdAt':_0x359f51,'updatedAt':_0x359f51}),_0x3870de=!![];const _0x53ed7b=this[_0x2ac5d8(0x34c)]();_0x4db001=await this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x378)]({'conversationId':_0x529447['id'],'modelId':_0x131e95['id'],'activityAt':_0x53ed7b,..._0xfbfb8c===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0xfbfb8c[_0x2ac5d8(0x395)],'activeVersionId':_0xfbfb8c[_0x2ac5d8(0x38f)],'maxStorageBytes':_0x3c14bd[_0x2ac5d8(0x270)][_0x2ac5d8(0x296)][_0x2ac5d8(0x20e)]}},..._0x1ec4ea?{'automaticTitle':_0xcd21f3}:{}});}catch(_0x47f011){try{_0x40777b[_0x2ac5d8(0x353)]();}catch{}const _0x2a4838=await _0x40777b[_0x2ac5d8(0x2d9)][_0x2ac5d8(0x373)](()=>({'status':_0x2ac5d8(0x292),'completedAt':this[_0x2ac5d8(0x34c)]()}));if(_0x3870de)try{this[_0x2ac5d8(0x239)][_0x2ac5d8(0x286)][_0x2ac5d8(0x268)](_0x529447['id'],_0x558e78[_0x2ac5d8(0x344)],_0x2a4838[_0x2ac5d8(0x23c)],_0x2a4838[_0x2ac5d8(0x2cb)]);}catch{}await rm(_0x4847ce,{'recursive':!![],'force':!![]})[_0x2ac5d8(0x373)](()=>undefined),this[_0x2ac5d8(0x1f5)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447,_0x2ac5d8(0x28e),_0x2a4838[_0x2ac5d8(0x2cb)]);if(_0xfbfb8c!==undefined)this[_0x2ac5d8(0x260)](_0x529447,_0xfbfb8c[_0x2ac5d8(0x395)],_0xfbfb8c[_0x2ac5d8(0x38f)],_0x47f011);throw _0x47f011;}_0x529447=_0x4db001[_0x2ac5d8(0x360)];if(_0xfbfb8c!==undefined)this[_0x2ac5d8(0x206)](_0x529447['id'],{'conversationId':_0x529447['id'],'kind':_0x2ac5d8(0x27d),'upgrade':{'status':_0x2ac5d8(0x39b),'previousVersionId':_0xfbfb8c[_0x2ac5d8(0x395)],'targetVersionId':_0xfbfb8c[_0x2ac5d8(0x38f)],'activeVersionId':_0x529447[_0x2ac5d8(0x347)],'conversation':this[_0x2ac5d8(0x326)](_0x529447),'error':null}});this[_0x2ac5d8(0x2b5)][_0x2ac5d8(0x38e)](_0x529447['id'],_0x40777b),this[_0x2ac5d8(0x1f5)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447,_0x2ac5d8(0x288),_0x40777b[_0x2ac5d8(0x201)][_0x2ac5d8(0x305)]);if(_0x4db001[_0x2ac5d8(0x27c)])this[_0x2ac5d8(0x206)](_0x529447['id'],{'conversationId':_0x529447['id'],'kind':_0x2ac5d8(0x360),'conversation':this[_0x2ac5d8(0x326)](_0x529447)});this[_0x2ac5d8(0x206)](_0x529447['id'],{'conversationId':_0x529447['id'],'kind':_0x2ac5d8(0x201),'run':_0x40777b[_0x2ac5d8(0x201)]}),_0x4b0615=!![];for(const _0x41bfb5 of _0x50efa9)this[_0x2ac5d8(0x208)](_0x529447['id'],_0x41bfb5);_0x50efa9[_0x2ac5d8(0x315)]=0x14ab+0x1*-0x23c5+0xf1a;const _0x52f9a2=_0x40777b[_0x2ac5d8(0x2d9)][_0x2ac5d8(0x28b)](_0x5ac452=>this[_0x2ac5d8(0x2c6)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id'],_0x558e78[_0x2ac5d8(0x344)],_0x40777b[_0x2ac5d8(0x201)],_0x5ac452),()=>this[_0x2ac5d8(0x2c6)](_0x54c95e[_0x2ac5d8(0x324)],_0x529447['id'],_0x558e78[_0x2ac5d8(0x344)],_0x40777b[_0x2ac5d8(0x201)],{'status':_0x2ac5d8(0x292),'completedAt':this[_0x2ac5d8(0x34c)]()}))[_0x2ac5d8(0x373)](()=>undefined)[_0x2ac5d8(0x2a2)](async()=>{const _0x26a09a=_0x2ac5d8;this[_0x26a09a(0x33d)][_0x26a09a(0x38c)](runInterruptionKey(_0x529447['id'],_0x40777b[_0x26a09a(0x201)]['id']));if(this[_0x26a09a(0x2b5)][_0x26a09a(0x364)](_0x529447['id'])===_0x40777b)this[_0x26a09a(0x2b5)][_0x26a09a(0x38c)](_0x529447['id']);if(this[_0x26a09a(0x362)][_0x26a09a(0x364)](_0x529447['id'])===_0x52f9a2)this[_0x26a09a(0x362)][_0x26a09a(0x38c)](_0x529447['id']);await rm(_0x4847ce,{'recursive':!![],'force':!![]})[_0x26a09a(0x373)](()=>undefined);});return this[_0x2ac5d8(0x362)][_0x2ac5d8(0x38e)](_0x529447['id'],_0x52f9a2),void _0x52f9a2,{'conversation':this[_0x2ac5d8(0x326)](_0x529447),'run':_0x40777b[_0x2ac5d8(0x201)]};}async[_0x241074(0x2c6)](_0x23aebe,_0xe1b157,_0x44a9cc,_0x4d23b1,_0x18a3ea){const _0x233522=_0x241074,_0x3466e6=runInterruptionKey(_0xe1b157,_0x4d23b1['id']),_0x5701f0=this[_0x233522(0x33d)][_0x233522(0x382)](_0x3466e6);let _0xc9f21d;try{this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x268)](_0xe1b157,_0x44a9cc,_0x18a3ea[_0x233522(0x23c)],_0x18a3ea[_0x233522(0x2cb)]);try{const _0x2f9b16=await this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x2d7)](_0x23aebe,_0xe1b157);this[_0x233522(0x206)](_0xe1b157,{'conversationId':_0xe1b157,'kind':_0x233522(0x386),'files':_0x2f9b16,'error':null});}catch(_0x4b12e1){this[_0x233522(0x206)](_0xe1b157,{'conversationId':_0xe1b157,'kind':_0x233522(0x386),'files':this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x250)](_0x23aebe,_0xe1b157),'error':{'code':safeErrorCode(_0x4b12e1,_0x233522(0x290)),'message':_0x233522(0x29c)}});}await this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x337)](_0xe1b157,_0x18a3ea[_0x233522(0x2cb)]),this[_0x233522(0x206)](_0xe1b157,{'conversationId':_0xe1b157,'kind':_0x233522(0x201),'run':{'id':_0x4d23b1['id'],'status':_0x18a3ea[_0x233522(0x23c)],'startedAt':_0x4d23b1[_0x233522(0x305)],'completedAt':_0x18a3ea[_0x233522(0x2cb)]}}),await this[_0x233522(0x321)](_0xe1b157,_0x18a3ea[_0x233522(0x21f)],_0x18a3ea[_0x233522(0x2cb)])[_0x233522(0x373)](()=>undefined),_0xc9f21d=this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x2c9)](_0x23aebe,_0xe1b157);}finally{this[_0x233522(0x33d)][_0x233522(0x38c)](_0x3466e6);if(_0xc9f21d===undefined)try{_0xc9f21d=this[_0x233522(0x239)][_0x233522(0x286)][_0x233522(0x2c9)](_0x23aebe,_0xe1b157);}catch{}if(_0xc9f21d!==undefined)this[_0x233522(0x1f5)](_0x23aebe,_0xc9f21d,_0x233522(0x28e),_0x18a3ea[_0x233522(0x2cb)]);}if(_0xc9f21d!==undefined&&(_0x18a3ea[_0x233522(0x23c)]!==_0x233522(0x2d8)||!_0x5701f0))this[_0x233522(0x23a)](_0x23aebe,_0xc9f21d,_0x4d23b1['id'],_0x18a3ea);}async[_0x241074(0x321)](_0x116e4a,_0x100314,_0x49cecd){const _0x58593d=_0x241074,_0x21f624=automaticHostedConversationTitle(_0x100314);if(_0x21f624===undefined)return;const _0x52b079=await this[_0x58593d(0x239)][_0x58593d(0x286)][_0x58593d(0x2bf)](_0x116e4a,_0x21f624,_0x49cecd);if(_0x52b079===undefined)return;this[_0x58593d(0x206)](_0x116e4a,{'conversationId':_0x116e4a,'kind':_0x58593d(0x360),'conversation':this[_0x58593d(0x326)](_0x52b079)});}[_0x241074(0x2ae)](_0x32571f){const _0x169fa2=_0x241074,_0x2a8bdf=hostedRequest(_0x32571f),_0x556ecc=hostedConversationIdInputSchema[_0x169fa2(0x36a)](_0x2a8bdf[_0x169fa2(0x30e)]),_0x32a6c4=this[_0x169fa2(0x239)][_0x169fa2(0x286)][_0x169fa2(0x2c9)](_0x2a8bdf[_0x169fa2(0x324)],_0x556ecc[_0x169fa2(0x351)]),_0x3c538c=this[_0x169fa2(0x2b5)][_0x169fa2(0x364)](_0x556ecc[_0x169fa2(0x351)]);if(_0x3c538c===undefined)return{'interrupted':![]};const _0x585b82=runInterruptionKey(_0x32a6c4['id'],_0x3c538c[_0x169fa2(0x201)]['id']);this[_0x169fa2(0x33d)][_0x169fa2(0x333)](_0x585b82);try{const _0xabbd27=_0x3c538c[_0x169fa2(0x353)]();if(!_0xabbd27)return this[_0x169fa2(0x33d)][_0x169fa2(0x38c)](_0x585b82),{'interrupted':![]};return this[_0x169fa2(0x1f5)](_0x2a8bdf[_0x169fa2(0x324)],_0x32a6c4,_0x169fa2(0x371),this[_0x169fa2(0x34c)]()),{'interrupted':!![]};}catch(_0x25258d){this[_0x169fa2(0x33d)][_0x169fa2(0x38c)](_0x585b82);throw _0x25258d;}}async[_0x241074(0x2e6)](_0x398be9){const _0x52d692=_0x241074,_0x68354d=hostedRequest(_0x398be9),_0x3cc798=hostedConversationConfigUpdateInputSchema[_0x52d692(0x36a)](_0x68354d[_0x52d692(0x30e)]),_0x559a5a=this[_0x52d692(0x239)][_0x52d692(0x286)][_0x52d692(0x2c9)](_0x68354d[_0x52d692(0x324)],_0x3cc798[_0x52d692(0x351)]);if(this[_0x52d692(0x233)][_0x52d692(0x382)](_0x559a5a['id']))throw new Error(_0x52d692(0x365));const _0x5824bf=await this[_0x52d692(0x231)](_0x559a5a[_0x52d692(0x347)],_0x559a5a[_0x52d692(0x38b)]),_0x40cb14=runtimeModels(_0x68354d[_0x52d692(0x2f4)]),_0xe71706=selectModel(_0x5824bf,_0x40cb14,_0x3cc798[_0x52d692(0x2d1)]??_0x559a5a[_0x52d692(0x2d1)]),_0x3306a1=this[_0x52d692(0x34c)](),_0x8566fd=await this[_0x52d692(0x239)][_0x52d692(0x286)][_0x52d692(0x205)](_0x559a5a['id'],_0x1acba0=>({..._0x1acba0,'modelId':_0xe71706['id'],'updatedAt':_0x3306a1,'lastActivityAt':_0x3306a1}));return this[_0x52d692(0x206)](_0x559a5a['id'],{'conversationId':_0x559a5a['id'],'kind':_0x52d692(0x27e),'conversation':this[_0x52d692(0x326)](_0x8566fd)}),{'conversation':this[_0x52d692(0x326)](_0x8566fd)};}async[_0x241074(0x21e)](_0x47954b){const _0x1db2a=_0x241074,_0x4eb18e=hostedRequest(_0x47954b),_0x51a17f=hostedConversationMetadataUpdateInputSchema[_0x1db2a(0x36a)](_0x4eb18e[_0x1db2a(0x30e)]),_0x4733ad=this[_0x1db2a(0x239)][_0x1db2a(0x286)][_0x1db2a(0x2c9)](_0x4eb18e[_0x1db2a(0x324)],_0x51a17f[_0x1db2a(0x351)]);if(this[_0x1db2a(0x233)][_0x1db2a(0x382)](_0x4733ad['id']))throw new Error(_0x1db2a(0x365));const _0x5ec985=this[_0x1db2a(0x34c)](),_0x58f530=await this[_0x1db2a(0x239)][_0x1db2a(0x286)][_0x1db2a(0x205)](_0x4733ad['id'],_0x18972a=>({..._0x18972a,'title':_0x51a17f[_0x1db2a(0x21f)]??_0x18972a[_0x1db2a(0x21f)],'titleSource':_0x51a17f[_0x1db2a(0x21f)]===undefined?_0x18972a[_0x1db2a(0x241)]:_0x1db2a(0x258),'pinnedAt':_0x51a17f[_0x1db2a(0x273)]===undefined?_0x18972a[_0x1db2a(0x359)]:_0x51a17f[_0x1db2a(0x273)]?_0x5ec985:null,'updatedAt':_0x5ec985,'lastActivityAt':_0x18972a[_0x1db2a(0x2b8)]}));return this[_0x1db2a(0x206)](_0x4733ad['id'],{'conversationId':_0x4733ad['id'],'kind':_0x1db2a(0x27e),'conversation':this[_0x1db2a(0x326)](_0x58f530)}),{'conversation':this[_0x1db2a(0x326)](_0x58f530)};}async[_0x241074(0x250)](_0x3fc497){const _0x22f1f7=_0x241074,_0x4ca7ec=hostedRequest(_0x3fc497),_0x5668c5=hostedConversationIdInputSchema[_0x22f1f7(0x36a)](_0x4ca7ec[_0x22f1f7(0x30e)]);return hostedConversationFilesSchema[_0x22f1f7(0x36a)]({'files':this[_0x22f1f7(0x239)][_0x22f1f7(0x286)][_0x22f1f7(0x250)](_0x4ca7ec[_0x22f1f7(0x324)],_0x5668c5[_0x22f1f7(0x351)])});}async[_0x241074(0x369)](_0x3cfd35){const _0x2f5413=_0x241074,_0x2f406c=hostedRequest(_0x3cfd35),_0xd48d2=hostedConversationFileReadInputSchema[_0x2f5413(0x36a)](_0x2f406c[_0x2f5413(0x30e)]),_0x301ba2=this[_0x2f5413(0x239)][_0x2f5413(0x286)][_0x2f5413(0x31f)](_0x2f406c[_0x2f5413(0x324)],_0xd48d2[_0x2f5413(0x351)],_0xd48d2[_0x2f5413(0x383)]),_0x53fd67=this[_0x2f5413(0x239)][_0x2f5413(0x286)][_0x2f5413(0x39a)](_0x2f406c[_0x2f5413(0x324)],_0x301ba2);await assertRegularFile(_0x53fd67,_0x301ba2[_0x2f5413(0x393)]);const _0x5ec4a0=_0xd48d2[_0x2f5413(0x2d5)]??-0x1*0x2ad+-0x27d+0x52a*0x1;if(_0x5ec4a0>_0x301ba2[_0x2f5413(0x393)])throw new Error(_0x2f5413(0x35b));const _0xefc1be=Math[_0x2f5413(0x301)](_0xd48d2[_0x2f5413(0x312)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x315e56=await open(_0x53fd67,'r');try{const _0x20c3b0=Buffer[_0x2f5413(0x2a9)](Math[_0x2f5413(0x301)](_0xefc1be,Math[_0x2f5413(0x27a)](0x1380+0x1*-0x2303+0xf83,_0x301ba2[_0x2f5413(0x393)]-_0x5ec4a0))),_0x10c21=await _0x315e56[_0x2f5413(0x25f)](_0x20c3b0,0x1fd3+0x653+-0x2626,_0x20c3b0[_0x2f5413(0x315)],_0x5ec4a0),_0x3c50ed=_0x5ec4a0+_0x10c21[_0x2f5413(0x25b)],_0x3a2876=_0x3c50ed>=_0x301ba2[_0x2f5413(0x393)];return hostedConversationFileReadResultSchema[_0x2f5413(0x36a)]({'file':_0x301ba2,'encoding':_0x2f5413(0x37d),'content':_0x20c3b0[_0x2f5413(0x202)](0x1*-0xfaa+0x11cd+-0x223,_0x10c21[_0x2f5413(0x25b)])[_0x2f5413(0x2f5)](_0x2f5413(0x37d)),'offset':_0x5ec4a0,'nextOffset':_0x3a2876?null:_0x3c50ed,'eof':_0x3a2876});}finally{await _0x315e56[_0x2f5413(0x366)]();}}async[_0x241074(0x1fe)](_0x1f7e5e){const _0x4c5a07=_0x241074,_0x531669=hostedRequest(_0x1f7e5e),_0x361478=hostedConversationFileDeleteInputSchema[_0x4c5a07(0x36a)](_0x531669[_0x4c5a07(0x30e)]);this[_0x4c5a07(0x2c2)](_0x531669[_0x4c5a07(0x324)],_0x361478[_0x4c5a07(0x351)]);const _0x125aed=_0x361478[_0x4c5a07(0x351)]+'\x00'+_0x361478[_0x4c5a07(0x383)];if(this[_0x4c5a07(0x374)][_0x4c5a07(0x382)](_0x125aed))throw new Error(_0x4c5a07(0x34b));this[_0x4c5a07(0x374)][_0x4c5a07(0x333)](_0x125aed);try{const _0x129fe8=await this[_0x4c5a07(0x239)][_0x4c5a07(0x286)][_0x4c5a07(0x1fe)](_0x531669[_0x4c5a07(0x324)],_0x361478[_0x4c5a07(0x351)],_0x361478[_0x4c5a07(0x383)],this[_0x4c5a07(0x34c)]()),_0x1437f1=hostedConversationFileDeleteResultSchema[_0x4c5a07(0x36a)]({'deletedFileId':_0x361478[_0x4c5a07(0x383)],'files':_0x129fe8});return this[_0x4c5a07(0x206)](_0x361478[_0x4c5a07(0x351)],{'conversationId':_0x361478[_0x4c5a07(0x351)],'kind':_0x4c5a07(0x386),'files':_0x1437f1[_0x4c5a07(0x386)],'error':null}),_0x1437f1;}finally{this[_0x4c5a07(0x374)][_0x4c5a07(0x38c)](_0x125aed);}}async[_0x241074(0x319)](_0x474165){const _0x3057e4=_0x241074,_0x1d6bcc=hostedRequest(_0x474165),_0x21c209=hostedConversationUploadPreflightInputSchema[_0x3057e4(0x36a)](_0x1d6bcc[_0x3057e4(0x30e)]),_0x2d041c=this[_0x3057e4(0x2c2)](_0x1d6bcc[_0x3057e4(0x324)],_0x21c209[_0x3057e4(0x351)]),_0x561d3d=await this[_0x3057e4(0x231)](_0x2d041c[_0x3057e4(0x347)],_0x2d041c[_0x3057e4(0x38b)]),_0x258bdd=this[_0x3057e4(0x239)][_0x3057e4(0x286)][_0x3057e4(0x2be)](_0x1d6bcc[_0x3057e4(0x324)],_0x2d041c['id']),_0x3851ac=await Promise[_0x3057e4(0x32b)](_0x21c209[_0x3057e4(0x386)][_0x3057e4(0x2f7)](async _0x4213b4=>({'name':_0x4213b4[_0x3057e4(0x2e3)],'status':await this[_0x3057e4(0x204)](_0x258bdd,_0x2d041c,_0x561d3d[_0x3057e4(0x270)],_0x4213b4[_0x3057e4(0x2e3)],_0x4213b4[_0x3057e4(0x393)])})));return hostedConversationUploadPreflightResultSchema[_0x3057e4(0x36a)]({'files':_0x3851ac});}async[_0x241074(0x247)](_0x1b360b){const _0xc2b789=_0x241074,_0xd96237=hostedRequest(_0x1b360b),_0x10a40d=hostedConversationUploadCreateInputSchema[_0xc2b789(0x36a)](_0xd96237[_0xc2b789(0x30e)]),_0x2cabdc=this[_0xc2b789(0x2c2)](_0xd96237[_0xc2b789(0x324)],_0x10a40d[_0xc2b789(0x351)]),_0x5d37ca=_0xd96237[_0xc2b789(0x324)]+'\x00'+_0x2cabdc['id']+'\x00'+_0x10a40d[_0xc2b789(0x36e)],_0x251889=this[_0xc2b789(0x380)][_0xc2b789(0x364)](_0x5d37ca);if(_0x251889!==undefined){const _0x112792=this[_0xc2b789(0x2b3)][_0xc2b789(0x364)](_0x251889);if(_0x112792!==undefined)return{'upload':hostedConversationUploadSchema[_0xc2b789(0x36a)](uploadProjection(_0x112792))};}const _0x101543=await this[_0xc2b789(0x231)](_0x2cabdc[_0xc2b789(0x347)],_0x2cabdc[_0xc2b789(0x38b)]),_0x60ed72=this[_0xc2b789(0x239)][_0xc2b789(0x286)][_0xc2b789(0x2be)](_0xd96237[_0xc2b789(0x324)],_0x2cabdc['id']),_0x5045d6=await this[_0xc2b789(0x204)](_0x60ed72,_0x2cabdc,_0x101543[_0xc2b789(0x270)],_0x10a40d[_0xc2b789(0x2e3)],_0x10a40d[_0xc2b789(0x393)]);if(_0x5045d6===_0xc2b789(0x310)||_0x5045d6===_0xc2b789(0x1ff))throw new Error(_0xc2b789(0x39d));if(_0x5045d6!==_0xc2b789(0x255))throw new Error(_0xc2b789(0x303));const _0x51ec55=this['id'](),_0x3d6ef4=join(_0x60ed72[_0xc2b789(0x26c)],'.'+_0x51ec55+_0xc2b789(0x367)),_0x3a69c5=join(_0x60ed72[_0xc2b789(0x26c)],_0x10a40d[_0xc2b789(0x2e3)]),_0x4d7fef=await open(_0x3d6ef4,'wx',-0x196f+0x1*-0x1527+-0xa*-0x4cf);await _0x4d7fef[_0xc2b789(0x366)]();const _0x157714={'uploadId':_0x51ec55,'conversationId':_0x2cabdc['id'],'userId':_0xd96237[_0xc2b789(0x324)],'clientRequestId':_0x10a40d[_0xc2b789(0x36e)],'name':_0x10a40d[_0xc2b789(0x2e3)],'mimeType':_0x10a40d[_0xc2b789(0x212)],'size':_0x10a40d[_0xc2b789(0x393)],'temporaryPath':_0x3d6ef4,'targetPath':_0x3a69c5,'receivedBytes':0x0,'status':_0xc2b789(0x24c)};return this[_0xc2b789(0x2b3)][_0xc2b789(0x38e)](_0x51ec55,_0x157714),this[_0xc2b789(0x380)][_0xc2b789(0x38e)](_0x5d37ca,_0x51ec55),{'upload':hostedConversationUploadSchema[_0xc2b789(0x36a)](uploadProjection(_0x157714))};}async[_0x241074(0x25d)](_0x258b13){const _0xda4dce=_0x241074,_0x3b40f5=hostedRequest(_0x258b13),_0x257171=hostedConversationUploadChunkInputSchema[_0xda4dce(0x36a)](_0x3b40f5[_0xda4dce(0x30e)]),_0x22f4eb=this[_0xda4dce(0x348)](_0x3b40f5[_0xda4dce(0x324)],_0x257171[_0xda4dce(0x351)],_0x257171[_0xda4dce(0x342)]);if(_0x22f4eb[_0xda4dce(0x23c)]!==_0xda4dce(0x24c))throw new Error(_0xda4dce(0x317));if(_0x257171[_0xda4dce(0x2d5)]!==_0x22f4eb[_0xda4dce(0x358)])throw new Error(_0xda4dce(0x264));const _0x5593b3=Buffer[_0xda4dce(0x304)](_0x257171[_0xda4dce(0x2b4)],_0xda4dce(0x37d));if(_0x22f4eb[_0xda4dce(0x358)]+_0x5593b3[_0xda4dce(0x228)]>_0x22f4eb[_0xda4dce(0x393)])throw new Error(_0xda4dce(0x2ab));await assertUploadTemporaryFile(_0x22f4eb[_0xda4dce(0x20d)],_0x22f4eb[_0xda4dce(0x358)]);const _0x28ef19=await open(_0x22f4eb[_0xda4dce(0x20d)],'r+');try{await _0x28ef19[_0xda4dce(0x222)](_0x5593b3,-0x2f*-0xcd+0x1*-0x10fc+0x1*-0x14a7,_0x5593b3[_0xda4dce(0x228)],_0x22f4eb[_0xda4dce(0x358)]);}finally{await _0x28ef19[_0xda4dce(0x366)]();}return _0x22f4eb[_0xda4dce(0x358)]+=_0x5593b3[_0xda4dce(0x228)],{'upload':hostedConversationUploadSchema[_0xda4dce(0x36a)](uploadProjection(_0x22f4eb))};}[_0x241074(0x368)](_0x16461b){const _0xf47cda=_0x241074,_0x64e5dc=hostedRequest(_0x16461b),_0xa1fec0=hostedConversationUploadControlInputSchema[_0xf47cda(0x36a)](_0x64e5dc[_0xf47cda(0x30e)]),_0xd00f77=this[_0xf47cda(0x348)](_0x64e5dc[_0xf47cda(0x324)],_0xa1fec0[_0xf47cda(0x351)],_0xa1fec0[_0xf47cda(0x342)]);return{'upload':hostedConversationUploadSchema[_0xf47cda(0x36a)](uploadProjection(_0xd00f77))};}async[_0x241074(0x2bd)](_0x3cb234){const _0x3f52a3=_0x241074,_0x1ec18e=hostedRequest(_0x3cb234),_0x3b2118=hostedConversationUploadControlInputSchema[_0x3f52a3(0x36a)](_0x1ec18e[_0x3f52a3(0x30e)]),_0x182ef9=this[_0x3f52a3(0x348)](_0x1ec18e[_0x3f52a3(0x324)],_0x3b2118[_0x3f52a3(0x351)],_0x3b2118[_0x3f52a3(0x342)]);if(_0x182ef9[_0x3f52a3(0x23c)]===_0x3f52a3(0x354))return{'upload':hostedConversationUploadSchema[_0x3f52a3(0x36a)](uploadProjection(_0x182ef9))};if(_0x182ef9[_0x3f52a3(0x23c)]!==_0x3f52a3(0x24c)||_0x182ef9[_0x3f52a3(0x358)]!==_0x182ef9[_0x3f52a3(0x393)])throw new Error(_0x3f52a3(0x2bc));const _0x3cd628=this[_0x3f52a3(0x2c2)](_0x1ec18e[_0x3f52a3(0x324)],_0x182ef9[_0x3f52a3(0x351)]),_0x368df2=await this[_0x3f52a3(0x231)](_0x3cd628[_0x3f52a3(0x347)],_0x3cd628[_0x3f52a3(0x38b)]);if(_0x182ef9[_0x3f52a3(0x393)]>_0x368df2[_0x3f52a3(0x270)][_0x3f52a3(0x296)][_0x3f52a3(0x285)]||_0x3cd628[_0x3f52a3(0x394)][_0x3f52a3(0x2ed)]+_0x182ef9[_0x3f52a3(0x393)]>_0x3cd628[_0x3f52a3(0x394)][_0x3f52a3(0x240)])throw new Error(_0x3f52a3(0x39d));await assertUploadTemporaryFile(_0x182ef9[_0x3f52a3(0x20d)],_0x182ef9[_0x3f52a3(0x393)]);const _0x1f8e51=await lstat(_0x182ef9[_0x3f52a3(0x2df)])[_0x3f52a3(0x373)](_0x52538c=>{const _0x3d236f=_0x3f52a3;if(_0x52538c[_0x3d236f(0x33b)]===_0x3d236f(0x223))return undefined;throw _0x52538c;});if(_0x1f8e51!==undefined)throw new Error(_0x3f52a3(0x303));const _0x146d41=await open(_0x182ef9[_0x3f52a3(0x20d)],'r+');try{await _0x146d41[_0x3f52a3(0x207)]();}finally{await _0x146d41[_0x3f52a3(0x366)]();}await rename(_0x182ef9[_0x3f52a3(0x20d)],_0x182ef9[_0x3f52a3(0x2df)]);const _0xb894fb=this[_0x3f52a3(0x34c)]();try{await utimes(_0x182ef9[_0x3f52a3(0x2df)],new Date(_0xb894fb),new Date(_0xb894fb));const _0x2c232f={'id':this[_0x3f52a3(0x239)][_0x3f52a3(0x286)][_0x3f52a3(0x338)](_0x182ef9[_0x3f52a3(0x351)],_0x3f52a3(0x2c0),_0x182ef9[_0x3f52a3(0x2e3)]),'conversationId':_0x182ef9[_0x3f52a3(0x351)],'category':_0x3f52a3(0x2c0),'relativePath':_0x182ef9[_0x3f52a3(0x2e3)],'displayName':_0x182ef9[_0x3f52a3(0x2e3)],'mimeType':_0x182ef9[_0x3f52a3(0x212)],'size':_0x182ef9[_0x3f52a3(0x393)],'source':_0x3f52a3(0x1fa),'createdAt':_0xb894fb,'updatedAt':_0xb894fb};return _0x182ef9[_0x3f52a3(0x28d)]=await this[_0x3f52a3(0x239)][_0x3f52a3(0x286)][_0x3f52a3(0x294)](_0x1ec18e[_0x3f52a3(0x324)],_0x2c232f),_0x182ef9[_0x3f52a3(0x23c)]=_0x3f52a3(0x354),this[_0x3f52a3(0x206)](_0x182ef9[_0x3f52a3(0x351)],{'conversationId':_0x182ef9[_0x3f52a3(0x351)],'kind':_0x3f52a3(0x386),'files':this[_0x3f52a3(0x239)][_0x3f52a3(0x286)][_0x3f52a3(0x250)](_0x1ec18e[_0x3f52a3(0x324)],_0x182ef9[_0x3f52a3(0x351)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x3f52a3(0x36a)](uploadProjection(_0x182ef9))};}catch(_0x3c5f19){await rename(_0x182ef9[_0x3f52a3(0x2df)],_0x182ef9[_0x3f52a3(0x20d)])[_0x3f52a3(0x373)](()=>undefined);throw _0x3c5f19;}}async[_0x241074(0x31b)](_0x37a68a){const _0x263b9f=_0x241074,_0x1c4e0c=hostedRequest(_0x37a68a),_0x58c066=hostedConversationUploadControlInputSchema[_0x263b9f(0x36a)](_0x1c4e0c[_0x263b9f(0x30e)]),_0x492ab4=this[_0x263b9f(0x348)](_0x1c4e0c[_0x263b9f(0x324)],_0x58c066[_0x263b9f(0x351)],_0x58c066[_0x263b9f(0x342)]);if(_0x492ab4[_0x263b9f(0x23c)]===_0x263b9f(0x354))throw new Error(_0x263b9f(0x317));return _0x492ab4[_0x263b9f(0x23c)]=_0x263b9f(0x325),await rm(_0x492ab4[_0x263b9f(0x20d)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x263b9f(0x36a)](uploadProjection(_0x492ab4))};}async[_0x241074(0x38c)](_0x1d09c3){const _0x19279c=_0x241074,_0x1a421d=hostedRequest(_0x1d09c3),_0x37526f=hostedConversationIdInputSchema[_0x19279c(0x36a)](_0x1a421d[_0x19279c(0x30e)]),_0x90624f=this[_0x19279c(0x239)][_0x19279c(0x286)][_0x19279c(0x2c9)](_0x1a421d[_0x19279c(0x324)],_0x37526f[_0x19279c(0x351)]);if(this[_0x19279c(0x233)][_0x19279c(0x382)](_0x90624f['id']))throw new Error(_0x19279c(0x365));this[_0x19279c(0x233)][_0x19279c(0x333)](_0x90624f['id']);try{await this[_0x19279c(0x1f3)](_0x90624f['id']);const _0x3e2081=this[_0x19279c(0x2b5)][_0x19279c(0x364)](_0x90624f['id']);if(_0x3e2081!==undefined){const _0x5e4db5=runInterruptionKey(_0x90624f['id'],_0x3e2081[_0x19279c(0x201)]['id']);this[_0x19279c(0x33d)][_0x19279c(0x333)](_0x5e4db5);if(!_0x3e2081[_0x19279c(0x353)]())this[_0x19279c(0x33d)][_0x19279c(0x38c)](_0x5e4db5);}await this[_0x19279c(0x363)](_0x1a421d[_0x19279c(0x324)],_0x90624f['id']);const _0x331b5b=this[_0x19279c(0x239)][_0x19279c(0x286)][_0x19279c(0x2be)](_0x1a421d[_0x19279c(0x324)],_0x90624f['id']);return await this[_0x19279c(0x239)][_0x19279c(0x266)][_0x19279c(0x245)]({'conversationId':_0x90624f['id'],'sessionId':_0x90624f[_0x19279c(0x265)],'homeDirectory':_0x331b5b[_0x19279c(0x2dc)]})[_0x19279c(0x373)](()=>undefined),await this[_0x19279c(0x362)][_0x19279c(0x364)](_0x90624f['id'])?.[_0x19279c(0x373)](()=>undefined),this[_0x19279c(0x22d)](_0x90624f['id']),await this[_0x19279c(0x239)][_0x19279c(0x286)][_0x19279c(0x267)](_0x90624f['id']),this[_0x19279c(0x29a)][_0x19279c(0x38c)](_0x90624f['id']),hostedConversationDeleteResultSchema[_0x19279c(0x36a)]({'deletedConversationId':_0x90624f['id']});}finally{this[_0x19279c(0x233)][_0x19279c(0x38c)](_0x90624f['id']);}}async[_0x241074(0x1f3)](_0x3b00c1){const _0xda3c3=_0x241074,_0x50111d=_0x3b00c1+'\x00',_0x14776b=[...this[_0xda3c3(0x256)][_0xda3c3(0x1f2)]()][_0xda3c3(0x3a0)](([_0x156254])=>_0x156254[_0xda3c3(0x28f)](_0x50111d))[_0xda3c3(0x2f7)](([,_0x286871])=>_0x286871);await Promise[_0xda3c3(0x375)](_0x14776b);}async[_0x241074(0x26f)](_0x3f434c){const _0x2aa3a2=_0x241074;try{const _0x2c0e51=await this[_0x2aa3a2(0x364)]({'conversationId':_0x3f434c[_0x2aa3a2(0x351)],'__requestUserId':_0x3f434c[_0x2aa3a2(0x324)],'__marAgentModels':_0x3f434c[_0x2aa3a2(0x2f4)]});if(this[_0x2aa3a2(0x311)][_0x2aa3a2(0x364)](_0x3f434c[_0x2aa3a2(0x39e)])!==_0x3f434c)return;this[_0x2aa3a2(0x239)][_0x2aa3a2(0x21a)]?.({'type':_0x2aa3a2(0x1f4),'workbenchConnectionId':_0x3f434c[_0x2aa3a2(0x35d)],'watchId':_0x3f434c[_0x2aa3a2(0x2d4)],'nodeGeneration':_0x3f434c[_0x2aa3a2(0x1fc)],'nodeId':this[_0x2aa3a2(0x239)][_0x2aa3a2(0x36d)](),'templateId':_0x3f434c[_0x2aa3a2(0x38b)],'conversationId':_0x3f434c[_0x2aa3a2(0x351)],'revision':0x1,'snapshotSequence':++this[_0x2aa3a2(0x2ff)],'expiresAt':_0x3f434c[_0x2aa3a2(0x277)],'payload':_0x2c0e51}),_0x3f434c[_0x2aa3a2(0x293)]=!![];for(const _0x399c19 of _0x3f434c[_0x2aa3a2(0x276)])this[_0x2aa3a2(0x2ef)](_0x3f434c,_0x399c19);_0x3f434c[_0x2aa3a2(0x276)][_0x2aa3a2(0x315)]=0x7a2+0x173*0x3+-0xbfb;}catch(_0x32718c){if(this[_0x2aa3a2(0x311)][_0x2aa3a2(0x364)](_0x3f434c[_0x2aa3a2(0x39e)])!==_0x3f434c)return;this[_0x2aa3a2(0x239)][_0x2aa3a2(0x21a)]?.({'type':_0x2aa3a2(0x236),'workbenchConnectionId':_0x3f434c[_0x2aa3a2(0x35d)],'watchType':_0x2aa3a2(0x355),'watchId':_0x3f434c[_0x2aa3a2(0x2d4)],'nodeGeneration':_0x3f434c[_0x2aa3a2(0x1fc)],'nodeId':this[_0x2aa3a2(0x239)][_0x2aa3a2(0x36d)](),'templateId':_0x3f434c[_0x2aa3a2(0x38b)],'conversationId':_0x3f434c[_0x2aa3a2(0x351)],'code':safeErrorCode(_0x32718c,_0x2aa3a2(0x213)),'message':_0x2aa3a2(0x2a6)}),this[_0x2aa3a2(0x36b)](_0x3f434c[_0x2aa3a2(0x39e)]);}}[_0x241074(0x323)](_0x26ccdc){const _0x4e8e52=_0x241074;return this[_0x4e8e52(0x29a)][_0x4e8e52(0x364)](_0x26ccdc)??{'status':_0x4e8e52(0x28e),'version':0x0,'updatedAt':0x0};}[_0x241074(0x326)](_0x4e06b2){const _0x4424a2=_0x241074;return hostedConversationSummary(_0x4e06b2,this[_0x4424a2(0x323)](_0x4e06b2['id']));}[_0x241074(0x1f5)](_0x34f1a9,_0x4be3b8,_0x231d74,_0x13db69){const _0x577048=_0x241074,_0x463c59=this[_0x577048(0x323)](_0x4be3b8['id']),_0x401d10={'status':_0x231d74,'version':_0x463c59[_0x577048(0x216)]+(-0x252e*-0x1+0xb81+-0x2*0x1857),'updatedAt':_0x13db69};this[_0x577048(0x29a)][_0x577048(0x38e)](_0x4be3b8['id'],_0x401d10),this[_0x577048(0x259)]({'kind':_0x577048(0x323),'userId':_0x34f1a9,'templateId':_0x4be3b8[_0x577048(0x38b)],'conversationId':_0x4be3b8['id'],'activity':_0x401d10});}[_0x241074(0x23a)](_0x27b454,_0x139385,_0x4d3e9d,_0x209f04){const _0x197855=_0x241074;this[_0x197855(0x259)]({'kind':_0x197855(0x2f1),'event':{'runId':_0x4d3e9d,'sequence':0x1,'eventType':_0x197855(0x2f1),'payload':{'targetType':_0x197855(0x210),'userId':_0x27b454,'templateId':_0x139385[_0x197855(0x38b)],'conversationId':_0x139385['id'],'conversationTitle':_0x139385[_0x197855(0x21f)],'runId':_0x4d3e9d,'notificationId':_0x197855(0x2b0)+this[_0x197855(0x239)][_0x197855(0x36d)]()+':'+_0x139385['id']+':'+_0x4d3e9d,'kind':_0x197855(0x1f6),'outcome':_0x209f04[_0x197855(0x23c)],'occurredAt':_0x209f04[_0x197855(0x2cb)]},'createdAt':_0x209f04[_0x197855(0x2cb)]}});}[_0x241074(0x259)](_0x22ab98){const _0x25678d=_0x241074,_0x5a6533=this[_0x25678d(0x239)][_0x25678d(0x29d)]?.(_0x22ab98)??{'sequence':++this[_0x25678d(0x21c)],'category':_0x25678d(0x355),'payload':_0x22ab98};if(_0x5a6533!==undefined)this[_0x25678d(0x239)][_0x25678d(0x24e)]?.(_0x5a6533);}[_0x241074(0x260)](_0x5068a2,_0x2694dd,_0x5ab400,_0x25c4c7){const _0x3369f6=_0x241074;this[_0x3369f6(0x206)](_0x5068a2['id'],{'conversationId':_0x5068a2['id'],'kind':_0x3369f6(0x27d),'upgrade':{'status':_0x3369f6(0x292),'previousVersionId':_0x2694dd,'targetVersionId':_0x5ab400,'activeVersionId':_0x5068a2[_0x3369f6(0x347)],'conversation':this[_0x3369f6(0x326)](_0x5068a2),'error':{'code':safeErrorCode(_0x25c4c7,_0x3369f6(0x1f9)),'message':_0x3369f6(0x32a)}}});}[_0x241074(0x206)](_0x351471,_0x4751cf){const _0x5958aa=_0x241074,_0x4e9fed=[...this[_0x5958aa(0x311)][_0x5958aa(0x2cf)]()][_0x5958aa(0x3a0)](_0x43c0cd=>_0x43c0cd[_0x5958aa(0x351)]===_0x351471);if(_0x4e9fed[_0x5958aa(0x315)]===0x680+0x4fc+0x1c*-0x69)return![];const _0x2edb8c=this[_0x5958aa(0x239)][_0x5958aa(0x29d)]?.(_0x4751cf)??{'sequence':++this[_0x5958aa(0x21c)],'category':_0x5958aa(0x355),'payload':_0x4751cf};if(_0x2edb8c===undefined)return![];for(const _0x13fd28 of _0x4e9fed){if(!_0x13fd28[_0x5958aa(0x293)])_0x13fd28[_0x5958aa(0x276)][_0x5958aa(0x281)](_0x2edb8c);else this[_0x5958aa(0x2ef)](_0x13fd28,_0x2edb8c);}return!![];}[_0x241074(0x2ef)](_0x1dcac6,_0x19598e){const _0x32a502=_0x241074;this[_0x32a502(0x239)][_0x32a502(0x21a)]?.({'type':_0x32a502(0x390),'workbenchConnectionId':_0x1dcac6[_0x32a502(0x35d)],'watchId':_0x1dcac6[_0x32a502(0x2d4)],'nodeGeneration':_0x1dcac6[_0x32a502(0x1fc)],'nodeId':this[_0x32a502(0x239)][_0x32a502(0x36d)](),'templateId':_0x1dcac6[_0x32a502(0x38b)],'conversationId':_0x1dcac6[_0x32a502(0x351)],'expiresAt':_0x1dcac6[_0x32a502(0x277)],'event':_0x19598e});}[_0x241074(0x379)](_0x3fd015){const _0x43bb1b=_0x241074;return{'accepted':!![],'watchId':_0x3fd015[_0x43bb1b(0x2d4)],'nodeGeneration':_0x3fd015[_0x43bb1b(0x1fc)],'expiresAt':_0x3fd015[_0x43bb1b(0x277)]};}[_0x241074(0x22d)](_0x2d991b){const _0x5dc168=_0x241074;for(const _0x5625ed of[...this[_0x5dc168(0x311)][_0x5dc168(0x2cf)]()])if(_0x5625ed[_0x5dc168(0x351)]===_0x2d991b)this[_0x5dc168(0x36b)](_0x5625ed[_0x5dc168(0x39e)]);}[_0x241074(0x36b)](_0x1d96d5){const _0x100a38=_0x241074,_0x58ac66=this[_0x100a38(0x311)][_0x100a38(0x364)](_0x1d96d5);if(_0x58ac66===undefined)return;clearTimeout(_0x58ac66[_0x100a38(0x33e)]),this[_0x100a38(0x311)][_0x100a38(0x38c)](_0x1d96d5),this[_0x100a38(0x23e)][_0x100a38(0x2a8)](_0x1d96d5,_0x58ac66[_0x100a38(0x218)]);}[_0x241074(0x346)](_0x3b4d6e){const _0x1847c1=_0x241074,_0x5695c5=setTimeout(()=>this[_0x1847c1(0x36b)](_0x3b4d6e),WATCH_TTL_MS);return _0x5695c5[_0x1847c1(0x249)](),_0x5695c5;}[_0x241074(0x2c2)](_0x10929e,_0x3f2045){const _0x2620b2=_0x241074,_0x2c6e09=this[_0x2620b2(0x239)][_0x2620b2(0x286)][_0x2620b2(0x2c9)](_0x10929e,_0x3f2045);if(this[_0x2620b2(0x233)][_0x2620b2(0x382)](_0x2c6e09['id']))throw new Error(_0x2620b2(0x365));if(_0x2c6e09[_0x2620b2(0x23c)]!==_0x2620b2(0x2fd))throw new Error(_0x2620b2(0x365));return _0x2c6e09;}[_0x241074(0x348)](_0x39a0c2,_0x1f28bc,_0x404ff2){const _0x46a702=_0x241074;this[_0x46a702(0x239)][_0x46a702(0x286)][_0x46a702(0x2c9)](_0x39a0c2,_0x1f28bc);const _0x19b611=this[_0x46a702(0x2b3)][_0x46a702(0x364)](_0x404ff2);if(_0x19b611===undefined||_0x19b611[_0x46a702(0x324)]!==_0x39a0c2||_0x19b611[_0x46a702(0x351)]!==_0x1f28bc)throw new Error(_0x46a702(0x36f));return _0x19b611;}async[_0x241074(0x363)](_0x57886,_0x1e0f64){const _0x258be8=_0x241074;for(const _0xe2d265 of this[_0x258be8(0x2b3)][_0x258be8(0x2cf)]()){if(_0xe2d265[_0x258be8(0x324)]!==_0x57886||_0xe2d265[_0x258be8(0x351)]!==_0x1e0f64)continue;_0xe2d265[_0x258be8(0x23c)]===_0x258be8(0x24c)&&(_0xe2d265[_0x258be8(0x23c)]=_0x258be8(0x325),await rm(_0xe2d265[_0x258be8(0x20d)],{'force':!![]})[_0x258be8(0x373)](()=>undefined));}}async[_0x241074(0x225)](_0x564c78,_0x6ad197,_0xadf65){const _0x3d972d=_0x241074,_0x182085=this[_0x3d972d(0x239)][_0x3d972d(0x286)][_0x3d972d(0x31f)](_0x564c78,_0x6ad197,_0xadf65);if(_0x182085[_0x3d972d(0x2c8)]!==_0x3d972d(0x2c0))throw new Error(_0x3d972d(0x26e));return await assertRegularFile(this[_0x3d972d(0x239)][_0x3d972d(0x286)][_0x3d972d(0x39a)](_0x564c78,_0x182085),_0x182085[_0x3d972d(0x393)]),_0x182085;}async[_0x241074(0x204)](_0x3fbccd,_0x20fb19,_0x247c7d,_0x297a83,_0x2b9a7b){const _0x3dd245=_0x241074;if(_0x2b9a7b>_0x247c7d[_0x3dd245(0x296)][_0x3dd245(0x285)])return _0x3dd245(0x1ff);if(_0x20fb19[_0x3dd245(0x394)][_0x3dd245(0x2ed)]+_0x2b9a7b>_0x20fb19[_0x3dd245(0x394)][_0x3dd245(0x240)])return _0x3dd245(0x310);const _0x549db6=await lstat(join(_0x3fbccd[_0x3dd245(0x26c)],_0x297a83))[_0x3dd245(0x373)](_0x3f4363=>{const _0x4d1832=_0x3dd245;if(_0x3f4363[_0x4d1832(0x33b)]===_0x4d1832(0x223))return undefined;throw _0x3f4363;});return _0x549db6===undefined?_0x3dd245(0x255):_0x3dd245(0x39c);}[_0x241074(0x399)](_0x485527,_0x55b03c){const _0x45cc1a=_0x241074,_0x5b262d=[{'logicalPath':_0x45cc1a(0x31e),'physicalPath':_0x55b03c[_0x45cc1a(0x397)],'writable':![]},{'logicalPath':_0x45cc1a(0x238),'physicalPath':_0x485527[_0x45cc1a(0x26c)],'writable':!![]},{'logicalPath':_0x45cc1a(0x291),'physicalPath':_0x485527[_0x45cc1a(0x38d)],'writable':!![]}];if(_0x55b03c[_0x45cc1a(0x31c)]!==undefined)_0x5b262d[_0x45cc1a(0x281)]({'logicalPath':_0x55b03c[_0x45cc1a(0x31c)],'physicalPath':_0x55b03c[_0x45cc1a(0x397)],'writable':![]},{'logicalPath':join(_0x55b03c[_0x45cc1a(0x31c)],_0x45cc1a(0x2e5)),'physicalPath':_0x485527[_0x45cc1a(0x26c)],'writable':!![]},{'logicalPath':join(_0x55b03c[_0x45cc1a(0x31c)],_0x45cc1a(0x36c)),'physicalPath':_0x485527[_0x45cc1a(0x38d)],'writable':!![]});return _0x5b262d;}[_0x241074(0x284)](_0x402f24,_0x4e77d3,_0x291e69=_0x402f24[_0x241074(0x252)]){const _0x34a8b5=_0x241074;return this[_0x34a8b5(0x239)][_0x34a8b5(0x25e)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x4e77d3[_0x34a8b5(0x397)],..._0x4e77d3[_0x34a8b5(0x31c)]===undefined?{}:{'sourceWorkspacePath':_0x4e77d3[_0x34a8b5(0x31c)]},'inboxDirectory':_0x402f24[_0x34a8b5(0x26c)],'outputDirectory':_0x402f24[_0x34a8b5(0x38d)],'temporaryDirectory':_0x291e69,'networkMode':_0x4e77d3[_0x34a8b5(0x270)][_0x34a8b5(0x2e8)]});}[_0x241074(0x29e)](_0x5a5538){const _0x15fcda=_0x241074,_0x49568e=this[_0x15fcda(0x239)][_0x15fcda(0x22c)][_0x15fcda(0x2cc)][_0x15fcda(0x28c)](_0x15fcda(0x35e))[_0x15fcda(0x364)](_0x5a5538);if(_0x49568e===undefined)return undefined;if(typeof _0x49568e['id']!==_0x15fcda(0x2eb))throw new Error(_0x15fcda(0x2a3));return _0x49568e['id'];}async[_0x241074(0x231)](_0x2230ee,_0x475303,_0x3b3b1b=![]){const _0x4d4809=_0x241074,_0x30349c=this[_0x4d4809(0x239)][_0x4d4809(0x22c)][_0x4d4809(0x2cc)][_0x4d4809(0x28c)](_0x4d4809(0x2fa))[_0x4d4809(0x364)](_0x2230ee,_0x475303);if(_0x30349c===undefined||_0x30349c[_0x4d4809(0x23c)]!==_0x4d4809(0x2e0)&&_0x30349c[_0x4d4809(0x23c)]!==_0x4d4809(0x2c1)||_0x30349c[_0x4d4809(0x37c)]!==HOST_POLICY_VERSION||typeof _0x30349c[_0x4d4809(0x384)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x33c)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x211)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x242)]!==_0x4d4809(0x2eb)||typeof _0x30349c[_0x4d4809(0x34d)]!==_0x4d4809(0x2eb))throw new Error(_0x4d4809(0x2a3));const _0xca6b18=this[_0x4d4809(0x239)][_0x4d4809(0x286)][_0x4d4809(0x37e)](_0x30349c[_0x4d4809(0x384)]),_0x47f59a=join(_0xca6b18,_0x4d4809(0x271)),_0x408415=join(_0xca6b18,_0x4d4809(0x25a)),_0x1fe74d=await lstat(_0x47f59a)[_0x4d4809(0x373)](()=>undefined),_0x47104d=await lstat(_0x408415)[_0x4d4809(0x373)](()=>undefined);if(_0x1fe74d===undefined||!_0x1fe74d[_0x4d4809(0x1fd)]()||_0x1fe74d[_0x4d4809(0x280)]()||_0x47104d===undefined||!_0x47104d[_0x4d4809(0x37b)]()||_0x47104d[_0x4d4809(0x280)]())throw new Error(_0x4d4809(0x2a3));let _0x17ea8;try{const _0x1d35cf=await readFile(_0x47f59a,_0x4d4809(0x2f6)),_0x1c049a=_0x1d35cf[_0x4d4809(0x2ad)]('\x0a')?_0x1d35cf[_0x4d4809(0x221)](-0xd4f+-0x1*0x511+-0x188*-0xc,-(0x156d+-0x1166+-0x406)):_0x1d35cf;if(_0x1c049a!==_0x30349c[_0x4d4809(0x33c)]||createHash(_0x4d4809(0x269))[_0x4d4809(0x2fb)](_0x1c049a)[_0x4d4809(0x361)](_0x4d4809(0x385))!==_0x30349c[_0x4d4809(0x242)])throw new Error(_0x4d4809(0x2a3));_0x17ea8=JSON[_0x4d4809(0x36a)](_0x1c049a);}catch{throw new Error(_0x4d4809(0x2a3));}if(!record(_0x17ea8))throw new Error(_0x4d4809(0x2a3));const _0x417ab6=publishedTemplateSnapshot(_0x17ea8),_0x4970b6=publishedTemplateDraft(_0x417ab6[_0x4d4809(0x2aa)],_0x17ea8[_0x4d4809(0x270)]),_0x4fbefb=_0x4970b6[_0x4d4809(0x270)],_0x1f2f0f=publishedMcpServers(_0x17ea8[_0x4d4809(0x217)]),_0x4a9ae7=publishedTemplateContentHash(_0x417ab6[_0x4d4809(0x391)],_0x417ab6[_0x4d4809(0x1f2)],_0x417ab6[_0x4d4809(0x2aa)]),_0x1c7952=_0x417ab6[_0x4d4809(0x1f2)][_0x4d4809(0x329)]((_0x250019,_0x2b28d2)=>_0x250019+_0x2b28d2[_0x4d4809(0x393)],0xa7*0x28+0x201e+-0x3a36*0x1);if(_0x17ea8[_0x4d4809(0x377)]!==_0x30349c[_0x4d4809(0x34d)]||createHash(_0x4d4809(0x269))[_0x4d4809(0x2fb)](JSON[_0x4d4809(0x282)](_0x1f2f0f))[_0x4d4809(0x361)](_0x4d4809(0x385))!==_0x30349c[_0x4d4809(0x34d)]||_0x17ea8[_0x4d4809(0x2a4)]!==_0x30349c[_0x4d4809(0x211)]||_0x4a9ae7!==_0x30349c[_0x4d4809(0x211)]||_0x30349c[_0x4d4809(0x341)]!==_0x417ab6[_0x4d4809(0x1f2)][_0x4d4809(0x315)]||_0x30349c[_0x4d4809(0x289)]!==_0x1c7952)throw new Error(_0x4d4809(0x2a3));if(_0x17ea8[_0x4d4809(0x302)]!==_0x2230ee||_0x17ea8[_0x4d4809(0x38b)]!==_0x475303||_0x17ea8[_0x4d4809(0x20a)]!==HOST_POLICY_VERSION||_0x4fbefb[_0x4d4809(0x38b)]!==_0x475303||_0x4fbefb[_0x4d4809(0x36d)]!==this[_0x4d4809(0x239)][_0x4d4809(0x36d)]())throw new Error(_0x4d4809(0x2a3));if(_0x3b3b1b)await verifyPublishedTemplateContent(_0x408415,_0x417ab6[_0x4d4809(0x391)],_0x417ab6[_0x4d4809(0x1f2)]);return{'id':_0x2230ee,'templateId':_0x475303,'storageKey':_0x30349c[_0x4d4809(0x384)],'templateDirectory':_0x408415,..._0x417ab6[_0x4d4809(0x31c)]===undefined?{}:{'sourceWorkspacePath':_0x417ab6[_0x4d4809(0x31c)]},'draft':_0x4fbefb,'modelPolicy':_0x4970b6[_0x4d4809(0x332)],'mcpServers':_0x1f2f0f};}}function hostedRequest(_0x2b298b){const _0xe02777=_0x241074;if(!record(_0x2b298b))throw new Error(_0xe02777(0x37a));const {__requestUserId:_0x5e6f63,__template:_0x169a1b,__marAgentModel:_0x4cbcdb,__marAgentModels:_0x6f0e48,__marAgentRuntimeScopeId:_0x98fc84,__workspaceWatchSessionHash:_0x59698b,__templateDeleted:_0x2dd8d5,..._0x1747c8}=_0x2b298b;if(typeof _0x5e6f63!==_0xe02777(0x230)||!Number[_0xe02777(0x26d)](_0x5e6f63)||_0x5e6f63<=-0x661+0x108b+0x515*-0x2)throw new Error(_0xe02777(0x37a));if(_0x2dd8d5!==undefined&&_0x2dd8d5!==!![])throw new Error(_0xe02777(0x37a));if(_0x98fc84!==undefined&&(typeof _0x98fc84!==_0xe02777(0x2eb)||_0x98fc84[_0xe02777(0x315)]===-0x1a5d*0x1+0x2d3*-0x7+-0x1*-0x2e22))throw new Error(_0xe02777(0x37a));return{'data':_0x1747c8,'userId':_0x5e6f63,..._0x169a1b===undefined?{}:{'template':_0x169a1b},..._0x4cbcdb===undefined?{}:{'model':_0x4cbcdb},..._0x6f0e48===undefined?{}:{'models':_0x6f0e48},..._0x98fc84===undefined?{}:{'runtimeScopeId':_0x98fc84},..._0x59698b===undefined?{}:{'sessionHash':_0x59698b},..._0x2dd8d5===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x30db73){const _0x511a98=_0x241074;if(typeof _0x30db73!==_0x511a98(0x2eb)||_0x30db73[_0x511a98(0x315)]===-0x207f+-0x3*-0xc3d+0x14*-0x36)throw new Error(_0x511a98(0x37a));return _0x30db73;}function watchOwnerKey(_0x2208fd,_0x5a7765){return _0x2208fd+':'+_0x5a7765;}function runtimeModels(_0x10edb2){const _0x3c22fa=_0x241074;return marAgentRuntimeModelConfigurationSchema[_0x3c22fa(0x229)]()[_0x3c22fa(0x36a)](_0x10edb2);}function allowedModels(_0xd0b417,_0x4de426){const _0x725279=_0x241074,_0x4ac748=new Set(_0xd0b417[_0x725279(0x332)][_0x725279(0x35f)]);return _0x4de426[_0x725279(0x3a0)](_0x2d7e17=>_0x2d7e17[_0x725279(0x1f7)]&&_0x4ac748[_0x725279(0x382)](_0xd0b417[_0x725279(0x332)][_0x725279(0x33f)]===_0x725279(0x244)?_0x2d7e17[_0x725279(0x2d1)]:_0x2d7e17['id']));}function selectModel(_0x37bfc2,_0x2728bd,_0x59a1ae){const _0x105f92=_0x241074,_0xbb01b8=allowedModels(_0x37bfc2,_0x2728bd),_0x2977a7=_0xbb01b8[_0x105f92(0x2e9)](_0xa261a4=>_0xa261a4['id']===_0x59a1ae);if(_0x2977a7!==undefined)return _0x2977a7;const _0x38e98f=_0xbb01b8[_0x105f92(0x2e9)](_0x55a231=>(_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x33f)]===_0x105f92(0x244)?_0x55a231[_0x105f92(0x2d1)]:_0x55a231['id'])===_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x3a1)]);if(_0x38e98f!==undefined)return _0x38e98f;const _0x2c86e0=_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x35f)][_0x105f92(0x2f7)](_0x5c1ab6=>_0xbb01b8[_0x105f92(0x2e9)](_0x2c5b40=>(_0x37bfc2[_0x105f92(0x332)][_0x105f92(0x33f)]===_0x105f92(0x244)?_0x2c5b40[_0x105f92(0x2d1)]:_0x2c5b40['id'])===_0x5c1ab6))[_0x105f92(0x2e9)](_0x3fdd0d=>_0x3fdd0d!==undefined);if(_0x2c86e0===undefined)throw new Error(_0x105f92(0x2e7));return _0x2c86e0;}function publishedTemplateDraft(_0xb79aa9,_0x368587){const _0x3f5e48=_0x241074,_0x40031f=conversationTemplateDraftSchema[_0x3f5e48(0x21b)](_0x368587);if(_0x40031f[_0x3f5e48(0x2ee)]){const {allowedModels:_0x42ce4d,defaultModelId:_0xa877d2,..._0x5bfa80}=_0x40031f[_0x3f5e48(0x30e)];return{'draft':_0x5bfa80,'modelPolicy':{'identity':_0x3f5e48(0x244),'allowedIds':_0x42ce4d[_0x3f5e48(0x2f7)](_0x5de4c7=>_0x5de4c7[_0x3f5e48(0x2d1)]),'defaultId':_0xa877d2}};}if(_0xb79aa9!==0x7*0x286+0x205d+-0x3206||!record(_0x368587)||_0x3f5e48(0x2da)in _0x368587||!Array[_0x3f5e48(0x298)](_0x368587[_0x3f5e48(0x2c3)]))throw new Error(_0x3f5e48(0x2a3));const _0x20bb0d=_0x368587[_0x3f5e48(0x2c3)],_0x1d8b36={..._0x368587};delete _0x1d8b36[_0x3f5e48(0x2c3)];const _0x50f1fc=conversationTemplateDraftSchema[_0x3f5e48(0x21b)]({..._0x1d8b36,'allowedModels':_0x20bb0d[_0x3f5e48(0x2f7)](_0x363fa6=>({'modelId':_0x363fa6,'name':_0x363fa6}))});if(!_0x50f1fc[_0x3f5e48(0x2ee)])throw new Error(_0x3f5e48(0x2a3));const {allowedModels:_0x3a29ff,defaultModelId:_0x6d2911,..._0x587c90}=_0x50f1fc[_0x3f5e48(0x30e)];return{'draft':_0x587c90,'modelPolicy':{'identity':_0x3f5e48(0x357),'allowedIds':_0x3a29ff[_0x3f5e48(0x2f7)](_0x1195a0=>_0x1195a0[_0x3f5e48(0x2d1)]),'defaultId':_0x6d2911}};}function networkModels(_0x19c0da,_0x4fcc8e){const _0x1e0693=_0x241074;if(_0x4fcc8e!==_0x1e0693(0x34f))return _0x19c0da;return _0x19c0da[_0x1e0693(0x2f7)](_0x44e34a=>_0x44e34a[_0x1e0693(0x283)]?{..._0x44e34a,'hostedWebSearch':![]}:_0x44e34a);}function publishedMcpServers(_0x235b85){const _0x2f59e3=_0x241074;if(!Array[_0x2f59e3(0x298)](_0x235b85))throw new Error(_0x2f59e3(0x2a3));return _0x235b85[_0x2f59e3(0x2f7)](_0xed66fc=>{const _0x3a2def=_0x2f59e3;if(!record(_0xed66fc))throw new Error(_0x3a2def(0x2a3));const _0x3d4eae=Object[_0x3a2def(0x29b)](_0xed66fc)[_0x3a2def(0x2c5)]()[_0x3a2def(0x349)](',');if(_0x3d4eae!==_0x3a2def(0x26b))throw new Error(_0x3a2def(0x2a3));const _0x25c60e=mcpRuntimeDescriptorSchema[_0x3a2def(0x36a)](_0xed66fc[_0x3a2def(0x266)]),_0x5170e9=mcpInstallationConfigurationSchema[_0x3a2def(0x36a)](_0xed66fc[_0x3a2def(0x27e)]);if(typeof _0xed66fc['id']!==_0x3a2def(0x2eb)||typeof _0xed66fc[_0x3a2def(0x327)]!==_0x3a2def(0x2eb)||typeof _0xed66fc[_0x3a2def(0x28a)]!==_0x3a2def(0x2eb)||typeof _0xed66fc[_0x3a2def(0x216)]!==_0x3a2def(0x2eb)||_0xed66fc[_0x3a2def(0x2e4)]!==_0x3a2def(0x335)&&_0xed66fc[_0x3a2def(0x2e4)]!==_0x3a2def(0x2b9)||_0xed66fc[_0x3a2def(0x350)]!==_0x25c60e[_0x3a2def(0x350)])throw new Error(_0x3a2def(0x2a3));return{'id':_0xed66fc['id'],'serverName':_0xed66fc[_0x3a2def(0x327)],'displayName':_0xed66fc[_0x3a2def(0x28a)],'version':_0xed66fc[_0x3a2def(0x216)],'origin':_0xed66fc[_0x3a2def(0x2e4)],'transport':_0x25c60e[_0x3a2def(0x350)],'runtime':_0x25c60e,'configuration':_0x5170e9};});}function publishedTemplateSnapshot(_0x9bc1fb){const _0x4be924=_0x241074;if(_0x9bc1fb[_0x4be924(0x2aa)]===0xa72+-0x19ea+0xf79){const _0x1b73f7=publishedTemplateFiles(_0x9bc1fb[_0x4be924(0x386)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x1b73f7),'entries':_0x1b73f7};}if(_0x9bc1fb[_0x4be924(0x2aa)]!==0x73+-0x3*-0x3d1+0x5f2*-0x2||typeof _0x9bc1fb[_0x4be924(0x31c)]!==_0x4be924(0x2eb)||!Array[_0x4be924(0x298)](_0x9bc1fb[_0x4be924(0x391)])||!Array[_0x4be924(0x298)](_0x9bc1fb[_0x4be924(0x1f2)]))throw new Error(_0x4be924(0x2a3));validatePublishedSourceWorkspacePath(_0x9bc1fb[_0x4be924(0x31c)]);const _0x405ceb=_0x9bc1fb[_0x4be924(0x391)][_0x4be924(0x2f7)](safePublishedTemplateRelativePath);if(new Set(_0x405ceb)[_0x4be924(0x393)]!==_0x405ceb[_0x4be924(0x315)]||_0x405ceb[_0x4be924(0x295)](_0x4be924(0x2e5))||_0x405ceb[_0x4be924(0x295)](_0x4be924(0x36c)))throw new Error(_0x4be924(0x2a3));const _0x3abe4a=_0x9bc1fb[_0x4be924(0x1f2)][_0x4be924(0x2f7)](publishedTemplateEntry);if(new Set(_0x3abe4a[_0x4be924(0x2f7)](_0x33cb23=>_0x33cb23[_0x4be924(0x297)]))[_0x4be924(0x393)]!==_0x3abe4a[_0x4be924(0x315)])throw new Error(_0x4be924(0x2a3));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x9bc1fb[_0x4be924(0x31c)],'directories':_0x405ceb,'entries':_0x3abe4a};}function publishedTemplateEntry(_0x283e63){const _0x1cee2a=_0x241074;if(!record(_0x283e63))throw new Error(_0x1cee2a(0x2a3));if(_0x283e63[_0x1cee2a(0x30d)]===_0x1cee2a(0x352))return publishedTemplateFile(_0x283e63,!![]);if(_0x283e63[_0x1cee2a(0x30d)]!==_0x1cee2a(0x234)||typeof _0x283e63[_0x1cee2a(0x278)]!==_0x1cee2a(0x2eb)||_0x283e63[_0x1cee2a(0x278)][_0x1cee2a(0x315)]===0x2f*0x7c+-0xae5+-0xbdf||_0x283e63[_0x1cee2a(0x278)][_0x1cee2a(0x295)]('\x00')||_0x283e63[_0x1cee2a(0x246)]!==_0x1cee2a(0x257)&&_0x283e63[_0x1cee2a(0x246)]!==_0x1cee2a(0x398)||typeof _0x283e63[_0x1cee2a(0x2ac)]!==_0x1cee2a(0x2eb))throw new Error(_0x1cee2a(0x2a3));const _0x24ce17=safePublishedTemplateRelativePath(_0x283e63[_0x1cee2a(0x297)]),_0x1d1497=safePublishedTemplateSize(_0x283e63[_0x1cee2a(0x393)]),_0x33293c=_0x283e63[_0x1cee2a(0x278)],_0x173a77=_0x283e63[_0x1cee2a(0x246)],_0x817c28=_0x283e63[_0x1cee2a(0x2ac)];if(_0x1d1497!==Buffer[_0x1cee2a(0x228)](_0x33293c))throw new Error(_0x1cee2a(0x2a3));if(_0x173a77===_0x1cee2a(0x257))safePublishedTemplateRelativePath(_0x817c28);else{if(!isAbsolute(_0x817c28)||!RUNTIME_LINK_ROOTS[_0x1cee2a(0x343)](_0x582c93=>_0x817c28===_0x582c93||within(_0x582c93,_0x817c28)))throw new Error(_0x1cee2a(0x2a3));}return{'kind':_0x1cee2a(0x234),'relativePath':_0x24ce17,'size':_0x1d1497,'linkTarget':_0x33293c,'targetKind':_0x173a77,'resolvedTarget':_0x817c28};}function publishedTemplateFiles(_0x5d5988){const _0x45e0be=_0x241074;if(!Array[_0x45e0be(0x298)](_0x5d5988))throw new Error(_0x45e0be(0x2a3));const _0x392f10=new Set();return _0x5d5988[_0x45e0be(0x2f7)](_0x4ada14=>{const _0x538baf=_0x45e0be,_0x370966=publishedTemplateFile(_0x4ada14);if(_0x392f10[_0x538baf(0x382)](_0x370966[_0x538baf(0x297)]))throw new Error(_0x538baf(0x2a3));return _0x392f10[_0x538baf(0x333)](_0x370966[_0x538baf(0x297)]),_0x370966;});}function publishedTemplateFile(_0x1f835e,_0x30e0d9=![]){const _0x59799a=_0x241074;if(!record(_0x1f835e)||_0x30e0d9&&_0x1f835e[_0x59799a(0x30d)]!==_0x59799a(0x352)||typeof _0x1f835e[_0x59799a(0x2b2)]!==_0x59799a(0x20b)||typeof _0x1f835e[_0x59799a(0x269)]!==_0x59799a(0x2eb)||!/^[a-f0-9]{64}$/u[_0x59799a(0x20c)](_0x1f835e[_0x59799a(0x269)]))throw new Error(_0x59799a(0x2a3));return{'kind':_0x59799a(0x352),'relativePath':safePublishedTemplateRelativePath(_0x1f835e[_0x59799a(0x297)]),'size':safePublishedTemplateSize(_0x1f835e[_0x59799a(0x393)]),'executable':_0x1f835e[_0x59799a(0x2b2)],'sha256':_0x1f835e[_0x59799a(0x269)]};}function safePublishedTemplateRelativePath(_0x90f21a){const _0xd0bcea=_0x241074;if(typeof _0x90f21a!==_0xd0bcea(0x2eb)||_0x90f21a[_0xd0bcea(0x315)]===-0x184f+-0x1f5f+0x37ae*0x1||_0x90f21a[_0xd0bcea(0x28f)]('/')||_0x90f21a[_0xd0bcea(0x295)]('\x5c')||_0x90f21a[_0xd0bcea(0x307)]('/')[_0xd0bcea(0x343)](_0x38ef2e=>_0x38ef2e[_0xd0bcea(0x315)]===0x1*0x775+0x4*0x7bb+-0x2661*0x1||_0x38ef2e==='.'||_0x38ef2e==='..'))throw new Error(_0xd0bcea(0x2a3));return _0x90f21a;}function safePublishedTemplateSize(_0x51c11c){const _0x53d07f=_0x241074;if(!Number[_0x53d07f(0x26d)](_0x51c11c)||_0x51c11c<-0xaf9+0x18a8+-0x71*0x1f)throw new Error(_0x53d07f(0x2a3));return _0x51c11c;}function legacyPublishedTemplateDirectories(_0x301603){const _0x26f761=_0x241074,_0x17f2a0=new Set();for(const _0x29b3dc of _0x301603){const _0x21f280=_0x29b3dc[_0x26f761(0x297)][_0x26f761(0x307)]('/');for(let _0x2b95c4=-0x3*-0x656+0x13a9+-0x31*0xca;_0x2b95c4<_0x21f280[_0x26f761(0x315)];_0x2b95c4+=-0x371*-0x6+0x205a+0x1*-0x34ff)_0x17f2a0[_0x26f761(0x333)](_0x21f280[_0x26f761(0x221)](0x1492+0xdac+0x12*-0x1e7,_0x2b95c4)[_0x26f761(0x349)]('/'));}return[..._0x17f2a0][_0x26f761(0x2c5)]((_0x4f5f06,_0x40bb16)=>_0x4f5f06[_0x26f761(0x20f)](_0x40bb16,_0x26f761(0x2f8)));}function publishedTemplateContentHash(_0x181cef,_0x38f1d3,_0x2ebb02){const _0x140b4b=_0x241074,_0x21f100=_0x2ebb02===-0x1976+-0x98e+-0x701*-0x5?_0x38f1d3[_0x140b4b(0x2f7)](_0x2dfc57=>{const _0x6b0d7d=_0x140b4b;if(_0x2dfc57[_0x6b0d7d(0x30d)]!==_0x6b0d7d(0x352))throw new Error(_0x6b0d7d(0x2a3));return _0x2dfc57[_0x6b0d7d(0x297)]+'\x00'+_0x2dfc57[_0x6b0d7d(0x393)]+'\x00'+_0x2dfc57[_0x6b0d7d(0x269)];})[_0x140b4b(0x349)]('\x0a'):[..._0x181cef[_0x140b4b(0x2f7)](_0x306a2e=>_0x140b4b(0x313)+_0x306a2e),..._0x38f1d3[_0x140b4b(0x2f7)](_0x1dca09=>_0x1dca09[_0x140b4b(0x30d)]===_0x140b4b(0x352)?_0x1dca09[_0x140b4b(0x30d)]+'\x00'+_0x1dca09[_0x140b4b(0x297)]+'\x00'+_0x1dca09[_0x140b4b(0x393)]+'\x00'+(_0x1dca09[_0x140b4b(0x2b2)]?0x1*0xed5+-0x2c2+-0xc12:-0x224b+0x563*-0x5+0x3d3a)+'\x00'+_0x1dca09[_0x140b4b(0x269)]:_0x1dca09[_0x140b4b(0x30d)]+'\x00'+_0x1dca09[_0x140b4b(0x297)]+'\x00'+_0x1dca09[_0x140b4b(0x393)]+'\x00'+_0x1dca09[_0x140b4b(0x278)]+'\x00'+_0x1dca09[_0x140b4b(0x246)]+'\x00'+_0x1dca09[_0x140b4b(0x2ac)])][_0x140b4b(0x349)]('\x0a');return createHash(_0x140b4b(0x269))[_0x140b4b(0x2fb)](_0x21f100)[_0x140b4b(0x361)](_0x140b4b(0x385));}async function verifyPublishedTemplateContent(_0x5782ef,_0x2be3f5,_0x385969){const _0x564081=_0x241074,_0x32fac2=new Map(_0x385969[_0x564081(0x2f7)](_0x35c59f=>[_0x35c59f[_0x564081(0x297)],_0x35c59f])),_0x429581=new Set([..._0x2be3f5,_0x564081(0x2e5),_0x564081(0x36c)]),_0x1f34b5=new Set(),_0x200eb1=await listPublishedTemplateEntries(_0x5782ef,_0x429581,_0x1f34b5);if(_0x200eb1[_0x564081(0x315)]!==_0x32fac2[_0x564081(0x393)]||_0x1f34b5[_0x564081(0x393)]!==_0x429581[_0x564081(0x393)])throw new Error(_0x564081(0x2a3));for(const _0xa8f3ab of _0x200eb1){const _0x44a458=_0x32fac2[_0x564081(0x364)](_0xa8f3ab[_0x564081(0x297)]);if(_0x44a458===undefined||_0x44a458[_0x564081(0x30d)]!==_0xa8f3ab[_0x564081(0x30d)])throw new Error(_0x564081(0x2a3));if(_0x44a458[_0x564081(0x30d)]===_0x564081(0x352)&&_0xa8f3ab[_0x564081(0x30d)]===_0x564081(0x352)){if(_0x44a458[_0x564081(0x393)]!==_0xa8f3ab[_0x564081(0x393)]||_0x44a458[_0x564081(0x2b2)]!==_0xa8f3ab[_0x564081(0x2b2)]||_0xa8f3ab[_0x564081(0x22a)]!==(_0x44a458[_0x564081(0x2b2)]?-0xe7c+-0x205*-0x5+-0x1*-0x5d0:0x5*-0x329+0x3*0x25a+0x9e3)||_0x44a458[_0x564081(0x269)]!==_0xa8f3ab[_0x564081(0x269)])throw new Error(_0x564081(0x2a3));continue;}if(_0x44a458[_0x564081(0x30d)]!==_0x564081(0x234)||_0xa8f3ab[_0x564081(0x30d)]!==_0x564081(0x234)||_0x44a458[_0x564081(0x393)]!==_0xa8f3ab[_0x564081(0x393)]||_0x44a458[_0x564081(0x278)]!==_0xa8f3ab[_0x564081(0x278)])throw new Error(_0x564081(0x2a3));await verifyPublishedSymlinkResolution(_0x5782ef,_0x44a458,_0xa8f3ab[_0x564081(0x2f0)]);}}async function verifyPublishedSymlinkResolution(_0x246686,_0x2c26f7,_0x276982){const _0x91d3af=_0x241074;let _0x3459eb;try{_0x3459eb=await realpath(_0x276982);}catch{throw new Error(_0x91d3af(0x2a3));}if(_0x2c26f7[_0x91d3af(0x246)]===_0x91d3af(0x398)){if(_0x3459eb!==_0x2c26f7[_0x91d3af(0x2ac)])throw new Error(_0x91d3af(0x2a3));return;}let _0x22f94a,_0x4824e5;try{[_0x22f94a,_0x4824e5]=await Promise[_0x91d3af(0x32b)]([realpath(join(_0x246686,..._0x2c26f7[_0x91d3af(0x2ac)][_0x91d3af(0x307)]('/'))),realpath(_0x246686)]);}catch{throw new Error(_0x91d3af(0x2a3));}if(_0x3459eb!==_0x22f94a||!within(_0x4824e5,_0x3459eb))throw new Error(_0x91d3af(0x2a3));}function _0x3fd3(_0x2c6c40,_0x2ca74c){_0x2c6c40=_0x2c6c40-(0x1556+0x1*0x1588+-0x28ec);const _0x359b65=_0x22ba();let _0x2b24e3=_0x359b65[_0x2c6c40];if(_0x3fd3['dmMbed']===undefined){var _0x16b487=function(_0x477c85){const _0x4f50b1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x227f1b='',_0x50bc08='';for(let _0x3bf42f=0x17b6+-0x10b7+-0x6ff,_0x13b960,_0x56885b,_0x3768c4=-0x26f6+0x38b+0x236b;_0x56885b=_0x477c85['charAt'](_0x3768c4++);~_0x56885b&&(_0x13b960=_0x3bf42f%(0x4*-0x863+0x1*-0x164e+0x37de)?_0x13b960*(-0x4bf*0x3+-0x1ed2+-0x7*-0x679)+_0x56885b:_0x56885b,_0x3bf42f++%(0x2*-0xa7+-0xf5f+-0x10b1*-0x1))?_0x227f1b+=String['fromCharCode'](0x1*-0x1916+-0x1*0x1a69+0x347e&_0x13b960>>(-(-0x957+-0x1785+0x20de)*_0x3bf42f&0x104+-0x6bb*0x3+0x1333*0x1)):-0x7*-0x3be+0x1d6+-0x1c08){_0x56885b=_0x4f50b1['indexOf'](_0x56885b);}for(let _0xc00053=0xd*-0x135+-0x578+-0x1*-0x1529,_0x34dc7f=_0x227f1b['length'];_0xc00053<_0x34dc7f;_0xc00053++){_0x50bc08+='%'+('00'+_0x227f1b['charCodeAt'](_0xc00053)['toString'](0xaed+-0x43+-0xa9a))['slice'](-(-0x85d*-0x1+-0x1052+0x7f7));}return decodeURIComponent(_0x50bc08);};_0x3fd3['pWSyQk']=_0x16b487,_0x3fd3['nFGvkD']={},_0x3fd3['dmMbed']=!![];}const _0x5dd6c6=_0x359b65[0x14ab+0x1*-0x23c5+0xf1a];_0x3fd3['JEBqeQ']!==_0x5dd6c6&&(_0x3fd3['nFGvkD']={},_0x3fd3['JEBqeQ']=_0x5dd6c6);const _0x5a1b0d=_0x3fd3['nFGvkD'][_0x2c6c40];return _0x5a1b0d===undefined?(_0x2b24e3=_0x3fd3['pWSyQk'](_0x2b24e3),_0x3fd3['nFGvkD'][_0x2c6c40]=_0x2b24e3):_0x2b24e3=_0x5a1b0d,_0x2b24e3;}async function listPublishedTemplateEntries(_0x7ca5d5,_0x3f515a,_0x245212,_0x378de2=''){const _0x2f4041=_0x241074,_0x51d4e0=await lstat(_0x7ca5d5);if(!_0x51d4e0[_0x2f4041(0x37b)]()||_0x51d4e0[_0x2f4041(0x280)]()||(_0x51d4e0[_0x2f4041(0x22a)]&-0x3*0x2c3+0x1*0xc1b+-0x1d3)!==-0x88+-0x269b+0x2890*0x1)throw new Error(_0x2f4041(0x2a3));const _0x2c456e=[];for(const _0x450b29 of await readdir(_0x7ca5d5,{'withFileTypes':!![]})){const _0x3f297f=join(_0x7ca5d5,_0x450b29[_0x2f4041(0x2e3)]),_0x5d87e1=_0x378de2[_0x2f4041(0x315)]===-0x676+-0x24ad+0x9*0x4cb?_0x450b29[_0x2f4041(0x2e3)]:_0x378de2+'/'+_0x450b29[_0x2f4041(0x2e3)],_0x3dd86f=await lstat(_0x3f297f);if(_0x3dd86f[_0x2f4041(0x280)]()){const _0x591501=await readlink(_0x3f297f);_0x2c456e[_0x2f4041(0x281)]({'kind':_0x2f4041(0x234),'relativePath':_0x5d87e1,'size':Buffer[_0x2f4041(0x228)](_0x591501),'linkTarget':_0x591501,'sourcePath':_0x3f297f});continue;}if(_0x3dd86f[_0x2f4041(0x37b)]()){if(!_0x3f515a[_0x2f4041(0x382)](_0x5d87e1))throw new Error(_0x2f4041(0x2a3));_0x245212[_0x2f4041(0x333)](_0x5d87e1),_0x2c456e[_0x2f4041(0x281)](...await listPublishedTemplateEntries(_0x3f297f,_0x3f515a,_0x245212,_0x5d87e1));}else{if(!_0x3dd86f[_0x2f4041(0x1fd)]()||_0x3dd86f[_0x2f4041(0x2af)]!==0x8*-0x42a+-0x12e*0x5+0x1*0x2737||!Number[_0x2f4041(0x26d)](_0x3dd86f[_0x2f4041(0x393)]))throw new Error(_0x2f4041(0x2a3));_0x2c456e[_0x2f4041(0x281)]({'kind':_0x2f4041(0x352),'relativePath':_0x5d87e1,'size':_0x3dd86f[_0x2f4041(0x393)],'executable':(_0x3dd86f[_0x2f4041(0x22a)]&-0x1b5*-0x14+-0x100d+-0x2*0x8e7)!==-0xd2d+-0x3c*-0xc+0xa5d,'mode':_0x3dd86f[_0x2f4041(0x22a)]&-0x184a+0x264e+-0xc05,'sha256':createHash(_0x2f4041(0x269))[_0x2f4041(0x2fb)](await readFile(_0x3f297f))[_0x2f4041(0x361)](_0x2f4041(0x385))});}}return _0x2c456e;}function validatePublishedSourceWorkspacePath(_0x2052bd){const _0x4c3ff1=_0x241074;if(!isAbsolute(_0x2052bd)||resolve(_0x2052bd)!==_0x2052bd||_0x2052bd==='/'||RESERVED_SANDBOX_ROOTS[_0x4c3ff1(0x343)](_0x338d40=>_0x2052bd===_0x338d40||within(_0x338d40,_0x2052bd)||within(_0x2052bd,_0x338d40)))throw new Error(_0x4c3ff1(0x2a3));}function within(_0x3d2018,_0x26a2eb){const _0x48dd7d=_0x241074,_0x17a745=relative(_0x3d2018,_0x26a2eb);return _0x17a745[_0x48dd7d(0x315)]>0x1*0xf2f+0x85*0xf+-0x16fa&&_0x17a745!=='..'&&!_0x17a745[_0x48dd7d(0x28f)]('..'+sep);}function resolveMcpServers(_0xba1038,_0x3c42e1){const _0x31fa32=_0x241074,_0x33c07d=_0x329451=>{const _0x32229f=_0x3fd3,_0x4c7e56={};for(const [_0x5c7d8c,_0xfa47a6]of Object[_0x32229f(0x1f2)](_0x329451??{})){const _0x1aaee1=_0x3c42e1[_0xfa47a6[_0x32229f(0x23d)]];if(_0x1aaee1===undefined)throw new Error(_0x32229f(0x220));_0x4c7e56[_0x5c7d8c]=_0x1aaee1;}return _0x4c7e56;};return _0xba1038[_0x31fa32(0x217)][_0x31fa32(0x209)](_0x4cd9c3=>{const _0x24c50f=_0x31fa32;if(_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x350)]===_0x24c50f(0x2ce)){if(_0xba1038[_0x24c50f(0x270)][_0x24c50f(0x2e8)]!==_0x24c50f(0x1fb))return[];return[{'name':_0x4cd9c3[_0x24c50f(0x327)],'lifecycle':_0x24c50f(0x376),'transport':_0x24c50f(0x2ce),'url':_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x30b)],'headers':{..._0x33c07d(_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x38a)]),..._0x33c07d(_0x4cd9c3[_0x24c50f(0x27e)][_0x24c50f(0x38a)])}}];}return[{'name':_0x4cd9c3[_0x24c50f(0x327)],'lifecycle':_0x24c50f(0x376),'transport':_0x24c50f(0x2de),'command':_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x2ca)],'args':[..._0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x287)],..._0x4cd9c3[_0x24c50f(0x27e)][_0x24c50f(0x2dd)]??[]],'environment':{..._0x33c07d(_0x4cd9c3[_0x24c50f(0x266)][_0x24c50f(0x224)]),..._0x33c07d(_0x4cd9c3[_0x24c50f(0x27e)][_0x24c50f(0x224)])}}];});}function hostedConversationSummary(_0x284975,_0x60fd1f){const _0x40db3f=_0x241074;return hostedConversationSummarySchema[_0x40db3f(0x36a)]({'id':_0x284975['id'],'nodeId':_0x284975[_0x40db3f(0x36d)],'sessionId':_0x284975[_0x40db3f(0x265)],'templateId':_0x284975[_0x40db3f(0x38b)],'templateName':_0x284975[_0x40db3f(0x306)],'activeVersionId':_0x284975[_0x40db3f(0x347)],'title':_0x284975[_0x40db3f(0x21f)],'pinnedAt':_0x284975[_0x40db3f(0x359)],'status':_0x284975[_0x40db3f(0x23c)],'modelId':_0x284975[_0x40db3f(0x2d1)],'createdAt':_0x284975[_0x40db3f(0x30c)],'updatedAt':_0x284975[_0x40db3f(0x274)],'lastActivityAt':_0x284975[_0x40db3f(0x2b8)],..._0x60fd1f===undefined?{}:{'activity':_0x60fd1f}});}function templateSummary(_0x575a36,_0x26128b){const _0x3b9ec4=_0x241074;return conversationTemplateSummarySchema[_0x3b9ec4(0x36a)]({'id':_0x575a36[_0x3b9ec4(0x38b)],'nodeId':_0x575a36[_0x3b9ec4(0x36d)],'name':_0x575a36[_0x3b9ec4(0x306)],'description':_0x26128b[_0x3b9ec4(0x29f)],'status':_0x575a36[_0x3b9ec4(0x2b6)]?_0x3b9ec4(0x2a1):_0x3b9ec4(0x2fd),'currentVersionId':_0x575a36[_0x3b9ec4(0x347)],'available':!_0x575a36[_0x3b9ec4(0x2b6)],'createdAt':_0x575a36[_0x3b9ec4(0x30c)],'updatedAt':_0x26128b[_0x3b9ec4(0x274)]});}function modelSummary(_0xe328eb,_0x2de89c){const _0x23dd37=_0x241074;return{'id':_0xe328eb['id'],'name':_0xe328eb[_0x23dd37(0x2e3)],'protocol':_0xe328eb[_0x23dd37(0x237)],'baseUrl':_0xe328eb[_0x23dd37(0x219)],'modelId':_0xe328eb[_0x23dd37(0x2d1)],'contextWindowTokens':_0xe328eb[_0x23dd37(0x2b7)],'maxOutputTokens':_0xe328eb[_0x23dd37(0x340)],'inputCapabilities':_0xe328eb[_0x23dd37(0x226)],'outputCapabilities':_0xe328eb[_0x23dd37(0x2f3)],'reasoningEfforts':_0xe328eb[_0x23dd37(0x215)],'hostedWebSearch':_0xe328eb[_0x23dd37(0x283)],..._0xe328eb[_0x23dd37(0x2ba)]===undefined?{}:{'responsesTransport':_0xe328eb[_0x23dd37(0x2ba)]},'responsesPreviousResponseId':_0xe328eb[_0x23dd37(0x200)],'enabled':_0xe328eb[_0x23dd37(0x1f7)],'sortOrder':_0x2de89c,'apiKeyConfigured':!![]};}function systemInstruction(_0x1c7c16){const _0x2dda52=_0x241074,_0x46ca6c=_0x1c7c16[_0x2dda52(0x270)],_0x2ce66e=_0x46ca6c[_0x2dda52(0x2e8)]===_0x2dda52(0x34f)?_0x2dda52(0x328):_0x2dda52(0x2db);return[_0x2dda52(0x31a),_0x2dda52(0x23f),_0x2dda52(0x308),..._0x1c7c16[_0x2dda52(0x31c)]===undefined?[]:[_0x2dda52(0x2fc)+_0x1c7c16[_0x2dda52(0x31c)]+_0x2dda52(0x214)+join(_0x1c7c16[_0x2dda52(0x31c)],_0x2dda52(0x2e5))+_0x2dda52(0x389)+join(_0x1c7c16[_0x2dda52(0x31c)],_0x2dda52(0x36c))+_0x2dda52(0x392)],_0x2dda52(0x23b),_0x2ce66e][_0x2dda52(0x349)]('\x0a');}function attachmentPrompt(_0x1ba395,_0x46a0eb){const _0x14b7f4=_0x241074;if(_0x46a0eb[_0x14b7f4(0x315)]===0x1*0x2041+-0x5*-0x119+-0x25be)return _0x1ba395;const _0x35b05f=_0x46a0eb[_0x14b7f4(0x2f7)](_0x1b0bdd=>_0x14b7f4(0x2a7)+_0x1b0bdd[_0x14b7f4(0x297)])[_0x14b7f4(0x349)]('\x0a');return''+_0x1ba395+(_0x1ba395[_0x14b7f4(0x262)]()[_0x14b7f4(0x315)]===0xd*0x3d+0x1*-0x176f+0x1456?'':'\x0a\x0a')+_0x14b7f4(0x320)+_0x35b05f;}function automaticHostedConversationTitle(_0xcb4184){const _0xca4135=_0x241074;if(_0xcb4184===undefined)return undefined;const _0x1426d6=sessionTitleFromFirstMessage(_0xcb4184);if(_0x1426d6[_0xca4135(0x315)]===0x22cb+0x1ee2+-0x41ad||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0xca4135(0x20c)](_0x1426d6))return undefined;return _0x1426d6;}function runFromMessage(_0x138222){const _0x3c9d9b=_0x241074;return{'id':_0x138222[_0x3c9d9b(0x24b)],'status':_0x138222[_0x3c9d9b(0x23c)],'startedAt':_0x138222[_0x3c9d9b(0x30c)],'completedAt':_0x138222[_0x3c9d9b(0x23c)]===_0x3c9d9b(0x288)?null:_0x138222[_0x3c9d9b(0x274)]};}function _0x22ba(){const _0x1f93c9=['AxneAxjLy3rVCNK','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','yMfZzty0','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','y3jLyxrLtwvZC2fNzq','DxbSB2fKC0j5uMvXDwvZDa','q09ovKvsu0fusu9ox0Hpu1rjtKDFvu5bvKfjtefcteu','AgfZ','zMLSzuLK','C3rVCMfNzv9RzxK','Agv4','zMLSzxm','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','yxr0ywnOBwvUDeLKCW','igfUzca','AgvHzgvYCW','DgvTCgXHDgvjza','zgvSzxrL','B3v0Chv0rgLYzwn0B3j5','C2v0','DgfYz2v0vMvYC2LVBKLK','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','zgLYzwn0B3jPzxm','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','C2L6zq','CxvVDge','ChjLDMLVDxnwzxjZAw9Uswq','AxndB252zxjZyxrPB25jBLvZzq','DgvTCgXHDgveAxjLy3rVCNK','uLvoveLnrq','Cgf0Ae1VDw50CW','zMLSzvbHDgG','u1vdq0vfreve','q09orKXjq1q','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','B3DUzxjlzxK','BwvZC2fNzq','zMLSDgvY','zgvMyxvSDeLK','zw50CMLLCW','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','ChvIBgLZAefJDgL2Axr5','uLvox1rfuK1jtKfm','zw5HyMXLza','CMvQzwn0','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','vvnfuG','vu5srvnuuKLdveve','BM9KzuDLBMvYyxrPB24','AxngAwXL','zgvSzxrLrMLSzq','ve9px0XbuKDf','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','CNvU','C3vIyxjYyxK','D2f0y2G','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','DxbKyxrLq29UDMvYC2f0Aw9U','ChvIBgLZAeHVC3rLzev2zw50','C3LUyW','ChvIBgLZAfj1BNrPBwvfDMvUDa','zMXHDe1HCa','Ag9ZDfbVBgLJEvzLCNnPB24','yM9VBgvHBG','DgvZDa','DgvTCg9Yyxj5ugf0Aa','Bwf4u3rVCMfNzuj5DgvZ','Bg9JywXLq29TCgfYzq','se9tvevex0nptLzfuLnbveLptG','y29UDgvUDf9OyxnO','BwLTzvr5Cgu','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','CMvHC29UAw5NrwzMB3j0CW','DMvYC2LVBG','BwnWu2vYDMvYCW','C2XVDfrVA2vU','yMfZzvvYBa','zw1PDfDHDgnOrxzLBNq','C2fMzvbHCNnL','D29YA2jLBMnOu2vXDwvUy2u','y3vYCMvUDfzLCNnPB25jza','DxbKyxrLtwv0ywrHDge','DgL0Bgu','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','C2XPy2u','D3jPDgu','ru5pru5u','zw52AxjVBM1LBNq','CMvXDwLYzuf0DgfJAg1LBNq','Aw5WDxrdyxbHyMLSAxrPzxm','nteXndq2nJbMyNPetha','yNL0zuXLBMD0Aa','yxjYyxK','Bw9Kzq','mtG2mtm2C0PyAKLK','zgf0ywjHC2u','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','l2XPyJy0','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','BNvTyMvY','Bg9HzfrLBxbSyxrLvMvYC2LVBG','y3jLyxrL','y2XLyw51CeXVy2TZ','u1LnteLosW','ndu2mvnkzfz2Da','D2f0y2GUzMfPBgvK','ChjVDg9JB2W','l3DVCMTZCgfJzs9PBMjVEa','B3b0Aw9UCW','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','C3rHDhvZ','C2vJCMv0tMfTzq','C2vZC2LVBLDHDgnOu2XVDhm','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','Bwf4qNL0zxm','DgL0BgvtB3vYy2u','BwfUAwzLC3rFAgfZAa','zgLZCg9Zzq','vvbtvfjfqu1Ftu9eruXFsuq','CMvSzwfZzvnLC3nPB24','DgfYz2v0s2LUza','y3jLyxrLvxbSB2fK','l2HVBwuVBwfY','Dw5Yzwy','l3j1BG','CNvUswq','vvbmt0fesu5h','l2jPBG','zw1PDfDVCMTIzw5JAev2zw50','CgvUzgLUz0nYzwf0zxm','BgLZDezPBgvZ','zMLUze1LC3nHz2u','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','l3nIAw4','C2vJCMv0rw52AxjVBM1LBNq','uKvbrfK','CgvUzgLUz01LC3nHz2vZ','u05bufnit1q','q1vtve9n','ChvIBgLZAfDVCMTIzw5JAev2zw50','y29UDgvUDa','yNL0zxnszwfK','C25HChnOB3q','D3jPDgvvCgXVywrdAhvUAW','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','CMvHza','ChvIBgLZAfvWz3jHzgvgywLSDxjL','mZC4nJzMy2nZELG','DhjPBq','nJqYvMnctK1j','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','C2vZC2LVBKLK','CNvUDgLTzq','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','zMLUAxnOtwvZC2fNzq','C2HHmJu2','ode1txv5A2zS','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','DxbSB2fKC0rPCMvJDg9YEq','AxntywzLsw50zwDLCG','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','zhjHzNq','BwfUAwzLC3qUANnVBG','C3rHCNrnzxnZywDL','CgLUBMvK','DxbKyxrLzef0','Dw53yxrJAa','CgvUzgLUz0v2zw50CW','zxHWAxjLC0f0','BgLUA1rHCMDLDa','CMvWBgfJzq','Bwf4','AxrLBxm','DgL0BgvdAgfUz2vK','DxbNCMfKzq','y29UzMLNDxjHDgLVBG','y3jLyxrLu2vZC2LVBG','AxntEw1IB2XPy0XPBMS','ChvZAa','C3rYAw5NAwz5','Ag9ZDgvKv2vIu2vHCMnO','ChjVy2vZC0v4zwn1Dg9Y','Bwf4vxbSB2fKqNL0zxm','C3rVCMu','yxjNCW','uLvotKLorW','Dg90ywXFyNL0zxm','zgLZCgXHEu5HBwu','DgHLBG','ChjLCgfYzq','zMLSzq','surmrq','C3rHCNrZv2L0Aa','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','l3DVCMTZCgfJzs9VDxrWDxq','rKfjteve','CMvHzhK','CMvNAxn0zxjgAwXL','Aw5JBhvKzxm','CxvVDgfZ','CMvSyxrPDMvqyxrO','AxnbCNjHEq','C3rHCNrsDw4','ywn0AxzPDgLLCW','A2v5CW','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','BMv4DfDVCMTIzw5JAev2zw50','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','zgvZy3jPChrPB24','yxzHAwXHyMXL','revmrvrfra','zMLUywXSEq','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','y29UDgvUDeHHC2G','B3DUCW','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','lsaVD29YA3nWywnLl2LUyM94lW','CMvSzwfZzq','ywXSB2m','C2nOzw1HvMvYC2LVBG','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','CMvZB2X2zwruyxjNzxq','zw5KC1DPDgG','Aw50zxjYDxb0','BMXPBMS','CNvUoG','ndm2mZa5m2zfAuD5zG','zxHLy3v0ywjSzq','DxbSB2fKCW','zgf0yujHC2u2na','ywn0AxzLuNvUCW','DgvTCgXHDgvezwXLDgvK','y29UDgv4DfDPBMrVD1rVA2vUCW','BgfZDefJDgL2Axr5qxq','v09ss1nqqunf','CMvZCg9UC2vZvhjHBNnWB3j0','CMvZB2X2zq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','y29TCgXLDgvvCgXVywq','Cgf0AhngB3jdB252zxjZyxrPB24','C2f2zuf1Dg9TyxrPy1rPDgXL','vvbmt0fe','uKvuquLoruq','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','ywXSB3DLze1VzgvSswrZ','ChjVBxb0','C29YDa','zMLUAxnOuNvU','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','y2f0zwDVCNK','CMvXDwLYzunVBNzLCNnHDgLVBG','y29TBwfUza','y29TCgXLDgvKqxq','CMf3','DgvTCgXHDgu','sfruua','DMfSDwvZ','B2jQzwn0','Bw9KzwXjza','l3j1BNrPBwu','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','D2f0y2Hjza','B2zMC2v0','AgLZDg9YEq','CMvJB25JAwXLrMLSzxm','su5urvjsvvburuq','y29TCgXLDgLVBG','ywXSB3DLze1VzgvSCW','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','Ag9TzurPCMvJDg9YEq','yxjNDw1LBNrZ','u1resu8','DgfYz2v0ugf0Aa','qvzbsuXbqKXf','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','yxnZzxj0q2fUq3jLyxrL','BMfTzq','B3jPz2LU','Aw5IB3G','DxbKyxrLq29UzMLNDxjHDgLVBG','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','BMv0D29YA01Vzgu','zMLUza','Cgf0AhngB3jnyw5PzMvZDa','C3rYAw5N','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','DxnLzej5DgvZ','C3vJy2vZCW','zw1PDfDHDgnOtgvHC2vfDMvUDa','C291CMnLugf0Aa','BM90AwzPy2f0Aw9U','mZaZmZG3zKnczMnc','B3v0Chv0q2fWywjPBgL0AwvZ','Bw9KzwXZ','Dg9tDhjPBMC','DxrMoa','BwfW','zw4Tvvm','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','DxbKyxrL','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','qunusvzf','ohjVCvvSva','C25HChnOB3rtzxf1zw5Jzq','BgLZDenVBNzLCNnHDgLVBNm','BwLU','DMvYC2LVBKLK','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','zNjVBq','C3rHCNrLzef0','DgvTCgXHDgvoyw1L','C3bSAxq','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','l2rLDG','B3bLCMf0Aw9UCW','DxjS','y3jLyxrLzef0','A2LUza','zgf0yq','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','uvvpvefFrvHdruveruq','D2f0y2HmzwfZzxm','BgLTAxq','reLsrunut1jzaa','qvvutW','BgvUz3rO','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','l3bYB2m','ChjLzMXPz2H0vxbSB2fK','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvhjLyxqGl3DVCMTZCgfJzsbHCYb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','y2fUy2vSvxbSB2fK','C291CMnLv29YA3nWywnLugf0Aa','CNvUDgLTzvnJB3bLswq','l3DVCMTZCgfJzq','CMvXDwLYzuzPBgu','qxr0ywnOBwvUDhm6cG','yxbWBhLbDxrVBwf0AwnuAxrSzq','CNvUlq','ywn0AxzPDhK','DxnLCKLK','q0foq0vmteve','C3vTBwfYEq','C2vYDMvYtMfTzq','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','CMvKDwnL','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','ywXS','BgLZDa','CMvUzxC','Cgf0Ahm','zNvSBc1Hy2nLC3m','l3rTCa','y3vYC29Y','Bw9KzwXqB2XPy3K','ywrK','ChjLCgfYzuzVCKrPC2fIBgu','tK9erq','C2vZC2LVBKHHC2G','ywr2yw5JzuXHC3rby3rPDML0Eq','zMLSzvbYB2PLy3rPB25jza','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','l3vZCG','y29Kzq','BwfUAwzLC3q','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','DgLTzxi','AwrLBNrPDhK','Bwf4t3v0Chv0vg9Rzw5Z','zMLSzv9JB3vUDa','DxbSB2fKswq','C29Tzq','y2XPzw50twvZC2fNzuLK','zgLZywjSzvbYzxbHCMvK','D2f0y2HmzwfZzvrPBwvY','ywn0AxzLvMvYC2LVBKLK','CMvXDwLYzvvWBg9Hza','AM9PBG','u1rbuLrjtKC','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','BM93','BwnWx2nVBMzPz19OyxnO','odq0nZi1nK5ADvrxEG','tK9orq','DhjHBNnWB3j0','y29UDMvYC2f0Aw9Uswq','rKLmrq','y2fUy2vS','q09nueXfveve','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','DxnLCLn0B3jHz2vlzxK','q09orKLhvvjbveLptL9jra','CMvJzwL2zwrcExrLCW','CgLUBMvKqxq','l2XPyG','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','y3jLyxrLq29UDMvYC2f0Aw9U','D29YA2jLBMnOq29UBMvJDgLVBKLK','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','ywXSB3DLzeLKCW','y29UDMvYC2f0Aw9U','zgLNzxn0','CNvUu2v0DgXLBwvUDhm','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','z2v0','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','y2XVC2u','lNvWBg9Hza','DxbSB2fKu3rHDhvZ','CMvHzezPBgu','CgfYC2u','CMvTB3zLv2f0y2HmzwfZzq','B3v0Chv0','BM9KzuLK','y2XPzw50uMvXDwvZDeLK','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','q0foq0vmteLorW','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','y2f0y2G','zMLSzurLBgv0zxm','ywXSu2v0DgXLza','rvHfq1vusu9o','BwnWq29UzMLNsgfZAa','C2f2zu1LC3nHz2vby2nLChrHBMnL','ywnJzxb0zwrxyxrJAa','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra'];_0x22ba=function(){return _0x1f93c9;};return _0x22ba();}function runInterruptionKey(_0x48126b,_0x1aff44){return _0x48126b+'\x00'+_0x1aff44;}function uploadProjection(_0x5a47b5){const _0x380c2b=_0x241074;return{'uploadId':_0x5a47b5[_0x380c2b(0x342)],'conversationId':_0x5a47b5[_0x380c2b(0x351)],'name':_0x5a47b5[_0x380c2b(0x2e3)],'mimeType':_0x5a47b5[_0x380c2b(0x212)],'receivedBytes':_0x5a47b5[_0x380c2b(0x358)],'size':_0x5a47b5[_0x380c2b(0x393)],'status':_0x5a47b5[_0x380c2b(0x23c)],..._0x5a47b5[_0x380c2b(0x28d)]===undefined?{}:{'file':_0x5a47b5[_0x380c2b(0x28d)]}};}async function assertRegularFile(_0x5b462c,_0x216422){const _0x5c43dc=_0x241074,_0x142f86=await lstat(_0x5b462c)[_0x5c43dc(0x373)](()=>{const _0x5a135f=_0x5c43dc;throw new Error(_0x5a135f(0x303));});if(!_0x142f86[_0x5c43dc(0x1fd)]()||_0x142f86[_0x5c43dc(0x280)]()||_0x142f86[_0x5c43dc(0x2af)]!==-0x2031+-0x1863+0x3895||_0x142f86[_0x5c43dc(0x393)]!==_0x216422)throw new Error(_0x5c43dc(0x303));}async function assertUploadTemporaryFile(_0x229aaf,_0x3e68e4){const _0x4a4a1a=_0x241074,_0x3726fc=await lstat(_0x229aaf)[_0x4a4a1a(0x373)](()=>{const _0x4dfc9b=_0x4a4a1a;throw new Error(_0x4dfc9b(0x317));});if(!_0x3726fc[_0x4a4a1a(0x1fd)]()||_0x3726fc[_0x4a4a1a(0x280)]()||_0x3726fc[_0x4a4a1a(0x2af)]!==-0x940+-0x2*0x10d0+-0x3*-0xe4b||_0x3726fc[_0x4a4a1a(0x393)]!==_0x3e68e4)throw new Error(_0x4a4a1a(0x317));}function record(_0x80024e){const _0x33852a=_0x241074;return typeof _0x80024e===_0x33852a(0x2d0)&&_0x80024e!==null&&!Array[_0x33852a(0x298)](_0x80024e);}
|
|
2
|
+
const _0x132f42=_0x1c9a;(function(_0x6c40e1,_0x23b77d){const _0x56f56a=_0x1c9a,_0x5b6e9b=_0x6c40e1();while(!![]){try{const _0x174f2b=parseInt(_0x56f56a(0x244))/(-0x121f*-0x2+-0x16a4+-0xd99*0x1)*(parseInt(_0x56f56a(0x26a))/(0x1a45+-0x1825+-0x21e))+-parseInt(_0x56f56a(0xf2))/(-0x7ed*0x1+-0x5df+0xdcf)+parseInt(_0x56f56a(0x251))/(0x7ab+-0x116a+0x9c3)*(parseInt(_0x56f56a(0x246))/(-0x75a*0x4+-0x1*-0x1edf+-0x172))+-parseInt(_0x56f56a(0x215))/(-0xa7d+0xfbc+0xbf*-0x7)+-parseInt(_0x56f56a(0x128))/(0x1f8+-0x1f30+0x1d3f)*(parseInt(_0x56f56a(0x1a4))/(-0x22e8*0x1+0x10a9*-0x2+-0x1*-0x4442))+-parseInt(_0x56f56a(0x1de))/(0xab5*-0x1+0x12cb+-0x80d)*(parseInt(_0x56f56a(0x11f))/(-0x1ded+-0x2a2+-0x685*-0x5))+parseInt(_0x56f56a(0x284))/(0x2*0xf44+0x20c7*-0x1+0x24a);if(_0x174f2b===_0x23b77d)break;else _0x5b6e9b['push'](_0x5b6e9b['shift']());}catch(_0x1107cf){_0x5b6e9b['push'](_0x5b6e9b['shift']());}}}(_0x5676,0x2*0x15f67+0xb2*-0x631+0x1e4f3*0x4));import{createHash,randomUUID}from'node:crypto';import{lstat,mkdir,open,readFile,readlink,readdir,realpath,rename,rm,utimes}from'node:fs/promises';import{isAbsolute,join,relative,resolve,sep}from'node:path';import{conversationTemplateDraftSchema,conversationTemplateSummarySchema,hostedConversationConfigUpdateInputSchema,hostedConversationCreateInputSchema,hostedConversationDeleteResultSchema,hostedConversationFileDeleteInputSchema,hostedConversationFileDeleteResultSchema,hostedConversationFileReadInputSchema,hostedConversationFileReadResultSchema,hostedConversationFilesSchema,hostedConversationIdInputSchema,hostedConversationImageReadInputSchema,hostedConversationListInputSchema,hostedConversationListPageSchema,hostedConversationMessageInputSchema,hostedConversationMetadataUpdateInputSchema,hostedConversationSnapshotSchema,hostedConversationSummarySchema,hostedConversationUnwatchInputSchema,hostedConversationUploadChunkInputSchema,hostedConversationUploadControlInputSchema,hostedConversationUploadCreateInputSchema,hostedConversationUploadPreflightInputSchema,hostedConversationUploadPreflightResultSchema,hostedConversationUploadSchema,hostedConversationWatchInputSchema,marAgentRuntimeModelConfigurationSchema,mcpInstallationConfigurationSchema,mcpRuntimeDescriptorSchema}from'@myagentroam/protocol';import{hostedConversationGeneratedImagesDisplayDirectory,hostedConversationImageRunId,marAgentGeneratedImagesDirectory}from'../runner/mar-agent/generated-images.js';function _0x5676(){const _0x13d116=['Dw5Yzwy','CMvHC29UAw5NrwzMB3j0CW','l2XPyJy0','Agv4','y2f0y2G','se9tvevex0nptLzfuLnbveLptL9tvefurv9jtLzbteLe','se9tvevex0nptLzfuLnbveLptL9trvntsu9ox0LovKfmsuq','C2L6zq','DgfYz2v0vMvYC2LVBKLK','DxrMoa','ChjVBxb0','CMvSyxrPDMvqyxrO','DxbSB2fKuhjLzMXPz2H0u3rHDhvZ','vvbtvfjfqu1Ftu9eruXFsuq','D29YA2jLBMnOq29UBMvJDgLVBKLK','Dg9tDhjPBMC','zMLUza','AxndB252zxjZyxrPB25jBLvZzq','y29UzMLNDxjHDgLVBIXKAxnWBgf5tMfTzsXPzcXVCMLNAw4SCNvUDgLTzsXZzxj2zxjoyw1LlhrYyw5ZCg9YDcX2zxjZAw9U','C2f2zu1LC3nHz2vby2nLChrHBMnL','zMLSzq','Ag9TzurPCMvJDg9YEq','u05bufnit1q','DgvTCgXHDgveAxjLy3rVCNK','u1vdq0vfreve','C2fMzvbHCNnL','CNvUswq','Dg90ywXFyNL0zxm','BwnWx2nVBMzPz19OyxnO','l3rTCa','BM90AwzPy2f0Aw9U','C3vJy2vZCW','uKvbrfK','zw4Tvvm','igfUzcbJB3b5ihrOzsbLEgLZDgLUzYbMAwXLigzYB20G','Aw5JBhvKzxm','C25HChnOB3rtzxf1zw5Jzq','ywn0AxzPDhK','zMLUAxnOtwvZC2fNzq','AgLZDg9YEq','vvbmt0fe','v09ss1nqqunf','uLvox1rfuK1jtKfm','tK9erq','ChvZAa','Ag9ZDgvKlwnVBNzLCNnHDgLVBG','zMLSzv9JB3vUDa','ywXSB3DLze1VzgvSswrZ','BM9KzuDLBMvYyxrPB24','DxjS','Aw50zxjYDxb0','ChvIBgLZAfDVCMTIzw5JAev2zw50','C3rYAw5NAwz5','DxbKyxrLzef0','C2vJCMv0rw52AxjVBM1LBNq','y3jLyxrLvxbSB2fK','ChjVy2vZC0v4zwn1Dg9YrMfJDg9YEq','sg9ZDgvKignVBNzLCNnHDgLVBIb3yxrJAcbZBMfWC2HVDcbMywLSzwqU','C2vJCMv0tMfTzq','AwrLBNrPDhK','ChvIBgLZAefJDgL2Axr5','yxnZzxj0q2fUq3jLyxrL','CMvSzwfZzq','C3bSAxq','y29UDgv4DfDPBMrVD1rVA2vUCW','D3jPDgvvCgXVywrdAhvUAW','B3b0Aw9UCW','l3DVCMTZCgfJzs9PBMjVEa','Bwf4u3rVCMfNzuj5DgvZ','CMvWBgfJzq','ChvIBgLZAeHVC3rLzev2zw50','ywr2yw5JzuXHC3rby3rPDML0Eq','B3bLCMf0Aw9UCW','zgf0yujHC2u2na','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5LDMvUDa','y3vYCMvUDfzLCNnPB25jza','l3DVCMTZCgfJzs9VDxrWDxq','y2fUy2vSq29UDMvYC2f0Aw9UvxbSB2fKCW','l3j1BG','u1LnteLosW','C3vTBwfYEq','DxbSB2fKu3rHDhvZ','q1vtve9n','ChjLCgfYzuzVCKrPC2fIBgu','q09nueXfveve','D2f0y2Hjza','B2zMC2v0','D2fPDezVCLbLBMrPBMDnzxnZywDLu3rHCNrZ','BgLZDa','y29UDgvUDa','uMvHzcb1C2vYihvWBg9HzhmGzNjVBsaVD29YA3nWywnLl2LUyM94igfUzcbWBgfJzsb1C2vYlxzPC2LIBguGzgvSAxzLCMfIBgvZigLUic93B3jRC3bHy2uVB3v0Chv0lG','BwLU','DgvZDa','CMvSzwfZzvnLC3nPB24','CNvUu2v0DgXLBwvUDhm','mtq0odb4EMrcCMi','CNvUoG','DxbSB2fKC0rPCMvJDg9YEq','ChjVy2vZC0v4zwn1Dg9Y','uvvpvefFrvHdruveruq','rKfjteve','BgLZDezPBgvZ','CNvU','yxjYyxK','ywrK','BwfUAwzLC3rFAgfZAa','D3jPDgu','y2f0zwDVCNK','AxrLBxm','zw1PDfDHDgnOtgvHC2vfDMvUDa','CNvUDgLTzq','l2XPyG','CMf3','u0vmrunuigLKlhrLBxbSyxrLx2LKlhn0yxr1CYXZDg9YywDLx2TLEsXTyw5PzMvZDcXJB250zw50x2HHC2GSBwfUAwzLC3rFAgfZAcXTy3bFy29UzMLNx2HHC2GScIaGicaGicaGicaGicaGicbMAwXLx2nVDw50lhrVDgfSx2j5DgvZlgHVC3rFCg9SAwn5x3zLCNnPB24kicaGicaGicaGrLjptsbJB252zxjZyxrPB25FDgvTCgXHDgvFDMvYC2LVBNmGv0HfuKuGAwq9pYbbtKqGDgvTCgXHDgvFAwq9pW','u0vmrunuigLKiezst00Gy29UDMvYC2f0Aw9Ux3rLBxbSyxrLx3zLCNnPB25ZcIaGicaGicaGifDirvjfihrLBxbSyxrLx2LKpt8Gqu5eihn0yxr1CZ0NqvzbsuXbqKXfjWOGicaGicaGicbpuKrfuIbcwsb2zxjZAw9Ux251BwjLCIbervndlhb1yMXPC2HLzf9HDcbervndlgLKierfu0mkicaGicaGicaGteLnsvqGmq','zxHWzwn0zwrjBNrLCNj1ChrPB25Z','C2HHmJu2','l2jPBG','C3rYAw5N','DhjHBNnWB3j0','zMXHDe1HCa','CMvJzwL2zwrcExrLCW','zw1PDfDVCMTIzw5JAev2zw50','BMv4DfDVCMTIzw5JAev2zw50','ChvIBgLZAfvWz3jHzgvgywLSDxjL','BgfZDefJDgL2Axr5qxq','Bwf4t3v0Chv0vg9Rzw5Z','Bwf4','ywn0AxzLuNvUCW','yNL0zxnszwfK','CgvYBwfUzw50rgvSzxrLq29UDMvYC2f0Aw9U','zgvSzxrLrMLSzq','C2XPy2u','CgLUBMvK','Bw9Kzq','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGCM9VDcbPCYbYzwfKlw9UBhKUie9UBhKGl3DVCMTZCgfJzs9PBMjVEcbHBMqGl3DVCMTZCgfJzs9VDxrWDxqGyxjLihDYAxrHyMXLlG','q09orKXjq1q','C3rVCMfNzv9RzxK','zMLSzxm','C2vZC2LVBKHHC2G','igfZigeGy29TCgf0AwjPBgL0EsbHBgLHCZSGAxqGAxmGDgHLihnHBwuGAw1TDxrHyMXLihnUyxbZAg90lcbUB3qGDgHLigXPDMuGC291CMnLifDVCMTZCgfJzs4G','y29UDMvYC2f0Aw9UrgLYzwn0B3j5','zw1PDfDHDgnOrxzLBNq','BwnWu2vYDMvYCW','D2f0y2HmzwfZzxm','CMvXDwLYzvDYAxrHyMXLq29UDMvYC2f0Aw9U','y3jLyxrLu2vZC2LVBG','sfruua','CMvSzwfZzunVBNzLCNnHDgLVBKzVCKnSzwfUDxa','rKLmrq','su5urvjsvvburuq','y29TCgXLDgvvCgXVywq','rvHfq1vusu9o','mtq4nxH2rLPguG','CgvUzgLUz01LC3nHz2vZ','q0foq0vmteLorW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu1rbvevFsu5wquXjra','qvvutW','ywXSB3DLzeLKCW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFt0zgu0vux0LovKfmsuq','Bwf4vxbSB2fKqNL0zxm','C2f2zuf1Dg9TyxrPy1rPDgXL','uKvuquLoruq','ywnJzxb0zwrxyxrJAa','vu5srvnuuKLdveve','Aw1Hz2vjBMrLEa','zw52AxjVBM1LBNq','C3rVCMu','CMvHzhK','yMfZzvvYBa','C25HChnOB3q','se9tvevex0nptLzfuLnbveLptL9vueDsqurfx0zbsuXfra','DgL0BgvdAgfUz2vK','DgfYz2v0s2LUza','DxbSB2fKswq','zMLUzenVBNzLCNnHDgLVBKj5q2XPzw50uMvXDwvZDa','lsaVD29YA3nWywnLl2LUyM94lW','yxzHAwXHyMXL','y29UDgvUDeHHC2G','DgL0BgvtB3vYy2u','y2fUy2vSvxbSB2fK','C3rHCNrZv2L0Aa','y2XLyw51CeXVy2TZ','DxbKyxrL','C29YDa','zNvSBc1Hy2nLC3m','ywn0AxzLvMvYC2LVBKLK','Cgf0Ae1VDw50CW','ChjLDMLVDxnwzxjZAw9Uswq','Bw9KzwXqB2XPy3K','igfUzca','zNjVBq','zgf0ywjHC2u','BwfUAwzLC3q','AgvHzgvYCW','vgHLignVBNzLCNnHDgLVBIb0zw1WBgf0zsb1CgDYywrLigzHAwXLzc4','ChvIBgLZAfj1BNrPBwvfDMvUDa','D2f0y2GUAg9ZDgvKlwnVBNzLCNnHDgLVBI5ZBMfWC2HVDa','DgvTCg9Yyxj5ugf0Aa','Bg9JywWTDgvZDc1Nzw5LCMf0Aw9U','BwnWq29UzMLNsgfZAa','D2f0y2GUzMfPBgvK','ywXSu2v0DgXLza','surmrq','vvnfuG','C2v0','DMfSDwvZ','DMvYC2LVBG','mZy3mZy5mKnbDhndva','C3rHCNrLzef0','BM93','ywXS','DgvTCgXHDgvjza','C3vIyxjYyxK','Dw53yxrJAa','CNvUDgLTzvnJB3bLswq','BMv0D29YA01Vzgu','zw5KC1DPDgG','ChvIBgLZAfrLCM1PBMfStM90AwzPy2f0Aw9U','u1resu8','vvbmt0fesu5h','zgLZCg9Zzq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFu0LArv9jtLzbteLe','CMvHza','vgHPCYbPCYbHie5VzguTAg9ZDgvKignVBNzLCNnHDgLVBI4GvgHLieHVC3qTzgvJBgfYzwqGBw91BNrZigfYzsb0AguGy29TCgXLDguGzMLSzsbIB3vUzgfYEs4','Bg9JywXLq29TCgfYzq','B3jPz2LU','l3nIAw4','ChjVDg9JB2W','tg9JywWGChjVy2vZC2vZlcboB2rLlwXVy2fSifDLyIbgzxrJAcWGyxzHAwXHyMXLifDLyIbtzwfYy2GSig1VzgvSlwHVC3rLzcb3zwiSigfUzcbWDwjSAxnOzwqGCMvTB3rLieHuvfaGtunqig1HEsbHy2nLC3mGBMv0D29YA3mGCMvHy2HHyMXLigzYB20GDgHPCYboB2rLlG','Ag9ZDf9WB2XPy3LFDMvYC2LVBG','yNL0zuXLBMD0Aa','Bw9KzwXjza','BMfTzq','zxHWAxjLC0f0','D2f0y2HmzwfZzvrPBwvY','zMLUAxnOuNvU','l2rLDG','qxr0ywnOBwvUDhm6cG','zgvSzxrL','l3j1BNrPBwu','DgvTCgXHDgu','C3rHCNrsDw4','se9tvevex0nptLzfuLnbveLptL9svu5Fqunusvzf','DhjPBq','CxvVDge','DxbKyxrLtwv0ywrHDge','igfYzsbHBgLHC2vZig9MihrOzsbZyw1LihDYAxrHyMXLig92zxjSyxLZlG','y3vYC29Y','uLvox0LnquDfx05pvf9gt1vora','CMvJB25JAwXLrMLSzxm','CMvZB2X2zq','CgLUBMvKqxq','AxntEw1IB2XPy0XPBMS','zgLNzxn0','mteZnuDHy1LeDa','zxHLy3v0ywjSzq','nJqZnJvUsM9XEgq','yxbWBhLbDxrVBwf0AwnuAxrSzq','se9tvevex0nptLzfuLnbveLptL9vueXpqurFsu5dt01qtevurq','ru5pru5u','vgHLihb1yMXPC2HLzcb3B3jRC3bHy2uGAxmGywXZBYbTB3vUDgvKihjLywqTB25SEsbHDca','C2nOzw1HvMvYC2LVBG','AM9PBG','CMvHzezPBgu','se9tvevex0nptLzfuLnbveLptG','zgLZCgXHEu5HBwu','DgHLBG','ng1HyMXjwq','Ag9ZDgvKv2vIu2vHCMnO','BwvZC2fNzq','CMvXDwLYzunVBNzLCNnHDgLVBG','yxjNDw1LBNrZ','ChjLCgfYzunVBNzLCNnHDgLVBKvUDMLYB25Tzw50','DgLTzxi','C29Tzq','u1rbuLrjtKC','AgfZ','uLvotKLorW','z2v0','DxbSB2fKC0j5uMvXDwvZDa','CMvQzwn0','ve9px0XbuKDf','B2jQzwn0','y29TCgXLDgLVBG','zMLUze1LC3nHz2u','y29TBwfUza','q09ovKvsu0fusu9ox1rftvbmqvrfx01duf9jtLzbteLe','AxnbCNjHEq','AxngAwXL','se9tvevex0nptLzfuLnbveLptL9rvu9uqv9fwenfrurfra','Aw5PDgLHBgL6zvDHDgnOtgvHC2u','zw5HyMXLza','ntKWBgXztNDk','y3jLyxrLtwvZC2fNzq','se9tvevex0nptLzfuLnbveLptL9bvfrbq0Hnru5ux0LovKfmsuq','BgLZDenVBNzLCNnHDgLVBNm','se9tvevex0nptLzfuLnbveLptL9xqvrdsf9gquLmruq','zMLSDgvY','zgLYzwn0B3jPzxm','revmrvrfra','DMvYC2LVBKLK','BwfW','CgvUzgLUz0nYzwf0zxm','y2XPzw50twvZC2fNzuLK','ywn0AxzPDgLLCW','BwfUAwzLC3qUANnVBG','y2XVC2u','yM9VBgvHBG','A2LUza','CgvUzgLUz0v2zw50CW','se9tvevex0nptLzfuLnbveLptL9gsuXfx0LovKfmsuq','Cgf0AhngB3jnyw5PzMvZDa','CgfYC2u','DxnLCKLK','vgHLieHVC3qGzw5MB3jJzxmGDgHPCYbMAwXLigjVDw5Kyxj5lcbHBMqGBg9JywWGChjVy2vZC2vZihj1BIbPBNnPzguGyw4GB3bLCMf0Aw5Nlxn5C3rLBsbZyw5KyM94lG','DgfYz2v0ugf0Aa','DxbKyxrLq29UzMLNDxjHDgLVBG','sg9ZDgvKignVBNzLCNnHDgLVBIbMAwXLihbYB2PLy3rPB24GzMfPBgvKlG','mty3ndqZodDYwgTnuNK','CxvVDgfZ','C2vZC2LVBLDHDgnOu2XVDhm','AxntywzLsw50zwDLCG','zMLUywXSEq','Cgf0AhngB3jdB252zxjZyxrPB24','y2fUy2vS','DgvTCgXHDgvoyw1L','DgL0Bgu','DgvTCg9Yyxj5uM9VDerPCMvJDg9YEq','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jfq09oq0Lmrv9gquLmruq','C3LUyW','tK9orq','Bwf4qNL0zxm','C2vZC2LVBKLK','A2v5CW','reLsrunut1jzaa','DxnLzej5DgvZ','yxjNCW','CMvUzxC','BM9KzuLK','zgLZywjSzvbYzxbHCMvK','zMLSzuLK','se9tvevex0nptLzfuLnbveLptL9uru1qtefurv9vtKfwquLmqujmrq','zw50CMLLCW','se9tvevex0nptLzfuLnbveLptL9vueXpqurFtK9ux0zpvu5e','y29UDMvYC2f0Aw9Uswq','zMLSzvbHDgG','C291CMnLv29YA3nWywnLugf0Aa','CMvTB3zLq29UDMvYC2f0Aw9Uv2f0y2HmzwfZzxm','y3jLyxrLzef0','yMvNAw5dB252zxjZyxrPB25dBgvHBNvW','q09ovKvsu0fusu9ox0Hpu1rjtKDFvu5bvKfjtefcteu','l2HVBwuVBwfY','B3DUzxjlzxK','Bw9KzwXZ','y29Kzq','ChjLCgfYzq','lNvWBg9Hza','y3jLyxrL','nde3mtG2vfPXv0XP','l3DVCMTZCgfJzq','B3v0Chv0rgLYzwn0B3j5','Cgf0Ahm','BMXPBMS','se9tvevex0nptLzfuLnbveLptL9nt0rftf9ot1rFqvzbsuXbqKXf','DxnLCLn0B3jHz2vlzxK','ywXSB2m','DgvTCgXHDgvezwXLDgvK','CMv0ywLUq29UDMvYC2f0Aw9UvgvTCgXHDgu','CMvKDwnL','ihrVic93B3jRC3bHy2uVB3v0Chv0igLUC3rLywqGB2yGCMvJCMvHDgLUzYbVCIbYzwDLBMvYyxrPBMCGAxqU','CMvZCg9UC2vZvhjHBNnWB3j0','y29TCgXLDgvKqxq','B3v0Chv0q2fWywjPBgL0AwvZ','CMvTB3zLv2f0y2HmzwfZzq','qunusvzf','qvzbsuXbqKXf','Bg9HzfrLBxbSyxrLvMvYC2LVBG','q09ovKvsu0fusu9ox1rftvbmqvrfx1zfuLnjt05Fq09suLvqveve','C291CMnLugf0Aa','D2f0y2G','uLvoveLnrq','BgLUA1rHCMDLDa','zgvMyxvSDeLK','DxbSB2fKCW','zgf0yq','B3DUCW','C3rHDhvZ','CMvHzeLTywDL','CMvZCg9UC2vZuhjLDMLVDxnszxnWB25ZzuLK','se9tvevex0nptLzfuLnbveLptL9gsuXfx1jbtKDfx0LovKfmsuq','yxr0ywnOBwvUDeLKCW','y29UDMvYC2f0Aw9U','CMvZB2X2zwruyxjNzxq','AxneAxjLy3rVCNK','Aw5IB3G','y29UDMvYC2f0Aw9Uu3rVCMfNzuTLEq','zhjHzNq','v2HLBIb0AguGDxnLCIbHC2TZihrVihbSywnLigeGChjLDMLVDxnSEsbNzw5LCMf0zwqGAw1Hz2uGAw4GB3v0Chv0lcbPBNnWzwn0ia','q0foq0vmteve','y3jLyxrLq29UDMvYC2f0Aw9U','y29UzMLNDxjHDgLVBG','Ag9ZDfbVBgLJEvzLCNnPB24','CMvXDwLYzuf0DgfJAg1LBNq','nda0otb3se1VCKW','B3v0Chv0','zMLSzvbYB2PLy3rPB25jza','y2XPzw50uMvXDwvZDeLK','se9tvevex0nptLzfuLnbveLptL9gsuXfx0nptKzmsunu','ChjLzMXPz2H0vxbSB2fK','D29YA2jLBMnOu2vXDwvUy2u','BwLTzvr5Cgu','CMvXDwLYzuzPBgu','mJe3v0Lmtfv3','DxbNCMfKzq','yMfZzty0','l3bYB2m','r2vUzxjHDgvKigLTywDLCYbMCM9TihrOAxmGy29UDMvYC2f0Aw9UihjLBwfPBIbHDMfPBgfIBguGywnYB3nZigv4zwn1DgLVBNmGAw4GDgHLihjLywqTB25SEsa','BgLTAxq','DxbKyxrLq29UDMvYC2f0Aw9U','zgvZy3jPChrPB24','AgfZtM9Urw1WDhLvC2vYtwvZC2fNzq','tMv0D29YAYbHy2nLC3mGAxmGzgLZywjSzwqUieXVy2fSihbYB2nLC3nLCYWGv2vIifnLyxjJAcWGv2vIiezLDgnOlcbTB2rLBc1OB3n0zwqGD2vIlcbHBMqGCMvTB3rLieHuvfaGtunqignHBM5VDcb1C2uGDgHLig5LDhDVCMSU','C2XVDfrVA2vU','CNvUlq','BgvUz3rO','y29UDgvUDf9OyxnO','u0vtu0LptL9xqvrdsf9ot1rFrK9vtKq','ywXSB3DLze1VzgvSCW','Aw5WDxrdyxbHyMLSAxrPzxm','zMLSzurLBgv0zxm','Bgf0zxn0qxzHAwXHyMXLvgvTCgXHDgvwzxjZAw9Uswq','BNvTyMvY','CMvNAxn0zxjgAwXL','C2vYDMvYtMfTzq','se9tvevex0nptLzfuLnbveLptL9ot1rFqvvuse9ssvPfra','q09orKLhvvjbveLptL9jra','C3rHCNrnzxnZywDL','l3vZCG','CMvXDwLYzvvWBg9Hza','DgvTCgXHDgvwzxjZAw9UrgLYzwn0B3j5','igrPCMvJDg9YEs4'];_0x5676=function(){return _0x13d116;};return _0x5676();}import{sessionTitleFromFirstMessage}from'../util/node-operation-parsers.js';import{safeErrorCode}from'../util/safe-error.js';import{SessionWatchSlotCoordinator}from'./session-watch-slot-coordinator.js';const HOST_POLICY_VERSION=-0x3d*-0x23+-0x8*-0x3d7+-0x1*0x270e,MAX_FILE_READ_BYTES=(-0x180b*-0x1+-0x4dd+-0x112e)*(0x1583*0x1+-0x6*-0x45d+-0x2bb1),WATCH_TTL_MS=0x33*0x336+-0x89*-0x248+-0x12c82,RUNTIME_LINK_ROOTS=[_0x132f42(0x141),_0x132f42(0x1ba),_0x132f42(0x228),_0x132f42(0x1b4),_0x132f42(0x147)],RESERVED_SANDBOX_ROOTS=[_0x132f42(0xf3),_0x132f42(0xeb),_0x132f42(0x235),_0x132f42(0x141),_0x132f42(0x1ba),_0x132f42(0x228),_0x132f42(0x1b4),_0x132f42(0x147),_0x132f42(0x12b),_0x132f42(0x232),_0x132f42(0x193),_0x132f42(0x162)];export class HostedConversationNodeService{[_0x132f42(0x187)];[_0x132f42(0x217)];['id'];[_0x132f42(0x274)]=new Map();[_0x132f42(0x1df)]=new Map();[_0x132f42(0x1c5)]=new Map();[_0x132f42(0x1a3)]=new Map();[_0x132f42(0x276)]=new Map();[_0x132f42(0x1b8)]=new Set();[_0x132f42(0x10b)]=new Map();[_0x132f42(0x25d)]=new Map();[_0x132f42(0x139)]=new Set();[_0x132f42(0x1d5)]=new Map();[_0x132f42(0x1fb)]=new Set();[_0x132f42(0x286)];[_0x132f42(0x299)]=![];[_0x132f42(0x169)]=-0x2411+-0x257a+0x498b;[_0x132f42(0x125)]=-0x62f*-0x3+0xd4c+-0x1fd9;constructor(_0x513a45){const _0x4b6381=_0x132f42;this[_0x4b6381(0x187)]=_0x513a45,this[_0x4b6381(0x217)]=_0x513a45[_0x4b6381(0x217)]??Date[_0x4b6381(0x217)],this['id']=_0x513a45['id']??randomUUID,this[_0x4b6381(0x286)]=_0x513a45[_0x4b6381(0x286)]??new SessionWatchSlotCoordinator();}[_0x132f42(0x18d)](){const _0x261841=_0x132f42;return{'conversation.hosted.list':_0x44df38=>this[_0x261841(0x19d)](_0x44df38),'conversation.hosted.create':_0x4ef825=>this[_0x261841(0xf1)](_0x4ef825),'conversation.hosted.get':_0x3c7f92=>this[_0x261841(0x25c)](_0x3c7f92),'conversation.hosted.watch':_0x147492=>this[_0x261841(0x107)](_0x147492),'conversation.hosted.unwatch':_0xe3f943=>this[_0x261841(0x21b)](_0xe3f943),'conversation.hosted.message':_0x4ce32e=>this[_0x261841(0x253)](_0x4ce32e),'conversation.hosted.interrupt':_0x3cf4b8=>this[_0x261841(0x177)](_0x3cf4b8),'conversation.hosted.config.update':_0x19ff61=>this[_0x261841(0x282)](_0x19ff61),'conversation.hosted.metadata.update':_0x11049a=>this[_0x261841(0x23b)](_0x11049a),'conversation.hosted.image.read':_0xddc313=>this[_0x261841(0x10f)](_0xddc313),'conversation.hosted.files.list':_0x5a3d1b=>this[_0x261841(0x1aa)](_0x5a3d1b),'conversation.hosted.file.read':_0x5764dc=>this[_0x261841(0x24d)](_0x5764dc),'conversation.hosted.file.delete':_0x4a0bdb=>this[_0x261841(0x1c8)](_0x4a0bdb),'conversation.hosted.files.upload.preflight':_0xc3a71e=>this[_0x261841(0x124)](_0xc3a71e),'conversation.hosted.files.upload.create':_0x40b801=>this[_0x261841(0x17c)](_0x40b801),'conversation.hosted.files.upload.chunk':_0x4cef18=>this[_0x261841(0x186)](_0x4cef18),'conversation.hosted.files.upload.status':_0x277ea1=>this[_0x261841(0x196)](_0x277ea1),'conversation.hosted.files.upload.complete':_0x28f53b=>this[_0x261841(0x1dc)](_0x28f53b),'conversation.hosted.files.upload.cancel':_0x1abd4e=>this[_0x261841(0x1f9)](_0x1abd4e),'conversation.hosted.delete':_0x3b0ce8=>this[_0x261841(0x234)](_0x3b0ce8)};}[_0x132f42(0x198)](){const _0x5e853c=_0x132f42;if(this[_0x5e853c(0x299)]||this[_0x5e853c(0x1df)][_0x5e853c(0x14c)]>0x7*0x35+0x133*0xb+-0x752*0x2||this[_0x5e853c(0x1c5)][_0x5e853c(0x14c)]>0x1b39+-0x122d+-0x90c||this[_0x5e853c(0x1a3)][_0x5e853c(0x14c)]>0x1*0x1faf+-0x1b8+0x1df7*-0x1)return undefined;return this[_0x5e853c(0x299)]=!![],()=>{const _0x7173d3=_0x5e853c;this[_0x7173d3(0x299)]=![];};}[_0x132f42(0x19d)](_0x355d2d){const _0x5d8c36=_0x132f42,_0x190dc1=hostedRequest(_0x355d2d),_0x1cb1af=hostedConversationListInputSchema[_0x5d8c36(0x27e)](_0x190dc1[_0x5d8c36(0x10c)]),_0x6a2106=this[_0x5d8c36(0x187)][_0x5d8c36(0x1ec)][_0x5d8c36(0x26d)]({'userId':_0x190dc1[_0x5d8c36(0x27f)],'limit':_0x1cb1af[_0x5d8c36(0x12d)],..._0x1cb1af[_0x5d8c36(0x23d)]===undefined?{}:{'cursor':_0x1cb1af[_0x5d8c36(0x23d)]}});return hostedConversationListPageSchema[_0x5d8c36(0x27e)]({..._0x6a2106,'items':_0x6a2106[_0x5d8c36(0x1b1)][_0x5d8c36(0x273)](_0x4733da=>({..._0x4733da,'activity':this[_0x5d8c36(0x16a)](_0x4733da['id'])}))});}[_0x132f42(0xf1)](_0x53d9c5){const _0xe54ae6=_0x132f42;if(this[_0xe54ae6(0x299)])return Promise[_0xe54ae6(0x25e)](new Error(_0xe54ae6(0x2a4)));const _0x53b52e=hostedRequest(_0x53d9c5),_0x3b9648=hostedConversationCreateInputSchema[_0xe54ae6(0x27e)](_0x53b52e[_0xe54ae6(0x10c)]),_0x307104=conversationTemplateSummarySchema[_0xe54ae6(0x27e)](_0x53b52e[_0xe54ae6(0x236)]),_0x3fce23=runtimeModels(_0x53b52e[_0xe54ae6(0xed)]);if(_0x307104['id']!==_0x3b9648[_0xe54ae6(0x219)]||_0x307104[_0xe54ae6(0x298)]!==this[_0xe54ae6(0x187)][_0xe54ae6(0x298)]()||!_0x307104[_0xe54ae6(0x1f6)]||_0x307104[_0xe54ae6(0x10e)]!==_0xe54ae6(0x102)||_0x307104[_0xe54ae6(0x190)]===null)throw new Error(_0xe54ae6(0x29b));const _0x474799=_0x53b52e[_0xe54ae6(0x27f)]+'\x00'+_0x3b9648[_0xe54ae6(0x122)],_0x56648b=this[_0xe54ae6(0x274)][_0xe54ae6(0x25c)](_0x474799);if(_0x56648b!==undefined)return _0x56648b;const _0x528933=this[_0xe54ae6(0x187)][_0xe54ae6(0x1ec)][_0xe54ae6(0x1f4)](_0x53b52e[_0xe54ae6(0x27f)],_0x3b9648[_0xe54ae6(0x122)]);if(_0x528933!==undefined)return this[_0xe54ae6(0x1ef)](_0x53b52e[_0xe54ae6(0x27f)],_0x528933['id'],_0x3fce23);const _0x278427=this[_0xe54ae6(0x11b)](_0x53b52e[_0xe54ae6(0x27f)],_0x3b9648[_0xe54ae6(0x122)],_0x307104,_0x3fce23,_0x53b52e[_0xe54ae6(0x21c)]);return this[_0xe54ae6(0x274)][_0xe54ae6(0x212)](_0x474799,_0x278427),void _0x278427[_0xe54ae6(0x288)](()=>this[_0xe54ae6(0x274)][_0xe54ae6(0x234)](_0x474799))[_0xe54ae6(0x149)](()=>undefined),_0x278427;}async[_0x132f42(0x11b)](_0x501c97,_0x1d3fe1,_0x5d66e2,_0x57b72f,_0x103774){const _0x5ce34c=_0x132f42;await this[_0x5ce34c(0x187)][_0x5ce34c(0x182)]?.();const _0xf98bbe=await this[_0x5ce34c(0x104)](_0x5d66e2[_0x5ce34c(0x190)],_0x5d66e2['id'],!![]),_0x1c763b=selectModel(_0xf98bbe,_0x57b72f,_0xf98bbe[_0x5ce34c(0x202)][_0x5ce34c(0x10a)]),_0x411645=this['id'](),_0x1db416=await this[_0x5ce34c(0x187)][_0x5ce34c(0x1ec)][_0x5ce34c(0x256)](_0x501c97,_0x411645),_0x5403d9=this[_0x5ce34c(0x200)](_0x1db416[_0x5ce34c(0xf5)],_0xf98bbe),_0x50c507=this[_0x5ce34c(0x1a7)](_0x1db416[_0x5ce34c(0xf5)],_0xf98bbe);let _0x2094a8;try{const _0x2cda4a=await this[_0x5ce34c(0x187)][_0x5ce34c(0x1b3)][_0x5ce34c(0x1d7)]({'conversationId':_0x411645,'homeDirectory':_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x15a)],'workspaceDirectory':_0xf98bbe[_0x5ce34c(0x15c)],'systemInstruction':systemInstruction(_0xf98bbe),'defaultModelId':_0x1c763b['id'],'models':networkModels(allowedModels(_0xf98bbe,_0x57b72f),_0xf98bbe[_0x5ce34c(0x118)][_0x5ce34c(0x21d)]),..._0x103774===undefined?{}:{'runtimeScopeId':_0x103774},'pathMounts':_0x5403d9,'processExecutor':_0x50c507});_0x2094a8=_0x2cda4a[_0x5ce34c(0x292)];const _0x46335d=this[_0x5ce34c(0x217)](),_0x10953a={'id':_0x411645,'nodeId':this[_0x5ce34c(0x187)][_0x5ce34c(0x298)](),'sessionId':_0x2094a8,'templateId':_0x5d66e2['id'],'templateName':_0x5d66e2[_0x5ce34c(0x22e)],'activeVersionId':_0xf98bbe['id'],'title':_0x5d66e2[_0x5ce34c(0x22e)],'titleSource':_0x5ce34c(0x1e2),'pinnedAt':null,'status':_0x5ce34c(0x102),'modelId':_0x1c763b['id'],'createdAt':_0x46335d,'updatedAt':_0x46335d,'lastActivityAt':_0x46335d,'userStorageKey':_0x1db416[_0x5ce34c(0xf8)],'conversationStorageKey':_0x1db416[_0x5ce34c(0x117)],'clientRequestId':_0x1d3fe1,'templateDeleted':![],'quota':{'usedBytes':0x0,'maxBytes':_0xf98bbe[_0x5ce34c(0x118)][_0x5ce34c(0x285)][_0x5ce34c(0x189)]}},_0x2f6ab1=await this[_0x5ce34c(0x187)][_0x5ce34c(0x1ec)][_0x5ce34c(0x11b)](_0x10953a);return _0x2f6ab1['id']!==_0x411645&&(await this[_0x5ce34c(0x187)][_0x5ce34c(0x1b3)][_0x5ce34c(0x1a2)]({'conversationId':_0x411645,'sessionId':_0x2094a8,'homeDirectory':_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x15a)]})[_0x5ce34c(0x149)](()=>undefined),await rm(_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x1d2)],{'recursive':!![],'force':!![]})),this[_0x5ce34c(0x1ef)](_0x501c97,_0x2f6ab1['id'],_0x57b72f);}catch(_0xb7b305){if(_0x2094a8!==undefined)await this[_0x5ce34c(0x187)][_0x5ce34c(0x1b3)][_0x5ce34c(0x1a2)]({'conversationId':_0x411645,'sessionId':_0x2094a8,'homeDirectory':_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x15a)]})[_0x5ce34c(0x149)](()=>undefined);await rm(_0x1db416[_0x5ce34c(0xf5)][_0x5ce34c(0x1d2)],{'recursive':!![],'force':!![]})[_0x5ce34c(0x149)](()=>undefined);throw _0xb7b305;}}async[_0x132f42(0x25c)](_0x25b936){const _0x13b75f=_0x132f42,_0x3142a3=hostedRequest(_0x25b936),_0x141069=hostedConversationIdInputSchema[_0x13b75f(0x27e)](_0x3142a3[_0x13b75f(0x10c)]);return this[_0x13b75f(0x1ef)](_0x3142a3[_0x13b75f(0x27f)],_0x141069[_0x13b75f(0x29e)],runtimeModels(_0x3142a3[_0x13b75f(0xed)]),_0x3142a3[_0x13b75f(0xfa)]);}async[_0x132f42(0x1ef)](_0x43f420,_0x3e0137,_0x35584a,_0x20cec6=![]){const _0x4cb860=_0x132f42;let _0x4ab00f=this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0x254)](_0x43f420,_0x3e0137);if(_0x20cec6)_0x4ab00f=await this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0xfb)](_0x43f420,_0x3e0137,this[_0x4cb860(0x217)]());const _0x4cab25=await this[_0x4cb860(0x104)](_0x4ab00f[_0x4cb860(0x1ff)],_0x4ab00f[_0x4cb860(0x219)]),_0x5e6b08=networkModels(allowedModels(_0x4cab25,_0x35584a),_0x4cab25[_0x4cb860(0x118)][_0x4cb860(0x21d)]),_0x13cb24=this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0x289)](_0x43f420,_0x4ab00f['id']),_0x33b324=await this[_0x4cb860(0x187)][_0x4cb860(0x1b3)][_0x4cb860(0x16c)]({'conversationId':_0x4ab00f['id'],'sessionId':_0x4ab00f[_0x4cb860(0x292)],'homeDirectory':_0x13cb24[_0x4cb860(0x15a)],'modelId':_0x4ab00f[_0x4cb860(0x22d)]});return hostedConversationSnapshotSchema[_0x4cb860(0x27e)]({'conversation':this[_0x4cb860(0x195)](_0x4ab00f),'template':templateSummary(_0x4ab00f,_0x4cab25[_0x4cb860(0x118)]),'run':this[_0x4cb860(0x1c5)][_0x4cb860(0x25c)](_0x4ab00f['id'])?.[_0x4cb860(0x1ab)]??null,'turns':_0x33b324,'files':this[_0x4cb860(0x187)][_0x4cb860(0x1ec)][_0x4cb860(0x1aa)](_0x43f420,_0x4ab00f['id']),'models':_0x5e6b08[_0x4cb860(0x273)](modelSummary),'error':null,'snapshotSequence':0x0});}async[_0x132f42(0x107)](_0x49b72e){const _0x5af2a3=_0x132f42,_0x2156a5=hostedRequest(_0x49b72e),_0x8b50d5=hostedConversationWatchInputSchema[_0x5af2a3(0x27e)](_0x2156a5[_0x5af2a3(0x10c)]),_0x4a97a9=this[_0x5af2a3(0x187)][_0x5af2a3(0x1ec)][_0x5af2a3(0x254)](_0x2156a5[_0x5af2a3(0x27f)],_0x8b50d5[_0x5af2a3(0x29e)]);if(this[_0x5af2a3(0x1fb)][_0x5af2a3(0x25a)](_0x4a97a9['id']))throw new Error(_0x5af2a3(0x14a));const _0x5dfa9c=requireWatchSessionHash(_0x2156a5[_0x5af2a3(0x1d0)]),_0xd5f182=watchOwnerKey(_0x5dfa9c,_0x8b50d5[_0x5af2a3(0x153)]);if(_0x8b50d5[_0x5af2a3(0x1cb)]===_0x5af2a3(0x297)){const _0x3ceb5f=this[_0x5af2a3(0x1d5)][_0x5af2a3(0x25c)](_0xd5f182);if(_0x3ceb5f===undefined||!this[_0x5af2a3(0x286)][_0x5af2a3(0x10d)](_0xd5f182,_0x3ceb5f[_0x5af2a3(0x132)])||_0x3ceb5f[_0x5af2a3(0x19a)]!==_0x8b50d5[_0x5af2a3(0x19a)]||_0x3ceb5f[_0x5af2a3(0x29e)]!==_0x8b50d5[_0x5af2a3(0x29e)]||_0x3ceb5f[_0x5af2a3(0x27f)]!==_0x2156a5[_0x5af2a3(0x27f)]||_0x3ceb5f[_0x5af2a3(0x22f)]<=Date[_0x5af2a3(0x217)]()){this[_0x5af2a3(0x101)](_0xd5f182);throw new Error(_0x5af2a3(0x136));}return _0x3ceb5f[_0x5af2a3(0x22f)]=Date[_0x5af2a3(0x217)]()+WATCH_TTL_MS,clearTimeout(_0x3ceb5f[_0x5af2a3(0x257)]),_0x3ceb5f[_0x5af2a3(0x257)]=this[_0x5af2a3(0x230)](_0xd5f182),this[_0x5af2a3(0x1e8)](_0x3ceb5f);}const _0x345099=runtimeModels(_0x2156a5[_0x5af2a3(0xed)]),_0x27f17c=this[_0x5af2a3(0x1d5)][_0x5af2a3(0x25c)](_0xd5f182);if(_0x27f17c!==undefined&&this[_0x5af2a3(0x286)][_0x5af2a3(0x10d)](_0xd5f182,_0x27f17c[_0x5af2a3(0x132)])&&_0x27f17c[_0x5af2a3(0x19a)]===_0x8b50d5[_0x5af2a3(0x19a)]&&_0x27f17c[_0x5af2a3(0x29e)]===_0x8b50d5[_0x5af2a3(0x29e)]&&_0x27f17c[_0x5af2a3(0x27f)]===_0x2156a5[_0x5af2a3(0x27f)]&&_0x27f17c[_0x5af2a3(0x22f)]>Date[_0x5af2a3(0x217)]())return _0x27f17c[_0x5af2a3(0x22f)]=Date[_0x5af2a3(0x217)]()+WATCH_TTL_MS,clearTimeout(_0x27f17c[_0x5af2a3(0x257)]),_0x27f17c[_0x5af2a3(0x257)]=this[_0x5af2a3(0x230)](_0xd5f182),this[_0x5af2a3(0x1e8)](_0x27f17c);this[_0x5af2a3(0x101)](_0xd5f182);const _0x6ff0b0=this[_0x5af2a3(0x286)][_0x5af2a3(0x18a)](_0xd5f182,_0x5af2a3(0x172),()=>this[_0x5af2a3(0x101)](_0xd5f182)),_0x197b23={'ownerKey':_0xd5f182,'slotToken':_0x6ff0b0,'sessionHash':_0x5dfa9c,'workbenchConnectionId':_0x8b50d5[_0x5af2a3(0x153)],'watchId':_0x8b50d5[_0x5af2a3(0x19a)],'conversationId':_0x8b50d5[_0x5af2a3(0x29e)],'templateId':_0x4a97a9[_0x5af2a3(0x219)],'userId':_0x2156a5[_0x5af2a3(0x27f)],'models':_0x345099,'nodeGeneration':this[_0x5af2a3(0x187)][_0x5af2a3(0x175)]?.()??_0x5af2a3(0x20c),'pendingEvents':[],'expiresAt':Date[_0x5af2a3(0x217)]()+WATCH_TTL_MS,'ready':![],'timer':undefined};return _0x197b23[_0x5af2a3(0x257)]=this[_0x5af2a3(0x230)](_0xd5f182),this[_0x5af2a3(0x1d5)][_0x5af2a3(0x212)](_0xd5f182,_0x197b23),void this[_0x5af2a3(0x268)](_0x197b23),this[_0x5af2a3(0x1e8)](_0x197b23);}[_0x132f42(0x21b)](_0x330079){const _0x1fe965=_0x132f42,_0x1079f2=hostedRequest(_0x330079),_0x2092a7=hostedConversationUnwatchInputSchema[_0x1fe965(0x27e)](_0x1079f2[_0x1fe965(0x10c)]);this[_0x1fe965(0x187)][_0x1fe965(0x1ec)][_0x1fe965(0x254)](_0x1079f2[_0x1fe965(0x27f)],_0x2092a7[_0x1fe965(0x29e)]);const _0x5aa923=watchOwnerKey(requireWatchSessionHash(_0x1079f2[_0x1fe965(0x1d0)]),_0x2092a7[_0x1fe965(0x153)]),_0x3cbbdb=this[_0x1fe965(0x1d5)][_0x1fe965(0x25c)](_0x5aa923);if(_0x3cbbdb?.[_0x1fe965(0x19a)]===_0x2092a7[_0x1fe965(0x19a)]&&_0x3cbbdb[_0x1fe965(0x29e)]===_0x2092a7[_0x1fe965(0x29e)]&&_0x3cbbdb[_0x1fe965(0x27f)]===_0x1079f2[_0x1fe965(0x27f)])this[_0x1fe965(0x101)](_0x5aa923);return{'unwatched':!![]};}[_0x132f42(0x209)](_0x29952e,_0x283d5b){const _0x17b72f=_0x132f42;return this[_0x17b72f(0x18b)](_0x29952e,{'conversationId':_0x29952e,'kind':_0x17b72f(0x1b3),'runtimeEvent':_0x283d5b});}[_0x132f42(0x156)](_0x197f47){const _0x4292d6=_0x132f42;return this[_0x4292d6(0x1fb)][_0x4292d6(0x25a)](_0x197f47)||this[_0x4292d6(0x1c5)][_0x4292d6(0x25a)](_0x197f47)||this[_0x4292d6(0x1a3)][_0x4292d6(0x25a)](_0x197f47)||[...this[_0x4292d6(0x1d5)][_0x4292d6(0x213)]()][_0x4292d6(0x258)](_0xd458cd=>_0xd458cd[_0x4292d6(0x29e)]===_0x197f47)||[...this[_0x4292d6(0x10b)][_0x4292d6(0x213)]()][_0x4292d6(0x258)](_0x18e658=>_0x18e658[_0x4292d6(0x29e)]===_0x197f47&&_0x18e658[_0x4292d6(0x10e)]===_0x4292d6(0x221))||[...this[_0x4292d6(0x1df)][_0x4292d6(0x293)]()][_0x4292d6(0x258)](_0x38730f=>_0x38730f[_0x4292d6(0x1fa)](_0x197f47+'\x00'));}[_0x132f42(0x2a3)](_0x2342ca){const _0x5944ba=_0x132f42;if(this[_0x5944ba(0x156)](_0x2342ca))return undefined;return this[_0x5944ba(0x1fb)][_0x5944ba(0x1ad)](_0x2342ca),()=>{const _0x186d41=_0x5944ba;this[_0x186d41(0x1fb)][_0x186d41(0x234)](_0x2342ca);};}async[_0x132f42(0x1d9)](_0x49edd5){const _0xc2955c=_0x132f42,_0x28381c=this[_0xc2955c(0x187)][_0xc2955c(0x1ec)][_0xc2955c(0x27d)](_0x49edd5);await this[_0xc2955c(0x187)][_0xc2955c(0x1b3)][_0xc2955c(0x1a2)]({'conversationId':_0x49edd5['id'],'sessionId':_0x49edd5[_0xc2955c(0x292)],'homeDirectory':_0x28381c[_0xc2955c(0x15a)]})[_0xc2955c(0x149)](()=>undefined);}[_0x132f42(0x222)](){const _0x20b495=_0x132f42;for(const [_0x1d0890,_0x1549d4]of this[_0x20b495(0x1c5)]){const _0x1bbe9b=runInterruptionKey(_0x1d0890,_0x1549d4[_0x20b495(0x1ab)]['id']);this[_0x20b495(0x1b8)][_0x20b495(0x1ad)](_0x1bbe9b);if(!_0x1549d4[_0x20b495(0x28a)]())this[_0x20b495(0x1b8)][_0x20b495(0x234)](_0x1bbe9b);}for(const _0x201e73 of[...this[_0x20b495(0x1d5)][_0x20b495(0x293)]()])this[_0x20b495(0x101)](_0x201e73);}[_0x132f42(0x253)](_0x3ef280){const _0xeb77d3=_0x132f42;if(this[_0xeb77d3(0x299)])return Promise[_0xeb77d3(0x25e)](new Error(_0xeb77d3(0x2a4)));const _0x262031=hostedRequest(_0x3ef280),_0x200dce=hostedConversationMessageInputSchema[_0xeb77d3(0x27e)](_0x262031[_0xeb77d3(0x10c)]),_0x2878bc=_0x200dce[_0xeb77d3(0x29e)]+'\x00'+_0x200dce[_0xeb77d3(0x275)],_0x5b7c79=this[_0xeb77d3(0x1df)][_0xeb77d3(0x25c)](_0x2878bc);if(_0x5b7c79!==undefined)return _0x5b7c79;const _0x517811=this[_0xeb77d3(0x187)][_0xeb77d3(0x1ec)][_0xeb77d3(0x262)](_0x262031[_0xeb77d3(0x27f)],_0x200dce[_0xeb77d3(0x29e)],_0x200dce[_0xeb77d3(0x275)]);if(_0x517811!==undefined){const _0x21aceb=this[_0xeb77d3(0x187)][_0xeb77d3(0x1ec)][_0xeb77d3(0x254)](_0x262031[_0xeb77d3(0x27f)],_0x200dce[_0xeb77d3(0x29e)]);return Promise[_0xeb77d3(0x240)]({'conversation':this[_0xeb77d3(0x195)](_0x21aceb),'run':runFromMessage(_0x517811)});}if([...this[_0xeb77d3(0x1df)][_0xeb77d3(0x293)]()][_0xeb77d3(0x258)](_0x380f97=>_0x380f97[_0xeb77d3(0x1fa)](_0x200dce[_0xeb77d3(0x29e)]+'\x00')))return Promise[_0xeb77d3(0x25e)](new Error(_0xeb77d3(0x238)));const _0x36e4df=this[_0xeb77d3(0x140)](_0x262031,_0x200dce);return this[_0xeb77d3(0x1df)][_0xeb77d3(0x212)](_0x2878bc,_0x36e4df),void _0x36e4df[_0xeb77d3(0x288)](()=>this[_0xeb77d3(0x1df)][_0xeb77d3(0x234)](_0x2878bc))[_0xeb77d3(0x149)](()=>undefined),_0x36e4df;}async[_0x132f42(0x140)](_0x2e342c,_0x585fbb){const _0x443ec4=_0x132f42;let _0x163104=this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x254)](_0x2e342c[_0x443ec4(0x27f)],_0x585fbb[_0x443ec4(0x29e)]);if(this[_0x443ec4(0x1fb)][_0x443ec4(0x25a)](_0x163104['id']))throw new Error(_0x443ec4(0x14a));if(_0x163104[_0x443ec4(0x10e)]!==_0x443ec4(0x102))throw new Error(_0x443ec4(0x14a));if(this[_0x443ec4(0x1c5)][_0x443ec4(0x25a)](_0x163104['id']))throw new Error(_0x443ec4(0x238));const _0x2f211f=sessionTitleFromFirstMessage(_0x585fbb[_0x443ec4(0x14f)]),_0x36df49=_0x2f211f[_0x443ec4(0x134)]>-0x5*0x25a+0x21*0x23+0x35*0x23&&!this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x130)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id']),_0x53ebb6=runtimeModels(_0x2e342c[_0x443ec4(0xed)]),_0x538799=this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x289)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id']);let _0x2803e2,_0x4efc01,_0x562da3,_0x321097;const _0x1812a1=_0x163104[_0x443ec4(0xfa)]?undefined:this[_0x443ec4(0x13a)](_0x163104[_0x443ec4(0x219)]);if(_0x1812a1!==undefined&&_0x1812a1!==_0x163104[_0x443ec4(0x1ff)]){const _0x1a7ff1=_0x163104[_0x443ec4(0x1ff)],_0x3f99be=_0x1812a1;try{_0x2803e2=await this[_0x443ec4(0x104)](_0x3f99be,_0x163104[_0x443ec4(0x219)],!![]),_0x4efc01=selectModel(_0x2803e2,_0x53ebb6,_0x585fbb[_0x443ec4(0x22d)]??_0x2803e2[_0x443ec4(0x202)][_0x443ec4(0x10a)]),_0x562da3=resolveMcpServers(_0x2803e2,this[_0x443ec4(0x187)][_0x443ec4(0x17b)]??process.env),this[_0x443ec4(0x200)](_0x538799,_0x2803e2),this[_0x443ec4(0x1a7)](_0x538799,_0x2803e2),_0x321097={'previousVersionId':_0x1a7ff1,'targetVersionId':_0x3f99be};}catch(_0x5aa231){this[_0x443ec4(0x1c1)](_0x163104,_0x1a7ff1,_0x3f99be,_0x5aa231);throw new Error(_0x443ec4(0x1f0));}}else _0x2803e2=await this[_0x443ec4(0x104)](_0x163104[_0x443ec4(0x1ff)],_0x163104[_0x443ec4(0x219)],!![]),_0x4efc01=selectModel(_0x2803e2,_0x53ebb6,_0x585fbb[_0x443ec4(0x22d)]??_0x163104[_0x443ec4(0x22d)]);const _0x548fa4=await Promise[_0x443ec4(0x218)](_0x585fbb[_0x443ec4(0x112)][_0x443ec4(0x273)](_0x1a5970=>this[_0x443ec4(0x11e)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id'],_0x1a5970))),_0x51c3b0=attachmentPrompt(_0x585fbb[_0x443ec4(0x14f)],_0x548fa4),_0x42df91=marAgentGeneratedImagesDirectory(_0x538799[_0x443ec4(0x15a)],_0x163104[_0x443ec4(0x292)]),_0x47ab8c=hostedConversationGeneratedImagesDisplayDirectory(_0x163104[_0x443ec4(0x292)]);if(_0x42df91===undefined||_0x47ab8c===undefined)throw new Error(_0x443ec4(0x14b));await mkdir(_0x42df91,{'recursive':!![],'mode':0x1c0});const _0x1d06d1=this[_0x443ec4(0x200)](_0x538799,_0x2803e2,_0x42df91,_0x47ab8c),_0xbbd49=join(_0x538799[_0x443ec4(0x28d)],_0x443ec4(0x133)+randomUUID());await mkdir(_0xbbd49,{'mode':0x1c0}),this[_0x443ec4(0x181)](_0x2e342c[_0x443ec4(0x27f)],_0x163104,_0x443ec4(0x259),this[_0x443ec4(0x217)]());const _0x513932=[];let _0x3a3710=![];const _0x20de37=await this[_0x443ec4(0x187)][_0x443ec4(0x1b3)][_0x443ec4(0x237)]({'conversationId':_0x163104['id'],'sessionId':_0x163104[_0x443ec4(0x292)],'clientMessageId':_0x585fbb[_0x443ec4(0x275)],'userPrompt':_0x585fbb[_0x443ec4(0x14f)],'prompt':_0x51c3b0,'attachmentIds':_0x585fbb[_0x443ec4(0x112)],'access':_0x443ec4(0x1fe),'modelId':_0x4efc01['id'],'models':networkModels(allowedModels(_0x2803e2,_0x53ebb6),_0x2803e2[_0x443ec4(0x118)][_0x443ec4(0x21d)]),..._0x2e342c[_0x443ec4(0x21c)]===undefined?{}:{'runtimeScopeId':_0x2e342c[_0x443ec4(0x21c)]},'systemInstruction':systemInstruction(_0x2803e2,_0x47ab8c),'homeDirectory':_0x538799[_0x443ec4(0x15a)],'workspaceDirectory':_0x2803e2[_0x443ec4(0x15c)],'temporaryDirectory':_0xbbd49,'pathMounts':_0x1d06d1,'processExecutor':this[_0x443ec4(0x1a7)](_0x538799,_0x2803e2,_0xbbd49,_0x42df91,_0x47ab8c),'mcpServers':_0x562da3??resolveMcpServers(_0x2803e2,this[_0x443ec4(0x187)][_0x443ec4(0x17b)]??process.env),'webAccess':_0x2803e2[_0x443ec4(0x118)][_0x443ec4(0x21d)]!==_0x443ec4(0x290),'onEvent':_0x5be99d=>{const _0x4ef8cd=_0x443ec4;if(_0x3a3710)this[_0x4ef8cd(0x209)](_0x163104['id'],_0x5be99d);else _0x513932[_0x4ef8cd(0x171)](_0x5be99d);}})[_0x443ec4(0x149)](async _0x4fe199=>{const _0x2c61fd=_0x443ec4;this[_0x2c61fd(0x181)](_0x2e342c[_0x2c61fd(0x27f)],_0x163104,_0x2c61fd(0x210),this[_0x2c61fd(0x217)]()),await rm(_0xbbd49,{'recursive':!![],'force':!![]})[_0x2c61fd(0x149)](()=>undefined);if(_0x321097!==undefined){this[_0x2c61fd(0x1c1)](_0x163104,_0x321097[_0x2c61fd(0x201)],_0x321097[_0x2c61fd(0x14d)],_0x4fe199);throw new Error(_0x2c61fd(0x1f0));}throw _0x4fe199;}),_0x44ee36=_0x20de37[_0x443ec4(0x1ab)][_0x443ec4(0x216)];let _0x34acfb=![],_0x34aced;try{this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x26b)]({'conversationId':_0x163104['id'],'clientMessageId':_0x585fbb[_0x443ec4(0x275)],'runId':_0x20de37[_0x443ec4(0x1ab)]['id'],'userTextPresent':_0x2f211f[_0x443ec4(0x134)]>-0x23fd+0x2112+0x2eb,'status':_0x443ec4(0x25b),'createdAt':_0x44ee36,'updatedAt':_0x44ee36}),_0x34acfb=!![];const _0x3eb4c5=this[_0x443ec4(0x217)]();_0x34aced=await this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x158)]({'conversationId':_0x163104['id'],'modelId':_0x4efc01['id'],'activityAt':_0x3eb4c5,..._0x321097===undefined?{}:{'templateVersion':{'expectedActiveVersionId':_0x321097[_0x443ec4(0x201)],'activeVersionId':_0x321097[_0x443ec4(0x14d)],'maxStorageBytes':_0x2803e2[_0x443ec4(0x118)][_0x443ec4(0x285)][_0x443ec4(0x189)]}},..._0x36df49?{'automaticTitle':_0x2f211f}:{}});}catch(_0x39dcb1){try{_0x20de37[_0x443ec4(0x28a)]();}catch{}const _0x4c19ad=await _0x20de37[_0x443ec4(0x261)][_0x443ec4(0x149)](()=>({'status':_0x443ec4(0x1a9),'completedAt':this[_0x443ec4(0x217)]()}));if(_0x34acfb)try{this[_0x443ec4(0x187)][_0x443ec4(0x1ec)][_0x443ec4(0x16b)](_0x163104['id'],_0x585fbb[_0x443ec4(0x275)],_0x4c19ad[_0x443ec4(0x10e)],_0x4c19ad[_0x443ec4(0xff)]);}catch{}await rm(_0xbbd49,{'recursive':!![],'force':!![]})[_0x443ec4(0x149)](()=>undefined),this[_0x443ec4(0x181)](_0x2e342c[_0x443ec4(0x27f)],_0x163104,_0x443ec4(0x210),_0x4c19ad[_0x443ec4(0xff)]);if(_0x321097!==undefined)this[_0x443ec4(0x1c1)](_0x163104,_0x321097[_0x443ec4(0x201)],_0x321097[_0x443ec4(0x14d)],_0x39dcb1);throw _0x39dcb1;}_0x163104=_0x34aced[_0x443ec4(0x113)];if(_0x321097!==undefined)this[_0x443ec4(0x18b)](_0x163104['id'],{'conversationId':_0x163104['id'],'kind':_0x443ec4(0x129),'upgrade':{'status':_0x443ec4(0x15d),'previousVersionId':_0x321097[_0x443ec4(0x201)],'targetVersionId':_0x321097[_0x443ec4(0x14d)],'activeVersionId':_0x163104[_0x443ec4(0x1ff)],'conversation':this[_0x443ec4(0x195)](_0x163104),'error':null}});this[_0x443ec4(0x1c5)][_0x443ec4(0x212)](_0x163104['id'],_0x20de37),this[_0x443ec4(0x181)](_0x2e342c[_0x443ec4(0x27f)],_0x163104,_0x443ec4(0x25b),_0x20de37[_0x443ec4(0x1ab)][_0x443ec4(0x216)]);if(_0x34aced[_0x443ec4(0x1f1)])this[_0x443ec4(0x18b)](_0x163104['id'],{'conversationId':_0x163104['id'],'kind':_0x443ec4(0x113),'conversation':this[_0x443ec4(0x195)](_0x163104)});this[_0x443ec4(0x18b)](_0x163104['id'],{'conversationId':_0x163104['id'],'kind':_0x443ec4(0x1ab),'run':_0x20de37[_0x443ec4(0x1ab)]}),_0x3a3710=!![];for(const _0xece8f of _0x513932)this[_0x443ec4(0x209)](_0x163104['id'],_0xece8f);_0x513932[_0x443ec4(0x134)]=0x1*0x98f+-0x1926+0xf97;const _0x5d8111=_0x20de37[_0x443ec4(0x261)][_0x443ec4(0x250)](_0x164859=>this[_0x443ec4(0x231)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id'],_0x585fbb[_0x443ec4(0x275)],_0x20de37[_0x443ec4(0x1ab)],_0x164859),()=>this[_0x443ec4(0x231)](_0x2e342c[_0x443ec4(0x27f)],_0x163104['id'],_0x585fbb[_0x443ec4(0x275)],_0x20de37[_0x443ec4(0x1ab)],{'status':_0x443ec4(0x1a9),'completedAt':this[_0x443ec4(0x217)]()}))[_0x443ec4(0x149)](()=>undefined)[_0x443ec4(0x288)](async()=>{const _0x44faa5=_0x443ec4;this[_0x44faa5(0x1b8)][_0x44faa5(0x234)](runInterruptionKey(_0x163104['id'],_0x20de37[_0x44faa5(0x1ab)]['id']));if(this[_0x44faa5(0x1c5)][_0x44faa5(0x25c)](_0x163104['id'])===_0x20de37)this[_0x44faa5(0x1c5)][_0x44faa5(0x234)](_0x163104['id']);if(this[_0x44faa5(0x1a3)][_0x44faa5(0x25c)](_0x163104['id'])===_0x5d8111)this[_0x44faa5(0x1a3)][_0x44faa5(0x234)](_0x163104['id']);await rm(_0xbbd49,{'recursive':!![],'force':!![]})[_0x44faa5(0x149)](()=>undefined);});return this[_0x443ec4(0x1a3)][_0x443ec4(0x212)](_0x163104['id'],_0x5d8111),void _0x5d8111,{'conversation':this[_0x443ec4(0x195)](_0x163104),'run':_0x20de37[_0x443ec4(0x1ab)]};}async[_0x132f42(0x231)](_0x201c38,_0x34953f,_0x551639,_0x4652c8,_0x1bbde0){const _0x2c131c=_0x132f42,_0x25df6d=runInterruptionKey(_0x34953f,_0x4652c8['id']),_0x5be224=this[_0x2c131c(0x1b8)][_0x2c131c(0x25a)](_0x25df6d);let _0x282aab;try{this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x16b)](_0x34953f,_0x551639,_0x1bbde0[_0x2c131c(0x10e)],_0x1bbde0[_0x2c131c(0xff)]);try{const _0x5d0172=await this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x23f)](_0x201c38,_0x34953f);this[_0x2c131c(0x18b)](_0x34953f,{'conversationId':_0x34953f,'kind':_0x2c131c(0x1cf),'files':_0x5d0172,'error':null});}catch(_0x3c8eac){this[_0x2c131c(0x18b)](_0x34953f,{'conversationId':_0x34953f,'kind':_0x2c131c(0x1cf),'files':this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x1aa)](_0x201c38,_0x34953f),'error':{'code':safeErrorCode(_0x3c8eac,_0x2c131c(0x28e)),'message':_0x2c131c(0x283)}});}await this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x18c)](_0x34953f,_0x1bbde0[_0x2c131c(0xff)]),this[_0x2c131c(0x18b)](_0x34953f,{'conversationId':_0x34953f,'kind':_0x2c131c(0x1ab),'run':{'id':_0x4652c8['id'],'status':_0x1bbde0[_0x2c131c(0x10e)],'startedAt':_0x4652c8[_0x2c131c(0x216)],'completedAt':_0x1bbde0[_0x2c131c(0xff)]}}),await this[_0x2c131c(0x247)](_0x34953f,_0x1bbde0[_0x2c131c(0x28c)],_0x1bbde0[_0x2c131c(0xff)])[_0x2c131c(0x149)](()=>undefined),_0x282aab=this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x254)](_0x201c38,_0x34953f);}finally{this[_0x2c131c(0x1b8)][_0x2c131c(0x234)](_0x25df6d);if(_0x282aab===undefined)try{_0x282aab=this[_0x2c131c(0x187)][_0x2c131c(0x1ec)][_0x2c131c(0x254)](_0x201c38,_0x34953f);}catch{}if(_0x282aab!==undefined)this[_0x2c131c(0x181)](_0x201c38,_0x282aab,_0x2c131c(0x210),_0x1bbde0[_0x2c131c(0xff)]);}if(_0x282aab!==undefined&&(_0x1bbde0[_0x2c131c(0x10e)]!==_0x2c131c(0x1db)||!_0x5be224))this[_0x2c131c(0x21f)](_0x201c38,_0x282aab,_0x4652c8['id'],_0x1bbde0);}async[_0x132f42(0x247)](_0x19fe37,_0x3efc10,_0x576cee){const _0x34fa04=_0x132f42,_0x164ad4=automaticHostedConversationTitle(_0x3efc10);if(_0x164ad4===undefined)return;const _0x46730a=await this[_0x34fa04(0x187)][_0x34fa04(0x1ec)][_0x34fa04(0x1e6)](_0x19fe37,_0x164ad4,_0x576cee);if(_0x46730a===undefined)return;this[_0x34fa04(0x18b)](_0x19fe37,{'conversationId':_0x19fe37,'kind':_0x34fa04(0x113),'conversation':this[_0x34fa04(0x195)](_0x46730a)});}[_0x132f42(0x177)](_0x567d59){const _0x36b4a3=_0x132f42,_0xab2eac=hostedRequest(_0x567d59),_0x541560=hostedConversationIdInputSchema[_0x36b4a3(0x27e)](_0xab2eac[_0x36b4a3(0x10c)]),_0x4f3b9d=this[_0x36b4a3(0x187)][_0x36b4a3(0x1ec)][_0x36b4a3(0x254)](_0xab2eac[_0x36b4a3(0x27f)],_0x541560[_0x36b4a3(0x29e)]),_0x1a982e=this[_0x36b4a3(0x1c5)][_0x36b4a3(0x25c)](_0x541560[_0x36b4a3(0x29e)]);if(_0x1a982e===undefined)return{'interrupted':![]};const _0x2eb162=runInterruptionKey(_0x4f3b9d['id'],_0x1a982e[_0x36b4a3(0x1ab)]['id']);this[_0x36b4a3(0x1b8)][_0x36b4a3(0x1ad)](_0x2eb162);try{const _0x32952c=_0x1a982e[_0x36b4a3(0x28a)]();if(!_0x32952c)return this[_0x36b4a3(0x1b8)][_0x36b4a3(0x234)](_0x2eb162),{'interrupted':![]};return this[_0x36b4a3(0x181)](_0xab2eac[_0x36b4a3(0x27f)],_0x4f3b9d,_0x36b4a3(0x1e0),this[_0x36b4a3(0x217)]()),{'interrupted':!![]};}catch(_0x2876fd){this[_0x36b4a3(0x1b8)][_0x36b4a3(0x234)](_0x2eb162);throw _0x2876fd;}}async[_0x132f42(0x282)](_0x2a2bda){const _0x2b56f3=_0x132f42,_0x52866a=hostedRequest(_0x2a2bda),_0x2fe35d=hostedConversationConfigUpdateInputSchema[_0x2b56f3(0x27e)](_0x52866a[_0x2b56f3(0x10c)]),_0x28ee83=this[_0x2b56f3(0x187)][_0x2b56f3(0x1ec)][_0x2b56f3(0x254)](_0x52866a[_0x2b56f3(0x27f)],_0x2fe35d[_0x2b56f3(0x29e)]);if(this[_0x2b56f3(0x1fb)][_0x2b56f3(0x25a)](_0x28ee83['id']))throw new Error(_0x2b56f3(0x14a));const _0x548d08=await this[_0x2b56f3(0x104)](_0x28ee83[_0x2b56f3(0x1ff)],_0x28ee83[_0x2b56f3(0x219)]),_0x467aa0=runtimeModels(_0x52866a[_0x2b56f3(0xed)]),_0x582720=selectModel(_0x548d08,_0x467aa0,_0x2fe35d[_0x2b56f3(0x22d)]??_0x28ee83[_0x2b56f3(0x22d)]),_0x29226e=this[_0x2b56f3(0x217)](),_0x210a7f=await this[_0x2b56f3(0x187)][_0x2b56f3(0x1ec)][_0x2b56f3(0x12e)](_0x28ee83['id'],_0x4d457b=>({..._0x4d457b,'modelId':_0x582720['id'],'updatedAt':_0x29226e,'lastActivityAt':_0x29226e}));return this[_0x2b56f3(0x18b)](_0x28ee83['id'],{'conversationId':_0x28ee83['id'],'kind':_0x2b56f3(0x11c),'conversation':this[_0x2b56f3(0x195)](_0x210a7f)}),{'conversation':this[_0x2b56f3(0x195)](_0x210a7f)};}async[_0x132f42(0x23b)](_0x2b3b){const _0x58205b=_0x132f42,_0x138b65=hostedRequest(_0x2b3b),_0xa0c8b6=hostedConversationMetadataUpdateInputSchema[_0x58205b(0x27e)](_0x138b65[_0x58205b(0x10c)]),_0x4dc4fa=this[_0x58205b(0x187)][_0x58205b(0x1ec)][_0x58205b(0x254)](_0x138b65[_0x58205b(0x27f)],_0xa0c8b6[_0x58205b(0x29e)]);if(this[_0x58205b(0x1fb)][_0x58205b(0x25a)](_0x4dc4fa['id']))throw new Error(_0x58205b(0x14a));const _0x2cb75c=this[_0x58205b(0x217)](),_0x1d9e6d=await this[_0x58205b(0x187)][_0x58205b(0x1ec)][_0x58205b(0x12e)](_0x4dc4fa['id'],_0x58b3cb=>({..._0x58b3cb,'title':_0xa0c8b6[_0x58205b(0x28c)]??_0x58b3cb[_0x58205b(0x28c)],'titleSource':_0xa0c8b6[_0x58205b(0x28c)]===undefined?_0x58b3cb[_0x58205b(0x1f8)]:_0x58205b(0x197),'pinnedAt':_0xa0c8b6[_0x58205b(0x1ca)]===undefined?_0x58b3cb[_0x58205b(0x241)]:_0xa0c8b6[_0x58205b(0x1ca)]?_0x2cb75c:null,'updatedAt':_0x2cb75c,'lastActivityAt':_0x58b3cb[_0x58205b(0x1c2)]}));return this[_0x58205b(0x18b)](_0x4dc4fa['id'],{'conversationId':_0x4dc4fa['id'],'kind':_0x58205b(0x11c),'conversation':this[_0x58205b(0x195)](_0x1d9e6d)}),{'conversation':this[_0x58205b(0x195)](_0x1d9e6d)};}async[_0x132f42(0x1aa)](_0x4f15d0){const _0xf4ec12=_0x132f42,_0xfa5b56=hostedRequest(_0x4f15d0),_0x53f95c=hostedConversationIdInputSchema[_0xf4ec12(0x27e)](_0xfa5b56[_0xf4ec12(0x10c)]);return hostedConversationFilesSchema[_0xf4ec12(0x27e)]({'files':this[_0xf4ec12(0x187)][_0xf4ec12(0x1ec)][_0xf4ec12(0x1aa)](_0xfa5b56[_0xf4ec12(0x27f)],_0x53f95c[_0xf4ec12(0x29e)])});}async[_0x132f42(0x10f)](_0x4a0d1b){const _0x35c5b1=_0x132f42,_0x1ee0b0=hostedRequest(_0x4a0d1b),_0x36a4a0=hostedConversationImageReadInputSchema[_0x35c5b1(0x27e)](_0x1ee0b0[_0x35c5b1(0x10c)]);this[_0x35c5b1(0x187)][_0x35c5b1(0x1ec)][_0x35c5b1(0x254)](_0x1ee0b0[_0x35c5b1(0x27f)],_0x36a4a0[_0x35c5b1(0x29e)]);if(_0x36a4a0[_0x35c5b1(0x15f)]!==hostedConversationImageRunId(_0x36a4a0[_0x35c5b1(0x29e)]))throw new Error(_0x35c5b1(0x13e));const _0x10ed57=await this[_0x35c5b1(0x187)][_0x35c5b1(0x10f)](_0x36a4a0[_0x35c5b1(0x15f)],_0x36a4a0[_0x35c5b1(0x1ea)]);if(_0x10ed57===undefined)throw new Error(_0x35c5b1(0x23e));return{'image':_0x10ed57};}async[_0x132f42(0x24d)](_0xf1dc35){const _0x466cc0=_0x132f42,_0x181e6f=hostedRequest(_0xf1dc35),_0x5f23c8=hostedConversationFileReadInputSchema[_0x466cc0(0x27e)](_0x181e6f[_0x466cc0(0x10c)]),_0x2841d4=this[_0x466cc0(0x187)][_0x466cc0(0x1ec)][_0x466cc0(0x127)](_0x181e6f[_0x466cc0(0x27f)],_0x5f23c8[_0x466cc0(0x29e)],_0x5f23c8[_0x466cc0(0x29a)]),_0x430094=this[_0x466cc0(0x187)][_0x466cc0(0x1ec)][_0x466cc0(0x29f)](_0x181e6f[_0x466cc0(0x27f)],_0x2841d4);await assertRegularFile(_0x430094,_0x2841d4[_0x466cc0(0x14c)]);const _0x382dbc=_0x5f23c8[_0x466cc0(0x19b)]??0x4c6*0x7+-0xe98+-0x49*0x42;if(_0x382dbc>_0x2841d4[_0x466cc0(0x14c)])throw new Error(_0x466cc0(0x111));const _0x241f05=Math[_0x466cc0(0x1a0)](_0x5f23c8[_0x466cc0(0x12d)]??MAX_FILE_READ_BYTES,MAX_FILE_READ_BYTES),_0x3d51f1=await open(_0x430094,'r');try{const _0xc6aea4=Buffer[_0x466cc0(0xf9)](Math[_0x466cc0(0x1a0)](_0x241f05,Math[_0x466cc0(0x1c4)](-0x14*-0x1a9+-0x1cb3+-0x481,_0x2841d4[_0x466cc0(0x14c)]-_0x382dbc))),_0x3ab2b1=await _0x3d51f1[_0x466cc0(0x224)](_0xc6aea4,-0x6c5+0x3*-0x57d+0x173c,_0xc6aea4[_0x466cc0(0x134)],_0x382dbc),_0x2a0aad=_0x382dbc+_0x3ab2b1[_0x466cc0(0x1c6)],_0x27e45c=_0x2a0aad>=_0x2841d4[_0x466cc0(0x14c)];return hostedConversationFileReadResultSchema[_0x466cc0(0x27e)]({'file':_0x2841d4,'encoding':_0x466cc0(0x12a),'content':_0xc6aea4[_0x466cc0(0x21a)](-0x1*0x1032+-0xc*0x2ff+0x3426,_0x3ab2b1[_0x466cc0(0x1c6)])[_0x466cc0(0x154)](_0x466cc0(0x12a)),'offset':_0x382dbc,'nextOffset':_0x27e45c?null:_0x2a0aad,'eof':_0x27e45c});}finally{await _0x3d51f1[_0x466cc0(0x278)]();}}async[_0x132f42(0x1c8)](_0x14a156){const _0x486a8a=_0x132f42,_0x320755=hostedRequest(_0x14a156),_0x2d7952=hostedConversationFileDeleteInputSchema[_0x486a8a(0x27e)](_0x320755[_0x486a8a(0x10c)]);this[_0x486a8a(0x1d6)](_0x320755[_0x486a8a(0x27f)],_0x2d7952[_0x486a8a(0x29e)]);const _0x246fe8=_0x2d7952[_0x486a8a(0x29e)]+'\x00'+_0x2d7952[_0x486a8a(0x29a)];if(this[_0x486a8a(0x139)][_0x486a8a(0x25a)](_0x246fe8))throw new Error(_0x486a8a(0x123));this[_0x486a8a(0x139)][_0x486a8a(0x1ad)](_0x246fe8);try{const _0x5731f4=await this[_0x486a8a(0x187)][_0x486a8a(0x1ec)][_0x486a8a(0x1c8)](_0x320755[_0x486a8a(0x27f)],_0x2d7952[_0x486a8a(0x29e)],_0x2d7952[_0x486a8a(0x29a)],this[_0x486a8a(0x217)]()),_0x28df04=hostedConversationFileDeleteResultSchema[_0x486a8a(0x27e)]({'deletedFileId':_0x2d7952[_0x486a8a(0x29a)],'files':_0x5731f4});return this[_0x486a8a(0x18b)](_0x2d7952[_0x486a8a(0x29e)],{'conversationId':_0x2d7952[_0x486a8a(0x29e)],'kind':_0x486a8a(0x1cf),'files':_0x28df04[_0x486a8a(0x1cf)],'error':null}),_0x28df04;}finally{this[_0x486a8a(0x139)][_0x486a8a(0x234)](_0x246fe8);}}async[_0x132f42(0x124)](_0x59e2f6){const _0x445eab=_0x132f42,_0x2ad044=hostedRequest(_0x59e2f6),_0x5600cb=hostedConversationUploadPreflightInputSchema[_0x445eab(0x27e)](_0x2ad044[_0x445eab(0x10c)]),_0x261db5=this[_0x445eab(0x1d6)](_0x2ad044[_0x445eab(0x27f)],_0x5600cb[_0x445eab(0x29e)]),_0x5d1798=await this[_0x445eab(0x104)](_0x261db5[_0x445eab(0x1ff)],_0x261db5[_0x445eab(0x219)]),_0x2425d8=this[_0x445eab(0x187)][_0x445eab(0x1ec)][_0x445eab(0x289)](_0x2ad044[_0x445eab(0x27f)],_0x261db5['id']),_0x1d8b18=await Promise[_0x445eab(0x218)](_0x5600cb[_0x445eab(0x1cf)][_0x445eab(0x273)](async _0x206f98=>({'name':_0x206f98[_0x445eab(0x22e)],'status':await this[_0x445eab(0x151)](_0x2425d8,_0x261db5,_0x5d1798[_0x445eab(0x118)],_0x206f98[_0x445eab(0x22e)],_0x206f98[_0x445eab(0x14c)])})));return hostedConversationUploadPreflightResultSchema[_0x445eab(0x27e)]({'files':_0x1d8b18});}async[_0x132f42(0x17c)](_0x1ce50a){const _0x332733=_0x132f42,_0x136604=hostedRequest(_0x1ce50a),_0x5dd6ac=hostedConversationUploadCreateInputSchema[_0x332733(0x27e)](_0x136604[_0x332733(0x10c)]),_0x37a155=this[_0x332733(0x1d6)](_0x136604[_0x332733(0x27f)],_0x5dd6ac[_0x332733(0x29e)]),_0x193afd=_0x136604[_0x332733(0x27f)]+'\x00'+_0x37a155['id']+'\x00'+_0x5dd6ac[_0x332733(0x122)],_0x5d5962=this[_0x332733(0x25d)][_0x332733(0x25c)](_0x193afd);if(_0x5d5962!==undefined){const _0x2e9411=this[_0x332733(0x10b)][_0x332733(0x25c)](_0x5d5962);if(_0x2e9411!==undefined)return{'upload':hostedConversationUploadSchema[_0x332733(0x27e)](uploadProjection(_0x2e9411))};}const _0x3c31a9=await this[_0x332733(0x104)](_0x37a155[_0x332733(0x1ff)],_0x37a155[_0x332733(0x219)]),_0x2ec5f4=this[_0x332733(0x187)][_0x332733(0x1ec)][_0x332733(0x289)](_0x136604[_0x332733(0x27f)],_0x37a155['id']),_0x357b8f=await this[_0x332733(0x151)](_0x2ec5f4,_0x37a155,_0x3c31a9[_0x332733(0x118)],_0x5dd6ac[_0x332733(0x22e)],_0x5dd6ac[_0x332733(0x14c)]);if(_0x357b8f===_0x332733(0x1a8)||_0x357b8f===_0x332733(0x25f))throw new Error(_0x332733(0x267));if(_0x357b8f!==_0x332733(0x165))throw new Error(_0x332733(0x27c));const _0x5bd451=this['id'](),_0xa76755=join(_0x2ec5f4[_0x332733(0x1a6)],'.'+_0x5bd451+_0x332733(0xf0)),_0x34c03b=join(_0x2ec5f4[_0x332733(0x1a6)],_0x5dd6ac[_0x332733(0x22e)]),_0x9e306c=await open(_0xa76755,'wx',-0x10b2+0x5*0x74d+0x6d*-0x2b);await _0x9e306c[_0x332733(0x278)]();const _0x13c341={'uploadId':_0x5bd451,'conversationId':_0x37a155['id'],'userId':_0x136604[_0x332733(0x27f)],'clientRequestId':_0x5dd6ac[_0x332733(0x122)],'name':_0x5dd6ac[_0x332733(0x22e)],'mimeType':_0x5dd6ac[_0x332733(0x126)],'size':_0x5dd6ac[_0x332733(0x14c)],'temporaryPath':_0xa76755,'targetPath':_0x34c03b,'receivedBytes':0x0,'status':_0x332733(0x221)};return this[_0x332733(0x10b)][_0x332733(0x212)](_0x5bd451,_0x13c341),this[_0x332733(0x25d)][_0x332733(0x212)](_0x193afd,_0x5bd451),{'upload':hostedConversationUploadSchema[_0x332733(0x27e)](uploadProjection(_0x13c341))};}async[_0x132f42(0x186)](_0x5ac9de){const _0x443bfd=_0x132f42,_0x4162a5=hostedRequest(_0x5ac9de),_0x5de368=hostedConversationUploadChunkInputSchema[_0x443bfd(0x27e)](_0x4162a5[_0x443bfd(0x10c)]),_0x489df1=this[_0x443bfd(0x142)](_0x4162a5[_0x443bfd(0x27f)],_0x5de368[_0x443bfd(0x29e)],_0x5de368[_0x443bfd(0x1f3)]);if(_0x489df1[_0x443bfd(0x10e)]!==_0x443bfd(0x221))throw new Error(_0x443bfd(0x1e1));if(_0x5de368[_0x443bfd(0x19b)]!==_0x489df1[_0x443bfd(0x1be)])throw new Error(_0x443bfd(0x1e4));const _0x3bbd00=Buffer[_0x443bfd(0x204)](_0x5de368[_0x443bfd(0x18e)],_0x443bfd(0x12a));if(_0x489df1[_0x443bfd(0x1be)]+_0x3bbd00[_0x443bfd(0x22c)]>_0x489df1[_0x443bfd(0x14c)])throw new Error(_0x443bfd(0x223));await assertUploadTemporaryFile(_0x489df1[_0x443bfd(0x20b)],_0x489df1[_0x443bfd(0x1be)]);const _0x1394db=await open(_0x489df1[_0x443bfd(0x20b)],'r+');try{await _0x1394db[_0x443bfd(0x1af)](_0x3bbd00,0x2*0x1df+0xbf*0x1+-0x47d,_0x3bbd00[_0x443bfd(0x22c)],_0x489df1[_0x443bfd(0x1be)]);}finally{await _0x1394db[_0x443bfd(0x278)]();}return _0x489df1[_0x443bfd(0x1be)]+=_0x3bbd00[_0x443bfd(0x22c)],{'upload':hostedConversationUploadSchema[_0x443bfd(0x27e)](uploadProjection(_0x489df1))};}[_0x132f42(0x196)](_0x2146cc){const _0x274fc5=_0x132f42,_0x9067f4=hostedRequest(_0x2146cc),_0x3b428b=hostedConversationUploadControlInputSchema[_0x274fc5(0x27e)](_0x9067f4[_0x274fc5(0x10c)]),_0x12aae2=this[_0x274fc5(0x142)](_0x9067f4[_0x274fc5(0x27f)],_0x3b428b[_0x274fc5(0x29e)],_0x3b428b[_0x274fc5(0x1f3)]);return{'upload':hostedConversationUploadSchema[_0x274fc5(0x27e)](uploadProjection(_0x12aae2))};}async[_0x132f42(0x1dc)](_0x1dc9ef){const _0x4147de=_0x132f42,_0x1e34a3=hostedRequest(_0x1dc9ef),_0x398a6a=hostedConversationUploadControlInputSchema[_0x4147de(0x27e)](_0x1e34a3[_0x4147de(0x10c)]),_0x37b010=this[_0x4147de(0x142)](_0x1e34a3[_0x4147de(0x27f)],_0x398a6a[_0x4147de(0x29e)],_0x398a6a[_0x4147de(0x1f3)]);if(_0x37b010[_0x4147de(0x10e)]===_0x4147de(0x199))return{'upload':hostedConversationUploadSchema[_0x4147de(0x27e)](uploadProjection(_0x37b010))};if(_0x37b010[_0x4147de(0x10e)]!==_0x4147de(0x221)||_0x37b010[_0x4147de(0x1be)]!==_0x37b010[_0x4147de(0x14c)])throw new Error(_0x4147de(0x248));const _0x565a46=this[_0x4147de(0x1d6)](_0x1e34a3[_0x4147de(0x27f)],_0x37b010[_0x4147de(0x29e)]),_0x2cb745=await this[_0x4147de(0x104)](_0x565a46[_0x4147de(0x1ff)],_0x565a46[_0x4147de(0x219)]);if(_0x37b010[_0x4147de(0x14c)]>_0x2cb745[_0x4147de(0x118)][_0x4147de(0x285)][_0x4147de(0x1e5)]||_0x565a46[_0x4147de(0x23a)][_0x4147de(0x295)]+_0x37b010[_0x4147de(0x14c)]>_0x565a46[_0x4147de(0x23a)][_0x4147de(0x291)])throw new Error(_0x4147de(0x267));await assertUploadTemporaryFile(_0x37b010[_0x4147de(0x20b)],_0x37b010[_0x4147de(0x14c)]);const _0x487f93=await lstat(_0x37b010[_0x4147de(0x281)])[_0x4147de(0x149)](_0x10da75=>{const _0x1f2dfb=_0x4147de;if(_0x10da75[_0x1f2dfb(0xee)]===_0x1f2dfb(0x249))return undefined;throw _0x10da75;});if(_0x487f93!==undefined)throw new Error(_0x4147de(0x27c));const _0x54d313=await open(_0x37b010[_0x4147de(0x20b)],'r+');try{await _0x54d313[_0x4147de(0x28f)]();}finally{await _0x54d313[_0x4147de(0x278)]();}await rename(_0x37b010[_0x4147de(0x20b)],_0x37b010[_0x4147de(0x281)]);const _0x55cfa8=this[_0x4147de(0x217)]();try{await utimes(_0x37b010[_0x4147de(0x281)],new Date(_0x55cfa8),new Date(_0x55cfa8));const _0x50b2f2={'id':this[_0x4147de(0x187)][_0x4147de(0x1ec)][_0x4147de(0x121)](_0x37b010[_0x4147de(0x29e)],_0x4147de(0x16d),_0x37b010[_0x4147de(0x22e)]),'conversationId':_0x37b010[_0x4147de(0x29e)],'category':_0x4147de(0x16d),'relativePath':_0x37b010[_0x4147de(0x22e)],'displayName':_0x37b010[_0x4147de(0x22e)],'mimeType':_0x37b010[_0x4147de(0x126)],'size':_0x37b010[_0x4147de(0x14c)],'source':_0x4147de(0x211),'createdAt':_0x55cfa8,'updatedAt':_0x55cfa8};return _0x37b010[_0x4147de(0x159)]=await this[_0x4147de(0x187)][_0x4147de(0x1ec)][_0x4147de(0x13c)](_0x1e34a3[_0x4147de(0x27f)],_0x50b2f2),_0x37b010[_0x4147de(0x10e)]=_0x4147de(0x199),this[_0x4147de(0x18b)](_0x37b010[_0x4147de(0x29e)],{'conversationId':_0x37b010[_0x4147de(0x29e)],'kind':_0x4147de(0x1cf),'files':this[_0x4147de(0x187)][_0x4147de(0x1ec)][_0x4147de(0x1aa)](_0x1e34a3[_0x4147de(0x27f)],_0x37b010[_0x4147de(0x29e)]),'error':null}),{'upload':hostedConversationUploadSchema[_0x4147de(0x27e)](uploadProjection(_0x37b010))};}catch(_0x39944b){await rename(_0x37b010[_0x4147de(0x281)],_0x37b010[_0x4147de(0x20b)])[_0x4147de(0x149)](()=>undefined);throw _0x39944b;}}async[_0x132f42(0x1f9)](_0x8da9ec){const _0x4b0c71=_0x132f42,_0xfa4e0d=hostedRequest(_0x8da9ec),_0xd18421=hostedConversationUploadControlInputSchema[_0x4b0c71(0x27e)](_0xfa4e0d[_0x4b0c71(0x10c)]),_0x17e3d0=this[_0x4b0c71(0x142)](_0xfa4e0d[_0x4b0c71(0x27f)],_0xd18421[_0x4b0c71(0x29e)],_0xd18421[_0x4b0c71(0x1f3)]);if(_0x17e3d0[_0x4b0c71(0x10e)]===_0x4b0c71(0x199))throw new Error(_0x4b0c71(0x1e1));return _0x17e3d0[_0x4b0c71(0x10e)]=_0x4b0c71(0x11a),await rm(_0x17e3d0[_0x4b0c71(0x20b)],{'force':!![]}),{'upload':hostedConversationUploadSchema[_0x4b0c71(0x27e)](uploadProjection(_0x17e3d0))};}async[_0x132f42(0x234)](_0x3d936b){const _0x43c4d9=_0x132f42,_0x10b9a8=hostedRequest(_0x3d936b),_0x4c1af7=hostedConversationIdInputSchema[_0x43c4d9(0x27e)](_0x10b9a8[_0x43c4d9(0x10c)]),_0x3e5453=this[_0x43c4d9(0x187)][_0x43c4d9(0x1ec)][_0x43c4d9(0x254)](_0x10b9a8[_0x43c4d9(0x27f)],_0x4c1af7[_0x43c4d9(0x29e)]);if(this[_0x43c4d9(0x1fb)][_0x43c4d9(0x25a)](_0x3e5453['id']))throw new Error(_0x43c4d9(0x14a));this[_0x43c4d9(0x1fb)][_0x43c4d9(0x1ad)](_0x3e5453['id']);try{await this[_0x43c4d9(0x19c)](_0x3e5453['id']);const _0xd9a0c8=this[_0x43c4d9(0x1c5)][_0x43c4d9(0x25c)](_0x3e5453['id']);if(_0xd9a0c8!==undefined){const _0x45fcf4=runInterruptionKey(_0x3e5453['id'],_0xd9a0c8[_0x43c4d9(0x1ab)]['id']);this[_0x43c4d9(0x1b8)][_0x43c4d9(0x1ad)](_0x45fcf4);if(!_0xd9a0c8[_0x43c4d9(0x28a)]())this[_0x43c4d9(0x1b8)][_0x43c4d9(0x234)](_0x45fcf4);}await this[_0x43c4d9(0x192)](_0x10b9a8[_0x43c4d9(0x27f)],_0x3e5453['id']);const _0x4b3026=this[_0x43c4d9(0x187)][_0x43c4d9(0x1ec)][_0x43c4d9(0x289)](_0x10b9a8[_0x43c4d9(0x27f)],_0x3e5453['id']);return await this[_0x43c4d9(0x187)][_0x43c4d9(0x1b3)][_0x43c4d9(0x1a2)]({'conversationId':_0x3e5453['id'],'sessionId':_0x3e5453[_0x43c4d9(0x292)],'homeDirectory':_0x4b3026[_0x43c4d9(0x15a)]})[_0x43c4d9(0x149)](()=>undefined),await this[_0x43c4d9(0x1a3)][_0x43c4d9(0x25c)](_0x3e5453['id'])?.[_0x43c4d9(0x149)](()=>undefined),this[_0x43c4d9(0x2a1)](_0x3e5453['id']),await this[_0x43c4d9(0x187)][_0x43c4d9(0x1ec)][_0x43c4d9(0x1c7)](_0x3e5453['id']),this[_0x43c4d9(0x276)][_0x43c4d9(0x234)](_0x3e5453['id']),hostedConversationDeleteResultSchema[_0x43c4d9(0x27e)]({'deletedConversationId':_0x3e5453['id']});}finally{this[_0x43c4d9(0x1fb)][_0x43c4d9(0x234)](_0x3e5453['id']);}}async[_0x132f42(0x19c)](_0x35fee6){const _0x3102c5=_0x132f42,_0x1942ac=_0x35fee6+'\x00',_0x3edcf2=[...this[_0x3102c5(0x1df)][_0x3102c5(0x29c)]()][_0x3102c5(0x26f)](([_0x51116a])=>_0x51116a[_0x3102c5(0x1fa)](_0x1942ac))[_0x3102c5(0x273)](([,_0x455a75])=>_0x455a75);await Promise[_0x3102c5(0x20f)](_0x3edcf2);}async[_0x132f42(0x268)](_0x217f5c){const _0x10cf94=_0x132f42;try{const _0x1f0da1=await this[_0x10cf94(0x25c)]({'conversationId':_0x217f5c[_0x10cf94(0x29e)],'__requestUserId':_0x217f5c[_0x10cf94(0x27f)],'__marAgentModels':_0x217f5c[_0x10cf94(0xed)]});if(this[_0x10cf94(0x1d5)][_0x10cf94(0x25c)](_0x217f5c[_0x10cf94(0xec)])!==_0x217f5c)return;this[_0x10cf94(0x187)][_0x10cf94(0x1d3)]?.({'type':_0x10cf94(0x20a),'workbenchConnectionId':_0x217f5c[_0x10cf94(0x153)],'watchId':_0x217f5c[_0x10cf94(0x19a)],'nodeGeneration':_0x217f5c[_0x10cf94(0x175)],'nodeId':this[_0x10cf94(0x187)][_0x10cf94(0x298)](),'templateId':_0x217f5c[_0x10cf94(0x219)],'conversationId':_0x217f5c[_0x10cf94(0x29e)],'revision':0x1,'snapshotSequence':++this[_0x10cf94(0x169)],'expiresAt':_0x217f5c[_0x10cf94(0x22f)],'payload':_0x1f0da1}),_0x217f5c[_0x10cf94(0x1ed)]=!![];for(const _0xf33ef0 of _0x217f5c[_0x10cf94(0x27b)])this[_0x10cf94(0x1b2)](_0x217f5c,_0xf33ef0);_0x217f5c[_0x10cf94(0x27b)][_0x10cf94(0x134)]=0xbe*0x14+-0x1f9a+0x10c2;}catch(_0x2230c0){if(this[_0x10cf94(0x1d5)][_0x10cf94(0x25c)](_0x217f5c[_0x10cf94(0xec)])!==_0x217f5c)return;this[_0x10cf94(0x187)][_0x10cf94(0x1d3)]?.({'type':_0x10cf94(0x20e),'workbenchConnectionId':_0x217f5c[_0x10cf94(0x153)],'watchType':_0x10cf94(0x172),'watchId':_0x217f5c[_0x10cf94(0x19a)],'nodeGeneration':_0x217f5c[_0x10cf94(0x175)],'nodeId':this[_0x10cf94(0x187)][_0x10cf94(0x298)](),'templateId':_0x217f5c[_0x10cf94(0x219)],'conversationId':_0x217f5c[_0x10cf94(0x29e)],'code':safeErrorCode(_0x2230c0,_0x10cf94(0x26e)),'message':_0x10cf94(0x17e)}),this[_0x10cf94(0x101)](_0x217f5c[_0x10cf94(0xec)]);}}[_0x132f42(0x16a)](_0x234daf){const _0x5c8994=_0x132f42;return this[_0x5c8994(0x276)][_0x5c8994(0x25c)](_0x234daf)??{'status':_0x5c8994(0x210),'version':0x0,'updatedAt':0x0};}[_0x132f42(0x195)](_0x2904b6){const _0x457f60=_0x132f42;return hostedConversationSummary(_0x2904b6,this[_0x457f60(0x16a)](_0x2904b6['id']));}[_0x132f42(0x181)](_0x53d825,_0x2f7319,_0x1573c1,_0x1cad33){const _0x3711b2=_0x132f42,_0xd61f73=this[_0x3711b2(0x16a)](_0x2f7319['id']),_0x1eec62={'status':_0x1573c1,'version':_0xd61f73[_0x3711b2(0x214)]+(-0x1*0x2399+0x13ee+0xfac),'updatedAt':_0x1cad33};this[_0x3711b2(0x276)][_0x3711b2(0x212)](_0x2f7319['id'],_0x1eec62),this[_0x3711b2(0x178)]({'kind':_0x3711b2(0x16a),'userId':_0x53d825,'templateId':_0x2f7319[_0x3711b2(0x219)],'conversationId':_0x2f7319['id'],'activity':_0x1eec62});}[_0x132f42(0x21f)](_0x57c278,_0x23c8ca,_0x210ca8,_0x4eef0d){const _0x248578=_0x132f42;this[_0x248578(0x178)]({'kind':_0x248578(0x163),'event':{'runId':_0x210ca8,'sequence':0x1,'eventType':_0x248578(0x163),'payload':{'targetType':_0x248578(0x24e),'userId':_0x57c278,'templateId':_0x23c8ca[_0x248578(0x219)],'conversationId':_0x23c8ca['id'],'conversationTitle':_0x23c8ca[_0x248578(0x28c)],'runId':_0x210ca8,'notificationId':_0x248578(0x1a5)+this[_0x248578(0x187)][_0x248578(0x298)]()+':'+_0x23c8ca['id']+':'+_0x210ca8,'kind':_0x248578(0x16f),'outcome':_0x4eef0d[_0x248578(0x10e)],'occurredAt':_0x4eef0d[_0x248578(0xff)]},'createdAt':_0x4eef0d[_0x248578(0xff)]}});}[_0x132f42(0x178)](_0x2e6426){const _0x313266=_0x132f42,_0x994539=this[_0x313266(0x187)][_0x313266(0x1c0)]?.(_0x2e6426)??{'sequence':++this[_0x313266(0x125)],'category':_0x313266(0x172),'payload':_0x2e6426};if(_0x994539!==undefined)this[_0x313266(0x187)][_0x313266(0x1bf)]?.(_0x994539);}[_0x132f42(0x1c1)](_0x172d60,_0x3d8719,_0x3b077d,_0x4e2e71){const _0x4409d7=_0x132f42;this[_0x4409d7(0x18b)](_0x172d60['id'],{'conversationId':_0x172d60['id'],'kind':_0x4409d7(0x129),'upgrade':{'status':_0x4409d7(0x1a9),'previousVersionId':_0x3d8719,'targetVersionId':_0x3b077d,'activeVersionId':_0x172d60[_0x4409d7(0x1ff)],'conversation':this[_0x4409d7(0x195)](_0x172d60),'error':{'code':safeErrorCode(_0x4e2e71,_0x4409d7(0x1f0)),'message':_0x4409d7(0x208)}}});}[_0x132f42(0x18b)](_0x559c95,_0x3a8d23){const _0x4e0560=_0x132f42,_0x5e7b75=[...this[_0x4e0560(0x1d5)][_0x4e0560(0x213)]()][_0x4e0560(0x26f)](_0x4707d1=>_0x4707d1[_0x4e0560(0x29e)]===_0x559c95);if(_0x5e7b75[_0x4e0560(0x134)]===0x2*-0x62b+-0x5*0x2b4+0x19da)return![];const _0x4b5c60=this[_0x4e0560(0x187)][_0x4e0560(0x1c0)]?.(_0x3a8d23)??{'sequence':++this[_0x4e0560(0x125)],'category':_0x4e0560(0x172),'payload':_0x3a8d23};if(_0x4b5c60===undefined)return![];for(const _0x34a841 of _0x5e7b75){if(!_0x34a841[_0x4e0560(0x1ed)])_0x34a841[_0x4e0560(0x27b)][_0x4e0560(0x171)](_0x4b5c60);else this[_0x4e0560(0x1b2)](_0x34a841,_0x4b5c60);}return!![];}[_0x132f42(0x1b2)](_0xfbd318,_0x545314){const _0x573a5a=_0x132f42;this[_0x573a5a(0x187)][_0x573a5a(0x1d3)]?.({'type':_0x573a5a(0x18f),'workbenchConnectionId':_0xfbd318[_0x573a5a(0x153)],'watchId':_0xfbd318[_0x573a5a(0x19a)],'nodeGeneration':_0xfbd318[_0x573a5a(0x175)],'nodeId':this[_0x573a5a(0x187)][_0x573a5a(0x298)](),'templateId':_0xfbd318[_0x573a5a(0x219)],'conversationId':_0xfbd318[_0x573a5a(0x29e)],'expiresAt':_0xfbd318[_0x573a5a(0x22f)],'event':_0x545314});}[_0x132f42(0x1e8)](_0x340b50){const _0x522309=_0x132f42;return{'accepted':!![],'watchId':_0x340b50[_0x522309(0x19a)],'nodeGeneration':_0x340b50[_0x522309(0x175)],'expiresAt':_0x340b50[_0x522309(0x22f)]};}[_0x132f42(0x2a1)](_0x3a8344){const _0x34a2cd=_0x132f42;for(const _0x11fcb4 of[...this[_0x34a2cd(0x1d5)][_0x34a2cd(0x213)]()])if(_0x11fcb4[_0x34a2cd(0x29e)]===_0x3a8344)this[_0x34a2cd(0x101)](_0x11fcb4[_0x34a2cd(0xec)]);}[_0x132f42(0x101)](_0x15984b){const _0x1ebf7b=_0x132f42,_0x425123=this[_0x1ebf7b(0x1d5)][_0x1ebf7b(0x25c)](_0x15984b);if(_0x425123===undefined)return;clearTimeout(_0x425123[_0x1ebf7b(0x257)]),this[_0x1ebf7b(0x1d5)][_0x1ebf7b(0x234)](_0x15984b),this[_0x1ebf7b(0x286)][_0x1ebf7b(0x183)](_0x15984b,_0x425123[_0x1ebf7b(0x132)]);}[_0x132f42(0x230)](_0x23757d){const _0x4b9abb=_0x132f42,_0x55e4c2=setTimeout(()=>this[_0x4b9abb(0x101)](_0x23757d),WATCH_TTL_MS);return _0x55e4c2[_0x4b9abb(0x145)](),_0x55e4c2;}[_0x132f42(0x1d6)](_0x5b1f35,_0x23940c){const _0x43822d=_0x132f42,_0xf5c18a=this[_0x43822d(0x187)][_0x43822d(0x1ec)][_0x43822d(0x254)](_0x5b1f35,_0x23940c);if(this[_0x43822d(0x1fb)][_0x43822d(0x25a)](_0xf5c18a['id']))throw new Error(_0x43822d(0x14a));if(_0xf5c18a[_0x43822d(0x10e)]!==_0x43822d(0x102))throw new Error(_0x43822d(0x14a));return _0xf5c18a;}[_0x132f42(0x142)](_0x1f2855,_0x2a4aed,_0xd4e395){const _0x694637=_0x132f42;this[_0x694637(0x187)][_0x694637(0x1ec)][_0x694637(0x254)](_0x1f2855,_0x2a4aed);const _0x50ced6=this[_0x694637(0x10b)][_0x694637(0x25c)](_0xd4e395);if(_0x50ced6===undefined||_0x50ced6[_0x694637(0x27f)]!==_0x1f2855||_0x50ced6[_0x694637(0x29e)]!==_0x2a4aed)throw new Error(_0x694637(0x29d));return _0x50ced6;}async[_0x132f42(0x192)](_0x28f202,_0x151335){const _0x2885ad=_0x132f42;for(const _0x11c8af of this[_0x2885ad(0x10b)][_0x2885ad(0x213)]()){if(_0x11c8af[_0x2885ad(0x27f)]!==_0x28f202||_0x11c8af[_0x2885ad(0x29e)]!==_0x151335)continue;_0x11c8af[_0x2885ad(0x10e)]===_0x2885ad(0x221)&&(_0x11c8af[_0x2885ad(0x10e)]=_0x2885ad(0x11a),await rm(_0x11c8af[_0x2885ad(0x20b)],{'force':!![]})[_0x2885ad(0x149)](()=>undefined));}}async[_0x132f42(0x11e)](_0x1733ae,_0x234498,_0x14957d){const _0x29eb35=_0x132f42,_0x932765=this[_0x29eb35(0x187)][_0x29eb35(0x1ec)][_0x29eb35(0x127)](_0x1733ae,_0x234498,_0x14957d);if(_0x932765[_0x29eb35(0x1b0)]!==_0x29eb35(0x16d))throw new Error(_0x29eb35(0x26c));return await assertRegularFile(this[_0x29eb35(0x187)][_0x29eb35(0x1ec)][_0x29eb35(0x29f)](_0x1733ae,_0x932765),_0x932765[_0x29eb35(0x14c)]),_0x932765;}async[_0x132f42(0x151)](_0x2d11c1,_0x1ff4fe,_0x9e9f18,_0x500567,_0x2ebaac){const _0x41853f=_0x132f42;if(_0x2ebaac>_0x9e9f18[_0x41853f(0x285)][_0x41853f(0x1e5)])return _0x41853f(0x25f);if(_0x1ff4fe[_0x41853f(0x23a)][_0x41853f(0x295)]+_0x2ebaac>_0x1ff4fe[_0x41853f(0x23a)][_0x41853f(0x291)])return _0x41853f(0x1a8);const _0x54be97=await lstat(join(_0x2d11c1[_0x41853f(0x1a6)],_0x500567))[_0x41853f(0x149)](_0x5f229f=>{const _0xd3f411=_0x41853f;if(_0x5f229f[_0xd3f411(0xee)]===_0xd3f411(0x249))return undefined;throw _0x5f229f;});return _0x54be97===undefined?_0x41853f(0x165):_0x41853f(0x1cd);}[_0x132f42(0x200)](_0x9cbc26,_0x453aec,_0x597617,_0x274aa8){const _0x586e6a=_0x132f42,_0x578f67=[{'logicalPath':_0x586e6a(0xf3),'physicalPath':_0x453aec[_0x586e6a(0x15c)],'writable':![]},{'logicalPath':_0x586e6a(0x188),'physicalPath':_0x9cbc26[_0x586e6a(0x1a6)],'writable':!![]},{'logicalPath':_0x586e6a(0x191),'physicalPath':_0x9cbc26[_0x586e6a(0xf4)],'writable':!![]}];if(_0x597617!==undefined&&_0x274aa8!==undefined)_0x578f67[_0x586e6a(0x171)]({'logicalPath':_0x274aa8,'physicalPath':_0x597617,'writable':![]});if(_0x453aec[_0x586e6a(0x2a0)]!==undefined)_0x578f67[_0x586e6a(0x171)]({'logicalPath':_0x453aec[_0x586e6a(0x2a0)],'physicalPath':_0x453aec[_0x586e6a(0x15c)],'writable':![]},{'logicalPath':join(_0x453aec[_0x586e6a(0x2a0)],_0x586e6a(0x116)),'physicalPath':_0x9cbc26[_0x586e6a(0x1a6)],'writable':!![]},{'logicalPath':join(_0x453aec[_0x586e6a(0x2a0)],_0x586e6a(0x120)),'physicalPath':_0x9cbc26[_0x586e6a(0xf4)],'writable':!![]});return _0x578f67;}[_0x132f42(0x1a7)](_0x3aa61c,_0x4c5baf,_0x4e1ce8=_0x3aa61c[_0x132f42(0x28d)],_0x3da755,_0x2829f3){const _0x54fd18=_0x132f42;return this[_0x54fd18(0x187)][_0x54fd18(0x17d)]({'policyVersion':HOST_POLICY_VERSION,'workspaceDirectory':_0x4c5baf[_0x54fd18(0x15c)],..._0x4c5baf[_0x54fd18(0x2a0)]===undefined?{}:{'sourceWorkspacePath':_0x4c5baf[_0x54fd18(0x2a0)]},'inboxDirectory':_0x3aa61c[_0x54fd18(0x1a6)],'outputDirectory':_0x3aa61c[_0x54fd18(0xf4)],..._0x3da755===undefined||_0x2829f3===undefined?{}:{'generatedImagesDirectory':_0x3da755,'generatedImagesLogicalPath':_0x2829f3},'temporaryDirectory':_0x4e1ce8,'networkMode':_0x4c5baf[_0x54fd18(0x118)][_0x54fd18(0x21d)]});}[_0x132f42(0x13a)](_0xb72ea){const _0x3676c0=_0x132f42,_0xa417bc=this[_0x3676c0(0x187)][_0x3676c0(0x205)][_0x3676c0(0x1b5)][_0x3676c0(0xef)](_0x3676c0(0x1b7))[_0x3676c0(0x25c)](_0xb72ea);if(_0xa417bc===undefined)return undefined;if(typeof _0xa417bc['id']!==_0x3676c0(0x1bb))throw new Error(_0x3676c0(0x105));return _0xa417bc['id'];}async[_0x132f42(0x104)](_0x297f5b,_0x4b2393,_0x557f08=![]){const _0x309a66=_0x132f42,_0x115541=this[_0x309a66(0x187)][_0x309a66(0x205)][_0x309a66(0x1b5)][_0x309a66(0xef)](_0x309a66(0x1b6))[_0x309a66(0x25c)](_0x297f5b,_0x4b2393);if(_0x115541===undefined||_0x115541[_0x309a66(0x10e)]!==_0x309a66(0x103)&&_0x115541[_0x309a66(0x10e)]!==_0x309a66(0x1e7)||_0x115541[_0x309a66(0x22b)]!==HOST_POLICY_VERSION||typeof _0x115541[_0x309a66(0x1ce)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x206)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x135)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x1ae)]!==_0x309a66(0x1bb)||typeof _0x115541[_0x309a66(0x161)]!==_0x309a66(0x1bb))throw new Error(_0x309a66(0x105));const _0x2a1fa6=this[_0x309a66(0x187)][_0x309a66(0x1ec)][_0x309a66(0x143)](_0x115541[_0x309a66(0x1ce)]),_0x84e81=join(_0x2a1fa6,_0x309a66(0x277)),_0x2f1a97=join(_0x2a1fa6,_0x309a66(0x19e)),_0x39c0ce=await lstat(_0x84e81)[_0x309a66(0x149)](()=>undefined),_0x59bceb=await lstat(_0x2f1a97)[_0x309a66(0x149)](()=>undefined);if(_0x39c0ce===undefined||!_0x39c0ce[_0x309a66(0x266)]()||_0x39c0ce[_0x309a66(0x242)]()||_0x59bceb===undefined||!_0x59bceb[_0x309a66(0x115)]()||_0x59bceb[_0x309a66(0x242)]())throw new Error(_0x309a66(0x105));let _0x36712e;try{const _0x317050=await readFile(_0x84e81,_0x309a66(0x14e)),_0x5f0795=_0x317050[_0x309a66(0x21e)]('\x0a')?_0x317050[_0x309a66(0x1c9)](-0xcd*-0x16+-0x274*-0x6+0x1*-0x2056,-(0x9e1+0x11ba+-0xdcd*0x2)):_0x317050;if(_0x5f0795!==_0x115541[_0x309a66(0x206)]||createHash(_0x309a66(0x1b9))[_0x309a66(0x1fc)](_0x5f0795)[_0x309a66(0x243)](_0x309a66(0x148))!==_0x115541[_0x309a66(0x1ae)])throw new Error(_0x309a66(0x105));_0x36712e=JSON[_0x309a66(0x27e)](_0x5f0795);}catch{throw new Error(_0x309a66(0x105));}if(!record(_0x36712e))throw new Error(_0x309a66(0x105));const _0x3c7f4b=publishedTemplateSnapshot(_0x36712e),_0x33fd49=publishedTemplateDraft(_0x3c7f4b[_0x309a66(0x24b)],_0x36712e[_0x309a66(0x118)]),_0xc27a06=_0x33fd49[_0x309a66(0x118)],_0x25800a=publishedMcpServers(_0x36712e[_0x309a66(0x1d4)]),_0x1f2244=publishedTemplateContentHash(_0x3c7f4b[_0x309a66(0x270)],_0x3c7f4b[_0x309a66(0x29c)],_0x3c7f4b[_0x309a66(0x24b)]),_0x52c96e=_0x3c7f4b[_0x309a66(0x29c)][_0x309a66(0xfc)]((_0x12bdec,_0x4fadea)=>_0x12bdec+_0x4fadea[_0x309a66(0x14c)],0xcba+0xa7*0x3b+0x751*-0x7);if(_0x36712e[_0x309a66(0x20d)]!==_0x115541[_0x309a66(0x161)]||createHash(_0x309a66(0x1b9))[_0x309a66(0x1fc)](JSON[_0x309a66(0x179)](_0x25800a))[_0x309a66(0x243)](_0x309a66(0x148))!==_0x115541[_0x309a66(0x161)]||_0x36712e[_0x309a66(0x1f7)]!==_0x115541[_0x309a66(0x135)]||_0x1f2244!==_0x115541[_0x309a66(0x135)]||_0x115541[_0x309a66(0x173)]!==_0x3c7f4b[_0x309a66(0x29c)][_0x309a66(0x134)]||_0x115541[_0x309a66(0x160)]!==_0x52c96e)throw new Error(_0x309a66(0x105));if(_0x36712e[_0x309a66(0x272)]!==_0x297f5b||_0x36712e[_0x309a66(0x219)]!==_0x4b2393||_0x36712e[_0x309a66(0x11d)]!==HOST_POLICY_VERSION||_0xc27a06[_0x309a66(0x219)]!==_0x4b2393||_0xc27a06[_0x309a66(0x298)]!==this[_0x309a66(0x187)][_0x309a66(0x298)]())throw new Error(_0x309a66(0x105));if(_0x557f08)await verifyPublishedTemplateContent(_0x2f1a97,_0x3c7f4b[_0x309a66(0x270)],_0x3c7f4b[_0x309a66(0x29c)]);return{'id':_0x297f5b,'templateId':_0x4b2393,'storageKey':_0x115541[_0x309a66(0x1ce)],'templateDirectory':_0x2f1a97,..._0x3c7f4b[_0x309a66(0x2a0)]===undefined?{}:{'sourceWorkspacePath':_0x3c7f4b[_0x309a66(0x2a0)]},'draft':_0xc27a06,'modelPolicy':_0x33fd49[_0x309a66(0x202)],'mcpServers':_0x25800a};}}function hostedRequest(_0x2411a1){const _0x27ccb9=_0x132f42;if(!record(_0x2411a1))throw new Error(_0x27ccb9(0x13e));const {__requestUserId:_0x5bf71e,__template:_0x3cd898,__marAgentModel:_0x1ed00c,__marAgentModels:_0x290083,__marAgentRuntimeScopeId:_0x758d4f,__workspaceWatchSessionHash:_0x308e35,__templateDeleted:_0x4d32a6,..._0x240a4b}=_0x2411a1;if(typeof _0x5bf71e!==_0x27ccb9(0x13b)||!Number[_0x27ccb9(0x287)](_0x5bf71e)||_0x5bf71e<=0x9d1+-0xc7+0x2*-0x485)throw new Error(_0x27ccb9(0x13e));if(_0x4d32a6!==undefined&&_0x4d32a6!==!![])throw new Error(_0x27ccb9(0x13e));if(_0x758d4f!==undefined&&(typeof _0x758d4f!==_0x27ccb9(0x1bb)||_0x758d4f[_0x27ccb9(0x134)]===0xc1a+0x428*0x1+-0x1042))throw new Error(_0x27ccb9(0x13e));return{'data':_0x240a4b,'userId':_0x5bf71e,..._0x3cd898===undefined?{}:{'template':_0x3cd898},..._0x1ed00c===undefined?{}:{'model':_0x1ed00c},..._0x290083===undefined?{}:{'models':_0x290083},..._0x758d4f===undefined?{}:{'runtimeScopeId':_0x758d4f},..._0x308e35===undefined?{}:{'sessionHash':_0x308e35},..._0x4d32a6===!![]?{'templateDeleted':!![]}:{}};}function requireWatchSessionHash(_0x2355cd){const _0x3cf618=_0x132f42;if(typeof _0x2355cd!==_0x3cf618(0x1bb)||_0x2355cd[_0x3cf618(0x134)]===0x1e93+-0x571+-0x2*0xc91)throw new Error(_0x3cf618(0x13e));return _0x2355cd;}function watchOwnerKey(_0x5bdca9,_0x1b2db6){return _0x5bdca9+':'+_0x1b2db6;}function runtimeModels(_0x402ef0){const _0xafc8d9=_0x132f42;return marAgentRuntimeModelConfigurationSchema[_0xafc8d9(0x1ac)]()[_0xafc8d9(0x27e)](_0x402ef0);}function allowedModels(_0x12bc36,_0x34ea21){const _0x2cab11=_0x132f42,_0x310ced=new Set(_0x12bc36[_0x2cab11(0x202)][_0x2cab11(0x1e3)]);return _0x34ea21[_0x2cab11(0x26f)](_0x5b701a=>_0x5b701a[_0x2cab11(0x269)]&&_0x310ced[_0x2cab11(0x25a)](_0x12bc36[_0x2cab11(0x202)][_0x2cab11(0x180)]===_0x2cab11(0x152)?_0x5b701a[_0x2cab11(0x22d)]:_0x5b701a['id']));}function selectModel(_0x3e1260,_0x3dabd1,_0x3dd8c2){const _0x366871=_0x132f42,_0x2bad5f=allowedModels(_0x3e1260,_0x3dabd1),_0x250878=_0x2bad5f[_0x366871(0x155)](_0x3d8b5e=>_0x3d8b5e['id']===_0x3dd8c2);if(_0x250878!==undefined)return _0x250878;const _0x25be7b=_0x2bad5f[_0x366871(0x155)](_0x43c2e8=>(_0x3e1260[_0x366871(0x202)][_0x366871(0x180)]===_0x366871(0x152)?_0x43c2e8[_0x366871(0x22d)]:_0x43c2e8['id'])===_0x3e1260[_0x366871(0x202)][_0x366871(0x10a)]);if(_0x25be7b!==undefined)return _0x25be7b;const _0x4cf494=_0x3e1260[_0x366871(0x202)][_0x366871(0x1e3)][_0x366871(0x273)](_0x555694=>_0x2bad5f[_0x366871(0x155)](_0x1d7172=>(_0x3e1260[_0x366871(0x202)][_0x366871(0x180)]===_0x366871(0x152)?_0x1d7172[_0x366871(0x22d)]:_0x1d7172['id'])===_0x555694))[_0x366871(0x155)](_0x722cfa=>_0x722cfa!==undefined);if(_0x4cf494===undefined)throw new Error(_0x366871(0xf7));return _0x4cf494;}function publishedTemplateDraft(_0x479708,_0x333a77){const _0x1d169a=_0x132f42,_0x30e623=conversationTemplateDraftSchema[_0x1d169a(0x15e)](_0x333a77);if(_0x30e623[_0x1d169a(0x164)]){const {allowedModels:_0x34e0ce,defaultModelId:_0x472bf3,..._0x58fd92}=_0x30e623[_0x1d169a(0x10c)];return{'draft':_0x58fd92,'modelPolicy':{'identity':_0x1d169a(0x152),'allowedIds':_0x34e0ce[_0x1d169a(0x273)](_0x3bf693=>_0x3bf693[_0x1d169a(0x22d)]),'defaultId':_0x472bf3}};}if(_0x479708!==-0x14*-0x1bf+0x2b3*-0x5+-0x156c||!record(_0x333a77)||_0x1d169a(0x137)in _0x333a77||!Array[_0x1d169a(0x265)](_0x333a77[_0x1d169a(0x174)]))throw new Error(_0x1d169a(0x105));const _0x1a610e=_0x333a77[_0x1d169a(0x174)],_0x3554d0={..._0x333a77};delete _0x3554d0[_0x1d169a(0x174)];const _0x12a68d=conversationTemplateDraftSchema[_0x1d169a(0x15e)]({..._0x3554d0,'allowedModels':_0x1a610e[_0x1d169a(0x273)](_0x12dd33=>({'modelId':_0x12dd33,'name':_0x12dd33}))});if(!_0x12a68d[_0x1d169a(0x164)])throw new Error(_0x1d169a(0x105));const {allowedModels:_0x4278fc,defaultModelId:_0x235ea5,..._0x1dc7c6}=_0x12a68d[_0x1d169a(0x10c)];return{'draft':_0x1dc7c6,'modelPolicy':{'identity':_0x1d169a(0x13f),'allowedIds':_0x4278fc[_0x1d169a(0x273)](_0x5397f8=>_0x5397f8[_0x1d169a(0x22d)]),'defaultId':_0x235ea5}};}function networkModels(_0x22f813,_0x58ac1f){const _0x457af4=_0x132f42;if(_0x58ac1f!==_0x457af4(0x290))return _0x22f813;return _0x22f813[_0x457af4(0x273)](_0x77c018=>_0x77c018[_0x457af4(0x252)]?{..._0x77c018,'hostedWebSearch':![]}:_0x77c018);}function publishedMcpServers(_0x166bf7){const _0xd811b2=_0x132f42;if(!Array[_0xd811b2(0x265)](_0x166bf7))throw new Error(_0xd811b2(0x105));return _0x166bf7[_0xd811b2(0x273)](_0x24bdbe=>{const _0xfc2e26=_0xd811b2;if(!record(_0x24bdbe))throw new Error(_0xfc2e26(0x105));const _0x25cae7=Object[_0xfc2e26(0x293)](_0x24bdbe)[_0xfc2e26(0x1fd)]()[_0xfc2e26(0x24c)](',');if(_0x25cae7!==_0xfc2e26(0x157))throw new Error(_0xfc2e26(0x105));const _0xe37cdb=mcpRuntimeDescriptorSchema[_0xfc2e26(0x27e)](_0x24bdbe[_0xfc2e26(0x1b3)]),_0x1e2df7=mcpInstallationConfigurationSchema[_0xfc2e26(0x27e)](_0x24bdbe[_0xfc2e26(0x11c)]);if(typeof _0x24bdbe['id']!==_0xfc2e26(0x1bb)||typeof _0x24bdbe[_0xfc2e26(0x13d)]!==_0xfc2e26(0x1bb)||typeof _0x24bdbe[_0xfc2e26(0x24f)]!==_0xfc2e26(0x1bb)||typeof _0x24bdbe[_0xfc2e26(0x214)]!==_0xfc2e26(0x1bb)||_0x24bdbe[_0xfc2e26(0x227)]!==_0xfc2e26(0x170)&&_0x24bdbe[_0xfc2e26(0x227)]!==_0xfc2e26(0x16e)||_0x24bdbe[_0xfc2e26(0x1bc)]!==_0xe37cdb[_0xfc2e26(0x1bc)])throw new Error(_0xfc2e26(0x105));return{'id':_0x24bdbe['id'],'serverName':_0x24bdbe[_0xfc2e26(0x13d)],'displayName':_0x24bdbe[_0xfc2e26(0x24f)],'version':_0x24bdbe[_0xfc2e26(0x214)],'origin':_0x24bdbe[_0xfc2e26(0x227)],'transport':_0xe37cdb[_0xfc2e26(0x1bc)],'runtime':_0xe37cdb,'configuration':_0x1e2df7};});}function publishedTemplateSnapshot(_0x1b22eb){const _0xd88e60=_0x132f42;if(_0x1b22eb[_0xd88e60(0x24b)]===-0x16ab*-0x1+-0x20b*-0x7+-0x1*0x24f7){const _0x40c8f0=publishedTemplateFiles(_0x1b22eb[_0xd88e60(0x1cf)]);return{'schemaVersion':0x1,'directories':legacyPublishedTemplateDirectories(_0x40c8f0),'entries':_0x40c8f0};}if(_0x1b22eb[_0xd88e60(0x24b)]!==0x18a0+-0x105e+0x30*-0x2c||typeof _0x1b22eb[_0xd88e60(0x2a0)]!==_0xd88e60(0x1bb)||!Array[_0xd88e60(0x265)](_0x1b22eb[_0xd88e60(0x270)])||!Array[_0xd88e60(0x265)](_0x1b22eb[_0xd88e60(0x29c)]))throw new Error(_0xd88e60(0x105));validatePublishedSourceWorkspacePath(_0x1b22eb[_0xd88e60(0x2a0)]);const _0x4377c6=_0x1b22eb[_0xd88e60(0x270)][_0xd88e60(0x273)](safePublishedTemplateRelativePath);if(new Set(_0x4377c6)[_0xd88e60(0x14c)]!==_0x4377c6[_0xd88e60(0x134)]||_0x4377c6[_0xd88e60(0x168)](_0xd88e60(0x116))||_0x4377c6[_0xd88e60(0x168)](_0xd88e60(0x120)))throw new Error(_0xd88e60(0x105));const _0x5d8658=_0x1b22eb[_0xd88e60(0x29c)][_0xd88e60(0x273)](publishedTemplateEntry);if(new Set(_0x5d8658[_0xd88e60(0x273)](_0x254f8f=>_0x254f8f[_0xd88e60(0x150)]))[_0xd88e60(0x14c)]!==_0x5d8658[_0xd88e60(0x134)])throw new Error(_0xd88e60(0x105));return{'schemaVersion':0x2,'sourceWorkspacePath':_0x1b22eb[_0xd88e60(0x2a0)],'directories':_0x4377c6,'entries':_0x5d8658};}function publishedTemplateEntry(_0x188963){const _0x57e00d=_0x132f42;if(!record(_0x188963))throw new Error(_0x57e00d(0x105));if(_0x188963[_0x57e00d(0x27a)]===_0x57e00d(0x1da))return publishedTemplateFile(_0x188963,!![]);if(_0x188963[_0x57e00d(0x27a)]!==_0x57e00d(0x194)||typeof _0x188963[_0x57e00d(0x109)]!==_0x57e00d(0x1bb)||_0x188963[_0x57e00d(0x109)][_0x57e00d(0x134)]===0x10a2*0x1+0x115*-0x3+-0xd63||_0x188963[_0x57e00d(0x109)][_0x57e00d(0x168)]('\x00')||_0x188963[_0x57e00d(0x1f2)]!==_0x57e00d(0x15b)&&_0x188963[_0x57e00d(0x1f2)]!==_0x57e00d(0x108)||typeof _0x188963[_0x57e00d(0x114)]!==_0x57e00d(0x1bb))throw new Error(_0x57e00d(0x105));const _0x2154fb=safePublishedTemplateRelativePath(_0x188963[_0x57e00d(0x150)]),_0x2c33d9=safePublishedTemplateSize(_0x188963[_0x57e00d(0x14c)]),_0x3bd033=_0x188963[_0x57e00d(0x109)],_0x3914b8=_0x188963[_0x57e00d(0x1f2)],_0x30867f=_0x188963[_0x57e00d(0x114)];if(_0x2c33d9!==Buffer[_0x57e00d(0x22c)](_0x3bd033))throw new Error(_0x57e00d(0x105));if(_0x3914b8===_0x57e00d(0x15b))safePublishedTemplateRelativePath(_0x30867f);else{if(!isAbsolute(_0x30867f)||!RUNTIME_LINK_ROOTS[_0x57e00d(0x258)](_0x1ed0e6=>_0x30867f===_0x1ed0e6||within(_0x1ed0e6,_0x30867f)))throw new Error(_0x57e00d(0x105));}return{'kind':_0x57e00d(0x194),'relativePath':_0x2154fb,'size':_0x2c33d9,'linkTarget':_0x3bd033,'targetKind':_0x3914b8,'resolvedTarget':_0x30867f};}function publishedTemplateFiles(_0x872e71){const _0x299daa=_0x132f42;if(!Array[_0x299daa(0x265)](_0x872e71))throw new Error(_0x299daa(0x105));const _0xe74efb=new Set();return _0x872e71[_0x299daa(0x273)](_0x54aa98=>{const _0xe8b2b8=_0x299daa,_0x2ff2f5=publishedTemplateFile(_0x54aa98);if(_0xe74efb[_0xe8b2b8(0x25a)](_0x2ff2f5[_0xe8b2b8(0x150)]))throw new Error(_0xe8b2b8(0x105));return _0xe74efb[_0xe8b2b8(0x1ad)](_0x2ff2f5[_0xe8b2b8(0x150)]),_0x2ff2f5;});}function publishedTemplateFile(_0x425ed5,_0x1a2e16=![]){const _0x1a6ca8=_0x132f42;if(!record(_0x425ed5)||_0x1a2e16&&_0x425ed5[_0x1a6ca8(0x27a)]!==_0x1a6ca8(0x1da)||typeof _0x425ed5[_0x1a6ca8(0x245)]!==_0x1a6ca8(0x279)||typeof _0x425ed5[_0x1a6ca8(0x1b9)]!==_0x1a6ca8(0x1bb)||!/^[a-f0-9]{64}$/u[_0x1a6ca8(0x1a1)](_0x425ed5[_0x1a6ca8(0x1b9)]))throw new Error(_0x1a6ca8(0x105));return{'kind':_0x1a6ca8(0x1da),'relativePath':safePublishedTemplateRelativePath(_0x425ed5[_0x1a6ca8(0x150)]),'size':safePublishedTemplateSize(_0x425ed5[_0x1a6ca8(0x14c)]),'executable':_0x425ed5[_0x1a6ca8(0x245)],'sha256':_0x425ed5[_0x1a6ca8(0x1b9)]};}function safePublishedTemplateRelativePath(_0x2b1bb6){const _0x2bf37a=_0x132f42;if(typeof _0x2b1bb6!==_0x2bf37a(0x1bb)||_0x2b1bb6[_0x2bf37a(0x134)]===-0x17f2+0x29*0x39+-0xed1*-0x1||_0x2b1bb6[_0x2bf37a(0x1fa)]('/')||_0x2b1bb6[_0x2bf37a(0x168)]('\x5c')||_0x2b1bb6[_0x2bf37a(0x184)]('/')[_0x2bf37a(0x258)](_0x2b62f3=>_0x2b62f3[_0x2bf37a(0x134)]===0xebe+0x239d*0x1+-0x325b||_0x2b62f3==='.'||_0x2b62f3==='..'))throw new Error(_0x2bf37a(0x105));return _0x2b1bb6;}function safePublishedTemplateSize(_0x337542){const _0x21bbea=_0x132f42;if(!Number[_0x21bbea(0x287)](_0x337542)||_0x337542<0x72c+0x495+-0xbc1)throw new Error(_0x21bbea(0x105));return _0x337542;}function legacyPublishedTemplateDirectories(_0x1ef060){const _0x484ab2=_0x132f42,_0x3ef86d=new Set();for(const _0x464c3b of _0x1ef060){const _0x1d0eee=_0x464c3b[_0x484ab2(0x150)][_0x484ab2(0x184)]('/');for(let _0x3f97b1=-0x1bf*-0x5+0x2b4*0x4+-0x138a;_0x3f97b1<_0x1d0eee[_0x484ab2(0x134)];_0x3f97b1+=0x7*-0x79+-0x4*0x61+0x4d4)_0x3ef86d[_0x484ab2(0x1ad)](_0x1d0eee[_0x484ab2(0x1c9)](-0x242+0x300+-0xbe,_0x3f97b1)[_0x484ab2(0x24c)]('/'));}return[..._0x3ef86d][_0x484ab2(0x1fd)]((_0x1495f9,_0x7ea03)=>_0x1495f9[_0x484ab2(0x226)](_0x7ea03,_0x484ab2(0x166)));}function publishedTemplateContentHash(_0x5da54f,_0x1db116,_0x5ec27b){const _0x13ee65=_0x132f42,_0xcdbd28=_0x5ec27b===-0x1feb+-0x1*-0x1faf+0x3d*0x1?_0x1db116[_0x13ee65(0x273)](_0x378ee7=>{const _0x1e4543=_0x13ee65;if(_0x378ee7[_0x1e4543(0x27a)]!==_0x1e4543(0x1da))throw new Error(_0x1e4543(0x105));return _0x378ee7[_0x1e4543(0x150)]+'\x00'+_0x378ee7[_0x1e4543(0x14c)]+'\x00'+_0x378ee7[_0x1e4543(0x1b9)];})[_0x13ee65(0x24c)]('\x0a'):[..._0x5da54f[_0x13ee65(0x273)](_0xe475d7=>_0x13ee65(0x294)+_0xe475d7),..._0x1db116[_0x13ee65(0x273)](_0x52b050=>_0x52b050[_0x13ee65(0x27a)]===_0x13ee65(0x1da)?_0x52b050[_0x13ee65(0x27a)]+'\x00'+_0x52b050[_0x13ee65(0x150)]+'\x00'+_0x52b050[_0x13ee65(0x14c)]+'\x00'+(_0x52b050[_0x13ee65(0x245)]?0x21e6+0x1*-0xd87+-0x2*0xa2f:-0x13*-0x108+0x1*-0x1bc5+0x82d)+'\x00'+_0x52b050[_0x13ee65(0x1b9)]:_0x52b050[_0x13ee65(0x27a)]+'\x00'+_0x52b050[_0x13ee65(0x150)]+'\x00'+_0x52b050[_0x13ee65(0x14c)]+'\x00'+_0x52b050[_0x13ee65(0x109)]+'\x00'+_0x52b050[_0x13ee65(0x1f2)]+'\x00'+_0x52b050[_0x13ee65(0x114)])][_0x13ee65(0x24c)]('\x0a');return createHash(_0x13ee65(0x1b9))[_0x13ee65(0x1fc)](_0xcdbd28)[_0x13ee65(0x243)](_0x13ee65(0x148));}function _0x1c9a(_0x4807cf,_0x16023d){_0x4807cf=_0x4807cf-(0x1ea0+-0x1e77+-0x61*-0x2);const _0x583611=_0x5676();let _0xca8a95=_0x583611[_0x4807cf];if(_0x1c9a['tEbnkP']===undefined){var _0x318dc7=function(_0x1f0fef){const _0x276d27='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1b97bd='',_0x1b4b01='';for(let _0x332007=0x212d+0x1*0x1999+0x1*-0x3ac6,_0x387968,_0x22ccae,_0x1bebeb=-0x141c+-0x1*-0x183+-0x3*-0x633;_0x22ccae=_0x1f0fef['charAt'](_0x1bebeb++);~_0x22ccae&&(_0x387968=_0x332007%(0x110+-0x2611+0x15f*0x1b)?_0x387968*(-0x4*-0x65+0x1da5+0x1ef9*-0x1)+_0x22ccae:_0x22ccae,_0x332007++%(-0x13*-0x7b+0xd47+-0x1664))?_0x1b97bd+=String['fromCharCode'](-0x257a+-0x1c8+0xf*0x2af&_0x387968>>(-(0xf0+-0x1654+0x16*0xf9)*_0x332007&0xa7*0x13+-0x376*-0x4+-0x3*0x8bd)):-0x100+-0x1*0xc47+0xb*0x135){_0x22ccae=_0x276d27['indexOf'](_0x22ccae);}for(let _0x3cead6=-0xb*0x3d+0xb*0xcc+-0x625,_0x51a504=_0x1b97bd['length'];_0x3cead6<_0x51a504;_0x3cead6++){_0x1b4b01+='%'+('00'+_0x1b97bd['charCodeAt'](_0x3cead6)['toString'](0x301*0x9+0x1304+-0x2dfd*0x1))['slice'](-(-0xa39*0x3+0x1*-0xaa2+0x294f));}return decodeURIComponent(_0x1b4b01);};_0x1c9a['eWDsDj']=_0x318dc7,_0x1c9a['hEJBGu']={},_0x1c9a['tEbnkP']=!![];}const _0x222073=_0x583611[-0x1c0f+0x4c6*0x7+-0x55b];_0x1c9a['TPuxWz']!==_0x222073&&(_0x1c9a['hEJBGu']={},_0x1c9a['TPuxWz']=_0x222073);const _0x253817=_0x1c9a['hEJBGu'][_0x4807cf];return _0x253817===undefined?(_0xca8a95=_0x1c9a['eWDsDj'](_0xca8a95),_0x1c9a['hEJBGu'][_0x4807cf]=_0xca8a95):_0xca8a95=_0x253817,_0xca8a95;}async function verifyPublishedTemplateContent(_0x10c5ed,_0x565a21,_0x1e1b7d){const _0x35648c=_0x132f42,_0x21fb23=new Map(_0x1e1b7d[_0x35648c(0x273)](_0x5cf9a6=>[_0x5cf9a6[_0x35648c(0x150)],_0x5cf9a6])),_0x493d80=new Set([..._0x565a21,_0x35648c(0x116),_0x35648c(0x120)]),_0x1ee991=new Set(),_0x1a654b=await listPublishedTemplateEntries(_0x10c5ed,_0x493d80,_0x1ee991);if(_0x1a654b[_0x35648c(0x134)]!==_0x21fb23[_0x35648c(0x14c)]||_0x1ee991[_0x35648c(0x14c)]!==_0x493d80[_0x35648c(0x14c)])throw new Error(_0x35648c(0x105));for(const _0x22a627 of _0x1a654b){const _0x287e98=_0x21fb23[_0x35648c(0x25c)](_0x22a627[_0x35648c(0x150)]);if(_0x287e98===undefined||_0x287e98[_0x35648c(0x27a)]!==_0x22a627[_0x35648c(0x27a)])throw new Error(_0x35648c(0x105));if(_0x287e98[_0x35648c(0x27a)]===_0x35648c(0x1da)&&_0x22a627[_0x35648c(0x27a)]===_0x35648c(0x1da)){if(_0x287e98[_0x35648c(0x14c)]!==_0x22a627[_0x35648c(0x14c)]||_0x287e98[_0x35648c(0x245)]!==_0x22a627[_0x35648c(0x245)]||_0x22a627[_0x35648c(0x1cb)]!==(_0x287e98[_0x35648c(0x245)]?-0x1feb*0x1+-0xa*-0x185+0x1226:0x2*-0xf1+-0xdba+-0x8*-0x218)||_0x287e98[_0x35648c(0x1b9)]!==_0x22a627[_0x35648c(0x1b9)])throw new Error(_0x35648c(0x105));continue;}if(_0x287e98[_0x35648c(0x27a)]!==_0x35648c(0x194)||_0x22a627[_0x35648c(0x27a)]!==_0x35648c(0x194)||_0x287e98[_0x35648c(0x14c)]!==_0x22a627[_0x35648c(0x14c)]||_0x287e98[_0x35648c(0x109)]!==_0x22a627[_0x35648c(0x109)])throw new Error(_0x35648c(0x105));await verifyPublishedSymlinkResolution(_0x10c5ed,_0x287e98,_0x22a627[_0x35648c(0x106)]);}}async function verifyPublishedSymlinkResolution(_0x48871d,_0x11703f,_0x14a53e){const _0x3856b9=_0x132f42;let _0x1cd735;try{_0x1cd735=await realpath(_0x14a53e);}catch{throw new Error(_0x3856b9(0x105));}if(_0x11703f[_0x3856b9(0x1f2)]===_0x3856b9(0x108)){if(_0x1cd735!==_0x11703f[_0x3856b9(0x114)])throw new Error(_0x3856b9(0x105));return;}let _0x2b897e,_0x5b39c6;try{[_0x2b897e,_0x5b39c6]=await Promise[_0x3856b9(0x218)]([realpath(join(_0x48871d,..._0x11703f[_0x3856b9(0x114)][_0x3856b9(0x184)]('/'))),realpath(_0x48871d)]);}catch{throw new Error(_0x3856b9(0x105));}if(_0x1cd735!==_0x2b897e||!within(_0x5b39c6,_0x1cd735))throw new Error(_0x3856b9(0x105));}async function listPublishedTemplateEntries(_0x5ab9f4,_0x109ad2,_0x1d6815,_0xabd821=''){const _0x482123=_0x132f42,_0x53dcb6=await lstat(_0x5ab9f4);if(!_0x53dcb6[_0x482123(0x115)]()||_0x53dcb6[_0x482123(0x242)]()||(_0x53dcb6[_0x482123(0x1cb)]&0xf46+-0x12f0+-0xcf*-0x7)!==-0xbe9*0x2+0x1a32+0x9*-0x1b)throw new Error(_0x482123(0x105));const _0x4217b5=[];for(const _0x3bc733 of await readdir(_0x5ab9f4,{'withFileTypes':!![]})){const _0x21d02d=join(_0x5ab9f4,_0x3bc733[_0x482123(0x22e)]),_0x43b557=_0xabd821[_0x482123(0x134)]===0x1042*-0x1+-0x7*-0x505+-0x12e1?_0x3bc733[_0x482123(0x22e)]:_0xabd821+'/'+_0x3bc733[_0x482123(0x22e)],_0x1e89d8=await lstat(_0x21d02d);if(_0x1e89d8[_0x482123(0x242)]()){const _0x4fcc30=await readlink(_0x21d02d);_0x4217b5[_0x482123(0x171)]({'kind':_0x482123(0x194),'relativePath':_0x43b557,'size':Buffer[_0x482123(0x22c)](_0x4fcc30),'linkTarget':_0x4fcc30,'sourcePath':_0x21d02d});continue;}if(_0x1e89d8[_0x482123(0x115)]()){if(!_0x109ad2[_0x482123(0x25a)](_0x43b557))throw new Error(_0x482123(0x105));_0x1d6815[_0x482123(0x1ad)](_0x43b557),_0x4217b5[_0x482123(0x171)](...await listPublishedTemplateEntries(_0x21d02d,_0x109ad2,_0x1d6815,_0x43b557));}else{if(!_0x1e89d8[_0x482123(0x266)]()||_0x1e89d8[_0x482123(0xf6)]!==0xa12+-0x2cc*0x8+0xc4f||!Number[_0x482123(0x287)](_0x1e89d8[_0x482123(0x14c)]))throw new Error(_0x482123(0x105));_0x4217b5[_0x482123(0x171)]({'kind':_0x482123(0x1da),'relativePath':_0x43b557,'size':_0x1e89d8[_0x482123(0x14c)],'executable':(_0x1e89d8[_0x482123(0x1cb)]&-0x9ea+0x7d8+-0x1*-0x25b)!==0xa51+0x1d*0x10f+-0x2904,'mode':_0x1e89d8[_0x482123(0x1cb)]&-0x130a+-0xc*0x20c+0x2d99,'sha256':createHash(_0x482123(0x1b9))[_0x482123(0x1fc)](await readFile(_0x21d02d))[_0x482123(0x243)](_0x482123(0x148))});}}return _0x4217b5;}function validatePublishedSourceWorkspacePath(_0x2e1f11){const _0x36ff20=_0x132f42;if(!isAbsolute(_0x2e1f11)||resolve(_0x2e1f11)!==_0x2e1f11||_0x2e1f11==='/'||RESERVED_SANDBOX_ROOTS[_0x36ff20(0x258)](_0x1bd768=>_0x2e1f11===_0x1bd768||within(_0x1bd768,_0x2e1f11)||within(_0x2e1f11,_0x1bd768)))throw new Error(_0x36ff20(0x105));}function within(_0x38b904,_0x5e7650){const _0x2eecfd=_0x132f42,_0x3df644=relative(_0x38b904,_0x5e7650);return _0x3df644[_0x2eecfd(0x134)]>-0x1*-0x7db+-0x1*0x1817+0x103c&&_0x3df644!=='..'&&!_0x3df644[_0x2eecfd(0x1fa)]('..'+sep);}function resolveMcpServers(_0x590753,_0x5e7b6c){const _0x10b2b7=_0x132f42,_0x360a69=_0x1d2b40=>{const _0x1354c5=_0x1c9a,_0x220f3b={};for(const [_0x572dad,_0x20edbe]of Object[_0x1354c5(0x29c)](_0x1d2b40??{})){const _0x1f2518=_0x5e7b6c[_0x20edbe[_0x1354c5(0x17f)]];if(_0x1f2518===undefined)throw new Error(_0x1354c5(0x264));_0x220f3b[_0x572dad]=_0x1f2518;}return _0x220f3b;};return _0x590753[_0x10b2b7(0x1d4)][_0x10b2b7(0x1bd)](_0x838011=>{const _0x1ae800=_0x10b2b7;if(_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x1bc)]===_0x1ae800(0x1d8)){if(_0x590753[_0x1ae800(0x118)][_0x1ae800(0x21d)]!==_0x1ae800(0x1e9))return[];return[{'name':_0x838011[_0x1ae800(0x13d)],'lifecycle':_0x1ae800(0x1dd),'transport':_0x1ae800(0x1d8),'url':_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x176)],'headers':{..._0x360a69(_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x207)]),..._0x360a69(_0x838011[_0x1ae800(0x11c)][_0x1ae800(0x207)])}}];}return[{'name':_0x838011[_0x1ae800(0x13d)],'lifecycle':_0x1ae800(0x1dd),'transport':_0x1ae800(0x220),'command':_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x263)],'args':[..._0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x296)],..._0x838011[_0x1ae800(0x11c)][_0x1ae800(0x255)]??[]],'environment':{..._0x360a69(_0x838011[_0x1ae800(0x1b3)][_0x1ae800(0x1eb)]),..._0x360a69(_0x838011[_0x1ae800(0x11c)][_0x1ae800(0x1eb)])}}];});}function hostedConversationSummary(_0x5499af,_0x396b6b){const _0x3a0cd7=_0x132f42;return hostedConversationSummarySchema[_0x3a0cd7(0x27e)]({'id':_0x5499af['id'],'nodeId':_0x5499af[_0x3a0cd7(0x298)],'sessionId':_0x5499af[_0x3a0cd7(0x292)],'templateId':_0x5499af[_0x3a0cd7(0x219)],'templateName':_0x5499af[_0x3a0cd7(0x28b)],'activeVersionId':_0x5499af[_0x3a0cd7(0x1ff)],'title':_0x5499af[_0x3a0cd7(0x28c)],'pinnedAt':_0x5499af[_0x3a0cd7(0x241)],'status':_0x5499af[_0x3a0cd7(0x10e)],'modelId':_0x5499af[_0x3a0cd7(0x22d)],'createdAt':_0x5499af[_0x3a0cd7(0x2a2)],'updatedAt':_0x5499af[_0x3a0cd7(0x17a)],'lastActivityAt':_0x5499af[_0x3a0cd7(0x1c2)],..._0x396b6b===undefined?{}:{'activity':_0x396b6b}});}function templateSummary(_0x28ae3a,_0x1dde76){const _0x57b8ee=_0x132f42;return conversationTemplateSummarySchema[_0x57b8ee(0x27e)]({'id':_0x28ae3a[_0x57b8ee(0x219)],'nodeId':_0x28ae3a[_0x57b8ee(0x298)],'name':_0x28ae3a[_0x57b8ee(0x28b)],'description':_0x1dde76[_0x57b8ee(0x12f)],'status':_0x28ae3a[_0x57b8ee(0xfa)]?_0x57b8ee(0x271):_0x57b8ee(0x102),'currentVersionId':_0x28ae3a[_0x57b8ee(0x1ff)],'available':!_0x28ae3a[_0x57b8ee(0xfa)],'createdAt':_0x28ae3a[_0x57b8ee(0x2a2)],'updatedAt':_0x1dde76[_0x57b8ee(0x17a)]});}function modelSummary(_0x172b3a,_0x1639a9){const _0xc3d6e4=_0x132f42;return{'id':_0x172b3a['id'],'name':_0x172b3a[_0xc3d6e4(0x22e)],'protocol':_0x172b3a[_0xc3d6e4(0x229)],'baseUrl':_0x172b3a[_0xc3d6e4(0x1ee)],'modelId':_0x172b3a[_0xc3d6e4(0x22d)],'contextWindowTokens':_0x172b3a[_0xc3d6e4(0x185)],'maxOutputTokens':_0x172b3a[_0xc3d6e4(0x1c3)],'inputCapabilities':_0x172b3a[_0xc3d6e4(0x138)],'outputCapabilities':_0x172b3a[_0xc3d6e4(0x100)],'reasoningEfforts':_0x172b3a[_0xc3d6e4(0x146)],'hostedWebSearch':_0x172b3a[_0xc3d6e4(0x252)],..._0x172b3a[_0xc3d6e4(0xfe)]===undefined?{}:{'responsesTransport':_0x172b3a[_0xc3d6e4(0xfe)]},'responsesPreviousResponseId':_0x172b3a[_0xc3d6e4(0x110)],'enabled':_0x172b3a[_0xc3d6e4(0x269)],'sortOrder':_0x1639a9,'apiKeyConfigured':!![]};}function systemInstruction(_0x4a4d6d,_0x2aefc4){const _0x212c94=_0x132f42,_0x5cddf6=_0x4a4d6d[_0x212c94(0x118)],_0x4e3545=_0x5cddf6[_0x212c94(0x21d)]===_0x212c94(0x290)?_0x212c94(0x131):_0x212c94(0x22a);return[_0x212c94(0x225),_0x212c94(0x280),_0x212c94(0x1cc),..._0x2aefc4===undefined?[]:[_0x212c94(0x12c)+_0x2aefc4+_0x212c94(0x144),_0x212c94(0x119)+_0x2aefc4+_0x212c94(0x167)+_0x2aefc4+_0x212c94(0xfd)],..._0x4a4d6d[_0x212c94(0x2a0)]===undefined?[]:[_0x212c94(0x24a)+_0x4a4d6d[_0x212c94(0x2a0)]+_0x212c94(0x1d1)+join(_0x4a4d6d[_0x212c94(0x2a0)],_0x212c94(0x116))+_0x212c94(0x203)+join(_0x4a4d6d[_0x212c94(0x2a0)],_0x212c94(0x120))+_0x212c94(0x23c)],_0x212c94(0x19f),_0x4e3545][_0x212c94(0x24c)]('\x0a');}function attachmentPrompt(_0x5cff0e,_0x276522){const _0x5c811c=_0x132f42;if(_0x276522[_0x5c811c(0x134)]===0x8d1+0x12b*-0x1a+0x158d)return _0x5cff0e;const _0x1cece1=_0x276522[_0x5c811c(0x273)](_0xbc7bc2=>_0x5c811c(0x1f5)+_0xbc7bc2[_0x5c811c(0x150)])[_0x5c811c(0x24c)]('\x0a');return''+_0x5cff0e+(_0x5cff0e[_0x5c811c(0x239)]()[_0x5c811c(0x134)]===0x2*0xd1+0x324*-0x5+0x2*0x709?'':'\x0a\x0a')+_0x5c811c(0x233)+_0x1cece1;}function automaticHostedConversationTitle(_0x21ca45){const _0x1a59f0=_0x132f42;if(_0x21ca45===undefined)return undefined;const _0x130e79=sessionTitleFromFirstMessage(_0x21ca45);if(_0x130e79[_0x1a59f0(0x134)]===0x347+0x571*0x1+0x24*-0x3e||/^(?:new|untitled) session(?:\s*[-–—:]\s*\d{4}-\d{2}-\d{2}.*)?$/iu[_0x1a59f0(0x1a1)](_0x130e79))return undefined;return _0x130e79;}function runFromMessage(_0x59d47d){const _0x54d8ec=_0x132f42;return{'id':_0x59d47d[_0x54d8ec(0x15f)],'status':_0x59d47d[_0x54d8ec(0x10e)],'startedAt':_0x59d47d[_0x54d8ec(0x2a2)],'completedAt':_0x59d47d[_0x54d8ec(0x10e)]===_0x54d8ec(0x25b)?null:_0x59d47d[_0x54d8ec(0x17a)]};}function runInterruptionKey(_0x2fbd11,_0x406cbc){return _0x2fbd11+'\x00'+_0x406cbc;}function uploadProjection(_0x41cf2e){const _0x4891c3=_0x132f42;return{'uploadId':_0x41cf2e[_0x4891c3(0x1f3)],'conversationId':_0x41cf2e[_0x4891c3(0x29e)],'name':_0x41cf2e[_0x4891c3(0x22e)],'mimeType':_0x41cf2e[_0x4891c3(0x126)],'receivedBytes':_0x41cf2e[_0x4891c3(0x1be)],'size':_0x41cf2e[_0x4891c3(0x14c)],'status':_0x41cf2e[_0x4891c3(0x10e)],..._0x41cf2e[_0x4891c3(0x159)]===undefined?{}:{'file':_0x41cf2e[_0x4891c3(0x159)]}};}async function assertRegularFile(_0xe02c18,_0x2e3eb1){const _0x379561=_0x132f42,_0x4d9091=await lstat(_0xe02c18)[_0x379561(0x149)](()=>{const _0x6cd7dc=_0x379561;throw new Error(_0x6cd7dc(0x27c));});if(!_0x4d9091[_0x379561(0x266)]()||_0x4d9091[_0x379561(0x242)]()||_0x4d9091[_0x379561(0xf6)]!==-0x142*-0x5+0x11*0x5f+0x1a*-0x7c||_0x4d9091[_0x379561(0x14c)]!==_0x2e3eb1)throw new Error(_0x379561(0x27c));}async function assertUploadTemporaryFile(_0x462fc9,_0x52e1a1){const _0x1c1eed=_0x132f42,_0x48458f=await lstat(_0x462fc9)[_0x1c1eed(0x149)](()=>{const _0x398f2e=_0x1c1eed;throw new Error(_0x398f2e(0x1e1));});if(!_0x48458f[_0x1c1eed(0x266)]()||_0x48458f[_0x1c1eed(0x242)]()||_0x48458f[_0x1c1eed(0xf6)]!==0x1121*0x2+-0x3*-0x82a+-0x3abf||_0x48458f[_0x1c1eed(0x14c)]!==_0x52e1a1)throw new Error(_0x1c1eed(0x1e1));}function record(_0x5480d1){const _0x5aecf1=_0x132f42;return typeof _0x5480d1===_0x5aecf1(0x260)&&_0x5480d1!==null&&!Array[_0x5aecf1(0x265)](_0x5480d1);}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* mar-release-protected */
|
|
2
|
-
const _0x5c326f=_0x47b1;(function(_0x1d46c4,_0x11cfbb){const _0x131750=_0x47b1,_0x16e19b=_0x1d46c4();while(!![]){try{const _0x2b5faa=-parseInt(_0x131750(0x1ae))/(-0xe8c+-0x1*0x2197+-0x3*-0x100c)*(-parseInt(_0x131750(0x1a4))/(0x1*-0x267+0x18fa+-0x1691))+-parseInt(_0x131750(0x1c4))/(0x2d*0xb9+-0x1d1b+0x1*-0x367)*(parseInt(_0x131750(0x1c0))/(0x1*0x143c+0x17d*0x9+0x1*-0x219d))+parseInt(_0x131750(0x1c6))/(0xa7d+-0x1*0x22d5+0x185d)+parseInt(_0x131750(0x1cf))/(0x59*-0x51+-0x2003+0x3c32)*(parseInt(_0x131750(0x1c8))/(0x2057+0x1411+-0x3461))+parseInt(_0x131750(0x1c2))/(0x19ee+-0x162f+-0x3b7)+parseInt(_0x131750(0x1aa))/(0xef7+-0x2*0xe43+0xd98)+-parseInt(_0x131750(0x1c9))/(0x1c51+-0xfe5*0x1+-0xa*0x13d)*(parseInt(_0x131750(0x1eb))/(-0x143*-0xd+-0x274+0xa*-0x164));if(_0x2b5faa===_0x11cfbb)break;else _0x16e19b['push'](_0x16e19b['shift']());}catch(_0xc0c07e){_0x16e19b['push'](_0x16e19b['shift']());}}}(_0x24dc,-0x6efb*0x21+-0x1*0x6b64d+0x1cf2ad));function _0x47b1(_0x46f581,_0x1d086e){_0x46f581=_0x46f581-(-0x24b9+0x15d8+-0x107c*-0x1);const _0x354eab=_0x24dc();let _0x3bd8c1=_0x354eab[_0x46f581];if(_0x47b1['dbxCBa']===undefined){var _0x3d3498=function(_0x732323){const _0x13aac3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x240d89='',_0x20155b='';for(let _0x4f6648=-0x1a76+0xa9*-0x8+0x1fbe*0x1,_0x21b617,_0x42216b,_0x3ae055=0x1051*0x1+0x1951+-0x29a2;_0x42216b=_0x732323['charAt'](_0x3ae055++);~_0x42216b&&(_0x21b617=_0x4f6648%(0x10fd+0x20a5*-0x1+-0x76*-0x22)?_0x21b617*(0x1*0x495+0x1*0x1a35+0x1*-0x1e8a)+_0x42216b:_0x42216b,_0x4f6648++%(-0x1dad+-0x19d2+-0x1281*-0x3))?_0x240d89+=String['fromCharCode'](0x1*-0x7d9+-0x136a+0x1c42*0x1&_0x21b617>>(-(0x2503+-0x13*0x10b+-0x1130)*_0x4f6648&0x224d+0x8c6*0x3+0x1*-0x3c99)):-0x1e01*0x1+0x1*-0x2467+0x84d*0x8){_0x42216b=_0x13aac3['indexOf'](_0x42216b);}for(let _0x495151=0x1afb+-0x10*0xc5+-0x2ef*0x5,_0x275de9=_0x240d89['length'];_0x495151<_0x275de9;_0x495151++){_0x20155b+='%'+('00'+_0x240d89['charCodeAt'](_0x495151)['toString'](-0x2605+-0x1195*-0x1+0x1480))['slice'](-(0x135f+0x20b*-0x3+-0xd3c));}return decodeURIComponent(_0x20155b);};_0x47b1['rEFeEx']=_0x3d3498,_0x47b1['Tdwwqb']={},_0x47b1['dbxCBa']=!![];}const _0x5e0fbb=_0x354eab[0x103*0x25+0xb3+0x1*-0x2622];_0x47b1['CIunUm']!==_0x5e0fbb&&(_0x47b1['Tdwwqb']={},_0x47b1['CIunUm']=_0x5e0fbb);const _0x5789b3=_0x47b1['Tdwwqb'][_0x46f581];return _0x5789b3===undefined?(_0x3bd8c1=_0x47b1['rEFeEx'](_0x3bd8c1),_0x47b1['Tdwwqb'][_0x46f581]=_0x3bd8c1):_0x3bd8c1=_0x5789b3,_0x3bd8c1;}import{tmpdir}from'node:os';import{basename,dirname,isAbsolute,join,relative,resolve}from'node:path';import{lstat,mkdir,mkdtemp,readFile,realpath,rm,writeFile}from'node:fs/promises';import{AttachmentDomainState}from'./attachment-domain-state.js';const MAX_ATTACHMENT_BYTES=(0x35*0x8a+0xb*0x2e+-0x61b*0x5)*(-0x932+0x10fd+0x3cb*-0x1)*(0xff*0x17+0x3*-0x7e8+0x1*0x4cf),IMAGE_CACHE_TTL_MS=(0x24b+0x255+-0x464)*(-0x190a8+0x105b0+0x17558),NATIVE_IMAGE_INDEX_TTL_MS=(0x211c+0x1e2*0x2+-0x86*0x46)*(-0x12ba3+0xbb0a+0x415*0x55);export class RunAttachmentService{[_0x5c326f(0x1e0)];[_0x5c326f(0x19d)]=new AttachmentDomainState();constructor(_0x5d0296){const _0x43a66c=_0x5c326f;this[_0x43a66c(0x1e0)]=_0x5d0296;}async[_0x5c326f(0x1cc)](_0xd53eb7,_0x34c053){const _0x29d6d1=_0x5c326f;if(_0x34c053[_0x29d6d1(0x1d4)]===0x3e*-0x5+-0x12e3*-0x2+-0x2490)return[];const _0x38ff29=await mkdtemp(join(tmpdir(),_0x29d6d1(0x1d8)));this[_0x29d6d1(0x19d)][_0x29d6d1(0x1ad)][_0x29d6d1(0x1e4)](_0xd53eb7,_0x38ff29);try{const _0x93344b=await Promise[_0x29d6d1(0x1a9)](_0x34c053[_0x29d6d1(0x1de)](async(_0x4ae3ab,_0x22bed3)=>{const _0x590ba7=_0x29d6d1,_0x1135ba=_0x4ae3ab[_0x590ba7(0x1e2)][_0x590ba7(0x19c)](_0x590ba7(0x1a8)[_0x590ba7(0x1d4)])[_0x590ba7(0x1ec)](_0x590ba7(0x1b1),_0x590ba7(0x1a0)),_0x46ee8f=join(_0x38ff29,_0x22bed3+(0x2*0x7a9+0xcd6*-0x2+-0xb*-0xf1)+'.'+_0x1135ba);return await writeFile(_0x46ee8f,Buffer[_0x590ba7(0x1be)](_0x4ae3ab[_0x590ba7(0x1d2)],_0x590ba7(0x1c5)),{'mode':0x180}),{'type':_0x590ba7(0x1ea),'path':_0x46ee8f};})),_0x13dc8e=this[_0x29d6d1(0x19d)][_0x29d6d1(0x1b5)][_0x29d6d1(0x1a7)](_0xd53eb7);if(_0x13dc8e!==undefined)_0x13dc8e[_0x29d6d1(0x1e8)]=_0x93344b[_0x29d6d1(0x1de)](_0x7b10fc=>_0x7b10fc[_0x29d6d1(0x1d5)]);return _0x93344b;}catch(_0x2b69e6){this[_0x29d6d1(0x1ca)](_0xd53eb7);throw _0x2b69e6;}}async[_0x5c326f(0x1ac)](_0x1a7efc,_0x38ec0a,_0x4fd30f){const _0x3dbc69=_0x5c326f;if(_0x4fd30f[_0x3dbc69(0x1d4)]===-0x823+-0x16f*-0x3+0x3d6)return[];const _0x5247f5=resolve(_0x1a7efc,_0x3dbc69(0x1e7));await mkdir(_0x5247f5,{'recursive':!![],'mode':0x1c0});const _0x1a393e=await lstat(_0x5247f5);if(!_0x1a393e[_0x3dbc69(0x1a6)]()||_0x1a393e[_0x3dbc69(0x1d9)]())throw new Error(_0x3dbc69(0x1b9));const _0x2fd871=join(_0x5247f5,_0x3dbc69(0x1bc));await mkdir(_0x2fd871,{'recursive':!![],'mode':0x1c0});const _0x55c1d5=await lstat(_0x2fd871);if(!_0x55c1d5[_0x3dbc69(0x1a6)]()||_0x55c1d5[_0x3dbc69(0x1d9)]())throw new Error(_0x3dbc69(0x1b9));const _0x4c285c=join(_0x2fd871,_0x38ec0a);await mkdir(_0x4c285c,{'mode':0x1c0}),this[_0x3dbc69(0x19d)][_0x3dbc69(0x1b0)][_0x3dbc69(0x1e4)](_0x38ec0a,_0x4c285c);try{return await Promise[_0x3dbc69(0x1a9)](_0x4fd30f[_0x3dbc69(0x1de)](_0x1b4f61=>writeFile(join(_0x4c285c,_0x1b4f61[_0x3dbc69(0x1dd)]),Buffer[_0x3dbc69(0x1be)](_0x1b4f61[_0x3dbc69(0x1d2)],_0x3dbc69(0x1c5)),{'flag':'wx','mode':0x180}))),_0x4fd30f[_0x3dbc69(0x1de)](_0x59b2bf=>_0x3dbc69(0x1b6)+_0x38ec0a+'/'+_0x59b2bf[_0x3dbc69(0x1dd)]);}catch(_0x349472){this[_0x3dbc69(0x19d)][_0x3dbc69(0x1b0)][_0x3dbc69(0x1d3)](_0x38ec0a),await rm(_0x4c285c,{'recursive':!![],'force':!![]});throw _0x349472;}}[_0x5c326f(0x1ca)](_0x5604a0){const _0x2b2526=_0x5c326f,_0x368f28=this[_0x2b2526(0x19d)][_0x2b2526(0x1ad)][_0x2b2526(0x1a7)](_0x5604a0);_0x368f28!==undefined&&(this[_0x2b2526(0x19d)][_0x2b2526(0x1ad)][_0x2b2526(0x1d3)](_0x5604a0),void rm(_0x368f28,{'recursive':!![],'force':!![]})[_0x2b2526(0x1e6)](()=>undefined));const _0x21a3bf=this[_0x2b2526(0x19d)][_0x2b2526(0x1b0)][_0x2b2526(0x1a7)](_0x5604a0);_0x21a3bf!==undefined&&(this[_0x2b2526(0x19d)][_0x2b2526(0x1b0)][_0x2b2526(0x1d3)](_0x5604a0),void rm(_0x21a3bf,{'recursive':!![],'force':!![]})[_0x2b2526(0x1e6)](()=>undefined));}[_0x5c326f(0x1a5)](_0x31a691,_0xf80af){const _0x23401d=_0x5c326f;if(_0xf80af[_0x23401d(0x1d4)]===-0x1195*-0x1+-0x1c2c+-0x1*-0xa97)return;this[_0x23401d(0x1d6)](_0x31a691),this[_0x23401d(0x19d)][_0x23401d(0x1b5)][_0x23401d(0x1e4)](_0x31a691,{'images':_0xf80af,'localPaths':_0xf80af[_0x23401d(0x1de)](()=>undefined),'expiresAt':undefined,'timer':undefined});}[_0x5c326f(0x1b3)](_0x2c299d,_0x11b338){const _0x4b6106=_0x5c326f,_0x1d469e=this[_0x4b6106(0x19d)][_0x4b6106(0x1b5)][_0x4b6106(0x1a7)](_0x2c299d);_0x1d469e!==undefined&&(this[_0x4b6106(0x19d)][_0x4b6106(0x1b5)][_0x4b6106(0x1d3)](_0x2c299d),this[_0x4b6106(0x19d)][_0x4b6106(0x1b5)][_0x4b6106(0x1e4)](_0x11b338,_0x1d469e));const _0x549651=this[_0x4b6106(0x19d)][_0x4b6106(0x1ad)][_0x4b6106(0x1a7)](_0x2c299d);_0x549651!==undefined&&(this[_0x4b6106(0x19d)][_0x4b6106(0x1ad)][_0x4b6106(0x1d3)](_0x2c299d),this[_0x4b6106(0x19d)][_0x4b6106(0x1ad)][_0x4b6106(0x1e4)](_0x11b338,_0x549651));const _0x19e711=this[_0x4b6106(0x19d)][_0x4b6106(0x1b0)][_0x4b6106(0x1a7)](_0x2c299d);_0x19e711!==undefined&&(this[_0x4b6106(0x19d)][_0x4b6106(0x1b0)][_0x4b6106(0x1d3)](_0x2c299d),this[_0x4b6106(0x19d)][_0x4b6106(0x1b0)][_0x4b6106(0x1e4)](_0x11b338,_0x19e711));}[_0x5c326f(0x1ab)](_0x1978f5,_0x2b1685){const _0xc42668=_0x5c326f;if(_0x2b1685[_0xc42668(0x1d4)]===-0x1c*0x7c+0x1*0x669+0x727*0x1)return[];const _0x31e4b1=this[_0xc42668(0x19d)][_0xc42668(0x1b5)][_0xc42668(0x1a7)](_0x1978f5),_0x303d42=_0x31e4b1?.[_0xc42668(0x19e)]??[],_0x4c5b0c=_0x303d42[_0xc42668(0x1d4)],_0x5943aa=[..._0x303d42,..._0x2b1685];if(_0x31e4b1===undefined)this[_0xc42668(0x19d)][_0xc42668(0x1b5)][_0xc42668(0x1e4)](_0x1978f5,{'images':_0x5943aa,'localPaths':_0x2b1685[_0xc42668(0x1de)](()=>undefined),'expiresAt':undefined,'timer':undefined});else _0x31e4b1[_0xc42668(0x19e)]=_0x5943aa,_0x31e4b1[_0xc42668(0x1e8)]=[..._0x31e4b1[_0xc42668(0x1e8)],..._0x2b1685[_0xc42668(0x1de)](()=>undefined)];return _0x2b1685[_0xc42668(0x1de)]((_0x3cb6f9,_0x5ee38f)=>({'name':_0x3cb6f9[_0xc42668(0x1dd)],'mime':_0x3cb6f9[_0xc42668(0x1e2)],'byteSize':Buffer[_0xc42668(0x1b4)](_0x3cb6f9[_0xc42668(0x1d2)],_0xc42668(0x1c5)),'runId':_0x1978f5,'imageIndex':_0x4c5b0c+_0x5ee38f}));}[_0x5c326f(0x1b2)](_0x5515d1,_0x51be5d){const _0x2a6cd6=_0x5c326f,_0x5b3d52=this[_0x2a6cd6(0x19d)][_0x2a6cd6(0x1b5)][_0x2a6cd6(0x1a7)](_0x5515d1);if(_0x5b3d52===undefined)return undefined;if(_0x5b3d52[_0x2a6cd6(0x1d7)]!==undefined&&_0x5b3d52[_0x2a6cd6(0x1d7)]<=Date[_0x2a6cd6(0x1e5)]())return this[_0x2a6cd6(0x1d6)](_0x5515d1),undefined;return _0x5b3d52[_0x2a6cd6(0x19e)][_0x51be5d];}[_0x5c326f(0x1ed)](_0x3ee49f,_0x109251){const _0x301f38=_0x5c326f;return this[_0x301f38(0x1bb)](_0x301f38(0x1da)+_0x3ee49f['id'],this[_0x301f38(0x1e0)](_0x3ee49f),_0x109251);}[_0x5c326f(0x1bb)](_0x2f8f3a,_0x496e80,_0x969d05){const _0x2a6f8b=_0x5c326f,_0x3df3c8=_0x496e80[_0x2a6f8b(0x1de)](_0x19d734=>resolve(_0x19d734)),_0x4b0d8a=this[_0x2a6f8b(0x19d)][_0x2a6f8b(0x1d1)][_0x2a6f8b(0x1a7)](_0x2f8f3a)??[],_0x3597b6=[];for(const _0x5ce5c7 of _0x969d05){const _0x2d7b69=_0x5ce5c7[_0x2a6f8b(0x1df)]===undefined?undefined:this[_0x2a6f8b(0x19f)](_0x5ce5c7[_0x2a6f8b(0x1df)]);if(_0x2d7b69!==undefined){_0x3597b6[_0x2a6f8b(0x1db)](_0x2d7b69);continue;}if(_0x5ce5c7[_0x2a6f8b(0x1b2)]!==undefined){if(typeof _0x5ce5c7[_0x2a6f8b(0x1c1)]!==_0x2a6f8b(0x1af)||_0x5ce5c7[_0x2a6f8b(0x1c1)][_0x2a6f8b(0x1d4)]===0x2*-0x26b+0x2276+0xc*-0x278||!_0x5ce5c7[_0x2a6f8b(0x1e2)][_0x2a6f8b(0x1cb)](_0x2a6f8b(0x1a8))){_0x3597b6[_0x2a6f8b(0x1db)]({'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)]});continue;}let _0xb7511c=_0x4b0d8a[_0x2a6f8b(0x1e9)](_0x8fd151=>_0x8fd151[_0x2a6f8b(0x1b8)]===_0x2a6f8b(0x1cd)&&_0x8fd151[_0x2a6f8b(0x1c1)]===_0x5ce5c7[_0x2a6f8b(0x1c1)]);const _0x150fe7={'kind':_0x2a6f8b(0x1cd),'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)],..._0x5ce5c7[_0x2a6f8b(0x1e3)]===undefined?{}:{'byteSize':_0x5ce5c7[_0x2a6f8b(0x1e3)]},'sourceId':_0x5ce5c7[_0x2a6f8b(0x1c1)],'read':_0x5ce5c7[_0x2a6f8b(0x1b2)]};if(_0xb7511c<-0x195*-0x7+-0x2241+0x172e)_0xb7511c=_0x4b0d8a[_0x2a6f8b(0x1d4)],_0x4b0d8a[_0x2a6f8b(0x1db)](_0x150fe7);else _0x4b0d8a[_0xb7511c]=_0x150fe7;_0x3597b6[_0x2a6f8b(0x1db)]({'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)],..._0x5ce5c7[_0x2a6f8b(0x1e3)]===undefined?{}:{'byteSize':_0x5ce5c7[_0x2a6f8b(0x1e3)]},'runId':_0x2f8f3a,'imageIndex':_0xb7511c});continue;}if(_0x5ce5c7[_0x2a6f8b(0x1df)]!==undefined&&isComposerTemporaryImagePath(_0x5ce5c7[_0x2a6f8b(0x1df)]))continue;if(_0x3df3c8[_0x2a6f8b(0x1d4)]===-0xcc9+0x3*0x8a9+-0x2*0x699)continue;if(_0x5ce5c7[_0x2a6f8b(0x1df)]===undefined||!_0x5ce5c7[_0x2a6f8b(0x1e2)][_0x2a6f8b(0x1cb)](_0x2a6f8b(0x1a8))){_0x3597b6[_0x2a6f8b(0x1db)]({'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)]});continue;}const _0x555eb0=resolve(_0x5ce5c7[_0x2a6f8b(0x1df)]),_0x33e4ea=_0x3df3c8[_0x2a6f8b(0x1a1)](_0x87c714=>{const _0x324797=_0x2a6f8b,_0x21fc9a=relative(_0x87c714,_0x555eb0);return _0x21fc9a[_0x324797(0x1d4)]>-0x61*0x54+0x7*-0x309+-0x15*-0x287&&!_0x21fc9a[_0x324797(0x1cb)]('..')&&!isAbsolute(_0x21fc9a);});if(_0x33e4ea===undefined){_0x3597b6[_0x2a6f8b(0x1db)]({'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)]});continue;}let _0x4beed9=_0x4b0d8a[_0x2a6f8b(0x1e9)](_0x428e93=>_0x428e93[_0x2a6f8b(0x1b8)]===_0x2a6f8b(0x1ba)&&_0x428e93[_0x2a6f8b(0x1d5)]===_0x555eb0);_0x4beed9<0x25d9+-0x1718+-0x1*0xec1&&(_0x4beed9=_0x4b0d8a[_0x2a6f8b(0x1d4)],_0x4b0d8a[_0x2a6f8b(0x1db)]({'kind':_0x2a6f8b(0x1ba),'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)],'path':_0x555eb0,'root':_0x33e4ea})),_0x3597b6[_0x2a6f8b(0x1db)]({'name':_0x5ce5c7[_0x2a6f8b(0x1dd)],'mime':_0x5ce5c7[_0x2a6f8b(0x1e2)],'runId':_0x2f8f3a,'imageIndex':_0x4beed9});}if(_0x4b0d8a[_0x2a6f8b(0x1d4)]>0x2f2+0x110f+-0x6ab*0x3){this[_0x2a6f8b(0x19d)][_0x2a6f8b(0x1d1)][_0x2a6f8b(0x1e4)](_0x2f8f3a,_0x4b0d8a);const _0xf21598=this[_0x2a6f8b(0x19d)][_0x2a6f8b(0x19b)][_0x2a6f8b(0x1a7)](_0x2f8f3a);if(_0xf21598!==undefined)clearTimeout(_0xf21598);const _0x4325cb=setTimeout(()=>{const _0x5718c4=_0x2a6f8b;this[_0x5718c4(0x19d)][_0x5718c4(0x19b)][_0x5718c4(0x1d3)](_0x2f8f3a),this[_0x5718c4(0x19d)][_0x5718c4(0x1d1)][_0x5718c4(0x1d3)](_0x2f8f3a);},NATIVE_IMAGE_INDEX_TTL_MS);_0x4325cb[_0x2a6f8b(0x1a3)](),this[_0x2a6f8b(0x19d)][_0x2a6f8b(0x19b)][_0x2a6f8b(0x1e4)](_0x2f8f3a,_0x4325cb);}return _0x3597b6;}[_0x5c326f(0x19f)](_0x2eec98){const _0x273cd5=_0x5c326f,_0x52c12e=resolve(_0x2eec98);for(const [_0x33986e,_0x38b245]of this[_0x273cd5(0x19d)][_0x273cd5(0x1b5)]){if(_0x38b245[_0x273cd5(0x1d7)]!==undefined&&_0x38b245[_0x273cd5(0x1d7)]<=Date[_0x273cd5(0x1e5)]()){this[_0x273cd5(0x1d6)](_0x33986e);continue;}const _0x2188a8=_0x38b245[_0x273cd5(0x1e8)][_0x273cd5(0x1e9)](_0x8e3c81=>_0x8e3c81!==undefined&&resolve(_0x8e3c81)===_0x52c12e);if(_0x2188a8<-0x1aad+0xb3b+0xf72)continue;const _0x35a4de=_0x38b245[_0x273cd5(0x19e)][_0x2188a8];if(_0x35a4de===undefined)continue;return{'name':_0x35a4de[_0x273cd5(0x1dd)],'mime':_0x35a4de[_0x273cd5(0x1e2)],'byteSize':Buffer[_0x273cd5(0x1b4)](_0x35a4de[_0x273cd5(0x1d2)],_0x273cd5(0x1c5)),'runId':_0x33986e,'imageIndex':_0x2188a8};}return undefined;}async[_0x5c326f(0x1a2)](_0x183eb5,_0x185b55){const _0x15c3b2=_0x5c326f,_0x63ca91=this[_0x15c3b2(0x19d)][_0x15c3b2(0x1d1)][_0x15c3b2(0x1a7)](_0x183eb5)?.[_0x185b55];if(_0x63ca91===undefined)return undefined;try{if(_0x63ca91[_0x15c3b2(0x1b8)]===_0x15c3b2(0x1cd)){const _0x18d3f1=await _0x63ca91[_0x15c3b2(0x1b2)]();if(_0x18d3f1===undefined||_0x18d3f1[_0x15c3b2(0x1dd)]!==_0x63ca91[_0x15c3b2(0x1dd)]||_0x18d3f1[_0x15c3b2(0x1e2)]!==_0x63ca91[_0x15c3b2(0x1e2)]||!canonicalBase64(_0x18d3f1[_0x15c3b2(0x1d2)]))return undefined;const _0x515f43=Buffer[_0x15c3b2(0x1b4)](_0x18d3f1[_0x15c3b2(0x1d2)],_0x15c3b2(0x1c5));if(_0x515f43<=-0x26e8+0x1806+0x5*0x2fa||_0x515f43>MAX_ATTACHMENT_BYTES||_0x63ca91[_0x15c3b2(0x1e3)]!==undefined&&_0x63ca91[_0x15c3b2(0x1e3)]!==_0x515f43)return undefined;return{'name':_0x63ca91[_0x15c3b2(0x1dd)],'mime':_0x63ca91[_0x15c3b2(0x1e2)],'dataBase64':_0x18d3f1[_0x15c3b2(0x1d2)]};}const [_0x703b48,_0x3bfdf6]=await Promise[_0x15c3b2(0x1a9)]([realpath(_0x63ca91[_0x15c3b2(0x1bd)]),realpath(_0x63ca91[_0x15c3b2(0x1d5)])]),_0xbe79d5=relative(_0x703b48,_0x3bfdf6);if(_0xbe79d5[_0x15c3b2(0x1d4)]===0x23f8+-0x1*-0x1693+0x85d*-0x7||_0xbe79d5[_0x15c3b2(0x1cb)]('..')||isAbsolute(_0xbe79d5))return undefined;const _0x110696=await lstat(_0x3bfdf6);if(!_0x110696[_0x15c3b2(0x1ce)]()||_0x110696[_0x15c3b2(0x1e1)]<=0x1805*0x1+0x1359+-0x1ab*0x1a||_0x110696[_0x15c3b2(0x1e1)]>MAX_ATTACHMENT_BYTES)return undefined;return{'name':_0x63ca91[_0x15c3b2(0x1dd)],'mime':_0x63ca91[_0x15c3b2(0x1e2)],'dataBase64':(await readFile(_0x3bfdf6))[_0x15c3b2(0x1c7)](_0x15c3b2(0x1c5))};}catch{return undefined;}}[_0x5c326f(0x1d0)](_0x3a4ab8){const _0x963a69=_0x5c326f,_0x3f5b39=this[_0x963a69(0x19d)][_0x963a69(0x1b5)][_0x963a69(0x1a7)](_0x3a4ab8);if(_0x3f5b39===undefined||_0x3f5b39[_0x963a69(0x1d7)]!==undefined)return;_0x3f5b39[_0x963a69(0x1d7)]=Date[_0x963a69(0x1e5)]()+IMAGE_CACHE_TTL_MS,_0x3f5b39[_0x963a69(0x1c3)]=setTimeout(()=>this[_0x963a69(0x1d6)](_0x3a4ab8),IMAGE_CACHE_TTL_MS);}[_0x5c326f(0x1d6)](_0x11ab91){const _0x271c8d=_0x5c326f,_0x5eafc8=this[_0x271c8d(0x19d)][_0x271c8d(0x1b5)][_0x271c8d(0x1a7)](_0x11ab91);if(_0x5eafc8?.[_0x271c8d(0x1c3)]!==undefined)clearTimeout(_0x5eafc8[_0x271c8d(0x1c3)]);this[_0x271c8d(0x19d)][_0x271c8d(0x1b5)][_0x271c8d(0x1d3)](_0x11ab91);}[_0x5c326f(0x1dc)](){const _0x561099=_0x5c326f;for(const _0x3baedb of new Set([...this[_0x561099(0x19d)][_0x561099(0x1ad)][_0x561099(0x1b7)](),...this[_0x561099(0x19d)][_0x561099(0x1b0)][_0x561099(0x1b7)]()]))this[_0x561099(0x1ca)](_0x3baedb);for(const _0x3feb41 of this[_0x561099(0x19d)][_0x561099(0x1b5)][_0x561099(0x1b7)]())this[_0x561099(0x1d6)](_0x3feb41);for(const _0x44531b of this[_0x561099(0x19d)][_0x561099(0x19b)][_0x561099(0x1bf)]())clearTimeout(_0x44531b);this[_0x561099(0x19d)][_0x561099(0x19b)][_0x561099(0x1d6)](),this[_0x561099(0x19d)][_0x561099(0x1d1)][_0x561099(0x1d6)]();}}function canonicalBase64(_0x5951ff){const _0x252619=_0x5c326f;if(_0x5951ff[_0x252619(0x1d4)]===0xafd+0x3f*0x3d+0x1*-0x1a00)return![];const _0x52f882=Buffer[_0x252619(0x1be)](_0x5951ff,_0x252619(0x1c5));return _0x52f882[_0x252619(0x1d4)]>-0x2049+0x1ad4+-0xb*-0x7f&&_0x52f882[_0x252619(0x1c7)](_0x252619(0x1c5))===_0x5951ff;}function isComposerTemporaryImagePath(_0x4d1d8f){const _0x23c4c9=_0x5c326f,_0x24c545=dirname(resolve(_0x4d1d8f));return basename(_0x24c545)[_0x23c4c9(0x1cb)](_0x23c4c9(0x1d8))&&resolve(dirname(_0x24c545))===resolve(tmpdir());}function _0x24dc(){const _0x3529cf=['mZCXnhbjEuPeAq','zxHWAxjL','BMf0AxzLsgLZDg9YEuLTywDLCW','zgf0yujHC2u2na','zgvSzxrL','BgvUz3rO','Cgf0Aa','y2XLyxi','zxHWAxjLC0f0','BxLHz2vUDhjVyw0Tyxr0ywnOBwvUDc0','AxntEw1IB2XPy0XPBMS','BMf0AxzLlwHPC3rVCNK6','ChvZAa','zgLZCg9Zzq','BMfTzq','BwfW','Bg9JywXqyxrO','BMf0AxzLsw1Hz2vsB290CW','C2L6zq','BwLTzq','yNL0zvnPEMu','C2v0','BM93','y2f0y2G','lM1HCG','Bg9JywXqyxrOCW','zMLUzeLUzgv4','Bg9JywXjBwfNzq','nda4nZm0n2D3D0vvza','CMvWBgfJzq','CMvNAxn0zxjoyxrPDMu','BMf0AxzLsgLZDg9YEuLTywDLvgLTzxjZ','C2XPy2u','C3rHDgu','Aw1Hz2vZ','y2fJAgvKqxr0ywnOBwvUDej5ugf0Aa','ANbN','zMLUza','CMvHze5HDgL2zq','Dw5Yzwy','mZK5nJr0tu1RtfK','y2fJAgu','AxneAxjLy3rVCNK','z2v0','Aw1Hz2uV','ywXS','oda4nZC2B2jpuLvz','yxbWzw5K','CgvYC2LZDezPBgvZ','CNvUrgLYzwn0B3jPzxm','mJvcsfzHufO','C3rYAw5N','CNvUrMLSzurPCMvJDg9YAwvZ','ANbLzW','CMvHza','Bw92zq','yNL0zuXLBMD0Aa','CNvUsw1Hz2vZ','lM1HCI90zw1WlwzPBgvZlW','A2v5CW','A2LUza','tuvtu0fhrv9bvfrbq0Hnru5ux0rjuKvdve9swv9jtLzbteLe','zMLSzq','CMvNAxn0zxjoyxrPDMvjBwfNzxm','DgvTCc1MAwXLCW','CM9VDa','zNjVBq','DMfSDwvZ','nfrcEhD0rG','C291CMnLswq','nZiXmZqXnLnVu3fdCG','DgLTzxi','mJqZnda5mNrlu0zTqG','yMfZzty0','mJCWotK2nvDOCuHOuG','Dg9tDhjPBMC','odG2ou16yurvDa','ndbxEuLYA1e','y2XLyw51Ca','C3rHCNrZv2L0Aa','Bwf0zxjPywXPEMvdB2rLEa','CMvHzgvY','AxngAwXL'];_0x24dc=function(){return _0x3529cf;};return _0x24dc();}
|
|
2
|
+
const _0x56f099=_0x4740;(function(_0x563e2a,_0x24a896){const _0x30b364=_0x4740,_0x25217d=_0x563e2a();while(!![]){try{const _0x107396=parseInt(_0x30b364(0x1e1))/(-0x1cb*-0x11+0x1*0x623+-0x249d)+parseInt(_0x30b364(0x1d0))/(-0x1d97+-0x1150*0x1+-0x3*-0xfa3)*(-parseInt(_0x30b364(0x1e7))/(0x14bd*0x1+0x1613*0x1+-0x2acd*0x1))+parseInt(_0x30b364(0x1d1))/(0x238c+0x1a46+-0x1b*0x24a)*(parseInt(_0x30b364(0x1d6))/(0x9ac*-0x2+-0x112d+0x248a))+-parseInt(_0x30b364(0x206))/(0xeb2+0x80b+0x5*-0x48b)*(-parseInt(_0x30b364(0x1ea))/(0x739*-0x2+-0x1dff*-0x1+-0xf86))+parseInt(_0x30b364(0x1f7))/(-0x21d1+-0x1b0f+0x3ce8)+-parseInt(_0x30b364(0x1cc))/(0x2173+-0x290*0xe+0x276)+parseInt(_0x30b364(0x1f2))/(0xf2*-0x16+-0x3f*0x37+0x225f);if(_0x107396===_0x24a896)break;else _0x25217d['push'](_0x25217d['shift']());}catch(_0x4b9786){_0x25217d['push'](_0x25217d['shift']());}}}(_0x3200,0x7*0xc21a+0x449*0x83+-0x9948*0x6));function _0x4740(_0x3d04a9,_0x29fdde){_0x3d04a9=_0x3d04a9-(0xe*-0x16+-0xb62*0x2+-0xd*-0x1fb);const _0x554eac=_0x3200();let _0x127407=_0x554eac[_0x3d04a9];if(_0x4740['YhjFOY']===undefined){var _0x4f7f62=function(_0x146726){const _0x11ef58='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x506122='',_0x1d12e7='';for(let _0x4af65=0x1d96+-0x2b*0x25+-0x175f,_0x44c101,_0x3706ec,_0x2c803d=0x1d30+0x1*-0x20b9+0xb5*0x5;_0x3706ec=_0x146726['charAt'](_0x2c803d++);~_0x3706ec&&(_0x44c101=_0x4af65%(0x256c+0x565+-0x2acd*0x1)?_0x44c101*(-0xc81*0x3+0x14d+0x2476)+_0x3706ec:_0x3706ec,_0x4af65++%(0x444+0xe9a*0x1+0xfe*-0x13))?_0x506122+=String['fromCharCode'](0x1815+0xe9c+-0x5*0x78a&_0x44c101>>(-(-0xaba+-0x211c+-0xaf6*-0x4)*_0x4af65&-0x513+-0x529+0xa42)):0x569*0x1+0x1348+0x15*-0x12d){_0x3706ec=_0x11ef58['indexOf'](_0x3706ec);}for(let _0x3fec6b=0x10*-0x25b+-0x6ef*0x1+0x2c9f,_0xfb3298=_0x506122['length'];_0x3fec6b<_0xfb3298;_0x3fec6b++){_0x1d12e7+='%'+('00'+_0x506122['charCodeAt'](_0x3fec6b)['toString'](-0x59d*0x5+-0x1ee8+0x11*0x379))['slice'](-(-0xd8+-0x11*0x5b+0x6e5));}return decodeURIComponent(_0x1d12e7);};_0x4740['BEWCnh']=_0x4f7f62,_0x4740['yGhedf']={},_0x4740['YhjFOY']=!![];}const _0x3854b1=_0x554eac[0x2d*-0x15+-0xb37+0xee8];_0x4740['rrUINT']!==_0x3854b1&&(_0x4740['yGhedf']={},_0x4740['rrUINT']=_0x3854b1);const _0x3af4c9=_0x4740['yGhedf'][_0x3d04a9];return _0x3af4c9===undefined?(_0x127407=_0x4740['BEWCnh'](_0x127407),_0x4740['yGhedf'][_0x3d04a9]=_0x127407):_0x127407=_0x3af4c9,_0x127407;}import{tmpdir}from'node:os';function _0x3200(){const _0xd83de4=['C291CMnLswq','zMLUzeLUzgv4','zgLZCg9Zzq','y2f0y2G','BMf0AxzLsw1Hz2vsB290CW','mJK3ntuWEgfZzujI','BM93','ANbN','BMf0AxzLlwHPC3rVCNK6','DMfSDwvZ','mJuZotq2nfLfweHeAG','CMvNAxn0zxjoyxrPDMu','Dw5Yzwy','BxLHz2vUDhjVyw0Tyxr0ywnOBwvUDc0','BMf0AxzLsgLZDg9YEuLTywDLCW','CNvUsw1Hz2vZ','BMfTzq','yMfZzty0','yxbWzw5K','BMf0AxzLsgLZDg9YEuLTywDLvgLTzxjZ','Bg9JywXqyxrO','CgvYC2LZDezPBgvZ','y2fJAgvKqxr0ywnOBwvUDej5ugf0Aa','zgf0yujHC2u2na','zgvSzxrL','mtGZodq2uuPfEwHc','Bw92zq','tuvtu0fhrv9bvfrbq0Hnru5ux0rjuKvdve9swv9jtLzbteLe','CMvWBgfJzq','CMvNAxn0zxjoyxrPDMvjBwfNzxm','Aw1Hz2vZ','AxngAwXL','ywXS','A2v5CW','BwLTzq','zNjVBq','ANbLzW','C3rYAw5N','AxneAxjLy3rVCNK','CM9VDa','C3rHDgu','CMv1C2vdywnOzwrsDw5jBwfNzxm','zMLSzq','y2XLyw51Ca','C2L6zq','yNL0zvnPEMu','y2fJAgu','CMvHzgvY','CNvUrgLYzwn0B3jPzxm','BwfW','mZq2odiZmun4AeHQrq','yNL0zuXLBMD0Aa','lM1HCI90zw1WlwzPBgvZlW','AxntEw1IB2XPy0XPBMS','mJzTy3v4r2i','neH2Agz3wa','ChvZAa','DgvTCc1MAwXLCW','C3rHCNrZv2L0Aa','Bg9JywXjBwfNzq','mZeYodGWrhHlB0jQ','CMvHze5HDgL2zq','Aw1Hz2uV','Bwf0zxjPywXPEMvdB2rLEa','A2LUza','C2XPy2u','z2v0','zxHWAxjL','y2XLyxi','zxHWAxjLC0f0','CMvHza','mZK3mZy0r2rQswTq','Dg9tDhjPBMC','zMLUza','Bg9JywXqyxrOCW','DgLTzxi','lM1HCG','nduZmdnOtM1Jr2K','BgvUz3rO','Cgf0Aa','n1flv1fkqq','C2v0','CNvUrMLSzurPCMvJDg9YAwvZ'];_0x3200=function(){return _0xd83de4;};return _0x3200();}import{basename,dirname,isAbsolute,join,relative,resolve}from'node:path';import{lstat,mkdir,mkdtemp,readFile,realpath,rm,writeFile}from'node:fs/promises';import{AttachmentDomainState}from'./attachment-domain-state.js';const MAX_ATTACHMENT_BYTES=(-0xcff+0x18e5+-0xbe1*0x1)*(0x232b*-0x1+0x8b1*0x1+-0x2*-0xf3d)*(-0x197e+0xcdb+0x10a3*0x1),IMAGE_CACHE_TTL_MS=(-0x21e6+0x1d*-0xa3+0x3499)*(0x7d5*0x12+0x19*0x11d9+-0x160cb),NATIVE_IMAGE_INDEX_TTL_MS=(-0x63a+0xb27+-0x4b1)*(-0x1050d*0x1+-0x13b9e+0x32b0b);export class RunAttachmentService{[_0x56f099(0x1f1)];[_0x56f099(0x215)]=new AttachmentDomainState();constructor(_0x4c6d07){const _0x1ae8bf=_0x56f099;this[_0x1ae8bf(0x1f1)]=_0x4c6d07;}async[_0x56f099(0x1d9)](_0x4833d3,_0x440b37){const _0x256d89=_0x56f099;if(_0x440b37[_0x256d89(0x1e8)]===-0x129b+0x3*-0xb99+0x3566*0x1)return[];const _0x49ec05=await mkdtemp(join(tmpdir(),_0x256d89(0x1fa)));this[_0x256d89(0x215)][_0x256d89(0x1ca)][_0x256d89(0x1eb)](_0x4833d3,_0x49ec05);try{const _0x525fa3=await Promise[_0x256d89(0x20d)](_0x440b37[_0x256d89(0x1cb)](async(_0x947a30,_0x491d76)=>{const _0x1aa0a=_0x256d89,_0x22e73a=_0x947a30[_0x1aa0a(0x20f)][_0x1aa0a(0x1db)](_0x1aa0a(0x1d8)[_0x1aa0a(0x1e8)])[_0x1aa0a(0x209)](_0x1aa0a(0x211),_0x1aa0a(0x1f4)),_0x4420e1=join(_0x49ec05,_0x491d76+(-0xf9c*0x2+0x5a1+0x18*0x111)+'.'+_0x22e73a);return await writeFile(_0x4420e1,Buffer[_0x1aa0a(0x210)](_0x947a30[_0x1aa0a(0x204)],_0x1aa0a(0x1fe)),{'mode':0x180}),{'type':_0x1aa0a(0x1d5),'path':_0x4420e1};})),_0x5c5b00=this[_0x256d89(0x215)][_0x256d89(0x1fc)][_0x256d89(0x1dc)](_0x4833d3);if(_0x5c5b00!==undefined)_0x5c5b00[_0x256d89(0x1e4)]=_0x525fa3[_0x256d89(0x1cb)](_0x221120=>_0x221120[_0x256d89(0x1e9)]);return _0x525fa3;}catch(_0x24e27b){this[_0x256d89(0x218)](_0x4833d3);throw _0x24e27b;}}async[_0x56f099(0x202)](_0x236259,_0x15e37c,_0x3e669f){const _0x290c3f=_0x56f099;if(_0x3e669f[_0x290c3f(0x1e8)]===0x26ce+-0x2632+-0x9c)return[];const _0x51a858=resolve(_0x236259,_0x290c3f(0x1e6));await mkdir(_0x51a858,{'recursive':!![],'mode':0x1c0});const _0x530e97=await lstat(_0x51a858);if(!_0x530e97[_0x290c3f(0x213)]()||_0x530e97[_0x290c3f(0x1cf)]())throw new Error(_0x290c3f(0x208));const _0x3c50e3=join(_0x51a858,_0x290c3f(0x1d3));await mkdir(_0x3c50e3,{'recursive':!![],'mode':0x1c0});const _0x2acdd3=await lstat(_0x3c50e3);if(!_0x2acdd3[_0x290c3f(0x213)]()||_0x2acdd3[_0x290c3f(0x1cf)]())throw new Error(_0x290c3f(0x208));const _0x41fe17=join(_0x3c50e3,_0x15e37c);await mkdir(_0x41fe17,{'mode':0x1c0}),this[_0x290c3f(0x215)][_0x290c3f(0x1ec)][_0x290c3f(0x1eb)](_0x15e37c,_0x41fe17);try{return await Promise[_0x290c3f(0x20d)](_0x3e669f[_0x290c3f(0x1cb)](_0x360429=>writeFile(join(_0x41fe17,_0x360429[_0x290c3f(0x1fd)]),Buffer[_0x290c3f(0x210)](_0x360429[_0x290c3f(0x204)],_0x290c3f(0x1fe)),{'flag':'wx','mode':0x180}))),_0x3e669f[_0x290c3f(0x1cb)](_0x3f21fb=>_0x290c3f(0x1ce)+_0x15e37c+'/'+_0x3f21fb[_0x290c3f(0x1fd)]);}catch(_0x7eb8e7){this[_0x290c3f(0x215)][_0x290c3f(0x1ec)][_0x290c3f(0x205)](_0x15e37c),await rm(_0x41fe17,{'recursive':!![],'force':!![]});throw _0x7eb8e7;}}[_0x56f099(0x218)](_0x44c6b1){const _0x590930=_0x56f099,_0x6d795=this[_0x590930(0x215)][_0x590930(0x1ca)][_0x590930(0x1dc)](_0x44c6b1);_0x6d795!==undefined&&(this[_0x590930(0x215)][_0x590930(0x1ca)][_0x590930(0x205)](_0x44c6b1),void rm(_0x6d795,{'recursive':!![],'force':!![]})[_0x590930(0x1f0)](()=>undefined));const _0x1fe95a=this[_0x590930(0x215)][_0x590930(0x1ec)][_0x590930(0x1dc)](_0x44c6b1);_0x1fe95a!==undefined&&(this[_0x590930(0x215)][_0x590930(0x1ec)][_0x590930(0x205)](_0x44c6b1),void rm(_0x1fe95a,{'recursive':!![],'force':!![]})[_0x590930(0x1f0)](()=>undefined));}[_0x56f099(0x1c8)](_0x3c9ff4,_0x526aba){const _0x3bb72c=_0x56f099;if(_0x526aba[_0x3bb72c(0x1e8)]===0x1e21+0x1*-0x1d21+-0x100)return;this[_0x3bb72c(0x1de)](_0x3c9ff4),this[_0x3bb72c(0x215)][_0x3bb72c(0x1fc)][_0x3bb72c(0x1eb)](_0x3c9ff4,{'images':_0x526aba,'localPaths':_0x526aba[_0x3bb72c(0x1cb)](()=>undefined),'expiresAt':undefined,'timer':undefined});}[_0x56f099(0x207)](_0xe7f345,_0x4bd229){const _0x4dd812=_0x56f099,_0x3a3052=this[_0x4dd812(0x215)][_0x4dd812(0x1fc)][_0x4dd812(0x1dc)](_0xe7f345);_0x3a3052!==undefined&&(this[_0x4dd812(0x215)][_0x4dd812(0x1fc)][_0x4dd812(0x205)](_0xe7f345),this[_0x4dd812(0x215)][_0x4dd812(0x1fc)][_0x4dd812(0x1eb)](_0x4bd229,_0x3a3052));const _0x554c7c=this[_0x4dd812(0x215)][_0x4dd812(0x1ca)][_0x4dd812(0x1dc)](_0xe7f345);_0x554c7c!==undefined&&(this[_0x4dd812(0x215)][_0x4dd812(0x1ca)][_0x4dd812(0x205)](_0xe7f345),this[_0x4dd812(0x215)][_0x4dd812(0x1ca)][_0x4dd812(0x1eb)](_0x4bd229,_0x554c7c));const _0x22c92a=this[_0x4dd812(0x215)][_0x4dd812(0x1ec)][_0x4dd812(0x1dc)](_0xe7f345);_0x22c92a!==undefined&&(this[_0x4dd812(0x215)][_0x4dd812(0x1ec)][_0x4dd812(0x205)](_0xe7f345),this[_0x4dd812(0x215)][_0x4dd812(0x1ec)][_0x4dd812(0x1eb)](_0x4bd229,_0x22c92a));}[_0x56f099(0x1ff)](_0x643ed2,_0xbe0fd8){const _0x35cd48=_0x56f099;if(_0xbe0fd8[_0x35cd48(0x1e8)]===-0x11*0x5b+-0x1232+0x183d)return[];const _0x5860f5=this[_0x35cd48(0x215)][_0x35cd48(0x1fc)][_0x35cd48(0x1dc)](_0x643ed2),_0x1d6856=_0x5860f5?.[_0x35cd48(0x20b)]??[],_0x513b4d=_0x1d6856[_0x35cd48(0x1e8)],_0x21316a=[..._0x1d6856,..._0xbe0fd8];if(_0x5860f5===undefined)this[_0x35cd48(0x215)][_0x35cd48(0x1fc)][_0x35cd48(0x1eb)](_0x643ed2,{'images':_0x21316a,'localPaths':_0xbe0fd8[_0x35cd48(0x1cb)](()=>undefined),'expiresAt':undefined,'timer':undefined});else _0x5860f5[_0x35cd48(0x20b)]=_0x21316a,_0x5860f5[_0x35cd48(0x1e4)]=[..._0x5860f5[_0x35cd48(0x1e4)],..._0xbe0fd8[_0x35cd48(0x1cb)](()=>undefined)];return _0xbe0fd8[_0x35cd48(0x1cb)]((_0x2546c7,_0x1c4364)=>({'name':_0x2546c7[_0x35cd48(0x1fd)],'mime':_0x2546c7[_0x35cd48(0x20f)],'byteSize':Buffer[_0x35cd48(0x1cd)](_0x2546c7[_0x35cd48(0x204)],_0x35cd48(0x1fe)),'runId':_0x643ed2,'imageIndex':_0x513b4d+_0x1c4364}));}[_0x56f099(0x1e0)](_0x134c3c,_0x256002){const _0x12387c=_0x56f099,_0x508839=this[_0x12387c(0x215)][_0x12387c(0x1fc)][_0x12387c(0x1dc)](_0x134c3c);if(_0x508839===undefined)return undefined;if(_0x508839[_0x12387c(0x1df)]!==undefined&&_0x508839[_0x12387c(0x1df)]<=Date[_0x12387c(0x1f3)]())return this[_0x12387c(0x1de)](_0x134c3c),undefined;return _0x508839[_0x12387c(0x20b)][_0x256002];}[_0x56f099(0x1f8)](_0x4673e9,_0x3cdb81){const _0x3b9621=_0x56f099;return this[_0x3b9621(0x20a)](_0x3b9621(0x1f5)+_0x4673e9['id'],this[_0x3b9621(0x1f1)](_0x4673e9),_0x3cdb81);}[_0x56f099(0x20a)](_0x1ef92d,_0x176a3c,_0x4453d3,_0x9ddc94={}){const _0x24b521=_0x56f099,_0x25f57c=_0x176a3c[_0x24b521(0x1cb)](_0x5de70c=>resolve(_0x5de70c)),_0xbf014b=this[_0x24b521(0x215)][_0x24b521(0x1fb)][_0x24b521(0x1dc)](_0x1ef92d)??[],_0xd26c0e=[];for(const _0x435945 of _0x4453d3){const _0x2901e2=_0x9ddc94[_0x24b521(0x216)]===![]||_0x435945[_0x24b521(0x201)]===undefined?undefined:this[_0x24b521(0x203)](_0x435945[_0x24b521(0x201)]);if(_0x2901e2!==undefined){_0xd26c0e[_0x24b521(0x1d2)](_0x2901e2);continue;}if(_0x435945[_0x24b521(0x1e0)]!==undefined){if(typeof _0x435945[_0x24b521(0x1ed)]!==_0x24b521(0x212)||_0x435945[_0x24b521(0x1ed)][_0x24b521(0x1e8)]===-0x9*0x13f+0x1edd+-0x1*0x13a6||!_0x435945[_0x24b521(0x20f)][_0x24b521(0x1d4)](_0x24b521(0x1d8))){_0xd26c0e[_0x24b521(0x1d2)]({'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)]});continue;}let _0x563258=_0xbf014b[_0x24b521(0x1ee)](_0x43f1c6=>_0x43f1c6[_0x24b521(0x1da)]===_0x24b521(0x1c9)&&_0x43f1c6[_0x24b521(0x1ed)]===_0x435945[_0x24b521(0x1ed)]);const _0x2fef7c={'kind':_0x24b521(0x1c9),'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)],..._0x435945[_0x24b521(0x1c7)]===undefined?{}:{'byteSize':_0x435945[_0x24b521(0x1c7)]},'sourceId':_0x435945[_0x24b521(0x1ed)],'read':_0x435945[_0x24b521(0x1e0)]};if(_0x563258<0x3*0xa46+-0x92*0x2a+-0x6de)_0x563258=_0xbf014b[_0x24b521(0x1e8)],_0xbf014b[_0x24b521(0x1d2)](_0x2fef7c);else _0xbf014b[_0x563258]=_0x2fef7c;_0xd26c0e[_0x24b521(0x1d2)]({'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)],..._0x435945[_0x24b521(0x1c7)]===undefined?{}:{'byteSize':_0x435945[_0x24b521(0x1c7)]},'runId':_0x1ef92d,'imageIndex':_0x563258});continue;}if(_0x435945[_0x24b521(0x201)]!==undefined&&isComposerTemporaryImagePath(_0x435945[_0x24b521(0x201)]))continue;if(_0x25f57c[_0x24b521(0x1e8)]===0x1ac9+0x4*-0x3d0+-0xb89)continue;if(_0x435945[_0x24b521(0x201)]===undefined||!_0x435945[_0x24b521(0x20f)][_0x24b521(0x1d4)](_0x24b521(0x1d8))){_0xd26c0e[_0x24b521(0x1d2)]({'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)]});continue;}const _0x4293d8=resolve(_0x435945[_0x24b521(0x201)]),_0xbea6c1=_0x25f57c[_0x24b521(0x1e3)](_0x163a0f=>{const _0x146d7b=_0x24b521,_0x1c466b=relative(_0x163a0f,_0x4293d8);return _0x1c466b[_0x146d7b(0x1e8)]>-0x3*-0x46f+-0x1a36+0xce9&&!_0x1c466b[_0x146d7b(0x1d4)]('..')&&!isAbsolute(_0x1c466b);});if(_0xbea6c1===undefined){_0xd26c0e[_0x24b521(0x1d2)]({'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)]});continue;}let _0xb25306=_0xbf014b[_0x24b521(0x1ee)](_0x3d1e4a=>_0x3d1e4a[_0x24b521(0x1da)]===_0x24b521(0x217)&&_0x3d1e4a[_0x24b521(0x1e9)]===_0x4293d8);_0xb25306<0xb24*-0x3+0xa81+0x16eb&&(_0xb25306=_0xbf014b[_0x24b521(0x1e8)],_0xbf014b[_0x24b521(0x1d2)]({'kind':_0x24b521(0x217),'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)],'path':_0x4293d8,'root':_0xbea6c1})),_0xd26c0e[_0x24b521(0x1d2)]({'name':_0x435945[_0x24b521(0x1fd)],'mime':_0x435945[_0x24b521(0x20f)],'runId':_0x1ef92d,'imageIndex':_0xb25306});}if(_0xbf014b[_0x24b521(0x1e8)]>0x3*0x964+-0x1*0xc9d+-0xf8f){this[_0x24b521(0x215)][_0x24b521(0x1fb)][_0x24b521(0x1eb)](_0x1ef92d,_0xbf014b);const _0x206545=this[_0x24b521(0x215)][_0x24b521(0x200)][_0x24b521(0x1dc)](_0x1ef92d);if(_0x206545!==undefined)clearTimeout(_0x206545);const _0x261804=setTimeout(()=>{const _0x398d86=_0x24b521;this[_0x398d86(0x215)][_0x398d86(0x200)][_0x398d86(0x205)](_0x1ef92d),this[_0x398d86(0x215)][_0x398d86(0x1fb)][_0x398d86(0x205)](_0x1ef92d);},NATIVE_IMAGE_INDEX_TTL_MS);_0x261804[_0x24b521(0x1f9)](),this[_0x24b521(0x215)][_0x24b521(0x200)][_0x24b521(0x1eb)](_0x1ef92d,_0x261804);}return _0xd26c0e;}[_0x56f099(0x203)](_0x108e0a){const _0x15e3cb=_0x56f099,_0x1528b2=resolve(_0x108e0a);for(const [_0x4eb71b,_0x46ee4f]of this[_0x15e3cb(0x215)][_0x15e3cb(0x1fc)]){if(_0x46ee4f[_0x15e3cb(0x1df)]!==undefined&&_0x46ee4f[_0x15e3cb(0x1df)]<=Date[_0x15e3cb(0x1f3)]()){this[_0x15e3cb(0x1de)](_0x4eb71b);continue;}const _0x573217=_0x46ee4f[_0x15e3cb(0x1e4)][_0x15e3cb(0x1ee)](_0x1a3d49=>_0x1a3d49!==undefined&&resolve(_0x1a3d49)===_0x1528b2);if(_0x573217<0x1*0x1120+0x1585+-0x26a5)continue;const _0x1c40b7=_0x46ee4f[_0x15e3cb(0x20b)][_0x573217];if(_0x1c40b7===undefined)continue;return{'name':_0x1c40b7[_0x15e3cb(0x1fd)],'mime':_0x1c40b7[_0x15e3cb(0x20f)],'byteSize':Buffer[_0x15e3cb(0x1cd)](_0x1c40b7[_0x15e3cb(0x204)],_0x15e3cb(0x1fe)),'runId':_0x4eb71b,'imageIndex':_0x573217};}return undefined;}async[_0x56f099(0x1d7)](_0x36151e,_0x14856d){const _0x41ffdc=_0x56f099,_0x5d9711=this[_0x41ffdc(0x215)][_0x41ffdc(0x1fb)][_0x41ffdc(0x1dc)](_0x36151e)?.[_0x14856d];if(_0x5d9711===undefined)return undefined;try{if(_0x5d9711[_0x41ffdc(0x1da)]===_0x41ffdc(0x1c9)){const _0x19ef20=await _0x5d9711[_0x41ffdc(0x1e0)]();if(_0x19ef20===undefined||_0x19ef20[_0x41ffdc(0x1fd)]!==_0x5d9711[_0x41ffdc(0x1fd)]||_0x19ef20[_0x41ffdc(0x20f)]!==_0x5d9711[_0x41ffdc(0x20f)]||!canonicalBase64(_0x19ef20[_0x41ffdc(0x204)]))return undefined;const _0x4d8a8c=Buffer[_0x41ffdc(0x1cd)](_0x19ef20[_0x41ffdc(0x204)],_0x41ffdc(0x1fe));if(_0x4d8a8c<=-0x1*0x590+-0x21fa+0x278a||_0x4d8a8c>MAX_ATTACHMENT_BYTES||_0x5d9711[_0x41ffdc(0x1c7)]!==undefined&&_0x5d9711[_0x41ffdc(0x1c7)]!==_0x4d8a8c)return undefined;return{'name':_0x5d9711[_0x41ffdc(0x1fd)],'mime':_0x5d9711[_0x41ffdc(0x20f)],'dataBase64':_0x19ef20[_0x41ffdc(0x204)]};}const [_0x43d909,_0x3b69c5]=await Promise[_0x41ffdc(0x20d)]([realpath(_0x5d9711[_0x41ffdc(0x214)]),realpath(_0x5d9711[_0x41ffdc(0x1e9)])]),_0x2bcdff=relative(_0x43d909,_0x3b69c5);if(_0x2bcdff[_0x41ffdc(0x1e8)]===0xbb3*-0x1+-0x1fa2+-0x1*-0x2b55||_0x2bcdff[_0x41ffdc(0x1d4)]('..')||isAbsolute(_0x2bcdff))return undefined;const _0x3654cc=await lstat(_0x3b69c5);if(!_0x3654cc[_0x41ffdc(0x20c)]()||_0x3654cc[_0x41ffdc(0x219)]<=0x143a+0xc50+-0xaa*0x31||_0x3654cc[_0x41ffdc(0x219)]>MAX_ATTACHMENT_BYTES)return undefined;return{'name':_0x5d9711[_0x41ffdc(0x1fd)],'mime':_0x5d9711[_0x41ffdc(0x20f)],'dataBase64':(await readFile(_0x3b69c5))[_0x41ffdc(0x1e2)](_0x41ffdc(0x1fe))};}catch{return undefined;}}[_0x56f099(0x1dd)](_0x1fc5c5){const _0xc5be1f=_0x56f099,_0x505ad9=this[_0xc5be1f(0x215)][_0xc5be1f(0x1fc)][_0xc5be1f(0x1dc)](_0x1fc5c5);if(_0x505ad9===undefined||_0x505ad9[_0xc5be1f(0x1df)]!==undefined)return;_0x505ad9[_0xc5be1f(0x1df)]=Date[_0xc5be1f(0x1f3)]()+IMAGE_CACHE_TTL_MS,_0x505ad9[_0xc5be1f(0x1e5)]=setTimeout(()=>this[_0xc5be1f(0x1de)](_0x1fc5c5),IMAGE_CACHE_TTL_MS);}[_0x56f099(0x1de)](_0x2d1150){const _0x175412=_0x56f099,_0x293521=this[_0x175412(0x215)][_0x175412(0x1fc)][_0x175412(0x1dc)](_0x2d1150);if(_0x293521?.[_0x175412(0x1e5)]!==undefined)clearTimeout(_0x293521[_0x175412(0x1e5)]);this[_0x175412(0x215)][_0x175412(0x1fc)][_0x175412(0x205)](_0x2d1150);}[_0x56f099(0x1ef)](){const _0x27e07c=_0x56f099;for(const _0x3c8cd5 of new Set([...this[_0x27e07c(0x215)][_0x27e07c(0x1ca)][_0x27e07c(0x20e)](),...this[_0x27e07c(0x215)][_0x27e07c(0x1ec)][_0x27e07c(0x20e)]()]))this[_0x27e07c(0x218)](_0x3c8cd5);for(const _0xb02aa4 of this[_0x27e07c(0x215)][_0x27e07c(0x1fc)][_0x27e07c(0x20e)]())this[_0x27e07c(0x1de)](_0xb02aa4);for(const _0xc68c33 of this[_0x27e07c(0x215)][_0x27e07c(0x200)][_0x27e07c(0x1f6)]())clearTimeout(_0xc68c33);this[_0x27e07c(0x215)][_0x27e07c(0x200)][_0x27e07c(0x1de)](),this[_0x27e07c(0x215)][_0x27e07c(0x1fb)][_0x27e07c(0x1de)]();}}function canonicalBase64(_0x63fc32){const _0x5752af=_0x56f099;if(_0x63fc32[_0x5752af(0x1e8)]===0x92b+0x1*0x1bd1+-0x24fc)return![];const _0x162270=Buffer[_0x5752af(0x210)](_0x63fc32,_0x5752af(0x1fe));return _0x162270[_0x5752af(0x1e8)]>-0xbaf+0x3*-0xc8d+-0x1072*-0x3&&_0x162270[_0x5752af(0x1e2)](_0x5752af(0x1fe))===_0x63fc32;}function isComposerTemporaryImagePath(_0x135dcf){const _0x55c526=_0x56f099,_0x63cf04=dirname(resolve(_0x135dcf));return basename(_0x63cf04)[_0x55c526(0x1d4)](_0x55c526(0x1fa))&&resolve(dirname(_0x63cf04))===resolve(tmpdir());}
|