@nuvin/agent-core 0.2.0-rc.11 → 0.2.0-rc.12

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.
@@ -1 +1 @@
1
- (function(_0x2d5f66,_0xdbe54b){var _0x5538b1={_0xd844d2:0x2f9,_0x52e5a4:0x2f7,_0x5cbddf:0x403,_0x2e6d6e:0x400,_0x5e1e30:0x3fa,_0x1081d7:0x2f2,_0x433ba4:0x2ef,_0x5ad187:0x2f7,_0x3740e4:0x3f9,_0x560869:0x3fe,_0x3df089:0x3fa,_0x2a0422:0x2f2,_0x17837a:0x2ef,_0x133428:0x3fa,_0x307668:0x3fc,_0x3e2add:0x2f3,_0x36be7d:0x2f2,_0x3d67a2:0x2f5,_0x1a95fc:0x3ff},_0xe9d1a9={_0x2377a2:0x114},_0x3700a6={_0x3b4f6b:0x21d};function _0x36041f(_0x474979,_0xf95f83,_0x4054f5,_0x1bff5f){return _0x322f(_0x4054f5-_0x3700a6._0x3b4f6b,_0xf95f83);}var _0x47adde=_0x2d5f66();function _0x2b069e(_0x52ebca,_0x15e5b3,_0x37468f,_0x36d9b7){return _0x322f(_0x15e5b3-_0xe9d1a9._0x2377a2,_0x52ebca);}while(!![]){try{var _0xeecbd8=-parseInt(_0x2b069e(0x2f3,_0x5538b1._0xd844d2,_0x5538b1._0x52e5a4,0x2f9))/0x1+-parseInt(_0x36041f(0x403,_0x5538b1._0x5cbddf,_0x5538b1._0x2e6d6e,_0x5538b1._0x5e1e30))/0x2+parseInt(_0x2b069e(0x2ef,_0x5538b1._0x1081d7,_0x5538b1._0x433ba4,_0x5538b1._0x5ad187))/0x3*(parseInt(_0x36041f(_0x5538b1._0x3740e4,_0x5538b1._0x560869,_0x5538b1._0x5e1e30,_0x5538b1._0x3df089))/0x4)+-parseInt(_0x2b069e(_0x5538b1._0x2a0422,_0x5538b1._0x17837a,0x2f2,_0x5538b1._0x1081d7))/0x5*(-parseInt(_0x36041f(_0x5538b1._0x133428,0x3fc,0x3f7,_0x5538b1._0x307668))/0x6)+parseInt(_0x2b069e(0x2ef,0x2f3,_0x5538b1._0x3e2add,_0x5538b1._0x36be7d))/0x7+-parseInt(_0x2b069e(_0x5538b1._0xd844d2,_0x5538b1._0x3d67a2,0x2f6,0x2f9))/0x8+parseInt(_0x36041f(0x3f9,0x3fd,_0x5538b1._0x1a95fc,_0x5538b1._0x2e6d6e))/0x9;if(_0xeecbd8===_0xdbe54b)break;else _0x47adde['push'](_0x47adde['shift']());}catch(_0x48ff66){_0x47adde['push'](_0x47adde['shift']());}}}(_0x3944,0x2b83c));function resolveAnthropicReasoningConfig(_0x1eecb5){var _0x589ac9={_0x427503:0x39,_0x1d7a7b:0x35,_0x20eb7b:0x37,_0x4390d8:0x3a},_0x5b2030={_0x276f46:0x196};function _0x107035(_0x13d18d,_0x229867,_0x394dbb,_0xfc434f){return _0x322f(_0x13d18d- -_0x5b2030._0x276f46,_0xfc434f);}function _0x494f94(_0x29258d,_0x464444,_0x4319ea,_0x44ccd8){return _0x322f(_0x4319ea- -0x213,_0x44ccd8);}return _0x1eecb5?.[_0x494f94(-_0x589ac9._0x427503,-0x33,-0x37,-0x31)]?structuredClone(_0x1eecb5[_0x494f94(-_0x589ac9._0x1d7a7b,-0x39,-_0x589ac9._0x20eb7b,-_0x589ac9._0x4390d8)]):void 0x0;}function resolveOpenAiReasoningConfig(_0x3c6373){var _0x2243ca={_0x366bac:0x3b,_0x5446fb:0x44,_0x1d316c:0x3c,_0x25ad94:0x40,_0x29a2af:0x64,_0x2033e4:0x6e},_0x1a21d7={_0x4db477:0x224};function _0x2b515d(_0x3534e1,_0x45a1b0,_0x267ead,_0x249ef8){return _0x322f(_0x267ead- -0x248,_0x3534e1);}if(_0x3c6373?.[_0xae9d0c(-_0x2243ca._0x366bac,-0x3b,-0x40,-_0x2243ca._0x5446fb)])return structuredClone(_0x3c6373[_0xae9d0c(-0x3f,-_0x2243ca._0x1d316c,-_0x2243ca._0x25ad94,-_0x2243ca._0x25ad94)]);function _0xae9d0c(_0x3266a8,_0x506317,_0x33adcf,_0x52ba3f){return _0x322f(_0x33adcf- -_0x1a21d7._0x4db477,_0x52ba3f);}return _0x3c6373?.[_0x2b515d(-0x64,-0x69,-0x68,-0x68)]?structuredClone(_0x3c6373[_0x2b515d(-_0x2243ca._0x29a2af,-_0x2243ca._0x2033e4,-0x68,-0x66)]):void 0x0;}export{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig};function _0x322f(_0x49493d,_0x1d4ab2){_0x49493d=_0x49493d-0x1da;var _0x3944d2=_0x3944();var _0x322fd8=_0x3944d2[_0x49493d];if(_0x322f['cErRgs']===undefined){var _0x46361c=function(_0x5daa9c){var _0x276159='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x1eecb5='',_0x3c6373='';for(var _0x84c886=0x0,_0x9793f0,_0x498693,_0x473fb1=0x0;_0x498693=_0x5daa9c['charAt'](_0x473fb1++);~_0x498693&&(_0x9793f0=_0x84c886%0x4?_0x9793f0*0x40+_0x498693:_0x498693,_0x84c886++%0x4)?_0x1eecb5+=String['fromCharCode'](0xff&_0x9793f0>>(-0x2*_0x84c886&0x6)):0x0){_0x498693=_0x276159['indexOf'](_0x498693);}for(var _0x598132=0x0,_0x37a632=_0x1eecb5['length'];_0x598132<_0x37a632;_0x598132++){_0x3c6373+='%'+('00'+_0x1eecb5['charCodeAt'](_0x598132)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3c6373);};_0x322f['aWCRyg']=_0x46361c,_0x322f['wecbwN']={},_0x322f['cErRgs']=!![];}var _0xc3b0c0=_0x3944d2[0x0],_0x6e931f=_0x49493d+_0xc3b0c0,_0x1e6eb4=_0x322f['wecbwN'][_0x6e931f];return!_0x1e6eb4?(_0x322fd8=_0x322f['aWCRyg'](_0x322fd8),_0x322f['wecbwN'][_0x6e931f]=_0x322fd8):_0x322fd8=_0x1e6eb4,_0x322fd8;}function _0x3944(){var _0x1e77b2=['mJGYnZqXm0vfvhDtrq','nJq0mZC0u29KswDM','y29KzxG','mJG1nZe0DhDmC25U','mJm0ndGWCxD0DLPg','ndbIq2DQy0y','yw50AhjVCgLJ','oty1mMTQu0vnAq','mJe5vLzLr1fA','nde2nJi2tMX5AejT','B3bLBMfP','nJeWnJe2CNLQD2DV'];_0x3944=function(){return _0x1e77b2;};return _0x3944();}
1
+ (function(_0xc60831,_0xd2af0e){var _0x4a2b28={_0x752bc4:0x498,_0x360fca:0x4a4,_0x33afa2:0x49d,_0x50f212:0x49d,_0x5b6e48:0x49c,_0x12fa33:0x49b,_0x1921a4:0x395,_0x2a1719:0x39a,_0x2689cb:0x393,_0x56a15d:0x38e,_0x1d0c51:0x388,_0x1c094d:0x399,_0x4d879e:0x396,_0x3031c2:0x397,_0x540cb2:0x384,_0x33ecbe:0x38a,_0x3a637a:0x49a,_0x1e1e4f:0x49a,_0x516ea0:0x497,_0x14732f:0x39a,_0x2523b9:0x384,_0x39a1b3:0x389};function _0x35322d(_0x19e617,_0x130e24,_0x1bcac2,_0xe83c7f){return _0x4a6f(_0x130e24-0x2af,_0x19e617);}var _0x409a80=_0xc60831();function _0x1265ed(_0x3c1999,_0x14d88b,_0x6b47d9,_0x186be6){return _0x4a6f(_0x186be6-0x3bb,_0x6b47d9);}while(!![]){try{var _0x2f7961=-parseInt(_0x1265ed(0x49a,0x49f,_0x4a2b28._0x752bc4,0x498))/0x1*(parseInt(_0x1265ed(_0x4a2b28._0x360fca,_0x4a2b28._0x33afa2,0x498,_0x4a2b28._0x33afa2))/0x2)+parseInt(_0x1265ed(0x4a2,_0x4a2b28._0x50f212,_0x4a2b28._0x5b6e48,0x49e))/0x3*(-parseInt(_0x1265ed(0x49b,_0x4a2b28._0x12fa33,0x499,0x497))/0x4)+-parseInt(_0x35322d(0x391,_0x4a2b28._0x1921a4,_0x4a2b28._0x2a1719,_0x4a2b28._0x2689cb))/0x5*(-parseInt(_0x35322d(_0x4a2b28._0x56a15d,_0x4a2b28._0x1d0c51,0x390,0x38b))/0x6)+parseInt(_0x35322d(_0x4a2b28._0x1c094d,_0x4a2b28._0x4d879e,_0x4a2b28._0x3031c2,_0x4a2b28._0x2a1719))/0x7*(-parseInt(_0x35322d(_0x4a2b28._0x540cb2,_0x4a2b28._0x33ecbe,0x386,0x383))/0x8)+parseInt(_0x1265ed(_0x4a2b28._0x3a637a,0x499,0x49d,_0x4a2b28._0x1e1e4f))/0x9*(parseInt(_0x1265ed(0x4a0,_0x4a2b28._0x516ea0,0x493,0x499))/0xa)+-parseInt(_0x35322d(0x398,0x394,_0x4a2b28._0x14732f,0x39a))/0xb+parseInt(_0x35322d(_0x4a2b28._0x2523b9,_0x4a2b28._0x39a1b3,0x382,0x387))/0xc;if(_0x2f7961===_0xd2af0e)break;else _0x409a80['push'](_0x409a80['shift']());}catch(_0x2c30c5){_0x409a80['push'](_0x409a80['shift']());}}}(_0x3642,0x1d41e));function resolveAnthropicReasoningConfig(_0x204667){var _0x3be1de={_0x4d7721:0x10d,_0x27ac24:0x106};function _0x4b7224(_0x49872e,_0x3ea0bf,_0x1ad587,_0x112eac){return _0x4a6f(_0x1ad587- -0x1e6,_0x112eac);}return _0x204667?.[_0x4b7224(-_0x3be1de._0x4d7721,-0x109,-_0x3be1de._0x27ac24,-0x105)]?structuredClone(_0x204667['anthropic']):void 0x0;}function resolveOpenAiReasoningConfig(_0x1ea9ad){var _0x42a5d9={_0x5b1875:0xa0,_0x18a02d:0xa8,_0x438639:0xa1,_0x251dee:0x159,_0x3a4375:0x160,_0x1597ee:0x9e,_0x521bb4:0xa4,_0x2dfb52:0xa4},_0x2eec88={_0x5f4fa9:0x40},_0x2b53ff={_0x55de01:0x7f};function _0x173917(_0x48a4fb,_0x284d54,_0x552ea3,_0x6b43bc){return _0x4a6f(_0x284d54-_0x2b53ff._0x55de01,_0x48a4fb);}if(_0x1ea9ad?.[_0x23f055(_0x42a5d9._0x5b1875,0x9b,_0x42a5d9._0x18a02d,_0x42a5d9._0x438639)])return structuredClone(_0x1ea9ad[_0x173917(_0x42a5d9._0x251dee,_0x42a5d9._0x3a4375,0x160,0x165)]);function _0x23f055(_0x253cc6,_0x420113,_0x20564f,_0x2bca26){return _0x4a6f(_0x2bca26- -_0x2eec88._0x5f4fa9,_0x20564f);}return _0x1ea9ad?.[_0x23f055(0xa2,_0x42a5d9._0x1597ee,_0x42a5d9._0x521bb4,_0x42a5d9._0x2dfb52)]?structuredClone(_0x1ea9ad['openai']):void 0x0;}export{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig};function _0x4a6f(_0x4088e4,_0x3175f1){_0x4088e4=_0x4088e4-0xd9;var _0x3642bd=_0x3642();var _0x4a6fc5=_0x3642bd[_0x4088e4];if(_0x4a6f['LWTNVc']===undefined){var _0x40bdf7=function(_0x9088fd){var _0x2508f1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x204667='',_0x1ea9ad='';for(var _0x21c885=0x0,_0x20fd45,_0xfd87e7,_0x560ba6=0x0;_0xfd87e7=_0x9088fd['charAt'](_0x560ba6++);~_0xfd87e7&&(_0x20fd45=_0x21c885%0x4?_0x20fd45*0x40+_0xfd87e7:_0xfd87e7,_0x21c885++%0x4)?_0x204667+=String['fromCharCode'](0xff&_0x20fd45>>(-0x2*_0x21c885&0x6)):0x0){_0xfd87e7=_0x2508f1['indexOf'](_0xfd87e7);}for(var _0x3ef801=0x0,_0x533f52=_0x204667['length'];_0x3ef801<_0x533f52;_0x3ef801++){_0x1ea9ad+='%'+('00'+_0x204667['charCodeAt'](_0x3ef801)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1ea9ad);};_0x4a6f['ZEtDKp']=_0x40bdf7,_0x4a6f['PKQBwy']={},_0x4a6f['LWTNVc']=!![];}var _0x312960=_0x3642bd[0x0],_0x2e942e=_0x4088e4+_0x312960,_0x3617b4=_0x4a6f['PKQBwy'][_0x2e942e];return!_0x3617b4?(_0x4a6fc5=_0x4a6f['ZEtDKp'](_0x4a6fc5),_0x4a6f['PKQBwy'][_0x2e942e]=_0x4a6fc5):_0x4a6fc5=_0x3617b4,_0x4a6fc5;}function _0x3642(){var _0x3cae47=['mZHHre5wrfC','mtvXDLPltxq','B3bLBMfP','mtu5mtC2nNr3CeDrBa','mtiWDNDlA3fA','mtuZotu4n2fOz01eAW','ndGYmdrbBMPAreq','nde2mJu2mfHSuMPHCq','oeLItNP3tW','mti4mdu2qKLhuKfW','mZG4ovLTEMDlwq','mJG2meDpvvnxqG','ntyYnwfOy3PoDG','yw50AhjVCgLJ','y29KzxG'];_0x3642=function(){return _0x3cae47;};return _0x3642();}
@@ -1 +1 @@
1
- (function(_0x562b18,_0x440154){const _0x2f49bb={_0x1f6346:0xc0,_0x2ba537:0x99,_0x4540da:0x3bd,_0x3e73eb:0x391,_0x373045:0x375,_0x2888ff:0x3ac,_0x4f3367:0x3fe,_0x25c8de:0x3da,_0x3c2ca2:0xda,_0x3dd8fc:0xe9,_0x79186:0x117,_0x4d1dec:0x9e,_0x274804:0x3b2,_0xe993aa:0x3d4,_0x20f381:0x123,_0x3e9826:0xf7},_0x3dd7bf={_0x491e9a:0x1c9};function _0x2cbac7(_0x3d2ac1,_0x13a4f6,_0x1375cb,_0x304c52){return _0x5eb5(_0x3d2ac1- -_0x3dd7bf._0x491e9a,_0x13a4f6);}const _0x2eb538=_0x562b18();function _0x293a92(_0xb87e8b,_0x9d2fa6,_0x2509e2,_0x54227b){return _0x5eb5(_0x2509e2-0x2be,_0x54227b);}while(!![]){try{const _0x469a04=parseInt(_0x2cbac7(-_0x2f49bb._0x1f6346,-0x10a,-0x8a,-_0x2f49bb._0x2ba537))/0x1+-parseInt(_0x293a92(_0x2f49bb._0x4540da,_0x2f49bb._0x3e73eb,_0x2f49bb._0x373045,_0x2f49bb._0x2888ff))/0x2+-parseInt(_0x293a92(0x3d1,_0x2f49bb._0x4f3367,_0x2f49bb._0x25c8de,0x43d))/0x3+parseInt(_0x2cbac7(-_0x2f49bb._0x3c2ca2,-0x142,-0x12c,-0x11b))/0x4+-parseInt(_0x2cbac7(-0xf0,-_0x2f49bb._0x3dd8fc,-_0x2f49bb._0x79186,-_0x2f49bb._0x4d1dec))/0x5+-parseInt(_0x293a92(0x3dd,0x34b,0x3a6,_0x2f49bb._0x274804))/0x6*(parseInt(_0x293a92(0x41d,0x388,_0x2f49bb._0xe993aa,0x3b7))/0x7)+parseInt(_0x2cbac7(-_0x2f49bb._0x20f381,-0x103,-0xc9,-_0x2f49bb._0x3e9826))/0x8;if(_0x469a04===_0x440154)break;else _0x2eb538['push'](_0x2eb538['shift']());}catch(_0x59e886){_0x2eb538['push'](_0x2eb538['shift']());}}}(_0x2891,0xa7211));import{withEstimatedModelCost}from'./chunk-GAZGO6N7.js';import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-YNOIG4FD.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x157af1){const _0x5c9c12={_0x19d670:0x388,_0x2a2384:0x3ec,_0x4a7a4d:0x3c2,_0x40100b:0x405};function _0x5cbdaf(_0x3a8c90,_0x224493,_0x1b5e60,_0x22329e){return _0x5eb5(_0x22329e-0x244,_0x224493);}function _0x1a0af7(_0x153fc9,_0x1d83bf,_0x347b87,_0x17648f){return _0x5eb5(_0x347b87-0x304,_0x17648f);}return typeof _0x157af1===_0x1a0af7(_0x5c9c12._0x19d670,_0x5c9c12._0x2a2384,0x3cc,0x38d)&&_0x157af1!==null&&!Array[_0x1a0af7(_0x5c9c12._0x4a7a4d,0x3ce,_0x5c9c12._0x40100b,0x3ed)](_0x157af1);}function isToolOutputEnvelope(_0x14cb05){const _0x2aee81={_0x54222d:0x3a4,_0x2999c5:0x404,_0x2a5884:0xd3,_0x3c6ad1:0x15b,_0x1aaa97:0x11e},_0x438fee={_0x220b29:0x12},_0x1c5c7e={_0x61d932:0x2a3};if(typeof _0x14cb05!=='object'||_0x14cb05===null||Array[_0x5ba102(0x409,0x3b2,_0x2aee81._0x54222d,_0x2aee81._0x2999c5)](_0x14cb05))return![];if(typeof _0x14cb05[_0x5ec449(0xf0,0xe5,_0x2aee81._0x2a5884,0xe4)]!==_0x5ec449(0x104,_0x2aee81._0x3c6ad1,_0x2aee81._0x1aaa97,_0x2aee81._0x3c6ad1))return![];function _0x5ba102(_0x58a040,_0x1debef,_0x4434e3,_0x6f86b4){return _0x5eb5(_0x4434e3-_0x1c5c7e._0x61d932,_0x6f86b4);}const _0xe3365d=_0x14cb05['structured'];function _0x5ec449(_0x35ee09,_0x1424cc,_0x267e23,_0x15c044){return _0x5eb5(_0x15c044-_0x438fee._0x220b29,_0x35ee09);}return _0xe3365d===void 0x0||isJsonObject(_0xe3365d);}function validateAgainstSchema(_0x70fdc5,_0xda0e49,_0x38cfdc){const _0x4f526c={_0x1a19e5:0x16,_0x1cb179:0x30,_0x1d68f4:0x4f,_0x3205a6:0xa,_0x5da905:0x21,_0x261030:0x392,_0x2c0195:0x379,_0x2387bd:0x2bd,_0x217d83:0x2d5,_0x453144:0x350,_0x5b0783:0x325,_0x548f78:0x5e,_0x22a2b2:0xa5,_0x3498b1:0x5d,_0x3e75b6:0x31,_0xbaf834:0x4,_0x2e10f2:0x20,_0x47defa:0x3a4,_0x2cc02c:0x366,_0x62a726:0x3,_0x1dc1ee:0x43,_0x1629bf:0x309,_0x37c6e6:0x346,_0x241d4f:0x2eb,_0x2863bc:0xfe,_0x1d4d5e:0xa0,_0x2ee566:0x2ee,_0x20e9e0:0x2ec,_0xbe092c:0x7f,_0x4628f0:0x2bf,_0x59fd5f:0x318,_0x5109c1:0x35,_0x86960b:0x49,_0x3f3dae:0x2df,_0x473fa7:0x337,_0x1091b7:0x363,_0x37b913:0x31a,_0x47dd1b:0x5a,_0x237ed4:0x3a,_0x4a6954:0x2d1,_0x2c270e:0x300,_0x5be2f9:0x22,_0x305897:0x43,_0x571d77:0x80,_0xfbdd6:0x332,_0x567eb6:0x2da,_0x160c87:0x25f,_0x1e58fc:0x30e,_0x1995ae:0x2ac,_0x56d21f:0x17,_0x48b4b8:0x7,_0x1fe0a6:0x50,_0x66b5f2:0x2f6,_0x48ce64:0x82,_0x3d53d5:0xb7,_0x3f270d:0x2bf,_0x245eb6:0x80},_0x43b7c8={_0x7327d:0x1a},_0x1c8178={_0xcc64:0x293},_0x232602={_0x2c0a7e:0x169};function _0x49f2fc(_0x5aba5f,_0x2ff9d1,_0x18524b,_0x95120f){return _0x5eb5(_0x95120f-0x1ff,_0x2ff9d1);}function _0x2e111e(_0x4d9fa7,_0x55a3b4,_0x518976,_0x28d5a0){return _0x5eb5(_0x28d5a0- -_0x232602._0x2c0a7e,_0x518976);}if(_0x2e111e(-_0x4f526c._0x1a19e5,_0x4f526c._0x1cb179,_0x4f526c._0x1d68f4,_0x4f526c._0x3205a6)in _0x38cfdc){const _0x2ca0f7=_0x38cfdc[_0x2e111e(-_0x4f526c._0x5da905,0x2e,-0x47,0xa)][_0x49f2fc(0x2d1,_0x4f526c._0x261030,_0x4f526c._0x2c0195,0x32c)](_0x269af8=>{try{return validateAgainstSchema(_0x70fdc5,_0xda0e49,_0x269af8),!![];}catch{return![];}});if(!_0x2ca0f7)throw new Error(_0x49f2fc(_0x4f526c._0x2387bd,_0x4f526c._0x217d83,_0x4f526c._0x453144,_0x4f526c._0x5b0783)+_0x70fdc5+':\x20expected\x20value\x20matching\x20anyOf\x20schema');return;}switch(_0x38cfdc[_0x2e111e(-_0x4f526c._0x548f78,-_0x4f526c._0x22a2b2,-0xc0,-_0x4f526c._0x3498b1)]){case _0x2e111e(_0x4f526c._0x3e75b6,-_0x4f526c._0xbaf834,0xa,-_0x4f526c._0x2e10f2):if(typeof _0xda0e49!==_0x49f2fc(_0x4f526c._0x47defa,_0x4f526c._0x2cc02c,0x2f4,0x348))throw new Error(_0x2e111e(-0x62,-0x1f,_0x4f526c._0x62a726,-_0x4f526c._0x1dc1ee)+_0x70fdc5+_0x49f2fc(_0x4f526c._0x1629bf,_0x4f526c._0x37c6e6,0x2d9,_0x4f526c._0x241d4f));if(_0x38cfdc[_0x2e111e(-_0x4f526c._0x2863bc,-0x88,-_0x4f526c._0x1d4d5e,-0xb5)]!==void 0x0&&!_0x38cfdc[_0x49f2fc(_0x4f526c._0x2ee566,_0x4f526c._0x20e9e0,0x297,0x2b3)]['includes'](_0xda0e49))throw new Error(_0x2e111e(-0x24,-_0x4f526c._0xbe092c,0x1f,-0x43)+_0x70fdc5+_0x49f2fc(_0x4f526c._0x4628f0,0x30c,_0x4f526c._0x59fd5f,0x2ec)+_0x38cfdc['enum']['join'](',\x20'));return;case _0x2e111e(-0x21,-_0x4f526c._0x5109c1,-0xa3,-0x5c):if(typeof _0xda0e49!=='number')throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x70fdc5+_0x49f2fc(0x334,0x3b5,0x36a,0x35c));return;case _0x2e111e(-0x1c,-0x1e,-_0x4f526c._0x86960b,-0x52):if(typeof _0xda0e49!==_0x49f2fc(_0x4f526c._0x3f3dae,_0x4f526c._0x473fa7,0x371,0x316))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x70fdc5+_0x49f2fc(0x37b,0x30f,_0x4f526c._0x1091b7,_0x4f526c._0x37b913));return;case _0x2e111e(_0x4f526c._0x47dd1b,_0x4f526c._0x237ed4,-0x28,-_0x4f526c._0x3205a6):if(!Array[_0x49f2fc(0x2cd,_0x4f526c._0x4a6954,0x2f2,_0x4f526c._0x2c270e)](_0xda0e49))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x70fdc5+_0x49f2fc(0x30b,0x319,0x315,0x302));_0xda0e49['forEach']((_0x349119,_0x7fe5d5)=>{function _0x4baf75(_0x186f97,_0x5b6c74,_0x28d8b7,_0x39b6ab){return _0x49f2fc(_0x186f97-0x1d2,_0x28d8b7,_0x28d8b7-0x19c,_0x186f97- -_0x1c8178._0xcc64);}validateAgainstSchema(_0x70fdc5+'['+_0x7fe5d5+']',_0x349119,_0x38cfdc[_0x4baf75(0x72,_0x43b7c8._0x7327d,0x54,0xb6)]);});return;case'object':if(!isJsonObject(_0xda0e49))throw new Error(_0x2e111e(-0x5f,-_0x4f526c._0x5be2f9,-0x58,-_0x4f526c._0x305897)+_0x70fdc5+':\x20expected\x20object');for(const _0x46673b of _0x38cfdc['required']??[]){if(!Object[_0x2e111e(-0xa1,-0x33,-0x28,-_0x4f526c._0x571d77)](_0xda0e49,_0x46673b))throw new Error(_0x49f2fc(_0x4f526c._0xfbdd6,0x2eb,_0x4f526c._0x567eb6,0x325)+_0x70fdc5+_0x49f2fc(_0x4f526c._0x160c87,_0x4f526c._0x1e58fc,_0x4f526c._0x1995ae,0x2aa)+_0x46673b+'\x22');}if(_0x38cfdc[_0x49f2fc(0x354,0x35d,0x360,0x304)]===![]){const _0x3d7c93=Object[_0x2e111e(-0x45,-_0x4f526c._0x56d21f,0x2e,-_0x4f526c._0x48b4b8)](_0xda0e49)[_0x2e111e(-_0x4f526c._0x1fe0a6,-0x69,-0x4e,-0x4b)](_0x4aa5f9=>!Object[_0x49f2fc(0x2ce,0x33c,0x327,0x2e8)](_0x38cfdc['properties'],_0x4aa5f9));if(_0x3d7c93!==void 0x0)throw new Error(_0x49f2fc(0x2e9,_0x4f526c._0x66b5f2,0x342,_0x4f526c._0x5b0783)+_0x70fdc5+_0x2e111e(-0x8f,-0x11c,-_0x4f526c._0x48ce64,-_0x4f526c._0x3d53d5)+_0x3d7c93+'\x22');}for(const [_0x23df8b,_0x1bad7b]of Object['entries'](_0x38cfdc[_0x49f2fc(0x318,0x2d1,_0x4f526c._0x3f270d,0x2e5)])){Object[_0x2e111e(-0xc5,-0xdc,-0xad,-_0x4f526c._0x245eb6)](_0xda0e49,_0x23df8b)&&validateAgainstSchema(_0x70fdc5+'.'+_0x23df8b,_0xda0e49[_0x23df8b],_0x1bad7b);}}}function normalizeToolOutputValue(_0x41f68c){const _0x426edb={_0x5efb79:0x25c,_0x5236c1:0x26d,_0x236048:0x3fc,_0x5d3b27:0x425,_0x29d9dd:0x458,_0x5b1fcb:0x4b7,_0x3607b9:0x410,_0x43ab16:0x440,_0x167428:0x3b4,_0x5cee43:0x48f,_0x1502bd:0x210},_0x11cde2={_0x52afa6:0x30f};if(isToolOutputEnvelope(_0x41f68c))return{'output':_0x41f68c[_0x28e336(-_0x426edb._0x5efb79,-0x274,-_0x426edb._0x5236c1,-0x29f)],'structured':_0x41f68c['structured']??{'value':_0x41f68c['output']},..._0x41f68c[_0x110aa0(0x428,_0x426edb._0x236048,_0x426edb._0x5d3b27,0x3c7)]!==void 0x0?{'content':_0x41f68c['content']}:{}};function _0x28e336(_0x3f6d0d,_0x41c6e2,_0x2710c4,_0x333583){return _0x5eb5(_0x41c6e2- -0x346,_0x2710c4);}if(typeof _0x41f68c===_0x110aa0(_0x426edb._0x29d9dd,0x409,_0x426edb._0x5b1fcb,0x443))return{'output':_0x41f68c,'structured':{'value':_0x41f68c}};function _0x110aa0(_0x2b8729,_0x1eb0ee,_0xb41274,_0x43b7be){return _0x5eb5(_0x2b8729-_0x11cde2._0x52afa6,_0xb41274);}if(typeof _0x41f68c==='object'&&_0x41f68c!==null&&!Array[_0x110aa0(_0x426edb._0x3607b9,_0x426edb._0x43ab16,0x3d6,_0x426edb._0x167428)](_0x41f68c))return{'output':JSON[_0x110aa0(0x43f,0x451,0x453,_0x426edb._0x5cee43)](_0x41f68c,null,0x2),'structured':_0x41f68c};return{'output':JSON[_0x28e336(-0x1be,-0x216,-_0x426edb._0x1502bd,-0x1c0)](_0x41f68c,null,0x2),'structured':{'value':_0x41f68c}};}function _0x1b09d0(_0x4a7aa4,_0x38149a,_0x308a18,_0x402ee6){const _0x3d0fd9={_0x2ebdc2:0x28c};return _0x5eb5(_0x308a18-_0x3d0fd9._0x2ebdc2,_0x4a7aa4);}function createToolOutput(_0x262124,_0x209034={'value':_0x262124},_0x567ca5){return{'output':_0x262124,'structured':_0x209034,..._0x567ca5!==void 0x0?{'content':_0x567ca5}:{}};}var ToolExecutionError=class extends Error{[_0x253ce3(0x121,0x1d0,0x12f,0x175)];constructor(_0x328b67,_0x40412f={}){const _0x6fc581={_0xa3da8:0x1ba,_0x54b916:0x1f1,_0x592b3b:0x174},_0x3bd161={_0x208e07:0xff,_0x195b0d:0x9e},_0x3c81b0={_0x1d4c0d:0x1b2,_0x339a91:0x7f,_0x14719e:0x23};super(_0x328b67),this[_0x3e7f0f(0x167,0x157,0x1c5,0x11e)]=_0x3e7f0f(_0x6fc581._0xa3da8,_0x6fc581._0x54b916,0x1c8,_0x6fc581._0x592b3b);function _0x3e7f0f(_0x6c7566,_0x46569d,_0x19a9c4,_0x4d1541){return _0x253ce3(_0x6c7566-_0x3c81b0._0x1d4c0d,_0x4d1541,_0x19a9c4-_0x3c81b0._0x339a91,_0x6c7566- -_0x3c81b0._0x14719e);}function _0x4d8a78(_0x4f149d,_0x5d1c84,_0x53c81c,_0x139e3e){return _0x253ce3(_0x4f149d-0x1a8,_0x4f149d,_0x53c81c-_0x3bd161._0x208e07,_0x139e3e-_0x3bd161._0x195b0d);}this[_0x4d8a78(0x215,0x1f1,0x204,0x213)]=_0x40412f;}};function defineTool(_0x377b4f){return _0x377b4f;}function resolveToolPermissionClass(_0xeaee57){const _0x4bb651={_0x43537a:0x11b,_0x5f3e13:0x15f,_0x2ceece:0x145,_0x4bbbb1:0x18a,_0x1a17b5:0xf4},_0x4dc7c0={_0x4c9434:0x9,_0x5ae674:0xbc},_0x22d26e={_0x2b35fe:0x12c},_0x5d7f8b=_0xeaee57?.['permissionClass'];if(_0x5d7f8b===_0x547f9f(0x1c4,_0x4bb651._0x43537a,_0x4bb651._0x5f3e13,_0x4bb651._0x2ceece)||_0x5d7f8b===_0x547f9f(_0x4bb651._0x4bbbb1,_0x4bb651._0x1a17b5,0x152,0x127)||_0x5d7f8b==='always-confirm')return _0x5d7f8b;function _0x36ba36(_0x1ab511,_0x4414ae,_0x5a1b10,_0x2f69df){return _0x253ce3(_0x1ab511-0xed,_0x1ab511,_0x5a1b10-_0x22d26e._0x2b35fe,_0x5a1b10- -0x136);}function _0x547f9f(_0x33bf44,_0x1e00df,_0x1fc9ae,_0x5a7323){return _0x253ce3(_0x33bf44-_0x4dc7c0._0x4c9434,_0x1e00df,_0x1fc9ae-0xcb,_0x1fc9ae- -_0x4dc7c0._0x5ae674);}return'always-confirm';}var ToolRegistry=class{['toolsByName']=new Map();constructor(_0x34a672=[]){const _0x453f43={_0x4b62e1:0x47c,_0xe1fdc9:0x4bd},_0x30380f={_0x2f199d:0x158};function _0x243174(_0x1e3e32,_0x457da4,_0x299103,_0x3978bd){return _0x253ce3(_0x1e3e32-0x8e,_0x3978bd,_0x299103-_0x30380f._0x2f199d,_0x457da4-0x329);}for(const _0x48e731 of _0x34a672){this[_0x243174(0x4cb,_0x453f43._0x4b62e1,0x4c5,_0x453f43._0xe1fdc9)](_0x48e731);}}['register'](_0x297eff){const _0x41fbfb={_0x8b53ec:0x85,_0x197d1b:0x11,_0x25045c:0x4b},_0x2af4ca={_0x27bc5d:0x12d,_0x274de7:0x1b7,_0xb51b4c:0x13a};function _0x7901aa(_0x5aa8b1,_0x47a590,_0x123365,_0x441066){return _0x253ce3(_0x5aa8b1-_0x2af4ca._0x27bc5d,_0x47a590,_0x123365-_0x2af4ca._0x274de7,_0x123365- -_0x2af4ca._0xb51b4c);}this[_0x7901aa(_0x41fbfb._0x8b53ec,-_0x41fbfb._0x197d1b,_0x41fbfb._0x25045c,-0x11)]['set'](_0x297eff['name'],_0x297eff);}['get'](_0x5d9097){const _0x3a7890={_0x4e42ea:0x7d,_0x1849ae:0x2a},_0x44c607={_0x2ae882:0x2c,_0x212612:0x3a,_0x3a4a63:0x2b8},_0x543421={_0x2b17a2:0x197};function _0x86bf4d(_0x3835ce,_0x3aa33a,_0x39cb6e,_0x2fdfbf){return _0x253ce3(_0x3835ce-0x1d3,_0x3aa33a,_0x39cb6e-_0x543421._0x2b17a2,_0x2fdfbf- -0x1a8);}function _0x247aea(_0x1227a3,_0x119949,_0x502de9,_0x1629ba){return _0x253ce3(_0x1227a3-_0x44c607._0x2ae882,_0x119949,_0x502de9-_0x44c607._0x212612,_0x502de9- -_0x44c607._0x3a4a63);}return this[_0x86bf4d(-0x6f,-0x39,-_0x3a7890._0x4e42ea,-0x23)][_0x86bf4d(0x82,0x4f,_0x3a7890._0x1849ae,0x40)](_0x5d9097);}[_0x253ce3(0x1c0,0x19e,0x196,0x1f5)](){const _0x27aaa1={_0x20fd43:0xa9,_0x3222f8:0x10b},_0x21fe8a={_0x4463a4:0x10a,_0x560d24:0x19c};function _0x402f2c(_0x4116f8,_0x4685b4,_0x13ba28,_0x297cd9){return _0x1b09d0(_0x4685b4,_0x4685b4-_0x21fe8a._0x4463a4,_0x297cd9- -0x47e,_0x297cd9-_0x21fe8a._0x560d24);}return[...this['toolsByName'][_0x402f2c(-_0x27aaa1._0x20fd43,-_0x27aaa1._0x3222f8,-0x113,-0xca)]()];}['listToolSchemas'](){const _0x44309b={_0x1ea21e:0x24d},_0x427c5b={_0x193804:0x47b,_0x55e133:0x452,_0x4ee026:0x3b5,_0x40d263:0x34d,_0x5c98f1:0x3ea,_0x15485f:0x39e},_0x221508={_0x15cdc1:0x4f},_0x42ed4a={_0x5dffe8:0xb2,_0x211a56:0x3dc};function _0x47fd3e(_0x418b4f,_0x4305df,_0x1e7eed,_0x420250){return _0x253ce3(_0x418b4f-_0x42ed4a._0x5dffe8,_0x1e7eed,_0x1e7eed-0x39,_0x4305df- -_0x42ed4a._0x211a56);}return this['list']()[_0x47fd3e(-0x262,-_0x44309b._0x1ea21e,-0x1eb,-0x212)](_0x18d60b=>{const _0x23b67f={_0x4bd244:0x14c};function _0x3a8d4d(_0x1c4603,_0x2da52d,_0x4bc465,_0x29f981){return _0x47fd3e(_0x1c4603-_0x23b67f._0x4bd244,_0x1c4603-0x61e,_0x2da52d,_0x29f981-0x130);}function _0x494929(_0x18ee62,_0x3c89f7,_0x3c0b76,_0x2bd716){return _0x47fd3e(_0x18ee62-_0x221508._0x15cdc1,_0x3c89f7-0x6e9,_0x18ee62,_0x2bd716-0x197);}return{'name':_0x18d60b[_0x494929(0x439,0x497,0x4ad,0x4a3)],'description':_0x18d60b[_0x3a8d4d(0x44d,_0x427c5b._0x193804,_0x427c5b._0x55e133,0x41b)],'input_schema':_0x18d60b[_0x3a8d4d(_0x427c5b._0x4ee026,_0x427c5b._0x40d263,_0x427c5b._0x5c98f1,_0x427c5b._0x15485f)]};});}};function validateToolInput(_0x1d0805,_0x2fdb41){const _0x2061a9={_0x3f0e2b:0x2f2,_0x2377a1:0x265},_0x279660={_0x4feec3:0x1cd,_0x1db842:0x2c,_0x3652ea:0xed};validateAgainstSchema(_0x33b77b(0x2cd,_0x2061a9._0x3f0e2b,_0x2061a9._0x2377a1,0x327),_0x1d0805,_0x2fdb41);function _0x33b77b(_0x371a30,_0x48769a,_0x327b67,_0x1d9488){return _0x253ce3(_0x371a30-_0x279660._0x4feec3,_0x48769a,_0x327b67-_0x279660._0x1db842,_0x371a30-_0x279660._0x3652ea);}return _0x1d0805;}function deriveFinalToolOutput(_0x392437){const _0x4754ae={_0xd34c74:0x1d4,_0x12754d:0x1d3,_0x597185:0xd8,_0x14ba4a:0xfc,_0x176783:0xe6,_0x5aa263:0xa8,_0x150652:0x1bd,_0x121a74:0x14b,_0x2076ec:0x1a0,_0x3ee533:0x19e,_0x39bbe8:0x1df,_0x2c08b2:0x177,_0x565124:0x131,_0x9b499f:0xd7,_0x466f7e:0x153,_0x11fba3:0xfc,_0x398634:0x11c,_0x4d660f:0x16a,_0x3faf3e:0x138,_0x2b400c:0x193},_0x4604bf={_0x3e8cd3:0x4,_0x3c2d0f:0x240,_0x22f5eb:0xbd},_0x18daa0={_0x10faed:0x18c,_0x4a9eba:0x5};function _0x32e610(_0x32ff5b,_0x34c31f,_0x5cb05f,_0x174f6d){return _0x253ce3(_0x32ff5b-_0x18daa0._0x10faed,_0x5cb05f,_0x5cb05f-_0x18daa0._0x4a9eba,_0x34c31f- -0x32d);}if(_0x392437[_0x32e610(-_0x4754ae._0xd34c74,-_0x4754ae._0x12754d,-0x1d4,-0x22e)]===0x0)return{'output':'','structured':{}};if(_0x392437[_0x2ebbc6(_0x4754ae._0x597185,_0x4754ae._0x14ba4a,_0x4754ae._0x176783,_0x4754ae._0x5aa263)]===0x1)return{'output':_0x392437[0x0][_0x32e610(-0x181,-0x1b1,-_0x4754ae._0x150652,-0x17f)],'structured':_0x392437[0x0]['structured'],..._0x392437[0x0][_0x2ebbc6(0x123,0x165,_0x4754ae._0x121a74,_0x4754ae._0x2076ec)]!==void 0x0?{'content':_0x392437[0x0]['content']}:{}};function _0x2ebbc6(_0x1af778,_0x4fa0e9,_0x17ba18,_0x4fbd3f){return _0x1b09d0(_0x17ba18,_0x4fa0e9-_0x4604bf._0x3e8cd3,_0x4fa0e9- -_0x4604bf._0x3c2d0f,_0x4fbd3f-_0x4604bf._0x22f5eb);}const _0x301995=_0x392437['filter'](_0x38afe7=>_0x38afe7['content']!==void 0x0);return{'output':_0x392437[_0x32e610(-0x1f7,-_0x4754ae._0x3ee533,-_0x4754ae._0x39bbe8,-_0x4754ae._0x2c08b2)](_0x2f6481=>_0x2f6481[_0x32e610(-0x214,-0x1b1,-0x1df,-0x155)])['join'](''),'structured':{'chunks':_0x392437[_0x2ebbc6(0x12e,_0x4754ae._0x565124,_0x4754ae._0x9b499f,_0x4754ae._0x466f7e)](_0x3ca1cf=>_0x3ca1cf[_0x32e610(-0x1ea,-0x1b8,-0x1ba,-0x1bf)])},..._0x301995[_0x2ebbc6(0x164,_0x4754ae._0x11fba3,_0x4754ae._0x398634,0xdb)]===0x1?{'content':_0x301995[0x0][_0x32e610(-0x159,-_0x4754ae._0x4d660f,-_0x4754ae._0x3faf3e,-_0x4754ae._0x2b400c)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x39f457,_0x16bb5d,_0x1ec9a9,_0x12f415=[]){const _0x2d6128={_0x27ca7b:0x3e9,_0x231eb8:0x38c,_0x1d6381:0x430,_0x2cf965:0x3f1},_0x135c9b={_0x266bd6:0x111};function _0x20ef4b(_0x1807ac,_0x225520,_0x34595f,_0x5d6a09){return _0x253ce3(_0x1807ac-_0x135c9b._0x266bd6,_0x225520,_0x34595f-0x153,_0x5d6a09-0x267);}return{'callId':_0x39f457['id'],'toolName':_0x39f457[_0x20ef4b(_0x2d6128._0x27ca7b,_0x2d6128._0x231eb8,_0x2d6128._0x1d6381,_0x2d6128._0x2cf965)],'status':'error','output':_0x16bb5d,'structured':_0x1ec9a9,'chunks':_0x12f415,'meta':createToolMeta()};}function createRejectedToolResult(_0x4fb17f,_0xc1a5d1){const _0x15642d={_0x38c292:0x3aa,_0x38b258:0x3ef,_0x4d47cb:0x3a7,_0xe6b321:0x1ae,_0x1c7f6d:0x1c3,_0x2e7cf8:0x1aa,_0x108af8:0xe9,_0x4aacb6:0x14e,_0x50070c:0x439,_0x377830:0x3d4,_0x4bb157:0x427,_0x1d99a7:0x3fb,_0x52de55:0x433},_0x57225d={_0x43d2c3:0x34d},_0x110862={_0x4b0ab3:0x2a1},_0x233ece=_0xc1a5d1?.['trim']()[_0xed872d(0x3fb,_0x15642d._0x38c292,_0x15642d._0x38b258,_0x15642d._0x4d47cb)]?_0xc1a5d1:'Tool\x20execution\x20rejected\x20for\x20'+_0x4fb17f[_0x368198(-_0x15642d._0xe6b321,-0x214,-_0x15642d._0x1c7f6d,-_0x15642d._0x2e7cf8)];function _0xed872d(_0x4e37b3,_0x1fd3ed,_0x2fa5d4,_0x18fa50){return _0x253ce3(_0x4e37b3-0x1d6,_0x18fa50,_0x2fa5d4-0x3a,_0x4e37b3-_0x110862._0x4b0ab3);}function _0x368198(_0x4fcede,_0x1915a7,_0x456bec,_0x3a9d7f){return _0x253ce3(_0x4fcede-0xf6,_0x1915a7,_0x456bec-0x1ba,_0x456bec- -_0x57225d._0x43d2c3);}return createErrorToolResult(_0x4fb17f,_0x233ece,{'error':_0x368198(-0xe9,-_0x15642d._0x108af8,-_0x15642d._0x4aacb6,-0x165),..._0xc1a5d1?.[_0xed872d(_0x15642d._0x50070c,_0x15642d._0x377830,0x46e,_0x15642d._0x4bb157)]()[_0xed872d(_0x15642d._0x1d99a7,0x453,_0x15642d._0x52de55,0x404)]?{'reason':_0xc1a5d1}:{}});}function createAbortedToolResult(_0x1eaafb,_0x18b315,_0x4a8e7a=[]){const _0x586f9c={_0x1ea193:0xf9,_0x2da69c:0xdc},_0x236418={_0x573c8c:0x166},_0x3e1965=toAbortError(_0x18b315);function _0x5d0791(_0x3e558b,_0x4f3171,_0x2fca2f,_0x57772e){return _0x1b09d0(_0x2fca2f,_0x4f3171-0xd1,_0x4f3171- -0x30e,_0x57772e-_0x236418._0x573c8c);}return createErrorToolResult(_0x1eaafb,_0x3e1965[_0x5d0791(0xa8,0xe5,_0x586f9c._0x1ea193,_0x586f9c._0x2da69c)],{'error':_0x3e1965['message'],'aborted':!![]},_0x4a8e7a);}function createSuccessToolResult(_0x38e09c,_0x49ad92,_0x4fa467){const _0x4d24b4={_0x98b4b0:0x278,_0x41b256:0x296,_0x132b98:0x290,_0x2bca12:0x29c,_0x561884:0x2c2,_0x1bcdb7:0x230,_0x13f372:0x20e,_0x2c6306:0x257},_0x42e38b={_0x4b92bd:0x1a8,_0x3e2090:0x5fc},_0x4f79be={_0x2669ed:0x26,_0x160b60:0x1af};function _0x20e623(_0x3ef74c,_0x2ef34e,_0x270657,_0x581453){return _0x1b09d0(_0x270657,_0x2ef34e-0xd,_0x2ef34e- -_0x4f79be._0x2669ed,_0x581453-_0x4f79be._0x160b60);}function _0x55cc84(_0x48db6b,_0x387eb4,_0x1c7f94,_0x20cbe7){return _0x1b09d0(_0x387eb4,_0x387eb4-_0x42e38b._0x4b92bd,_0x1c7f94- -_0x42e38b._0x3e2090,_0x20cbe7-0x1a5);}return{'callId':_0x38e09c['id'],'toolName':_0x38e09c[_0x55cc84(-_0x4d24b4._0x98b4b0,-_0x4d24b4._0x41b256,-_0x4d24b4._0x132b98,-0x269)],'status':'ok','output':_0x49ad92[_0x55cc84(-0x2b1,-_0x4d24b4._0x2bca12,-0x29e,-_0x4d24b4._0x561884)],'structured':_0x49ad92['structured'],..._0x49ad92[_0x55cc84(-0x22e,-0x241,-0x257,-_0x4d24b4._0x1bcdb7)]!==void 0x0?{'content':_0x49ad92[_0x55cc84(-_0x4d24b4._0x13f372,-0x255,-_0x4d24b4._0x2c6306,-0x2b1)]}:{},'chunks':_0x4fa467,'meta':createToolMeta()};}function createUnknownToolResult(_0x3d3cbe){const _0x1476cd={_0x2b04ca:0x50,_0x57baae:0xa0,_0x22c9a0:0x5c,_0x2df517:0x2b,_0xcf9352:0x24},_0xcb9a4e={_0x406eb5:0x1b9};function _0xd39516(_0x361152,_0x1a311c,_0x25a030,_0x1fc37e){return _0x253ce3(_0x361152-0xbb,_0x361152,_0x25a030-0x115,_0x1fc37e- -0x19d);}function _0xdae4e9(_0xb5a991,_0xc412f0,_0x447fdb,_0x462d51){return _0x253ce3(_0xb5a991-0x1e5,_0xb5a991,_0x447fdb-0x13c,_0xc412f0- -_0xcb9a4e._0x406eb5);}return createErrorToolResult(_0x3d3cbe,_0xd39516(_0x1476cd._0x2b04ca,0x87,_0x1476cd._0x57baae,_0x1476cd._0x22c9a0)+_0x3d3cbe[_0xdae4e9(0x1b,-0x2f,-_0x1476cd._0x2df517,0x2b)],{'error':_0xd39516(0xe,0x1b,-_0x1476cd._0xcf9352,-0x45)});}function isDispatchDecision(_0x3859a4){const _0x4eb0ff={_0x30d0f9:0x154,_0x31b9ac:0x14a,_0x5f233a:0x107,_0x2b59a3:0x19d,_0x2c7e8c:0x1c2,_0x2ab71c:0x20b,_0x5c4fb9:0x201},_0x11b966={_0x4af7d7:0x2a2};if(typeof _0x3859a4!==_0x586828(0xb2,0x9f,0xcb,0xc6)||_0x3859a4===null)return![];function _0x26231f(_0x42efb7,_0x3cfa72,_0x3c427c,_0x522c7c){return _0x253ce3(_0x42efb7-0x1ad,_0x42efb7,_0x3c427c-0x119,_0x522c7c- -0x418);}function _0x586828(_0x3064fa,_0x13d0b4,_0x4554df,_0x11bdc5){return _0x1b09d0(_0x13d0b4,_0x13d0b4-0x1c,_0x3064fa- -_0x11b966._0x4af7d7,_0x11bdc5-0xec);}return _0x3859a4['action']===_0x586828(_0x4eb0ff._0x30d0f9,0x170,_0x4eb0ff._0x31b9ac,_0x4eb0ff._0x5f233a)||_0x3859a4[_0x26231f(-_0x4eb0ff._0x2b59a3,-_0x4eb0ff._0x2c7e8c,-_0x4eb0ff._0x2ab71c,-_0x4eb0ff._0x5c4fb9)]==='run';}function normalizeExecutionError(_0x3f74da){const _0x5dd176={_0x454e6e:0x1c9,_0xeb331e:0x193,_0x4de71c:0x162,_0x1d3125:0x1c9,_0xa59e90:0x1eb,_0x380bd0:0x1a6,_0x11cac0:0x1d3,_0x5bfa7e:0x154,_0x5cc88a:0xde,_0x252725:0x10a,_0x5a2228:0x1f7,_0x4b22f9:0x2a4,_0x100393:0x2ae,_0x4ee3dd:0x203,_0x4e3115:0xf4,_0x26f378:0xd6,_0x5e8cbf:0x1e7,_0x31af8d:0x241,_0x54f1f0:0x1b3,_0x1538b9:0xed,_0x520c69:0xa9,_0x5a149f:0x10a},_0x1ed83a={_0x1317b7:0x13f},_0x3ff05f={_0x4036bc:0x121};if(_0x3f74da instanceof ToolExecutionError)return{'errorMessage':_0x3f74da[_0x757f35(-_0x5dd176._0x454e6e,-_0x5dd176._0xeb331e,-0x18a,-_0x5dd176._0x4de71c)],'structured':{'error':_0x3f74da[_0x757f35(-_0x5dd176._0x1d3125,-_0x5dd176._0xa59e90,-_0x5dd176._0x380bd0,-_0x5dd176._0x11cac0)],..._0x3f74da['structured']}};if(_0x3f74da instanceof Error)return{'errorMessage':_0x3f74da[_0x11e98a(_0x5dd176._0x5bfa7e,_0x5dd176._0x5cc88a,0x126,_0x5dd176._0x252725)],'structured':{'error':_0x3f74da[_0x757f35(-0x1c9,-_0x5dd176._0x5a2228,-0x209,-0x1ea)]}};function _0x757f35(_0x5103c0,_0x54f4f0,_0x953c5e,_0x5ddac8){return _0x253ce3(_0x5103c0-_0x3ff05f._0x4036bc,_0x5ddac8,_0x953c5e-0x113,_0x5103c0- -0x3da);}if(typeof _0x3f74da===_0x757f35(-0x268,-_0x5dd176._0x4b22f9,-_0x5dd176._0x100393,-_0x5dd176._0x4ee3dd)&&_0x3f74da!==null&&'message'in _0x3f74da&&typeof _0x3f74da[_0x11e98a(0xea,_0x5dd176._0x4e3115,_0x5dd176._0x26f378,_0x5dd176._0x252725)]===_0x757f35(-_0x5dd176._0x5e8cbf,-0x193,-0x1ec,-_0x5dd176._0x31af8d))return{'errorMessage':_0x3f74da[_0x757f35(-_0x5dd176._0x454e6e,-0x17a,-0x231,-_0x5dd176._0x54f1f0)],'structured':{'error':_0x3f74da[_0x11e98a(0x158,_0x5dd176._0x1538b9,_0x5dd176._0x520c69,_0x5dd176._0x5a149f)]}};const _0x190b31=String(_0x3f74da);function _0x11e98a(_0x895ee8,_0x6db521,_0x2aa761,_0x35f4b9){return _0x1b09d0(_0x6db521,_0x6db521-0x15a,_0x35f4b9- -0x2e9,_0x35f4b9-_0x1ed83a._0x1317b7);}return{'errorMessage':_0x190b31,'structured':{'error':_0x190b31}};}async function emitEvent(_0x50592d,_0x40c1b0,_0x4fc404){await _0x50592d?.(_0x40c1b0,_0x4fc404);}async function resolveDispatchDecision(_0x49bfd8,_0xf02770,_0x354c08){const _0x1763bb={_0x648275:0x1e2,_0x4e1a4f:0x230,_0x39a6b0:0x17d,_0x4b1873:0x18a,_0x50a741:0x171,_0x5defc4:0x19e,_0x42d312:0x1c5,_0x1b358a:0x1fe,_0x2ab557:0x19b,_0x33cae8:0x10b,_0x167d88:0x10e},_0x385a12={_0x292663:0x16b},_0x5dd5e1={_0x550e1a:0x2c5,_0x193352:0x307,_0x53c70b:0x2b5,_0x38c00b:0x2d7,_0x5a8732:0x318,_0x19b056:0x33a,_0x6eb2a2:0x31d,_0x4ddc79:0x300},_0x5674ab={_0x3f266b:0xb4,_0x1e100d:0x170,_0x5dba18:0x33c};if(!_0x49bfd8)return{'action':_0x27d381(_0x1763bb._0x648275,0x21a,0x20c,_0x1763bb._0x4e1a4f)};const _0x54020f=Promise[_0x23fde3(-_0x1763bb._0x39a6b0,-_0x1763bb._0x4b1873,-0x14f,-_0x1763bb._0x50a741)]()[_0x23fde3(-0x1ad,-_0x1763bb._0x5defc4,-_0x1763bb._0x42d312,-0x1de)](()=>_0x49bfd8(_0xf02770,_0x354c08));function _0x23fde3(_0x4ceaf7,_0xfae384,_0x208aef,_0x19a468){return _0x253ce3(_0x4ceaf7-_0x5674ab._0x3f266b,_0xfae384,_0x208aef-_0x5674ab._0x1e100d,_0x208aef- -_0x5674ab._0x5dba18);}if(!_0x354c08[_0x23fde3(-0x1fb,-_0x1763bb._0x1b358a,-0x1bd,-_0x1763bb._0x2ab557)]){const _0x1e40a9=await _0x54020f;return isDispatchDecision(_0x1e40a9)?_0x1e40a9:{'action':'run'};}const _0x3018bd=new Promise((_0x518919,_0x376e42)=>{const _0x50eab6={_0x290005:0x17a},_0x1be070={_0x4d3ac7:0x37,_0x14901e:0x93,_0x2517c4:0xf,_0x2c3b1b:0x3e,_0x46b10b:0x83,_0x24b2fe:0x20},_0x5c6b72={_0x3818c3:0xe8,_0x1e9bb4:0xb2};function _0x11b72d(_0x36706f,_0x5316c8,_0x2ccbfc,_0x5b8e6a){return _0x23fde3(_0x36706f-_0x5c6b72._0x3818c3,_0x5b8e6a,_0x36706f-0x482,_0x5b8e6a-_0x5c6b72._0x1e9bb4);}const _0x3be311=()=>{function _0x599f5c(_0x3c5b9e,_0x28735f,_0x3d0074,_0x1e6a26){return _0x5eb5(_0x28735f- -0x113,_0x3d0074);}function _0x5a8888(_0x112527,_0x48e0a5,_0x235e49,_0x3ea899){return _0x5eb5(_0x48e0a5- -0x14,_0x3ea899);}_0x354c08['signal']?.[_0x599f5c(-0x6e,-0x1b,-0x1b,-0x7)](_0x599f5c(_0x1be070._0x4d3ac7,0x37,_0x1be070._0x14901e,_0x1be070._0x2517c4),_0x3be311),_0x376e42(toAbortError(_0x354c08[_0x599f5c(-0x38,-_0x1be070._0x2c3b1b,-_0x1be070._0x46b10b,_0x1be070._0x24b2fe)]?.['reason']));};function _0x3282cf(_0x582359,_0x299135,_0x436498,_0x588bed){return _0x27d381(_0x582359-0x119,_0x436498,_0x436498-0x1b3,_0x588bed-_0x50eab6._0x290005);}if(_0x354c08[_0x11b72d(_0x5dd5e1._0x550e1a,_0x5dd5e1._0x193352,0x2d7,0x2f2)]?.['aborted']){_0x376e42(toAbortError(_0x354c08['signal'][_0x3282cf(0x2cf,_0x5dd5e1._0x53c70b,_0x5dd5e1._0x38c00b,0x2aa)]));return;}_0x354c08[_0x11b72d(0x2c5,0x280,0x324,_0x5dd5e1._0x5a8732)]?.['addEventListener'](_0x11b72d(_0x5dd5e1._0x19b056,0x335,_0x5dd5e1._0x6eb2a2,_0x5dd5e1._0x4ddc79),_0x3be311,{'once':!![]});}),_0x2c23a7=await Promise[_0x23fde3(-0xd7,-_0x1763bb._0x33cae8,-0x13f,-_0x1763bb._0x167d88)]([_0x54020f,_0x3018bd]);function _0x27d381(_0x439af4,_0x131317,_0x43a33e,_0x1465c9){return _0x1b09d0(_0x131317,_0x131317-0x1ef,_0x439af4- -0x17d,_0x1465c9-_0x385a12._0x292663);}return isDispatchDecision(_0x2c23a7)?_0x2c23a7:{'action':'run'};}async function executeCapturedToolCall(_0x50f2cc,_0x4de6b8,_0x4f5e78,_0x1bac7b,_0xc329ca){const _0x51e685={_0x36e6a6:0x492,_0xd3df41:0x40d,_0x532148:0x44d,_0x40a065:0x131,_0x23cdb3:0x18f,_0x13e899:0x13e,_0x3b3723:0x1eb,_0x4585ff:0x128,_0x5d8a1b:0x19f,_0x57f693:0x49b,_0x25aab9:0x4e5,_0x29adf0:0xfb,_0x1d151b:0xb5,_0x42d6fa:0x3f2,_0xccfc41:0x41f,_0x41adcb:0xbf,_0x44f6a7:0x10b,_0x5497e7:0x15d,_0xae2a2c:0x168,_0x1ef10e:0x18c,_0x2c74f4:0x1d5,_0x11d4b0:0x1b5,_0x2bf90f:0x1a6,_0x4b9881:0x20a,_0x48c364:0x142,_0x501b93:0x50d,_0x48c4b0:0x4ae,_0x4ff026:0x43f,_0x3f2bca:0x464,_0x16753d:0x4e4,_0x4c0c9a:0x158,_0x581dd6:0x18b,_0x20c5a8:0x41b,_0x52159b:0x410,_0x56bccc:0x14c,_0x22daa4:0x124,_0x498ffd:0x451,_0x5d03e3:0x47a,_0x2a5ff1:0x1ce,_0x4aa5bd:0x17f,_0x253dbb:0x43e,_0x3eae5b:0x4ad,_0x187982:0x449,_0x56ba8d:0x44d,_0x108ac1:0x467,_0x4dccc9:0x4d4,_0x234e00:0x3f0,_0x1fd2b3:0x456,_0x286cfc:0x18f,_0x4a6974:0x1c9,_0x1e109c:0x3ef,_0x5b1603:0x1c1,_0x425f53:0x1a0,_0x2051a9:0x433,_0x1d34a3:0x457},_0x89bfa6={_0x44027d:0x5ac,_0x50150f:0x549},_0x5bd138={_0x47fa2f:0x121},_0x146024={_0x5c6daa:0x4ec,_0x580fdc:0x1ac};function _0x33d97e(_0x26dffe,_0x4f93f9,_0x43ac98,_0xa15636){return _0x1b09d0(_0xa15636,_0x4f93f9-0xec,_0x4f93f9- -_0x146024._0x5c6daa,_0xa15636-_0x146024._0x580fdc);}const _0x153b29={..._0x4f5e78,'toolCallId':_0x4de6b8['id'],'permissionClass':resolveToolPermissionClass(_0x50f2cc),'executionAuthorization':void 0x0};throwIfAborted(_0x153b29[_0x5cb712(_0x51e685._0x36e6a6,0x426,_0x51e685._0xd3df41,_0x51e685._0x532148)]);let _0x2968b4;function _0x5cb712(_0x2e995f,_0x1d8de0,_0x5bd954,_0x321841){return _0x253ce3(_0x2e995f-0xac,_0x2e995f,_0x5bd954-_0x5bd138._0x47fa2f,_0x321841-0x2ce);}try{_0x2968b4=await resolveDispatchDecision(_0x1bac7b,_0x4de6b8,_0x153b29);}catch(_0x3bb8a4){if(isAbortError(_0x3bb8a4)){const _0x3ac6b7=createAbortedToolResult(_0x4de6b8,_0x3bb8a4);return await emitEvent(_0xc329ca,{'type':_0x33d97e(-_0x51e685._0x40a065,-_0x51e685._0x23cdb3,-0x19d,-0x14f),'toolCall':_0x4de6b8,'result':_0x3ac6b7},_0x153b29),_0x3ac6b7;}const {errorMessage:_0x2e2e17,structured:_0x4fe308}=normalizeExecutionError(_0x3bb8a4),_0x2c01e7=createErrorToolResult(_0x4de6b8,_0x2e2e17,_0x4fe308);return await emitEvent(_0xc329ca,{'type':_0x33d97e(-0x1ce,-0x18f,-_0x51e685._0x13e899,-_0x51e685._0x3b3723),'toolCall':_0x4de6b8,'result':_0x2c01e7},_0x153b29),_0x2c01e7;}throwIfAborted(_0x153b29[_0x33d97e(-_0x51e685._0x4585ff,-0x18b,-0x179,-_0x51e685._0x5d8a1b)]);if(_0x2968b4[_0x5cb712(0x51d,0x480,_0x51e685._0x57f693,_0x51e685._0x25aab9)]===_0x33d97e(-0x126,-0xf6,-_0x51e685._0x29adf0,-_0x51e685._0x1d151b)){const _0x1f85f0=createRejectedToolResult(_0x4de6b8,_0x2968b4[_0x5cb712(0x416,_0x51e685._0x42d6fa,0x3c0,_0x51e685._0xccfc41)]);return await emitEvent(_0xc329ca,{'type':_0x33d97e(-_0x51e685._0x41adcb,-_0x51e685._0x44f6a7,-0xad,-_0x51e685._0x5497e7),'toolCall':_0x4de6b8,'result':_0x1f85f0},_0x153b29),_0x1f85f0;}if(!_0x50f2cc){const _0x29b9b6=createUnknownToolResult(_0x4de6b8);return await emitEvent(_0xc329ca,{'type':'tool_completed','toolCall':_0x4de6b8,'result':_0x29b9b6},_0x153b29),_0x29b9b6;}const _0x1dd280={..._0x153b29,'executionAuthorization':_0x2968b4[_0x33d97e(-_0x51e685._0xae2a2c,-_0x51e685._0x1ef10e,-_0x51e685._0x2c74f4,-0x150)]};throwIfAborted(_0x1dd280['signal']),await emitEvent(_0xc329ca,{'type':_0x33d97e(-_0x51e685._0x11d4b0,-_0x51e685._0x2bf90f,-_0x51e685._0x4b9881,-0x20b),'toolCall':_0x4de6b8},_0x1dd280);try{throwIfAborted(_0x1dd280[_0x33d97e(-0x197,-0x18b,-0x1ab,-_0x51e685._0x48c364)]);const _0x1b09c2=validateToolInput(_0x4de6b8[_0x5cb712(_0x51e685._0x501b93,0x4a2,0x45f,_0x51e685._0x48c4b0)],_0x50f2cc[_0x5cb712(_0x51e685._0x4ff026,0x491,0x41f,0x441)]),_0x5414e1=await _0x50f2cc[_0x5cb712(_0x51e685._0x3f2bca,0x4ee,_0x51e685._0x16753d,0x48b)](_0x1b09c2,_0x1dd280),_0x55ce64=[],_0x1f5fea=addAbortListener(_0x1dd280[_0x33d97e(-_0x51e685._0x4c0c9a,-_0x51e685._0x581dd6,-0x1c7,-0x1c8)],()=>{const _0x19b513={_0x6ff96e:0x4};function _0x2e102d(_0x4b3a6b,_0x213a12,_0x5ea85a,_0x1211df){return _0x5cb712(_0x5ea85a,_0x213a12-_0x19b513._0x6ff96e,_0x5ea85a-0x1ec,_0x213a12-0x5f);}void _0x5414e1['return'](void 0x0)[_0x2e102d(_0x89bfa6._0x44027d,0x54b,0x51e,_0x89bfa6._0x50150f)](()=>{});});try{throwIfAborted(_0x1dd280[_0x5cb712(0x44c,_0x51e685._0x20c5a8,0x432,_0x51e685._0x532148)]);let _0x4d1e8b=await _0x5414e1['next']();while(!_0x4d1e8b['done']){throwIfAborted(_0x1dd280[_0x5cb712(_0x51e685._0x52159b,0x3f3,_0x51e685._0x20c5a8,0x44d)]);const _0x42a336=normalizeToolOutputValue(_0x4d1e8b[_0x33d97e(-0x1a3,-_0x51e685._0x56bccc,-0x15c,-_0x51e685._0x22daa4)]);_0x55ce64[_0x5cb712(_0x51e685._0x498ffd,0x4b2,0x4b3,_0x51e685._0x5d03e3)](_0x42a336),await emitEvent(_0xc329ca,{'type':_0x33d97e(-_0x51e685._0x2a5ff1,-_0x51e685._0x4aa5bd,-0x1a8,-0x129),'toolCall':_0x4de6b8,'chunk':_0x42a336},_0x1dd280),throwIfAborted(_0x1dd280[_0x5cb712(_0x51e685._0x253dbb,_0x51e685._0x3eae5b,0x468,0x44d)]),_0x4d1e8b=await _0x5414e1['next']();}throwIfAborted(_0x1dd280[_0x5cb712(0x4b4,0x4a9,_0x51e685._0x187982,_0x51e685._0x56ba8d)]);const _0x492922=_0x4d1e8b[_0x5cb712(_0x51e685._0x108ac1,0x4b7,_0x51e685._0x4dccc9,0x48c)]===void 0x0?deriveFinalToolOutput(_0x55ce64):normalizeToolOutputValue(_0x4d1e8b['value']),_0x3c87f7=createSuccessToolResult(_0x4de6b8,_0x492922,_0x55ce64);return await emitEvent(_0xc329ca,{'type':_0x5cb712(_0x51e685._0x234e00,0x45f,_0x51e685._0x1fd2b3,0x449),'toolCall':_0x4de6b8,'result':_0x3c87f7},_0x1dd280),_0x3c87f7;}catch(_0x34000c){if(isAbortError(_0x34000c)){const _0x4e53f1=createAbortedToolResult(_0x4de6b8,_0x34000c,_0x55ce64);return await emitEvent(_0xc329ca,{'type':_0x33d97e(-0x1d8,-_0x51e685._0x286cfc,-0x187,-_0x51e685._0x4a6974),'toolCall':_0x4de6b8,'result':_0x4e53f1},_0x1dd280),_0x4e53f1;}const {errorMessage:_0xc4c65b,structured:_0x3af221}=normalizeExecutionError(_0x34000c),_0x5780ca=createErrorToolResult(_0x4de6b8,_0xc4c65b,_0x3af221,_0x55ce64);return await emitEvent(_0xc329ca,{'type':_0x5cb712(_0x51e685._0x1e109c,0x44e,0x486,_0x51e685._0x187982),'toolCall':_0x4de6b8,'result':_0x5780ca},_0x1dd280),_0x5780ca;}finally{_0x1f5fea();}}catch(_0x32113a){if(isAbortError(_0x32113a)){const _0x1a8885=createAbortedToolResult(_0x4de6b8,_0x32113a);return await emitEvent(_0xc329ca,{'type':_0x33d97e(-_0x51e685._0x5b1603,-0x18f,-_0x51e685._0x425f53,-0x1a7),'toolCall':_0x4de6b8,'result':_0x1a8885},_0x1dd280),_0x1a8885;}const {errorMessage:_0xcc5dd4,structured:_0x586ebe}=normalizeExecutionError(_0x32113a),_0x2e4977=createErrorToolResult(_0x4de6b8,_0xcc5dd4,_0x586ebe);return await emitEvent(_0xc329ca,{'type':_0x5cb712(0x45e,_0x51e685._0x2051a9,_0x51e685._0x1d34a3,_0x51e685._0x187982),'toolCall':_0x4de6b8,'result':_0x2e4977},_0x1dd280),_0x2e4977;}}async function executeToolCall(_0x283be2,_0x4c4dad,_0x16a0e8,_0x5bcdb7,_0x22213f){const _0x2e6a46={_0x3ab0ab:0x100},_0x5982bb=_0x283be2['get'](_0x4c4dad['name']);function _0x386825(_0x37b7f0,_0x218bd7,_0x149b83,_0x451aca){return _0x253ce3(_0x37b7f0-0x192,_0x451aca,_0x149b83-0x1b2,_0x218bd7- -0xb4);}const _0x5f0e21=_0x5982bb?.['internalLifecycle']?.[_0x386825(_0x2e6a46._0x3ab0ab,0xa9,0xf4,0xf1)]();try{return await executeCapturedToolCall(_0x5982bb,_0x4c4dad,_0x16a0e8,_0x5bcdb7,_0x22213f);}finally{_0x5f0e21?.();}}function createInternalToolRuntime(_0x2d1d68=[],_0x4e1711={}){const _0x48fccb={_0x52a4e2:0x2e3},_0x408bd1={_0xd8b96f:0x4ff,_0x93d6ce:0x4e8,_0x491efb:0x8d,_0x4ee6f6:0xbe,_0x1bc47c:0x9d},_0x115375={_0x594f19:0x2e8,_0x31406f:0x289},_0x48ab40={_0x3e458a:0x7d,_0x5be23d:0xa};let _0xe66b81=new ToolRegistry(_0x2d1d68);return{'listToolSchemas'(){const _0xe0e01b={_0x5c44c8:0xbe};function _0x5c2f3c(_0x5b8057,_0x3475bf,_0x1a01a6,_0x85af3c){return _0x5eb5(_0x3475bf- -_0xe0e01b._0x5c44c8,_0x5b8057);}return _0xe66b81[_0x5c2f3c(_0x48ab40._0x3e458a,0x52,_0x48ab40._0x5be23d,0x93)]();},'setTools'(_0x1fce05){_0xe66b81=new ToolRegistry(_0x1fce05);},async 'executeCalls'(_0x293534,_0x13410e){const _0x36fab6={_0x520f51:0x15,_0x429393:0x100},_0x1be979={_0x45c5ce:0x58};function _0x5105e2(_0x565e24,_0x4b2570,_0x5e12c8,_0x2bc07d){return _0x5eb5(_0x565e24-0x371,_0x2bc07d);}function _0x3c0fd8(_0x4604f3,_0x3a02f9,_0x2945a6,_0x404000){return _0x5eb5(_0x4604f3- -_0x1be979._0x45c5ce,_0x404000);}return await Promise[_0x5105e2(0x4a8,0x472,_0x408bd1._0xd8b96f,_0x408bd1._0x93d6ce)](_0x293534[_0x3c0fd8(_0x408bd1._0x491efb,_0x408bd1._0x4ee6f6,_0x408bd1._0x1bc47c,0xb4)](async _0x45528c=>{function _0x5a5366(_0x15466b,_0x4d8e50,_0x438610,_0x46f7fc){return _0x3c0fd8(_0x15466b-0x1ce,_0x4d8e50-_0x36fab6._0x520f51,_0x438610-_0x36fab6._0x429393,_0x4d8e50);}return await executeToolCall(_0xe66b81,_0x45528c,_0x13410e,_0x4e1711[_0x5a5366(_0x115375._0x594f19,0x2e1,_0x115375._0x31406f,0x30f)],_0x4e1711['onEvent']);}));},async 'execute'(_0x24641c,_0x2f3da6){function _0xbd4cf4(_0x2e0de3,_0x2ed067,_0x31080f,_0x352629){return _0x5eb5(_0x352629- -0x38b,_0x2e0de3);}const [_0x41ebe9]=await this[_0xbd4cf4(-0x2a4,-0x2a0,-0x2cc,-_0x48fccb._0x52a4e2)]([_0x24641c],_0x2f3da6);return _0x41ebe9;}};}function getOrderedObserverExtensions(_0x510749,_0x2bbd84){const _0x5b9e85={_0x31feba:0x3bc,_0x574266:0x3fd,_0x20ee42:0x382},_0x39c2c5={_0x237f83:0xdb,_0x361881:0xa3,_0x1a2cae:0x100,_0x238b68:0x123,_0x27edf6:0x10d,_0x23386a:0x82,_0x3f3ad7:0x14c},_0x3d914b={_0x15e7e9:0xb5,_0x4d6677:0x11a,_0x535283:0x8e,_0x366d4c:0x99,_0x1e6891:0xad,_0x203913:0x91,_0x484979:0x110,_0xc37a5b:0x15f,_0x450d6e:0x164,_0x471af3:0xa9},_0x3651a9={_0x10b643:0x115},_0x296abd={_0x449873:0x12f,_0x47dcee:0xb9},_0x5c2f63={_0x46b574:0x185,_0x2f945f:0x35,_0x2ec226:0x1c3};function _0x32ac28(_0x377403,_0xaf5cd5,_0x44f4f4,_0x2d7dcb){return _0x1b09d0(_0x377403,_0xaf5cd5-_0x5c2f63._0x46b574,_0x2d7dcb-_0x5c2f63._0x2f945f,_0x2d7dcb-_0x5c2f63._0x2ec226);}function _0x1891b5(_0x1a5460,_0x4f7d9b,_0x3bb1bb,_0x4f8d20){return _0x1b09d0(_0x4f8d20,_0x4f7d9b-_0x296abd._0x449873,_0x4f7d9b- -0x169,_0x4f8d20-_0x296abd._0x47dcee);}return _0x510749[_0x32ac28(0x447,_0x5b9e85._0x31feba,0x424,_0x5b9e85._0x574266)](_0x52bfcc=>{const _0xa395a7={_0x16b5cd:0x16d,_0x3ade78:0x1ba,_0x4c2d87:0x486};function _0x35de5f(_0x38cb46,_0x522061,_0x594928,_0x257df7){return _0x32ac28(_0x257df7,_0x522061-_0xa395a7._0x16b5cd,_0x594928-_0xa395a7._0x3ade78,_0x594928- -_0xa395a7._0x4c2d87);}function _0x51f5a3(_0x2d81cc,_0x35a9de,_0x35b712,_0x10bd52){return _0x32ac28(_0x10bd52,_0x35a9de-_0x3651a9._0x10b643,_0x35b712-0x13b,_0x2d81cc- -0x4c8);}return _0x52bfcc['enabled']!==![]&&_0x52bfcc[_0x51f5a3(-_0x3d914b._0x15e7e9,-_0x3d914b._0x4d6677,-_0x3d914b._0x535283,-0xee)]===_0x2bbd84&&_0x52bfcc[_0x35de5f(-_0x3d914b._0x366d4c,-0x9f,-_0x3d914b._0x1e6891,-_0x3d914b._0x203913)]===_0x51f5a3(-_0x3d914b._0x484979,-_0x3d914b._0xc37a5b,-_0x3d914b._0x450d6e,-_0x3d914b._0x471af3);})[_0x32ac28(_0x5b9e85._0x20ee42,0x362,0x368,0x3bc)]((_0x2db3ee,_0x3f0f85)=>{const _0x8fc8c9={_0xf200e8:0x113,_0x14a837:0x2a4};function _0x46965c(_0x337b97,_0x507f5b,_0x7c614d,_0x53f032){return _0x1891b5(_0x337b97-0x158,_0x337b97- -0xb6,_0x7c614d-0x7b,_0x507f5b);}if(_0x2db3ee[_0x80f820(0xae,_0x39c2c5._0x237f83,0x78,_0x39c2c5._0x361881)]===!![]&&_0x3f0f85['terminal']!==!![])return 0x1;if(_0x2db3ee[_0x80f820(_0x39c2c5._0x1a2cae,0xdb,_0x39c2c5._0x238b68,_0x39c2c5._0x27edf6)]!==!![]&&_0x3f0f85[_0x80f820(_0x39c2c5._0x23386a,0xdb,0xde,0x116)]===!![])return-0x1;function _0x80f820(_0x295955,_0x323a14,_0x3ed112,_0x4c3b18){return _0x32ac28(_0x3ed112,_0x323a14-0xee,_0x3ed112-_0x8fc8c9._0xf200e8,_0x323a14- -_0x8fc8c9._0x14a837);}return _0x2db3ee[_0x80f820(_0x39c2c5._0x3f3ad7,0x186,0x139,0x1b7)]-_0x3f0f85['order'];});}function _0x253ce3(_0x3b157a,_0xe855e7,_0x4f9617,_0x4a5aea){const _0x4f4b03={_0xd51631:0xaa};return _0x5eb5(_0x4a5aea-_0x4f4b03._0xd51631,_0xe855e7);}function getOrderedTransformerExtensions(_0x4becf5,_0x18c8ab){const _0x5e3e0c={_0x323c6a:0x195,_0x1c5feb:0x1f5,_0x4f3134:0x40b},_0x4099ff={_0x2f4714:0x3b0,_0x29ff9c:0x429,_0x389e59:0x3c9,_0x8ba617:0x213,_0x4dff84:0x1de,_0x413279:0x28d},_0x1f8806={_0x4b2137:0x231},_0x24b72b={_0x13be5c:0xc4,_0x383571:0x266},_0x546778={_0x2fabbd:0xa4};function _0x258e6b(_0x439a83,_0x714a37,_0x532a4e,_0x531770){return _0x1b09d0(_0x439a83,_0x714a37-_0x546778._0x2fabbd,_0x531770- -0x1d3,_0x531770-0xd0);}function _0x1419e3(_0xe8a8df,_0xe83f41,_0x28692f,_0x1a596a){return _0x253ce3(_0xe8a8df-_0x24b72b._0x13be5c,_0xe8a8df,_0x28692f-0x135,_0xe83f41-_0x24b72b._0x383571);}return _0x4becf5[_0x258e6b(0x18e,_0x5e3e0c._0x323c6a,0x1d6,_0x5e3e0c._0x1c5feb)](_0x3e2dc7=>{const _0x5987ab={_0x39175f:0x1d7};function _0x898198(_0x5bf7fb,_0x2483b5,_0x19996b,_0x2333c6){return _0x258e6b(_0x5bf7fb,_0x2483b5-_0x5987ab._0x39175f,_0x19996b-0x1ad,_0x2483b5- -0x44b);}function _0x2a896e(_0x4f33f2,_0x2de065,_0x4c0ed2,_0x22a5d7){return _0x258e6b(_0x2de065,_0x2de065-0xc6,_0x4c0ed2-0x2f,_0x22a5d7-_0x1f8806._0x4b2137);}return _0x3e2dc7[_0x2a896e(_0x4099ff._0x2f4714,0x384,_0x4099ff._0x29ff9c,_0x4099ff._0x389e59)]!==![]&&_0x3e2dc7[_0x898198(-_0x4099ff._0x8ba617,-0x240,-_0x4099ff._0x4dff84,-_0x4099ff._0x413279)]===_0x18c8ab&&_0x3e2dc7['kind']==='transformer';})[_0x1419e3(0x467,_0x5e3e0c._0x4f3134,0x421,0x3b2)]((_0x14ace5,_0x544d08)=>_0x14ace5['order']-_0x544d08['order']);}function createExtensionRegistry(){const _0x34cb62={_0x3f7cb5:0x88},_0x43bebc={_0x35bdc7:0x1da,_0x4ff21b:0x1d0},_0x454757={_0x4371ac:0x190,_0x2412f8:0x154,_0xfbea88:0x176,_0x52e905:0x16d,_0x2a332b:0x186,_0x2daabc:0x18c,_0x38c8e6:0x13f,_0x1095f9:0x20e,_0x11283e:0x1f6,_0x287150:0x216,_0x2de06f:0x16c,_0x51479f:0x1e2,_0x73077:0x175,_0x1e1cec:0x1ba,_0x40ec13:0x1e9},_0x54de06={_0x5b73d7:0xb8},_0x47866e=[];return{'register'(_0x44454f){if(_0x44454f['kind']==='observer'&&_0x44454f[_0x33b10a(-_0x454757._0x4371ac,-0xed,-0xee,-_0x454757._0x2412f8)]!==![]&&_0x44454f[_0x23700d(_0x454757._0xfbea88,_0x454757._0x52e905,0x16f,_0x454757._0x2a332b)]===!![]){const _0x3b71db=_0x47866e['find'](_0xfa7921=>_0xfa7921[_0x23700d(0x1d0,0x1e1,0x1da,0x200)]==='observer'&&_0xfa7921[_0x23700d(0x197,0x18f,0x1f2,0x1c6)]!==![]&&_0xfa7921[_0x23700d(0x20a,0x1ec,0x1f1,0x1ac)]===_0x44454f['stage']&&_0xfa7921['terminal']===!![]);if(_0x3b71db)throw new Error('Cannot\x20register\x20terminal\x20observer\x20\x22'+_0x44454f['id']+_0x33b10a(-0x1a4,-_0x454757._0x2daabc,-_0x454757._0x38c8e6,-0x17a)+_0x44454f[_0x23700d(0x20a,_0x454757._0x1095f9,0x205,_0x454757._0x11283e)]+_0x23700d(_0x454757._0x287150,0x210,0x232,0x26a)+_0x3b71db['id']+_0x23700d(0x19b,_0x454757._0x2de06f,_0x454757._0x51479f,_0x454757._0x73077));}function _0x33b10a(_0x34111b,_0x403459,_0xbc7ea9,_0x39eca){return _0x5eb5(_0x39eca- -0x233,_0xbc7ea9);}function _0x23700d(_0x4b4d4c,_0x5a1445,_0x1ecf5d,_0x2abf15){return _0x5eb5(_0x4b4d4c-_0x54de06._0x5b73d7,_0x5a1445);}_0x47866e[_0x23700d(_0x454757._0x1e1cec,0x204,_0x454757._0x40ec13,0x1f9)]({..._0x44454f});},async 'runTransformers'(_0x48e956,_0x451b16,_0x1e9945){const _0x461866={_0x3267f2:0x29a};let _0xee7c6d=_0x451b16;for(const _0x6dd26d of getOrderedTransformerExtensions(_0x47866e,_0x48e956)){_0xee7c6d=await _0x6dd26d[_0x133d38(-_0x43bebc._0x35bdc7,-0x1c1,-_0x43bebc._0x4ff21b,-0x1c7)](_0xee7c6d,_0x1e9945);}function _0x133d38(_0x39d8c8,_0x536b71,_0xf173c5,_0x4a834e){return _0x5eb5(_0x4a834e- -_0x461866._0x3267f2,_0x39d8c8);}return _0xee7c6d;},async 'runObservers'(_0x99d0e5,_0x453b11,_0x161d82){const _0x331081={_0x553676:0x37};function _0x2469b2(_0x32908,_0xfc41f1,_0x16992e,_0x2ae40f){return _0x5eb5(_0x2ae40f- -_0x331081._0x553676,_0x32908);}for(const _0x4f1db9 of getOrderedObserverExtensions(_0x47866e,_0x99d0e5)){await _0x4f1db9[_0x2469b2(0xa7,_0x34cb62._0x3f7cb5,0x6a,0x9c)](_0x453b11,_0x161d82);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0,'totalCostUsdTicks':0x0,'totalReportedCostUsdTicks':0x0,'totalEstimatedCostUsdTicks':0x0,'reportedCostCallCount':0x0,'estimatedCostCallCount':0x0,'unpricedModelCallCount':0x0,'historicalMetricsComplete':!![],'missingHistoricalModelCallCount':0x0};}function _0x2891(){const _0x36673b=['B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','D3jPDgu','ywrK','yxnZAxn0yw50twvZC2fNzuLK','BwvZC2fNzq','CNvUvhjHBNnMB3jTzxjZ','B3jKzxi','CMvQzwn0','x3n5C3rLBvbYB21WDa','yMvMB3jLqxnZAxn0yw50qxbWzw5K','ywn0Aw9U','Bwf4','yw1VDw50vxnKvgLJA3m','ChjVDMLKzxi','CMvHza','B25uB29Sq2fSBa','yw55t2y','y2f0y2G','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','mJGZmJK2odHKzKXdvgm','CMvHC29U','zxHLy3v0zunHBgXZ','CMvNAxn0zxi','DhvYBKnVBxbSzxrLzef0','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','Dg9VBenHBgXdB3vUDa','Bwf4vg9Rzw5Z','Dw5RBM93BL90B29S','Dg9VBf91C2vFBwvZC2fNzq','BgvUz3rO','C2vZC2LVBKrPCG','oIb1BMv4CgvJDgvKigzPzwXKici','ywnXDwLYzq','zw51Bq','ChjVDMLKzxjtDgf0zq','C2vZC2LVBI0','mZCXnJC4AK5Us3bj','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','iIbMB3iG','Dg9VBf9ZDgfYDgvK','Dg90ywXjBNb1DfrVA2vUCW','CMvJB3jKrxzLBNq','CMvZCg9UC2u','DgvYBwLUywW','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','y2f1C2u','Dgv4Da','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','C3LZDgvTuhjVBxb0','z2v0vg9VBhm','yxnRvxnLCG','C2v0u2vZC2LVBKLK','y29UDgv4DfDPBMrVD0XPBwL0','B2jQzwn0','Aw5WDxrty2HLBwe','C3vTBwfYEuLUzgv4','C3rYDwn0DxjLza','z2v0q29UDgv4DfDPBMrVD0XPBwL0','DgHLBG','CMvZzxrnzxnZywDLCW','CNvUt2jZzxj2zxjZ','Dg9VBf91C2u','Dg9VBf9JB21WBgv0zwq','B3v0Chv0','CNvU','zxHLy3v0Aw9Uqxv0Ag9YAxPHDgLVBG','C2LNBMfS','CMvNAxn0CNK','ChjVDMLKzxjFCMv0CNK','ywz0zxjuDxjUq29TCgXLDgu','mJe2otG0mfvxEhrRqq','Dg9VBfj1BNrPBwu','Dg9VBhncEu5HBwu','C2XPy2u','Bwv0yq','DhvYBI0','zw5HyMXLza','BMfTzq','Dg9VBf9VDxrWDxrFy2H1BMS','yMvMB3jLrMLUywXpDxrWDxq','iIbPCYbHBhjLywr5igvUywjSzwq','zMLUywXnzxnZywDL','BwfW','ChjVCgvYDgLLCW','zgvWCW','mJrOzgP1ufC','AgfZt3DU','Dg9tDhjPBMC','CMvWB3j0zwrdB3n0','oIbLEhbLy3rLzcbZDhjPBMC','oIbLEhbLy3rLzcbVBMuGB2yG','DhjPBq','mJqXmZaWD3rbthPu','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','CMvHC29UAw5NtwvZC2fNzuLK','BM93','Aw5KzxG','zgvSDge','Dg90ywXfC3rPBwf0zwrdB3n0vxnKvgLJA3m','B25fDMvUDa','B2jZzxj2zxi','CMvTB3zLrxzLBNrmAxn0zw5LCG','y2HHDe1VzgvS','Bw9KzwXjzgvUDgL0Eq','C29YDa','DxnHz2u','Dg9VBhm','C2vUza','ChjVDMLKzxjFC3rYzwfTx3jLC2v0','CMvHC29UAw5Nu3rHCNrLzef0','AxnbCNjHEq','ChvZAa','oIbLEhbLy3rLzcbHCNjHEq','DhvYBKLUzgv4','ywrKAxrPB25HBfbYB3bLCNrPzxm','AxrLBxm','zgvMyxvSDe1LC3nHz2u','Dg90ywXpDxrWDxruB2TLBNm','mtK3ng10wvDktW','y29TCgXLDgvK','zg9Uzq','DhLWzq','BNvTyMvY','y29UDgvUDeLUzgv4','C3rYzwfT','BgLZDfrVB2Xty2HLBwfZ','yxnZAxn0yw50x21LC3nHz2u','zxH0zw5ZAw9UCW','zxHLy3v0zq','DMfSDwu','ywz0zxjuB29SuMvZDwX0','mtK3ndG5nNHZywLVCa','yM9VBgvHBG','A2LUza','y29UDgvUDa','Bw9KzwXuAw1Ltxm','oIbLEhbLy3rLzcbIB29SzwfU','mZuXmtG5mgn4A1zKEq','C3LZDgvT','zMLUza','B25vC2vYtwvZC2fNzq','Dg9VBf9JywXS','oMfZC2LZDgfUDdO','Dg9VBf91C2vFzgvSDge','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','DhvYBKLK','zhjHAw5tDgvLCMLUzW','sw52ywXPzcb0B29SigLUChv0igf0ia','Dg90ywXdB3n0vxnKvgLJA3m','DMfSDwvZ','Bw9KzwXFCMvXDwvZDa','zMLUywXFBwvZC2fNzq','y29TCgXLDgu','B3v0Chv0rM9YBwf0','C29Tzq','Bw9KzwXdywXSCW','CMvHC29UAw5Nx2nODw5R','C3rYAw5NAwz5','C2v0vg9VBhm','CMvXDwvZDenVDw50','vg9VBev4zwn1DgLVBKvYCM9Y','BwvZC2fNzxm','CMvHC29UAw5Nvg9Rzw5Z','Aw5WDxq','ywXS','Dg90ywXszwfZB25PBMDuB2TLBNm','DgHPBMTPBMC','BwLZC2LUz01VzgvSq2fSBenVDw50','Dg9VBfjLC3vSDhm','zMLSDgvY','zxjYB3i','z2v0','Dw5WCMLJzwrnB2rLBenHBgXdB3vUDa','DhvYBL9JB21WBgv0zq','C2vZC2LVBKLK','zxn0Aw1HDgvKq29ZDenHBgXdB3vUDa','CMvZB2X2zq','B3v0Chv0sw5KzxG','C2v0vg9WAwm','B3v0Chv0vg9Rzw5Z','Dg9VBf91C2vFy2H1BMS','Bw9KzwW','C3rYAw5N','ywjVCNq','BgLZDa','yMvMB3jLvg9VBev4zwn1DgLVBG','AxrLBuLK','DxnLCL9TzxnZywDL','vw5RBM93BIb0B29SoIa','Bw9KzwXFCMvZCg9UC2u','ywz0zxjnzxnZywDLqxbWzw5K','C3rHz2u','CMfJzq','Bwv0CMLJCW','Dg9VBf9YzwPLy3rLza','ChjPy2LUz1bYB3zPzgvYswq','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','C3rHDgu','CMvHC29UAw5Nq29TCgXLDgvKqxq','C2v0q2HHDe1VzgvS','y29UDgvUDf9KzwX0yq','ywjVCNrLza','oIbLEhbLy3rLzcbUDw1Izxi','oIb0zxjTAw5HBcbVyNnLCNzLCIaI','yxjYyxK','Aw5WDxrezwX0yq','zgvZy3jPChrPB24','A2v5CW'];_0x2891=function(){return _0x36673b;};return _0x2891();}function applyModelCall(_0x57b336,_0x5959e2){const _0xddac46={_0x11a13c:0x2c5,_0x19ab15:0x313,_0x2f26e0:0x2a9,_0x1ba759:0x86,_0xb4545e:0x49,_0x95cf1c:0x9,_0x3b3d97:0x55,_0x1e5e93:0x6,_0x292f72:0x47,_0x3774e1:0x349,_0x29bbde:0x34d,_0x204c63:0x23a,_0x56ecf8:0x18,_0xf90b47:0x2b7,_0x1360a5:0x254,_0x335999:0x2a,_0x4127c2:0x0,_0x52b2f1:0x3f,_0x2a1c0c:0x38,_0x56ce91:0x246,_0x3ec421:0x274,_0xf2c05f:0x27b,_0x169b2f:0x63,_0x2f2425:0x36,_0xe8d494:0x70,_0xc95ec2:0x52,_0x3ad0ec:0x44,_0x460488:0x4e,_0x34031a:0xb2,_0x475e32:0x9f},_0x21e7a3={_0x2bfb66:0x37c,_0x47e8c2:0x102},_0x1d411a={_0x169a4c:0x14a},_0x5a0603=_0x5959e2['usage'],_0x488da8=_0x5a0603['inputTokens'];function _0x461206(_0xf548b5,_0x278b0e,_0x32f59f,_0x5069f8){return _0x1b09d0(_0x278b0e,_0x278b0e-0xe7,_0xf548b5- -0x10d,_0x5069f8-_0x1d411a._0x169a4c);}const _0x1c7d18=_0x5a0603[_0x461206(_0xddac46._0x11a13c,_0xddac46._0x19ab15,_0xddac46._0x2f26e0,0x281)],_0x42fe2d=_0x5a0603[_0x594eac(_0xddac46._0x1ba759,0x45,_0xddac46._0xb4545e,_0xddac46._0x95cf1c)]??0x0,_0x3df39f=_0x488da8+_0x1c7d18,_0x5778d1=_0x5a0603[_0x594eac(-_0xddac46._0x3b3d97,-0x5,-_0xddac46._0x1e5e93,-_0xddac46._0x292f72)]?.[_0x461206(0x2ee,0x2ab,_0xddac46._0x3774e1,0x290)],_0x1982ba=_0x5a0603['estimatedCost']?.[_0x461206(0x2ee,_0xddac46._0x29bbde,0x2ee,0x2d7)],_0x2a6324=_0x5778d1??_0x1982ba;function _0x594eac(_0x5b000c,_0x1fcf25,_0x48bec9,_0x2eb509){return _0x1b09d0(_0x2eb509,_0x1fcf25-0x1c7,_0x1fcf25- -_0x21e7a3._0x2bfb66,_0x2eb509-_0x21e7a3._0x47e8c2);}const {currentReportedCostUsdTicks:_0x522801,currentEstimatedCostUsdTicks:_0x2d461c,..._0x10de94}=_0x57b336;return{..._0x10de94,'totalTokens':_0x10de94['totalTokens']+_0x3df39f,'totalInputTokens':_0x10de94[_0x461206(_0xddac46._0x204c63,0x1f6,0x26b,0x26c)]+_0x488da8,'totalOutputTokens':_0x10de94[_0x594eac(0x49,_0xddac46._0x56ecf8,0x6b,0x42)]+_0x1c7d18,'totalReasoningTokens':_0x10de94[_0x461206(_0xddac46._0xf90b47,0x25f,_0xddac46._0x1360a5,0x257)]+_0x42fe2d,'modelCallCount':_0x10de94['modelCallCount']+0x1,'totalModelTimeMs':_0x10de94['totalModelTimeMs']+_0x5959e2[_0x594eac(0x21,0x2a,0x45,-_0xddac46._0x335999)],'currentTokens':_0x3df39f,'currentInputTokens':_0x488da8,'currentOutputTokens':_0x1c7d18,'currentReasoningTokens':_0x42fe2d,'currentModelTimeMs':_0x5959e2['modelTimeMs'],..._0x10de94[_0x594eac(_0xddac46._0x4127c2,-0x29,_0xddac46._0x52b2f1,-_0xddac46._0x2a1c0c)]&&_0x3df39f>0x0?{'contextWindowUsage':_0x3df39f/_0x10de94[_0x461206(_0xddac46._0x56ce91,0x216,0x28f,0x215)]}:{},'totalCostUsdTicks':_0x2a6324===void 0x0?_0x10de94[_0x461206(0x2a6,0x2c6,_0xddac46._0x3ec421,_0xddac46._0xf2c05f)]:_0x10de94[_0x461206(0x2a6,0x2fd,0x304,0x30c)]+_0x2a6324,'totalReportedCostUsdTicks':_0x5778d1===void 0x0?_0x10de94['totalReportedCostUsdTicks']:_0x10de94['totalReportedCostUsdTicks']+_0x5778d1,'totalEstimatedCostUsdTicks':_0x1982ba===void 0x0?_0x10de94['totalEstimatedCostUsdTicks']:_0x10de94[_0x594eac(-_0xddac46._0x169b2f,0x5,0x63,_0xddac46._0x2f2425)]+_0x1982ba,'reportedCostCallCount':_0x5778d1===void 0x0?_0x10de94['reportedCostCallCount']:_0x10de94['reportedCostCallCount']+0x1,'estimatedCostCallCount':_0x1982ba===void 0x0?_0x10de94[_0x594eac(_0xddac46._0xe8d494,_0xddac46._0xc95ec2,_0xddac46._0x3ad0ec,0x75)]:_0x10de94[_0x594eac(0x24,0x52,_0xddac46._0x460488,_0xddac46._0x34031a)]+0x1,'unpricedModelCallCount':_0x5778d1===void 0x0&&_0x1982ba===void 0x0?_0x10de94[_0x594eac(0x41,0x4f,0x54,_0xddac46._0x475e32)]+0x1:_0x10de94['unpricedModelCallCount'],..._0x5778d1!==void 0x0?{'currentReportedCostUsdTicks':_0x5778d1}:{},..._0x1982ba!==void 0x0?{'currentEstimatedCostUsdTicks':_0x1982ba}:{}};}function createAgentMetrics(_0x555e0e={}){const _0x5ac436={_0x4ce66d:0x2ce,_0xd2733f:0x2e6},_0x177037={_0x49c1e9:0xe8,_0x3d77ee:0x20c,_0x577d7e:0x1e1,_0x8b3fa3:0x1d2,_0x383234:0x198,_0x1282dd:0x1a2,_0x1b5041:0x17a,_0x28af45:0x14b,_0x40d6d6:0x127,_0x394b66:0x136,_0x49532a:0x175,_0x3b615c:0x22c,_0x4ff57c:0x25c,_0x31c385:0x1de},_0x1d1457={_0x56dd5a:0x489,_0x579966:0x42c,_0x1e4184:0x4c4,_0x593d00:0x447,_0x2f8748:0x208,_0x3dfdd8:0x1d0,_0x1cd6c0:0x3f8,_0xa548e5:0x1b4,_0x2f0920:0x1ae,_0xa24b16:0x455,_0x9566e5:0x455,_0x270f3e:0x1bb,_0x5d252e:0x18f,_0x221c53:0x169,_0x1d6ad4:0x1e2,_0x309b76:0x246,_0xde1250:0x206,_0x3528cb:0x1a4,_0xcab921:0x200},_0x14422e={_0x4cf34b:0xb8};let _0x2f108f=createEmptySnapshot();const _0x220bf2=new Set();let _0x341e3d;const _0x3c9565=()=>{const _0x1c77d8={..._0x2f108f};for(const _0x26b812 of _0x220bf2)_0x26b812(_0x1c77d8);};return{'getSnapshot'(){return{..._0x2f108f};},'recordEvent'(_0x5d1606){if(_0x5d1606[_0x2caf3b(0x482,0x3e3,0x447,0x4ae)]===_0x2caf3b(_0x1d1457._0x56dd5a,_0x1d1457._0x579966,0x464,_0x1d1457._0x1e4184)){_0x341e3d=Date[_0x2caf3b(0x43e,0x42f,0x42d,0x3f1)]();const _0x1eca77=_0x555e0e['getContextWindowLimit']?.(_0x5d1606['request']);_0x1eca77!==void 0x0&&(_0x2f108f={..._0x2f108f,'contextWindowLimit':_0x1eca77},_0x3c9565());return;}function _0x42b756(_0x29dae9,_0x469f84,_0x9342f4,_0x5c6241){return _0x5eb5(_0x29dae9-_0x14422e._0x4cf34b,_0x5c6241);}function _0x2caf3b(_0x4f6ee9,_0x3e3acd,_0x5b03cf,_0x334040){return _0x5eb5(_0x5b03cf-0x33b,_0x4f6ee9);}if(_0x5d1606[_0x2caf3b(0x420,0x428,_0x1d1457._0x593d00,0x402)]===_0x42b756(_0x1d1457._0x2f8748,0x207,0x1a9,_0x1d1457._0x3dfdd8)){const _0x1a8ca7=_0x341e3d===void 0x0?0x0:Date['now']()-_0x341e3d;_0x341e3d=void 0x0,_0x2f108f=applyModelCall(_0x2f108f,{'usage':_0x5d1606[_0x2caf3b(0x3fb,0x3a4,_0x1d1457._0x1cd6c0,0x452)][_0x42b756(_0x1d1457._0xa548e5,0x170,0x20b,_0x1d1457._0x2f0920)],'modelTimeMs':_0x5d1606[_0x2caf3b(0x48f,_0x1d1457._0xa24b16,_0x1d1457._0x9566e5,0x45d)]??_0x1a8ca7}),_0x3c9565();return;}if(_0x5d1606[_0x42b756(0x1c4,_0x1d1457._0x270f3e,_0x1d1457._0x5d252e,0x210)]==='tool_call'){_0x2f108f={..._0x2f108f,'toolCallCount':_0x2f108f['toolCallCount']+0x1},_0x3c9565();return;}_0x5d1606[_0x42b756(0x1c4,_0x1d1457._0x221c53,0x16b,0x1c3)]===_0x42b756(_0x1d1457._0x1d6ad4,_0x1d1457._0x309b76,_0x1d1457._0xde1250,_0x1d1457._0x3528cb)&&(_0x2f108f={..._0x2f108f,'requestCount':_0x2f108f[_0x42b756(0x1ea,0x204,0x239,_0x1d1457._0xcab921)]+0x1},_0x3c9565());},'reset'(){_0x2f108f=createEmptySnapshot(),_0x341e3d=void 0x0,_0x3c9565();},'restore'(_0x5ffc0b){let _0x36973d=createEmptySnapshot();for(const _0x35a4ef of _0x5ffc0b[_0x4e3472(0x16c,0x11b,_0x177037._0x49c1e9,0xda)]){_0x36973d=applyModelCall(_0x36973d,{'usage':_0x35a4ef['usage'],'modelTimeMs':_0x35a4ef[_0x50bdce(0x257,_0x177037._0x3d77ee,0x1b8,0x24a)]});}_0x2f108f={..._0x36973d,'requestCount':_0x5ffc0b[_0x50bdce(_0x177037._0x577d7e,0x220,_0x177037._0x8b3fa3,0x1dc)]['filter'](_0x2332ca=>_0x2332ca['completesRequest'])[_0x50bdce(_0x177037._0x383234,_0x177037._0x1282dd,0x1e2,0x1a9)],'toolCallCount':_0x5ffc0b[_0x50bdce(0x187,0x19e,0x164,_0x177037._0x1b5041)],'historicalMetricsComplete':_0x5ffc0b[_0x4e3472(_0x177037._0x28af45,_0x177037._0x40d6d6,_0x177037._0x394b66,_0x177037._0x49532a)]===0x0,'missingHistoricalModelCallCount':_0x5ffc0b[_0x50bdce(0x27b,_0x177037._0x3b615c,_0x177037._0x4ff57c,_0x177037._0x31c385)]},_0x341e3d=void 0x0;function _0x50bdce(_0x44cb05,_0x4e327b,_0x41488a,_0xfc72dd){return _0x5eb5(_0x4e327b-0xf2,_0x44cb05);}function _0x4e3472(_0x616e60,_0x52b8c9,_0x2ed4b1,_0x1ae0c3){return _0x5eb5(_0x52b8c9- -0x13,_0x2ed4b1);}_0x3c9565();},'subscribe'(_0x65c66c){const _0x3f8cf4={_0x449376:0x169};_0x220bf2[_0x36ee7e(_0x5ac436._0x4ce66d,_0x5ac436._0xd2733f,0x2ce,0x2a3)](_0x65c66c);function _0x36ee7e(_0x3f4f25,_0x1c0601,_0x473171,_0x5d578a){return _0x5eb5(_0x3f4f25-_0x3f8cf4._0x449376,_0x1c0601);}return()=>{_0x220bf2['delete'](_0x65c66c);};}};}function makeExtensionContext(_0x2e0022){return{'state':_0x2e0022};}async function runStage(_0x45a930,_0x3c346f,_0x19cab8,_0x57834b){const _0x277d44={_0x527857:0x4e9},_0x2dc6a3={_0x5936f4:0xc3,_0x2b219d:0xf5,_0x37d6bc:0x9e},_0x419a6f=await _0x45a930[_0x1a25e0(0x4b5,0x506,_0x277d44._0x527857,0x4d6)](_0x3c346f,_0x19cab8,_0x57834b);await _0x45a930['runObservers'](_0x3c346f,_0x419a6f,_0x57834b);function _0x1a25e0(_0x14336a,_0x40c7fa,_0x2f6cb0,_0x5fb7a6){return _0x1b09d0(_0x5fb7a6,_0x40c7fa-_0x2dc6a3._0x5936f4,_0x2f6cb0-_0x2dc6a3._0x2b219d,_0x5fb7a6-_0x2dc6a3._0x37d6bc);}return _0x419a6f;}async function emitEvent2(_0x44a641,_0x1ca8cc,_0x4ce57a){await _0x44a641?.(_0x1ca8cc,_0x4ce57a);}function replaceToolUseBlocks(_0x7ca15c,_0x540208){const _0x5524a5={_0x4a326f:0x23d,_0x37eee3:0x273,_0xca7661:0x16,_0x526bd4:0x5b},_0x186e46={_0x4616f9:0x2cd,_0x1b8c7a:0x35a},_0xc3b975={_0x68211:0x159};function _0x3fb378(_0x115d30,_0x1b0677,_0x44a110,_0x2544d4){return _0x1b09d0(_0x115d30,_0x1b0677-0xcc,_0x1b0677- -0x33b,_0x2544d4-_0xc3b975._0x68211);}let _0x2d8ae5=0x0;function _0x5a6a86(_0x4ef2d8,_0x13cfae,_0x1b6c40,_0x51ff89){return _0x1b09d0(_0x1b6c40,_0x13cfae-0x17c,_0x4ef2d8- -0x168,_0x51ff89-0xfe);}return{..._0x7ca15c,'content':_0x7ca15c[_0x5a6a86(_0x5524a5._0x4a326f,0x21a,_0x5524a5._0x37eee3,0x243)][_0x3fb378(-_0x5524a5._0xca7661,0x36,_0x5524a5._0x526bd4,0x64)](_0x295d63=>{const _0x3f4d38={_0xaaa1be:0x4fd};function _0x2a2702(_0x5a1902,_0x31b996,_0x266071,_0x413a94){return _0x3fb378(_0x266071,_0x5a1902-0x385,_0x266071-0x35,_0x413a94-0x10f);}if(_0x295d63[_0x30d86f(-0x293,-0x314,-_0x186e46._0x4616f9,-0x320)]!==_0x2a2702(0x3a6,0x3c5,_0x186e46._0x1b8c7a,0x359))return _0x295d63;const _0x1b43cf=_0x540208[_0x2d8ae5];_0x2d8ae5+=0x1;function _0x30d86f(_0x4b248a,_0x902eb1,_0x1ef0cd,_0x539224){return _0x5a6a86(_0x1ef0cd- -_0x3f4d38._0xaaa1be,_0x902eb1-0x15d,_0x902eb1,_0x539224-0x11b);}return structuredClone(_0x1b43cf);})};}function createAssistantMessageId(_0x33d4fc,_0x248632){const _0x1a2b58={_0x1c7563:0x53,_0x5c13c8:0x6a,_0x547cbb:0x6},_0x50c2b2={_0x1ee12a:0x163};function _0x1227bb(_0xe00254,_0x4ad82f,_0x3cb7d0,_0x135851){return _0x253ce3(_0xe00254-_0x50c2b2._0x1ee12a,_0x3cb7d0,_0x3cb7d0-0xcf,_0xe00254- -0x1ba);}return _0x33d4fc+_0x1227bb(0x11,-_0x1a2b58._0x1c7563,_0x1a2b58._0x5c13c8,-_0x1a2b58._0x547cbb)+_0x248632;}function createReasoningMessageId(_0x1e0d40){return _0x1e0d40+':reasoning';}function _0x5eb5(_0x1d5f84,_0x4b7d6b){_0x1d5f84=_0x1d5f84-0xa5;const _0x2891ac=_0x2891();let _0x5eb5a0=_0x2891ac[_0x1d5f84];if(_0x5eb5['KAIklU']===undefined){var _0x173490=function(_0x4dd35c){const _0x2d410e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x157af1='',_0x14cb05='';for(let _0xe3365d=0x0,_0x70fdc5,_0xda0e49,_0x38cfdc=0x0;_0xda0e49=_0x4dd35c['charAt'](_0x38cfdc++);~_0xda0e49&&(_0x70fdc5=_0xe3365d%0x4?_0x70fdc5*0x40+_0xda0e49:_0xda0e49,_0xe3365d++%0x4)?_0x157af1+=String['fromCharCode'](0xff&_0x70fdc5>>(-0x2*_0xe3365d&0x6)):0x0){_0xda0e49=_0x2d410e['indexOf'](_0xda0e49);}for(let _0x2ca0f7=0x0,_0x269af8=_0x157af1['length'];_0x2ca0f7<_0x269af8;_0x2ca0f7++){_0x14cb05+='%'+('00'+_0x157af1['charCodeAt'](_0x2ca0f7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x14cb05);};_0x5eb5['SLWfNp']=_0x173490,_0x5eb5['ErSpNu']={},_0x5eb5['KAIklU']=!![];}const _0x1f6a94=_0x2891ac[0x0],_0xd0c9da=_0x1d5f84+_0x1f6a94,_0xff7d45=_0x5eb5['ErSpNu'][_0xd0c9da];return!_0xff7d45?(_0x5eb5a0=_0x5eb5['SLWfNp'](_0x5eb5a0),_0x5eb5['ErSpNu'][_0xd0c9da]=_0x5eb5a0):_0x5eb5a0=_0xff7d45,_0x5eb5a0;}function withMessageId(_0x57db21,_0x34b015){if(_0x57db21['id']===_0x34b015)return _0x57db21;return{..._0x57db21,'id':_0x34b015};}function createAssistantChunkEvent(_0x5adf37,_0x2205e7){const _0x226014={_0x247362:0x1dc,_0x504a70:0x244,_0x264ad1:0x1fe,_0x19acfb:0x199},_0x354a1d={_0x1d9450:0x1a3},_0x23b7e9={_0x41e496:0x1};function _0xddefa8(_0x3019ee,_0x59e113,_0x321e73,_0x367121){return _0x1b09d0(_0x321e73,_0x59e113-0xe4,_0x3019ee-0x3c,_0x367121-_0x23b7e9._0x41e496);}if(_0x5adf37['type']!=='content_delta')return void 0x0;function _0x2ecbad(_0x3f71b0,_0x18bbb9,_0x4170ff,_0x451fa3){return _0x1b09d0(_0x451fa3,_0x18bbb9-0x3a,_0x4170ff- -_0x354a1d._0x1d9450,_0x451fa3-0x15b);}if(_0x5adf37['text']===void 0x0)return void 0x0;return{'type':'assistant_chunk','index':_0x5adf37[_0x2ecbad(0x22b,0x1f5,_0x226014._0x247362,0x187)]??0x0,'messageId':_0x2205e7,'chunk':{'type':_0x2ecbad(0x238,0x205,_0x226014._0x504a70,0x20e),'index':_0x5adf37[_0x2ecbad(_0x226014._0x264ad1,0x21a,_0x226014._0x247362,_0x226014._0x19acfb)]??0x0,'text':_0x5adf37['text']}};}function createToolUseChunkEvent(_0x2377f1,_0x1afd57){const _0x39c9ff={_0x16f99d:0x2e6,_0x55bfc7:0x29e,_0x42b85a:0x316,_0x19a1df:0x31e,_0x434709:0x29e,_0x508d97:0x343,_0x5f2d11:0x2af,_0x58500a:0x2f1,_0x4accfc:0x29c,_0x4d731c:0x2d2,_0x1360e9:0x2db,_0x40438c:0x255,_0x41daaa:0x272,_0x3cc0b0:0x28e,_0x477e0d:0x311,_0x9ed186:0x31f},_0x29061e={_0x53995c:0x1be,_0x1f69fe:0x1e2,_0x2bb88a:0xcd};function _0x14c7de(_0x5737b4,_0x5b9467,_0x225d67,_0x56dcda){return _0x253ce3(_0x5737b4-_0x29061e._0x53995c,_0x225d67,_0x225d67-_0x29061e._0x1f69fe,_0x5b9467-_0x29061e._0x2bb88a);}function _0x436344(_0x1dd78e,_0x412e75,_0x2e3475,_0x515d4c){return _0x253ce3(_0x1dd78e-0x18d,_0x515d4c,_0x2e3475-0x140,_0x412e75-0x112);}if(_0x2377f1[_0x436344(_0x39c9ff._0x16f99d,0x2c8,0x2bf,_0x39c9ff._0x55bfc7)]!==_0x436344(0x31e,0x2de,_0x39c9ff._0x42b85a,_0x39c9ff._0x19a1df))return void 0x0;return{'type':_0x436344(_0x39c9ff._0x434709,0x303,_0x39c9ff._0x508d97,0x2e3),'index':_0x2377f1[_0x436344(0x2eb,_0x39c9ff._0x5f2d11,0x290,_0x39c9ff._0x58500a)]??0x0,'messageId':_0x1afd57,'chunk':{'type':'tool_use_delta','id':_0x2377f1['id']??'','index':_0x2377f1['index']??0x0,..._0x2377f1[_0x436344(0x256,_0x39c9ff._0x4accfc,_0x39c9ff._0x4d731c,_0x39c9ff._0x1360e9)]!==void 0x0?{'name':_0x2377f1[_0x14c7de(_0x39c9ff._0x40438c,0x257,_0x39c9ff._0x41daaa,_0x39c9ff._0x3cc0b0)]}:{},..._0x2377f1[_0x14c7de(0x333,0x2d7,_0x39c9ff._0x477e0d,_0x39c9ff._0x9ed186)]!==void 0x0?{'inputDelta':_0x2377f1['inputDelta']}:{}}};}function createReasoningChunkEvent(_0x301f17,_0x2a70ec){const _0x5d036e={_0x2d47d0:0x2ab,_0x2ecead:0x24f,_0x40f59d:0x25d,_0x13f856:0x363,_0x1719c6:0x310,_0x5467ad:0x2c8,_0x393560:0x2f6,_0x67831a:0x277,_0xc26d41:0x282,_0x106c6d:0x32c,_0x35ea24:0x2c5,_0xf1cf7:0x2cf,_0x4cff97:0x306,_0x31da6a:0x2f5,_0x1f305b:0x36f,_0x5ead5f:0x363,_0x3f0c8c:0x344,_0x5a33c9:0x34a,_0x2f5aaa:0x2c1,_0x41ff4a:0x2e7,_0x349b6a:0x2a4,_0x5da931:0x298,_0x43b24b:0x340,_0x1aba3d:0x360,_0x192b0a:0x365,_0x378801:0x336,_0x5b0ed9:0x2d5,_0x23a6ea:0x2c7,_0x2df02f:0x2e3,_0x5772de:0x29c,_0x5e7d1b:0x2b8,_0x475632:0x2dd,_0xfea2:0x2fc,_0x5d5191:0x281,_0x1964fa:0x2e9,_0x56059e:0x2d1,_0x4d8d65:0x2c3,_0x3b1c5f:0x325,_0x19aedb:0x32e,_0x2d7ffe:0x2ed,_0x2f3fdc:0x2ef,_0x218258:0x294},_0x3214f3={_0x1ee8c2:0xdc,_0x3277e9:0x137},_0x59dd7={_0x1f04c0:0x110,_0x5d803f:0x149};function _0x576238(_0x3afc69,_0x1bf2ff,_0x41a68f,_0xf646ba){return _0x253ce3(_0x3afc69-_0x59dd7._0x1f04c0,_0x1bf2ff,_0x41a68f-0x10a,_0x3afc69-_0x59dd7._0x5d803f);}function _0x3d64d4(_0x3e25b0,_0x54c22c,_0x15b1af,_0x150598){return _0x253ce3(_0x3e25b0-_0x3214f3._0x1ee8c2,_0x150598,_0x15b1af-0x94,_0x15b1af-_0x3214f3._0x3277e9);}switch(_0x301f17['type']){case _0x576238(_0x5d036e._0x2d47d0,_0x5d036e._0x2ecead,0x2ad,_0x5d036e._0x40f59d):return{'type':_0x3d64d4(0x2e1,_0x5d036e._0x13f856,_0x5d036e._0x1719c6,0x2e1),'index':_0x301f17[_0x3d64d4(_0x5d036e._0x5467ad,_0x5d036e._0x393560,0x2d4,0x2c1)],'messageId':_0x2a70ec,'chunk':{'type':_0x3d64d4(_0x5d036e._0x67831a,_0x5d036e._0xc26d41,0x299,0x244),'index':_0x301f17['index']??0x0,'thinking':_0x301f17[_0x576238(_0x5d036e._0x106c6d,_0x5d036e._0x35ea24,_0x5d036e._0xf1cf7,0x372)]??''},'text':_0x301f17[_0x3d64d4(_0x5d036e._0x4cff97,0x318,0x31a,_0x5d036e._0x31da6a)]??''};case _0x3d64d4(_0x5d036e._0x1f305b,_0x5d036e._0x5ead5f,_0x5d036e._0x3f0c8c,0x39e):return{'type':'reasoning_chunk','index':_0x301f17['contentIndex'],'messageId':_0x2a70ec,'chunk':{'type':_0x3d64d4(0x375,0x35d,0x344,0x38b),'contentIndex':_0x301f17[_0x576238(0x301,_0x5d036e._0x5a33c9,0x2cc,_0x5d036e._0x2f5aaa)]??0x0,'delta':_0x301f17[_0x576238(_0x5d036e._0x41ff4a,_0x5d036e._0x349b6a,0x349,_0x5d036e._0x5da931)]??'','itemId':_0x301f17[_0x576238(_0x5d036e._0x43b24b,0x365,0x318,0x2e4)]??'','outputIndex':_0x301f17[_0x576238(0x337,_0x5d036e._0x1aba3d,_0x5d036e._0x192b0a,0x2fd)]??0x0},'text':_0x301f17[_0x3d64d4(_0x5d036e._0x378801,0x326,_0x5d036e._0x5b0ed9,_0x5d036e._0x23a6ea)]??''};case _0x576238(_0x5d036e._0x2df02f,_0x5d036e._0x5772de,_0x5d036e._0x5e7d1b,_0x5d036e._0x475632):return{'type':_0x3d64d4(_0x5d036e._0xfea2,0x2bd,0x310,0x2ed),'index':_0x301f17['summaryIndex'],'messageId':_0x2a70ec,'chunk':{'type':_0x3d64d4(_0x5d036e._0x5d5191,_0x5d036e._0x1964fa,_0x5d036e._0x56059e,0x30f),'delta':_0x301f17[_0x3d64d4(_0x5d036e._0x4d8d65,0x2ca,0x2d5,0x287)]??'','itemId':_0x301f17[_0x3d64d4(_0x5d036e._0x393560,_0x5d036e._0x3b1c5f,_0x5d036e._0x19aedb,0x33b)]??'','outputIndex':_0x301f17['outputIndex']??0x0,'summaryIndex':_0x301f17[_0x576238(0x2bd,0x299,_0x5d036e._0x2d7ffe,0x28e)]??0x0},'text':_0x301f17[_0x3d64d4(_0x5d036e._0x2f3fdc,_0x5d036e._0x218258,0x2d5,_0x5d036e._0x56059e)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x4736f5){const _0x2dfeaa={_0x46b79b:0x4be,_0x80b4df:0x46f,_0x45e4b8:0x462,_0xadac1:0x41e,_0x7f4652:0x458,_0x42f552:0x4d8,_0x33974c:0x49b},_0x40afbd={_0x7f76b7:0x10,_0x31566e:0xb3,_0xb9a1ff:0xb1},_0x24a287={_0x2ede7f:0x79,_0x4e2825:0x88};function _0x343bcd(_0x101b8f,_0x375837,_0xa8fba7,_0x41bba8){return _0x1b09d0(_0x101b8f,_0x375837-_0x24a287._0x2ede7f,_0xa8fba7- -0x507,_0x41bba8-_0x24a287._0x4e2825);}function _0x44f8c5(_0x317965,_0x1a330d,_0x2e5394,_0x1d5e0d){return _0x1b09d0(_0x317965,_0x1a330d-_0x40afbd._0x7f76b7,_0x1d5e0d-_0x40afbd._0x31566e,_0x1d5e0d-_0x40afbd._0xb9a1ff);}return _0x4736f5['status']===_0x44f8c5(_0x2dfeaa._0x46b79b,0x467,_0x2dfeaa._0x80b4df,0x47c)&&_0x4736f5[_0x44f8c5(_0x2dfeaa._0x45e4b8,0x420,_0x2dfeaa._0xadac1,0x40a)][_0x44f8c5(_0x2dfeaa._0x7f4652,_0x2dfeaa._0x42f552,0x477,_0x2dfeaa._0x33974c)]===!![];}async function executeModelRequest(_0x5db7ec,_0x47df76,_0x143479,_0x4c85ec,_0x27c28c,_0x2cfaef){const _0x3fd82b={_0x15611d:0x26e,_0x424c8b:0x26b,_0x11b41e:0x2fc,_0xdf8b21:0x2a4,_0x22c772:0x153,_0x38dcf8:0x2a5,_0x2ebb2e:0x264,_0x222e02:0x1e6,_0x42545c:0x1e6,_0x14ec46:0x172,_0x191367:0x1ad,_0x991f8e:0x16c,_0x59a878:0x294,_0x1d9e1a:0x300,_0x3694f5:0x273,_0x2279a1:0x17e,_0xb9bfbc:0x19a,_0x5aa642:0x1a1,_0x5080bc:0x2ef,_0x315b01:0x152,_0x3b61fd:0x16a,_0x325607:0x2bc,_0xbd50fd:0x286,_0x44a7f2:0x2df,_0x165a13:0x2c7,_0x4d7280:0x2a2,_0x26c204:0x2fb,_0x9c854e:0x27d,_0xa4f5b8:0x295,_0x21f3cb:0x2a9,_0x891d88:0x260,_0x2a79c4:0x289,_0x2437d3:0x2b6,_0x2fc5a2:0x269,_0x3528be:0x287,_0x3c4857:0x125,_0x2b77c3:0x109,_0x48d9cd:0x18c,_0x1956e3:0x26b,_0x3b3fb6:0x26e,_0x24770f:0x26d,_0x558842:0x276,_0x1ac41f:0x2ee,_0x457be9:0x27a,_0x35ea14:0x2d7,_0x32c242:0x26b,_0x391b77:0x2d7,_0x3490f4:0x2a6,_0x455c54:0x2c5,_0x1571e7:0x1bd,_0x5b197f:0x1fb,_0x3f37aa:0x161,_0x49f77d:0x17f,_0x4cc655:0x1ba,_0x3ad28e:0x1da,_0x434d4d:0x1a4,_0x3a0982:0x1e9,_0x205455:0x232,_0x4cdce1:0x2e7,_0x456caf:0x28a,_0x46869e:0x296,_0x319241:0x188,_0x4993d7:0x15f,_0x13710f:0xdf,_0xc04816:0x17c,_0x9f9baa:0xc1,_0x503cdd:0x251,_0x5156cd:0x1cd,_0x24fac2:0x1b8,_0xe67e49:0x193,_0x4f60c4:0xff,_0x48acc4:0x206,_0x2a1ee:0x208,_0x116a47:0x13d,_0x4d0aa3:0x2d6,_0x3b95c4:0x2e4,_0x1d68e1:0x318,_0x2dde4f:0x2d3,_0x135ae3:0x188,_0x5b1c69:0x26c,_0x2f1437:0x2d4,_0x2c2887:0x2b9},_0x27520e={_0x3e0904:0xbf},_0x2b74ec={_0x39e999:0x154,_0x4a5b8a:0xae};throwIfAborted(_0x47df76[_0x29ad15(_0x3fd82b._0x15611d,0x216,0x210,_0x3fd82b._0x424c8b)]);if(!_0x47df76['streaming']||!_0x143479[_0x29ad15(0x29a,_0x3fd82b._0x11b41e,_0x3fd82b._0xdf8b21,0x2a5)])return await _0x143479[_0x30aac4(-_0x3fd82b._0x22c772,-0x192,-0x13f,-0x171)](_0x5db7ec,{'signal':_0x47df76['signal']});let _0x3250a7;function _0x30aac4(_0x103424,_0xa1ef66,_0xa620ec,_0x4bad1d){return _0x253ce3(_0x103424-_0x2b74ec._0x39e999,_0xa1ef66,_0xa620ec-_0x2b74ec._0x4a5b8a,_0x103424- -0x328);}for await(const _0x348919 of _0x143479[_0x29ad15(0x242,0x280,0x308,_0x3fd82b._0x38dcf8)](_0x5db7ec,{'signal':_0x47df76[_0x29ad15(0x215,0x2a6,_0x3fd82b._0x2ebb2e,0x26b)]})){throwIfAborted(_0x47df76[_0x30aac4(-0x1a9,-0x1b1,-_0x3fd82b._0x222e02,-_0x3fd82b._0x42545c)]);if(_0x348919[_0x30aac4(-_0x3fd82b._0x14ec46,-_0x3fd82b._0x191367,-0x1c6,-_0x3fd82b._0x991f8e)]===_0x29ad15(0x2bd,_0x3fd82b._0x59a878,_0x3fd82b._0x1d9e1a,0x2a1)){_0x2cfaef[_0x29ad15(0x20e,0x21f,0x219,_0x3fd82b._0x3694f5)][_0x30aac4(-_0x3fd82b._0x2279a1,-0x1a1,-0x127,-_0x3fd82b._0xb9bfbc)]!==void 0x0&&_0x2cfaef[_0x30aac4(-_0x3fd82b._0x5aa642,-0x1ec,-0x172,-0x1ff)][_0x29ad15(0x353,0x2b1,_0x3fd82b._0x38dcf8,_0x3fd82b._0x5080bc)]===void 0x0&&(_0x2cfaef['meta'][_0x30aac4(-0x125,-_0x3fd82b._0x315b01,-0x18a,-_0x3fd82b._0x3b61fd)]=Date[_0x29ad15(_0x3fd82b._0x325607,_0x3fd82b._0xbd50fd,_0x3fd82b._0x44a7f2,0x288)]());_0x3250a7=_0x348919['response'];continue;}if(_0x348919[_0x29ad15(_0x3fd82b._0x165a13,0x28d,0x259,_0x3fd82b._0x4d7280)]===_0x29ad15(_0x3fd82b._0x26c204,_0x3fd82b._0x9c854e,0x2a3,_0x3fd82b._0xa4f5b8)){await emitEvent2(_0x4c85ec[_0x29ad15(_0x3fd82b._0x21f3cb,_0x3fd82b._0x891d88,_0x3fd82b._0x2a79c4,0x28c)],{'type':_0x30aac4(-0x17f,-0x16c,-0x137,-0x118),'assistantMessageId':_0x2cfaef[_0x29ad15(0x2ed,0x2e7,0x2af,_0x3fd82b._0x11b41e)],'reasoningMessageId':_0x2cfaef['reasoningMessageId']},_0x27c28c),delete _0x2cfaef[_0x29ad15(_0x3fd82b._0x2437d3,_0x3fd82b._0x2fc5a2,_0x3fd82b._0x3528be,0x273)][_0x30aac4(-0x17e,-0x191,-0x1d5,-_0x3fd82b._0x191367)],delete _0x2cfaef['meta'][_0x30aac4(-_0x3fd82b._0x3c4857,-_0x3fd82b._0x2b77c3,-0x129,-0x14c)];continue;}if(_0x348919[_0x30aac4(-0x172,-_0x3fd82b._0x48d9cd,-0x16d,-0x134)]===_0x29ad15(_0x3fd82b._0x1956e3,0x22d,_0x3fd82b._0x3b3fb6,_0x3fd82b._0x24770f)){await emitEvent2(_0x4c85ec['onEvent'],{..._0x348919,'assistantMessageId':_0x2cfaef['assistantMessageId']},_0x27c28c);continue;}const _0x2ea35b=createReasoningChunkEvent(_0x348919,_0x2cfaef[_0x29ad15(_0x3fd82b._0x558842,0x29f,_0x3fd82b._0x1ac41f,0x287)]);if(_0x2ea35b&&_0x2ea35b[_0x29ad15(0x276,_0x3fd82b._0x457be9,_0x3fd82b._0x35ea14,_0x3fd82b._0x4d7280)]===_0x29ad15(_0x3fd82b._0x32c242,_0x3fd82b._0x391b77,_0x3fd82b._0x3490f4,_0x3fd82b._0x455c54)&&_0x2ea35b[_0x30aac4(-_0x3fd82b._0x1571e7,-_0x3fd82b._0x5b197f,-_0x3fd82b._0x3f37aa,-_0x3fd82b._0x49f77d)]['length']>0x0){_0x2cfaef[_0x30aac4(-_0x3fd82b._0x5aa642,-0x152,-0x168,-_0x3fd82b._0x4cc655)][_0x30aac4(-0x17e,-0x171,-_0x3fd82b._0x3ad28e,-0x17f)]===void 0x0&&(_0x2cfaef[_0x30aac4(-_0x3fd82b._0x5aa642,-_0x3fd82b._0x434d4d,-0x18c,-_0x3fd82b._0x3a0982)][_0x29ad15(_0x3fd82b._0x205455,_0x3fd82b._0x4cdce1,_0x3fd82b._0x456caf,_0x3fd82b._0x46869e)]=Date['now']());await emitEvent2(_0x4c85ec[_0x30aac4(-_0x3fd82b._0x319241,-0x12d,-_0x3fd82b._0x4993d7,-0x1a4)],_0x2ea35b,_0x27c28c);continue;}const _0x7c3a14=createAssistantChunkEvent(_0x348919,_0x2cfaef[_0x30aac4(-0x118,-_0x3fd82b._0x13710f,-_0x3fd82b._0xc04816,-_0x3fd82b._0x9f9baa)]);if(_0x7c3a14){_0x2cfaef[_0x29ad15(0x228,0x2a2,_0x3fd82b._0x503cdd,_0x3fd82b._0x3694f5)]['reasoningStartedAt']!==void 0x0&&_0x2cfaef[_0x30aac4(-0x1a1,-_0x3fd82b._0x5156cd,-_0x3fd82b._0x24fac2,-_0x3fd82b._0xe67e49)][_0x30aac4(-0x125,-0x10b,-_0x3fd82b._0x4f60c4,-0x153)]===void 0x0&&(_0x2cfaef[_0x30aac4(-0x1a1,-_0x3fd82b._0x48acc4,-_0x3fd82b._0x2a1ee,-_0x3fd82b._0x116a47)]['reasoningCompletedAt']=Date[_0x29ad15(0x2c9,_0x3fd82b._0x4d0aa3,_0x3fd82b._0x4d0aa3,0x288)]());await emitEvent2(_0x4c85ec[_0x29ad15(0x2e5,0x252,_0x3fd82b._0x3b95c4,0x28c)],_0x7c3a14,_0x27c28c);continue;}const _0x5b6a55=createToolUseChunkEvent(_0x348919,_0x2cfaef[_0x29ad15(_0x3fd82b._0x1d68e1,0x2ef,_0x3fd82b._0x2dde4f,_0x3fd82b._0x11b41e)]);_0x5b6a55&&await emitEvent2(_0x4c85ec[_0x30aac4(-_0x3fd82b._0x135ae3,-0x1b3,-0x1e7,-_0x3fd82b._0xc04816)],_0x5b6a55,_0x27c28c);}function _0x29ad15(_0x37b35b,_0x4565dd,_0x5941fe,_0x3492a9){return _0x253ce3(_0x37b35b-_0x27520e._0x3e0904,_0x4565dd,_0x5941fe-0x16a,_0x3492a9-0xec);}if(!_0x3250a7)throw new Error(_0x29ad15(0x2cc,_0x3fd82b._0x5b1c69,_0x3fd82b._0x2f1437,_0x3fd82b._0x2c2887));return _0x3250a7;}function makeTurnGuards(_0x17103f,_0x4db145,_0x4bff02,_0x4caf24,_0x1c4ef4){return{async 'stage'(_0x149d3e,_0x25cb4f){return throwIfAborted(_0x17103f),await runStage(_0x4db145,_0x149d3e,_0x25cb4f,_0x4caf24);},async 'emit'(_0x38f7e5){throwIfAborted(_0x17103f),await emitEvent2(_0x4bff02,_0x38f7e5,_0x1c4ef4);},async 'stageUnchecked'(_0x25cecc,_0x147b13){return await runStage(_0x4db145,_0x25cecc,_0x147b13,_0x4caf24);},async 'emitUnchecked'(_0x456fcc){await emitEvent2(_0x4bff02,_0x456fcc,_0x1c4ef4);}};}async function runTurn(_0x225a2a,_0x4ffb7b){const _0x28beba={_0x14db04:0x478,_0x5f502f:0x47d,_0x52e957:0xca,_0x35372a:0x85,_0x5f09f1:0x70,_0x3f64f2:0xb2,_0x20313b:0x136,_0x401adf:0x18f,_0x268f81:0x152,_0x30e872:0x163,_0x30dac2:0x4ec,_0x248d34:0x4ab,_0x45f7c9:0xf8,_0x362dfb:0x3d3,_0xd0ad66:0x453,_0x406e36:0x10c,_0x1ecb9f:0xd6,_0x1acfa7:0x4c0,_0x3cf1ec:0x49e,_0x199ad3:0x125,_0xc5e764:0xba,_0x38b2d3:0x57,_0x378ef9:0x7a,_0x1dea2a:0x4c4,_0x55abd3:0x4b0,_0x4ca74f:0x4e0,_0x20aadb:0x4c4,_0x485e43:0x496,_0x516c58:0xcb,_0x199640:0xdc,_0xd6f61:0x49a,_0x19c74d:0xf7,_0x2037a2:0x128,_0x2365fb:0x15c,_0x2478f5:0x142,_0x187727:0x525,_0x6e9b01:0x4f3,_0xd9f9d7:0x4e2,_0x13eaf7:0x4a4,_0x2a5e45:0x4ef,_0x16ac3d:0x503,_0x43fbd7:0x51c,_0x4f5650:0x528,_0x3a1026:0xb5,_0x511506:0x4b3,_0x460d1d:0x4a6,_0x432944:0x4cb,_0x3ccd42:0x162,_0x163a0d:0x190,_0x53db0f:0xef,_0x267259:0xbb,_0x586ccc:0xc8,_0x4457fe:0x487,_0x59a11d:0x479,_0xba69e8:0x14b,_0x28b543:0x119,_0x43bcd9:0x52a,_0x3ed810:0xfa,_0x16eb0a:0x14b,_0x489fb1:0x502,_0x34f983:0x109,_0x5659ac:0x4d5,_0x4fa858:0x501,_0x104d1c:0x10b,_0xccc657:0xda,_0x42893a:0x4bd,_0x3bd14f:0x429,_0x465afc:0x4d5,_0x1c30a1:0x4d0,_0xa02343:0x441,_0x1e3c0b:0x3e6,_0x2463a7:0x3e2,_0x113414:0x418,_0x15e8ac:0x45f,_0x370627:0xed,_0x4d1788:0x173,_0x46471d:0x4da,_0x20e747:0x47b,_0x12c490:0x434,_0x535a70:0x48d,_0x289c37:0x145,_0x3d6fd1:0x104,_0x1de79f:0x161,_0x5b5819:0x1ba,_0x446441:0xff,_0x4c41d1:0x12c,_0x38f722:0x135,_0xc61b86:0x14c,_0x3fc74c:0x148,_0x39e6a3:0xa5,_0x48a70a:0xd5,_0x225b67:0x106,_0x206318:0x435,_0x2826e8:0x437,_0x4d9f23:0x130,_0x514248:0x181,_0x4d181d:0x496,_0x4f5aa0:0x481,_0x21bd41:0x16e,_0xe5c2bf:0xa5,_0x21d16f:0x41d,_0x300c44:0x4a6,_0xc0e977:0x4c4,_0x1fda47:0x4c2,_0x182ffb:0x4dd,_0x5ec2bc:0x4da,_0x1ae351:0x4d7,_0x4cf062:0x3d7,_0x2316bc:0x446,_0x3310fa:0x4fc,_0x3ef5bc:0xc4,_0x42dbaa:0x11a,_0x4f8458:0xd8,_0x3d7f02:0xdc,_0x504ee0:0x4aa,_0x3a5457:0x4bf,_0x118376:0x489,_0x59b66c:0x4ae,_0x1de474:0x4a4,_0x27b2ba:0x3cf,_0xcde093:0xe5,_0x2f2ff2:0xe3,_0x3b0326:0x194,_0x55babf:0x13a,_0xbcdf50:0xfd,_0x462a8d:0x147,_0x2824c7:0xa2,_0x488630:0x11b,_0x4b0ae1:0x43b,_0x26975b:0x441,_0x2760fc:0x494,_0x470d44:0x476,_0x446e6a:0x4d6,_0x4a7380:0x4cd,_0x160613:0xc2,_0x1e755c:0x186,_0x55f5d1:0x146,_0xc1c6a0:0xc1,_0x2b3cb2:0x4db,_0x41bfda:0x4f7,_0x4db105:0x536,_0x568b93:0x151,_0x3a7a0b:0x118,_0x5311d0:0x141,_0x1f207c:0xf3,_0x145feb:0x151},_0x231a4f={_0x260661:0xbd},_0x287c6b={_0x2f2176:0x2ac,_0x49ec97:0x2ec,_0x7a7a2a:0x387,_0x2f28c4:0x387,_0x498b73:0x320,_0x51c239:0x3aa,_0x30154d:0x3f7,_0x19b47e:0x39c,_0x7755a6:0x380,_0x3466e5:0x3b2,_0x21e306:0x2d7,_0x518c9e:0x2b6,_0x46c872:0x318},_0x5c077d={_0x47d18f:0x273},_0x40e709={_0x17c750:0x3e,_0x122d79:0xb8,_0x6dfa83:0x64,_0x4db8e8:0x4,_0x316f93:0x50,_0x41fb9:0xe,_0x1c4708:0x2},_0x1b7840={_0x38de93:0x5b,_0x1258df:0xfc,_0x4c1036:0xb5},_0x3a5984=_0x4ffb7b[_0xcf628b(0x436,_0x28beba._0x14db04,_0x28beba._0x5f502f,0x45f)],_0x284858=_0x225a2a[_0x251e72(_0x28beba._0x52e957,_0x28beba._0x35372a,_0x28beba._0x5f09f1,_0x28beba._0x3f64f2)]??new AbortController()['signal'],_0x1fc8fe={'sessionId':_0x225a2a[_0x251e72(_0x28beba._0x20313b,0x164,_0x28beba._0x401adf,_0x28beba._0x268f81)],'turnId':_0x225a2a[_0x251e72(0x119,0xdb,0xce,_0x28beba._0x30e872)],'system':normalizeSystem(_0x225a2a[_0xcf628b(_0x28beba._0x30dac2,0x49c,0x438,_0x28beba._0x248d34)]),'messages':(_0x225a2a[_0x251e72(0x129,_0x28beba._0x45f7c9,0x18b,0xe1)]??[])[_0x251e72(0xda,0x76,0x125,0x7d)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x4ffb7b[_0xcf628b(_0x28beba._0x362dfb,0x430,0x3ea,_0x28beba._0xd0ad66)]==='function'?_0x4ffb7b[_0x251e72(0xa6,0xe2,0xf0,0xb2)]():_0x4ffb7b[_0x251e72(0xa6,_0x28beba._0x406e36,_0x28beba._0x1ecb9f,0xf6)]},_0x4ec753=makeExtensionContext(_0x1fc8fe);function _0x251e72(_0x22d0e4,_0x391d15,_0x305a7f,_0x433fb4){return _0x253ce3(_0x22d0e4-_0x1b7840._0x38de93,_0x305a7f,_0x305a7f-_0x1b7840._0x1258df,_0x22d0e4- -_0x1b7840._0x4c1036);}const _0x1ad2ba={'sessionId':_0x1fc8fe[_0xcf628b(0x521,_0x28beba._0x1acfa7,0x4ec,_0x28beba._0x3cf1ec)],'turnId':_0x1fc8fe[_0x251e72(0x119,_0x28beba._0x199ad3,0xcc,0xef)],'state':_0x1fc8fe,'signal':_0x284858,..._0x4ffb7b[_0x251e72(_0x28beba._0xc5e764,_0x28beba._0x38b2d3,_0x28beba._0x378ef9,0xe4)]?{'askUser':_0x4ffb7b['askUser']}:{},..._0x4ffb7b[_0xcf628b(0x45f,_0x28beba._0x1dea2a,0x4a5,_0x28beba._0x55abd3)]?{'setTopic':_0x4ffb7b[_0xcf628b(_0x28beba._0x4ca74f,_0x28beba._0x20aadb,0x4b0,_0x28beba._0x485e43)]}:{}},{stage:_0x5afa00,emit:_0x2e1aa7,stageUnchecked:_0x3580ab,emitUnchecked:_0x4aa833}=makeTurnGuards(_0x284858,_0x4ffb7b[_0x251e72(_0x28beba._0x516c58,_0x28beba._0x199640,0x12b,0x7e)],_0x4ffb7b['onEvent'],_0x4ec753,_0x1ad2ba),_0x27aa2c=async(_0x454bb7,_0x11e7c4)=>{const _0x114093={_0x309af1:0x4b2},_0x122cb2={_0x3b8a4d:0xc},_0x2611a7=_0x11e7c4?{..._0x4ec753,'turnMeta':_0x11e7c4}:_0x4ec753;function _0x43207d(_0x35bd76,_0x3280ab,_0x4897ec,_0x3333b7){return _0xcf628b(_0x35bd76-_0x122cb2._0x3b8a4d,_0x4897ec- -0x4ce,_0x35bd76,_0x3333b7-0x111);}function _0x4f10b7(_0x31dbc5,_0x1643c0,_0x14aae7,_0x5d23ec){return _0xcf628b(_0x31dbc5-0xf5,_0x31dbc5- -_0x114093._0x309af1,_0x1643c0,_0x5d23ec-0x1dd);}await _0x4ffb7b[_0x43207d(-_0x40e709._0x17c750,-0x32,-0x79,-_0x40e709._0x122d79)][_0x4f10b7(-_0x40e709._0x6dfa83,-0x9e,-_0x40e709._0x4db8e8,-0x84)](_0x43207d(-_0x40e709._0x316f93,_0x40e709._0x41fb9,_0x40e709._0x1c4708,0x44),structuredClone(_0x454bb7),_0x2611a7);},_0x1716df=async _0x322b23=>{const _0x37a295={_0x58625d:0x24};function _0x299cef(_0x7234b3,_0x319f67,_0x28ef2d,_0x2b70c3){return _0xcf628b(_0x7234b3-_0x37a295._0x58625d,_0x319f67- -0x755,_0x28ef2d,_0x2b70c3-0x1c8);}if(!_0x225a2a['drainSteering'])return 0x0;const _0x265cc4=await _0x225a2a[_0x299cef(-_0x287c6b._0x2f2176,-0x2b1,-_0x287c6b._0x49ec97,-0x27d)]();throwIfAborted(_0x284858);if(_0x265cc4['length']===0x0)return 0x0;await _0x322b23?.();for(const _0x119e40 of _0x265cc4){const _0x31b6e3=await _0x5afa00(_0x7d6b2d(0x3cf,_0x287c6b._0x7a7a2a,_0x287c6b._0x2f28c4,_0x287c6b._0x498b73),normalizeMessage(_0x119e40));throwIfAborted(_0x284858),_0x1fc8fe[_0x7d6b2d(_0x287c6b._0x51c239,_0x287c6b._0x30154d,_0x287c6b._0x19b47e,0x38f)][_0x7d6b2d(_0x287c6b._0x7755a6,0x383,0x36a,_0x287c6b._0x3466e5)](_0x31b6e3),await _0x27aa2c(_0x31b6e3),await _0x2e1aa7({'type':_0x299cef(-0x261,-0x288,-_0x287c6b._0x21e306,-_0x287c6b._0x2f2176),'message':_0x31b6e3});}function _0x7d6b2d(_0x44de0c,_0x8e99a8,_0x276d3c,_0x5ab8ab){return _0x251e72(_0x276d3c-_0x5c077d._0x47d18f,_0x8e99a8-0x13a,_0x5ab8ab,_0x5ab8ab-0xaa);}return _0x265cc4[_0x7d6b2d(0x32c,_0x287c6b._0x518c9e,_0x287c6b._0x46c872,0x317)];};let _0x113319=0x0;function _0xcf628b(_0x21ab7f,_0x434b5b,_0x26c20b,_0x390259){return _0x253ce3(_0x21ab7f-0x1e,_0x26c20b,_0x26c20b-_0x231a4f._0x260661,_0x434b5b-0x2d5);}try{const _0x2693fa=await _0x5afa00('onUserMessage',normalizeMessage(_0x225a2a[_0xcf628b(_0x28beba._0xd6f61,0x4e6,0x504,0x497)]));_0x1fc8fe['messages'][_0x251e72(_0x28beba._0x19c74d,0x15a,_0x28beba._0x2037a2,0xc4)](_0x2693fa),await _0x27aa2c(_0x2693fa),await _0x2e1aa7({'type':_0x251e72(0x143,_0x28beba._0x2365fb,0xf9,_0x28beba._0x2478f5),'message':_0x2693fa});while(!![]){throwIfAborted(_0x284858),_0x113319+=0x1;const _0x2f2300=createAssistantMessageId(_0x1fc8fe['turnId'],_0x113319),_0x3ef150=createReasoningMessageId(_0x2f2300),_0x21a1e9={'model':_0x3a5984[_0xcf628b(_0x28beba._0x187727,0x4c7,0x4e6,_0x28beba._0x6e9b01)],'modelIdentity':_0x3a5984['modelIdentity'],..._0x3a5984[_0xcf628b(_0x28beba._0xd9f9d7,0x4ef,0x4a4,0x527)]?{'provider':_0x3a5984[_0xcf628b(_0x28beba._0x13eaf7,_0x28beba._0x2a5e45,0x54a,0x511)]}:{}};let _0x613fcf={'model':_0x3a5984[_0xcf628b(_0x28beba._0x16ac3d,0x4c7,_0x28beba._0x43fbd7,_0x28beba._0x4f5650)],..._0x3a5984[_0x251e72(0xa2,0xb0,0xbd,0x7c)]!==void 0x0?{'maxTokens':_0x3a5984[_0x251e72(0xa2,0xa7,0x53,_0x28beba._0x3a1026)]}:{},'system':structuredClone(_0x1fc8fe['system']),'messages':structuredClone(_0x1fc8fe[_0xcf628b(0x453,_0x28beba._0x511506,_0x28beba._0x460d1d,_0x28beba._0x432944)]),'tools':_0x4ffb7b['toolRuntime']['listToolSchemas'](),'metadata':{'sessionId':_0x1fc8fe[_0x251e72(_0x28beba._0x20313b,_0x28beba._0x3ccd42,_0x28beba._0x163a0d,0x16d)],'turnId':_0x1fc8fe[_0x251e72(0x119,_0x28beba._0x53db0f,_0x28beba._0x267259,_0x28beba._0x586ccc)],'modelIdentity':_0x3a5984[_0xcf628b(_0x28beba._0x4457fe,_0x28beba._0x59a11d,0x4c4,0x4ca)],..._0x3a5984[_0x251e72(_0x28beba._0xba69e8,0xf7,0x16e,_0x28beba._0x28b543)]!==void 0x0?{'pricingProviderId':_0x3a5984[_0xcf628b(0x4ea,0x4d5,_0x28beba._0x43bcd9,0x4a6)]}:{}},..._0x4ffb7b[_0x251e72(0x121,_0x28beba._0x3ed810,_0x28beba._0x16eb0a,0x15c)]?{'outputFormat':_0x4ffb7b[_0xcf628b(0x4d8,0x4ab,0x4a1,_0x28beba._0x489fb1)]}:{}};_0x613fcf=await _0x5afa00('beforeModelRequest',_0x613fcf);{const {pricingProviderId:_0xd93cb2,..._0x36a526}=_0x613fcf['metadata'];_0x613fcf={..._0x613fcf,'metadata':{..._0x36a526,..._0x3a5984[_0x251e72(0x14b,_0x28beba._0x34f983,0x183,0x158)]!==void 0x0?{'pricingProviderId':_0x3a5984[_0xcf628b(0x499,_0x28beba._0x5659ac,0x49b,_0x28beba._0x4fa858)]}:{}}};}await _0x2e1aa7({'type':_0x251e72(0x11e,0x108,_0x28beba._0x104d1c,_0x28beba._0xccc657),'request':_0x613fcf});const _0x1364f2=Date[_0xcf628b(0x4b1,0x471,_0x28beba._0x4457fe,_0x28beba._0x42893a)]();_0x21a1e9['turnStartedAt']=_0x1364f2;let _0x487afd=await executeModelRequest(_0x613fcf,_0x225a2a,_0x3a5984,_0x4ffb7b,_0x1ad2ba,{'assistantMessageId':_0x2f2300,'reasoningMessageId':_0x3ef150,'meta':_0x21a1e9});const _0x418a92=Date[_0xcf628b(_0x28beba._0x3bd14f,0x471,_0x28beba._0x465afc,_0x28beba._0x1c30a1)]();_0x21a1e9[_0xcf628b(0x451,0x429,_0x28beba._0xa02343,_0x28beba._0x1e3c0b)]=_0x418a92,_0x487afd=await _0x5afa00('afterModelResponse',_0x487afd);_0x487afd['providerState']&&(_0x487afd={..._0x487afd,'providerState':{..._0x487afd[_0xcf628b(_0x28beba._0x2463a7,0x434,_0x28beba._0x113414,_0x28beba._0x15e8ac)],'originModelIdentity':_0x3a5984[_0x251e72(_0x28beba._0x53db0f,_0x28beba._0xba69e8,0xee,_0x28beba._0x370627)]}});_0x487afd=withEstimatedModelCost(_0x613fcf,_0x487afd);const _0xc4da25=Math[_0x251e72(0x163,0x19c,0x15e,_0x28beba._0x4d1788)](0x0,_0x418a92-_0x1364f2),_0x5d63a4={'version':0x1,'usage':structuredClone(_0x487afd[_0xcf628b(_0x28beba._0x46471d,_0x28beba._0x20e747,_0x28beba._0x12c490,_0x28beba._0x535a70)]),'modelTimeMs':_0xc4da25},_0x1aa0eb=_0x1527bd=>({..._0x21a1e9,'metrics':{..._0x5d63a4,'usage':structuredClone(_0x5d63a4['usage']),'completesRequest':_0x1527bd}});await _0x2e1aa7({'type':_0x251e72(_0x28beba._0x289c37,0x12d,_0x28beba._0x3d6fd1,0x108),'response':_0x487afd,'modelTimeMs':_0xc4da25}),_0x1fc8fe['lastResponse']=_0x487afd;let _0xe30407=await _0x5afa00(_0x251e72(_0x28beba._0x1de79f,0x174,_0x28beba._0x5b5819,_0x28beba._0x446441),withMessageId(responseToAssistantMessage(_0x487afd),_0x2f2300));_0xe30407=withMessageId(_0xe30407,_0x2f2300);const _0x3141c1=getToolUseBlocks(_0xe30407),_0x4a6237=await Promise[_0x251e72(_0x28beba._0x4c41d1,_0x28beba._0x38f722,_0x28beba._0xc61b86,_0x28beba._0x3fc74c)](_0x3141c1[_0xcf628b(0x43e,0x464,0x46c,0x434)](_0x22ab72=>_0x5afa00(_0x251e72(0x141,0x1a9,0x130,0xf7),_0x22ab72)));_0x4a6237[_0x251e72(_0x28beba._0x39e6a3,_0x28beba._0x48a70a,0xf5,0xa3)]>0x0&&(_0xe30407=replaceToolUseBlocks(_0xe30407,_0x4a6237));const _0x1d07e8=withMessageId(_0xe30407,_0x2f2300);_0xe30407=_0x1d07e8;const _0xeeeaa2=createReasoningMessage(_0xe30407),_0x3bac31=createAssistantTextMessage(_0xe30407),_0x34dcae=createToolUseMessage(_0xe30407);_0xeeeaa2&&await _0x2e1aa7({'type':'reasoning_message','message':withMessageId(_0xeeeaa2,_0x3ef150)});_0x3bac31&&await _0x2e1aa7({'type':_0x251e72(_0x28beba._0x225b67,0x15f,0x11b,0x10d),'message':withMessageId(_0x3bac31,_0x2f2300)});_0x34dcae&&await _0x2e1aa7({'type':_0xcf628b(_0x28beba._0x206318,0x42e,0x45d,_0x28beba._0x2826e8),'message':withMessageId(_0x34dcae,_0x2f2300)});_0x1fc8fe[_0x251e72(0x129,_0x28beba._0x4d9f23,0x157,_0x28beba._0x514248)][_0xcf628b(_0x28beba._0x4d181d,_0x28beba._0x4f5aa0,0x45c,0x436)](_0x1d07e8);_0x4a6237['length']>0x0&&await _0x27aa2c(_0x1d07e8,_0x1aa0eb(![]));for(const _0x429fb2 of _0x4a6237){await _0x2e1aa7({'type':_0x251e72(0x115,_0x28beba._0x21bd41,0x164,0xd6),'toolCall':_0x429fb2});}if(_0x4a6237[_0x251e72(_0x28beba._0xe5c2bf,0x72,0x7a,0x4e)]===0x0){const _0x2879c3=await _0x1716df(async()=>{await _0x27aa2c(_0x1d07e8,_0x1aa0eb(![]));});if(_0x2879c3>0x0)continue;const _0x4fdded=await _0x5afa00(_0xcf628b(0x4a9,0x461,_0x28beba._0x21d16f,_0x28beba._0x300c44),_0xe30407),_0x468171=withMessageId(_0x4fdded,_0x2f2300);return _0x1fc8fe[_0xcf628b(0x415,0x463,_0x28beba._0xc0e977,_0x28beba._0x12c490)]=_0x468171,_0x1fc8fe[_0xcf628b(_0x28beba._0x1fda47,0x4b3,_0x28beba._0x182ffb,_0x28beba._0x5ec2bc)][_0x1fc8fe[_0xcf628b(0x4fe,0x4b3,_0x28beba._0x1ae351,0x4e8)][_0xcf628b(0x46e,0x42f,_0x28beba._0x4cf062,_0x28beba._0x2316bc)]-0x1]=_0x468171,await _0x27aa2c(_0x468171,_0x1aa0eb(!![])),await _0x4aa833({'type':_0xcf628b(0x4de,0x4a9,_0x28beba._0x3310fa,0x4ef),'message':_0x468171}),throwIfAborted(_0x284858),await _0x4ffb7b['registry'][_0x251e72(_0x28beba._0x3ef5bc,0x124,_0x28beba._0x42dbaa,0xba)](_0x251e72(0xcd,0x67,_0x28beba._0x4f8458,_0x28beba._0x3d7f02),_0x1fc8fe,_0x4ec753),await _0x2e1aa7({'type':_0xcf628b(0x4ce,0x4bf,_0x28beba._0x504ee0,0x486),'state':_0x1fc8fe}),{'status':_0xcf628b(_0x28beba._0x3a5457,_0x28beba._0x118376,0x49e,_0x28beba._0x504ee0),'finalMessage':_0x468171,'state':_0x1fc8fe};}let _0x1abeeb=await _0x4ffb7b[_0xcf628b(_0x28beba._0x59b66c,0x459,_0x28beba._0x1de474,0x45f)][_0xcf628b(0x3c4,0x427,0x47d,_0x28beba._0x27b2ba)](_0x4a6237,_0x1ad2ba);const _0x23e4c6=_0x1abeeb['some'](isAbortedToolResult),_0x264619=_0x23e4c6?_0x3580ab:_0x5afa00,_0x1c69ed=_0x23e4c6?_0x4aa833:_0x2e1aa7;_0x1abeeb=await Promise[_0x251e72(_0x28beba._0x4c41d1,_0x28beba._0xcde093,_0x28beba._0x2f2ff2,_0x28beba._0x3b0326)](_0x1abeeb[_0x251e72(0xda,0x78,0x93,_0x28beba._0x55babf)](_0x155e87=>_0x264619(_0xcf628b(0x4d7,0x494,0x4c0,0x49a),_0x155e87))),_0x1fc8fe[_0x251e72(0x130,_0x28beba._0xbcdf50,0x13b,_0x28beba._0x462a8d)][_0x251e72(0xf7,_0x28beba._0x2824c7,_0x28beba._0x488630,0x12f)](..._0x1abeeb);for(const _0x67a683 of _0x1abeeb){await _0x1c69ed({'type':'tool_result','result':_0x67a683});}const _0x31f48b=await _0x264619(_0xcf628b(_0x28beba._0x4b0ae1,_0x28beba._0x26975b,_0x28beba._0x2760fc,0x456),createToolResultUserMessage(_0x1abeeb));await _0x1c69ed({'type':_0xcf628b(_0x28beba._0x470d44,_0x28beba._0x446e6a,_0x28beba._0x4a7380,0x4d5),'message':_0x31f48b}),_0x1fc8fe[_0x251e72(0x129,0xef,_0x28beba._0x160613,_0x28beba._0x1e755c)][_0x251e72(0xf7,_0x28beba._0x55f5d1,0x13b,_0x28beba._0xc1c6a0)](_0x31f48b),await _0x27aa2c(_0x31f48b);if(_0x23e4c6)return{'status':_0xcf628b(0x492,_0x28beba._0x2b3cb2,_0x28beba._0x41bfda,_0x28beba._0x4db105),'state':_0x1fc8fe};await _0x1716df();}}catch(_0x2872f9){if(!_0x284858[_0x251e72(_0x28beba._0x568b93,_0x28beba._0x3a7a0b,_0x28beba._0x5311d0,_0x28beba._0x1f207c)])throw new TurnFailedError(_0x2872f9,_0x1fc8fe);return{'status':_0x251e72(_0x28beba._0x145feb,0x136,0x173,_0x28beba._0x1e755c),'state':_0x1fc8fe};}}function createSessionId(){const _0x2c5dfd={_0x1fa1d9:0x4c,_0x9a27b7:0x1a,_0x174c33:0xb7,_0x2cf226:0x102,_0x233b0b:0x103,_0x30fec5:0x27,_0x38d236:0x35,_0x2d0de9:0x13},_0x10df25={_0x2ae212:0x1e5,_0x448e3e:0x17a},_0x365f65={_0x5d1b87:0x1};function _0x4e7f61(_0x35a7ce,_0x516edc,_0x3caf5c,_0x2ef16c){return _0x253ce3(_0x35a7ce-_0x365f65._0x5d1b87,_0x3caf5c,_0x3caf5c-0x141,_0x2ef16c- -0x91);}function _0x451294(_0x1f9a66,_0x1a7979,_0x12863a,_0x55cdb5){return _0x253ce3(_0x1f9a66-_0x10df25._0x2ae212,_0x1f9a66,_0x12863a-0x1b4,_0x1a7979- -_0x10df25._0x448e3e);}return _0x451294(_0x2c5dfd._0x1fa1d9,-_0x2c5dfd._0x9a27b7,-0x30,-0x2e)+Date['now']()+'-'+Math['random']()[_0x4e7f61(_0x2c5dfd._0x174c33,_0x2c5dfd._0x2cf226,0x15c,_0x2c5dfd._0x233b0b)](0x10)[_0x451294(_0x2c5dfd._0x30fec5,0xc,_0x2c5dfd._0x38d236,_0x2c5dfd._0x2d0de9)](0x2,0xa);}function createTurnId(_0x6171f8){const _0x71950d={_0x40f8dc:0x44};function _0x2bc053(_0x557858,_0x235ca7,_0x1b6148,_0x331e25){return _0x1b09d0(_0x1b6148,_0x235ca7-0x16,_0x235ca7- -_0x71950d._0x40f8dc,_0x331e25-0x8f);}return _0x2bc053(0x328,0x326,0x308,0x2dc)+_0x6171f8;}function createDefaultMessage(_0x5981e8){if(_0x5981e8===void 0x0)return void 0x0;return normalizeUserInput(_0x5981e8);}function normalizeUserInput(_0x3f4fa4){const _0xfe80b0={_0x38673f:0x1b,_0x118f65:0x11,_0x40bee5:0xc2},_0x4463ba={_0x3bf30e:0x66,_0x3166ce:0x3cb,_0x524797:0x24},_0x5a0748={_0x3e4ccd:0x29e,_0x21418e:0xf6};function _0x28e946(_0x3535b7,_0x437f49,_0x46fcc1,_0x34cbf9){return _0x1b09d0(_0x34cbf9,_0x437f49-0x1c4,_0x46fcc1- -_0x5a0748._0x3e4ccd,_0x34cbf9-_0x5a0748._0x21418e);}if(typeof _0x3f4fa4===_0x23e6f8(0xa,0xd,_0xfe80b0._0x38673f,_0xfe80b0._0x118f65))return{'role':'user','content':[{'type':_0x28e946(0xe9,_0xfe80b0._0x40bee5,0xaf,0x102),'text':_0x3f4fa4}]};function _0x23e6f8(_0x3c564f,_0x53f938,_0x1aa8e3,_0x3e05d9){return _0x1b09d0(_0x53f938,_0x53f938-_0x4463ba._0x3bf30e,_0x3c564f- -_0x4463ba._0x3166ce,_0x3e05d9-_0x4463ba._0x524797);}return normalizeMessage(_0x3f4fa4);}function resolveChatModel(_0x401750){const _0x429f2e={_0x181612:0x462,_0x5ea4fa:0x48c,_0x522b7f:0x475,_0x3772f3:0x452,_0x51462a:0x411,_0x2029a0:0x485,_0x8aa23f:0x4c5},_0x5e5c37={_0x579a74:0x2e9};if(!_0x401750[_0xd65b3e(_0x429f2e._0x181612,_0x429f2e._0x5ea4fa,_0x429f2e._0x522b7f,0x477)])throw new Error(_0xd65b3e(0x48e,_0x429f2e._0x3772f3,_0x429f2e._0x51462a,_0x429f2e._0x2029a0));function _0xd65b3e(_0x186e16,_0x27b1a1,_0x5121d2,_0x81242e){return _0x253ce3(_0x186e16-0xc7,_0x5121d2,_0x5121d2-0x113,_0x27b1a1-_0x5e5c37._0x579a74);}function _0x5d6fe6(_0x5d9bfd,_0x2234e4,_0x4e20f5,_0x5c2f50){return _0x1b09d0(_0x2234e4,_0x2234e4-0x1d1,_0x5c2f50- -0x630,_0x5c2f50-0x4);}return _0x401750[_0xd65b3e(_0x429f2e._0x8aa23f,0x48c,0x4b1,0x46b)];}function createRegistry(_0x48921d){const _0x1d4d8c={_0x5109d4:0xb1,_0xd7e6f8:0x79,_0x2ff385:0x1dd},_0x47bc2e={_0xed9878:0xc1},_0x3850b0={_0x4aa6ed:0x141};if(_0x48921d['registry'])return _0x48921d['registry'];const _0x332d70=createExtensionRegistry(),_0x24f97c=_0x48921d[_0x44dd36(-_0x1d4d8c._0x5109d4,-0x85,-0xc9,-_0x1d4d8c._0xd7e6f8)]??[];function _0x44dd36(_0x12f10a,_0x1f26e7,_0x10f4ee,_0x5d4e04){return _0x1b09d0(_0x12f10a,_0x1f26e7-_0x3850b0._0x4aa6ed,_0x1f26e7- -0x423,_0x5d4e04-0x184);}function _0x29c198(_0x4eed56,_0x210215,_0xfcc04b,_0x1b6ba9){return _0x253ce3(_0x4eed56-0x32,_0x210215,_0xfcc04b-0x196,_0xfcc04b-_0x47bc2e._0xed9878);}for(const _0xeb53f0 of _0x24f97c){_0x332d70[_0x29c198(0x24b,_0x1d4d8c._0x2ff385,0x214,0x1f9)](_0xeb53f0);}return _0x332d70;}var Agent=class{[_0x1b09d0(0x39d,0x39a,0x3f7,0x444)];[_0x253ce3(0x1b3,0x1f4,0x15c,0x191)];[_0x1b09d0(0x3b8,0x426,0x3e0,0x421)];[_0x253ce3(0x222,0x247,0x247,0x1eb)];[_0x1b09d0(0x3e8,0x363,0x3c0,0x3a1)];[_0x253ce3(0x203,0x1b1,0x1e8,0x1b1)];[_0x253ce3(0x15b,0x166,0x16f,0x1ae)];constructor(_0x365afb={}){const _0x125616={_0x1197e2:0x463,_0x7a033:0x488,_0x464222:0x45f,_0x5dde2a:0x442,_0x2c094c:0x44a,_0x114285:0x488,_0x24f5e4:0x43f,_0x8f4330:0x44b,_0x213672:0x414,_0x332596:0x1e7,_0x4daa79:0x13f,_0x111838:0x4a1,_0x3380d0:0x488,_0x20d997:0x47b,_0x302106:0x4d5,_0x5d321b:0x156,_0x53a792:0x183,_0x58e4e0:0x121,_0x3ca66e:0x4ae,_0x393f4e:0x469,_0x561b4a:0x448,_0x5c6a26:0x404,_0x258ebd:0x413,_0x2a4bac:0x172,_0x49b495:0x1bf,_0x297d30:0x40b,_0x8a7156:0x47a,_0x396d4d:0x444,_0x3fe268:0x194,_0x21cfb6:0x43a,_0x122702:0x407,_0x11fa8f:0x3f4,_0x4cfec7:0x4d7,_0x2866fe:0x4b8,_0x33baa8:0x48c,_0x37927e:0x460,_0x33e5cb:0x3f8,_0x122296:0x143},_0x532895={_0x3e9600:0x1f7,_0x239e8d:0x2c8},_0x39c429={_0x3a9939:0x1e6},_0x1605ef={_0x4f1c34:0x109,_0x485049:0xb0,_0x24ffcc:0x2e};this[_0x288692(_0x125616._0x1197e2,0x4b0,_0x125616._0x7a033,_0x125616._0x464222)]=_0x365afb[_0x288692(_0x125616._0x5dde2a,_0x125616._0x2c094c,_0x125616._0x114285,0x439)]??createSessionId();function _0x5859c9(_0x1c0348,_0x58c8a1,_0x5708a3,_0x564f97){return _0x253ce3(_0x1c0348-_0x1605ef._0x4f1c34,_0x1c0348,_0x5708a3-_0x1605ef._0x485049,_0x5708a3- -_0x1605ef._0x24ffcc);}this[_0x288692(_0x125616._0x24f5e4,0x47a,_0x125616._0x8f4330,_0x125616._0x213672)]=0x0,this[_0x5859c9(0x24e,0x197,_0x125616._0x332596,0x240)]=_0x365afb[_0x5859c9(0x152,0x123,_0x125616._0x4daa79,0x131)]??'';function _0x288692(_0x4fb7d3,_0x45081e,_0x549940,_0x102e3d){return _0x253ce3(_0x4fb7d3-_0x39c429._0x3a9939,_0x102e3d,_0x549940-0x80,_0x549940-0x29d);}this[_0x288692(_0x125616._0x111838,0x429,0x47b,_0x125616._0x3380d0)]=(_0x365afb[_0x288692(0x481,0x4a6,_0x125616._0x20d997,_0x125616._0x302106)]??[])['map'](normalizeMessage),this[_0x5859c9(_0x125616._0x5d321b,0x135,_0x125616._0x53a792,_0x125616._0x58e4e0)]=createDefaultMessage(_0x365afb[_0x288692(0x469,0x485,_0x125616._0x3ca66e,_0x125616._0x393f4e)]),this['metrics']=createAgentMetrics({'getContextWindowLimit':_0x365afb[_0x288692(_0x125616._0x561b4a,_0x125616._0x5c6a26,_0x125616._0x258ebd,0x3fa)]});const _0x3876d1=_0x365afb[_0x5859c9(0x1cd,0x1c8,_0x125616._0x2a4bac,_0x125616._0x49b495)],_0x2a45cf=async(_0x29ed07,_0x1dc3b4)=>{const _0x435083={_0x21ff72:0x1c1,_0x3b6b3d:0x400,_0x40edd0:0x9a};function _0x2e8506(_0x38d8b7,_0x4090e6,_0x21c20f,_0x2c30d9){return _0x5859c9(_0x38d8b7,_0x4090e6-_0x435083._0x21ff72,_0x4090e6- -_0x435083._0x3b6b3d,_0x2c30d9-_0x435083._0x40edd0);}function _0x3bc75e(_0x5dd83c,_0x57b5a8,_0x53a48c,_0x3758e1){return _0x288692(_0x5dd83c-0x1b2,_0x57b5a8-0xf3,_0x57b5a8- -0xe3,_0x53a48c);}this[_0x2e8506(-0x225,-0x230,-0x22f,-_0x532895._0x3e9600)][_0x2e8506(-0x304,-_0x532895._0x239e8d,-0x2c9,-0x299)](_0x29ed07),await _0x3876d1?.(_0x29ed07,_0x1dc3b4);},_0x3d3041=createInternalToolRuntime(_0x365afb[_0x288692(_0x125616._0x297d30,_0x125616._0x8a7156,_0x125616._0x396d4d,0x45a)]??[],{'onEvent':_0x2a45cf,'onToolCall':_0x365afb[_0x5859c9(0x218,0x1a6,0x1ee,_0x125616._0x3fe268)]});this['deps']={'registry':createRegistry(_0x365afb),'chatModel':resolveChatModel(_0x365afb),'toolRuntime':_0x3d3041,'askUser':_0x365afb[_0x288692(_0x125616._0x21cfb6,_0x125616._0x122702,0x40c,_0x125616._0x11fa8f)],'setTopic':_0x365afb[_0x288692(_0x125616._0x4cfec7,_0x125616._0x2866fe,_0x125616._0x33baa8,0x457)],'onEvent':_0x2a45cf,'sessionDir':_0x365afb[_0x288692(0x414,_0x125616._0x37927e,_0x125616._0x33e5cb,0x3f7)],'outputFormat':_0x365afb[_0x5859c9(_0x125616._0x122296,0x143,0x1a8,0x1cc)]};}get[_0x1b09d0(0x2ec,0x34b,0x34f,0x344)](){const _0x489cef={_0x3701f6:0x224},_0x151150={_0x386b15:0x1aa,_0x1ec309:0x1d3};function _0x16da7c(_0x3d2753,_0x12249d,_0x15d02f,_0x5e2384){return _0x1b09d0(_0x12249d,_0x12249d-_0x151150._0x386b15,_0x15d02f- -_0x151150._0x1ec309,_0x5e2384-0xe0);}return this[_0x16da7c(0x236,0x219,_0x489cef._0x3701f6,0x1eb)];}[_0x1b09d0(0x40e,0x386,0x3bd,0x3eb)](_0x63f990=[]){const _0x589a74={_0xf3e8ab:0x2f2,_0x51e429:0x318,_0x156868:0x32d,_0x210f32:0x36e},_0x46acfd={_0x24efd0:0x14c,_0x5e6049:0x39},_0x1e73d4={_0x32f9b5:0xed,_0x3c58f3:0x71};function _0x5a5ae2(_0xc47462,_0x3ab99c,_0x21cbf6,_0x20011d){return _0x1b09d0(_0xc47462,_0x3ab99c-_0x1e73d4._0x32f9b5,_0x3ab99c- -_0x1e73d4._0x3c58f3,_0x20011d-0x40);}function _0x27d9e8(_0x127ab8,_0x38d030,_0x5af3a0,_0xf36f2a){return _0x1b09d0(_0x127ab8,_0x38d030-_0x46acfd._0x24efd0,_0xf36f2a- -_0x46acfd._0x5e6049,_0xf36f2a-0x1ce);}this['deps'][_0x27d9e8(0x364,_0x589a74._0xf3e8ab,_0x589a74._0x51e429,_0x589a74._0x156868)][_0x27d9e8(_0x589a74._0x210f32,0x3ad,0x321,0x384)](_0x63f990);}[_0x253ce3(0x113,0x19a,0x190,0x16e)](){const _0x4e58b6={_0x4e0167:0x439,_0x22df08:0x472,_0x5a0c95:0x92,_0x47a31d:0xd5,_0x116da5:0x6f,_0x1bce89:0x99},_0x5ba0f0={_0x4b3dd6:0x49},_0x345fc9={_0x16b1ae:0x1c6,_0x892310:0x2a8};function _0x274efc(_0x2ce6f1,_0x1e4c5f,_0x135f3a,_0x10dc24){return _0x253ce3(_0x2ce6f1-0xff,_0x10dc24,_0x135f3a-_0x345fc9._0x16b1ae,_0x1e4c5f-_0x345fc9._0x892310);}function _0x2608da(_0x231f2e,_0x12ea73,_0x1d3c1a,_0x35b42a){return _0x253ce3(_0x231f2e-0x13,_0x1d3c1a,_0x1d3c1a-_0x5ba0f0._0x4b3dd6,_0x231f2e- -0x216);}return this[_0x274efc(0x486,_0x4e58b6._0x4e0167,_0x4e58b6._0x22df08,0x454)][_0x2608da(-_0x4e58b6._0x5a0c95,-0x89,-0x6a,-_0x4e58b6._0x47a31d)][_0x2608da(-0x5c,-0xe,-_0x4e58b6._0x116da5,-_0x4e58b6._0x1bce89)]();}['setSystemPrompt'](_0x208e0f,_0x4345ba={}){const _0xae8253={_0x170eae:0x1da,_0x5a6df3:0x185,_0x2483b8:0x20a,_0x3500fa:0x26f,_0x4397a6:0x23b},_0xeeaff2={_0x558cb8:0x22,_0x35db81:0x57c,_0x192960:0x11},_0x388724={_0x409f59:0x3c2};this[_0x3071db(-_0xae8253._0x170eae,-0x1d6,-0x19b,-_0xae8253._0x5a6df3)]=_0x208e0f;function _0x5ca135(_0x2ed69e,_0x420c55,_0x2866d3,_0x3570a1){return _0x1b09d0(_0x2866d3,_0x420c55-0x16b,_0x420c55- -_0x388724._0x409f59,_0x3570a1-0x39);}function _0x3071db(_0x5d369d,_0x21a255,_0x101f40,_0x4acccb){return _0x1b09d0(_0x5d369d,_0x21a255-_0xeeaff2._0x558cb8,_0x4acccb- -_0xeeaff2._0x35db81,_0x4acccb-_0xeeaff2._0x192960);}_0x4345ba[_0x3071db(-_0xae8253._0x2483b8,-_0xae8253._0x3500fa,-_0xae8253._0x4397a6,-0x222)]===!![]&&(this['messages']=[],this['turnIndex']=0x0);}[_0x1b09d0(0x2f3,0x38e,0x352,0x35d)](_0xaa62b8){this['sessionId']=_0xaa62b8;}[_0x1b09d0(0x41e,0x44d,0x3e6,0x41c)](_0x362293){const _0x3b5f6b={_0x92d75a:0x49c},_0x583649={_0x2aef9e:0xe9,_0x3a80ad:0x2e4},_0x523813={_0x58f0a2:0x1a5};function _0xb4af3a(_0xeb8d5f,_0x420625,_0x39a98c,_0x190b0d){return _0x253ce3(_0xeb8d5f-_0x523813._0x58f0a2,_0x420625,_0x39a98c-0x114,_0xeb8d5f-0x2f9);}function _0xf49239(_0x1ea117,_0x190f79,_0x4f1b99,_0x2c2834){return _0x253ce3(_0x1ea117-_0x583649._0x2aef9e,_0x2c2834,_0x4f1b99-0xe4,_0x1ea117- -_0x583649._0x3a80ad);}this[_0xf49239(-0x153,-0x140,-0x124,-0x173)][_0xb4af3a(_0x3b5f6b._0x92d75a,0x4c3,0x4e0,0x4e2)]=_0x362293;}async[_0x1b09d0(0x3c3,0x35c,0x38a,0x3dd)](_0x4405c1=this[_0x1b09d0(0x380,0x3d4,0x393,0x351)],_0x59970b={}){const _0x5ec4a4={_0x927287:0x1e2,_0x1d2d32:0x1cb,_0x54b3fb:0x295,_0x18a0ff:0x33c,_0x592b33:0x2f4,_0x17b1f3:0x35f,_0x328b30:0x236,_0x44c371:0x225,_0x14b8ed:0x22a,_0x2b2063:0x26e,_0x19d3b8:0x2a3,_0x75ba5f:0x25a,_0x1a4c67:0x31c,_0x4d5a58:0x34b,_0x593f50:0x2f8,_0x26497e:0x349,_0x5102b8:0x29b,_0x32b369:0x2a9,_0x4ecf71:0x25c,_0x40241b:0x2e9,_0x2001c9:0x22e},_0x3dbfd2={_0x446ce1:0xbb},_0x1f4c1={_0x27aa3c:0x153,_0xff6d91:0x165};if(!_0x4405c1)throw new Error(_0x3e1e21(0x182,_0x5ec4a4._0x927287,0x1e5,_0x5ec4a4._0x1d2d32));this['turnIndex']+=0x1;function _0x3e1e21(_0x3e136c,_0x4d8b43,_0x283adb,_0x5c0f64){return _0x253ce3(_0x3e136c-_0x1f4c1._0x27aa3c,_0x3e136c,_0x283adb-_0x1f4c1._0xff6d91,_0x5c0f64-0x7c);}const _0x54b387=_0x59970b[_0x301d0b(_0x5ec4a4._0x54b3fb,0x2e9,0x337,_0x5ec4a4._0x18a0ff)];function _0x301d0b(_0x59e1f3,_0x18f87e,_0x1a5737,_0x571d79){return _0x253ce3(_0x59e1f3-_0x3dbfd2._0x446ce1,_0x1a5737,_0x1a5737-0x5f,_0x18f87e-0x11a);}try{const _0xc3ba22=await runTurn({'sessionId':this[_0x301d0b(_0x5ec4a4._0x592b33,0x305,0x2ba,_0x5ec4a4._0x17b1f3)],'turnId':createTurnId(this[_0x3e1e21(_0x5ec4a4._0x328b30,_0x5ec4a4._0x44c371,0x21b,_0x5ec4a4._0x14b8ed)]),'streaming':_0x59970b['streaming'],'signal':_0x59970b[_0x301d0b(0x2c1,0x299,0x2ff,_0x5ec4a4._0x2b2063)],'system':this['systemPrompt'],'messages':this['messages'],'message':normalizeUserInput(_0x4405c1),..._0x54b387?{'drainSteering':async()=>(await _0x54b387())[_0x3e1e21(0x219,0x1de,0x1a5,0x20b)](normalizeUserInput)}:{}},this['deps']);return this[_0x3e1e21(_0x5ec4a4._0x19d3b8,0x20b,0x229,_0x5ec4a4._0x75ba5f)]=_0xc3ba22[_0x301d0b(0x379,_0x5ec4a4._0x1a4c67,_0x5ec4a4._0x4d5a58,0x380)]['messages']['map'](normalizeMessage),_0xc3ba22;}catch(_0x37f340){if(_0x37f340 instanceof TurnFailedError){this[_0x301d0b(0x2f3,_0x5ec4a4._0x593f50,0x2df,_0x5ec4a4._0x26497e)]=synthesizeMissingToolResults(_0x37f340['state']['messages'][_0x301d0b(_0x5ec4a4._0x5102b8,_0x5ec4a4._0x32b369,_0x5ec4a4._0x4ecf71,_0x5ec4a4._0x40241b)](normalizeMessage));throw _0x37f340[_0x301d0b(_0x5ec4a4._0x2001c9,0x284,_0x5ec4a4._0x5102b8,0x2e7)];}throw _0x37f340;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,resolveToolPermissionClass,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
1
+ (function(_0x4ce751,_0x55b4e4){const _0x49ae3e={_0x28154f:0x2f1,_0x1f3485:0x2c3,_0x403d2f:0x253,_0x41bf5c:0x2ab,_0x1ecbfc:0x268,_0x141c1d:0x340,_0x45275f:0x2d6,_0x2e2dc3:0x2f0,_0x5e4879:0x274,_0x34c146:0x2cf,_0x50e5df:0x315,_0x56f53e:0x28f,_0x2683ae:0x2b0,_0x5e61b7:0x2c7,_0x269f17:0x237,_0x3b12ed:0x2c0,_0x44bac5:0x2e6,_0x6977f5:0x355,_0x2bc95b:0x2f8,_0x555771:0x29e,_0x49dc50:0x336},_0xad5a0d={_0x61b742:0xd8},_0x2e460a={_0x230a5e:0xe6};function _0x442f21(_0x4fb36b,_0x1caeec,_0x498348,_0x52ccf5){return _0x41f4(_0x498348-_0x2e460a._0x230a5e,_0x1caeec);}function _0x4870e5(_0x46f21a,_0x28fd2a,_0x1565b2,_0x540aa9){return _0x41f4(_0x46f21a-_0xad5a0d._0x61b742,_0x1565b2);}const _0xe9aff6=_0x4ce751();while(!![]){try{const _0x4ff45b=parseInt(_0x4870e5(0x28d,_0x49ae3e._0x28154f,_0x49ae3e._0x1f3485,0x271))/0x1*(parseInt(_0x4870e5(_0x49ae3e._0x403d2f,_0x49ae3e._0x41bf5c,_0x49ae3e._0x1ecbfc,0x24d))/0x2)+-parseInt(_0x4870e5(0x317,0x2aa,0x2c8,_0x49ae3e._0x141c1d))/0x3+-parseInt(_0x4870e5(_0x49ae3e._0x45275f,0x27f,_0x49ae3e._0x2e2dc3,0x30f))/0x4*(-parseInt(_0x442f21(0x241,0x24c,_0x49ae3e._0x5e4879,_0x49ae3e._0x34c146))/0x5)+-parseInt(_0x442f21(0x39b,0x312,0x328,_0x49ae3e._0x50e5df))/0x6*(parseInt(_0x442f21(0x287,0x22d,_0x49ae3e._0x56f53e,0x261))/0x7)+parseInt(_0x442f21(_0x49ae3e._0x2683ae,0x2b9,0x2f2,0x31a))/0x8*(-parseInt(_0x442f21(0x2f3,0x2f1,_0x49ae3e._0x5e61b7,0x2a3))/0x9)+parseInt(_0x4870e5(0x299,_0x49ae3e._0x269f17,_0x49ae3e._0x3b12ed,0x2ca))/0xa+parseInt(_0x442f21(_0x49ae3e._0x44bac5,_0x49ae3e._0x6977f5,_0x49ae3e._0x2bc95b,0x296))/0xb*(parseInt(_0x442f21(0x2c2,_0x49ae3e._0x555771,_0x49ae3e._0x44bac5,_0x49ae3e._0x49dc50))/0xc);if(_0x4ff45b===_0x55b4e4)break;else _0xe9aff6['push'](_0xe9aff6['shift']());}catch(_0x3df898){_0xe9aff6['push'](_0xe9aff6['shift']());}}}(_0x4ea0,0xc30fd));import{withEstimatedModelCost}from'./chunk-GAZGO6N7.js';import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-YNOIG4FD.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x49290f){return typeof _0x49290f==='object'&&_0x49290f!==null&&!Array['isArray'](_0x49290f);}function isToolOutputEnvelope(_0x18b697){const _0x585877={_0x5303e0:0x123,_0x257808:0xbd,_0x41dff5:0x3ee,_0x14e7bb:0x3d9,_0x2ae42c:0x412,_0x1525cc:0x13a,_0x4252b3:0x8c},_0x450c15={_0x3adc0a:0x210},_0x25cbb3={_0x45091a:0xbc};if(typeof _0x18b697!==_0x10f20f(0x14b,_0x585877._0x5303e0,0x115,_0x585877._0x257808)||_0x18b697===null||Array[_0x33b000(_0x585877._0x41dff5,_0x585877._0x14e7bb,0x445,_0x585877._0x2ae42c)](_0x18b697))return![];if(typeof _0x18b697['output']!==_0x10f20f(_0x585877._0x1525cc,0xce,_0x585877._0x4252b3,0xbe))return![];function _0x10f20f(_0x36af4e,_0x2456d9,_0x4233f5,_0x13c553){return _0x41f4(_0x2456d9- -_0x25cbb3._0x45091a,_0x36af4e);}function _0x33b000(_0x6b5621,_0x2968e5,_0x194292,_0x4234f4){return _0x41f4(_0x194292-_0x450c15._0x3adc0a,_0x4234f4);}const _0x812f85=_0x18b697['structured'];return _0x812f85===void 0x0||isJsonObject(_0x812f85);}function _0x4ea0(){const _0x8f4dbe=['y29TCgXLDgu','BwLZC2LUz01VzgvSq2fSBenVDw50','Dg90ywXdB3n0vxnKvgLJA3m','y2HHDe1VzgvS','yxnZAxn0yw50x21LC3nHz2u','zxH0zw5ZAw9UCW','DhjHBNnMB3jTzxi','CMvQzwn0','ywX3yxLZlwnVBMzPCM0','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','BM93','mZGWrMH2CgjQ','Bwf4vg9Rzw5Z','mJrovgDJs0W','DxnLCG','Dg9VBf91C2vFBwvZC2fNzq','CMvHC29UAw5Nu3rHCNrLzef0','oIbLEhbLy3rLzcb2ywX1zsbTyxrJAgLUzYbHBNLpzIbZy2HLBwe','Dg9VBf9JB21WBgv0zwq','C2v0q2HHDe1VzgvS','y29UDgvUDeLUzgv4','BwvZC2fNzq','Dg9VBenHBgXdB3vUDa','Dg90ywXfC3rPBwf0zwrdB3n0vxnKvgLJA3m','yw55t2y','nZmXnZzjqxDptKO','Aw5KzxG','yMvMB3jLtw9KzwXszxf1zxn0','DhvYBKLUzgv4','C2vZC2LVBKLK','ywz0zxjnB2rLBfjLC3bVBNnL','mJqXmZGWn1Pcz0H1rq','Dg9VBfj1BNrPBwu','BgLZDfrVB2Xty2HLBwfZ','ywjVCNq','DxnHz2u','zMLUywXnzxnZywDL','ywn0Aw9U','C3rYDwn0DxjLza','yxnZAxn0yw50x2nODw5R','C3LZDgvTuhjVBxb0','oNjLyxnVBMLUzW','ywXS','zgvZy3jPChrPB24','C2v0vg9VBhm','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','AgfZt3DU','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','ChvZAa','ywrKrxzLBNrmAxn0zw5LCG','zw5HyMXLza','C29Tzq','DhvYBI0','C3rHz2u','DhvYBLn0yxj0zwrbDa','CMvJB3jKrxzLBNq','sw52ywXPzcb0B29SigLUChv0igf0ia','CMvNAxn0CNK','Dg90ywXjBNb1DfrVA2vUCW','B25fDMvUDa','CMfJzq','zw50CMLLCW','ywnXDwLYzq','C3rHDhvZ','yM9VBgvHBG','y29UDgv4DfDPBMrVD0XPBwL0','AxnbCNjHEq','CMvHza','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','B3v0Chv0','C29YDa','oIbLEhbLy3rLzcbVBMuGB2yG','oIbLEhbLy3rLzcbIB29SzwfU','C2vUza','DhvYBKnVBxbSzxrLzef0','BNvTyMvY','mZC2odGXnKXutNf1EG','AxrLBuLK','zMLSDgvY','mtHlrK1os3C','BwvZC2fNzxm','CNvUvhjHBNnMB3jTzxjZ','zxHLy3v0Aw9Uqxv0Ag9YAxPHDgLVBG','oMfZC2LZDgfUDdO','oIbLEhbLy3rLzcbHCNjHEq','BgvUz3rO','ywrKAxrPB25HBfbYB3bLCNrPzxm','zgvMyxvSDe1LC3nHz2u','ywrK','C3rYAw5NAwz5','ywjVCNrLza','BwfW','C2v0','Bw9KzwXdywXSq291BNq','C2LNBMfS','z2v0vg9VBhm','B3v0Chv0sw5KzxG','yMvMB3jLvg9VBev4zwn1DgLVBG','ywz0zxjuDxjUq29TCgXLDgu','CMvHC29UAw5Nx21LC3nHz2u','C3rHDgu','BMv4Da','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','AxrLBxm','CMvXDwLYzwq','BgLZDa','y29UDgvUDa','Bw9KzwXFCMvZCg9UC2u','zxjYB3i','CMvXDwvZDenVDw50','Dg9VBf9JywXS','CMvXDwvZDa','Dw5WCMLJzwrnB2rLBenHBgXdB3vUDa','C2v0u3LZDgvTuhjVBxb0','ywz0zxjnzxnZywDLqxbWzw5K','mti1neT3BePzsW','oIbLEhbLy3rLzcbUDw1Izxi','CMvNAxn0zxi','C3rYzwfT','CMvHC29UAw5NtwvZC2fNzuLK','zgvWCW','yMvMB3jLqxnZAxn0yw50qxbWzw5K','Aw5WDxq','BgfZDfjLC3bVBNnL','C2vZC2LVBKrPCG','CMvHC29UAw5Nx2nODw5R','ChjVDMLKzxi','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','DgHLBG','zMLUywXFBwvZC2fNzq','C3rYAw5N','CMvZzxrnzxnZywDLCW','y2f0y2G','Dg90ywXnB2rLBfrPBwvnCW','nJm5odvQrM1rCKS','Aw5WDxrty2HLBwe','zgvSzxrL','oIb0zxjTAw5HBcbVyNnLCNzLCIaI','Dg9VBhncEu5HBwu','CMvTB3zLrxzLBNrmAxn0zw5LCG','Bw9KzwXdywXSCW','DMfSDwu','BMfTzq','Dgv4Da','oIbLEhbLy3rLzcbVyMPLy3q','CMvZCg9UC2u','C2v0vg9WAwm','ChjVCgvYDgLLCW','CMvHC29UAw5Nq29TCgXLDgvKqxq','Dg90ywXpDxrWDxruB2TLBNm','yw1VDw50vxnKvgLJA3m','zMLUza','AM9PBG','Aw50zxjUywXmAwzLy3LJBgu','DhjPBq','x3n5C3rLBvbYB21WDa','B25vC2vYtwvZC2fNzq','zgvSDge','CNvUt2jZzxj2zxjZ','Dg9VBf9VDxrWDxrFy2H1BMS','Aw5WDxrezwX0yq','mtK1otiYm2L0B0PgvG','A2v5CW','Dw5RBM93BL90B29S','zhjHAw5tDgvLCMLUzW','DhLWzq','ChjVDMLKzxjtDgf0zq','yxnRvxnLCG','zNvUy3rPB24','B3v0Chv0rM9YBwf0','CNvU','C2XPy2u','Bwv0yq','mtu0nxbuswTwuG','zxn0Aw1HDgvKq29ZDenHBgXdB3vUDa','DxnLCL9TzxnZywDL','iIbMB3iG','Bw9KzwXFCMvXDwvZDa','Bw9KzwXuAw1Ltxm','CgvYBwLZC2LVBKnSyxnZ','DhvYBKLK','oIb1BMv4CgvJDgvKigzPzwXKici','ChjVDMLKzxjFCMv0CNK','DgHPBMTPBMC','Bw9KzwW','mta2nZm5nZbot0jRC0O','C3rYzwfTAw5N','oIbLEhbLy3rLzcbZDhjPBMC','C3vTBwfYEuLUzgv4','C3LZDgvT','C2v0u2vZC2LVBKLK','B25uB29Sq2fSBa','CMv0DxjU','ywz0zxjuB29SuMvZDwX0','vg9VBev4zwn1DgLVBKvYCM9Y','iIbPCYbHBhjLywr5igvUywjSzwq','Dg90ywXszxbVCNrLzenVC3rvC2ruAwnRCW','B2jZzxj2zxi','CMvHC29U','yxnZAxn0yw50twvZC2fNzuLK','y2f1C2u','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','Dg9VBf91C2vFzgvSDge','z2v0','CMvWB3j0zwrdB3n0q2fSBenVDw50','Dg9VBf9YzwPLy3rLza','ChjVDMLKzxjFC3rYzwfTx3jLC2v0','y29UDgvUDf9KzwX0yq','CMvWB3j0zwrdB3n0','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','C2vZC2LVBI0','Bw9KzwXjzgvUDgL0Eq','B3jKzxi','Dg9tDhjPBMC','zxn0Aw1HDgvKq29ZDa','B2jQzwn0','CMvHC29UAw5Nvg9Rzw5Z','nZGZuwHfChrj','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','Bwv0ywrHDge','CMvZB2X2zq','DgvYBwLUywW','Bwv0CMLJCW','Dg9VBf9ZDgfYDgvK','zw51Bq','Dg9VBf91C2vFy2H1BMS','Dg9VBfjLC3vSDhm','Dg9VBf91C2u','DhvYBL9JB21WBgv0zq','zg9Uzq','q2fUBM90ihjLz2LZDgvYihrLCM1PBMfSig9IC2vYDMvYici','yxjYyxK','ChjPy2LUz1bYB3zPzgvYswq','A2LUza','y29TCgXLDgvK'];_0x4ea0=function(){return _0x8f4dbe;};return _0x4ea0();}function validateAgainstSchema(_0x3f8560,_0x4934bc,_0x5f2ca3){const _0x3e45fe={_0x2bf0e5:0x77,_0x18285e:0xbd,_0x124d3d:0x11b,_0xc4f73a:0x18b,_0x347586:0xd9,_0x3827c0:0xfa,_0x3a2d96:0x6a,_0x841578:0x5b,_0x3b51e5:0x11,_0x5a32f5:0x3c,_0x22813c:0xaf,_0xad7715:0x9e,_0x549660:0xe0,_0x200268:0x2f,_0x25631e:0xd4,_0x30ee14:0xdd,_0x4171b4:0x89,_0x3752e3:0xff,_0x18c192:0x86,_0x40116f:0xec,_0xc4032e:0x148,_0x4c3255:0x20,_0x487914:0x126,_0x58464a:0x133,_0x217a58:0xca,_0x39ab6d:0x14e,_0x6dfbc7:0x12e,_0x3935e6:0x2,_0x4f0a27:0xb8,_0x4552c6:0xe4,_0x569e8d:0x122,_0x56cb04:0xdd,_0x4875de:0xd7,_0x19f89f:0xe0,_0x26442c:0xb5,_0x552f6a:0x136,_0x403fd1:0x85,_0x1e289d:0x113,_0x5afaa9:0x120,_0x279c21:0x108,_0x2d1d9b:0xf9,_0xbffcb5:0x106,_0x3b3f02:0xa5,_0x39165f:0xcb,_0x1d1622:0xd8,_0x10466b:0x14a,_0x877ec7:0x130,_0x288f63:0x115,_0x4216e4:0x13a,_0x49b43f:0x183,_0x591dc1:0xca,_0x1deb9e:0x9f,_0x4ea511:0x96,_0x179be5:0x51,_0x2b1166:0x6f,_0x337829:0xc9,_0x2e640d:0x7a,_0x492a8d:0xe2,_0x34f4c1:0x10d,_0x101471:0xb9,_0x405df3:0xa2},_0x2ab6dc={_0x5f4a2a:0x123,_0x4ad2e1:0x152,_0x368da5:0x16a,_0xd51fdc:0x18d},_0x373b35={_0x1c1406:0x10b};function _0x2edc47(_0xff1a75,_0x414188,_0xa714c7,_0x7cfd78){return _0x41f4(_0x414188- -_0x373b35._0x1c1406,_0x7cfd78);}if('anyOf'in _0x5f2ca3){const _0x208724=_0x5f2ca3[_0x192a74(0x113,_0x3e45fe._0x2bf0e5,_0x3e45fe._0x18285e,0x4e)][_0x2edc47(0xcf,_0x3e45fe._0x124d3d,_0x3e45fe._0xc4f73a,0xd9)](_0x4800fe=>{try{return validateAgainstSchema(_0x3f8560,_0x4934bc,_0x4800fe),!![];}catch{return![];}});if(!_0x208724)throw new Error(_0x2edc47(_0x3e45fe._0x347586,0x120,_0x3e45fe._0x3827c0,0xc3)+_0x3f8560+_0x192a74(_0x3e45fe._0x3a2d96,0x12a,0xb6,0x4b));return;}function _0x192a74(_0x46533c,_0x23bd25,_0x3ca289,_0x159424){return _0x41f4(_0x3ca289- -0x14e,_0x46533c);}switch(_0x5f2ca3[_0x2edc47(0x8a,0xa2,0x76,0xa2)]){case _0x192a74(_0x3e45fe._0x841578,-_0x3e45fe._0x3b51e5,_0x3e45fe._0x5a32f5,0x26):if(typeof _0x4934bc!=='string')throw new Error(_0x2edc47(_0x3e45fe._0x22813c,0x120,0x170,0xd0)+_0x3f8560+_0x192a74(_0x3e45fe._0xad7715,_0x3e45fe._0x549660,0x75,_0x3e45fe._0x200268));if(_0x5f2ca3['enum']!==void 0x0&&!_0x5f2ca3[_0x2edc47(_0x3e45fe._0x25631e,_0x3e45fe._0x30ee14,_0x3e45fe._0x4171b4,_0x3e45fe._0x3752e3)]['includes'](_0x4934bc))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x3f8560+_0x192a74(0x83,_0x3e45fe._0x18c192,_0x3e45fe._0x40116f,0xb8)+_0x5f2ca3[_0x2edc47(0xfd,0xdd,_0x3e45fe._0xc4032e,0x139)][_0x2edc47(0x7d,0x95,_0x3e45fe._0x4c3255,0x26)](',\x20'));return;case _0x2edc47(_0x3e45fe._0x487914,_0x3e45fe._0x58464a,0x16a,0x131):if(typeof _0x4934bc!==_0x2edc47(0x120,0x133,0x16b,_0x3e45fe._0x217a58))throw new Error(_0x192a74(0xcf,_0x3e45fe._0x39ab6d,0xdd,_0x3e45fe._0x6dfbc7)+_0x3f8560+_0x192a74(_0x3e45fe._0x3935e6,-0x2d,0x2e,0x21));return;case _0x2edc47(_0x3e45fe._0x4f0a27,0x128,0xc8,_0x3e45fe._0x4552c6):if(typeof _0x4934bc!==_0x192a74(0x125,0x9e,0xe5,_0x3e45fe._0x569e8d))throw new Error(_0x192a74(0x136,0x71,_0x3e45fe._0x56cb04,_0x3e45fe._0x4875de)+_0x3f8560+_0x2edc47(0xe4,0x130,0xd8,_0x3e45fe._0x19f89f));return;case _0x2edc47(0x104,0xe4,_0x3e45fe._0x26442c,0x74):if(!Array[_0x192a74(_0x3e45fe._0x552f6a,0xea,0xe7,_0x3e45fe._0x403fd1)](_0x4934bc))throw new Error(_0x2edc47(_0x3e45fe._0x1e289d,_0x3e45fe._0x5afaa9,0x16c,0x112)+_0x3f8560+_0x192a74(0xc9,_0x3e45fe._0x279c21,_0x3e45fe._0x2d1d9b,0xd9));_0x4934bc['forEach']((_0x56d1fd,_0x3c1cd0)=>{const _0x42ea09={_0x515a0d:0x4b};function _0x5c5605(_0x5ae733,_0xb7f88a,_0x52fe6d,_0x2d0874){return _0x2edc47(_0x5ae733-0xd9,_0x5ae733- -0x272,_0x52fe6d-_0x42ea09._0x515a0d,_0x52fe6d);}validateAgainstSchema(_0x3f8560+'['+_0x3c1cd0+']',_0x56d1fd,_0x5f2ca3[_0x5c5605(-_0x2ab6dc._0x5f4a2a,-_0x2ab6dc._0x4ad2e1,-_0x2ab6dc._0x368da5,-_0x2ab6dc._0xd51fdc)]);});return;case _0x2edc47(0xf7,0xd4,_0x3e45fe._0xbffcb5,0xd9):if(!isJsonObject(_0x4934bc))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x3f8560+_0x192a74(0x31,0x45,0x4a,_0x3e45fe._0x3b3f02));for(const _0x46bbf9 of _0x5f2ca3[_0x192a74(0xa1,0xbc,0x10d,0x11d)]??[]){if(!Object[_0x192a74(_0x3e45fe._0x39165f,_0x3e45fe._0x1d1622,0xd3,0x116)](_0x4934bc,_0x46bbf9))throw new Error(_0x192a74(_0x3e45fe._0x10466b,0x13c,0xdd,_0x3e45fe._0x877ec7)+_0x3f8560+_0x2edc47(0xf6,_0x3e45fe._0x288f63,0x15b,_0x3e45fe._0x4216e4)+_0x46bbf9+'\x22');}if(_0x5f2ca3[_0x2edc47(0x143,0x13e,0x157,_0x3e45fe._0x49b43f)]===![]){const _0x37ed8b=Object[_0x2edc47(_0x3e45fe._0x591dc1,_0x3e45fe._0x1deb9e,_0x3e45fe._0x4ea511,_0x3e45fe._0xbffcb5)](_0x4934bc)[_0x192a74(0x61,0xa2,_0x3e45fe._0x179be5,-0x1e)](_0x166609=>!Object[_0x192a74(0xa1,0x12b,0xd3,0xfd)](_0x5f2ca3[_0x192a74(0xa0,0x94,0x4d,0x8f)],_0x166609));if(_0x37ed8b!==void 0x0)throw new Error(_0x2edc47(0x134,0x120,0xc1,0x17a)+_0x3f8560+_0x192a74(0x94,0xd8,_0x3e45fe._0x2b1166,_0x3e45fe._0x337829)+_0x37ed8b+'\x22');}for(const [_0x5ba866,_0x325091]of Object[_0x192a74(0x12e,_0x3e45fe._0x2e640d,_0x3e45fe._0x492a8d,_0x3e45fe._0x34f4c1)](_0x5f2ca3[_0x192a74(0xbc,_0x3e45fe._0x101471,0x4d,_0x3e45fe._0x405df3)])){Object['hasOwn'](_0x4934bc,_0x5ba866)&&validateAgainstSchema(_0x3f8560+'.'+_0x5ba866,_0x4934bc[_0x5ba866],_0x325091);}}}function normalizeToolOutputValue(_0x52244f){const _0x42f1c5={_0x57b065:0x135,_0x36e5fc:0xd1,_0x2681c8:0x105,_0x295060:0x12a,_0x5b7ecf:0x1cb,_0x409b21:0x237,_0x20afb2:0x3d4,_0x409dce:0x427,_0x13c168:0x46b,_0x10e7bf:0x400,_0x3313fe:0x395,_0x517414:0x15e,_0x578622:0x108,_0x49fb5f:0x13c,_0x32bbb2:0xad,_0x53fed1:0xf1,_0xe524cb:0x532,_0x2e6fff:0x4c2},_0x2c94d7={_0x50951f:0x33d};function _0xa8c70c(_0x2a3c58,_0x550d75,_0x5934a2,_0x521551){return _0x41f4(_0x2a3c58- -_0x2c94d7._0x50951f,_0x550d75);}if(isToolOutputEnvelope(_0x52244f))return{'output':_0x52244f['output'],'structured':_0x52244f[_0xa8c70c(-0x124,-0xf8,-_0x42f1c5._0x57b065,-_0x42f1c5._0x36e5fc)]??{'value':_0x52244f[_0xa8c70c(-_0x42f1c5._0x2681c8,-_0x42f1c5._0x295060,-0x169,-0x96)]},..._0x52244f[_0xa8c70c(-_0x42f1c5._0x5b7ecf,-_0x42f1c5._0x409b21,-0x1a1,-0x1fb)]!==void 0x0?{'content':_0x52244f[_0x3da2c5(0x389,_0x42f1c5._0x20afb2,0x3e8,_0x42f1c5._0x409dce)]}:{}};if(typeof _0x52244f===_0x3da2c5(_0x42f1c5._0x13c168,0x418,_0x42f1c5._0x10e7bf,_0x42f1c5._0x3313fe))return{'output':_0x52244f,'structured':{'value':_0x52244f}};if(typeof _0x52244f===_0xa8c70c(-_0x42f1c5._0x517414,-0x108,-0x168,-0x117)&&_0x52244f!==null&&!Array[_0xa8c70c(-_0x42f1c5._0x578622,-0x147,-_0x42f1c5._0x49fb5f,-_0x42f1c5._0x32bbb2)](_0x52244f))return{'output':JSON[_0xa8c70c(-_0x42f1c5._0x53fed1,-0x9b,-0x95,-0x11e)](_0x52244f,null,0x2),'structured':_0x52244f};function _0x3da2c5(_0x50325e,_0x2f5d32,_0x24134a,_0xa7112c){return _0x41f4(_0x24134a-0x276,_0x50325e);}return{'output':JSON[_0x3da2c5(0x50c,_0x42f1c5._0xe524cb,_0x42f1c5._0x2e6fff,0x51f)](_0x52244f,null,0x2),'structured':{'value':_0x52244f}};}function createToolOutput(_0x1dc312,_0x31b3d6={'value':_0x1dc312},_0xe07ca6){return{'output':_0x1dc312,'structured':_0x31b3d6,..._0xe07ca6!==void 0x0?{'content':_0xe07ca6}:{}};}var ToolExecutionError=class extends Error{[_0x249222(0x29a,0x2a8,0x235,0x2a7)];constructor(_0x45f54c,_0x4dc1b9={}){const _0x4dfe0c={_0x33f204:0x1bf,_0x5d7bc3:0x1af,_0x15bd26:0x192},_0xebdfb1={_0x1c5760:0x11f,_0xaa24e7:0x408};super(_0x45f54c),this['name']=_0x53208c(-0x184,-_0x4dfe0c._0x33f204,-_0x4dfe0c._0x5d7bc3,-_0x4dfe0c._0x15bd26);function _0x53208c(_0xa89a7,_0x4b661d,_0x4e0721,_0xa8ff5e){return _0x249222(_0xa89a7-_0xebdfb1._0x1c5760,_0x4e0721- -_0xebdfb1._0xaa24e7,_0xa89a7,_0xa8ff5e-0x18);}this['structured']=_0x4dc1b9;}};function defineTool(_0x22ea23){return _0x22ea23;}function resolveToolPermissionClass(_0x373123){const _0x5ab923={_0x2f4546:0x15c,_0x1acb87:0x10c,_0xa04a4:0xec,_0x10d0cd:0x178,_0x669d7c:0x1f7,_0xbde200:0x186,_0x1e720c:0x193,_0x33731e:0x6c},_0x337e51={_0x10619a:0x5a},_0x53fa95=_0x373123?.[_0x4a3f9d(-_0x5ab923._0x2f4546,-_0x5ab923._0x1acb87,-0xc3,-_0x5ab923._0xa04a4)];function _0x4a3f9d(_0x50b47d,_0x58af99,_0x4be97a,_0x1b9629){return _0x249222(_0x50b47d-_0x337e51._0x10619a,_0x1b9629- -0x336,_0x58af99,_0x1b9629-0x9b);}if(_0x53fa95===_0x1d1a4e(0x171,_0x5ab923._0x10d0cd,_0x5ab923._0x669d7c,_0x5ab923._0xbde200)||_0x53fa95==='write'||_0x53fa95===_0x1d1a4e(_0x5ab923._0x1e720c,0x1bc,0x162,0x14b))return _0x53fa95;function _0x1d1a4e(_0x2754ff,_0x594193,_0x31108e,_0x9ad7f9){return _0x249222(_0x2754ff-0x3b,_0x9ad7f9- -0x13f,_0x594193,_0x9ad7f9-0xe3);}return _0x4a3f9d(-0xdd,-0x94,-_0x5ab923._0x33731e,-0xac);}var ToolRegistry=class{[_0x4c1020(0xe3,0x15d,0x110,0x13f)]=new Map();constructor(_0x54b43c=[]){const _0xdd7b2e={_0x5e74dc:0x18b,_0x7a8b2d:0x162,_0x1fa9b7:0x11d,_0x1b40e1:0x200},_0x47c39e={_0x205b70:0xd6};function _0x55c444(_0x150c74,_0x22f981,_0xc1de47,_0x4c34ca){return _0x4c1020(_0xc1de47,_0x22f981-0x34,_0xc1de47-_0x47c39e._0x205b70,_0x150c74- -0x2b5);}for(const _0x157482 of _0x54b43c){this[_0x55c444(-_0xdd7b2e._0x5e74dc,-_0xdd7b2e._0x7a8b2d,-_0xdd7b2e._0x1fa9b7,-_0xdd7b2e._0x1b40e1)](_0x157482);}}[_0x4c1020(0x19f,0x12c,0xde,0x12a)](_0x266632){const _0x18fa07={_0x1eca45:0x312,_0x2422f2:0x2a5,_0x433f10:0x27b},_0x217966={_0x9c2769:0x8b,_0x2196e1:0x7b},_0x5831a2={_0x467b39:0x91};function _0x36bf0d(_0x43ac6d,_0x41fcc0,_0x588851,_0x173123){return _0x249222(_0x43ac6d-0x1d7,_0x588851-0x80,_0x41fcc0,_0x173123-_0x5831a2._0x467b39);}function _0x19971f(_0x1d494a,_0x156e2e,_0xa7bf87,_0x150d1e){return _0x249222(_0x1d494a-0x192,_0x156e2e-_0x217966._0x9c2769,_0x1d494a,_0x150d1e-_0x217966._0x2196e1);}this['toolsByName'][_0x36bf0d(0x332,0x333,0x35e,_0x18fa07._0x1eca45)](_0x266632[_0x36bf0d(0x260,0x2ea,_0x18fa07._0x2422f2,_0x18fa07._0x433f10)],_0x266632);}[_0x4c1020(0x166,0x1f6,0x176,0x180)](_0x15cc5f){const _0x579543={_0x1c2fbf:0x2ac,_0x428d6c:0x2d3,_0x4b20f8:0x2c2,_0x433e98:0x2c8},_0x3123d1={_0x7449c0:0x6f},_0x7f1254={_0x86948a:0xcb,_0x14314d:0x1b5,_0x5ceff9:0x9};function _0x49a2da(_0x2cfb6e,_0x74b7b6,_0x61a76d,_0x17e678){return _0x249222(_0x2cfb6e-_0x7f1254._0x86948a,_0x61a76d-_0x7f1254._0x14314d,_0x74b7b6,_0x17e678-_0x7f1254._0x5ceff9);}function _0x318911(_0x3cf124,_0x3885e8,_0x59ce88,_0x7d696f){return _0x249222(_0x3cf124-0xfa,_0x3885e8-0xb2,_0x7d696f,_0x7d696f-_0x3123d1._0x7449c0);}return this[_0x318911(_0x579543._0x1c2fbf,_0x579543._0x428d6c,0x271,_0x579543._0x4b20f8)][_0x318911(0x2bc,0x314,_0x579543._0x433e98,0x2cc)](_0x15cc5f);}[_0x249222(0x2dc,0x2eb,0x35d,0x33e)](){const _0xda96d={_0x29dd00:0x18d,_0x74bd4f:0x153},_0x293ab7={_0x5f20bb:0x3ae};function _0x246ffc(_0x426e9e,_0x1ffb84,_0x537857,_0x4ced27){return _0x249222(_0x426e9e-0xf6,_0x1ffb84- -_0x293ab7._0x5f20bb,_0x537857,_0x4ced27-0x17d);}return[...this[_0x246ffc(-0x11a,-_0xda96d._0x29dd00,-_0xda96d._0x74bd4f,-0x151)]['values']()];}['listToolSchemas'](){const _0x1ffeff={_0x4329fa:0x11c,_0x48a86a:0x191,_0xed5f3b:0x480,_0xb93afb:0x47f,_0x5709fb:0x4dd},_0x1f4d49={_0x2903cf:0x107,_0x52f776:0x197},_0x53f970={_0x444bfc:0x34a,_0x505c34:0x7b,_0x344da9:0x185},_0x34fdd3={_0x408d96:0xe4,_0x353819:0x325},_0x3ecf9e={_0x4210b9:0x1ee,_0x37cf57:0x1a2};function _0x2ac6fe(_0x1529f7,_0x321e37,_0xac3926,_0x3a3606){return _0x249222(_0x1529f7-_0x3ecf9e._0x4210b9,_0xac3926-_0x3ecf9e._0x37cf57,_0x3a3606,_0x3a3606-0x3b);}function _0x75c754(_0x2609ad,_0x240ec9,_0x73c3b0,_0x5b7aac){return _0x4c1020(_0x2609ad,_0x240ec9-_0x34fdd3._0x408d96,_0x73c3b0-0x5b,_0x240ec9- -_0x34fdd3._0x353819);}return this[_0x75c754(-0xe9,-_0x1ffeff._0x4329fa,-_0x1ffeff._0x48a86a,-0x131)]()[_0x2ac6fe(_0x1ffeff._0xed5f3b,0x410,_0x1ffeff._0xb93afb,_0x1ffeff._0x5709fb)](_0x249eb5=>{function _0xba5b60(_0x5ee12e,_0x26a057,_0x501d6b,_0x33cdf7){return _0x2ac6fe(_0x5ee12e-0x1f4,_0x26a057-0xd7,_0x33cdf7-0x78,_0x501d6b);}function _0xcc6b96(_0x4e9c66,_0x2677d5,_0xcedac0,_0x4dd892){return _0x75c754(_0xcedac0,_0x4e9c66-_0x53f970._0x444bfc,_0xcedac0-_0x53f970._0x505c34,_0x4dd892-_0x53f970._0x344da9);}return{'name':_0x249eb5[_0xcc6b96(0x168,0x113,_0x1f4d49._0x2903cf,0x16d)],'description':_0x249eb5[_0xcc6b96(0x1f0,0x1d1,0x1de,_0x1f4d49._0x52f776)],'input_schema':_0x249eb5['inputSchema']};});}};function validateToolInput(_0x57b3cc,_0x43eef0){const _0x741177={_0x5aac29:0x36a,_0x24cd1d:0x366,_0x5a22e0:0x3a0};validateAgainstSchema(_0x239762(_0x741177._0x5aac29,_0x741177._0x24cd1d,0x32a,_0x741177._0x5a22e0),_0x57b3cc,_0x43eef0);function _0x239762(_0xcce1ff,_0x29a98e,_0x1d28d8,_0xf2199b){return _0x249222(_0xcce1ff-0xa7,_0x1d28d8-0x119,_0x29a98e,_0xf2199b-0x3a);}return _0x57b3cc;}function deriveFinalToolOutput(_0x156817){const _0x4a6f78={_0x467b0c:0xbf,_0x212431:0xe8,_0x210f90:0xc4,_0x349cd7:0x1e,_0x2c06c9:0xa8,_0x1c3bdf:0x77,_0x358f75:0x2d9,_0x29fcff:0x338,_0x33df2c:0x2c9,_0x59aa71:0x244,_0x4bfe2b:0x335,_0x459fcc:0x395,_0x2e3075:0x34b,_0x2691be:0xb6,_0x2e23ff:0x8c,_0x1a56bf:0x4f},_0x45beae={_0x11f2db:0x1dd},_0x53e34f={_0x53fbca:0x16e};if(_0x156817[_0x20a13d(0xf3,_0x4a6f78._0x467b0c,0x87,_0x4a6f78._0x212431)]===0x0)return{'output':'','structured':{}};if(_0x156817[_0x20a13d(_0x4a6f78._0x210f90,_0x4a6f78._0x349cd7,0x87,0xc7)]===0x1)return{'output':_0x156817[0x0][_0x20a13d(0xa0,_0x4a6f78._0x2c06c9,_0x4a6f78._0x1c3bdf,0x1a)],'structured':_0x156817[0x0][_0xb9051d(_0x4a6f78._0x358f75,0x300,_0x4a6f78._0x29fcff,_0x4a6f78._0x33df2c)],..._0x156817[0x0][_0xb9051d(_0x4a6f78._0x59aa71,0x259,0x226,0x227)]!==void 0x0?{'content':_0x156817[0x0]['content']}:{}};function _0x20a13d(_0x460482,_0x38a580,_0x46dff0,_0x57a295){return _0x4c1020(_0x57a295,_0x38a580-0xea,_0x46dff0-0x19b,_0x46dff0- -_0x53e34f._0x53fbca);}function _0xb9051d(_0x24b834,_0x316c8c,_0x1ad180,_0x1ed994){return _0x249222(_0x24b834-0xe6,_0x316c8c-0x58,_0x1ed994,_0x1ed994-_0x45beae._0x11f2db);}const _0x20f7df=_0x156817['filter'](_0x1bfc44=>_0x1bfc44[_0x20a13d(-0x77,-0xa3,-0x4f,-0x4)]!==void 0x0);return{'output':_0x156817['map'](_0x34204e=>_0x34204e[_0x20a13d(0x36,0x91,0x77,0x31)])['join'](''),'structured':{'chunks':_0x156817[_0xb9051d(0x34e,_0x4a6f78._0x4bfe2b,_0x4a6f78._0x459fcc,_0x4a6f78._0x2e3075)](_0x3df658=>_0x3df658['structured'])},..._0x20f7df['length']===0x1?{'content':_0x20f7df[0x0][_0x20a13d(-_0x4a6f78._0x2691be,-_0x4a6f78._0x2e23ff,-_0x4a6f78._0x1a56bf,-0x91)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2303e7,_0x43df1d,_0x3768b9,_0x146c25=[]){const _0x2ba0b9={_0x1fc322:0x9,_0x11571d:0xf},_0x1e8430={_0x468733:0x5b,_0x1493df:0x216},_0xd7bee0={_0x2f231e:0x1ec,_0x2fd213:0x103};function _0x825cf0(_0x32b440,_0x512ca1,_0x2a48f8,_0x3e1537){return _0x4c1020(_0x3e1537,_0x512ca1-0xb,_0x2a48f8-_0xd7bee0._0x2f231e,_0x32b440-_0xd7bee0._0x2fd213);}function _0x22b867(_0x5e337b,_0x13b384,_0x24180b,_0x182982){return _0x249222(_0x5e337b-_0x1e8430._0x468733,_0x182982- -_0x1e8430._0x1493df,_0x24180b,_0x182982-0xe2);}return{'callId':_0x2303e7['id'],'toolName':_0x2303e7[_0x22b867(0x6e,-0x44,-_0x2ba0b9._0x1fc322,_0x2ba0b9._0x11571d)],'status':_0x22b867(0x57,0x13,-0x4d,-0x13),'output':_0x43df1d,'structured':_0x3768b9,'chunks':_0x146c25,'meta':createToolMeta()};}function createRejectedToolResult(_0x75c9e2,_0x3c14bc){const _0x2284b0={_0x1510be:0x530,_0x56339a:0x532,_0x3b7d33:0x612,_0x1fbbc9:0x5ae,_0xf95a15:0x608,_0x4ce8e9:0x4bd,_0x1daa24:0x504,_0x426d2d:0x491,_0x5a8562:0x5d9},_0x2daeaf={_0x2de660:0x19},_0x1cb4e7={_0x5e00a8:0x184,_0x1f381a:0x137};function _0x3c3e84(_0x13fb46,_0x4a3492,_0x49a40d,_0x5b8e73){return _0x249222(_0x13fb46-_0x1cb4e7._0x5e00a8,_0x4a3492-0x2d3,_0x13fb46,_0x5b8e73-_0x1cb4e7._0x1f381a);}const _0x1f4d8f=_0x3c14bc?.[_0x3c3e84(_0x2284b0._0x1510be,0x504,_0x2284b0._0x56339a,0x4d2)]()[_0x5c1a8d(_0x2284b0._0x3b7d33,_0x2284b0._0x1fbbc9,0x5f7,0x60c)]?_0x3c14bc:_0x5c1a8d(0x61a,0x625,_0x2284b0._0xf95a15,0x5a0)+_0x75c9e2['name'];function _0x5c1a8d(_0x139373,_0x25db1c,_0x19cb97,_0x6e6400){return _0x249222(_0x139373-_0x2daeaf._0x2de660,_0x19cb97-0x320,_0x25db1c,_0x6e6400-0x35);}return createErrorToolResult(_0x75c9e2,_0x1f4d8f,{'error':'tool_rejected',..._0x3c14bc?.[_0x3c3e84(_0x2284b0._0x4ce8e9,_0x2284b0._0x1daa24,0x49f,_0x2284b0._0x426d2d)]()[_0x5c1a8d(_0x2284b0._0x5a8562,0x65e,0x5f7,_0x2284b0._0x3b7d33)]?{'reason':_0x3c14bc}:{}});}function createAbortedToolResult(_0x1b6d75,_0x3413c8,_0x1b6082=[]){const _0x429885=toAbortError(_0x3413c8);return createErrorToolResult(_0x1b6d75,_0x429885['message'],{'error':_0x429885['message'],'aborted':!![]},_0x1b6082);}function createSuccessToolResult(_0x540b77,_0x31c1e5,_0x533c45){const _0x248180={_0x95fa14:0x2ca,_0x553454:0x330,_0x208a6e:0x182,_0x416414:0x16c},_0x32d089={_0x527b11:0xe3},_0x24db34={_0x31419b:0x4d};function _0x287bd7(_0x2739c0,_0x299122,_0x1a8384,_0x5d2407){return _0x4c1020(_0x299122,_0x299122-0x47,_0x1a8384-0x34,_0x5d2407-_0x24db34._0x31419b);}function _0x23d6f1(_0x5bd0eb,_0xd7174e,_0x1713ee,_0x1f03c1){return _0x249222(_0x5bd0eb-_0x32d089._0x527b11,_0xd7174e-0x10b,_0x5bd0eb,_0x1f03c1-0xbb);}return{'callId':_0x540b77['id'],'toolName':_0x540b77[_0x23d6f1(_0x248180._0x95fa14,_0x248180._0x553454,0x350,0x2e9)],'status':'ok','output':_0x31c1e5[_0x287bd7(0x1fe,0x1ea,0x269,0x232)],'structured':_0x31c1e5['structured'],..._0x31c1e5[_0x287bd7(0x1a5,_0x248180._0x208a6e,0x17d,_0x248180._0x416414)]!==void 0x0?{'content':_0x31c1e5['content']}:{},'chunks':_0x533c45,'meta':createToolMeta()};}function createUnknownToolResult(_0x11589d){const _0xde1312={_0x423830:0x1d0,_0x1806bf:0x293,_0x3e436f:0x259},_0x2ca220={_0xfcd52a:0x1d3},_0x1bae15={_0x38715d:0x135};function _0x13df4b(_0x5e0cab,_0x1ac003,_0x446311,_0x34314b){return _0x249222(_0x5e0cab-0x43,_0x1ac003- -0x333,_0x446311,_0x34314b-_0x1bae15._0x38715d);}function _0x53f645(_0x4d8a2c,_0x5d9dfb,_0x4e1865,_0x4eb8d9){return _0x249222(_0x4d8a2c-0x1e7,_0x4eb8d9-0x7,_0x4d8a2c,_0x4eb8d9-_0x2ca220._0xfcd52a);}return createErrorToolResult(_0x11589d,'Unknown\x20tool:\x20'+_0x11589d[_0x53f645(_0xde1312._0x423830,_0xde1312._0x1806bf,_0xde1312._0x3e436f,0x22c)],{'error':_0x53f645(0x204,0x234,0x214,0x241)});}function isDispatchDecision(_0x4b8926){const _0x1b8d15={_0x43e0c1:0x4ac,_0x39d32a:0x467,_0x4f6c17:0x493,_0x32a67f:0x4ac,_0x50377a:0x4e0},_0xc6b979={_0x3800cd:0x239},_0x122197={_0x3e3182:0xf6};function _0x3742b3(_0xe0de1a,_0x531dea,_0xb803d4,_0x42dfe4){return _0x249222(_0xe0de1a-0x157,_0x531dea- -_0x122197._0x3e3182,_0x42dfe4,_0x42dfe4-0x1f);}if(typeof _0x4b8926!==_0x369ced(_0x1b8d15._0x43e0c1,_0x1b8d15._0x39d32a,0x48f,0x4a7)||_0x4b8926===null)return![];function _0x369ced(_0x32be06,_0x561250,_0x58d39d,_0x470ae7){return _0x249222(_0x32be06-0x40,_0x470ae7-_0xc6b979._0x3800cd,_0x32be06,_0x470ae7-0x84);}return _0x4b8926[_0x369ced(_0x1b8d15._0x4f6c17,_0x1b8d15._0x32a67f,0x4f7,_0x1b8d15._0x50377a)]==='reject'||_0x4b8926[_0x3742b3(0x1c7,0x1b1,0x1f6,0x204)]==='run';}function normalizeExecutionError(_0x526c45){const _0x3f0276={_0x2a8713:0x192,_0x461691:0x146,_0x236f4c:0x192,_0x591f5b:0x14a,_0x1ed8ff:0x12a,_0x45755e:0x157,_0x5982d7:0xb,_0x1e505a:0x4e,_0x44cdbc:0x99,_0x4acb97:0x3f,_0x34d489:0x1c,_0x2aabd9:0x31,_0x5e7c70:0x16,_0x51b592:0x27,_0x2b1a6c:0x13,_0x3529f3:0x50,_0x3c1702:0xe1,_0x230166:0x46},_0x10c772={_0x344178:0xbd,_0x99d1fe:0x3,_0x140e8c:0x19f},_0x2fd35c={_0x543082:0x23};if(_0x526c45 instanceof ToolExecutionError)return{'errorMessage':_0x526c45[_0x15af9c(_0x3f0276._0x2a8713,_0x3f0276._0x461691,0x206,0x1c4)],'structured':{'error':_0x526c45[_0x15af9c(_0x3f0276._0x236f4c,_0x3f0276._0x591f5b,_0x3f0276._0x1ed8ff,_0x3f0276._0x45755e)],..._0x526c45[_0x311e2c(-_0x3f0276._0x5982d7,-_0x3f0276._0x1e505a,_0x3f0276._0x44cdbc,0x27)]}};if(_0x526c45 instanceof Error)return{'errorMessage':_0x526c45[_0x311e2c(_0x3f0276._0x4acb97,0x60,_0x3f0276._0x34d489,0x16)],'structured':{'error':_0x526c45[_0x311e2c(-0x59,-0x4,-_0x3f0276._0x2aabd9,_0x3f0276._0x5e7c70)]}};function _0x15af9c(_0x4a21db,_0x21615f,_0x59e130,_0x9b8ee9){return _0x4c1020(_0x59e130,_0x21615f-0x121,_0x59e130-0x35,_0x4a21db- -_0x2fd35c._0x543082);}if(typeof _0x526c45===_0x311e2c(0xf,0x21,_0x3f0276._0x51b592,-_0x3f0276._0x2b1a6c)&&_0x526c45!==null&&'message'in _0x526c45&&typeof _0x526c45[_0x311e2c(-0x1f,0x6c,-_0x3f0276._0x3529f3,0x16)]===_0x15af9c(0x114,_0x3f0276._0x3c1702,0x13e,0x9f))return{'errorMessage':_0x526c45[_0x311e2c(-0x6,_0x3f0276._0x4acb97,_0x3f0276._0x230166,0x16)],'structured':{'error':_0x526c45['message']}};function _0x311e2c(_0x5123ce,_0x2f8ca9,_0x14858b,_0x1b9dea){return _0x4c1020(_0x5123ce,_0x2f8ca9-_0x10c772._0x344178,_0x14858b-_0x10c772._0x99d1fe,_0x1b9dea- -_0x10c772._0x140e8c);}const _0x335579=String(_0x526c45);return{'errorMessage':_0x335579,'structured':{'error':_0x335579}};}async function emitEvent(_0x4da7a8,_0x4b1988,_0x4d2604){await _0x4da7a8?.(_0x4b1988,_0x4d2604);}async function resolveDispatchDecision(_0x30a072,_0x25b0e2,_0x3dfd53){const _0x4b28f6={_0x798e16:0x3bb,_0x39c81f:0x365,_0x5c1cfc:0x35b,_0x21a3a8:0x3a2,_0x1ad59c:0x34e,_0x2a00ac:0x36a,_0x4f630d:0x32d,_0x446c48:0x4be,_0x3f3417:0x3eb,_0x404ea7:0x366,_0x66c936:0x41a},_0x279d26={_0x15add:0x4ae,_0x34008a:0x4c8,_0x771e93:0x4f7,_0x12deca:0x4b6,_0x2ed185:0x62,_0x57ae90:0x5a,_0x418d0a:0x70,_0x5d40d2:0x86,_0x1fa3b8:0xb2},_0x33dfb4={_0x581e32:0x37,_0x3f5bf6:0x1f},_0x4bf7c2={_0x3e9c31:0x78,_0x41f12e:0x150};if(!_0x30a072)return{'action':_0x1ce615(_0x4b28f6._0x798e16,0x3f7,_0x4b28f6._0x39c81f,_0x4b28f6._0x5c1cfc)};function _0xd876ad(_0x1b4d66,_0x2d960f,_0x275f44,_0x26030e){return _0x4c1020(_0x2d960f,_0x2d960f-_0x4bf7c2._0x3e9c31,_0x275f44-_0x4bf7c2._0x41f12e,_0x26030e-0x202);}const _0x3c872d=Promise[_0xd876ad(_0x4b28f6._0x21a3a8,0x3d0,_0x4b28f6._0x1ad59c,0x393)]()[_0xd876ad(0x363,_0x4b28f6._0x2a00ac,_0x4b28f6._0x4f630d,0x337)](()=>_0x30a072(_0x25b0e2,_0x3dfd53));function _0x1ce615(_0x38fd95,_0x2d0d95,_0x335061,_0x31d768){return _0x4c1020(_0x335061,_0x2d0d95-_0x33dfb4._0x581e32,_0x335061-_0x33dfb4._0x3f5bf6,_0x38fd95-0x25c);}if(!_0x3dfd53[_0x1ce615(0x45a,0x48d,0x4bf,_0x4b28f6._0x446c48)]){const _0x16d0a9=await _0x3c872d;return isDispatchDecision(_0x16d0a9)?_0x16d0a9:{'action':'run'};}const _0x18e680=new Promise((_0x57ac0d,_0x433611)=>{const _0x29c008={_0x2b583c:0xe0},_0x3b9989={_0x4f7a9d:0xb2},_0x2bf095={_0x4aa363:0x15c,_0x1792eb:0xf0,_0x5d820b:0x8d,_0x222923:0x78,_0x22f775:0x45,_0x4ab3f6:0x58c},_0x3d5c44=()=>{const _0x254bc5={_0x44d053:0x3be};function _0x45c357(_0x37fc1c,_0x349ee8,_0x40bc48,_0x3a93cd){return _0x41f4(_0x349ee8-_0x254bc5._0x44d053,_0x40bc48);}_0x3dfd53[_0x3996e5(-0x3e,-0x41,0x2,-0x4c)]?.[_0x3996e5(-_0x2bf095._0x4aa363,-0xff,-0x11c,-_0x2bf095._0x1792eb)](_0x3996e5(-_0x2bf095._0x5d820b,-0x7d,-0x19,-0x51),_0x3d5c44);function _0x3996e5(_0x47195e,_0x6cd542,_0x229132,_0x3924bc){return _0x41f4(_0x6cd542- -0x292,_0x3924bc);}_0x433611(toAbortError(_0x3dfd53[_0x3996e5(-_0x2bf095._0x222923,-0x41,-_0x2bf095._0x22f775,-0x79)]?.[_0x45c357(0x5d6,_0x2bf095._0x4ab3f6,0x601,0x588)]));};function _0x52ea1c(_0x1a5a68,_0xa7d815,_0x272d4b,_0x188abc){return _0xd876ad(_0x1a5a68-0x157,_0x272d4b,_0x272d4b-0x1b8,_0x1a5a68-_0x3b9989._0x4f7a9d);}function _0x1a45cc(_0x21ba12,_0x22bc1b,_0x224136,_0x38301a){return _0x1ce615(_0x22bc1b- -0x3d4,_0x22bc1b-0xc8,_0x38301a,_0x38301a-_0x29c008._0x2b583c);}if(_0x3dfd53['signal']?.[_0x52ea1c(_0x279d26._0x15add,_0x279d26._0x34008a,_0x279d26._0x771e93,_0x279d26._0x12deca)]){_0x433611(toAbortError(_0x3dfd53[_0x1a45cc(_0x279d26._0x2ed185,0x86,0x83,0x2b)][_0x1a45cc(0x69,0x3,_0x279d26._0x57ae90,-_0x279d26._0x418d0a)]));return;}_0x3dfd53[_0x1a45cc(0xf1,_0x279d26._0x5d40d2,_0x279d26._0x1fa3b8,0x35)]?.[_0x1a45cc(0x1b,0x59,0xc4,0x7e)]('abort',_0x3d5c44,{'once':!![]});}),_0x6857a=await Promise[_0xd876ad(_0x4b28f6._0x3f3417,0x3ff,0x3cb,0x3de)]([_0x3c872d,_0x18e680]);return isDispatchDecision(_0x6857a)?_0x6857a:{'action':_0x1ce615(_0x4b28f6._0x798e16,0x3d0,_0x4b28f6._0x404ea7,_0x4b28f6._0x66c936)};}async function executeCapturedToolCall(_0x24c5c6,_0x57b4cc,_0x49f3ca,_0x1aa4c4,_0x1dc7c9){const _0x566a34={_0x3c2fd3:0x154,_0x4be10c:0x1ca,_0x4a80e9:0x1c8,_0x4b5796:0x179,_0x29cfaf:0x10e,_0x50c731:0xbc,_0x23f70f:0x160,_0x3c5ea5:0x138,_0x5cecc4:0x19c,_0x272b36:0x149,_0x2012d8:0x1fb,_0x1761b3:0x136,_0x121fb3:0x124,_0x3e9318:0x178,_0x5ebff0:0x1a3,_0x56d7fc:0x19f,_0x6fc938:0x24d,_0x34da88:0x26c,_0x9660b4:0x1e0,_0x90b2fe:0x1d0,_0x2ce420:0x1e8,_0x129f25:0x1dd,_0x353f21:0x18d,_0x590907:0x172,_0x4e79e6:0x120,_0x1be1c4:0x125,_0x4cca53:0x17e,_0x1f2934:0x13c,_0x4154c4:0x1af,_0x5c9a02:0xd5,_0xd1f954:0x1ce,_0x4e8643:0x1e4,_0x2b6c5f:0x17f,_0x51962f:0x1b9,_0x132fb4:0x17b,_0xe010a4:0x23d,_0x4eed86:0x23a,_0x232eb4:0x1c4,_0x131736:0x12d,_0x4dcf81:0x14e,_0x368abc:0x15a,_0x58cc1d:0x12c,_0x1afba4:0x21e,_0x2a20a6:0x1ca,_0x5e5ff1:0x1d5,_0x88e66d:0x181,_0x236dee:0x1ca,_0x34e1d6:0x168,_0x3c5e7f:0x22b},_0x94acd2={_0x8119bd:0x4e9,_0x5f57ac:0x583,_0xccfe0a:0x51b,_0x4afa37:0x2b2},_0x1f972f={_0x3266f2:0x526,_0x5e2853:0x1ce},_0x55254f={_0x3e60c1:0x149,_0x43f73b:0x143},_0x4bdafd={_0x77ec05:0x4b},_0x49a768={_0x4ccff3:0xb8,_0x1f44c9:0x30c},_0x123f8d={..._0x49f3ca,'toolCallId':_0x57b4cc['id'],'permissionClass':resolveToolPermissionClass(_0x24c5c6),'executionAuthorization':void 0x0};throwIfAborted(_0x123f8d[_0x2335f5(-0x17e,-0x110,-0x162,-_0x566a34._0x3c2fd3)]);let _0x13c914;try{_0x13c914=await resolveDispatchDecision(_0x1aa4c4,_0x57b4cc,_0x123f8d);}catch(_0x2b025a){if(isAbortError(_0x2b025a)){const _0x5be984=createAbortedToolResult(_0x57b4cc,_0x2b025a);return await emitEvent(_0x1dc7c9,{'type':_0x2335f5(-_0x566a34._0x4be10c,-_0x566a34._0x4a80e9,-_0x566a34._0x4b5796,-0x219),'toolCall':_0x57b4cc,'result':_0x5be984},_0x123f8d),_0x5be984;}const {errorMessage:_0x1baca4,structured:_0x6e05ae}=normalizeExecutionError(_0x2b025a),_0x56fa0d=createErrorToolResult(_0x57b4cc,_0x1baca4,_0x6e05ae);return await emitEvent(_0x1dc7c9,{'type':_0x45b219(-0x15a,-0x1b9,-0x138,-0x12e),'toolCall':_0x57b4cc,'result':_0x56fa0d},_0x123f8d),_0x56fa0d;}throwIfAborted(_0x123f8d[_0x45b219(-_0x566a34._0x29cfaf,-_0x566a34._0x50c731,-0x12b,-0x172)]);if(_0x13c914['action']===_0x45b219(-0x165,-0x1cc,-_0x566a34._0x23f70f,-_0x566a34._0x3c5ea5)){const _0x469295=createRejectedToolResult(_0x57b4cc,_0x13c914[_0x45b219(-0x191,-0x1cf,-_0x566a34._0x5cecc4,-0x19d)]);return await emitEvent(_0x1dc7c9,{'type':_0x45b219(-0x18a,-_0x566a34._0x272b36,-_0x566a34._0x2012d8,-0x124),'toolCall':_0x57b4cc,'result':_0x469295},_0x123f8d),_0x469295;}if(!_0x24c5c6){const _0x1ae126=createUnknownToolResult(_0x57b4cc);return await emitEvent(_0x1dc7c9,{'type':'tool_completed','toolCall':_0x57b4cc,'result':_0x1ae126},_0x123f8d),_0x1ae126;}const _0x22b15d={..._0x123f8d,'executionAuthorization':_0x13c914[_0x45b219(-0x11a,-0xb4,-_0x566a34._0x1761b3,-0x118)]};function _0x45b219(_0x87709e,_0x31ea0d,_0x1007ab,_0x2a8e6f){return _0x4c1020(_0x1007ab,_0x31ea0d-_0x49a768._0x4ccff3,_0x1007ab-0xf4,_0x87709e- -_0x49a768._0x1f44c9);}throwIfAborted(_0x22b15d[_0x2335f5(-0x17e,-0x187,-_0x566a34._0x121fb3,-0x123)]),await emitEvent(_0x1dc7c9,{'type':_0x45b219(-_0x566a34._0x3e9318,-_0x566a34._0x5ebff0,-_0x566a34._0x56d7fc,-0x19f),'toolCall':_0x57b4cc},_0x22b15d);function _0x2335f5(_0x10e85e,_0xde1e73,_0x277d15,_0x4dccd4){return _0x249222(_0x10e85e-_0x4bdafd._0x77ec05,_0x10e85e- -0x45e,_0xde1e73,_0x4dccd4-0x2);}try{throwIfAborted(_0x22b15d[_0x45b219(-0x10e,-0xd7,-0x12f,-0xba)]);const _0x3b87d4=validateToolInput(_0x57b4cc[_0x2335f5(-_0x566a34._0x6fc938,-_0x566a34._0x34da88,-_0x566a34._0x9660b4,-0x242)],_0x24c5c6[_0x45b219(-_0x566a34._0x90b2fe,-_0x566a34._0x2ce420,-_0x566a34._0x129f25,-0x20a)]),_0x3f98fd=await _0x24c5c6['execute'](_0x3b87d4,_0x22b15d),_0x44207b=[],_0x41cac1=addAbortListener(_0x22b15d['signal'],()=>{function _0x4a0e66(_0x3e9d97,_0x402d58,_0x4e41b2,_0x4b5977){return _0x2335f5(_0x4b5977-0x722,_0x3e9d97,_0x4e41b2-_0x55254f._0x3e60c1,_0x4b5977-_0x55254f._0x43f73b);}function _0x488021(_0x39cfb4,_0x40f816,_0x2714eb,_0x28b271){return _0x2335f5(_0x40f816-_0x1f972f._0x3266f2,_0x39cfb4,_0x2714eb-_0x1f972f._0x5e2853,_0x28b271-0x2b);}void _0x3f98fd[_0x4a0e66(0x501,_0x94acd2._0x8119bd,_0x94acd2._0x5f57ac,_0x94acd2._0xccfe0a)](void 0x0)[_0x488021(0x26f,0x2e3,_0x94acd2._0x4afa37,0x33c)](()=>{});});try{throwIfAborted(_0x22b15d['signal']);let _0x504399=await _0x3f98fd[_0x2335f5(-0x177,-0x1b3,-_0x566a34._0x353f21,-0x184)]();while(!_0x504399[_0x45b219(-_0x566a34._0x590907,-0x127,-_0x566a34._0x4e79e6,-_0x566a34._0x1be1c4)]){throwIfAborted(_0x22b15d[_0x2335f5(-_0x566a34._0x4cca53,-0x1c0,-0x1a9,-0x13b)]);const _0x33eaab=normalizeToolOutputValue(_0x504399['value']);_0x44207b[_0x45b219(-_0x566a34._0x1f2934,-0x16e,-_0x566a34._0x4154c4,-_0x566a34._0x5c9a02)](_0x33eaab),await emitEvent(_0x1dc7c9,{'type':_0x45b219(-0x1b8,-_0x566a34._0xd1f954,-_0x566a34._0x4e8643,-_0x566a34._0x2b6c5f),'toolCall':_0x57b4cc,'chunk':_0x33eaab},_0x22b15d),throwIfAborted(_0x22b15d[_0x2335f5(-0x17e,-0x13d,-_0x566a34._0x51962f,-0x1f2)]),_0x504399=await _0x3f98fd['next']();}throwIfAborted(_0x22b15d['signal']);const _0x226944=_0x504399[_0x45b219(-0x1ca,-_0x566a34._0x132fb4,-_0x566a34._0xe010a4,-0x212)]===void 0x0?deriveFinalToolOutput(_0x44207b):normalizeToolOutputValue(_0x504399[_0x2335f5(-_0x566a34._0x4eed86,-0x251,-0x271,-_0x566a34._0x232eb4)]),_0x488903=createSuccessToolResult(_0x57b4cc,_0x226944,_0x44207b);return await emitEvent(_0x1dc7c9,{'type':_0x45b219(-0x15a,-_0x566a34._0x131736,-0x13c,-_0x566a34._0x4dcf81),'toolCall':_0x57b4cc,'result':_0x488903},_0x22b15d),_0x488903;}catch(_0x140d41){if(isAbortError(_0x140d41)){const _0x19958f=createAbortedToolResult(_0x57b4cc,_0x140d41,_0x44207b);return await emitEvent(_0x1dc7c9,{'type':_0x45b219(-_0x566a34._0x368abc,-0x1cf,-0x1bf,-_0x566a34._0x58cc1d),'toolCall':_0x57b4cc,'result':_0x19958f},_0x22b15d),_0x19958f;}const {errorMessage:_0x15c80c,structured:_0x387443}=normalizeExecutionError(_0x140d41),_0x4ab3c6=createErrorToolResult(_0x57b4cc,_0x15c80c,_0x387443,_0x44207b);return await emitEvent(_0x1dc7c9,{'type':_0x2335f5(-0x1ca,-0x1bb,-_0x566a34._0x1afba4,-0x1c2),'toolCall':_0x57b4cc,'result':_0x4ab3c6},_0x22b15d),_0x4ab3c6;}finally{_0x41cac1();}}catch(_0x286146){if(isAbortError(_0x286146)){const _0x26089e=createAbortedToolResult(_0x57b4cc,_0x286146);return await emitEvent(_0x1dc7c9,{'type':_0x2335f5(-_0x566a34._0x2a20a6,-0x17c,-_0x566a34._0x5e5ff1,-_0x566a34._0x88e66d),'toolCall':_0x57b4cc,'result':_0x26089e},_0x22b15d),_0x26089e;}const {errorMessage:_0x4fc11d,structured:_0x51c8ca}=normalizeExecutionError(_0x286146),_0xba06fd=createErrorToolResult(_0x57b4cc,_0x4fc11d,_0x51c8ca);return await emitEvent(_0x1dc7c9,{'type':_0x2335f5(-_0x566a34._0x236dee,-_0x566a34._0x34e1d6,-_0x566a34._0x3c5e7f,-0x1f6),'toolCall':_0x57b4cc,'result':_0xba06fd},_0x22b15d),_0xba06fd;}}async function executeToolCall(_0x4f8b60,_0x2385e5,_0x55f75d,_0x2ef274,_0x4a7eb1){const _0x41dd0b={_0xaedabc:0x1bc,_0x5804bc:0x16f,_0x945a7f:0x14b,_0x481647:0x51,_0x443bf1:0x89,_0x5e532e:0x1dc,_0x164894:0xec},_0x1ca4cb={_0xf03913:0x65,_0x469dbe:0x41e,_0x59cca3:0x4};function _0x205c34(_0x5cb598,_0x5e8f40,_0x3ac66b,_0x390862){return _0x249222(_0x5cb598-_0x1ca4cb._0xf03913,_0x5e8f40- -_0x1ca4cb._0x469dbe,_0x3ac66b,_0x390862-_0x1ca4cb._0x59cca3);}function _0x12e53b(_0xd8c784,_0x53e223,_0x35c544,_0x509df4){return _0x4c1020(_0x509df4,_0x53e223-0x125,_0x35c544-0x9c,_0x53e223- -0xf2);}const _0xd163be=_0x4f8b60[_0x205c34(-0x223,-_0x41dd0b._0xaedabc,-_0x41dd0b._0x5804bc,-_0x41dd0b._0x945a7f)](_0x2385e5[_0x12e53b(0x47,_0x41dd0b._0x481647,_0x41dd0b._0x443bf1,0xa1)]),_0x8e2591=_0xd163be?.[_0x205c34(-_0x41dd0b._0x5e532e,-0x1ee,-0x1ea,-0x215)]?.[_0x12e53b(0xe0,_0x41dd0b._0x164894,0x128,0x9d)]();try{return await executeCapturedToolCall(_0xd163be,_0x2385e5,_0x55f75d,_0x2ef274,_0x4a7eb1);}finally{_0x8e2591?.();}}function createInternalToolRuntime(_0x353462=[],_0x559645={}){const _0xebb144={_0x1404b6:0x3e,_0x4aeb8f:0x2e8,_0xcdb8e8:0x2a4,_0x1089a7:0x2ac},_0x568816={_0x49c5a1:0x63,_0x2d064b:0x6c,_0x3fc8fe:0x120,_0x74b76e:0x128},_0x8c7290={_0x27a7ae:0x56},_0x1d3ba3={_0x263a29:0x42c,_0xb769ce:0x413},_0x2844b4={_0x5419ca:0x1a6};let _0x4cc77e=new ToolRegistry(_0x353462);return{'listToolSchemas'(){function _0x30f1f7(_0x2e50ba,_0x2dd0eb,_0x4f89dd,_0x1b6414){return _0x41f4(_0x2dd0eb-_0x2844b4._0x5419ca,_0x2e50ba);}return _0x4cc77e[_0x30f1f7(0x357,0x3ba,_0x1d3ba3._0x263a29,_0x1d3ba3._0xb769ce)]();},'setTools'(_0x416be6){_0x4cc77e=new ToolRegistry(_0x416be6);},async 'executeCalls'(_0x3c5213,_0xec3c16){function _0xd3cbf(_0x5b6792,_0x5cc788,_0x2509bc,_0x2fa604){return _0x41f4(_0x5cc788-_0x8c7290._0x27a7ae,_0x5b6792);}function _0x4e479a(_0x29f934,_0x45a99c,_0x5da838,_0x2c784e){return _0x41f4(_0x29f934- -0x1ef,_0x2c784e);}return await Promise[_0x4e479a(0x2e,-0x1f,-_0xebb144._0x1404b6,0x4a)](_0x3c5213[_0xd3cbf(_0xebb144._0x4aeb8f,_0xebb144._0xcdb8e8,_0xebb144._0x1089a7,0x284)](async _0x57dc80=>{const _0x4cc844={_0xe99c9b:0x1ba,_0x42cd09:0x9a,_0xbad639:0x105},_0x527aea={_0x55a72e:0xfc};function _0x181488(_0x5a05ed,_0x3a5a71,_0x2249e6,_0x3cf654){return _0xd3cbf(_0x5a05ed,_0x3a5a71- -0x3ac,_0x2249e6-0x144,_0x3cf654-_0x527aea._0x55a72e);}function _0x153afa(_0x33edd1,_0x126c33,_0x2668ed,_0x2dd122){return _0xd3cbf(_0x2668ed,_0x33edd1- -_0x4cc844._0xe99c9b,_0x2668ed-_0x4cc844._0x42cd09,_0x2dd122-_0x4cc844._0xbad639);}return await executeToolCall(_0x4cc77e,_0x57dc80,_0xec3c16,_0x559645[_0x153afa(_0x568816._0x49c5a1,0xbc,_0x568816._0x2d064b,0x31)],_0x559645[_0x181488(-_0x568816._0x3fc8fe,-_0x568816._0x74b76e,-0x10a,-0xcb)]);}));},async 'execute'(_0x1350b7,_0x5091ec){const [_0xd134f]=await this['executeCalls']([_0x1350b7],_0x5091ec);return _0xd134f;}};}function getOrderedObserverExtensions(_0x161f8d,_0xecea3e){const _0x2979ca={_0x3f59c3:0x624,_0x2ef662:0x5e5},_0x8a260={_0x12453f:0x566,_0x5ef658:0x537,_0x4f1aec:0x573,_0x2cae19:0x5be,_0x283044:0x5c0,_0x241546:0x55,_0x2bc921:0x544,_0x4c1038:0x3c,_0x3f14b0:0x15,_0x5652c8:0x87},_0x27a68b={_0x18b0e2:0x53d,_0x471213:0xc3},_0x254730={_0x31e838:0x5a6,_0x4046e2:0x554,_0x147fc6:0x530,_0x165f32:0x521,_0x3d6f9f:0x4d3},_0x1f53a0={_0x13f2c0:0x56,_0x5cca21:0x4c,_0x4b5321:0x3f0};function _0x52ccd3(_0x4b9f7c,_0x30b78f,_0x3c469b,_0x4dba34){return _0x4c1020(_0x4b9f7c,_0x30b78f-_0x1f53a0._0x13f2c0,_0x3c469b-_0x1f53a0._0x5cca21,_0x3c469b-_0x1f53a0._0x4b5321);}return _0x161f8d[_0x52ccd3(0x613,_0x2979ca._0x3f59c3,0x5de,_0x2979ca._0x2ef662)](_0x3c409b=>{const _0x2cdad2={_0x51fba1:0x46},_0x3ac7f7={_0x4729c5:0x5c,_0x2370e4:0x169};function _0xec8db1(_0x5d9525,_0x37b0c4,_0x4ffa6d,_0xee629e){return _0x52ccd3(_0xee629e,_0x37b0c4-_0x3ac7f7._0x4729c5,_0x37b0c4- -0x3a,_0xee629e-_0x3ac7f7._0x2370e4);}function _0x1b5108(_0x4d3a6b,_0x13da8c,_0x229201,_0x38e441){return _0x52ccd3(_0x13da8c,_0x13da8c-0x3b,_0x4d3a6b-_0x2cdad2._0x51fba1,_0x38e441-0xe6);}return _0x3c409b[_0xec8db1(0x537,0x588,0x579,_0x254730._0x31e838)]!==![]&&_0x3c409b['stage']===_0xecea3e&&_0x3c409b[_0xec8db1(0x4ef,_0x254730._0x4046e2,_0x254730._0x147fc6,0x521)]===_0xec8db1(_0x254730._0x165f32,0x530,0x4d4,_0x254730._0x3d6f9f);})['sort']((_0xfcde21,_0x7c5485)=>{const _0x356abc={_0x275f94:0x11f};function _0x7b27e6(_0x119017,_0x49aa50,_0x197373,_0x7c5a6f){return _0x52ccd3(_0x49aa50,_0x49aa50-0x18c,_0x119017- -_0x27a68b._0x18b0e2,_0x7c5a6f-_0x27a68b._0x471213);}if(_0xfcde21[_0x2a180e(0x5b6,_0x8a260._0x12453f,_0x8a260._0x5ef658,0x54d)]===!![]&&_0x7c5485['terminal']!==!![])return 0x1;function _0x2a180e(_0x5254bf,_0x49ad28,_0x1a8470,_0x1dae2c){return _0x52ccd3(_0x1a8470,_0x49ad28-0x18e,_0x1dae2c- -0x35,_0x1dae2c-_0x356abc._0x275f94);}if(_0xfcde21[_0x2a180e(_0x8a260._0x4f1aec,_0x8a260._0x2cae19,_0x8a260._0x283044,0x54d)]!==!![]&&_0x7c5485[_0x7b27e6(0x45,0xa7,0x6,_0x8a260._0x241546)]===!![])return-0x1;return _0xfcde21[_0x2a180e(_0x8a260._0x12453f,0x57d,0x4eb,_0x8a260._0x2bc921)]-_0x7c5485[_0x7b27e6(_0x8a260._0x4c1038,-_0x8a260._0x3f14b0,0x66,_0x8a260._0x5652c8)];});}function getOrderedTransformerExtensions(_0x5e8f75,_0x14667b){const _0x3be9a9={_0x45a4df:0x403,_0x41fee4:0x43b,_0x327eb8:0x282,_0x1fde92:0x297},_0x4bb28a={_0x131088:0xe,_0x14311f:0x7b,_0x1ca0d2:0x10,_0x5d7b69:0x61},_0x303ca0={_0x185f63:0x95},_0x3fa3a5={_0x2ba80a:0x184},_0x179505={_0x18d7a3:0x10e};function _0x4941ce(_0x45d607,_0x4811a6,_0x3390be,_0x3a0ef3){return _0x4c1020(_0x4811a6,_0x4811a6-_0x179505._0x18d7a3,_0x3390be-0x1d6,_0x45d607-0x9c);}function _0x586672(_0x5b7464,_0x30c029,_0x1324be,_0xf65d68){return _0x249222(_0x5b7464-0x7d,_0x1324be-_0x3fa3a5._0x2ba80a,_0x30c029,_0xf65d68-0x26);}return _0x5e8f75[_0x586672(0x3de,_0x3be9a9._0x45a4df,0x454,_0x3be9a9._0x41fee4)](_0x101b1f=>{const _0x124d4b={_0x2e93b7:0xdc};function _0x420115(_0x396062,_0x45bce2,_0x157c77,_0x1c62b6){return _0x586672(_0x396062-_0x124d4b._0x2e93b7,_0x1c62b6,_0x45bce2- -0x3fc,_0x1c62b6-0x107);}function _0x4edde3(_0xd307ac,_0x132174,_0x21acd8,_0x393407){return _0x586672(_0xd307ac-_0x303ca0._0x185f63,_0x132174,_0x393407- -0x449,_0x393407-0x120);}return _0x101b1f['enabled']!==![]&&_0x101b1f[_0x4edde3(-0x54,0x7,-0x3f,-_0x4bb28a._0x131088)]===_0x14667b&&_0x101b1f[_0x420115(0x55,0x8,_0x4bb28a._0x14311f,-0x3f)]===_0x420115(0x6,_0x4bb28a._0x1ca0d2,_0x4bb28a._0x5d7b69,0x16);})[_0x4941ce(_0x3be9a9._0x327eb8,_0x3be9a9._0x1fde92,_0x3be9a9._0x1fde92,0x233)]((_0x20d155,_0x172e8a)=>_0x20d155[_0x4941ce(0x225,0x262,0x22f,0x22f)]-_0x172e8a[_0x586672(0x41f,0x413,0x3ef,0x40e)]);}function createExtensionRegistry(){const _0x42de25={_0x3437ea:0x458,_0x4344c8:0x45c,_0x330e5c:0x4c5},_0x5db61f={_0x50f178:0x2aa},_0x4b4284={_0x5e54e1:0x59,_0x50011c:0x32},_0x1c8b48={_0x4c1e40:0x9d,_0x2cbd5f:0x7e,_0x4e1197:0x1cc,_0x10f460:0x1bf,_0x468bc9:0xe,_0x500fb6:0x68,_0x1baf27:0x4,_0x27bbf7:0x15,_0x1130e7:0xb7,_0x4933a4:0x81,_0x315fdd:0x62,_0x572344:0x8d,_0x533bdd:0x22d,_0x558a62:0x24c,_0x3c5463:0x17e,_0xb1be42:0x196,_0x4c3532:0x183,_0x2fbb95:0x1b1,_0x314bf7:0x1bd,_0x4b4a70:0x1f0,_0x52eb82:0x162,_0x48e810:0x102},_0x4588c4={_0x3e4e9c:0x5},_0x204215=[];return{'register'(_0x526946){const _0x293a81={_0x1e31ce:0x137};if(_0x526946[_0x4b7feb(0x67,0xba,_0x1c8b48._0x4c1e40,_0x1c8b48._0x2cbd5f)]===_0x7b8912(_0x1c8b48._0x4e1197,0x1d2,0x18a,_0x1c8b48._0x10f460)&&_0x526946['enabled']!==![]&&_0x526946['terminal']===!![]){const _0x2a1db6=_0x204215[_0x4b7feb(-_0x1c8b48._0x468bc9,_0x1c8b48._0x500fb6,_0x1c8b48._0x1baf27,_0x1c8b48._0x27bbf7)](_0xa6d4d2=>_0xa6d4d2[_0x7b8912(0x1f7,0x1f6,0x216,0x256)]===_0x7b8912(0x243,0x1d2,0x197,0x18b)&&_0xa6d4d2['enabled']!==![]&&_0xa6d4d2[_0x4b7feb(0x152,0xf1,0x116,0xf4)]===_0x526946[_0x7b8912(0x201,0x22d,0x1d5,0x217)]&&_0xa6d4d2[_0x4b7feb(0xbe,0xae,0xce,0xd9)]===!![]);if(_0x2a1db6)throw new Error(_0x4b7feb(0x11e,_0x1c8b48._0x1130e7,0x97,0x10e)+_0x526946['id']+_0x4b7feb(0x7c,_0x1c8b48._0x4933a4,_0x1c8b48._0x315fdd,_0x1c8b48._0x572344)+_0x526946[_0x7b8912(0x1e8,_0x1c8b48._0x533bdd,_0x1c8b48._0x558a62,0x287)]+_0x7b8912(_0x1c8b48._0x3c5463,_0x1c8b48._0xb1be42,_0x1c8b48._0x4c3532,_0x1c8b48._0x2fbb95)+_0x2a1db6['id']+_0x7b8912(_0x1c8b48._0x314bf7,0x1d0,_0x1c8b48._0x4b4a70,_0x1c8b48._0x52eb82));}function _0x4b7feb(_0xb07f98,_0x35306c,_0x2d3266,_0x29568d){return _0x41f4(_0x35306c- -_0x293a81._0x1e31ce,_0x29568d);}function _0x7b8912(_0x421615,_0xf89b0b,_0x401526,_0x1b5478){return _0x41f4(_0xf89b0b-_0x4588c4._0x3e4e9c,_0x401526);}_0x204215[_0x4b7feb(0x79,0xec,_0x1c8b48._0x48e810,0xb9)]({..._0x526946});},async 'runTransformers'(_0x373f34,_0x251ae8,_0x2814ec){const _0xf852e5={_0x1f54a7:0x15f};function _0x564497(_0x508758,_0x225e5e,_0x51ca55,_0x18723c){return _0x41f4(_0x51ca55- -_0xf852e5._0x1f54a7,_0x18723c);}let _0x916801=_0x251ae8;for(const _0x5c13ff of getOrderedTransformerExtensions(_0x204215,_0x373f34)){_0x916801=await _0x5c13ff[_0x564497(0x5f,_0x4b4284._0x5e54e1,0x53,_0x4b4284._0x50011c)](_0x916801,_0x2814ec);}return _0x916801;},async 'runObservers'(_0x24856c,_0x28720b,_0x556395){function _0x2d3587(_0x31837d,_0x1752f4,_0x3bec8a,_0x17fac9){return _0x41f4(_0x3bec8a-_0x5db61f._0x50f178,_0x31837d);}for(const _0x34751d of getOrderedObserverExtensions(_0x204215,_0x24856c)){await _0x34751d[_0x2d3587(0x442,_0x42de25._0x3437ea,_0x42de25._0x4344c8,_0x42de25._0x330e5c)](_0x28720b,_0x556395);}}};}function createEmptySnapshot(){return{'totalTokens':0x0,'totalInputTokens':0x0,'totalOutputTokens':0x0,'totalReasoningTokens':0x0,'requestCount':0x0,'modelCallCount':0x0,'toolCallCount':0x0,'totalModelTimeMs':0x0,'currentTokens':0x0,'currentInputTokens':0x0,'currentOutputTokens':0x0,'currentReasoningTokens':0x0,'currentModelTimeMs':0x0,'totalCostUsdTicks':0x0,'totalReportedCostUsdTicks':0x0,'totalEstimatedCostUsdTicks':0x0,'reportedCostCallCount':0x0,'estimatedCostCallCount':0x0,'unpricedModelCallCount':0x0,'historicalMetricsComplete':!![],'missingHistoricalModelCallCount':0x0};}function _0x249222(_0x53dc23,_0x3a8412,_0x53a0aa,_0x222d85){return _0x41f4(_0x3a8412-0x8f,_0x53a0aa);}function applyModelCall(_0x104ae4,_0x7a6c60){const _0x428778={_0x5f4e7c:0x196,_0x29837c:0xff,_0x20af32:0x100,_0x4186d4:0x15e,_0x445d2c:0x150,_0x8b0327:0x1ab,_0x21c8b1:0x137,_0x2169dd:0x176,_0x2b6412:0x2a,_0xe15786:0x1,_0x570888:0x5c,_0x109957:0x8c,_0xae500d:0xe5,_0xd7ce63:0x11c,_0x4a7ce1:0x6b,_0x2163ec:0xc8,_0x36af52:0x8a,_0x5a388b:0x221,_0x8f24f0:0x1bc,_0x437d7d:0x4e,_0xbb3cc1:0x30,_0x5db66f:0x116,_0x2074c9:0x115,_0x15aec2:0x17f,_0x274c0c:0x130,_0x3857ae:0x13,_0x4b4b1b:0x38,_0x42c499:0x73,_0x53055b:0x2d,_0x3291d3:0x196,_0x28afdc:0x17d,_0x2c8c8d:0x10e,_0x56d8c1:0x2,_0x4a95f6:0x42,_0x405ae2:0x175,_0x2cc0e6:0x12a,_0xae4e27:0x1b6,_0x3cbf63:0x16a,_0x24f667:0x1ae,_0x58af6a:0x168,_0x5e22ff:0x1d1,_0x5c2b9a:0x245,_0x36fb26:0x179},_0x4cf2a4={_0x23964c:0x1b5},_0x55a963={_0x539102:0x50},_0x230f43=_0x7a6c60[_0x565c9f(-_0x428778._0x5f4e7c,-_0x428778._0x29837c,-_0x428778._0x20af32,-0x133)],_0x4f3c23=_0x230f43['inputTokens'],_0x342dd7=_0x230f43['outputTokens'],_0xc6df69=_0x230f43[_0x565c9f(-0x145,-_0x428778._0x4186d4,-0x1d3,-0x169)]??0x0,_0x14e6de=_0x4f3c23+_0x342dd7,_0x755c9b=_0x230f43[_0x565c9f(-_0x428778._0x445d2c,-0x16e,-_0x428778._0x8b0327,-0x171)]?.[_0x565c9f(-_0x428778._0x21c8b1,-0x1ac,-_0x428778._0x2169dd,-0x1ab)],_0x52eaa7=_0x230f43[_0x479985(-_0x428778._0x2b6412,-_0x428778._0xe15786,-_0x428778._0x570888,-_0x428778._0x109957)]?.['amountUsdTicks'];function _0x565c9f(_0x98c2f9,_0x59a99b,_0x2f5d19,_0x9fd05d){return _0x249222(_0x98c2f9-_0x55a963._0x539102,_0x9fd05d- -0x3d8,_0x59a99b,_0x9fd05d-0xe);}const _0x5d17e5=_0x755c9b??_0x52eaa7,{currentReportedCostUsdTicks:_0x301f61,currentEstimatedCostUsdTicks:_0x5aa88f,..._0x590157}=_0x104ae4;function _0x479985(_0xe9a1ab,_0x5b85fd,_0x2993ca,_0x25fbc5){return _0x4c1020(_0x5b85fd,_0x5b85fd-0x38,_0x2993ca-0x2a,_0xe9a1ab- -_0x4cf2a4._0x23964c);}return{..._0x590157,'totalTokens':_0x590157['totalTokens']+_0x14e6de,'totalInputTokens':_0x590157[_0x565c9f(-0x181,-0xc0,-_0x428778._0xae500d,-_0x428778._0xd7ce63)]+_0x4f3c23,'totalOutputTokens':_0x590157[_0x479985(-_0x428778._0x4a7ce1,-0x4f,-0x27,-0x61)]+_0x342dd7,'totalReasoningTokens':_0x590157['totalReasoningTokens']+_0xc6df69,'modelCallCount':_0x590157[_0x565c9f(-_0x428778._0x2163ec,-0x9d,-_0x428778._0x36af52,-0xf9)]+0x1,'totalModelTimeMs':_0x590157[_0x565c9f(-0x18f,-0x14e,-_0x428778._0x5a388b,-_0x428778._0x8f24f0)]+_0x7a6c60[_0x479985(-_0x428778._0x437d7d,-_0x428778._0xbb3cc1,-0x69,-0x69)],'currentTokens':_0x14e6de,'currentInputTokens':_0x4f3c23,'currentOutputTokens':_0x342dd7,'currentReasoningTokens':_0xc6df69,'currentModelTimeMs':_0x7a6c60['modelTimeMs'],..._0x590157[_0x565c9f(-0xdc,-_0x428778._0x5db66f,-0x177,-_0x428778._0x2074c9)]&&_0x14e6de>0x0?{'contextWindowUsage':_0x14e6de/_0x590157[_0x565c9f(-0x12d,-_0x428778._0x15aec2,-_0x428778._0x274c0c,-0x115)]}:{},'totalCostUsdTicks':_0x5d17e5===void 0x0?_0x590157[_0x479985(-_0x428778._0x3857ae,_0x428778._0x4b4b1b,-0xe,-_0x428778._0x42c499)]:_0x590157[_0x479985(-0x13,0x28,0x37,_0x428778._0x53055b)]+_0x5d17e5,'totalReportedCostUsdTicks':_0x755c9b===void 0x0?_0x590157[_0x565c9f(-_0x428778._0x3291d3,-0x138,-0x17c,-_0x428778._0x28afdc)]:_0x590157['totalReportedCostUsdTicks']+_0x755c9b,'totalEstimatedCostUsdTicks':_0x52eaa7===void 0x0?_0x590157[_0x565c9f(-_0x428778._0x2074c9,-0x15b,-_0x428778._0x2c8c8d,-0x13f)]:_0x590157[_0x479985(_0x428778._0x56d8c1,0x5d,-0x15,_0x428778._0x4a95f6)]+_0x52eaa7,'reportedCostCallCount':_0x755c9b===void 0x0?_0x590157[_0x565c9f(-0x1d0,-0x1b0,-0x116,-_0x428778._0x405ae2)]:_0x590157[_0x565c9f(-_0x428778._0x2cc0e6,-_0x428778._0xae4e27,-0x1e9,-0x175)]+0x1,'estimatedCostCallCount':_0x52eaa7===void 0x0?_0x590157['estimatedCostCallCount']:_0x590157[_0x565c9f(-_0x428778._0x3cbf63,-0x160,-0x1df,-0x193)]+0x1,'unpricedModelCallCount':_0x755c9b===void 0x0&&_0x52eaa7===void 0x0?_0x590157[_0x565c9f(-0x170,-_0x428778._0x24f667,-_0x428778._0x58af6a,-_0x428778._0x5e22ff)]+0x1:_0x590157[_0x565c9f(-_0x428778._0x5c2b9a,-0x161,-_0x428778._0x36fb26,-_0x428778._0x5e22ff)],..._0x755c9b!==void 0x0?{'currentReportedCostUsdTicks':_0x755c9b}:{},..._0x52eaa7!==void 0x0?{'currentEstimatedCostUsdTicks':_0x52eaa7}:{}};}function createAgentMetrics(_0x2f2afa={}){const _0x46de24={_0x27665a:0x25d,_0x387f7c:0x20d},_0x228591={_0x22751a:0x2a,_0xb5305c:0xa2,_0x3f4ccb:0x42,_0x24614a:0x4fc,_0x3bd4da:0x508,_0x461064:0x566,_0x3deb57:0x5d7,_0x344420:0x4d0,_0x2a10cf:0x5af,_0x3cb91e:0x591,_0x4a8c4f:0x54b,_0x56ed80:0x582,_0x7ed05d:0x526,_0x56ed17:0x521,_0x30f678:0x4ef},_0x54a48d={_0x47153a:0x329,_0x508236:0x341,_0x2bd38f:0x378,_0x4e968a:0x375,_0x4d1e48:0x331,_0x47ed7e:0x1fa,_0x4c417d:0x2bf,_0x170c58:0x2f7,_0xef0f42:0x2b3,_0x580fe4:0x28b,_0x3052c1:0x1c0,_0x53b022:0x1be,_0x421115:0x289,_0x25b385:0x1dd,_0x3d1cbe:0x1d5,_0xf4952a:0x217,_0x3b5f91:0x27a,_0x47b9aa:0x236,_0x33930f:0x2b2,_0x50c722:0x355,_0x44db5c:0x16a,_0x443b83:0x1c8,_0x5a67ad:0x1b7,_0x141eed:0x184,_0x304b98:0x26d,_0x4ecf95:0x224,_0x454d02:0x2bd};let _0x311594=createEmptySnapshot();const _0x5aa5c6=new Set();let _0x4d37f0;const _0x5477e9=()=>{const _0x4f0b33={..._0x311594};for(const _0x45590d of _0x5aa5c6)_0x45590d(_0x4f0b33);};return{'getSnapshot'(){return{..._0x311594};},'recordEvent'(_0x577884){const _0xa907ec={_0x4f0a89:0x3d1};if(_0x577884[_0x1b9884(_0x54a48d._0x47153a,0x351,_0x54a48d._0x508236,0x311)]==='model_request'){_0x4d37f0=Date[_0x1b9884(_0x54a48d._0x2bd38f,_0x54a48d._0x4e968a,0x391,_0x54a48d._0x4d1e48)]();const _0x3ad863=_0x2f2afa['getContextWindowLimit']?.(_0x577884[_0x11d476(-_0x54a48d._0x47ed7e,-0x25a,-0x269,-_0x54a48d._0x4c417d)]);_0x3ad863!==void 0x0&&(_0x311594={..._0x311594,'contextWindowLimit':_0x3ad863},_0x5477e9());return;}if(_0x577884[_0x1b9884(_0x54a48d._0x170c58,0x371,_0x54a48d._0x508236,0x385)]===_0x11d476(-_0x54a48d._0xef0f42,-0x25e,-_0x54a48d._0x580fe4,-0x27d)){const _0x2cf476=_0x4d37f0===void 0x0?0x0:Date[_0x11d476(-_0x54a48d._0x3052c1,-0x1d4,-0x200,-_0x54a48d._0x53b022)]()-_0x4d37f0;_0x4d37f0=void 0x0,_0x311594=applyModelCall(_0x311594,{'usage':_0x577884[_0x11d476(-_0x54a48d._0x421115,-0x238,-_0x54a48d._0x25b385,-_0x54a48d._0x3d1cbe)]['usage'],'modelTimeMs':_0x577884[_0x11d476(-0x1ca,-_0x54a48d._0xf4952a,-0x1b3,-_0x54a48d._0x3b5f91)]??_0x2cf476}),_0x5477e9();return;}function _0x11d476(_0x46de5a,_0x48da5e,_0x381279,_0x4a00ce){return _0x41f4(_0x48da5e- -_0xa907ec._0x4f0a89,_0x4a00ce);}if(_0x577884[_0x11d476(-0x266,-0x224,-_0x54a48d._0x47b9aa,-0x1ba)]===_0x1b9884(_0x54a48d._0x33930f,0x30b,0x30a,_0x54a48d._0x50c722)){_0x311594={..._0x311594,'toolCallCount':_0x311594[_0x11d476(-_0x54a48d._0x44db5c,-_0x54a48d._0x443b83,-_0x54a48d._0x5a67ad,-_0x54a48d._0x141eed)]+0x1},_0x5477e9();return;}function _0x1b9884(_0x155716,_0xdac556,_0x7beafc,_0x546f42){return _0x41f4(_0x7beafc-0x194,_0x546f42);}_0x577884[_0x11d476(-_0x54a48d._0x304b98,-_0x54a48d._0x4ecf95,-0x264,-0x1fa)]===_0x1b9884(0x313,0x35a,0x31d,0x2df)&&(_0x311594={..._0x311594,'requestCount':_0x311594[_0x11d476(-_0x54a48d._0x454d02,-0x25c,-0x1fd,-0x2b8)]+0x1},_0x5477e9());},'reset'(){_0x311594=createEmptySnapshot(),_0x4d37f0=void 0x0,_0x5477e9();},'restore'(_0x3f8fa4){const _0x1075f1={_0xbcbb48:0x350};let _0x23b6e8=createEmptySnapshot();for(const _0x59eafe of _0x3f8fa4[_0x196dd2(_0x228591._0x22751a,_0x228591._0xb5305c,-0x2a,_0x228591._0x3f4ccb)]){_0x23b6e8=applyModelCall(_0x23b6e8,{'usage':_0x59eafe[_0x3f281c(_0x228591._0x24614a,_0x228591._0x3bd4da,_0x228591._0x461064,_0x228591._0x3deb57)],'modelTimeMs':_0x59eafe[_0x3f281c(0x518,0x4af,0x50a,_0x228591._0x344420)]});}function _0x3f281c(_0x585e51,_0x513497,_0x36185f,_0x514043){return _0x41f4(_0x36185f-_0x1075f1._0xbcbb48,_0x585e51);}_0x311594={..._0x23b6e8,'requestCount':_0x3f8fa4['modelCalls'][_0x3f281c(_0x228591._0x2a10cf,0x556,_0x228591._0x3cb91e,_0x228591._0x4a8c4f)](_0x32f8d6=>_0x32f8d6['completesRequest'])['length'],'toolCallCount':_0x3f8fa4[_0x3f281c(_0x228591._0x56ed80,0x591,0x559,_0x228591._0x7ed05d)],'historicalMetricsComplete':_0x3f8fa4['missingModelCallCount']===0x0,'missingHistoricalModelCallCount':_0x3f8fa4[_0x3f281c(_0x228591._0x56ed17,_0x228591._0x30f678,0x544,0x51e)]};function _0x196dd2(_0x29ab35,_0xe03b50,_0x5599d7,_0x4d1cf9){return _0x41f4(_0x4d1cf9- -0x152,_0xe03b50);}_0x4d37f0=void 0x0,_0x5477e9();},'subscribe'(_0x16a590){_0x5aa5c6[_0x544bd4(_0x46de24._0x27665a,0x217,_0x46de24._0x387f7c,0x26f)](_0x16a590);function _0x544bd4(_0x5901c4,_0x444ab4,_0x374e0d,_0x9624f2){return _0x41f4(_0x5901c4-0x12,_0x9624f2);}return()=>{const _0x52ec99={_0x42c178:0xa,_0x12a762:0xc1};function _0x474aaf(_0x16f5da,_0x466bb9,_0x380248,_0x38b2ef){return _0x544bd4(_0x16f5da-0x138,_0x466bb9-_0x52ec99._0x42c178,_0x380248-_0x52ec99._0x12a762,_0x380248);}_0x5aa5c6[_0x474aaf(0x2da,0x31c,0x265,0x331)](_0x16a590);};}};}function makeExtensionContext(_0x544622){return{'state':_0x544622};}async function runStage(_0x55d93e,_0x4b34f0,_0x3a4992,_0x9baf6){const _0xebf001={_0x449eeb:0x195,_0x147d29:0x175},_0x39274e={_0x3343d1:0x45c};function _0x1e6d6f(_0x20eb3f,_0x4a9ede,_0x75c46,_0x5d11d3){return _0x249222(_0x20eb3f-0x1ee,_0x5d11d3- -_0x39274e._0x3343d1,_0x20eb3f,_0x5d11d3-0x114);}const _0x2ec11b=await _0x55d93e[_0x1e6d6f(-0x113,-_0xebf001._0x449eeb,-_0xebf001._0x147d29,-0x189)](_0x4b34f0,_0x3a4992,_0x9baf6);return await _0x55d93e['runObservers'](_0x4b34f0,_0x2ec11b,_0x9baf6),_0x2ec11b;}async function emitEvent2(_0xd5ccef,_0x26a96a,_0x5c38c2){await _0xd5ccef?.(_0x26a96a,_0x5c38c2);}function _0x41f4(_0x178b05,_0x51bd20){_0x178b05=_0x178b05-0x172;const _0x4ea00d=_0x4ea0();let _0x41f417=_0x4ea00d[_0x178b05];if(_0x41f4['RlXaso']===undefined){var _0x3c3fe7=function(_0x4c9987){const _0x1dfc97='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49290f='',_0x18b697='';for(let _0x812f85=0x0,_0x3f8560,_0x4934bc,_0x5f2ca3=0x0;_0x4934bc=_0x4c9987['charAt'](_0x5f2ca3++);~_0x4934bc&&(_0x3f8560=_0x812f85%0x4?_0x3f8560*0x40+_0x4934bc:_0x4934bc,_0x812f85++%0x4)?_0x49290f+=String['fromCharCode'](0xff&_0x3f8560>>(-0x2*_0x812f85&0x6)):0x0){_0x4934bc=_0x1dfc97['indexOf'](_0x4934bc);}for(let _0x208724=0x0,_0x4800fe=_0x49290f['length'];_0x208724<_0x4800fe;_0x208724++){_0x18b697+='%'+('00'+_0x49290f['charCodeAt'](_0x208724)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x18b697);};_0x41f4['TmGFLm']=_0x3c3fe7,_0x41f4['lxzWyO']={},_0x41f4['RlXaso']=!![];}const _0x137f99=_0x4ea00d[0x0],_0x41e972=_0x178b05+_0x137f99,_0x1d2414=_0x41f4['lxzWyO'][_0x41e972];return!_0x1d2414?(_0x41f417=_0x41f4['TmGFLm'](_0x41f417),_0x41f4['lxzWyO'][_0x41e972]=_0x41f417):_0x41f417=_0x1d2414,_0x41f417;}function replaceToolUseBlocks(_0x124cc1,_0x38e9dd){const _0x5ce953={_0x460586:0xde,_0x74c9d6:0x4e,_0x143349:0x78},_0x4e236c={_0x90895c:0x1cf,_0x63d92f:0x96};let _0xa7785e=0x0;function _0x1743b9(_0x13e227,_0x183c94,_0x1cd320,_0x4673a6){return _0x4c1020(_0x183c94,_0x183c94-_0x4e236c._0x90895c,_0x1cd320-0x10f,_0x1cd320- -_0x4e236c._0x63d92f);}return{..._0x124cc1,'content':_0x124cc1[_0x1743b9(_0x5ce953._0x460586,_0x5ce953._0x74c9d6,0x89,_0x5ce953._0x143349)]['map'](_0x279fed=>{if(_0x279fed['type']!==_0xffd23(0x476,0x4f6,0x484,0x41d))return _0x279fed;const _0x163a33=_0x38e9dd[_0xa7785e];function _0xffd23(_0x3ada6b,_0x5c4dc7,_0x3f4a44,_0x2e83a7){return _0x1743b9(_0x3ada6b-0x90,_0x5c4dc7,_0x3f4a44-0x382,_0x2e83a7-0x182);}return _0xa7785e+=0x1,structuredClone(_0x163a33);})};}function createAssistantMessageId(_0x195a7f,_0x2cd70b){const _0x283cd9={_0x488b5e:0x40e,_0x2a7d98:0x414},_0xb444ff={_0x1e13c7:0xe4,_0x5ea10e:0x13f};function _0x21494d(_0x8469f5,_0x5a70ca,_0x137817,_0x216020){return _0x249222(_0x8469f5-_0xb444ff._0x1e13c7,_0x216020-_0xb444ff._0x5ea10e,_0x5a70ca,_0x216020-0x137);}return _0x195a7f+_0x21494d(0x3b1,0x44a,_0x283cd9._0x488b5e,_0x283cd9._0x2a7d98)+_0x2cd70b;}function createReasoningMessageId(_0x3b8cc7){const _0x134ca2={_0x2f2532:0xdb};function _0x2a2264(_0x504d3c,_0x3ec369,_0x5a0d9e,_0x50b2e9){return _0x249222(_0x504d3c-_0x134ca2._0x2f2532,_0x5a0d9e-0x285,_0x504d3c,_0x50b2e9-0x16b);}return _0x3b8cc7+_0x2a2264(0x4f8,0x542,0x530,0x539);}function withMessageId(_0x529542,_0x555d40){if(_0x529542['id']===_0x555d40)return _0x529542;return{..._0x529542,'id':_0x555d40};}function createAssistantChunkEvent(_0x10d306,_0x275103){const _0x3444e7={_0x23a9b3:0x1b3,_0x292e48:0x1f4,_0x594bbd:0x1d8,_0x4b8159:0x1f0,_0x2f17c2:0x250,_0x139185:0x246,_0x1d5674:0x28c,_0x470ebf:0x2a6,_0x25937a:0x230,_0x360e90:0x1be,_0x1d001a:0x23f,_0x52016a:0x270,_0x4c33c5:0x266,_0x2df031:0x2af},_0x506702={_0x3132f2:0xac},_0x5cfb9f={_0x1cd0a3:0x191,_0x575294:0x430,_0x469604:0x1dd};function _0x4866fe(_0x2a7174,_0x437453,_0x22ae4d,_0x1f29dc){return _0x249222(_0x2a7174-_0x5cfb9f._0x1cd0a3,_0x22ae4d- -_0x5cfb9f._0x575294,_0x2a7174,_0x1f29dc-_0x5cfb9f._0x469604);}if(_0x10d306[_0x4866fe(-_0x3444e7._0x23a9b3,-0x25e,-_0x3444e7._0x292e48,-_0x3444e7._0x594bbd)]!=='content_delta')return void 0x0;if(_0x10d306[_0x513a2d(0x1d0,_0x3444e7._0x4b8159,0x24b,_0x3444e7._0x2f17c2)]===void 0x0)return void 0x0;function _0x513a2d(_0x627840,_0x2e416e,_0xb647c,_0x1ce2e1){return _0x4c1020(_0xb647c,_0x2e416e-0xe6,_0xb647c-0xaf,_0x2e416e-_0x506702._0x3132f2);}return{'type':_0x513a2d(_0x3444e7._0x139185,0x273,_0x3444e7._0x1d5674,_0x3444e7._0x470ebf),'index':_0x10d306['index']??0x0,'messageId':_0x275103,'chunk':{'type':_0x513a2d(0x271,_0x3444e7._0x25937a,_0x3444e7._0x360e90,_0x3444e7._0x1d001a),'index':_0x10d306[_0x513a2d(_0x3444e7._0x52016a,_0x3444e7._0x4c33c5,_0x3444e7._0x2df031,0x269)]??0x0,'text':_0x10d306['text']}};}function createToolUseChunkEvent(_0x121020,_0x2b6e4a){const _0x3034a1={_0x17831c:0x28b,_0x2f3bf0:0x27f,_0x3f937b:0x304,_0x52d590:0x2ed,_0x57beba:0x296,_0x12e34e:0x32e,_0x6cc212:0x323,_0x4d3bda:0x2ba,_0x789781:0x53f,_0x41a3fc:0x28e,_0x331b50:0x5b4,_0x224508:0x551},_0x40e3dc={_0xc6b616:0x1ba,_0x4480cd:0x40,_0x8cdd67:0x3fc};function _0x4a0bc2(_0x43781d,_0x4a3767,_0x30be69,_0x17c120){return _0x4c1020(_0x17c120,_0x4a3767-_0x40e3dc._0xc6b616,_0x30be69-_0x40e3dc._0x4480cd,_0x4a3767-_0x40e3dc._0x8cdd67);}function _0x13206e(_0x5909a1,_0x4af790,_0x386a53,_0x411849){return _0x4c1020(_0x386a53,_0x4af790-0x136,_0x386a53-0x59,_0x411849-0x100);}if(_0x121020['type']!==_0x13206e(0x286,_0x3034a1._0x17831c,0x2da,_0x3034a1._0x2f3bf0))return void 0x0;return{'type':_0x13206e(0x2e6,_0x3034a1._0x3f937b,_0x3034a1._0x52d590,_0x3034a1._0x57beba),'index':_0x121020['index']??0x0,'messageId':_0x2b6e4a,'chunk':{'type':'tool_use_delta','id':_0x121020['id']??'','index':_0x121020[_0x13206e(_0x3034a1._0x12e34e,0x2a3,_0x3034a1._0x6cc212,_0x3034a1._0x4d3bda)]??0x0,..._0x121020[_0x4a0bc2(0x4fc,_0x3034a1._0x789781,0x4d4,0x5a9)]!==void 0x0?{'name':_0x121020[_0x13206e(0x245,_0x3034a1._0x41a3fc,0x247,0x243)]}:{},..._0x121020[_0x4a0bc2(_0x3034a1._0x331b50,_0x3034a1._0x224508,0x52c,0x5a3)]!==void 0x0?{'inputDelta':_0x121020['inputDelta']}:{}}};}function createReasoningChunkEvent(_0x34194d,_0x1c30c9){const _0x2534a7={_0x52c293:0x4ef,_0x1c966f:0x5e,_0x2eacb2:0x1,_0x4c5c79:0xd6,_0x52115a:0x562,_0x5837ad:0x86,_0xdf6e33:0x75,_0x4bcca7:0x45,_0x520315:0x99,_0x5221d0:0x3e,_0x1db6a3:0x8e,_0x582c87:0x43,_0x26bb19:0xe8,_0x26f7a8:0x57a,_0x524969:0x4e0,_0x50f36c:0x53e,_0x5ee66b:0x55d,_0x355c77:0x55e,_0xacfde5:0x549,_0x2e4d25:0x111,_0x1ff91a:0xf0,_0x3d9228:0x7e,_0x8d0579:0x160,_0xbf2a73:0x570,_0x3b7a80:0x595,_0x3bd1ec:0x592,_0x5bdee9:0x564,_0x2d2f58:0x10b,_0x1988b1:0xa0,_0x389d69:0x8d,_0xe8da5c:0x68,_0x47ff02:0x20,_0x2b3203:0xa6,_0xfe7df8:0xd1,_0xb3e8c0:0x124,_0x2d4ede:0xc6},_0xdb4df7={_0x1480e2:0xfd,_0x5379f8:0x395},_0x44042d={_0x2a16bf:0x324};function _0x33b51b(_0x196ec2,_0xc17b55,_0x1de275,_0x236a99){return _0x249222(_0x196ec2-0x168,_0xc17b55- -_0x44042d._0x2a16bf,_0x196ec2,_0x236a99-0xf2);}function _0x391181(_0x7f0c5c,_0x1f0ebb,_0x13afe9,_0x1a2cf7){return _0x4c1020(_0x1f0ebb,_0x1f0ebb-0x38,_0x13afe9-_0xdb4df7._0x1480e2,_0x13afe9-_0xdb4df7._0x5379f8);}switch(_0x34194d[_0x391181(0x527,0x4cb,_0x2534a7._0x52c293,0x4d5)]){case _0x33b51b(-0x47,-_0x2534a7._0x1c966f,-_0x2534a7._0x2eacb2,-0x8a):return{'type':_0x33b51b(-0x101,-0x110,-0x174,-_0x2534a7._0x4c5c79),'index':_0x34194d['index'],'messageId':_0x1c30c9,'chunk':{'type':_0x33b51b(-0x4b,-_0x2534a7._0x1c966f,-0x4b,-0x9e),'index':_0x34194d[_0x391181(0x57c,0x4f7,0x54f,_0x2534a7._0x52115a)]??0x0,'thinking':_0x34194d['thinking']??''},'text':_0x34194d[_0x33b51b(-_0x2534a7._0x5837ad,-0xd6,-_0x2534a7._0xdf6e33,-0x141)]??''};case _0x33b51b(-_0x2534a7._0x4bcca7,-_0x2534a7._0x520315,-0xa2,-_0x2534a7._0x5221d0):return{'type':'reasoning_chunk','index':_0x34194d[_0x33b51b(-0x69,-_0x2534a7._0x1db6a3,-_0x2534a7._0x582c87,-_0x2534a7._0x26bb19)],'messageId':_0x1c30c9,'chunk':{'type':_0x391181(_0x2534a7._0x26f7a8,_0x2534a7._0x524969,_0x2534a7._0x50f36c,_0x2534a7._0x5ee66b),'contentIndex':_0x34194d[_0x391181(_0x2534a7._0x355c77,0x4d5,_0x2534a7._0xacfde5,0x4e3)]??0x0,'delta':_0x34194d[_0x33b51b(-_0x2534a7._0x2e4d25,-_0x2534a7._0x1ff91a,-_0x2534a7._0x3d9228,-_0x2534a7._0x8d0579)]??'','itemId':_0x34194d[_0x33b51b(-0xac,-0x55,-0x80,-0x2f)]??'','outputIndex':_0x34194d[_0x391181(0x5a3,_0x2534a7._0xbf2a73,_0x2534a7._0x3b7a80,0x5cc)]??0x0},'text':_0x34194d[_0x33b51b(-0xcd,-0xf0,-0xdd,-0xbe)]??''};case _0x391181(0x581,_0x2534a7._0x3bd1ec,_0x2534a7._0x5bdee9,0x4ff):return{'type':'reasoning_chunk','index':_0x34194d[_0x33b51b(-0xd6,-0xd1,-_0x2534a7._0x2d2f58,-_0x2534a7._0x1988b1)],'messageId':_0x1c30c9,'chunk':{'type':'openai_reasoning_summary_delta','delta':_0x34194d[_0x33b51b(-0x7e,-0xf0,-_0x2534a7._0x389d69,-0xc8)]??'','itemId':_0x34194d[_0x33b51b(-0x3d,-0x55,-_0x2534a7._0xe8da5c,-_0x2534a7._0x47ff02)]??'','outputIndex':_0x34194d[_0x391181(0x56a,0x5d3,0x595,0x5a7)]??0x0,'summaryIndex':_0x34194d[_0x33b51b(-_0x2534a7._0x2b3203,-_0x2534a7._0xfe7df8,-_0x2534a7._0xb3e8c0,-_0x2534a7._0x2d4ede)]??0x0},'text':_0x34194d['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x242044){const _0x2179ed={_0x238122:0x31f,_0x573062:0x3d7,_0x3ab29f:0x376,_0x579f8e:0x32f,_0x48aab5:0x37b,_0x2471e1:0x3db,_0x3d6c6c:0x3a7},_0x226a2b={_0x3f5bb5:0xbd,_0x5c8406:0xce},_0x2111e9={_0x4f3080:0xd,_0x6c820d:0x2a};function _0x65bc65(_0x2304c6,_0x433c69,_0xd9c399,_0x57d564){return _0x249222(_0x2304c6-_0x2111e9._0x4f3080,_0x2304c6- -0x363,_0xd9c399,_0x57d564-_0x2111e9._0x6c820d);}function _0x348479(_0x57482c,_0x405cee,_0x91a69a,_0x24f4e4){return _0x249222(_0x57482c-_0x226a2b._0x3f5bb5,_0x405cee-_0x226a2b._0x5c8406,_0x57482c,_0x24f4e4-0x1e5);}return _0x242044[_0x348479(_0x2179ed._0x238122,0x38f,0x3cd,_0x2179ed._0x573062)]==='error'&&_0x242044[_0x348479(0x395,_0x2179ed._0x3ab29f,_0x2179ed._0x579f8e,_0x2179ed._0x48aab5)][_0x348479(0x393,0x3aa,_0x2179ed._0x2471e1,_0x2179ed._0x3d6c6c)]===!![];}function _0x4c1020(_0x33aa5d,_0x1c9b15,_0x3332b6,_0x5de3fb){return _0x41f4(_0x5de3fb- -0x53,_0x33aa5d);}async function executeModelRequest(_0x3aa691,_0x167f39,_0x1762a8,_0x2bd934,_0x1f7618,_0x4d77c6){const _0x5872ea={_0x3f8fcc:0x51c,_0x465bdb:0x3ca,_0x3bdc72:0x42d,_0x37d8ee:0x1a1,_0x5bb2a6:0x190,_0x3bba0d:0x15a,_0x17f699:0x3ed,_0x2db131:0x534,_0x1446f6:0x547,_0x30a4e3:0x500,_0x3c9b4e:0x234,_0x302821:0x24d,_0x305725:0x24f,_0x37e809:0x24a,_0x2860e0:0x260,_0x3dbff1:0x2a0,_0x52146e:0x43e,_0x2ee9fb:0x400,_0x150764:0x463,_0x36ab03:0x24e,_0xb5dcb2:0x1e2,_0x4abe5f:0x24b,_0x4e3dfe:0x195,_0x2a6835:0x4a9,_0x19c596:0x4ce,_0x425225:0x45c,_0x1849b1:0x20b,_0x570bc1:0x1cc,_0x5dea78:0x1c9,_0x4c5509:0x246,_0x467606:0x4df,_0x5bc58d:0x419,_0x1841c0:0x47e,_0x40e6d7:0x42e,_0x3990f4:0x4a3,_0x5544a2:0x230,_0x16b0ef:0x1de,_0x45ba23:0x220,_0x2d0420:0x492,_0x2fa1de:0x400,_0xfbbc95:0x463,_0x100bf:0x4bd,_0xd9b0b6:0x44b,_0x1197ba:0x223,_0x3b6e7b:0x1e5,_0x2168e7:0x1b3,_0x5f0429:0x1bf,_0x448677:0x45b,_0x3fbe70:0x2c4,_0x57a862:0x290,_0x37e788:0x493,_0xf83ade:0x45c,_0x3a4497:0x475,_0x507b7d:0x427,_0x2d78d8:0x41a,_0x7385fe:0x441,_0x36bf6e:0x446,_0x57d847:0x4a4,_0x50b212:0x495,_0x14e745:0x22d,_0x23b17b:0x26c,_0x5dd155:0x4ec,_0x2158db:0x44a,_0x2d2612:0x4b2,_0x116eb6:0x1e4,_0x1db11e:0x23d,_0x16bf6d:0x235,_0x146f12:0x49f,_0x5230ce:0x45d,_0x44c46a:0x1de,_0x712294:0x171,_0x4e2055:0x1d0,_0xef2d42:0x495,_0x10ce31:0x436,_0x2ab764:0x466,_0x42709e:0x3f1,_0x23179c:0x46b,_0x7fe7e:0x4b1,_0x15892f:0x44b,_0x18b3bb:0x14e,_0x590c66:0x466,_0x52c0d0:0x1b3},_0x14fe69={_0x4f15ff:0x96,_0x607ff1:0x470},_0x3cec0a={_0x593c27:0x3a};throwIfAborted(_0x167f39[_0x252c58(0x4fe,_0x5872ea._0x3f8fcc,0x4ce,0x500)]);function _0x252c58(_0x5600fe,_0x492320,_0x12c69c,_0x24dda0){return _0x4c1020(_0x12c69c,_0x492320-0x165,_0x12c69c-_0x3cec0a._0x593c27,_0x24dda0-0x302);}if(!_0x167f39['streaming']||!_0x1762a8[_0x252c58(_0x5872ea._0x465bdb,0x3ca,0x438,_0x5872ea._0x3bdc72)])return await _0x1762a8[_0xe4c2df(-0x1ee,-0x1b8,-_0x5872ea._0x37d8ee,-0x180)](_0x3aa691,{'signal':_0x167f39[_0xe4c2df(-_0x5872ea._0x5bb2a6,-0x205,-0x15b,-_0x5872ea._0x3bba0d)]});let _0x1ff0c4;for await(const _0x202b84 of _0x1762a8[_0x252c58(0x3f1,0x44f,_0x5872ea._0x17f699,_0x5872ea._0x3bdc72)](_0x3aa691,{'signal':_0x167f39['signal']})){throwIfAborted(_0x167f39[_0x252c58(0x524,_0x5872ea._0x2db131,_0x5872ea._0x1446f6,_0x5872ea._0x30a4e3)]);if(_0x202b84[_0xe4c2df(-_0x5872ea._0x3c9b4e,-0x1ff,-_0x5872ea._0x302821,-0x251)]===_0xe4c2df(-0x1f4,-_0x5872ea._0x305725,-_0x5872ea._0x37e809,-0x217)){_0x4d77c6[_0xe4c2df(-0x22d,-0x1df,-_0x5872ea._0x2860e0,-_0x5872ea._0x3dbff1)]['reasoningStartedAt']!==void 0x0&&_0x4d77c6[_0x252c58(_0x5872ea._0x52146e,0x477,_0x5872ea._0x2ee9fb,_0x5872ea._0x150764)]['reasoningCompletedAt']===void 0x0&&(_0x4d77c6[_0xe4c2df(-0x22d,-0x1d2,-0x227,-0x27d)][_0xe4c2df(-0x245,-_0x5872ea._0x36ab03,-_0x5872ea._0xb5dcb2,-_0x5872ea._0x4abe5f)]=Date[_0xe4c2df(-0x1e4,-_0x5872ea._0x4e3dfe,-0x1ed,-0x18e)]());_0x1ff0c4=_0x202b84['response'];continue;}if(_0x202b84[_0x252c58(_0x5872ea._0x2a6835,0x410,_0x5872ea._0x19c596,_0x5872ea._0x425225)]===_0xe4c2df(-_0x5872ea._0x1849b1,-0x234,-0x1d8,-0x26a)){await emitEvent2(_0x2bd934[_0xe4c2df(-0x1b3,-0x1f1,-_0x5872ea._0x570bc1,-_0x5872ea._0x5dea78)],{'type':_0xe4c2df(-0x20b,-0x1df,-0x236,-_0x5872ea._0x4c5509),'assistantMessageId':_0x4d77c6[_0x252c58(_0x5872ea._0x467606,0x42c,_0x5872ea._0x5bc58d,_0x5872ea._0x1841c0)],'reasoningMessageId':_0x4d77c6[_0x252c58(0x3e6,_0x5872ea._0x40e6d7,_0x5872ea._0x3990f4,0x42e)]},_0x1f7618),delete _0x4d77c6[_0xe4c2df(-0x22d,-0x215,-0x1cb,-_0x5872ea._0x5544a2)][_0xe4c2df(-_0x5872ea._0x16b0ef,-0x197,-0x1f4,-_0x5872ea._0x45ba23)],delete _0x4d77c6[_0x252c58(0x421,_0x5872ea._0x2d0420,_0x5872ea._0x2fa1de,_0x5872ea._0xfbbc95)][_0x252c58(0x3ea,0x48d,_0x5872ea._0x100bf,_0x5872ea._0xd9b0b6)];continue;}if(_0x202b84['type']===_0xe4c2df(-_0x5872ea._0x1197ba,-0x25b,-0x268,-_0x5872ea._0x3b6e7b)){await emitEvent2(_0x2bd934[_0xe4c2df(-_0x5872ea._0x2168e7,-0x1a2,-0x145,-_0x5872ea._0x5f0429)],{..._0x202b84,'assistantMessageId':_0x4d77c6[_0x252c58(_0x5872ea._0x448677,0x499,0x483,0x47e)]},_0x1f7618);continue;}const _0x39f745=createReasoningChunkEvent(_0x202b84,_0x4d77c6[_0xe4c2df(-0x262,-_0x5872ea._0x3fbe70,-0x2c8,-_0x5872ea._0x57a862)]);if(_0x39f745&&_0x39f745[_0x252c58(0x3ed,_0x5872ea._0x37e788,0x469,_0x5872ea._0xf83ade)]===_0x252c58(0x4a1,_0x5872ea._0x3a4497,_0x5872ea._0x507b7d,0x434)&&_0x39f745[_0x252c58(0x47e,_0x5872ea._0x2d78d8,_0x5872ea._0x7385fe,_0x5872ea._0x36bf6e)][_0x252c58(0x4e6,_0x5872ea._0x57d847,_0x5872ea._0x50b212,0x4f7)]>0x0){_0x4d77c6[_0xe4c2df(-_0x5872ea._0x14e745,-_0x5872ea._0x23b17b,-0x281,-0x221)][_0x252c58(0x50d,0x508,_0x5872ea._0x5dd155,0x4b2)]===void 0x0&&(_0x4d77c6['meta'][_0x252c58(0x45e,_0x5872ea._0x2158db,0x498,_0x5872ea._0x2d2612)]=Date[_0xe4c2df(-_0x5872ea._0x116eb6,-_0x5872ea._0x1db11e,-_0x5872ea._0x16bf6d,-0x187)]());await emitEvent2(_0x2bd934['onEvent'],_0x39f745,_0x1f7618);continue;}const _0x1ca969=createAssistantChunkEvent(_0x202b84,_0x4d77c6['assistantMessageId']);if(_0x1ca969){_0x4d77c6[_0x252c58(_0x5872ea._0x146f12,_0x5872ea._0x5230ce,_0x5872ea._0x37e788,0x463)][_0xe4c2df(-_0x5872ea._0x44c46a,-0x199,-_0x5872ea._0x712294,-_0x5872ea._0x4e2055)]!==void 0x0&&_0x4d77c6[_0x252c58(0x4ba,_0x5872ea._0xef2d42,_0x5872ea._0x10ce31,0x463)][_0x252c58(_0x5872ea._0x2ab764,_0x5872ea._0x42709e,0x430,0x44b)]===void 0x0&&(_0x4d77c6[_0x252c58(0x459,0x4b2,_0x5872ea._0x23179c,0x463)][_0x252c58(0x3fa,_0x5872ea._0x7fe7e,0x4c1,_0x5872ea._0x15892f)]=Date['now']());await emitEvent2(_0x2bd934[_0xe4c2df(-_0x5872ea._0x2168e7,-_0x5872ea._0x18b3bb,-_0x5872ea._0x570bc1,-0x205)],_0x1ca969,_0x1f7618);continue;}const _0x1ffb0f=createToolUseChunkEvent(_0x202b84,_0x4d77c6[_0x252c58(_0x5872ea._0x590c66,0x479,0x4df,0x47e)]);_0x1ffb0f&&await emitEvent2(_0x2bd934[_0xe4c2df(-_0x5872ea._0x52c0d0,-0x17e,-0x17e,-0x228)],_0x1ffb0f,_0x1f7618);}function _0xe4c2df(_0x2ee2f1,_0x3a7520,_0x2e9cb1,_0x19a2b2){return _0x249222(_0x2ee2f1-_0x14fe69._0x4f15ff,_0x2ee2f1- -_0x14fe69._0x607ff1,_0x3a7520,_0x19a2b2-0x145);}if(!_0x1ff0c4)throw new Error('Model\x20stream\x20ended\x20without\x20a\x20final\x20response');return _0x1ff0c4;}function makeTurnGuards(_0x25f986,_0x4839ac,_0x2041fb,_0x2f5467,_0x5ee62c){return{async 'stage'(_0x49987a,_0x2d7273){return throwIfAborted(_0x25f986),await runStage(_0x4839ac,_0x49987a,_0x2d7273,_0x2f5467);},async 'emit'(_0xa51b0c){throwIfAborted(_0x25f986),await emitEvent2(_0x2041fb,_0xa51b0c,_0x5ee62c);},async 'stageUnchecked'(_0x29f877,_0x53c1a7){return await runStage(_0x4839ac,_0x29f877,_0x53c1a7,_0x2f5467);},async 'emitUnchecked'(_0x1865b1){await emitEvent2(_0x2041fb,_0x1865b1,_0x5ee62c);}};}async function runTurn(_0xb903e,_0x5728f9){const _0x307413={_0x1d7f78:0x30d,_0x494ac0:0x2ea,_0x409d54:0x157,_0x2e96d5:0x1f2,_0x1acae1:0x20a,_0x32c199:0x195,_0x4c9d4a:0x18e,_0x1e240b:0x13c,_0x10c74d:0xcb,_0x4766cc:0x176,_0x48b51c:0x309,_0x40e775:0x300,_0x578e93:0xf3,_0x45a537:0xf7,_0x4e4f3b:0x114,_0x82ca7b:0x125,_0x55d259:0x123,_0x36ecce:0x137,_0x2df072:0x23f,_0x50d3d8:0x24a,_0x3a210f:0x236,_0x4638eb:0x249,_0x6b0683:0x263,_0x22f84a:0x183,_0x3f6c11:0x233,_0x11a018:0xf2,_0x59d746:0x10d,_0x4efd2e:0xae,_0x56a3be:0x255,_0x39943b:0x1ee,_0xc77834:0x213,_0x3d7c30:0x1ec,_0x2a4692:0x25f,_0x4753e8:0x238,_0x32d817:0x1aa,_0x5c6a64:0x1c5,_0x634370:0x17b,_0x32c869:0x105,_0x262a57:0x272,_0x3200ff:0x24b,_0x260a23:0x299,_0xf7ddb9:0x12f,_0x3a83a6:0x178,_0x4aed01:0xca,_0x50e7f4:0x133,_0xc9bec9:0x19e,_0x30defd:0x2a8,_0x3aa4c5:0x2b4,_0x2ac8cb:0x241,_0x235ffd:0x228,_0x36d3c0:0x270,_0x2e2cbb:0x27b,_0x49ff41:0x2ee,_0x517d5e:0x2a4,_0x8bcfcb:0x172,_0x4fac47:0x18b,_0x17a0f6:0x132,_0x5bea5c:0x298,_0x26a07c:0x2ba,_0x60b10d:0x26b,_0x3f80d1:0x308,_0x5d80dc:0x27d,_0x33a5b5:0x2cf,_0x14be41:0x2f7,_0x1dc51f:0x2cb,_0x497942:0x325,_0x336923:0x104,_0x162c9b:0x14e,_0x2fe59f:0x1b8,_0x50618f:0x12a,_0x3ab12e:0x124,_0x3b5788:0x144,_0x5b3556:0x140,_0x93ccb5:0xcf,_0x5f54fe:0x1b9,_0x4e8b86:0x1ef,_0x15b9b2:0x140,_0x143ff1:0x156,_0x2032e5:0x1c6,_0x4e9ecd:0x187,_0x44728d:0x12c,_0x1d922a:0x10f,_0x42847b:0x1b2,_0x32c268:0x170,_0x18e217:0x12e,_0x323f88:0x17d,_0x24fd9f:0x181,_0x326383:0x179,_0x358c05:0x1ba,_0x1a0795:0x1c1,_0x8e8ca5:0x184,_0x2ebd67:0x269,_0x2b46ca:0x202,_0x4b37db:0x149,_0x168041:0x14e,_0x4b3776:0xff,_0x4f199a:0x189,_0x2da6c8:0x19a,_0x4f8b95:0x204,_0xf969c8:0x231,_0x36bfda:0xf4,_0x24876c:0xc5,_0x8b54db:0x2c3,_0x5edff9:0x201,_0x230695:0x20f,_0x50e38c:0x378,_0x21d25b:0x1dc,_0x402bad:0x175,_0x3b63d4:0x2fe,_0x4940ee:0x321,_0x1578f6:0x2e1,_0x1983ac:0x2c9,_0x1029b0:0x2cd,_0x22b693:0x1e1,_0x581cbe:0x303,_0x4a5d59:0x290,_0x229fab:0x159,_0x5921f8:0x1a4,_0x2aca44:0x197,_0x1b789b:0x21a,_0x44a3fe:0x21e,_0x1827e2:0x17e,_0x34a927:0xf6,_0x111ae9:0x165,_0xbb4e08:0x1c8,_0x465954:0x189,_0x43ebe6:0x2a7,_0x322bb4:0x2ba,_0x5e0497:0x232,_0x3322fa:0x2ad,_0x44487c:0x30c,_0x21bc32:0x28a,_0xc26f4f:0x2c9,_0x273a40:0x16e,_0x1f94db:0x2a5,_0x43a266:0x2bb,_0x3c399e:0x316,_0xa45c7d:0x2af,_0x31e968:0xf9,_0xa61f42:0x144,_0x46e2a9:0x13b,_0x5b99d5:0x162,_0x41ec93:0x183,_0x58bff3:0x1c0,_0x3cf5fe:0x1f3,_0x45fd6d:0x1fc,_0x37c9df:0x222},_0x1d2b9b={_0x1dcb47:0x1ee,_0x20011c:0x191,_0x4750ed:0x1aa,_0x1ad307:0x128,_0x57638e:0x15c,_0x3e91d7:0xef,_0x25783a:0xa0,_0x1cfc32:0x1d4,_0xa6432f:0x246,_0x25ef56:0xfe,_0x4613a1:0x166,_0x55b1ca:0x182,_0x34c814:0x1b5,_0x2edbe5:0x2a4,_0x117320:0x272},_0x1ba6d9={_0x4b1da4:0x183,_0xf9d92b:0x30},_0x167b6d={_0x308ffc:0x183},_0x5568af={_0xc8f6fb:0x584,_0xc2319a:0x5ab,_0xf91a4d:0x562,_0x15cdb8:0x12a,_0x292409:0xcf},_0x19e026={_0x26bd13:0x1c3,_0x226a25:0x1d1},_0x1feb3c={_0x262b2a:0x11c,_0x827b80:0x185},_0x3700d5={_0xe87fef:0x2c},_0x50db18=_0x5728f9[_0x475fc0(0x2b1,0x2fb,_0x307413._0x1d7f78,_0x307413._0x494ac0)],_0x5d68bc=_0xb903e[_0x5ead59(_0x307413._0x409d54,0x198,0x1c4,0x1ba)]??new AbortController()[_0x5ead59(_0x307413._0x2e96d5,_0x307413._0x1acae1,0x1c4,_0x307413._0x32c199)];function _0x475fc0(_0x581eed,_0x461735,_0x5ee7ab,_0x495c2b){return _0x249222(_0x581eed-0x89,_0x581eed-_0x3700d5._0xe87fef,_0x5ee7ab,_0x495c2b-0x59);}function _0x5ead59(_0x334098,_0x59cae4,_0x114412,_0x47231a){return _0x249222(_0x334098-0x1f,_0x114412- -_0x1feb3c._0x262b2a,_0x334098,_0x47231a-_0x1feb3c._0x827b80);}const _0x357c43={'sessionId':_0xb903e[_0x5ead59(_0x307413._0x4c9d4a,0x133,0x183,0x1c2)],'turnId':_0xb903e[_0x5ead59(_0x307413._0x1e240b,_0x307413._0x10c74d,0x12f,0x12f)],'system':normalizeSystem(_0xb903e[_0x475fc0(0x280,0x27e,0x2f6,0x2a6)]),'messages':(_0xb903e[_0x5ead59(0x1b5,0x1c9,0x1b6,_0x307413._0x4766cc)]??[])[_0x475fc0(_0x307413._0x48b51c,0x32c,0x2bb,_0x307413._0x40e775)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x5728f9[_0x5ead59(_0x307413._0x578e93,0xfc,_0x307413._0x45a537,_0x307413._0x4e4f3b)]===_0x5ead59(0xc3,_0x307413._0x82ca7b,_0x307413._0x55d259,_0x307413._0x36ecce)?_0x5728f9[_0x475fc0(_0x307413._0x2df072,_0x307413._0x50d3d8,_0x307413._0x3a210f,0x25d)]():_0x5728f9[_0x475fc0(_0x307413._0x2df072,_0x307413._0x4638eb,0x22f,_0x307413._0x6b0683)]},_0x48e76f=makeExtensionContext(_0x357c43),_0x335026={'sessionId':_0x357c43[_0x5ead59(0x1a2,0x185,_0x307413._0x22f84a,0x1b8)],'turnId':_0x357c43[_0x475fc0(0x277,0x248,0x2b0,_0x307413._0x3f6c11)],'state':_0x357c43,'signal':_0x5d68bc,..._0x5728f9[_0x475fc0(0x26a,0x29d,0x286,0x205)]?{'askUser':_0x5728f9['askUser']}:{},..._0x5728f9[_0x5ead59(0x169,_0x307413._0x11a018,_0x307413._0x59d746,_0x307413._0x4efd2e)]?{'setTopic':_0x5728f9[_0x475fc0(_0x307413._0x56a3be,_0x307413._0x39943b,_0x307413._0xc77834,_0x307413._0x3d7c30)]}:{}},{stage:_0x2063ba,emit:_0x132676,stageUnchecked:_0x53fafe,emitUnchecked:_0x197acb}=makeTurnGuards(_0x5d68bc,_0x5728f9['registry'],_0x5728f9[_0x475fc0(0x2e9,0x2a9,0x289,0x340)],_0x48e76f,_0x335026),_0x5a0799=async(_0x24eae6,_0x18b4f4)=>{const _0x146cda={_0x56c2bc:0x301};function _0x82bce5(_0x2f5cf6,_0x59c771,_0x377a1e,_0x2a2005){return _0x5ead59(_0x2f5cf6,_0x59c771-_0x19e026._0x26bd13,_0x59c771- -0x1ce,_0x2a2005-_0x19e026._0x226a25);}const _0x377593=_0x18b4f4?{..._0x48e76f,'turnMeta':_0x18b4f4}:_0x48e76f;function _0xef2f9c(_0x33031f,_0x494025,_0x3a66dc,_0x302d2b){return _0x475fc0(_0x302d2b-_0x146cda._0x56c2bc,_0x494025-0x1e9,_0x494025,_0x302d2b-0x109);}await _0x5728f9['registry'][_0xef2f9c(_0x5568af._0xc8f6fb,_0x5568af._0xc2319a,0x569,_0x5568af._0xf91a4d)](_0x82bce5(-_0x5568af._0x15cdb8,-0xe1,-0x139,-_0x5568af._0x292409),structuredClone(_0x24eae6),_0x377593);},_0x6351d=async _0x29405f=>{if(!_0xb903e[_0x4281fd(_0x1d2b9b._0x1dcb47,_0x1d2b9b._0x20011c,_0x1d2b9b._0x4750ed,0x193)])return 0x0;const _0x16589b=await _0xb903e[_0xb0d700(_0x1d2b9b._0x1ad307,_0x1d2b9b._0x57638e,_0x1d2b9b._0x3e91d7,_0x1d2b9b._0x25783a)]();throwIfAborted(_0x5d68bc);if(_0x16589b[_0x4281fd(0x2bb,_0x1d2b9b._0x1cfc32,_0x1d2b9b._0xa6432f,0x23f)]===0x0)return 0x0;function _0x4281fd(_0x4c8436,_0x38db87,_0x44132b,_0x466d2f){return _0x475fc0(_0x44132b- -0xbd,_0x38db87-_0x167b6d._0x308ffc,_0x4c8436,_0x466d2f-0x102);}await _0x29405f?.();for(const _0x408250 of _0x16589b){const _0x3fcb95=await _0x2063ba(_0xb0d700(_0x1d2b9b._0x25ef56,0xbe,0xe7,0x12a),normalizeMessage(_0x408250));throwIfAborted(_0x5d68bc),_0x357c43['messages'][_0xb0d700(0x17e,0x1bf,_0x1d2b9b._0x4613a1,_0x1d2b9b._0x55b1ca)](_0x3fcb95),await _0x5a0799(_0x3fcb95),await _0x132676({'type':_0x4281fd(0x225,0x1dd,_0x1d2b9b._0x34c814,0x1a6),'message':_0x3fcb95});}function _0xb0d700(_0x2ad8b9,_0x3d9e33,_0x1e2b61,_0x1ac28f){return _0x5ead59(_0x2ad8b9,_0x3d9e33-_0x1ba6d9._0x4b1da4,_0x1e2b61- -_0x1ba6d9._0xf9d92b,_0x1ac28f-0x35);}return _0x16589b[_0x4281fd(_0x1d2b9b._0x2edbe5,0x21d,0x246,_0x1d2b9b._0x117320)];};let _0x365a77=0x0;try{const _0xe1072d=await _0x2063ba(_0x475fc0(_0x307413._0x2a4692,_0x307413._0x4753e8,0x296,0x1f7),normalizeMessage(_0xb903e[_0x5ead59(_0x307413._0x32d817,_0x307413._0x5c6a64,_0x307413._0x634370,_0x307413._0x32c869)]));_0x357c43['messages']['push'](_0xe1072d),await _0x5a0799(_0xe1072d),await _0x132676({'type':_0x475fc0(_0x307413._0x262a57,_0x307413._0x3200ff,_0x307413._0x260a23,0x246),'message':_0xe1072d});while(!![]){throwIfAborted(_0x5d68bc),_0x365a77+=0x1;const _0x28434a=createAssistantMessageId(_0x357c43[_0x5ead59(0xc7,0xf4,_0x307413._0xf7ddb9,_0x307413._0x3a83a6)],_0x365a77),_0x5c9445=createReasoningMessageId(_0x28434a),_0x552909={'model':_0x50db18[_0x5ead59(_0x307413._0x4aed01,0x126,_0x307413._0x50e7f4,_0x307413._0xc9bec9)],'modelIdentity':_0x50db18['modelIdentity'],..._0x50db18[_0x475fc0(0x241,0x263,_0x307413._0x30defd,_0x307413._0x3aa4c5)]?{'provider':_0x50db18[_0x475fc0(_0x307413._0x2ac8cb,0x25c,_0x307413._0x235ffd,_0x307413._0x36d3c0)]}:{}};let _0x3e6d1e={'model':_0x50db18[_0x475fc0(_0x307413._0x2e2cbb,0x26c,_0x307413._0x49ff41,_0x307413._0x517d5e)],..._0x50db18['maxTokens']!==void 0x0?{'maxTokens':_0x50db18[_0x5ead59(0x15d,0x173,_0x307413._0x8bcfcb,0x1cb)]}:{},'system':structuredClone(_0x357c43[_0x5ead59(_0x307413._0x4fac47,_0x307413._0x17a0f6,0x138,0x14d)]),'messages':structuredClone(_0x357c43[_0x475fc0(0x2fe,0x2d5,_0x307413._0x5bea5c,_0x307413._0x26a07c)]),'tools':_0x5728f9[_0x475fc0(0x2ce,_0x307413._0x60b10d,_0x307413._0x3f80d1,_0x307413._0x5d80dc)][_0x475fc0(_0x307413._0x33a5b5,0x273,_0x307413._0x14be41,_0x307413._0x30defd)](),'metadata':{'sessionId':_0x357c43[_0x475fc0(_0x307413._0x1dc51f,_0x307413._0x1dc51f,_0x307413._0x497942,_0x307413._0x517d5e)],'turnId':_0x357c43['turnId'],'modelIdentity':_0x50db18[_0x5ead59(0x116,_0x307413._0x336923,_0x307413._0x162c9b,_0x307413._0x2fe59f)],..._0x50db18['pricingProviderId']!==void 0x0?{'pricingProviderId':_0x50db18['pricingProviderId']}:{}},..._0x5728f9[_0x5ead59(_0x307413._0x50618f,0x14d,_0x307413._0x3ab12e,0xeb)]?{'outputFormat':_0x5728f9[_0x5ead59(_0x307413._0x3b5788,_0x307413._0x5b3556,_0x307413._0x3ab12e,_0x307413._0x93ccb5)]}:{}};_0x3e6d1e=await _0x2063ba(_0x5ead59(_0x307413._0x5f54fe,_0x307413._0x4e8b86,0x181,_0x307413._0x15b9b2),_0x3e6d1e);{const {pricingProviderId:_0x2b91e6,..._0xf9c5b5}=_0x3e6d1e[_0x5ead59(0x198,0xe3,_0x307413._0x143ff1,_0x307413._0x2032e5)];_0x3e6d1e={..._0x3e6d1e,'metadata':{..._0xf9c5b5,..._0x50db18['pricingProviderId']!==void 0x0?{'pricingProviderId':_0x50db18[_0x5ead59(0x1a3,_0x307413._0x11a018,0x163,0x1d3)]}:{}}};}await _0x132676({'type':_0x5ead59(0x16c,_0x307413._0x4e9ecd,_0x307413._0x44728d,_0x307413._0x1d922a),'request':_0x3e6d1e});const _0x56a7e8=Date[_0x5ead59(_0x307413._0x42847b,0x175,_0x307413._0x32c268,0x103)]();_0x552909[_0x5ead59(0x20d,_0x307413._0x18e217,0x19c,0x1e8)]=_0x56a7e8;let _0x20e9de=await executeModelRequest(_0x3e6d1e,_0xb903e,_0x50db18,_0x5728f9,_0x335026,{'assistantMessageId':_0x28434a,'reasoningMessageId':_0x5c9445,'meta':_0x552909});const _0x28dcf9=Date[_0x5ead59(_0x307413._0x323f88,0x11a,_0x307413._0x32c268,_0x307413._0x24fd9f)]();_0x552909[_0x5ead59(_0x307413._0x326383,0x1f5,0x1b0,_0x307413._0x358c05)]=_0x28dcf9,_0x20e9de=await _0x2063ba(_0x5ead59(_0x307413._0x1a0795,0x1c5,_0x307413._0x8e8ca5,0x152),_0x20e9de);_0x20e9de[_0x475fc0(_0x307413._0x2ebd67,0x2ca,_0x307413._0x2b46ca,0x200)]&&(_0x20e9de={..._0x20e9de,'providerState':{..._0x20e9de[_0x5ead59(0x126,0x172,0x121,0x13d)],'originModelIdentity':_0x50db18[_0x5ead59(_0x307413._0x4b37db,0x189,_0x307413._0x168041,_0x307413._0x4b3776)]}});_0x20e9de=withEstimatedModelCost(_0x3e6d1e,_0x20e9de);const _0x2c4d09=Math['max'](0x0,_0x28dcf9-_0x56a7e8),_0x20f309={'version':0x1,'usage':structuredClone(_0x20e9de[_0x5ead59(0x17e,0x1a4,_0x307413._0x4f199a,_0x307413._0x2da6c8)]),'modelTimeMs':_0x2c4d09},_0x3d70a8=_0x395f6d=>({..._0x552909,'metrics':{..._0x20f309,'usage':structuredClone(_0x20f309[_0x475fc0(0x2d1,0x264,0x2e1,0x28d)]),'completesRequest':_0x395f6d}});await _0x132676({'type':'model_response','response':_0x20e9de,'modelTimeMs':_0x2c4d09}),_0x357c43[_0x475fc0(0x23e,_0x307413._0x4f8b95,0x2a2,_0x307413._0xf969c8)]=_0x20e9de;let _0x4ac2de=await _0x2063ba(_0x5ead59(0x149,0x9c,_0x307413._0x36bfda,_0x307413._0x24876c),withMessageId(responseToAssistantMessage(_0x20e9de),_0x28434a));_0x4ac2de=withMessageId(_0x4ac2de,_0x28434a);const _0x572d45=getToolUseBlocks(_0x4ac2de),_0x424f2c=await Promise[_0x475fc0(0x2d8,_0x307413._0x8b54db,0x34e,0x2d3)](_0x572d45[_0x5ead59(_0x307413._0x5edff9,_0x307413._0x230695,0x1c1,0x226)](_0x1a5ca3=>_0x2063ba(_0x5ead59(0x219,0x1e9,0x1c7,0x184),_0x1a5ca3)));_0x424f2c['length']>0x0&&(_0x4ac2de=replaceToolUseBlocks(_0x4ac2de,_0x424f2c));const _0x4ba891=withMessageId(_0x4ac2de,_0x28434a);_0x4ac2de=_0x4ba891;const _0x183ed5=createReasoningMessage(_0x4ac2de),_0x583fc2=createAssistantTextMessage(_0x4ac2de),_0x1e84b3=createToolUseMessage(_0x4ac2de);_0x183ed5&&await _0x132676({'type':_0x475fc0(0x311,0x2e3,0x2a5,_0x307413._0x50e38c),'message':withMessageId(_0x183ed5,_0x5c9445)});_0x583fc2&&await _0x132676({'type':_0x475fc0(0x2b2,0x2b2,_0x307413._0x50d3d8,0x2d9),'message':withMessageId(_0x583fc2,_0x28434a)});_0x1e84b3&&await _0x132676({'type':_0x5ead59(_0x307413._0x21d25b,0x15c,_0x307413._0x402bad,0x117),'message':withMessageId(_0x1e84b3,_0x28434a)});_0x357c43[_0x475fc0(_0x307413._0x3b63d4,0x2e9,_0x307413._0x4940ee,0x306)][_0x475fc0(0x2de,_0x307413._0x1578f6,_0x307413._0x1983ac,_0x307413._0x1029b0)](_0x4ba891);_0x424f2c['length']>0x0&&await _0x5a0799(_0x4ba891,_0x3d70a8(![]));for(const _0x537cb6 of _0x424f2c){await _0x132676({'type':_0x475fc0(0x231,0x29a,0x239,_0x307413._0x22b693),'toolCall':_0x537cb6});}if(_0x424f2c[_0x475fc0(_0x307413._0x581cbe,0x36c,0x2f9,0x35b)]===0x0){const _0xf73ee2=await _0x6351d(async()=>{await _0x5a0799(_0x4ba891,_0x3d70a8(![]));});if(_0xf73ee2>0x0)continue;const _0x59a16e=await _0x2063ba('beforeFinalOutput',_0x4ac2de),_0xf95f8b=withMessageId(_0x59a16e,_0x28434a);return _0x357c43[_0x5ead59(0x186,0x173,0x18a,0x169)]=_0xf95f8b,_0x357c43[_0x475fc0(0x2fe,_0x307413._0x4a5d59,0x2f8,0x34c)][_0x357c43[_0x5ead59(_0x307413._0x229fab,_0x307413._0x5921f8,0x1b6,0x182)][_0x5ead59(_0x307413._0x2aca44,_0x307413._0x1b789b,0x1bb,_0x307413._0x44a3fe)]-0x1]=_0xf95f8b,await _0x5a0799(_0xf95f8b,_0x3d70a8(!![])),await _0x197acb({'type':'final_message','message':_0xf95f8b}),throwIfAborted(_0x5d68bc),await _0x5728f9['registry'][_0x5ead59(_0x307413._0x1827e2,_0x307413._0x34a927,0x119,0x172)](_0x5ead59(0x17a,_0x307413._0x111ae9,_0x307413._0xbb4e08,_0x307413._0x465954),_0x357c43,_0x48e76f),await _0x132676({'type':_0x475fc0(_0x307413._0x43ebe6,0x301,_0x307413._0x322bb4,_0x307413._0x5e0497),'state':_0x357c43}),{'status':_0x475fc0(_0x307413._0x3322fa,0x2c8,0x2ae,_0x307413._0x44487c),'finalMessage':_0xf95f8b,'state':_0x357c43};}let _0x37ae76=await _0x5728f9[_0x475fc0(0x2ce,_0x307413._0x21bc32,_0x307413._0xc26f4f,0x2ed)]['executeCalls'](_0x424f2c,_0x335026);const _0x16d041=_0x37ae76[_0x5ead59(0x1ac,0x1f7,0x199,_0x307413._0x273a40)](isAbortedToolResult),_0x559c43=_0x16d041?_0x53fafe:_0x2063ba,_0x116719=_0x16d041?_0x197acb:_0x132676;_0x37ae76=await Promise[_0x5ead59(0x1fb,0x15a,0x190,0x171)](_0x37ae76[_0x475fc0(_0x307413._0x48b51c,0x34b,0x2a0,0x34d)](_0x310df1=>_0x559c43(_0x475fc0(0x284,0x211,0x27a,0x2b7),_0x310df1))),_0x357c43[_0x475fc0(_0x307413._0x1f94db,0x2d4,_0x307413._0x43a266,0x307)][_0x475fc0(0x2de,_0x307413._0x3c399e,0x324,_0x307413._0xa45c7d)](..._0x37ae76);for(const _0x51ed17 of _0x37ae76){await _0x116719({'type':'tool_result','result':_0x51ed17});}const _0x5920d4=await _0x559c43(_0x5ead59(_0x307413._0x31e968,0x13c,_0x307413._0xa61f42,0x112),createToolResultUserMessage(_0x37ae76));await _0x116719({'type':_0x5ead59(0x11b,_0x307413._0x46e2a9,0x155,0x1a9),'message':_0x5920d4}),_0x357c43['messages'][_0x475fc0(0x2de,0x348,0x333,0x313)](_0x5920d4),await _0x5a0799(_0x5920d4);if(_0x16d041)return{'status':'aborted','state':_0x357c43};await _0x6351d();}}catch(_0x330993){if(!_0x5d68bc[_0x5ead59(_0x307413._0x5b99d5,_0x307413._0x41ec93,_0x307413._0x58bff3,0x185)])throw new TurnFailedError(_0x330993,_0x357c43);return{'status':_0x5ead59(_0x307413._0x3cf5fe,_0x307413._0x45fd6d,0x1c0,_0x307413._0x37c9df),'state':_0x357c43};}}function createSessionId(){const _0x4fbcbe={_0x54ba78:0xc2,_0x5b8ace:0x70,_0x238ece:0x23,_0x452f28:0x146,_0x39c31d:0xf1,_0xd0417d:0x4a,_0x316a0c:0x7b},_0x24ba48={_0x563f60:0x86,_0x37367d:0x1f8,_0x3bd457:0x4a},_0x27b513={_0x1b5851:0x126};function _0x7f95b7(_0x5b3116,_0x5e1882,_0x1fb4f8,_0xd7227f){return _0x249222(_0x5b3116-0xca,_0x1fb4f8- -_0x27b513._0x1b5851,_0x5e1882,_0xd7227f-0x16d);}function _0x3f76de(_0x3989de,_0x3419f2,_0x3a4767,_0x242d0f){return _0x249222(_0x3989de-_0x24ba48._0x563f60,_0x3419f2- -_0x24ba48._0x37367d,_0x3989de,_0x242d0f-_0x24ba48._0x3bd457);}return _0x3f76de(_0x4fbcbe._0x54ba78,0x71,_0x4fbcbe._0x5b8ace,_0x4fbcbe._0x238ece)+Date['now']()+'-'+Math['random']()[_0x7f95b7(0xff,0x153,_0x4fbcbe._0x452f28,_0x4fbcbe._0x39c31d)](0x10)[_0x3f76de(0x50,_0x4fbcbe._0xd0417d,0x9e,_0x4fbcbe._0x316a0c)](0x2,0xa);}function createTurnId(_0x477ab9){const _0x3f6a88={_0x2d4e48:0x3b,_0x11f8a0:0x6a,_0x27f6e2:0x35,_0x1481b5:0xf},_0xc2c3a3={_0x13837f:0x6c,_0x2cc096:0x24,_0x3b1b67:0x20f};function _0x57b8ee(_0x28d125,_0x442221,_0x52c710,_0x133d27){return _0x4c1020(_0x52c710,_0x442221-_0xc2c3a3._0x13837f,_0x52c710-_0xc2c3a3._0x2cc096,_0x28d125- -_0xc2c3a3._0x3b1b67);}return _0x57b8ee(-_0x3f6a88._0x2d4e48,-_0x3f6a88._0x11f8a0,_0x3f6a88._0x27f6e2,_0x3f6a88._0x1481b5)+_0x477ab9;}function createDefaultMessage(_0x39409d){if(_0x39409d===void 0x0)return void 0x0;return normalizeUserInput(_0x39409d);}function normalizeUserInput(_0x23fff3){const _0x51b53f={_0x598fa2:0x349,_0x3acd22:0x381,_0x37a690:0x3e0,_0x118251:0x3df,_0xf7de08:0x386},_0x535d9f={_0x3b8156:0x1eb,_0x5ce28b:0x66,_0x2a8752:0x69};if(typeof _0x23fff3===_0x2bcb42(0x369,_0x51b53f._0x598fa2,0x385,_0x51b53f._0x3acd22))return{'role':_0x2bcb42(_0x51b53f._0x37a690,_0x51b53f._0x118251,0x420,0x3f8),'content':[{'type':_0x2bcb42(0x376,_0x51b53f._0xf7de08,0x388,0x3ad),'text':_0x23fff3}]};function _0x4d0fce(_0x20515b,_0xed9b01,_0x1ebb69,_0x11924f){return _0x4c1020(_0x11924f,_0xed9b01-_0x535d9f._0x3b8156,_0x1ebb69-_0x535d9f._0x5ce28b,_0x20515b- -_0x535d9f._0x2a8752);}function _0x2bcb42(_0x1223c9,_0x36ae3c,_0x4e8e8e,_0x55c2f1){return _0x249222(_0x1223c9-0xee,_0x1223c9-0x150,_0x4e8e8e,_0x55c2f1-0x2c);}return normalizeMessage(_0x23fff3);}function resolveChatModel(_0x47af67){const _0x344b47={_0x499f06:0xb8,_0x406875:0xb2,_0x4a184d:0x9b,_0x190b20:0x4b,_0x3d23d5:0xfc,_0x57f285:0x67},_0x25b617={_0x1f8044:0x99},_0x3abf80={_0x2cf2c8:0x70,_0x19c52f:0xeb};if(!_0x47af67[_0x1ed3e5(_0x344b47._0x499f06,0x83,_0x344b47._0x406875,0xcb)])throw new Error(_0x1ed3e5(_0x344b47._0x4a184d,0x100,_0x344b47._0x190b20,_0x344b47._0x3d23d5));function _0x1ed3e5(_0x482e7d,_0x8ad28f,_0x71bf0d,_0x2ec94e){return _0x4c1020(_0x2ec94e,_0x8ad28f-_0x3abf80._0x2cf2c8,_0x71bf0d-0x1a1,_0x482e7d- -_0x3abf80._0x19c52f);}function _0x3d4894(_0x4dcd88,_0x5b2824,_0x5b4750,_0x48b611){return _0x4c1020(_0x5b2824,_0x5b2824-0x2e,_0x5b4750-_0x25b617._0x1f8044,_0x48b611-0x120);}return _0x47af67[_0x1ed3e5(0xb8,0xe1,_0x344b47._0x57f285,0x11d)];}function createRegistry(_0x3d39bf){const _0x4df146={_0x3a419b:0x95,_0x5e62be:0x40,_0xdf5d32:0x70,_0x5e70e2:0x40,_0x53e580:0x2d,_0x1da440:0x74,_0x4c94d4:0x9c},_0x8dad18={_0x4b9ac9:0x8d,_0x171be0:0x15f},_0x53326b={_0xff18c4:0x187,_0x2b4f46:0x31f};if(_0x3d39bf[_0x2c33fc(-_0x4df146._0x3a419b,-0x6a,-_0x4df146._0x5e62be,-0x21)])return _0x3d39bf[_0x2c33fc(-0x93,-_0x4df146._0xdf5d32,-_0x4df146._0x5e70e2,_0x4df146._0x53e580)];const _0x432787=createExtensionRegistry();function _0x413712(_0x38143b,_0x19c65d,_0x225f78,_0x248b05){return _0x4c1020(_0x248b05,_0x19c65d-_0x53326b._0xff18c4,_0x225f78-0xbc,_0x19c65d- -_0x53326b._0x2b4f46);}const _0x4128f8=_0x3d39bf[_0x2c33fc(-0x33,-0xd5,-_0x4df146._0x1da440,-_0x4df146._0x4c94d4)]??[];for(const _0x3443f2 of _0x4128f8){_0x432787['register'](_0x3443f2);}function _0x2c33fc(_0x1992c8,_0x5e05a5,_0x369340,_0x5df790){return _0x249222(_0x1992c8-_0x8dad18._0x4b9ac9,_0x369340- -0x2fb,_0x5e05a5,_0x5df790-_0x8dad18._0x171be0);}return _0x432787;}var Agent=class{['_systemPrompt'];['deps'];['metrics'];['sessionId'];['messages'];[_0x4c1020(0x252,0x214,0x1c2,0x1f7)];['turnIndex'];constructor(_0x1e2c32={}){const _0x4b1b4d={_0x45e8ae:0x375,_0x1865de:0x35f,_0x354c49:0x35b,_0x4d2811:0x3fa,_0x702743:0x323,_0x3a9d7a:0x374,_0x3abe9d:0x33e,_0x4fca3d:0x3ca,_0x306d14:0x34f,_0x251f0a:0x2e7,_0xb8cf87:0x355,_0x55e535:0x3c6,_0x51849b:0x3ef,_0x201aeb:0x3d1,_0x22e23a:0x3ac,_0x3461a7:0x3b0,_0x32e59c:0x36d,_0x19ed39:0x3a5,_0x2c7889:0x3a2,_0x5e57fa:0x339,_0x2643ac:0x393,_0x4f33f8:0x39d,_0x20fba8:0x32e,_0x38ac82:0x3b1,_0x76a02:0x3ad,_0x3397da:0x30b,_0xd7d409:0x358,_0x13d063:0x2d9,_0x2adda0:0x335,_0x2f125a:0x31d,_0x25b6cd:0x30b,_0x2c55e9:0x353},_0x16845d={_0x48addd:0x1a7,_0x52bc47:0x1a3,_0x51d920:0x5ec,_0x1ba600:0x5e5},_0x1f89ea={_0x45513b:0x1a8,_0x2f8027:0x99},_0x448f92={_0x55c16d:0xf4},_0xf82bec={_0x274350:0x1e7,_0x58955d:0xd6,_0x57df2a:0x1d};function _0x538f08(_0x5c6614,_0x22d029,_0x276efd,_0x40477d){return _0x249222(_0x5c6614-_0xf82bec._0x274350,_0x22d029-_0xf82bec._0x58955d,_0x40477d,_0x40477d-_0xf82bec._0x57df2a);}this[_0x538f08(0x308,_0x4b1b4d._0x45e8ae,0x370,_0x4b1b4d._0x1865de)]=_0x1e2c32[_0x219f16(_0x4b1b4d._0x354c49,0x393,0x38f,_0x4b1b4d._0x4d2811)]??createSessionId();function _0x219f16(_0x2529ec,_0x891b82,_0x1c1412,_0x343487){return _0x249222(_0x2529ec-0xc5,_0x891b82-_0x448f92._0x55c16d,_0x1c1412,_0x343487-0x1d2);}this[_0x538f08(_0x4b1b4d._0x702743,_0x4b1b4d._0x3a9d7a,_0x4b1b4d._0x3abe9d,_0x4b1b4d._0x4fca3d)]=0x0,this[_0x219f16(_0x4b1b4d._0x306d14,0x326,_0x4b1b4d._0x251f0a,0x33a)]=_0x1e2c32[_0x538f08(0x365,0x380,0x3f0,_0x4b1b4d._0xb8cf87)]??'',this[_0x219f16(0x401,_0x4b1b4d._0x55e535,0x3db,0x3c1)]=(_0x1e2c32[_0x219f16(0x410,0x3c6,_0x4b1b4d._0x51849b,0x3a6)]??[])[_0x219f16(0x397,_0x4b1b4d._0x201aeb,_0x4b1b4d._0x22e23a,_0x4b1b4d._0x3461a7)](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x1e2c32[_0x538f08(0x39e,_0x4b1b4d._0x32e59c,_0x4b1b4d._0x19ed39,0x340)]),this[_0x219f16(0x38d,0x369,0x37f,_0x4b1b4d._0x2c7889)]=createAgentMetrics({'getContextWindowLimit':_0x1e2c32['getContextWindowLimit']});const _0x103d02=_0x1e2c32[_0x538f08(_0x4b1b4d._0x5e57fa,_0x4b1b4d._0x2643ac,_0x4b1b4d._0x4f33f8,_0x4b1b4d._0x20fba8)],_0x5a11c7=async(_0x29882a,_0x4eeafc)=>{const _0x12195b={_0x38cd82:0x1a3,_0x3ae647:0x24a,_0x4df49c:0x176};function _0x4ea4bf(_0x46b57b,_0xf37497,_0x50dd8b,_0x198f3c){return _0x538f08(_0x46b57b-_0x12195b._0x38cd82,_0x198f3c-_0x12195b._0x3ae647,_0x50dd8b-_0x12195b._0x4df49c,_0x46b57b);}function _0x4891f2(_0x4fa641,_0x56a56f,_0x4e957c,_0x5ea591){return _0x538f08(_0x4fa641-0x188,_0x5ea591- -_0x1f89ea._0x45513b,_0x4e957c-_0x1f89ea._0x2f8027,_0x4fa641);}this[_0x4891f2(0x137,0x1f9,_0x16845d._0x48addd,_0x16845d._0x52bc47)][_0x4ea4bf(_0x16845d._0x51d920,_0x16845d._0x1ba600,0x60e,0x5d9)](_0x29882a),await _0x103d02?.(_0x29882a,_0x4eeafc);},_0x4da763=createInternalToolRuntime(_0x1e2c32['tools']??[],{'onEvent':_0x5a11c7,'onToolCall':_0x1e2c32[_0x219f16(_0x4b1b4d._0x38ac82,0x34a,_0x4b1b4d._0x76a02,_0x4b1b4d._0x3397da)]});this['deps']={'registry':createRegistry(_0x1e2c32),'chatModel':resolveChatModel(_0x1e2c32),'toolRuntime':_0x4da763,'askUser':_0x1e2c32[_0x219f16(_0x4b1b4d._0xd7d409,0x332,0x36e,_0x4b1b4d._0x13d063)],'setTopic':_0x1e2c32[_0x219f16(_0x4b1b4d._0x2adda0,_0x4b1b4d._0x2f125a,_0x4b1b4d._0x25b6cd,_0x4b1b4d._0x2c55e9)],'onEvent':_0x5a11c7,'sessionDir':_0x1e2c32['sessionDir'],'outputFormat':_0x1e2c32['outputFormat']};}get[_0x4c1020(0x15a,0x195,0x179,0x1c8)](){const _0x8f9056={_0x50b0c4:0x4ed,_0x3356e4:0x4f7},_0x4ce08f={_0x5488a9:0x7f,_0x3524e6:0x2c5,_0x5b3c5e:0xc4};function _0x3c2a01(_0x10546a,_0x15e9d7,_0x2d6a3b,_0x2f8e41){return _0x249222(_0x10546a-_0x4ce08f._0x5488a9,_0x2d6a3b-_0x4ce08f._0x3524e6,_0x2f8e41,_0x2f8e41-_0x4ce08f._0x5b3c5e);}return this[_0x3c2a01(0x54d,_0x8f9056._0x50b0c4,_0x8f9056._0x3356e4,0x4f5)];}[_0x249222(0x2ff,0x2ae,0x261,0x29f)](_0x657713=[]){const _0x57af02={_0xf8a11d:0x4ea,_0x53c725:0x55d,_0x3e9caa:0x8e,_0x662626:0x7b,_0x29cab7:0x52},_0x547345={_0x66e3e2:0x16,_0x4e4460:0x212};function _0x35f9ed(_0x481341,_0x933b9a,_0x78139b,_0x5b53d5){return _0x249222(_0x481341-0x19c,_0x481341-0x31b,_0x5b53d5,_0x5b53d5-0x114);}function _0x5093d2(_0x3bfa43,_0x2de39a,_0x2182b0,_0x45024c){return _0x4c1020(_0x3bfa43,_0x2de39a-_0x547345._0x66e3e2,_0x2182b0-0x175,_0x45024c- -_0x547345._0x4e4460);}this[_0x35f9ed(0x52a,_0x57af02._0xf8a11d,0x4cb,_0x57af02._0x53c725)][_0x5093d2(-_0x57af02._0x3e9caa,-_0x57af02._0x662626,-0x25,-_0x57af02._0x29cab7)]['setTools'](_0x657713);}[_0x4c1020(0x219,0x1c0,0x26b,0x1ff)](){const _0x549ff7={_0x15d17f:0x9f,_0x4ef23f:0x49,_0x565936:0x11f,_0x37b158:0x119,_0x3bfe8a:0x12d},_0x20be30={_0x4b6d27:0x27,_0x305255:0x8e},_0x192a33={_0x499d65:0x195,_0x539c7a:0x1d7};function _0x28189a(_0x46b253,_0x4764df,_0x5b2460,_0x27c05c){return _0x4c1020(_0x27c05c,_0x4764df-_0x192a33._0x499d65,_0x5b2460-_0x192a33._0x539c7a,_0x46b253- -0xa1);}function _0x2ab675(_0x3b3cc5,_0x17f405,_0x2f9731,_0xd5aade){return _0x4c1020(_0x2f9731,_0x17f405-_0x20be30._0x4b6d27,_0x2f9731-0xbc,_0x3b3cc5- -_0x20be30._0x305255);}return this[_0x2ab675(_0x549ff7._0x15d17f,0x107,_0x549ff7._0x4ef23f,0x61)][_0x28189a(_0x549ff7._0x565936,_0x549ff7._0x37b158,_0x549ff7._0x3bfe8a,0x11e)]['listToolSchemas']();}[_0x4c1020(0x108,0xd9,0xd7,0x126)](_0x4defdc,_0x54ee4d={}){const _0x28e42c={_0x384f04:0xbf,_0x4db112:0xa1,_0x49b5c4:0xff,_0x5c04ef:0x44,_0x5027cf:0x7b,_0x10bea6:0xf1,_0x58e71d:0x76,_0x43df3a:0x15d,_0x2326a4:0x133},_0xaf15bb={_0x3b3fdd:0x74,_0x197388:0x2db},_0x469832={_0x41d149:0x16,_0x5793f9:0x1eb,_0x418c3a:0x91};function _0x215d91(_0x3053ac,_0x43efe3,_0x2846f1,_0x361cfd){return _0x4c1020(_0x361cfd,_0x43efe3-_0x469832._0x41d149,_0x2846f1-_0x469832._0x5793f9,_0x3053ac- -_0x469832._0x418c3a);}function _0x415b4b(_0x3d5020,_0x208e7f,_0x477879,_0x5c20f3){return _0x4c1020(_0x5c20f3,_0x208e7f-_0xaf15bb._0x3b3fdd,_0x477879-0x13,_0x208e7f- -_0xaf15bb._0x197388);}this[_0x215d91(_0x28e42c._0x384f04,0x72,_0x28e42c._0x4db112,_0x28e42c._0x49b5c4)]=_0x4defdc,_0x54ee4d[_0x215d91(0xa7,0x7f,_0x28e42c._0x5c04ef,0xad)]===!![]&&(this[_0x415b4b(-_0x28e42c._0x5027cf,-0xeb,-_0x28e42c._0x10bea6,-_0x28e42c._0x58e71d)]=[],this[_0x415b4b(-_0x28e42c._0x43df3a,-0x11f,-0xd9,-_0x28e42c._0x2326a4)]=0x0);}[_0x4c1020(0x1aa,0x149,0x1e3,0x173)](_0x384b8a){this['sessionId']=_0x384b8a;}[_0x4c1020(0x1fe,0x21c,0x203,0x1b3)](_0xec1ca0){const _0x23987b={_0x3bc79e:0x24b,_0x461baf:0x25e},_0x2030dd={_0x1c2b7e:0x7c},_0x3b37b3={_0x52013b:0x29};function _0x1d35e0(_0x7d1310,_0x111359,_0x2597fe,_0x17da0a){return _0x4c1020(_0x111359,_0x111359-0x1cb,_0x2597fe-_0x3b37b3._0x52013b,_0x7d1310- -0x1a7);}function _0x348ea5(_0x6adcc6,_0xa163ef,_0x1f243b,_0x3fe873){return _0x249222(_0x6adcc6-0xe0,_0x6adcc6-_0x2030dd._0x1c2b7e,_0x1f243b,_0x3fe873-0x1c1);}this[_0x348ea5(0x28b,_0x23987b._0x3bc79e,_0x23987b._0x461baf,0x236)][_0x1d35e0(-0x4,0x4,-0xf,-0x11)]=_0xec1ca0;}async[_0x4c1020(0x1df,0x1a0,0x1b7,0x1e9)](_0x3ef115=this['defaultMessage'],_0x4501f2={}){const _0x327bd9={_0x5c4c69:0x207,_0x3f26cf:0x1d6,_0x1b18bb:0x501,_0x144a16:0x4ba,_0x1bfcfc:0x4f2,_0xefb38d:0x50d,_0x374635:0x52c,_0x33ad86:0x4de,_0x2509f7:0x48f,_0xedca19:0x234,_0x438c87:0x29a,_0x9ef14c:0x59b,_0x270b60:0x4fe,_0x184f17:0x5a2,_0x315fc5:0x25c,_0x44fed5:0x29e,_0x6d538c:0x270,_0x19dd15:0x28f,_0x12d0ff:0x2c7,_0xb429ba:0x297,_0x38be73:0x1f3,_0x43e02c:0x21f,_0x25bc5e:0x1e9,_0x31e5c4:0x215},_0x4611c7={_0x2d8660:0x0},_0x597eef={_0x5dfc2d:0x1cc};function _0x14d983(_0xc80b15,_0x1af88b,_0x4f9ba4,_0x52cd8a){return _0x249222(_0xc80b15-_0x597eef._0x5dfc2d,_0x4f9ba4-0x26e,_0x1af88b,_0x52cd8a-0x62);}if(!_0x3ef115)throw new Error(_0xfad2be(0x1a0,0x1c1,0x1d0,_0x327bd9._0x5c4c69));this[_0xfad2be(0x228,_0x327bd9._0x3f26cf,0x1f2,0x206)]+=0x1;const _0x46707f=_0x4501f2[_0x14d983(_0x327bd9._0x1b18bb,0x433,0x4a9,0x491)];function _0xfad2be(_0x22c465,_0xeedfe4,_0x4f129d,_0x6927da){return _0x249222(_0x22c465-0x158,_0x22c465- -0x76,_0x4f129d,_0x6927da-_0x4611c7._0x2d8660);}try{const _0x2885ed=await runTurn({'sessionId':this[_0x14d983(_0x327bd9._0x144a16,_0x327bd9._0x1bfcfc,_0x327bd9._0xefb38d,_0x327bd9._0x374635)],'turnId':createTurnId(this[_0x14d983(0x4a9,_0x327bd9._0x33ad86,0x50c,0x4ba)]),'streaming':_0x4501f2[_0x14d983(0x4a0,_0x327bd9._0x2509f7,0x4bf,0x49b)],'signal':_0x4501f2[_0xfad2be(0x26a,0x29c,0x216,0x2ab)],'system':this[_0xfad2be(_0x327bd9._0xedca19,0x24e,0x23d,_0x327bd9._0x438c87)],'messages':this['messages'],'message':normalizeUserInput(_0x3ef115),..._0x46707f?{'drainSteering':async()=>(await _0x46707f())[_0xfad2be(0x267,0x2b4,0x252,0x282)](normalizeUserInput)}:{}},this['deps']);return this[_0x14d983(_0x327bd9._0x9ef14c,_0x327bd9._0x270b60,0x540,0x573)]=_0x2885ed['state'][_0x14d983(0x51b,0x50c,0x540,_0x327bd9._0x184f17)]['map'](normalizeMessage),_0x2885ed;}catch(_0x35b27a){if(_0x35b27a instanceof TurnFailedError){this[_0xfad2be(_0x327bd9._0x315fc5,0x234,_0x327bd9._0x44fed5,0x2a6)]=synthesizeMissingToolResults(_0x35b27a[_0xfad2be(_0x327bd9._0x6d538c,_0x327bd9._0x19dd15,_0x327bd9._0x12d0ff,_0x327bd9._0xb429ba)][_0xfad2be(0x25c,_0x327bd9._0x38be73,_0x327bd9._0x43e02c,0x2b2)]['map'](normalizeMessage));throw _0x35b27a[_0xfad2be(_0x327bd9._0x25bc5e,0x252,0x244,_0x327bd9._0x31e5c4)];}throw _0x35b27a;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,resolveToolPermissionClass,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};