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

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(_0x2b2484,_0x56ab98){var _0x58dfb5={_0x2372fd:0x228,_0x416331:0x222,_0x5aa8d4:0xb7,_0x2bd3b1:0xb7,_0x22c21d:0xb9,_0x2c6e90:0x229,_0x55f4dd:0x22b,_0x1f5946:0xb2,_0x1367dc:0x226,_0x4bfec0:0x22f,_0x26f428:0x226,_0x5c9172:0xb0,_0x1ae307:0xb4},_0x5b43e4={_0x516322:0x14e};function _0x4adc8f(_0x9b37a8,_0xa69c52,_0x3bc0bf,_0x19f3c6){return _0x5c2b(_0x3bc0bf-_0x5b43e4._0x516322,_0x9b37a8);}var _0x793fad=_0x2b2484();function _0x3a2029(_0x34c7d1,_0x3145c6,_0x4e79d0,_0x109acc){return _0x5c2b(_0x34c7d1- -0x20,_0x3145c6);}while(!![]){try{var _0x20134b=-parseInt(_0x4adc8f(_0x58dfb5._0x2372fd,_0x58dfb5._0x416331,0x227,0x225))/0x1*(parseInt(_0x3a2029(_0x58dfb5._0x5aa8d4,_0x58dfb5._0x2bd3b1,0xbe,_0x58dfb5._0x22c21d))/0x2)+parseInt(_0x4adc8f(_0x58dfb5._0x2c6e90,_0x58dfb5._0x55f4dd,0x22c,0x232))/0x3+-parseInt(_0x3a2029(0xb3,0xb0,0xba,0xb4))/0x4*(parseInt(_0x4adc8f(0x225,0x226,0x22b,0x226))/0x5)+-parseInt(_0x3a2029(0xb4,0xb3,_0x58dfb5._0x1f5946,0xb9))/0x6+parseInt(_0x4adc8f(_0x58dfb5._0x1367dc,0x223,0x228,_0x58dfb5._0x4bfec0))/0x7+parseInt(_0x4adc8f(0x22d,0x22c,0x226,0x224))/0x8*(parseInt(_0x4adc8f(_0x58dfb5._0x55f4dd,_0x58dfb5._0x26f428,0x229,0x228))/0x9)+-parseInt(_0x3a2029(0xb5,_0x58dfb5._0x5c9172,_0x58dfb5._0x1ae307,0xb7))/0xa;if(_0x20134b===_0x56ab98)break;else _0x793fad['push'](_0x793fad['shift']());}catch(_0x33af6a){_0x793fad['push'](_0x793fad['shift']());}}}(_0x2b9a,0x92787));function _0x2b9a(){var _0x57d223=['y29KzxG','mte1nduXnxrou0TpzW','mJi3nty3nhPZAKjAuG','yw50AhjVCgLJ','nfb6C0HeAa','nZa0nZK2yMTtshPY','ntK4mdeYmeXSDKP2ua','B3bLBMfP','nfvfv0npza','mJi5mti4vvbHAeHX','nde5odC4sMPvCM5u','nZK4ndm3nxryyuvJAG','mtuZtw1YA0vm'];_0x2b9a=function(){return _0x57d223;};return _0x2b9a();}function resolveAnthropicReasoningConfig(_0x5acd2){var _0x3e503a={_0x5067cc:0x365,_0x1134a1:0x36e,_0x1ec31c:0x36c,_0x1c8cd7:0x36b,_0x14312d:0x373},_0x5bf8fa={_0x2d63fb:0x1e1};function _0x2640de(_0x2cf8fd,_0xa4c7ea,_0x41961d,_0x1cf97d){return _0x5c2b(_0x41961d-_0x5bf8fa._0x2d63fb,_0x1cf97d);}function _0x5b42eb(_0xe498e9,_0x9c4c2b,_0x3fb829,_0x3bb7e2){return _0x5c2b(_0x9c4c2b-0x28d,_0x3bb7e2);}return _0x5acd2?.[_0x5b42eb(0x369,0x36c,_0x3e503a._0x5067cc,_0x3e503a._0x5067cc)]?structuredClone(_0x5acd2[_0x5b42eb(_0x3e503a._0x1134a1,_0x3e503a._0x1ec31c,_0x3e503a._0x1c8cd7,_0x3e503a._0x14312d)]):void 0x0;}function _0x5c2b(_0x479482,_0x4b62bf){_0x479482=_0x479482-0xd3;var _0x2b9a48=_0x2b9a();var _0x5c2b02=_0x2b9a48[_0x479482];if(_0x5c2b['IszTuS']===undefined){var _0x348524=function(_0x7fdbea){var _0x27175c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x5acd2='',_0x49e552='';for(var _0x34fae5=0x0,_0xe51db3,_0x4dd4a9,_0x268364=0x0;_0x4dd4a9=_0x7fdbea['charAt'](_0x268364++);~_0x4dd4a9&&(_0xe51db3=_0x34fae5%0x4?_0xe51db3*0x40+_0x4dd4a9:_0x4dd4a9,_0x34fae5++%0x4)?_0x5acd2+=String['fromCharCode'](0xff&_0xe51db3>>(-0x2*_0x34fae5&0x6)):0x0){_0x4dd4a9=_0x27175c['indexOf'](_0x4dd4a9);}for(var _0x2b0554=0x0,_0x5d033b=_0x5acd2['length'];_0x2b0554<_0x5d033b;_0x2b0554++){_0x49e552+='%'+('00'+_0x5acd2['charCodeAt'](_0x2b0554)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x49e552);};_0x5c2b['DaVqiQ']=_0x348524,_0x5c2b['IfNEMv']={},_0x5c2b['IszTuS']=!![];}var _0x14173a=_0x2b9a48[0x0],_0x45f819=_0x479482+_0x14173a,_0x5ee310=_0x5c2b['IfNEMv'][_0x45f819];return!_0x5ee310?(_0x5c2b02=_0x5c2b['DaVqiQ'](_0x5c2b02),_0x5c2b['IfNEMv'][_0x45f819]=_0x5c2b02):_0x5c2b02=_0x5ee310,_0x5c2b02;}function resolveOpenAiReasoningConfig(_0x49e552){var _0x3505a6={_0x563396:0x141,_0x54c69f:0x141,_0x56d0bd:0x13c,_0x12c32d:0x35,_0x4448b5:0x39,_0x3ec243:0x147,_0x5057e9:0x143,_0x4514de:0x31},_0xd47f2a={_0x26e2f2:0xa7};function _0x14e2b6(_0x3d7d60,_0x572137,_0x1185bc,_0x37fa3){return _0x5c2b(_0x3d7d60- -_0xd47f2a._0x26e2f2,_0x37fa3);}function _0x5e40dc(_0x2df12c,_0x2f103e,_0x56a9b9,_0xc9bf24){return _0x5c2b(_0x2df12c- -0x21d,_0x2f103e);}if(_0x49e552?.[_0x5e40dc(-_0x3505a6._0x563396,-_0x3505a6._0x54c69f,-_0x3505a6._0x56d0bd,-0x143)])return structuredClone(_0x49e552[_0x14e2b6(_0x3505a6._0x12c32d,0x36,_0x3505a6._0x4448b5,0x2f)]);return _0x49e552?.[_0x5e40dc(-_0x3505a6._0x3ec243,-_0x3505a6._0x5057e9,-_0x3505a6._0x3ec243,-0x141)]?structuredClone(_0x49e552[_0x14e2b6(0x2f,_0x3505a6._0x4514de,_0x3505a6._0x4514de,0x35)]):void 0x0;}export{resolveAnthropicReasoningConfig,resolveOpenAiReasoningConfig};
@@ -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(_0x482ce9,_0x54af5d){const _0x20ae14={_0x13954f:0x1fc,_0x43ed97:0x1b0,_0x10b289:0x199,_0x2bc1a5:0x1d6,_0x181a97:0x1ae,_0x186bee:0x36f,_0x3909b0:0x2dc,_0x447f09:0x198,_0x3a2638:0x18d,_0x4e332f:0x176,_0x204114:0xe5,_0x3130ca:0x13a,_0x48d5a0:0x10f,_0x557c12:0xea,_0x19fd07:0x251,_0x5ee3fe:0x2cb,_0x27e76b:0x15e,_0x35b7b5:0x360,_0x5d58c0:0x315,_0x4d8b6e:0x1d8,_0xef8a55:0x1d3,_0x1c4141:0x1dc,_0x4410a5:0x2b1,_0x4396b8:0x312,_0x59c349:0x290},_0x42d4a0={_0x46d6e0:0x275};function _0x5ad8f0(_0x230dc4,_0x5a7d09,_0x643bba,_0x4b93b8){return _0x17cd(_0x643bba- -_0x42d4a0._0x46d6e0,_0x4b93b8);}function _0x545934(_0x247145,_0x1c385e,_0x57a1f5,_0x4fbee2){return _0x17cd(_0x1c385e- -0x3d1,_0x4fbee2);}const _0x442a96=_0x482ce9();while(!![]){try{const _0x2e2169=-parseInt(_0x5ad8f0(-0x15e,-_0x20ae14._0x13954f,-_0x20ae14._0x43ed97,-0x1e4))/0x1*(-parseInt(_0x5ad8f0(-_0x20ae14._0x10b289,-0x187,-_0x20ae14._0x2bc1a5,-_0x20ae14._0x181a97))/0x2)+parseInt(_0x545934(-0x2c6,-0x300,-_0x20ae14._0x186bee,-_0x20ae14._0x3909b0))/0x3*(parseInt(_0x5ad8f0(-_0x20ae14._0x447f09,-_0x20ae14._0x3a2638,-_0x20ae14._0x4e332f,-0x139))/0x4)+parseInt(_0x5ad8f0(-_0x20ae14._0x204114,-_0x20ae14._0x3130ca,-_0x20ae14._0x48d5a0,-_0x20ae14._0x557c12))/0x5*(parseInt(_0x545934(-0x2d8,-0x275,-_0x20ae14._0x19fd07,-_0x20ae14._0x5ee3fe))/0x6)+parseInt(_0x5ad8f0(-0x1b4,-0x1be,-_0x20ae14._0x27e76b,-0x17d))/0x7+-parseInt(_0x545934(-_0x20ae14._0x35b7b5,-0x344,-0x2f5,-_0x20ae14._0x5d58c0))/0x8+-parseInt(_0x5ad8f0(-0x193,-0x16a,-0x194,-0x1d8))/0x9*(parseInt(_0x5ad8f0(-0x22e,-_0x20ae14._0x4d8b6e,-_0x20ae14._0xef8a55,-_0x20ae14._0x1c4141))/0xa)+-parseInt(_0x545934(-0x343,-0x2e8,-0x2a2,-0x311))/0xb*(parseInt(_0x545934(-_0x20ae14._0x4410a5,-0x2bb,-_0x20ae14._0x4396b8,-_0x20ae14._0x59c349))/0xc);if(_0x2e2169===_0x54af5d)break;else _0x442a96['push'](_0x442a96['shift']());}catch(_0x195d58){_0x442a96['push'](_0x442a96['shift']());}}}(_0x5168,0x88ebf));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 _0x17cd(_0x54642f,_0x2f0c8b){_0x54642f=_0x54642f-0x8a;const _0x5168ad=_0x5168();let _0x17cd7a=_0x5168ad[_0x54642f];if(_0x17cd['vgSqau']===undefined){var _0x12dc12=function(_0x4922e5){const _0x7b7680='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x48b440='',_0x3b94bf='';for(let _0x5ed594=0x0,_0x240539,_0x4e261,_0xc9410b=0x0;_0x4e261=_0x4922e5['charAt'](_0xc9410b++);~_0x4e261&&(_0x240539=_0x5ed594%0x4?_0x240539*0x40+_0x4e261:_0x4e261,_0x5ed594++%0x4)?_0x48b440+=String['fromCharCode'](0xff&_0x240539>>(-0x2*_0x5ed594&0x6)):0x0){_0x4e261=_0x7b7680['indexOf'](_0x4e261);}for(let _0x217389=0x0,_0x551682=_0x48b440['length'];_0x217389<_0x551682;_0x217389++){_0x3b94bf+='%'+('00'+_0x48b440['charCodeAt'](_0x217389)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3b94bf);};_0x17cd['jGQGMD']=_0x12dc12,_0x17cd['dxpmXb']={},_0x17cd['vgSqau']=!![];}const _0x2911f4=_0x5168ad[0x0],_0x245bb9=_0x54642f+_0x2911f4,_0x32c4f5=_0x17cd['dxpmXb'][_0x245bb9];return!_0x32c4f5?(_0x17cd7a=_0x17cd['jGQGMD'](_0x17cd7a),_0x17cd['dxpmXb'][_0x245bb9]=_0x17cd7a):_0x17cd7a=_0x32c4f5,_0x17cd7a;}function isJsonObject(_0x48b440){const _0x1993b1={_0x2df9fa:0x14f,_0x323ad1:0x152,_0x470584:0x203},_0xddbd63={_0x2ee812:0x14c};function _0x571555(_0x42d451,_0x4365d2,_0x383868,_0x5d901c){return _0x17cd(_0x42d451-_0xddbd63._0x2ee812,_0x383868);}function _0x3cab6a(_0x40f4d9,_0x28e27b,_0x1dcc9a,_0x1db780){return _0x17cd(_0x40f4d9- -0x253,_0x28e27b);}return typeof _0x48b440===_0x3cab6a(-_0x1993b1._0x2df9fa,-0x125,-_0x1993b1._0x323ad1,-0x157)&&_0x48b440!==null&&!Array[_0x571555(_0x1993b1._0x470584,0x1fc,0x245,0x25d)](_0x48b440);}function isToolOutputEnvelope(_0x3b94bf){const _0x2f4a34={_0x253c66:0x310,_0x58e66d:0x2eb,_0x24842d:0x310,_0xa32839:0x2ac,_0x59b579:0x29e,_0x24a6d7:0x312,_0x4822fb:0x353,_0x4f3436:0x418};if(typeof _0x3b94bf!==_0xd13712(_0x2f4a34._0x253c66,_0x2f4a34._0x58e66d,_0x2f4a34._0x24842d,_0x2f4a34._0xa32839)||_0x3b94bf===null||Array[_0xd13712(0x245,_0x2f4a34._0x59b579,0x238,0x309)](_0x3b94bf))return![];function _0x4a128e(_0xd1eabf,_0x595227,_0x5bf837,_0x2e7dc8){return _0x17cd(_0x5bf837-0x2c1,_0xd1eabf);}if(typeof _0x3b94bf[_0xd13712(0x338,0x2f7,0x2fc,0x28e)]!==_0x4a128e(_0x2f4a34._0x24a6d7,0x381,0x34c,0x2dd))return![];function _0xd13712(_0x3747f2,_0x33d98d,_0x5da4e9,_0x8b1873){return _0x17cd(_0x33d98d-0x1e7,_0x8b1873);}const _0x5ed594=_0x3b94bf[_0x4a128e(_0x2f4a34._0x4822fb,0x39c,0x3b5,_0x2f4a34._0x4f3436)];return _0x5ed594===void 0x0||isJsonObject(_0x5ed594);}function validateAgainstSchema(_0x240539,_0x4e261,_0xc9410b){const _0x121c18={_0x3529f8:0x96,_0x2ea3ab:0x6a,_0x2d777c:0x7,_0x478259:0x46,_0x23c359:0x2b,_0x45c2e6:0x436,_0x621779:0x44f,_0x336443:0x427,_0x1a8ccc:0x431,_0xa7ff2c:0x397,_0x5194ca:0x74,_0x2e9d4f:0x1d,_0x17dd14:0x4d,_0x2262c0:0x57,_0x98367a:0x1e,_0x1bf198:0x48b,_0x119f03:0x4d3,_0x5ea1dc:0x488,_0x16d8cd:0x4cb,_0x12981c:0x4ea,_0x491953:0x4a1,_0x453060:0x4e0,_0x55e926:0x440,_0x5ca778:0x3f6,_0x559033:0x424,_0x1401d1:0x3f7,_0x3bae47:0x13,_0x5290d5:0x31,_0x2f31de:0x495,_0x2431b7:0x45c,_0x425454:0xd,_0x83e457:0x3d,_0x457290:0x409,_0x52533f:0x44,_0x5921ad:0x44,_0x5f000d:0x8f,_0x4a5d57:0x3eb,_0x41fc76:0x38c,_0x39dc9c:0x436,_0x51cee9:0x3fc,_0x414f18:0x428,_0x5bfc61:0x3a,_0x271014:0x56,_0x4acf4a:0x3c8,_0x38f614:0x395,_0x4388a1:0x15,_0x54047f:0x6,_0x4a0571:0x4c6,_0x246f61:0x4ec,_0x2befc2:0x4b,_0x303ad9:0x50,_0x36c202:0x45,_0x74c1a:0xa0,_0x2aa935:0x41,_0x459c3a:0x4,_0x36e9f5:0x7b,_0x4a9db7:0x49,_0x5e06ac:0x74,_0x2ee002:0xa3,_0x59be77:0x434,_0x4258cc:0x3fa,_0xdc07f2:0x6f,_0x1e23d7:0x43,_0x515feb:0x19},_0x37f768={_0x56fa0c:0x366};function _0x491808(_0x23c1c7,_0xf1a236,_0xba5c0e,_0x505b4c){return _0x17cd(_0xba5c0e-_0x37f768._0x56fa0c,_0xf1a236);}function _0x51589b(_0x2d7f49,_0x5a4c28,_0x3215b6,_0x5c189c){return _0x17cd(_0x3215b6- -0x104,_0x5a4c28);}if(_0x51589b(-_0x121c18._0x3529f8,0x28,-0x46,-0x9b)in _0xc9410b){const _0x217389=_0xc9410b[_0x51589b(-_0x121c18._0x2ea3ab,-_0x121c18._0x2d777c,-_0x121c18._0x478259,-0x1a)][_0x51589b(-0x3a,_0x121c18._0x23c359,0x2e,0x10)](_0x551682=>{try{return validateAgainstSchema(_0x240539,_0x4e261,_0x551682),!![];}catch{return![];}});if(!_0x217389)throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x240539+_0x491808(_0x121c18._0x45c2e6,0x423,0x43a,0x3d9));return;}switch(_0xc9410b[_0x491808(_0x121c18._0x621779,_0x121c18._0x336443,0x471,_0x121c18._0x1a8ccc)]){case _0x491808(_0x121c18._0xa7ff2c,0x395,0x3f1,0x3a7):if(typeof _0x4e261!==_0x491808(0x427,0x3a9,0x3f1,0x45a))throw new Error(_0x51589b(-0xcb,-0xa0,-_0x121c18._0x5194ca,-0x93)+_0x240539+_0x51589b(0xf,-_0x121c18._0x2e9d4f,0x2b,_0x121c18._0x17dd14));if(_0xc9410b[_0x51589b(-0xd,_0x121c18._0x2262c0,_0x121c18._0x98367a,0x1c)]!==void 0x0&&!_0xc9410b[_0x491808(_0x121c18._0x1bf198,_0x121c18._0x119f03,_0x121c18._0x5ea1dc,_0x121c18._0x16d8cd)][_0x491808(_0x121c18._0x12981c,0x50d,_0x121c18._0x491953,_0x121c18._0x453060)](_0x4e261))throw new Error(_0x491808(_0x121c18._0x55e926,0x389,_0x121c18._0x5ca778,0x3a3)+_0x240539+':\x20expected\x20one\x20of\x20'+_0xc9410b[_0x491808(0x429,0x4f2,0x488,0x4ed)][_0x491808(_0x121c18._0x5ca778,_0x121c18._0x559033,_0x121c18._0x1401d1,0x439)](',\x20'));return;case _0x51589b(_0x121c18._0x3bae47,-_0x121c18._0x5290d5,-0xe,0x43):if(typeof _0x4e261!==_0x491808(_0x121c18._0x2f31de,0x48f,_0x121c18._0x2431b7,_0x121c18._0x1a8ccc))throw new Error(_0x51589b(-_0x121c18._0x425454,-0x56,-_0x121c18._0x5194ca,-0x3b)+_0x240539+_0x51589b(-0x12,-0x69,-_0x121c18._0x83e457,-0x55));return;case _0x491808(_0x121c18._0x457290,0x47f,0x412,0x443):if(typeof _0x4e261!==_0x51589b(-0x75,-_0x121c18._0x52533f,-0x58,0x7))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x240539+_0x51589b(-0x6e,0x3b,-0xa,_0x121c18._0x5921ad));return;case'array':if(!Array[_0x51589b(-0x3d,-0x26,-0x4d,-_0x121c18._0x5f000d)](_0x4e261))throw new Error(_0x491808(_0x121c18._0x4a5d57,_0x121c18._0x41fc76,0x3f6,_0x121c18._0x39dc9c)+_0x240539+':\x20expected\x20array');_0x4e261[_0x491808(0x44f,0x45f,_0x121c18._0x51cee9,_0x121c18._0x414f18)]((_0x3f1467,_0x1579f2)=>{validateAgainstSchema(_0x240539+'['+_0x1579f2+']',_0x3f1467,_0xc9410b['items']);});return;case _0x51589b(-0x6d,_0x121c18._0x5bfc61,0x0,_0x121c18._0x271014):if(!isJsonObject(_0x4e261))throw new Error(_0x491808(_0x121c18._0x4acf4a,_0x121c18._0x38f614,0x3f6,0x41b)+_0x240539+_0x51589b(0x24,-_0x121c18._0x4388a1,-_0x121c18._0x54047f,-0x56));for(const _0x4d524a of _0xc9410b[_0x491808(0x47d,0x52a,_0x121c18._0x4a0571,_0x121c18._0x246f61)]??[]){if(!Object[_0x51589b(_0x121c18._0x2befc2,-0x5,_0x121c18._0x303ad9,0x7)](_0x4e261,_0x4d524a))throw new Error(_0x51589b(-_0x121c18._0x36c202,-0xdb,-_0x121c18._0x5194ca,-_0x121c18._0x74c1a)+_0x240539+_0x51589b(-_0x121c18._0x4388a1,-0x8d,-0x51,-0xb6)+_0x4d524a+'\x22');}if(_0xc9410b['additionalProperties']===![]){const _0x166c2a=Object['keys'](_0x4e261)[_0x51589b(_0x121c18._0x2aa935,0x3,-_0x121c18._0x459c3a,0x34)](_0x2b143e=>!Object[_0x491808(0x51a,0x49d,0x4ba,0x451)](_0xc9410b[_0x51589b(-0xd,-0x7b,-0x61,-0xca)],_0x2b143e));if(_0x166c2a!==void 0x0)throw new Error(_0x51589b(-_0x121c18._0x36e9f5,-_0x121c18._0x4a9db7,-_0x121c18._0x5e06ac,-0xd7)+_0x240539+_0x51589b(-0x73,-0x66,-_0x121c18._0x52533f,-_0x121c18._0x2ee002)+_0x166c2a+'\x22');}for(const [_0x23fce1,_0x21b1cb]of Object[_0x491808(_0x121c18._0x1a8ccc,0x427,_0x121c18._0x59be77,_0x121c18._0x4258cc)](_0xc9410b[_0x51589b(-0x31,-_0x121c18._0xdc07f2,-0x61,-_0x121c18._0x1e23d7)])){Object[_0x51589b(0x4e,-_0x121c18._0x515feb,_0x121c18._0x303ad9,0x8d)](_0x4e261,_0x23fce1)&&validateAgainstSchema(_0x240539+'.'+_0x23fce1,_0x4e261[_0x23fce1],_0x21b1cb);}}}function normalizeToolOutputValue(_0x3a81d1){const _0x25bb3d={_0x393e0e:0x117,_0x7f8d30:0xc8,_0x1902dd:0x18,_0x849dbe:0x113,_0x425c3c:0x195,_0x8825fd:0x117,_0x24e3ac:0x9f,_0x1c5eb4:0x6c,_0x1f622a:0x22,_0x1ac0a1:0x73,_0x67ef8:0x44,_0x3a281a:0xaf},_0x6c1c44={_0x498d7a:0x227},_0x202f49={_0x5c074a:0x12a};function _0x385656(_0x44a9f2,_0x56c9c1,_0xd21a47,_0x270136){return _0x17cd(_0x56c9c1- -_0x202f49._0x5c074a,_0x270136);}if(isToolOutputEnvelope(_0x3a81d1))return{'output':_0x3a81d1[_0xcd107f(-0x178,-_0x25bb3d._0x393e0e,-_0x25bb3d._0x7f8d30,-0xc7)],'structured':_0x3a81d1[_0x385656(-_0x25bb3d._0x1902dd,-0x36,0x7,-0x5f)]??{'value':_0x3a81d1[_0xcd107f(-0x142,-_0x25bb3d._0x393e0e,-0xb9,-0xc8)]},..._0x3a81d1[_0xcd107f(-_0x25bb3d._0x849dbe,-0x177,-_0x25bb3d._0x425c3c,-_0x25bb3d._0x8825fd)]!==void 0x0?{'content':_0x3a81d1[_0xcd107f(-0x1b8,-0x177,-0x111,-0x16e)]}:{}};if(typeof _0x3a81d1===_0x385656(-0xa9,-_0x25bb3d._0x24e3ac,-_0x25bb3d._0x1c5eb4,-0x74))return{'output':_0x3a81d1,'structured':{'value':_0x3a81d1}};function _0xcd107f(_0x5a979f,_0x27f652,_0x27e9e6,_0x304a27){return _0x17cd(_0x27f652- -_0x6c1c44._0x498d7a,_0x304a27);}if(typeof _0x3a81d1==='object'&&_0x3a81d1!==null&&!Array[_0x385656(-0x81,-0x73,-_0x25bb3d._0x1f622a,-_0x25bb3d._0x1ac0a1)](_0x3a81d1))return{'output':JSON['stringify'](_0x3a81d1,null,0x2),'structured':_0x3a81d1};return{'output':JSON[_0x385656(0x20,-_0x25bb3d._0x67ef8,0x26,-_0x25bb3d._0x3a281a)](_0x3a81d1,null,0x2),'structured':{'value':_0x3a81d1}};}function createToolOutput(_0x5e404a,_0x32e935={'value':_0x5e404a},_0x14e416){return{'output':_0x5e404a,'structured':_0x32e935,..._0x14e416!==void 0x0?{'content':_0x14e416}:{}};}var ToolExecutionError=class extends Error{[_0x3b29bd(0x336,0x323,0x32b,0x32c)];constructor(_0xf2999d,_0x4265f7={}){super(_0xf2999d),this['name']='ToolExecutionError',this['structured']=_0x4265f7;}};function _0x3b29bd(_0x5c5954,_0x19bf1a,_0x22c8f3,_0x3e9d98){const _0xd4e10a={_0x45278b:0x238};return _0x17cd(_0x3e9d98-_0xd4e10a._0x45278b,_0x19bf1a);}function defineTool(_0xe1386c){return _0xe1386c;}function resolveToolPermissionClass(_0xcde63f){const _0x53c6a5={_0x37a604:0x24c,_0x426230:0x250,_0x11daea:0x3c4,_0x15c896:0x35f,_0x17885c:0x376,_0x276c1b:0x37b,_0x5c1191:0x278},_0x32e619={_0x15d5b8:0x7f,_0x2581aa:0x1bd},_0x28a125={_0x2c892a:0x55},_0x344709=_0xcde63f?.[_0x66565(0x20a,_0x53c6a5._0x37a604,0x214,_0x53c6a5._0x426230)];if(_0x344709===_0x3fdbe5(0x35a,0x32f,0x3b6,0x35e)||_0x344709===_0x3fdbe5(_0x53c6a5._0x11daea,_0x53c6a5._0x15c896,_0x53c6a5._0x17885c,_0x53c6a5._0x276c1b)||_0x344709===_0x66565(_0x53c6a5._0x5c1191,0x2db,0x275,0x248))return _0x344709;function _0x3fdbe5(_0x2b4c5b,_0x4f3eb2,_0x23445c,_0x5bc71a){return _0x3b29bd(_0x2b4c5b-0x7d,_0x5bc71a,_0x23445c-0xe4,_0x2b4c5b-_0x28a125._0x2c892a);}function _0x66565(_0x316c3d,_0x6b4e6,_0x1991da,_0x3c49aa){return _0x3b29bd(_0x316c3d-_0x32e619._0x15d5b8,_0x3c49aa,_0x1991da-_0x32e619._0x2581aa,_0x1991da- -0x120);}return'always-confirm';}var ToolRegistry=class{[_0x1f4b8d(-0x1e7,-0x244,-0x23c,-0x207)]=new Map();constructor(_0x357c81=[]){const _0xe784f4={_0x2d59d7:0x254,_0x326aaf:0x1f2},_0x229fa7={_0xdfcdb8:0x573};function _0x3fdec5(_0x5666fd,_0x298d6e,_0x2e0e9f,_0x1e3902){return _0x3b29bd(_0x5666fd-0x3a,_0x5666fd,_0x2e0e9f-0x56,_0x298d6e- -_0x229fa7._0xdfcdb8);}for(const _0x5ca413 of _0x357c81){this[_0x3fdec5(-_0xe784f4._0x2d59d7,-_0xe784f4._0x326aaf,-0x256,-0x1b0)](_0x5ca413);}}[_0x1f4b8d(-0x1d2,-0x1e0,-0x182,-0x16a)](_0x5a457c){const _0x1c3458={_0x3b904b:0x13e,_0x253c39:0x1bc,_0x385f46:0xa9,_0x5ce19b:0x76,_0x218e87:0x61,_0x4cd63b:0x24c,_0x38c2d8:0x23d,_0x4c22b3:0x2ae},_0x2a714c={_0x5dfa7b:0x16d,_0x441d5a:0xd8},_0x489cff={_0x45bb30:0x14a,_0x18b95d:0x3c6,_0x482ba6:0x1aa};function _0x426f36(_0x3706de,_0x41be39,_0x536127,_0x4e289f){return _0x1f4b8d(_0x536127,_0x41be39-_0x489cff._0x45bb30,_0x3706de-_0x489cff._0x18b95d,_0x4e289f-_0x489cff._0x482ba6);}function _0x4ba5e4(_0x590fc0,_0x1f252b,_0x443250,_0x38e329){return _0x1f4b8d(_0x443250,_0x1f252b-_0x2a714c._0x5dfa7b,_0x1f252b-_0x2a714c._0x441d5a,_0x38e329-0x182);}this[_0x4ba5e4(-0x1a0,-0x164,-_0x1c3458._0x3b904b,-_0x1c3458._0x253c39)][_0x4ba5e4(-0x10a,-_0x1c3458._0x385f46,-_0x1c3458._0x5ce19b,-_0x1c3458._0x218e87)](_0x5a457c[_0x426f36(_0x1c3458._0x4cd63b,0x2b1,_0x1c3458._0x38c2d8,_0x1c3458._0x4c22b3)],_0x5a457c);}['get'](_0x2ca77d){const _0x5f02da={_0x5022f8:0x93},_0xcce628={_0x3a1491:0x18d,_0x489eba:0x35a};function _0x559991(_0x5c1ce3,_0x42dd91,_0x26a4e0,_0x5bc4b9){return _0x3b29bd(_0x5c1ce3-0x153,_0x5bc4b9,_0x26a4e0-_0xcce628._0x3a1491,_0x5c1ce3- -_0xcce628._0x489eba);}return this[_0x559991(-_0x5f02da._0x5022f8,-0xc4,-0x3c,-0xca)]['get'](_0x2ca77d);}[_0x1f4b8d(-0x24c,-0x1db,-0x22d,-0x1c4)](){return[...this['toolsByName']['values']()];}['listToolSchemas'](){const _0xb9ff41={_0x4b467b:0x21f,_0x26259e:0x253,_0x1ec454:0x219,_0x14e492:0x23c},_0x9a0acd={_0x18032f:0xc4,_0x22f28b:0x30,_0x67b29e:0x3b,_0x1ac275:0x1,_0x111f9a:0x1c},_0x55d3cb={_0x23590d:0x1ca};function _0x103534(_0x555534,_0x5c284d,_0x39111e,_0x3b2fd3){return _0x3b29bd(_0x555534-0x130,_0x555534,_0x39111e-_0x55d3cb._0x23590d,_0x3b2fd3-0x76);}function _0x5674ba(_0x2750f9,_0x1eb330,_0x55807a,_0x365820){return _0x1f4b8d(_0x55807a,_0x1eb330-0xbd,_0x365820-0x3e3,_0x365820-0x168);}return this[_0x5674ba(0x181,_0xb9ff41._0x4b467b,0x21f,0x1b6)]()[_0x5674ba(_0xb9ff41._0x26259e,0x29b,_0xb9ff41._0x1ec454,_0xb9ff41._0x14e492)](_0x4c63a4=>{const _0x2b67ee={_0x460796:0x1b2};function _0x238393(_0x668b46,_0x54cefe,_0x296369,_0xb33bed){return _0x5674ba(_0x668b46-0xf5,_0x54cefe-0x147,_0xb33bed,_0x296369- -0x222);}function _0x378381(_0x5a637e,_0x42b113,_0x51aa17,_0x4d926e){return _0x103534(_0x5a637e,_0x42b113-0x7d,_0x51aa17-_0x2b67ee._0x460796,_0x4d926e- -0x4f1);}return{'name':_0x4c63a4['name'],'description':_0x4c63a4[_0x378381(-_0x9a0acd._0x18032f,-0xd8,-0x178,-0x110)],'input_schema':_0x4c63a4[_0x238393(-_0x9a0acd._0x22f28b,-_0x9a0acd._0x67b29e,-_0x9a0acd._0x1ac275,-_0x9a0acd._0x111f9a)]};});}};function validateToolInput(_0x3b7fc4,_0x481d99){const _0x29c6cd={_0x522fcb:0x95};function _0x10f428(_0x5a55cd,_0x20125c,_0x467c9c,_0x2c9f49){return _0x3b29bd(_0x5a55cd-0x18,_0x20125c,_0x467c9c-_0x29c6cd._0x522fcb,_0x2c9f49- -0x2be);}return validateAgainstSchema(_0x10f428(0x56,0x47,0xe1,0x7b),_0x3b7fc4,_0x481d99),_0x3b7fc4;}function deriveFinalToolOutput(_0x2f9b5d){const _0x2628a2={_0x29e7e2:0xc0,_0x5a6273:0x93,_0x5331af:0x1b,_0x51f6d4:0xbc,_0x50a43b:0x4b,_0xef555c:0xb,_0x4e042a:0x3f,_0x3cfbd3:0x2d,_0x412cc2:0x53,_0x13252d:0xa0,_0x243149:0xec,_0x48cda4:0x2,_0x275a4d:0x4c,_0x3a8b93:0x137,_0x23dea2:0x39},_0x3edb84={_0x557ca4:0x11b},_0x169241={_0xd8935b:0x17,_0x314fb8:0x1d0,_0x18f00d:0x1ae};if(_0x2f9b5d[_0x141a1a(-0x159,-0xec,-_0x2628a2._0x29e7e2,-0xca)]===0x0)return{'output':'','structured':{}};function _0x131127(_0x569434,_0x373f86,_0xea0e1a,_0x36f5f0){return _0x1f4b8d(_0x373f86,_0x373f86-_0x169241._0xd8935b,_0x569434-_0x169241._0x314fb8,_0x36f5f0-_0x169241._0x18f00d);}if(_0x2f9b5d[_0x131127(-0x37,0x31,-_0x2628a2._0x5a6273,_0x2628a2._0x5331af)]===0x1)return{'output':_0x2f9b5d[0x0]['output'],'structured':_0x2f9b5d[0x0][_0x141a1a(-0xdb,-_0x2628a2._0x51f6d4,-0xab,-0xcb)],..._0x2f9b5d[0x0]['content']!==void 0x0?{'content':_0x2f9b5d[0x0][_0x131127(-_0x2628a2._0x50a43b,-0xb9,-_0x2628a2._0xef555c,-0x78)]}:{}};function _0x141a1a(_0x33f20d,_0x42d3f0,_0x1ee42,_0x40f139){return _0x1f4b8d(_0x1ee42,_0x42d3f0-0x125,_0x42d3f0-_0x3edb84._0x557ca4,_0x40f139-0x13c);}const _0x2f4664=_0x2f9b5d[_0x131127(-_0x2628a2._0x4e042a,-0xa8,-0x2b,-_0x2628a2._0x3cfbd3)](_0x3424b0=>_0x3424b0[_0x131127(-0x4b,-0x82,-0x36,-0x3e)]!==void 0x0);return{'output':_0x2f9b5d[_0x141a1a(-_0x2628a2._0x412cc2,-0x8c,-_0x2628a2._0x13252d,-_0x2628a2._0x243149)](_0x3724e7=>_0x3724e7[_0x131127(0x15,0x34,0x4a,-0x5)])['join'](''),'structured':{'chunks':_0x2f9b5d[_0x131127(0x29,_0x2628a2._0x48cda4,-0x2e,_0x2628a2._0x275a4d)](_0x11c858=>_0x11c858[_0x141a1a(-0x64,-0xbc,-0xcc,-0x81)])},..._0x2f4664[_0x141a1a(-0xaf,-0xec,-0x117,-_0x2628a2._0x3a8b93)]===0x1?{'content':_0x2f4664[0x0][_0x131127(-0x4b,-0x10,-0x54,-_0x2628a2._0x23dea2)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x5a74c7,_0x557868,_0x3ae02f,_0x5a0c85=[]){const _0x505541={_0x4bd806:0x2fd,_0x2ee9fb:0x305,_0x3a74df:0x2f0,_0x5036a1:0x2b5,_0x5254ab:0x24b},_0x6abfb0={_0x13e4c9:0xa6,_0x267979:0x2c,_0x370f52:0x113},_0x2f5a27={_0x334b8e:0x6,_0xd4155:0x86};function _0xba6972(_0x33a64e,_0x4f82aa,_0x1a616c,_0x1088fd){return _0x3b29bd(_0x33a64e-_0x2f5a27._0x334b8e,_0x4f82aa,_0x1a616c-0x1b,_0x1a616c- -_0x2f5a27._0xd4155);}function _0x1d2539(_0x40a719,_0x29e9f7,_0xc84390,_0x53a0cc){return _0x1f4b8d(_0x53a0cc,_0x29e9f7-_0x6abfb0._0x13e4c9,_0x40a719-_0x6abfb0._0x267979,_0x53a0cc-_0x6abfb0._0x370f52);}return{'callId':_0x5a74c7['id'],'toolName':_0x5a74c7[_0xba6972(_0x505541._0x4bd806,_0x505541._0x2ee9fb,0x303,_0x505541._0x3a74df)],'status':_0xba6972(_0x505541._0x5036a1,0x260,_0x505541._0x5254ab,0x27c),'output':_0x557868,'structured':_0x3ae02f,'chunks':_0x5a0c85,'meta':createToolMeta()};}function createRejectedToolResult(_0x20a0ec,_0x4bb2e3){const _0x45479b={_0x1f02f8:0x3c8,_0x140a1b:0x389,_0x4ae4af:0x421,_0x254d2a:0x3a9,_0x8b8b4:0x34e,_0x2528b5:0x385,_0xed8e8d:0x415,_0xed4fdd:0x3f7,_0x532db4:0x3a9,_0x560441:0x403},_0x187831={_0x554800:0x5e8},_0x5e52bb=_0x4bb2e3?.[_0x93f009(_0x45479b._0x1f02f8,_0x45479b._0x140a1b,_0x45479b._0x4ae4af,0x3f2)]()[_0x5a6ce9(_0x45479b._0x254d2a,0x3c9,_0x45479b._0x8b8b4,0x33a)]?_0x4bb2e3:_0x5a6ce9(_0x45479b._0x2528b5,0x320,0x338,0x386)+_0x20a0ec['name'];function _0x5a6ce9(_0x176f06,_0x479988,_0x40fbf8,_0x4d5f46){return _0x1f4b8d(_0x40fbf8,_0x479988-0x1e2,_0x176f06-0x5b0,_0x4d5f46-0xc6);}function _0x93f009(_0xb05b65,_0x431b89,_0x5693af,_0x5afb32){return _0x1f4b8d(_0x431b89,_0x431b89-0xc9,_0x5afb32-_0x187831._0x554800,_0x5afb32-0x9f);}return createErrorToolResult(_0x20a0ec,_0x5e52bb,{'error':_0x5a6ce9(0x39e,0x3dc,0x3a4,0x334),..._0x4bb2e3?.[_0x5a6ce9(0x3ba,_0x45479b._0xed8e8d,_0x45479b._0xed4fdd,0x36c)]()[_0x5a6ce9(_0x45479b._0x532db4,0x3b4,0x407,_0x45479b._0x560441)]?{'reason':_0x4bb2e3}:{}});}function createAbortedToolResult(_0x92be65,_0x19d7c8,_0x13b479=[]){const _0x3920d8={_0x280e81:0x255},_0x17175f={_0x51f149:0x64,_0x464d11:0x383,_0x47cbf9:0x10f},_0x3ea8c0=toAbortError(_0x19d7c8);function _0x36ca17(_0x3efb7e,_0x348766,_0x3a5670,_0x38c0d0){return _0x1f4b8d(_0x3efb7e,_0x348766-_0x17175f._0x51f149,_0x38c0d0-_0x17175f._0x464d11,_0x38c0d0-_0x17175f._0x47cbf9);}return createErrorToolResult(_0x92be65,_0x3ea8c0[_0x36ca17(0x1b5,_0x3920d8._0x280e81,0x197,0x1fa)],{'error':_0x3ea8c0['message'],'aborted':!![]},_0x13b479);}function createSuccessToolResult(_0x55091a,_0xb4e3e9,_0x680e74){const _0x5eee56={_0xfb5f3d:0x2fb,_0x58fbe3:0x32c,_0x3ff5b4:0x2cf,_0x3336c7:0x2e4,_0x9d2cdb:0x2df,_0xa306a0:0x3a9,_0x4c381f:0x3df,_0x193cce:0x374,_0x2c1be8:0x2cd,_0x258c10:0x2d9},_0x1456e4={_0xb9bc1:0x1e5,_0x385333:0x10c,_0x19e76a:0x8e},_0x4dc42c={_0x66e87a:0xef,_0x463bdd:0xbb,_0x4bad0d:0x51};function _0x1f99f3(_0x4915de,_0x9b2058,_0x38d571,_0x16d488){return _0x3b29bd(_0x4915de-_0x4dc42c._0x66e87a,_0x38d571,_0x38d571-_0x4dc42c._0x463bdd,_0x16d488-_0x4dc42c._0x4bad0d);}function _0x4f6c21(_0x28a0d2,_0x32a247,_0x563294,_0x330d20){return _0x3b29bd(_0x28a0d2-_0x1456e4._0xb9bc1,_0x32a247,_0x563294-_0x1456e4._0x385333,_0x28a0d2- -_0x1456e4._0x19e76a);}return{'callId':_0x55091a['id'],'toolName':_0x55091a[_0x4f6c21(_0x5eee56._0xfb5f3d,0x313,_0x5eee56._0x58fbe3,_0x5eee56._0x3ff5b4)],'status':'ok','output':_0xb4e3e9[_0x4f6c21(0x2ba,0x327,_0x5eee56._0x3336c7,_0x5eee56._0x9d2cdb)],'structured':_0xb4e3e9[_0x1f99f3(_0x5eee56._0xa306a0,0x3e0,_0x5eee56._0x4c381f,0x37d)],..._0xb4e3e9[_0x1f99f3(_0x5eee56._0x193cce,_0x5eee56._0x2c1be8,_0x5eee56._0x258c10,0x339)]!==void 0x0?{'content':_0xb4e3e9['content']}:{},'chunks':_0x680e74,'meta':createToolMeta()};}function createUnknownToolResult(_0x2c8e98){const _0x2d3528={_0x3f3c83:0x199,_0x1f6f81:0x13b,_0xdc8e4f:0x174},_0x324ec5={_0x1724a8:0x319},_0x3087f6={_0x1265e9:0xd,_0x54bbe2:0xe4};function _0x41e098(_0x23bda4,_0x5447a3,_0x239776,_0x17c476){return _0x1f4b8d(_0x5447a3,_0x5447a3-_0x3087f6._0x1265e9,_0x17c476-0x34b,_0x17c476-_0x3087f6._0x54bbe2);}function _0x53e804(_0x473c93,_0x2b516e,_0x336447,_0x53a64){return _0x1f4b8d(_0x336447,_0x2b516e-0x75,_0x2b516e-_0x324ec5._0x1724a8,_0x53a64-0xa4);}return createErrorToolResult(_0x2c8e98,_0x53e804(0x12a,_0x2d3528._0x3f3c83,0x1f5,0x179)+_0x2c8e98['name'],{'error':_0x53e804(0x142,_0x2d3528._0x1f6f81,_0x2d3528._0xdc8e4f,0x19a)});}function isDispatchDecision(_0x243faa){const _0x4a30d3={_0x7e1548:0x49,_0x529822:0xc7,_0x470fdd:0x85,_0x61cee1:0x65,_0x7a9e1e:0x83,_0x1dfde5:0x2b},_0x231d32={_0x27475c:0x36,_0x521038:0x385},_0x5c863b={_0x3c8422:0x1a9,_0x5a135d:0xa7};if(typeof _0x243faa!==_0xc4df44(-0x1a,-_0x4a30d3._0x7e1548,-0x4e,0x1)||_0x243faa===null)return![];function _0x4977e7(_0x46334b,_0x28bec1,_0x1803fd,_0x4bd7){return _0x1f4b8d(_0x1803fd,_0x28bec1-_0x5c863b._0x3c8422,_0x4bd7- -_0x5c863b._0x5a135d,_0x4bd7-0x137);}function _0xc4df44(_0x3b0478,_0x267616,_0x293ca3,_0x3359ef){return _0x3b29bd(_0x3b0478-0x41,_0x3359ef,_0x293ca3-_0x231d32._0x27475c,_0x267616- -_0x231d32._0x521038);}return _0x243faa['action']===_0xc4df44(-_0x4a30d3._0x529822,-_0x4a30d3._0x470fdd,-_0x4a30d3._0x61cee1,-0x48)||_0x243faa['action']===_0xc4df44(-0xb0,-_0x4a30d3._0x7a9e1e,-0x63,-_0x4a30d3._0x1dfde5);}function normalizeExecutionError(_0x28b505){const _0x194aa5={_0x5f0dba:0xcc,_0x526d11:0x125,_0x5123e3:0xd3,_0x2cf5bf:0xed,_0xf692eb:0x18f,_0xeeae19:0x179,_0x3f0d46:0xfa,_0x595915:0xeb,_0x4c13dc:0x121,_0x1a9e31:0x1c8,_0x228915:0x1b9,_0x1d9252:0x124,_0x1c9d11:0x18e,_0x1c4704:0x193,_0x2b01f1:0x14d},_0x34431a={_0x18357e:0x1c8},_0x230b4b={_0x4a78ac:0x171,_0x15876d:0xed,_0x579330:0xb3};if(_0x28b505 instanceof ToolExecutionError)return{'errorMessage':_0x28b505[_0x1ede02(-0xc4,-0x124,-_0x194aa5._0x5f0dba,-_0x194aa5._0x526d11)],'structured':{'error':_0x28b505[_0x1ede02(-_0x194aa5._0x5123e3,-0x124,-_0x194aa5._0x2cf5bf,-_0x194aa5._0xf692eb)],..._0x28b505[_0x1ede02(-_0x194aa5._0xeeae19,-0x172,-0x13d,-0x14c)]}};if(_0x28b505 instanceof Error)return{'errorMessage':_0x28b505['message'],'structured':{'error':_0x28b505[_0x1ede02(-_0x194aa5._0x3f0d46,-0x124,-_0x194aa5._0x595915,-0x153)]}};if(typeof _0x28b505===_0x1ede02(-_0x194aa5._0x4c13dc,-0x162,-_0x194aa5._0x1a9e31,-_0x194aa5._0x228915)&&_0x28b505!==null&&'message'in _0x28b505&&typeof _0x28b505[_0x1ede02(-0x13b,-_0x194aa5._0x1d9252,-_0x194aa5._0x1c9d11,-0x185)]===_0x1ede02(-0x1aa,-0x1db,-_0x194aa5._0x1c4704,-0x246))return{'errorMessage':_0x28b505[_0x1ede02(-0x167,-_0x194aa5._0x1d9252,-_0x194aa5._0x2b01f1,-0x18d)],'structured':{'error':_0x28b505['message']}};const _0x47ec6d=String(_0x28b505);function _0x24e6ab(_0x54efb3,_0x1e41d6,_0x29f7d6,_0x186508){return _0x3b29bd(_0x54efb3-_0x230b4b._0x4a78ac,_0x1e41d6,_0x29f7d6-_0x230b4b._0x15876d,_0x29f7d6- -_0x230b4b._0x579330);}function _0x1ede02(_0x26cc6f,_0x591fbb,_0x31dd89,_0x1d5483){return _0x3b29bd(_0x26cc6f-0x17e,_0x31dd89,_0x31dd89-_0x34431a._0x18357e,_0x591fbb- -0x49e);}return{'errorMessage':_0x47ec6d,'structured':{'error':_0x47ec6d}};}async function emitEvent(_0x49f28a,_0x1d8b3d,_0x213c64){await _0x49f28a?.(_0x1d8b3d,_0x213c64);}async function resolveDispatchDecision(_0x26f6a8,_0x1b7d84,_0x1b24af){const _0x126ce8={_0x4da227:0x10f,_0x277713:0x104,_0x183833:0x111,_0x2f2129:0x3e,_0x2a0b80:0x90,_0x1a9d5b:0x92,_0x54da85:0xb1,_0x50be6f:0xd0,_0x3e66f7:0x110,_0x32b136:0xb9,_0x2208fe:0xc7},_0x28db75={_0x570690:0x1b2,_0x556590:0x208,_0x46a5a5:0x3,_0x1eb86f:0x26,_0x52f976:0x3f,_0x396793:0x79,_0x519809:0x37},_0x32f51d={_0x4fe5c1:0x42c,_0x152e05:0x48f,_0x181dad:0x494,_0x3b7d31:0x2e0,_0x483891:0x4c5},_0x5f10e7={_0x56d251:0x1ed,_0x198ec8:0x300},_0x731f54={_0xc0d9a2:0x1e4};if(!_0x26f6a8)return{'action':_0x1390b9(-_0x126ce8._0x4da227,-0x123,-0x11a,-0xd0)};const _0x1ddb71=Promise[_0x572be9(_0x126ce8._0x277713,0x9a,_0x126ce8._0x183833,0x135)]()[_0x1390b9(-0xbd,-0xc8,-_0x126ce8._0x2f2129,-_0x126ce8._0x2a0b80)](()=>_0x26f6a8(_0x1b7d84,_0x1b24af));if(!_0x1b24af[_0x1390b9(-0xaa,-0xe7,-0x131,-0xed)]){const _0xbf7dc4=await _0x1ddb71;return isDispatchDecision(_0xbf7dc4)?_0xbf7dc4:{'action':_0x1390b9(-_0x126ce8._0x1a9d5b,-_0x126ce8._0x54da85,-0x7e,-_0x126ce8._0x50be6f)};}function _0x1390b9(_0x56a66a,_0x27c8b3,_0x33712e,_0x2d50b6){return _0x1f4b8d(_0x56a66a,_0x27c8b3-_0x731f54._0xc0d9a2,_0x2d50b6-0x131,_0x2d50b6-0xe);}function _0x572be9(_0x18bb41,_0x532dbc,_0x2e48e0,_0x16eb84){return _0x1f4b8d(_0x532dbc,_0x532dbc-_0x5f10e7._0x56d251,_0x18bb41-_0x5f10e7._0x198ec8,_0x16eb84-0xcb);}const _0x1a89aa=new Promise((_0x16a3d5,_0x2bfe4a)=>{const _0x449ddf={_0x428a1f:0x3d1},_0xd8098e={_0x169721:0x33b},_0x6a84f2={_0x3ab2a0:0x168};function _0x2b61a7(_0x2aee3a,_0x9704a2,_0x1f270d,_0x1d6cd1){return _0x1390b9(_0x1f270d,_0x9704a2-0x1a4,_0x1f270d-0x125,_0x2aee3a- -_0x6a84f2._0x3ab2a0);}const _0x22025e=()=>{function _0x73d250(_0x3064b9,_0x42a7c7,_0x4c1781,_0x618ccf){return _0x17cd(_0x42a7c7- -_0xd8098e._0x169721,_0x618ccf);}function _0x40aa02(_0xc372a,_0x3e4635,_0x59b328,_0x446b7e){return _0x17cd(_0x3e4635-_0x449ddf._0x428a1f,_0x59b328);}_0x1b24af[_0x40aa02(_0x32f51d._0x4fe5c1,0x47e,_0x32f51d._0x152e05,_0x32f51d._0x181dad)]?.['removeEventListener']('abort',_0x22025e),_0x2bfe4a(toAbortError(_0x1b24af[_0x73d250(-0x2d4,-0x28e,-_0x32f51d._0x3b7d31,-0x286)]?.[_0x40aa02(0x4ee,0x4ac,_0x32f51d._0x483891,0x4de)]));};function _0x147f18(_0x493467,_0x27879e,_0x15baaa,_0x173da1){return _0x572be9(_0x493467- -0xe5,_0x27879e,_0x15baaa-0x16e,_0x173da1-0x8f);}if(_0x1b24af['signal']?.[_0x2b61a7(-0x1c3,-0x22b,-_0x28db75._0x570690,-0x159)]){_0x2bfe4a(toAbortError(_0x1b24af['signal'][_0x2b61a7(-0x227,-_0x28db75._0x556590,-0x237,-0x1f4)]));return;}_0x1b24af[_0x147f18(-_0x28db75._0x46a5a5,-0x3,_0x28db75._0x1eb86f,0x4f)]?.[_0x147f18(_0x28db75._0x52f976,0xc,0xa0,-0xd)](_0x147f18(0x2f,_0x28db75._0x396793,0x90,_0x28db75._0x519809),_0x22025e,{'once':!![]});}),_0x248ee6=await Promise[_0x1390b9(-0x60,-_0x126ce8._0x3e66f7,-_0x126ce8._0x32b136,-0xb5)]([_0x1ddb71,_0x1a89aa]);return isDispatchDecision(_0x248ee6)?_0x248ee6:{'action':_0x572be9(0xff,0x15b,0x13f,_0x126ce8._0x2208fe)};}async function executeCapturedToolCall(_0x5ce63d,_0x3f42ca,_0x53d79e,_0x2948c0,_0x51d566){const _0x1161b4={_0x2683d8:0x41c,_0x5fed97:0x469,_0xf8f6bc:0x3c,_0x4eb012:0xed,_0x5dcaa4:0x412,_0x211d70:0xc4,_0x3b7cc0:0xf9,_0x112c40:0x11f,_0x59be87:0x96,_0x42581e:0x9b,_0x2c9495:0xe5,_0x58cd02:0x4e7,_0x1599aa:0x474,_0x5034f4:0xa8,_0x5149d7:0x6a,_0x3f683e:0x5c,_0x537e95:0x6c,_0x4fd622:0x93,_0x1f37c8:0x43c,_0x3ad09f:0x4f2,_0x7bd02a:0x4e3,_0x3e1348:0x74,_0x233c7c:0x68,_0xad1c43:0x81,_0x57d375:0x5a,_0x10f3aa:0x415,_0x5c380e:0x4a8,_0x32939d:0x3dc,_0x4a71c9:0x447,_0x3f7782:0x43b,_0x50566d:0x4a6,_0x2b85a4:0x85,_0x4f61b2:0xb6,_0x5b323c:0x14,_0x5d5a73:0x19,_0x17db5e:0x41,_0x4ce8b6:0xac,_0x20823b:0xe3,_0x4d6fbd:0xf1,_0x7ac23d:0x114,_0x59e31a:0xb4,_0x40f2e0:0x105,_0x2432ef:0x4e5,_0x2d52b7:0x4a2,_0x2665fc:0x44a,_0x961e1f:0x99,_0x5f555c:0xb6,_0x2eaca5:0x499,_0xbe733d:0x43f,_0x3b96e8:0x3f1,_0x2cf76f:0x457,_0x3530ce:0x41e,_0x1c4cab:0x63,_0x33270a:0xb9,_0x175f12:0x8d},_0x325f29={_0x3fafbc:0x665},_0x2f33e3={_0x997083:0x2f,_0x29753e:0x93},_0x14c788={..._0x53d79e,'toolCallId':_0x3f42ca['id'],'permissionClass':resolveToolPermissionClass(_0x5ce63d),'executionAuthorization':void 0x0};throwIfAborted(_0x14c788[_0x4727bc(_0x1161b4._0x2683d8,0x42d,_0x1161b4._0x5fed97,0x447)]);let _0x5d63de;try{_0x5d63de=await resolveDispatchDecision(_0x2948c0,_0x3f42ca,_0x14c788);}catch(_0x1ce56f){if(isAbortError(_0x1ce56f)){const _0x5e4d6c=createAbortedToolResult(_0x3f42ca,_0x1ce56f);return await emitEvent(_0x51d566,{'type':_0x853dc4(-0x37,-0x8d,-_0x1161b4._0xf8f6bc,-_0x1161b4._0x4eb012),'toolCall':_0x3f42ca,'result':_0x5e4d6c},_0x14c788),_0x5e4d6c;}const {errorMessage:_0x1fea19,structured:_0x2c4350}=normalizeExecutionError(_0x1ce56f),_0x5dbcf3=createErrorToolResult(_0x3f42ca,_0x1fea19,_0x2c4350);return await emitEvent(_0x51d566,{'type':_0x4727bc(0x412,0x4b8,_0x1161b4._0x5dcaa4,0x47e),'toolCall':_0x3f42ca,'result':_0x5dbcf3},_0x14c788),_0x5dbcf3;}throwIfAborted(_0x14c788[_0x853dc4(-0x5a,-_0x1161b4._0x211d70,-_0x1161b4._0x3b7cc0,-_0x1161b4._0x112c40)]);if(_0x5d63de['action']==='reject'){const _0x5f5106=createRejectedToolResult(_0x3f42ca,_0x5d63de[_0x853dc4(-0xb6,-_0x1161b4._0x59be87,-_0x1161b4._0x42581e,-_0x1161b4._0x2c9495)]);return await emitEvent(_0x51d566,{'type':'tool_rejected','toolCall':_0x3f42ca,'result':_0x5f5106},_0x14c788),_0x5f5106;}if(!_0x5ce63d){const _0x4ee295=createUnknownToolResult(_0x3f42ca);return await emitEvent(_0x51d566,{'type':_0x4727bc(_0x1161b4._0x58cd02,_0x1161b4._0x1599aa,0x4dc,0x47e),'toolCall':_0x3f42ca,'result':_0x4ee295},_0x14c788),_0x4ee295;}function _0x853dc4(_0x4361ca,_0x5cfcca,_0x59da69,_0x999ad5){return _0x1f4b8d(_0x59da69,_0x5cfcca-_0x2f33e3._0x997083,_0x5cfcca-0x15a,_0x999ad5-_0x2f33e3._0x29753e);}const _0x33517f={..._0x14c788,'executionAuthorization':_0x5d63de['executionAuthorization']};throwIfAborted(_0x33517f[_0x853dc4(-0xfb,-_0x1161b4._0x211d70,-0x108,-_0x1161b4._0x5034f4)]),await emitEvent(_0x51d566,{'type':_0x853dc4(-_0x1161b4._0x5149d7,-0x53,-_0x1161b4._0x3f683e,-0xc),'toolCall':_0x3f42ca},_0x33517f);function _0x4727bc(_0x3d749a,_0x58a4bd,_0x2ae5fa,_0x4b21a0){return _0x1f4b8d(_0x2ae5fa,_0x58a4bd-0xcc,_0x4b21a0-_0x325f29._0x3fafbc,_0x4b21a0-0x1b1);}try{throwIfAborted(_0x33517f[_0x853dc4(-_0x1161b4._0x537e95,-0xc4,-_0x1161b4._0x4fd622,-0xfe)]);const _0x52798a=validateToolInput(_0x3f42ca[_0x4727bc(_0x1161b4._0x1f37c8,_0x1161b4._0x3ad09f,_0x1161b4._0x7bd02a,0x49b)],_0x5ce63d[_0x853dc4(-_0x1161b4._0x3e1348,-_0x1161b4._0x233c7c,-_0x1161b4._0xad1c43,0x7)]),_0x55bf2e=await _0x5ce63d[_0x853dc4(-0x66,-0xc8,-0xa2,-_0x1161b4._0x57d375)](_0x52798a,_0x33517f),_0x3c78c7=[],_0x31e33a=addAbortListener(_0x33517f[_0x4727bc(_0x1161b4._0x10f3aa,_0x1161b4._0x5c380e,_0x1161b4._0x32939d,_0x1161b4._0x4a71c9)],()=>{void _0x55bf2e['return'](void 0x0)['catch'](()=>{});});try{throwIfAborted(_0x33517f[_0x4727bc(_0x1161b4._0x3f7782,0x404,_0x1161b4._0x50566d,0x447)]);let _0x55c1e2=await _0x55bf2e[_0x853dc4(-_0x1161b4._0x2b85a4,-_0x1161b4._0x4f61b2,-0xd6,-0x4e)]();while(!_0x55c1e2[_0x853dc4(_0x1161b4._0x5b323c,-_0x1161b4._0x5d5a73,-_0x1161b4._0x17db5e,-0x3e)]){throwIfAborted(_0x33517f[_0x853dc4(-_0x1161b4._0x4ce8b6,-0xc4,-_0x1161b4._0x20823b,-_0x1161b4._0x4d6fbd)]);const _0x3345d1=normalizeToolOutputValue(_0x55c1e2[_0x853dc4(-_0x1161b4._0x7ac23d,-_0x1161b4._0x59e31a,-0x52,-_0x1161b4._0x40f2e0)]);_0x3c78c7[_0x4727bc(0x50a,_0x1161b4._0x2432ef,_0x1161b4._0x2d52b7,0x4f9)](_0x3345d1),await emitEvent(_0x51d566,{'type':_0x4727bc(0x417,0x4a8,_0x1161b4._0x2665fc,0x47a),'toolCall':_0x3f42ca,'chunk':_0x3345d1},_0x33517f),throwIfAborted(_0x33517f[_0x853dc4(-0xb5,-_0x1161b4._0x211d70,-0x10d,-0x107)]),_0x55c1e2=await _0x55bf2e[_0x853dc4(-_0x1161b4._0x961e1f,-_0x1161b4._0x5f555c,-0x66,-0xbf)]();}throwIfAborted(_0x33517f['signal']);const _0x29ff8b=_0x55c1e2[_0x4727bc(_0x1161b4._0x2eaca5,_0x1161b4._0xbe733d,_0x1161b4._0x3b96e8,_0x1161b4._0x2cf76f)]===void 0x0?deriveFinalToolOutput(_0x3c78c7):normalizeToolOutputValue(_0x55c1e2[_0x4727bc(0x481,_0x1161b4._0x3530ce,0x476,_0x1161b4._0x2cf76f)]),_0x1a93ec=createSuccessToolResult(_0x3f42ca,_0x29ff8b,_0x3c78c7);return await emitEvent(_0x51d566,{'type':'tool_completed','toolCall':_0x3f42ca,'result':_0x1a93ec},_0x33517f),_0x1a93ec;}catch(_0xfd34c8){if(isAbortError(_0xfd34c8)){const _0x1b5069=createAbortedToolResult(_0x3f42ca,_0xfd34c8,_0x3c78c7);return await emitEvent(_0x51d566,{'type':'tool_completed','toolCall':_0x3f42ca,'result':_0x1b5069},_0x33517f),_0x1b5069;}const {errorMessage:_0x5bbc97,structured:_0x2fdc08}=normalizeExecutionError(_0xfd34c8),_0x15e640=createErrorToolResult(_0x3f42ca,_0x5bbc97,_0x2fdc08,_0x3c78c7);return await emitEvent(_0x51d566,{'type':_0x853dc4(-0xae,-0x8d,-_0x1161b4._0x1c4cab,-0xcd),'toolCall':_0x3f42ca,'result':_0x15e640},_0x33517f),_0x15e640;}finally{_0x31e33a();}}catch(_0x116c4a){if(isAbortError(_0x116c4a)){const _0x26b1e7=createAbortedToolResult(_0x3f42ca,_0x116c4a);return await emitEvent(_0x51d566,{'type':'tool_completed','toolCall':_0x3f42ca,'result':_0x26b1e7},_0x33517f),_0x26b1e7;}const {errorMessage:_0x43137e,structured:_0x39eabc}=normalizeExecutionError(_0x116c4a),_0x3d805d=createErrorToolResult(_0x3f42ca,_0x43137e,_0x39eabc);return await emitEvent(_0x51d566,{'type':_0x853dc4(-_0x1161b4._0x33270a,-_0x1161b4._0x175f12,-0xcf,-0xe2),'toolCall':_0x3f42ca,'result':_0x3d805d},_0x33517f),_0x3d805d;}}async function executeToolCall(_0x18b501,_0x1092bc,_0x4ce293,_0x1f521b,_0x3f0c12){const _0x22b108={_0x5efe42:0x50,_0x4ad4c9:0x26,_0x1fd7e7:0x467,_0xe48dc:0x4e3,_0x47a84c:0x50e,_0x52cefe:0x53f},_0xd9c3c1={_0x2253fe:0x1e2},_0x15d450={_0x54dde9:0x88,_0x5554ce:0x208};function _0x522d40(_0x57c59d,_0x4b3177,_0x311f54,_0x22ec4a){return _0x1f4b8d(_0x4b3177,_0x4b3177-_0x15d450._0x54dde9,_0x311f54-_0x15d450._0x5554ce,_0x22ec4a-0x16);}const _0x275779=_0x18b501[_0x522d40(_0x22b108._0x5efe42,0xa,0x17,_0x22b108._0x4ad4c9)](_0x1092bc['name']),_0x5ad385=_0x275779?.[_0x5e4716(_0x22b108._0x1fd7e7,0x455,0x417,0x49b)]?.[_0x5e4716(_0x22b108._0xe48dc,0x4fb,_0x22b108._0x47a84c,_0x22b108._0x52cefe)]();function _0x5e4716(_0x25f0db,_0x3b0d84,_0x5cd91b,_0x1eca44){return _0x1f4b8d(_0x5cd91b,_0x3b0d84-_0xd9c3c1._0x2253fe,_0x25f0db-0x688,_0x1eca44-0xd1);}try{return await executeCapturedToolCall(_0x275779,_0x1092bc,_0x4ce293,_0x1f521b,_0x3f0c12);}finally{_0x5ad385?.();}}function createInternalToolRuntime(_0x3bee40=[],_0x252612={}){const _0x4dce89={_0x54c4bc:0x1ba,_0x598fa4:0x1e3},_0x2743bc={_0x7fb564:0x224,_0x27db5c:0x2cb,_0x5eb218:0x2f4,_0x397261:0x2b6,_0xe1eb5e:0x288},_0x5b75af={_0x48822c:0x342},_0x4b38be={_0x4d5662:0x3ac},_0x25c3af={_0x514d1f:0x1ef,_0x39b2e5:0x260},_0x1f850f={_0x387444:0x33f};let _0x852ad2=new ToolRegistry(_0x3bee40);return{'listToolSchemas'(){function _0x52c08b(_0x3b5d69,_0x531611,_0x46691b,_0x4d8e63){return _0x17cd(_0x46691b- -_0x1f850f._0x387444,_0x4d8e63);}return _0x852ad2[_0x52c08b(-_0x25c3af._0x514d1f,-0x1df,-0x22b,-_0x25c3af._0x39b2e5)]();},'setTools'(_0x345bbb){_0x852ad2=new ToolRegistry(_0x345bbb);},async 'executeCalls'(_0x15dcb7,_0x5bfb6c){const _0x309757={_0x517912:0x4f,_0x306d40:0x4e};function _0x6e87c7(_0x311623,_0x8e316,_0x2fd3fc,_0x1c79e0){return _0x17cd(_0x1c79e0- -_0x4b38be._0x4d5662,_0x8e316);}function _0x5d386b(_0x1c49d1,_0x319a91,_0xc7fdd5,_0x990d8c){return _0x17cd(_0xc7fdd5- -_0x5b75af._0x48822c,_0x319a91);}return await Promise[_0x6e87c7(-_0x2743bc._0x7fb564,-_0x2743bc._0x27db5c,-0x20c,-0x276)](_0x15dcb7[_0x6e87c7(-_0x2743bc._0x5eb218,-_0x2743bc._0x397261,-0x2b4,-_0x2743bc._0xe1eb5e)](async _0x737171=>{const _0x3bbc97={_0x29d16b:0x137,_0x2448d6:0x43,_0xfa719a:0x2bf};function _0xf7a147(_0x396aff,_0x496c42,_0x3a8df1,_0x8f8334){return _0x6e87c7(_0x396aff-_0x3bbc97._0x29d16b,_0x3a8df1,_0x3a8df1-_0x3bbc97._0x2448d6,_0x396aff-_0x3bbc97._0xfa719a);}return await executeToolCall(_0x852ad2,_0x737171,_0x5bfb6c,_0x252612[_0xf7a147(_0x309757._0x517912,0x58,_0x309757._0x306d40,0x63)],_0x252612['onEvent']);}));},async 'execute'(_0x25ee07,_0x3818b1){function _0x25bf39(_0x46cf96,_0x589d48,_0x386ef1,_0x5edc70){return _0x17cd(_0x5edc70- -0x31c,_0x46cf96);}const [_0xafe077]=await this[_0x25bf39(-0x1b2,-0x223,-_0x4dce89._0x54c4bc,-_0x4dce89._0x598fa4)]([_0x25ee07],_0x3818b1);return _0xafe077;}};}function getOrderedObserverExtensions(_0x18642a,_0x5443e2){const _0x10534e={_0x5c8d64:0xb3,_0x2978cd:0x79,_0x5f48fb:0x10a,_0x276f0b:0xe3},_0x559b30={_0x4eaaa1:0x28c,_0x2f4f79:0x21b,_0x3bf686:0x21e,_0x449353:0x27b,_0x5dc971:0x1f0,_0x48248c:0x343,_0x28c341:0x362,_0x18c7b4:0x2f6,_0x1469e0:0x2db,_0xcae5e3:0x339,_0x4601aa:0x33d,_0x2f0b6e:0x34e,_0x36898f:0x291},_0x51a38e={_0x5d2337:0x3cf,_0x2c1b5f:0x40d,_0x290e22:0x3b3,_0x7ad87f:0xed,_0x39e175:0x131,_0x21a32a:0xc8},_0x1eafd2={_0x1ee9bc:0x6,_0x576863:0x276};function _0x3f9382(_0x503b81,_0x41e72c,_0x11e6e6,_0x5c5f21){return _0x3b29bd(_0x503b81-_0x1eafd2._0x1ee9bc,_0x503b81,_0x11e6e6-0x198,_0x5c5f21- -_0x1eafd2._0x576863);}return _0x18642a['filter'](_0x2d2968=>{const _0x777086={_0x493d32:0x2df};function _0x18eb50(_0x24ee01,_0x4a152e,_0x5b6145,_0x1f10eb){return _0x17cd(_0x24ee01- -0x191,_0x5b6145);}function _0x673633(_0x86fe75,_0x208c1d,_0x4ac040,_0x1999dd){return _0x17cd(_0x86fe75-_0x777086._0x493d32,_0x208c1d);}return _0x2d2968[_0x673633(_0x51a38e._0x5d2337,_0x51a38e._0x2c1b5f,_0x51a38e._0x290e22,0x407)]!==![]&&_0x2d2968['stage']===_0x5443e2&&_0x2d2968[_0x18eb50(-_0x51a38e._0x7ad87f,-0xd0,-0xa1,-_0x51a38e._0x39e175)]===_0x18eb50(-0x71,-_0x51a38e._0x21a32a,-0xdd,-0x60);})[_0x3f9382(_0x10534e._0x5c8d64,_0x10534e._0x2978cd,_0x10534e._0x5f48fb,_0x10534e._0x276f0b)]((_0xfee2ff,_0x55263a)=>{const _0x4a1fd3={_0x45e764:0x1c7,_0x1da920:0x34d},_0x59d1f3={_0x175e7a:0x7a,_0x2e102f:0x1e5,_0x5c2919:0x263};function _0x2c3158(_0x4ef736,_0xc5f555,_0x4344c3,_0x41d969){return _0x3f9382(_0x4ef736,_0xc5f555-_0x59d1f3._0x175e7a,_0x4344c3-_0x59d1f3._0x2e102f,_0x4344c3-_0x59d1f3._0x5c2919);}function _0xd7dab9(_0x280de8,_0x3bcf75,_0x3dbda4,_0x50ad36){return _0x3f9382(_0x3bcf75,_0x3bcf75-0x162,_0x3dbda4-_0x4a1fd3._0x45e764,_0x280de8- -_0x4a1fd3._0x1da920);}if(_0xfee2ff[_0xd7dab9(-0x24e,-_0x559b30._0x4eaaa1,-_0x559b30._0x2f4f79,-_0x559b30._0x3bf686)]===!![]&&_0x55263a[_0xd7dab9(-0x24e,-0x214,-0x297,-_0x559b30._0x449353)]!==!![])return 0x1;if(_0xfee2ff[_0xd7dab9(-0x24e,-_0x559b30._0x5dc971,-0x25d,-0x2b2)]!==!![]&&_0x55263a[_0x2c3158(0x31b,_0x559b30._0x48248c,_0x559b30._0x28c341,_0x559b30._0x18c7b4)]===!![])return-0x1;return _0xfee2ff[_0x2c3158(_0x559b30._0x1469e0,_0x559b30._0xcae5e3,0x2e6,_0x559b30._0x4601aa)]-_0x55263a[_0x2c3158(_0x559b30._0x2f0b6e,0x2f3,0x2e6,_0x559b30._0x36898f)];});}function getOrderedTransformerExtensions(_0x135ce0,_0x382f70){const _0x569a49={_0x48fbdf:0x462,_0x5f0e5a:0x4bf,_0x5ac365:0x4a6},_0x26361e={_0x436c86:0x34a,_0x35791a:0x3a4,_0x286f81:0x349,_0x1ef11b:0x2fc,_0x27dd05:0x2fe,_0x3ebcbe:0x266,_0x2390ee:0x295,_0x5e60ad:0x2f4,_0x3816f5:0x257},_0x4706b3={_0x5c5004:0x12f,_0x1f55d7:0x650},_0x51a231={_0x121ba4:0x1c2,_0x74824:0x5bd};function _0x5c48d4(_0x43c83d,_0x542247,_0x44ad9d,_0x43f86f){return _0x3b29bd(_0x43c83d-0x6d,_0x43c83d,_0x44ad9d-_0x51a231._0x121ba4,_0x43f86f- -_0x51a231._0x74824);}function _0x11fc5c(_0x31da38,_0x5aac48,_0x109897,_0x1c51c8){return _0x1f4b8d(_0x5aac48,_0x5aac48-_0x4706b3._0x5c5004,_0x1c51c8-_0x4706b3._0x1f55d7,_0x1c51c8-0x16b);}return _0x135ce0[_0x5c48d4(-0x312,-0x288,-0x272,-0x2c9)](_0x330ef4=>{const _0x59b23a={_0x31dc06:0x100,_0x1a4044:0x57},_0x48bd3a={_0x475baa:0x5df};function _0x518565(_0xf1002,_0x205d76,_0x261c46,_0x43698b){return _0x5c48d4(_0xf1002,_0x205d76-0x10b,_0x261c46-0xb0,_0x205d76-_0x48bd3a._0x475baa);}function _0x274d30(_0x4588a7,_0x3e0419,_0x4b83d9,_0x4a7cad){return _0x5c48d4(_0x4588a7,_0x3e0419-_0x59b23a._0x31dc06,_0x4b83d9-0x5e,_0x3e0419- -_0x59b23a._0x1a4044);}return _0x330ef4[_0x518565(0x383,_0x26361e._0x436c86,_0x26361e._0x35791a,0x310)]!==![]&&_0x330ef4[_0x274d30(-0x31e,-_0x26361e._0x286f81,-_0x26361e._0x1ef11b,-0x383)]===_0x382f70&&_0x330ef4[_0x518565(0x2ae,_0x26361e._0x27dd05,0x33b,0x2bc)]===_0x274d30(-_0x26361e._0x3ebcbe,-_0x26361e._0x2390ee,-_0x26361e._0x5e60ad,-_0x26361e._0x3816f5);})[_0x11fc5c(_0x569a49._0x48fbdf,0x4e0,_0x569a49._0x5f0e5a,_0x569a49._0x5ac365)]((_0x209b2d,_0x1451f8)=>_0x209b2d[_0x5c48d4(-0x26d,-0x2b8,-0x28a,-0x2c4)]-_0x1451f8[_0x11fc5c(0x3de,0x3dd,0x4a5,0x446)]);}function createExtensionRegistry(){const _0x33184a={_0x2ab248:0x2ca,_0x4b9995:0x30e},_0x134aa5={_0x39ead0:0x401},_0x4463ce={_0x34ff25:0x30c},_0x1083f5={_0x54c13b:0x1d2,_0x203cef:0x209,_0x34c202:0x22d,_0x5b0a6b:0xb0,_0x35cd88:0x110,_0x261ed9:0x93,_0x30d215:0xef,_0x29a538:0x299,_0x2e19cf:0x2a8,_0x22f8f7:0x173,_0x48ef9f:0x2ce,_0x141173:0x2b4,_0x584565:0x260,_0x44d2d2:0x2d5,_0x330c78:0x2c4,_0x2038be:0x2dc,_0x3e8181:0x32b,_0x2d551b:0x2e8},_0x52b1bf=[];return{'register'(_0x5e97dc){function _0x361f51(_0x4994dd,_0x4d91c5,_0x34a32b,_0x2bb4be){return _0x17cd(_0x4994dd- -0x1d0,_0x4d91c5);}if(_0x5e97dc[_0x42d5ae(0x234,_0x1083f5._0x54c13b,_0x1083f5._0x203cef,_0x1083f5._0x34c202)]===_0x361f51(-_0x1083f5._0x5b0a6b,-_0x1083f5._0x35cd88,-0x45,-0xce)&&_0x5e97dc['enabled']!==![]&&_0x5e97dc[_0x361f51(-_0x1083f5._0x261ed9,-0x71,-0xb6,-_0x1083f5._0x30d215)]===!![]){const _0x25fd70=_0x52b1bf['find'](_0x227843=>_0x227843[_0x42d5ae(0x28c,0x23c,0x278,0x22d)]===_0x361f51(-0xb0,-0xab,-0x69,-0x6e)&&_0x227843['enabled']!==![]&&_0x227843[_0x42d5ae(0x26f,0x269,0x229,0x21c)]===_0x5e97dc['stage']&&_0x227843[_0x42d5ae(0x25f,0x304,0x270,0x2c6)]===!![]);if(_0x25fd70)throw new Error('Cannot\x20register\x20terminal\x20observer\x20\x22'+_0x5e97dc['id']+_0x42d5ae(0x28e,_0x1083f5._0x29a538,0x28f,_0x1083f5._0x2e19cf)+_0x5e97dc[_0x361f51(-0x13d,-_0x1083f5._0x22f8f7,-0x164,-0xeb)]+_0x42d5ae(_0x1083f5._0x48ef9f,_0x1083f5._0x141173,_0x1083f5._0x584565,0x291)+_0x25fd70['id']+_0x42d5ae(_0x1083f5._0x44d2d2,0x317,_0x1083f5._0x330c78,0x2ce));}function _0x42d5ae(_0x321f72,_0x407b15,_0x2604bc,_0x22a476){return _0x17cd(_0x22a476-0x189,_0x321f72);}_0x52b1bf[_0x42d5ae(0x2c7,_0x1083f5._0x2038be,_0x1083f5._0x3e8181,_0x1083f5._0x2d551b)]({..._0x5e97dc});},async 'runTransformers'(_0x28a926,_0x4374fd,_0x56742c){function _0x1a381b(_0x4e21c3,_0x4490e2,_0x282aa1,_0x4ae293){return _0x17cd(_0x4490e2-_0x4463ce._0x34ff25,_0x282aa1);}let _0x2b592e=_0x4374fd;for(const _0x55bcf4 of getOrderedTransformerExtensions(_0x52b1bf,_0x28a926)){_0x2b592e=await _0x55bcf4[_0x1a381b(0x3bf,0x3d6,_0x134aa5._0x39ead0,0x42b)](_0x2b592e,_0x56742c);}return _0x2b592e;},async 'runObservers'(_0x1db3b0,_0x2a5b04,_0x15ddc4){const _0x5c82ef={_0x12e99b:0x227};function _0x4ffd8c(_0x52e0a6,_0x2685e8,_0x5571df,_0xc2d2f1){return _0x17cd(_0xc2d2f1-_0x5c82ef._0x12e99b,_0x5571df);}for(const _0x455a5f of getOrderedObserverExtensions(_0x52b1bf,_0x1db3b0)){await _0x455a5f[_0x4ffd8c(0x2dd,_0x33184a._0x2ab248,_0x33184a._0x4b9995,0x2f1)](_0x2a5b04,_0x15ddc4);}}};}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 applyModelCall(_0x4e0d1a,_0x48001a){const _0xb98bea={_0x35049f:0x234,_0x1860cb:0x1ef,_0x3ba96e:0xa3,_0xba0aa5:0xf8,_0x1b7547:0x1c6,_0x4895ad:0x178,_0x4824b1:0x170,_0x5ca3ca:0x17b,_0x582b2d:0x144,_0x4718af:0xfa,_0xa38cd:0xbc,_0x2d728a:0xf0,_0x5e3335:0xae,_0x19aba4:0x1f7,_0x1df6a9:0x266,_0x4d37a8:0x1f2,_0x4dcbdf:0x1be,_0x56e042:0x1fe,_0x2c0ae7:0x124,_0x1e91dc:0x1f9,_0xce2b60:0x25f,_0x150f07:0x152,_0x5f253b:0x129,_0xaaaed5:0x170,_0x5a31ce:0x17e,_0x605149:0x1c9,_0xeaca78:0x1f3,_0x45a9f6:0x224,_0x33e8df:0x165,_0x3c393d:0x1a8,_0x3ede0f:0x204,_0x365e50:0x1d4,_0x22083b:0xd9,_0x24f70d:0x105,_0xf4dacd:0x175,_0x39ad1a:0x1af,_0x40c7e8:0x1e4,_0x58579f:0xa2,_0x58e504:0xf5,_0x113827:0xe2,_0x344534:0xec,_0x4b6b04:0xe3,_0x3509e9:0x147,_0x1e21ad:0x14f,_0x46d065:0x208,_0x57c76f:0x13b},_0x4d7236={_0x22bd66:0xa6},_0x3efcc9={_0x13b81e:0x2,_0x294446:0x103},_0x2d6873=_0x48001a['usage'],_0x21624c=_0x2d6873[_0x356729(-_0xb98bea._0x35049f,-0x1d8,-0x1ef,-0x18d)],_0x34b3ea=_0x2d6873[_0x356729(-_0xb98bea._0x1860cb,-0x22f,-0x1cf,-0x28a)],_0x90043a=_0x2d6873[_0x217dd4(-0x11d,-_0xb98bea._0x3ba96e,-_0xb98bea._0xba0aa5,-0xf5)]??0x0,_0x35a46a=_0x21624c+_0x34b3ea,_0x2c7dd0=_0x2d6873[_0x217dd4(-0x122,-0x1e2,-0x17d,-_0xb98bea._0x1b7547)]?.[_0x217dd4(-0x135,-_0xb98bea._0x4895ad,-_0xb98bea._0x4824b1,-0x1b4)],_0x429ac9=_0x2d6873[_0x217dd4(-0x149,-0x143,-0xdf,-0x140)]?.['amountUsdTicks'],_0x21c44e=_0x2c7dd0??_0x429ac9;function _0x356729(_0x2425d9,_0xf8599,_0x5e8ac0,_0x4b4c01){return _0x1f4b8d(_0x4b4c01,_0xf8599-0x11,_0xf8599-_0x3efcc9._0x13b81e,_0x4b4c01-_0x3efcc9._0x294446);}function _0x217dd4(_0x2ef588,_0x2f7ea7,_0x1f1658,_0x5cf1fb){return _0x1f4b8d(_0x5cf1fb,_0x2f7ea7-0x16,_0x1f1658-_0x4d7236._0x22bd66,_0x5cf1fb-0x185);}const {currentReportedCostUsdTicks:_0xcdab40,currentEstimatedCostUsdTicks:_0x7acd30,..._0x2911ec}=_0x4e0d1a;return{..._0x2911ec,'totalTokens':_0x2911ec[_0x217dd4(-_0xb98bea._0x5ca3ca,-0x1e4,-0x17e,-_0xb98bea._0x582b2d)]+_0x35a46a,'totalInputTokens':_0x2911ec[_0x217dd4(-_0xb98bea._0x4718af,-_0xb98bea._0xa38cd,-_0xb98bea._0x2d728a,-_0xb98bea._0x5e3335)]+_0x21624c,'totalOutputTokens':_0x2911ec[_0x356729(-0x241,-_0xb98bea._0x19aba4,-_0xb98bea._0x1df6a9,-0x221)]+_0x34b3ea,'totalReasoningTokens':_0x2911ec[_0x356729(-0x1ee,-_0xb98bea._0x4d37a8,-_0xb98bea._0x4dcbdf,-_0xb98bea._0x56e042)]+_0x90043a,'modelCallCount':_0x2911ec[_0x217dd4(-0x11a,-0x1b6,-0x17f,-_0xb98bea._0x2c0ae7)]+0x1,'totalModelTimeMs':_0x2911ec[_0x356729(-0x228,-_0xb98bea._0x1e91dc,-0x18b,-_0xb98bea._0xce2b60)]+_0x48001a[_0x356729(-_0xb98bea._0x150f07,-0x170,-0x194,-_0xb98bea._0x5f253b)],'currentTokens':_0x35a46a,'currentInputTokens':_0x21624c,'currentOutputTokens':_0x34b3ea,'currentReasoningTokens':_0x90043a,'currentModelTimeMs':_0x48001a[_0x356729(-0x1cb,-_0xb98bea._0xaaaed5,-0x158,-_0xb98bea._0x5a31ce)],..._0x2911ec[_0x356729(-_0xb98bea._0x605149,-0x224,-0x1c9,-_0xb98bea._0xeaca78)]&&_0x35a46a>0x0?{'contextWindowUsage':_0x35a46a/_0x2911ec[_0x356729(-0x219,-_0xb98bea._0x45a9f6,-0x20b,-0x22d)]}:{},'totalCostUsdTicks':_0x21c44e===void 0x0?_0x2911ec[_0x356729(-0x1ab,-0x1d4,-_0xb98bea._0x33e8df,-_0xb98bea._0x3c393d)]:_0x2911ec[_0x356729(-_0xb98bea._0x3ede0f,-_0xb98bea._0x365e50,-0x1a3,-0x1b3)]+_0x21c44e,'totalReportedCostUsdTicks':_0x2c7dd0===void 0x0?_0x2911ec[_0x217dd4(-0x125,-_0xb98bea._0x22083b,-0x10b,-_0xb98bea._0x24f70d)]:_0x2911ec[_0x356729(-_0xb98bea._0xf4dacd,-_0xb98bea._0x39ad1a,-0x18e,-_0xb98bea._0x40c7e8)]+_0x2c7dd0,'totalEstimatedCostUsdTicks':_0x429ac9===void 0x0?_0x2911ec[_0x217dd4(-_0xb98bea._0x58579f,-_0xb98bea._0x58e504,-0xe2,-0x101)]:_0x2911ec[_0x217dd4(-0xf5,-_0xb98bea._0x58e504,-_0xb98bea._0x113827,-_0xb98bea._0x344534)]+_0x429ac9,'reportedCostCallCount':_0x2c7dd0===void 0x0?_0x2911ec[_0x217dd4(-_0xb98bea._0x4b6b04,-0x1ae,-_0xb98bea._0x3509e9,-_0xb98bea._0x1e21ad)]:_0x2911ec[_0x356729(-0x1d5,-0x1eb,-_0xb98bea._0x46d065,-0x1e9)]+0x1,'estimatedCostCallCount':_0x429ac9===void 0x0?_0x2911ec[_0x217dd4(-0xf2,-0x119,-0xe5,-0xbe)]:_0x2911ec['estimatedCostCallCount']+0x1,'unpricedModelCallCount':_0x2c7dd0===void 0x0&&_0x429ac9===void 0x0?_0x2911ec['unpricedModelCallCount']+0x1:_0x2911ec[_0x217dd4(-0xcf,-0xd8,-_0xb98bea._0x57c76f,-0x181)],..._0x2c7dd0!==void 0x0?{'currentReportedCostUsdTicks':_0x2c7dd0}:{},..._0x429ac9!==void 0x0?{'currentEstimatedCostUsdTicks':_0x429ac9}:{}};}function createAgentMetrics(_0xd7c18f={}){const _0x49b40c={_0x1e147:0xde,_0x3bf7e5:0x5e,_0x3855dd:0x8b},_0x37ea7b={_0x5b97eb:0x45,_0x5930cb:0x2f,_0xed60b2:0x17,_0x145fc0:0x3a,_0x16c376:0xf,_0x2819dc:0x35e,_0x4f5eb8:0x3fa,_0x394348:0x397,_0x2cb3d2:0x3d,_0x3bbdad:0x4b,_0x1e66b7:0x22,_0x33f946:0xa3},_0x20bcf0={_0x3bb2f6:0x49f,_0x343333:0x46c,_0x2930fc:0x198,_0x2b4261:0x140,_0x5e729a:0x183,_0xaeb522:0x113,_0x2d604b:0x16d,_0x4e6069:0x460,_0x48bbfb:0x14d,_0x8bc0fe:0x3b0,_0x18524a:0x1d7,_0x9a036:0xe1,_0x51cf50:0x144,_0x32a02e:0x1b3,_0x53f7ba:0x11a,_0x55e1aa:0x1b1,_0x4a51c2:0xfc,_0x2526c6:0x1d8,_0x4191aa:0x19f,_0xbeab56:0x42e,_0xcb973d:0x3f9,_0x1a3b0b:0x430,_0x52fa52:0x1a5,_0x4b0e6b:0x155,_0x1edd9a:0x16e,_0x31d480:0x1fa,_0xb9c1ae:0x215};let _0x141157=createEmptySnapshot();const _0x1560b7=new Set();let _0x4baa8d;const _0xe4c25d=()=>{const _0x3a69c2={..._0x141157};for(const _0x3ddb46 of _0x1560b7)_0x3ddb46(_0x3a69c2);};return{'getSnapshot'(){return{..._0x141157};},'recordEvent'(_0x354fb4){const _0x9a384b={_0x36d356:0x2ee};if(_0x354fb4['type']===_0x5d9cc0(_0x20bcf0._0x3bb2f6,0x43a,0x4a9,_0x20bcf0._0x343333)){_0x4baa8d=Date[_0x1632f6(-0x190,-_0x20bcf0._0x2930fc,-_0x20bcf0._0x2b4261,-_0x20bcf0._0x5e729a)]();const _0x3044d5=_0xd7c18f[_0x1632f6(-_0x20bcf0._0xaeb522,-0x146,-_0x20bcf0._0x2d604b,-0x11a)]?.(_0x354fb4[_0x1632f6(-0x21b,-0x20a,-0x1b3,-0x1a3)]);_0x3044d5!==void 0x0&&(_0x141157={..._0x141157,'contextWindowLimit':_0x3044d5},_0xe4c25d());return;}function _0x5d9cc0(_0x2d24cc,_0x2dcf92,_0xc77594,_0xb46657){return _0x17cd(_0x2dcf92-_0x9a384b._0x36d356,_0xb46657);}if(_0x354fb4['type']===_0x5d9cc0(0x458,0x44c,0x3f1,_0x20bcf0._0x4e6069)){const _0x27b3b4=_0x4baa8d===void 0x0?0x0:Date[_0x1632f6(-0x16e,-0x14c,-_0x20bcf0._0x2b4261,-_0x20bcf0._0x48bbfb)]()-_0x4baa8d;_0x4baa8d=void 0x0,_0x141157=applyModelCall(_0x141157,{'usage':_0x354fb4[_0x5d9cc0(_0x20bcf0._0x8bc0fe,0x401,0x457,0x395)][_0x1632f6(-0x197,-0x1e4,-_0x20bcf0._0x18524a,-0x1c0)],'modelTimeMs':_0x354fb4[_0x1632f6(-_0x20bcf0._0x9a036,-0x160,-0x13d,-0x13b)]??_0x27b3b4}),_0xe4c25d();return;}if(_0x354fb4[_0x1632f6(-0x1f8,-_0x20bcf0._0x51cf50,-0x18b,-_0x20bcf0._0x32a02e)]===_0x1632f6(-_0x20bcf0._0x53f7ba,-_0x20bcf0._0x55e1aa,-0x166,-_0x20bcf0._0x4a51c2)){_0x141157={..._0x141157,'toolCallCount':_0x141157[_0x1632f6(-0x1cf,-_0x20bcf0._0x2526c6,-_0x20bcf0._0x4191aa,-0x1be)]+0x1},_0xe4c25d();return;}function _0x1632f6(_0x38458a,_0x213540,_0x3cd26e,_0x2dcdc1){return _0x17cd(_0x3cd26e- -0x296,_0x2dcdc1);}_0x354fb4[_0x5d9cc0(_0x20bcf0._0xbeab56,_0x20bcf0._0xcb973d,_0x20bcf0._0x1a3b0b,_0x20bcf0._0x4e6069)]===_0x1632f6(-0x1af,-_0x20bcf0._0x52fa52,-_0x20bcf0._0x4b0e6b,-_0x20bcf0._0x1edd9a)&&(_0x141157={..._0x141157,'requestCount':_0x141157[_0x1632f6(-0x24b,-0x1c9,-_0x20bcf0._0x31d480,-_0x20bcf0._0xb9c1ae)]+0x1},_0xe4c25d());},'reset'(){_0x141157=createEmptySnapshot(),_0x4baa8d=void 0x0,_0xe4c25d();},'restore'(_0x56841a){let _0x7546fb=createEmptySnapshot();for(const _0x1f66dd of _0x56841a[_0xc57af8(-0x1,0xe,_0x37ea7b._0x5b97eb,_0x37ea7b._0x5930cb)]){_0x7546fb=applyModelCall(_0x7546fb,{'usage':_0x1f66dd[_0xc988ea(0x40b,0x3c1,0x3cd,0x3d5)],'modelTimeMs':_0x1f66dd[_0xc57af8(0xb,_0x37ea7b._0xed60b2,-_0x37ea7b._0x145fc0,-_0x37ea7b._0x16c376)]});}function _0xc57af8(_0x1b80ed,_0x3e7aac,_0x4c48e4,_0x1c99df){return _0x17cd(_0x3e7aac- -0x142,_0x1b80ed);}_0x141157={..._0x7546fb,'requestCount':_0x56841a['modelCalls'][_0xc988ea(_0x37ea7b._0x2819dc,0x3be,_0x37ea7b._0x4f5eb8,_0x37ea7b._0x394348)](_0x57c88b=>_0x57c88b[_0xc57af8(0x83,0x20,0xd,0x76)])[_0xc57af8(-0xc9,-0x7e,-_0x37ea7b._0x2cb3d2,-0x44)],'toolCallCount':_0x56841a[_0xc57af8(0xb,-_0x37ea7b._0x3bbdad,_0x37ea7b._0x1e66b7,-_0x37ea7b._0x33f946)],'historicalMetricsComplete':_0x56841a['missingModelCallCount']===0x0,'missingHistoricalModelCallCount':_0x56841a['missingModelCallCount']};function _0xc988ea(_0x48fffd,_0x3b15dc,_0xb486e,_0x4429f1){return _0x17cd(_0x3b15dc-0x302,_0xb486e);}_0x4baa8d=void 0x0,_0xe4c25d();},'subscribe'(_0x273084){const _0x1409da={_0x256839:0xc2};function _0x2e56c8(_0x2f11d5,_0x1597d1,_0x426b8a,_0x34fa7f){return _0x17cd(_0x426b8a- -_0x1409da._0x256839,_0x34fa7f);}return _0x1560b7[_0x2e56c8(_0x49b40c._0x1e147,_0x49b40c._0x3bf7e5,_0x49b40c._0x3855dd,0xc4)](_0x273084),()=>{_0x1560b7['delete'](_0x273084);};}};}function makeExtensionContext(_0x3a6bd0){return{'state':_0x3a6bd0};}async function runStage(_0x263b30,_0x26b630,_0x170b73,_0x28107f){const _0x3c5d5d={_0x160d93:0x58},_0x152938={_0x144f19:0x116,_0x454cbd:0x181},_0xde65b2=await _0x263b30['runTransformers'](_0x26b630,_0x170b73,_0x28107f);await _0x263b30[_0x5066f9(-0xd,0x14,-0x39,-_0x3c5d5d._0x160d93)](_0x26b630,_0xde65b2,_0x28107f);function _0x5066f9(_0x18c78d,_0x4a1993,_0x98683b,_0x15e69b){return _0x1f4b8d(_0x4a1993,_0x4a1993-_0x152938._0x144f19,_0x98683b-0x16f,_0x15e69b-_0x152938._0x454cbd);}return _0xde65b2;}async function emitEvent2(_0x1738d4,_0x39a306,_0x246843){await _0x1738d4?.(_0x39a306,_0x246843);}function replaceToolUseBlocks(_0x5d2dd7,_0x42d51a){const _0x5bffbe={_0x251ef6:0x142,_0x4668f9:0x146,_0x22ad2c:0x9c,_0x4d3288:0xb3},_0xb92f74={_0x159f36:0x3e2},_0x4cb1a4={_0x2b6b3e:0xd3,_0x4e478f:0xd9},_0x311c86={_0x38ece1:0x15a,_0x408093:0x1d7,_0x131554:0x3ce};function _0x4626d7(_0x5f4372,_0x1a3f86,_0x36c025,_0x1086d){return _0x3b29bd(_0x5f4372-_0x311c86._0x38ece1,_0x5f4372,_0x36c025-_0x311c86._0x408093,_0x1086d- -_0x311c86._0x131554);}function _0x1a7378(_0x52855b,_0x254865,_0x4bd34c,_0x52e4cf){return _0x1f4b8d(_0x52855b,_0x254865-_0x4cb1a4._0x2b6b3e,_0x254865-_0x4cb1a4._0x4e478f,_0x52e4cf-0x61);}let _0xbd22e9=0x0;return{..._0x5d2dd7,'content':_0x5d2dd7[_0x1a7378(-0x11f,-_0x5bffbe._0x251ef6,-0x177,-_0x5bffbe._0x4668f9)][_0x1a7378(-_0x5bffbe._0x22ad2c,-0xce,-_0x5bffbe._0x4d3288,-0xec)](_0xd92cfb=>{const _0x42630b={_0x1fef73:0x18f,_0x5bf1ce:0x136};function _0x4b366b(_0x3ea528,_0x712ff0,_0x3c07f7,_0x262b7a){return _0x4626d7(_0x3c07f7,_0x712ff0-_0x42630b._0x1fef73,_0x3c07f7-_0x42630b._0x5bf1ce,_0x262b7a-0x254);}if(_0xd92cfb[_0x4b366b(0x1b6,0x19e,0x1cb,0x1c9)]!==_0x553164(0x400,0x41b,0x3cd,_0xb92f74._0x159f36))return _0xd92cfb;const _0x23797e=_0x42d51a[_0xbd22e9];function _0x553164(_0x2cc594,_0x2b0359,_0x353c87,_0x330919){return _0x1a7378(_0x353c87,_0x2cc594-0x560,_0x353c87-0xa3,_0x330919-0x110);}return _0xbd22e9+=0x1,structuredClone(_0x23797e);})};}function createAssistantMessageId(_0xa8ed78,_0x100f9a){const _0x35ed9c={_0x3be80e:0x20e},_0x3969ff={_0x284713:0x3e,_0x29e03f:0x86};function _0x578050(_0x1f4367,_0x43bbe3,_0x300cee,_0x17a831){return _0x3b29bd(_0x1f4367-_0x3969ff._0x284713,_0x1f4367,_0x300cee-_0x3969ff._0x29e03f,_0x300cee- -0x532);}return _0xa8ed78+_0x578050(-0x1de,-0x1a9,-_0x35ed9c._0x3be80e,-0x26b)+_0x100f9a;}function createReasoningMessageId(_0x461b5b){const _0x39e589={_0x5766de:0x583},_0x54e894={_0x1dcafd:0x149,_0x1b3ef3:0x6aa};function _0xdf9d87(_0x18d00a,_0x3407a3,_0x33e761,_0x42eb56){return _0x1f4b8d(_0x18d00a,_0x3407a3-_0x54e894._0x1dcafd,_0x33e761-_0x54e894._0x1b3ef3,_0x42eb56-0xe4);}return _0x461b5b+_0xdf9d87(0x4ff,_0x39e589._0x5766de,0x517,0x52f);}function withMessageId(_0x497e36,_0x94c184){if(_0x497e36['id']===_0x94c184)return _0x497e36;return{..._0x497e36,'id':_0x94c184};}function createAssistantChunkEvent(_0xc5764f,_0x505259){const _0xbade93={_0x4abc18:0x36d,_0x3dcf08:0x381,_0x2a4f80:0x189,_0x4b3611:0x17a,_0x588b43:0x228,_0x1c42cb:0x1f4,_0x3a9e0b:0x131,_0x37905c:0x110,_0x4f95e4:0x1d5,_0x326903:0x1fb},_0x4ded05={_0x401d92:0x60},_0xbb6a8e={_0x56e342:0x541};if(_0xc5764f[_0x187c36(0x365,0x32d,_0xbade93._0x4abc18,_0xbade93._0x3dcf08)]!=='content_delta')return void 0x0;function _0x187c36(_0x3f1275,_0x44fa20,_0x2dd10d,_0xbf0df9){return _0x1f4b8d(_0x3f1275,_0x44fa20-0xb7,_0xbf0df9-_0xbb6a8e._0x56e342,_0xbf0df9-0x177);}function _0x392e5b(_0x49d69f,_0x268ec0,_0x498b2e,_0x1ac3e7){return _0x1f4b8d(_0x498b2e,_0x268ec0-0x11,_0x1ac3e7- -0x10,_0x1ac3e7-_0x4ded05._0x401d92);}if(_0xc5764f[_0x392e5b(-_0xbade93._0x2a4f80,-0x1f3,-_0xbade93._0x4b3611,-0x1e8)]===void 0x0)return void 0x0;return{'type':_0x392e5b(-0x1db,-0x1c0,-_0xbade93._0x588b43,-_0xbade93._0x1c42cb),'index':_0xc5764f[_0x392e5b(-_0xbade93._0x3a9e0b,-0x16d,-_0xbade93._0x37905c,-0x178)]??0x0,'messageId':_0x505259,'chunk':{'type':_0x392e5b(-0x1eb,-_0xbade93._0x4f95e4,-_0xbade93._0x326903,-0x1bf),'index':_0xc5764f['index']??0x0,'text':_0xc5764f[_0x187c36(0x302,0x33f,0x336,0x369)]}};}function createToolUseChunkEvent(_0x39a3f1,_0x28ddc6){const _0x4b9b06={_0x42c726:0x173,_0x2e954c:0x181,_0x28bee2:0x129,_0x5b8725:0x19c,_0x4aad86:0x202,_0x39ac36:0x1fb,_0x4b5b1b:0x19d,_0x2051ff:0x1c5,_0x36617d:0x2ab,_0x1512ea:0x300,_0x25d3ea:0x2a4,_0x4741db:0x3bd,_0x141c7f:0x381,_0x5a712c:0x348,_0x4f5188:0x1f0,_0x9eb8cc:0x21f,_0x5299a9:0x178,_0x29b9c8:0x16d,_0x329742:0x172,_0x459042:0x178,_0xe705ec:0x121},_0x15e527={_0x3e19cd:0xed},_0x2ac3e8={_0x4d758f:0x14c};function _0x524294(_0x4660c0,_0x306028,_0x210084,_0x2a74de){return _0x1f4b8d(_0x306028,_0x306028-0xcf,_0x4660c0-0x36a,_0x2a74de-_0x2ac3e8._0x4d758f);}function _0x6b13cd(_0x1f65f0,_0x43e22f,_0x285463,_0x5bec16){return _0x3b29bd(_0x1f65f0-0x67,_0x285463,_0x285463-_0x15e527._0x3e19cd,_0x43e22f- -0x1a);}if(_0x39a3f1[_0x524294(0x1aa,0x1f5,0x1ba,_0x4b9b06._0x42c726)]!==_0x524294(_0x4b9b06._0x2e954c,0x1a9,_0x4b9b06._0x28bee2,_0x4b9b06._0x5b8725))return void 0x0;return{'type':'tool_use_chunk','index':_0x39a3f1[_0x524294(_0x4b9b06._0x4aad86,_0x4b9b06._0x39ac36,_0x4b9b06._0x4b5b1b,_0x4b9b06._0x2051ff)]??0x0,'messageId':_0x28ddc6,'chunk':{'type':_0x6b13cd(_0x4b9b06._0x36617d,_0x4b9b06._0x1512ea,0x325,_0x4b9b06._0x25d3ea),'id':_0x39a3f1['id']??'','index':_0x39a3f1[_0x6b13cd(_0x4b9b06._0x4741db,_0x4b9b06._0x141c7f,0x313,_0x4b9b06._0x5a712c)]??0x0,..._0x39a3f1[_0x524294(_0x4b9b06._0x4f5188,0x1c6,0x221,_0x4b9b06._0x9eb8cc)]!==void 0x0?{'name':_0x39a3f1['name']}:{},..._0x39a3f1[_0x524294(_0x4b9b06._0x5299a9,0x154,_0x4b9b06._0x29b9c8,_0x4b9b06._0x329742)]!==void 0x0?{'inputDelta':_0x39a3f1[_0x524294(_0x4b9b06._0x459042,0x176,0x169,_0x4b9b06._0xe705ec)]}:{}}};}function _0x1f4b8d(_0x48f53e,_0x436b58,_0x44758b,_0x1132d4){const _0x5a0782={_0x4c1ed8:0x2cb};return _0x17cd(_0x44758b- -_0x5a0782._0x4c1ed8,_0x48f53e);}function createReasoningChunkEvent(_0x3ce9de,_0x283bf0){const _0x97569b={_0x7afe82:0x444,_0x3d4bc5:0x4e3,_0x282ee6:0x492,_0x1a6126:0x51e,_0x236817:0x4c5,_0xbbcfaa:0x4d3,_0x1dce0c:0x311,_0x51d05d:0x38d,_0x1b3ecc:0x327,_0xbfc2d1:0x4df,_0x3ec38d:0x4b3,_0x5f2e3e:0x458,_0x474ed3:0x44b,_0x14fb78:0x48c,_0x2f703c:0x47c,_0x2a5d03:0x4e7,_0x1eba5f:0x54f,_0x59355c:0x489,_0x3daa18:0x52b,_0x2e6e59:0x4f8,_0x524188:0x2cf,_0x2f39ef:0x33e,_0x1bc50b:0x4f3,_0x2b4107:0x487,_0x2713c8:0x2f8,_0x3a0104:0x29c,_0x2b00af:0x2bc,_0x43e9de:0x411,_0x1345f4:0x470,_0x10ee2d:0x45d,_0x83242b:0x4ca,_0x53722b:0x4a1,_0x170a60:0x42f,_0x3a82f0:0x418,_0x33590d:0x4d9},_0x1499b1={_0x1a03b7:0x10d},_0x580988={_0x46d87b:0xde,_0x1d9af9:0x42};function _0x6fb16b(_0x2c914d,_0x4e40c8,_0x59f64b,_0x1a19a4){return _0x3b29bd(_0x2c914d-_0x580988._0x46d87b,_0x2c914d,_0x59f64b-0xec,_0x1a19a4- -_0x580988._0x1d9af9);}function _0x26e9b8(_0x4ab79c,_0x5ef76d,_0x1bc36d,_0x59b197){return _0x3b29bd(_0x4ab79c-_0x1499b1._0x1a03b7,_0x4ab79c,_0x1bc36d-0xae,_0x5ef76d-0x14a);}switch(_0x3ce9de[_0x26e9b8(0x465,0x48d,_0x97569b._0x7afe82,0x48d)]){case _0x26e9b8(0x491,_0x97569b._0x3d4bc5,_0x97569b._0x282ee6,0x4a7):return{'type':'reasoning_chunk','index':_0x3ce9de['index'],'messageId':_0x283bf0,'chunk':{'type':_0x26e9b8(_0x97569b._0x1a6126,_0x97569b._0x3d4bc5,_0x97569b._0x236817,_0x97569b._0xbbcfaa),'index':_0x3ce9de['index']??0x0,'thinking':_0x3ce9de[_0x6fb16b(_0x97569b._0x1dce0c,_0x97569b._0x51d05d,0x36d,_0x97569b._0x1b3ecc)]??''},'text':_0x3ce9de[_0x26e9b8(_0x97569b._0xbfc2d1,_0x97569b._0x3ec38d,_0x97569b._0x5f2e3e,0x51e)]??''};case'openai_reasoning_delta':return{'type':_0x26e9b8(_0x97569b._0x474ed3,0x448,0x447,_0x97569b._0x14fb78),'index':_0x3ce9de[_0x26e9b8(_0x97569b._0x2f703c,_0x97569b._0x2a5d03,0x4b4,_0x97569b._0x1eba5f)],'messageId':_0x283bf0,'chunk':{'type':_0x26e9b8(0x4cd,_0x97569b._0x59355c,0x4be,0x4a2),'contentIndex':_0x3ce9de[_0x26e9b8(_0x97569b._0x3daa18,_0x97569b._0x2a5d03,_0x97569b._0x2e6e59,0x519)]??0x0,'delta':_0x3ce9de['delta']??'','itemId':_0x3ce9de[_0x6fb16b(0x398,0x35e,_0x97569b._0x524188,_0x97569b._0x2f39ef)]??'','outputIndex':_0x3ce9de['outputIndex']??0x0},'text':_0x3ce9de['delta']??''};case _0x26e9b8(_0x97569b._0x1bc50b,_0x97569b._0x2b4107,0x49f,0x4c2):return{'type':_0x6fb16b(_0x97569b._0x2713c8,_0x97569b._0x3a0104,0x263,_0x97569b._0x2b00af),'index':_0x3ce9de['summaryIndex'],'messageId':_0x283bf0,'chunk':{'type':'openai_reasoning_summary_delta','delta':_0x3ce9de[_0x26e9b8(_0x97569b._0x43e9de,_0x97569b._0x1345f4,0x44b,_0x97569b._0x10ee2d)]??'','itemId':_0x3ce9de[_0x26e9b8(0x505,_0x97569b._0x83242b,0x49f,_0x97569b._0x53722b)]??'','outputIndex':_0x3ce9de['outputIndex']??0x0,'summaryIndex':_0x3ce9de[_0x26e9b8(0x491,0x433,_0x97569b._0x170a60,_0x97569b._0x3a82f0)]??0x0},'text':_0x3ce9de[_0x26e9b8(0x4d4,0x470,0x495,_0x97569b._0x33590d)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x24cac4){const _0x2f6d4a={_0x498e9a:0x107,_0x1b6607:0x12d,_0x4db4ae:0x2d2,_0x2633c0:0x319},_0x48b7c3={_0x5769c2:0x16,_0x1d934a:0x4a5},_0x543837={_0xdde800:0x162};function _0x3d7025(_0x482497,_0x11b7b0,_0x294166,_0xfb36f1){return _0x3b29bd(_0x482497-0xb5,_0x11b7b0,_0x294166-_0x543837._0xdde800,_0x294166- -0x1ca);}function _0x6b07ad(_0x43664d,_0x36dccb,_0x22630f,_0x5c694d){return _0x1f4b8d(_0x22630f,_0x36dccb-_0x48b7c3._0x5769c2,_0x5c694d-_0x48b7c3._0x1d934a,_0x5c694d-0x70);}return _0x24cac4['status']===_0x3d7025(0x176,0x9d,_0x2f6d4a._0x498e9a,_0x2f6d4a._0x1b6607)&&_0x24cac4['structured'][_0x6b07ad(0x308,0x2fe,_0x2f6d4a._0x4db4ae,_0x2f6d4a._0x2633c0)]===!![];}async function executeModelRequest(_0x28872a,_0x33d514,_0x3919d9,_0x48eb3c,_0x56e6d9,_0x3a9c88){const _0x709d40={_0x4179b0:0x3fd,_0x3cc6dc:0x430,_0x3270a4:0x3ea,_0x5b4f5f:0x3f4,_0xd280d9:0x3d2,_0x58f040:0x2ec,_0x412d04:0x2b7,_0x2c1cd9:0x2d1,_0x3ee97a:0x318,_0x2ad282:0x340,_0x6eac7a:0x370,_0x1222a5:0x396,_0x53680a:0x42f,_0x3b5a2c:0x36c,_0x2621d7:0x327,_0x3142a8:0x446,_0x360d5d:0x349,_0x4e8eff:0x313,_0x3fc181:0x37d,_0xc80ef6:0x318,_0x6b4396:0x32d,_0x479388:0x482,_0x4f1923:0x4bb,_0x224e90:0x4ee,_0x58e6cc:0x48b,_0x2936d1:0x45f,_0x50d27d:0x448,_0x5b85f8:0x377,_0x4e9f63:0x3bf,_0xd5f43b:0x2fb,_0x88f3e8:0x2c9,_0x4d2036:0x415,_0x43c26e:0x44b,_0x1fc642:0x3a3,_0x1a18fa:0x418,_0x3d382f:0x3d3,_0xb3b1fe:0x440,_0x3de4a5:0x3de,_0x5d8f65:0x417,_0x17095b:0x390,_0x58d63f:0x3bd,_0x26a5af:0x41d,_0x5c5420:0x470,_0xb7750a:0x376,_0x506c0b:0x426,_0x15e933:0x420,_0x125525:0x34f,_0x22e9e0:0x45d,_0x248ca5:0x464,_0x4d00a2:0x48b,_0x4d8a6b:0x469,_0x59cf77:0x423,_0x46b358:0x2ea,_0x341a02:0x304,_0x263f2e:0x38c,_0x12888b:0x43c,_0xcd9e6c:0x390,_0x5f3928:0x495,_0x48655a:0x425,_0x5f4acc:0x45a,_0x3d7f9b:0x4a1,_0x3ec957:0x3ab,_0x1fc351:0x3c9,_0x1b22d9:0x38a},_0x3d9f7b={_0x598071:0x600,_0xbe6dfb:0xfb},_0xcd00e2={_0x139248:0x7d};function _0x20b86b(_0x3d6ee8,_0x11b88c,_0x232ddb,_0x53381f){return _0x1f4b8d(_0x232ddb,_0x11b88c-0x13b,_0x53381f-0x536,_0x53381f-_0xcd00e2._0x139248);}throwIfAborted(_0x33d514[_0x20b86b(0x36b,0x35c,0x331,0x318)]);function _0x14e846(_0xac577c,_0x2dd28a,_0x53e979,_0x4a85c4){return _0x1f4b8d(_0x4a85c4,_0x2dd28a-0x14a,_0x2dd28a-_0x3d9f7b._0x598071,_0x4a85c4-_0x3d9f7b._0xbe6dfb);}if(!_0x33d514[_0x14e846(_0x709d40._0x4179b0,_0x709d40._0x3cc6dc,0x3dc,0x495)]||!_0x3919d9[_0x20b86b(_0x709d40._0x3270a4,_0x709d40._0x5b4f5f,0x3ac,_0x709d40._0xd280d9)])return await _0x3919d9['complete'](_0x28872a,{'signal':_0x33d514[_0x20b86b(0x315,0x2cd,_0x709d40._0x58f040,0x318)]});let _0x176fd5;for await(const _0x594bdd of _0x3919d9['stream'](_0x28872a,{'signal':_0x33d514['signal']})){throwIfAborted(_0x33d514[_0x20b86b(0x30e,_0x709d40._0x412d04,_0x709d40._0x2c1cd9,_0x709d40._0x3ee97a)]);if(_0x594bdd[_0x20b86b(_0x709d40._0x2ad282,0x387,0x340,0x376)]===_0x20b86b(_0x709d40._0x6eac7a,_0x709d40._0x1222a5,_0x709d40._0x53680a,0x3c3)){_0x3a9c88[_0x20b86b(_0x709d40._0x3b5a2c,0x383,_0x709d40._0x2621d7,0x32d)][_0x14e846(0x3dc,_0x709d40._0x3142a8,0x466,0x47e)]!==void 0x0&&_0x3a9c88['meta'][_0x20b86b(0x376,0x419,_0x709d40._0x360d5d,0x3af)]===void 0x0&&(_0x3a9c88[_0x20b86b(_0x709d40._0x4e8eff,_0x709d40._0x3fc181,_0x709d40._0xc80ef6,_0x709d40._0x6b4396)][_0x14e846(_0x709d40._0x479388,0x479,0x49d,_0x709d40._0x4f1923)]=Date[_0x14e846(_0x709d40._0x224e90,_0x709d40._0x58e6cc,_0x709d40._0x2936d1,0x4d6)]());_0x176fd5=_0x594bdd[_0x14e846(0x421,_0x709d40._0x50d27d,0x450,0x48e)];continue;}if(_0x594bdd['type']===_0x20b86b(0x329,_0x709d40._0x5b85f8,_0x709d40._0x4e9f63,0x395)){await emitEvent2(_0x48eb3c[_0x20b86b(0x30d,_0x709d40._0xd5f43b,_0x709d40._0x88f3e8,0x2ff)],{'type':_0x20b86b(0x35f,0x3af,_0x709d40._0x3270a4,0x395),'assistantMessageId':_0x3a9c88['assistantMessageId'],'reasoningMessageId':_0x3a9c88['reasoningMessageId']},_0x56e6d9),delete _0x3a9c88['meta'][_0x14e846(0x49a,_0x709d40._0x3142a8,_0x709d40._0x4d2036,_0x709d40._0x43c26e)],delete _0x3a9c88[_0x14e846(0x3c9,0x3f7,_0x709d40._0x1fc642,_0x709d40._0x1a18fa)]['reasoningCompletedAt'];continue;}if(_0x594bdd[_0x14e846(_0x709d40._0x3d382f,_0x709d40._0xb3b1fe,_0x709d40._0x3de4a5,_0x709d40._0x5d8f65)]===_0x20b86b(_0x709d40._0x17095b,0x351,0x406,_0x709d40._0x58d63f)){await emitEvent2(_0x48eb3c['onEvent'],{..._0x594bdd,'assistantMessageId':_0x3a9c88[_0x14e846(0x3b6,_0x709d40._0x26a5af,0x417,_0x709d40._0x5c5420)]},_0x56e6d9);continue;}const _0x222082=createReasoningChunkEvent(_0x594bdd,_0x3a9c88['reasoningMessageId']);if(_0x222082&&_0x222082[_0x20b86b(_0x709d40._0x3de4a5,0x389,0x390,_0x709d40._0xb7750a)]==='reasoning_chunk'&&_0x222082[_0x14e846(_0x709d40._0x506c0b,0x428,0x475,_0x709d40._0x15e933)]['length']>0x0){_0x3a9c88['meta'][_0x20b86b(0x30f,0x38f,_0x709d40._0x125525,0x37c)]===void 0x0&&(_0x3a9c88['meta'][_0x14e846(0x44c,0x446,0x434,_0x709d40._0x22e9e0)]=Date[_0x14e846(_0x709d40._0x248ca5,_0x709d40._0x4d00a2,_0x709d40._0x4d8a6b,0x4b8)]());await emitEvent2(_0x48eb3c[_0x14e846(0x40c,0x3c9,_0x709d40._0x59cf77,0x3d9)],_0x222082,_0x56e6d9);continue;}const _0xf5abf9=createAssistantChunkEvent(_0x594bdd,_0x3a9c88[_0x14e846(0x483,_0x709d40._0x26a5af,0x3e0,0x3c9)]);if(_0xf5abf9){_0x3a9c88['meta']['reasoningStartedAt']!==void 0x0&&_0x3a9c88[_0x20b86b(_0x709d40._0x46b358,_0x709d40._0x341a02,_0x709d40._0x263f2e,_0x709d40._0x6b4396)]['reasoningCompletedAt']===void 0x0&&(_0x3a9c88[_0x14e846(0x401,0x3f7,_0x709d40._0x12888b,_0x709d40._0xcd9e6c)][_0x14e846(_0x709d40._0x5f3928,0x479,_0x709d40._0x48655a,0x436)]=Date[_0x14e846(_0x709d40._0x5f4acc,0x48b,0x429,_0x709d40._0x3d7f9b)]());await emitEvent2(_0x48eb3c[_0x14e846(_0x709d40._0x3ec957,_0x709d40._0x1fc351,0x3b6,_0x709d40._0x1b22d9)],_0xf5abf9,_0x56e6d9);continue;}const _0x3fa806=createToolUseChunkEvent(_0x594bdd,_0x3a9c88[_0x14e846(0x3b5,_0x709d40._0x26a5af,0x3b4,0x3b7)]);_0x3fa806&&await emitEvent2(_0x48eb3c['onEvent'],_0x3fa806,_0x56e6d9);}if(!_0x176fd5)throw new Error('Model\x20stream\x20ended\x20without\x20a\x20final\x20response');return _0x176fd5;}function makeTurnGuards(_0x2aa882,_0x2a7b23,_0x305d79,_0x279b18,_0x2acb54){return{async 'stage'(_0x3581ef,_0x409c82){return throwIfAborted(_0x2aa882),await runStage(_0x2a7b23,_0x3581ef,_0x409c82,_0x279b18);},async 'emit'(_0x24e04c){throwIfAborted(_0x2aa882),await emitEvent2(_0x305d79,_0x24e04c,_0x2acb54);},async 'stageUnchecked'(_0x4ddcab,_0x1f6b5f){return await runStage(_0x2a7b23,_0x4ddcab,_0x1f6b5f,_0x279b18);},async 'emitUnchecked'(_0x57c26f){await emitEvent2(_0x305d79,_0x57c26f,_0x2acb54);}};}async function runTurn(_0xe8b94f,_0x21bb5c){const _0x2daf3a={_0x1b5061:0x24d,_0x2dbb23:0x262,_0x91cc5a:0x165,_0x8b9b4:0x24b,_0x110d94:0x1e8,_0x2489f7:0x21b,_0x328f70:0x100,_0x28e174:0xbf,_0x513e41:0x1ab,_0x3b25be:0x17e,_0x44cde1:0x125,_0x4c99cc:0x94,_0x448be7:0x83,_0x3f4f1a:0xb0,_0x5276d6:0x11e,_0x19a3a4:0x170,_0x1f9be0:0x30,_0x1c4b25:0xbf,_0x35f3dc:0x6f,_0x1d948c:0x18d,_0x530e40:0x13e,_0x38564e:0x121,_0x4ba8a1:0x124,_0x30e8e8:0x1d3,_0x1767da:0x17f,_0x4bc69c:0xf4,_0xe9b28a:0x57,_0x3151b2:0xb4,_0x5b8e6f:0x5e,_0x34e37a:0x1e6,_0x474f02:0x1ed,_0x2d63b4:0xb8,_0x39ac1d:0x200,_0x66dd15:0x1cd,_0x379e9a:0x69,_0x3f3166:0x79,_0x27b027:0x1d0,_0xa443d1:0x18e,_0x588a8b:0x15d,_0x43a709:0x10d,_0x112e6f:0xf9,_0x1e6e15:0x8f,_0x1935f9:0x9a,_0x46ef88:0x236,_0x196884:0x256,_0x54f593:0xc8,_0x15b3d6:0x22d,_0x3ec311:0x1da,_0x171369:0x1e4,_0x29eb70:0x1d7,_0x393daf:0x22a,_0x7ab80a:0xd6,_0x47f4e8:0x9d,_0x55b1db:0x8,_0x31d187:0x67,_0x4bcb04:0x157,_0x1d7250:0x19d,_0x1c15a8:0x1e8,_0x1fce84:0x1df,_0x432513:0x2a,_0x12222e:0x152,_0x321e38:0x19,_0x5b6a98:0x67,_0xee30f:0x98,_0x4a902d:0x218,_0x4713df:0x1a2,_0x52410f:0x163,_0x3b9806:0x1d4,_0x163858:0x1dd,_0xe32244:0x1a1,_0x1efaa9:0x1c9,_0x1b020e:0x23e,_0x469bbd:0xe7,_0x38d2e5:0x86,_0x2d6181:0x239,_0x1eaff8:0x198,_0x3da1b3:0x23e,_0x470c19:0x2ae,_0xf81f2f:0x261,_0x1d80d4:0x223,_0x2d3117:0x240,_0x3972ec:0x133,_0x3ffbfe:0xbf,_0x6e7f57:0x1cf,_0x33338d:0x15a,_0x29db51:0xde,_0x3394e2:0x193,_0x4f41cf:0x290,_0x538e10:0x249,_0x4390b0:0x1fb,_0x3bdea2:0x230,_0x110032:0x1e7,_0x8ca130:0x216,_0x5dbdd1:0xa3,_0x31025b:0x53,_0x335e02:0x92,_0x106e2e:0x234,_0x27e8cd:0x1ee,_0x470e0a:0x187,_0x13402d:0x122,_0x33d6da:0xef,_0x2cc129:0x90,_0x51b519:0x11a,_0x583e91:0x64,_0x14a997:0xec,_0x11dd4f:0x252,_0x51b7e9:0x1c5,_0x10171d:0x1b7,_0x976aaf:0x14c,_0x15ec0f:0x215,_0xa06a1a:0x21f,_0x7e64d4:0x186,_0x366b0f:0x16e,_0x1249bf:0x84,_0x25bf68:0xdd,_0x4bb6cf:0x1cf,_0x491675:0x1d1,_0x32d736:0x16b,_0x2c7e9d:0x177,_0x4b5da9:0xaa,_0x17e61f:0x118,_0x532f43:0x173,_0x2d235e:0x1bf,_0x2a51cb:0x1ef,_0x4fe13a:0x204,_0x6ad07d:0x168,_0x3808f1:0x8c,_0x19ca1b:0x1d5,_0x57db98:0x1db,_0x3d61bf:0x16f,_0x199c2f:0x171,_0xdc7e3d:0x6a,_0x437e09:0x17,_0x2d62df:0x6b,_0x4bfa57:0x18f,_0x3d8835:0x1e6,_0xdd9327:0x212,_0x216460:0x222,_0x54611b:0x8c,_0x1e842f:0x1b9,_0xbd3af3:0x17d,_0x443487:0x25,_0xe69c34:0x79},_0x36a010={_0x3bf2a5:0x3d9,_0x39b752:0x39b,_0x34e9d4:0x404,_0x1a851d:0x3d2,_0x7132ab:0x41a,_0x5c6cab:0x3cf,_0x79130:0x432,_0x4cc043:0x454,_0x1590db:0x1ce,_0x299f75:0x1db,_0x52661e:0x457},_0x3bd728={_0x364e96:0x16a,_0x5ee8b8:0x11e},_0x1a4f43={_0x5368dd:0xaa},_0x2a6381={_0x36b30d:0x45},_0x527982={_0x923534:0x1d7},_0x387d6b={_0x159436:0x1d},_0x7e75f7={_0x526d84:0x176,_0x15f198:0x1aa},_0xf933d4=_0x21bb5c[_0x41785e(-_0x2daf3a._0x1b5061,-0x260,-_0x2daf3a._0x2dbb23,-0x253)],_0x33505c=_0xe8b94f[_0x4689c5(-0x138,-0x163,-0x115,-_0x2daf3a._0x91cc5a)]??new AbortController()[_0x41785e(-0x222,-_0x2daf3a._0x8b9b4,-_0x2daf3a._0x110d94,-_0x2daf3a._0x2489f7)],_0x4e2551={'sessionId':_0xe8b94f[_0x4689c5(-_0x2daf3a._0x328f70,-_0x2daf3a._0x28e174,-0xb3,-0x7a)],'turnId':_0xe8b94f[_0x41785e(-_0x2daf3a._0x513e41,-0x1d3,-0x1a4,-0x1a5)],'system':normalizeSystem(_0xe8b94f[_0x4689c5(-0xdf,-_0x2daf3a._0x3b25be,-_0x2daf3a._0x44cde1,-0x145)]),'messages':(_0xe8b94f[_0x4689c5(-_0x2daf3a._0x4c99cc,-_0x2daf3a._0x448be7,-_0x2daf3a._0x3f4f1a,-_0x2daf3a._0x5276d6)]??[])[_0x41785e(-0x1e3,-0x1d4,-0x189,-_0x2daf3a._0x19a3a4)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x21bb5c[_0x4689c5(-_0x2daf3a._0x1f9be0,-_0x2daf3a._0x1c4b25,-_0x2daf3a._0x35f3dc,-0xae)]===_0x4689c5(-_0x2daf3a._0x1d948c,-_0x2daf3a._0x530e40,-_0x2daf3a._0x38564e,-_0x2daf3a._0x4ba8a1)?_0x21bb5c['sessionDir']():_0x21bb5c['sessionDir']};function _0x4689c5(_0x3ec162,_0x241122,_0x4683d9,_0x2b6e96){return _0x1f4b8d(_0x2b6e96,_0x241122-_0x7e75f7._0x526d84,_0x4683d9-0x109,_0x2b6e96-_0x7e75f7._0x15f198);}const _0x2497f0=makeExtensionContext(_0x4e2551),_0x475e34={'sessionId':_0x4e2551['sessionId'],'turnId':_0x4e2551[_0x41785e(-0x234,-_0x2daf3a._0x30e8e8,-_0x2daf3a._0x1767da,-0x213)],'state':_0x4e2551,'signal':_0x33505c,..._0x21bb5c['askUser']?{'askUser':_0x21bb5c[_0x4689c5(-0x113,-0xcc,-0xb6,-_0x2daf3a._0x4bc69c)]}:{},..._0x21bb5c['setTopic']?{'setTopic':_0x21bb5c['setTopic']}:{}},{stage:_0x1c9d67,emit:_0x1e984d,stageUnchecked:_0x4deb03,emitUnchecked:_0x5ab86d}=makeTurnGuards(_0x33505c,_0x21bb5c[_0x4689c5(-_0x2daf3a._0xe9b28a,-0x11a,-_0x2daf3a._0x3151b2,-_0x2daf3a._0x5b8e6f)],_0x21bb5c['onEvent'],_0x2497f0,_0x475e34);function _0x41785e(_0x9b7e2b,_0x51a961,_0x228028,_0x276fb8){return _0x1f4b8d(_0x276fb8,_0x51a961-0x53,_0x51a961- -0x2d,_0x276fb8-_0x387d6b._0x159436);}const _0x1fd085=async(_0x22dc77,_0x248f40)=>{function _0x24c33d(_0x1899ee,_0x1ed563,_0x2dfbca,_0x89349){return _0x4689c5(_0x1899ee-_0x527982._0x923534,_0x1ed563-0xb2,_0x2dfbca-0x150,_0x89349);}const _0x39de83=_0x248f40?{..._0x2497f0,'turnMeta':_0x248f40}:_0x2497f0;await _0x21bb5c['registry']['runObservers'](_0x24c33d(0x4e,-0x1b,0x18,-_0x2a6381._0x36b30d),structuredClone(_0x22dc77),_0x39de83);},_0x80442c=async _0x400a9b=>{if(!_0xe8b94f[_0x1b4198(0x397,_0x36a010._0x3bf2a5,0x3fe,0x3d0)])return 0x0;const _0xf62f92=await _0xe8b94f[_0x1b4198(_0x36a010._0x39b752,_0x36a010._0x34e9d4,0x3fe,_0x36a010._0x1a851d)]();function _0x1b4198(_0x2b9f84,_0x537194,_0x49f417,_0x5ac6b1){return _0x4689c5(_0x2b9f84-0x18c,_0x537194-_0x1a4f43._0x5368dd,_0x49f417-0x4ba,_0x5ac6b1);}throwIfAborted(_0x33505c);function _0x52fe21(_0xb51318,_0x3c66b0,_0x138577,_0x3cc7fa){return _0x4689c5(_0xb51318-0xb6,_0x3c66b0-_0x3bd728._0x364e96,_0xb51318- -_0x3bd728._0x5ee8b8,_0x3c66b0);}if(_0xf62f92[_0x1b4198(0x428,0x399,0x3bc,0x3de)]===0x0)return 0x0;await _0x400a9b?.();for(const _0x3120bf of _0xf62f92){const _0x2c9090=await _0x1c9d67(_0x1b4198(_0x36a010._0x7132ab,_0x36a010._0x5c6cab,_0x36a010._0x79130,_0x36a010._0x4cc043),normalizeMessage(_0x3120bf));throwIfAborted(_0x33505c),_0x4e2551[_0x52fe21(-_0x36a010._0x1590db,-_0x36a010._0x299f75,-0x1c9,-0x207)][_0x1b4198(0x464,0x4be,_0x36a010._0x52661e,0x48b)](_0x2c9090),await _0x1fd085(_0x2c9090),await _0x1e984d({'type':'user_message','message':_0x2c9090});}return _0xf62f92['length'];};let _0x182994=0x0;try{const _0x575728=await _0x1c9d67('onUserMessage',normalizeMessage(_0xe8b94f['message']));_0x4e2551[_0x41785e(-0x185,-_0x2daf3a._0x34e37a,-0x1d8,-_0x2daf3a._0x474f02)][_0x4689c5(-0x89,-_0x2daf3a._0x2d63b4,-0x63,-0xe)](_0x575728),await _0x1fd085(_0x575728),await _0x1e984d({'type':_0x41785e(-0x1a6,-_0x2daf3a._0x39ac1d,-0x24f,-_0x2daf3a._0x66dd15),'message':_0x575728});while(!![]){throwIfAborted(_0x33505c),_0x182994+=0x1;const _0x353f43=createAssistantMessageId(_0x4e2551[_0x4689c5(-_0x2daf3a._0x379e9a,-0x64,-0x9d,-_0x2daf3a._0x3f3166)],_0x182994),_0x435d4f=createReasoningMessageId(_0x353f43),_0x2d981f={'model':_0xf933d4[_0x41785e(-0x164,-_0x2daf3a._0x27b027,-_0x2daf3a._0xa443d1,-0x1b3)],'modelIdentity':_0xf933d4['modelIdentity'],..._0xf933d4[_0x4689c5(-_0x2daf3a._0x588a8b,-0xfc,-0xf9,-0xdd)]?{'provider':_0xf933d4[_0x4689c5(-0x144,-_0x2daf3a._0x43a709,-_0x2daf3a._0x112e6f,-0xc2)]}:{}};let _0xca3b91={'model':_0xf933d4[_0x4689c5(-_0x2daf3a._0x1e6e15,-0x85,-_0x2daf3a._0x1935f9,-0x5e)],..._0xf933d4[_0x4689c5(-0x60,-0x31,-0x5e,-0x92)]!==void 0x0?{'maxTokens':_0xf933d4['maxTokens']}:{},'system':structuredClone(_0x4e2551[_0x41785e(-_0x2daf3a._0x46ef88,-0x25b,-0x287,-_0x2daf3a._0x196884)]),'messages':structuredClone(_0x4e2551[_0x4689c5(-_0x2daf3a._0x54f593,-0x5c,-_0x2daf3a._0x3f4f1a,-0x104)]),'tools':_0x21bb5c[_0x41785e(-_0x2daf3a._0x15b3d6,-0x23e,-_0x2daf3a._0x3ec311,-0x261)][_0x41785e(-0x1ef,-_0x2daf3a._0x171369,-_0x2daf3a._0x29eb70,-_0x2daf3a._0x8b9b4)](),'metadata':{'sessionId':_0x4e2551[_0x41785e(-0x1d6,-0x1e9,-0x252,-_0x2daf3a._0x393daf)],'turnId':_0x4e2551[_0x4689c5(-_0x2daf3a._0x7ab80a,-0xda,-_0x2daf3a._0x47f4e8,-0x85)],'modelIdentity':_0xf933d4[_0x41785e(-0x20e,-0x20d,-0x24f,-0x241)],..._0xf933d4[_0x4689c5(-_0x2daf3a._0x55b1db,-0x95,-_0x2daf3a._0x31d187,-0x14)]!==void 0x0?{'pricingProviderId':_0xf933d4[_0x41785e(-_0x2daf3a._0x4bcb04,-_0x2daf3a._0x1d7250,-0x14e,-_0x2daf3a._0x1c15a8)]}:{}},..._0x21bb5c[_0x41785e(-0x200,-0x1cc,-_0x2daf3a._0xa443d1,-_0x2daf3a._0x1fce84)]?{'outputFormat':_0x21bb5c[_0x4689c5(-_0x2daf3a._0x432513,-0x49,-0x96,-0x75)]}:{}};_0xca3b91=await _0x1c9d67(_0x4689c5(-0x10c,-0x12b,-0x10e,-_0x2daf3a._0x12222e),_0xca3b91);{const {pricingProviderId:_0xdb0a10,..._0x455387}=_0xca3b91['metadata'];_0xca3b91={..._0xca3b91,'metadata':{..._0x455387,..._0xf933d4['pricingProviderId']!==void 0x0?{'pricingProviderId':_0xf933d4[_0x4689c5(-_0x2daf3a._0x321e38,0x0,-_0x2daf3a._0x5b6a98,-_0x2daf3a._0xee30f)]}:{}}};}await _0x1e984d({'type':'model_request','request':_0xca3b91});const _0x2b304c=Date['now']();_0x2d981f[_0x41785e(-_0x2daf3a._0x4a902d,-0x1ca,-0x1f3,-0x1d7)]=_0x2b304c;let _0x3c2da4=await executeModelRequest(_0xca3b91,_0xe8b94f,_0xf933d4,_0x21bb5c,_0x475e34,{'assistantMessageId':_0x353f43,'reasoningMessageId':_0x435d4f,'meta':_0x2d981f});const _0x302d7f=Date[_0x41785e(-0x181,-_0x2daf3a._0x4713df,-_0x2daf3a._0x52410f,-_0x2daf3a._0x3b9806)]();_0x2d981f[_0x41785e(-0x1b5,-0x206,-_0x2daf3a._0x163858,-_0x2daf3a._0xe32244)]=_0x302d7f,_0x3c2da4=await _0x1c9d67(_0x41785e(-_0x2daf3a._0x1efaa9,-0x1db,-0x1cc,-_0x2daf3a._0x1b020e),_0x3c2da4);_0x3c2da4[_0x4689c5(-_0x2daf3a._0x469bbd,-0x115,-0xa9,-_0x2daf3a._0x38d2e5)]&&(_0x3c2da4={..._0x3c2da4,'providerState':{..._0x3c2da4[_0x41785e(-_0x2daf3a._0x2d6181,-0x1df,-_0x2daf3a._0x1eaff8,-0x1e7)],'originModelIdentity':_0xf933d4[_0x41785e(-0x23f,-0x20d,-0x1b7,-_0x2daf3a._0x3da1b3)]}});_0x3c2da4=withEstimatedModelCost(_0xca3b91,_0x3c2da4);const _0x3e34fa=Math[_0x41785e(-_0x2daf3a._0x470c19,-_0x2daf3a._0xf81f2f,-_0x2daf3a._0x1d80d4,-_0x2daf3a._0x2d3117)](0x0,_0x302d7f-_0x2b304c),_0x8193d2={'version':0x1,'usage':structuredClone(_0x3c2da4[_0x4689c5(-_0x2daf3a._0x3972ec,-_0x2daf3a._0x3ffbfe,-0x103,-0xa7)]),'modelTimeMs':_0x3e34fa},_0xc5d2fb=_0x2240b2=>({..._0x2d981f,'metrics':{..._0x8193d2,'usage':structuredClone(_0x8193d2[_0x4689c5(-0x16f,-0x147,-0x103,-0x123)]),'completesRequest':_0x2240b2}});await _0x1e984d({'type':'model_response','response':_0x3c2da4,'modelTimeMs':_0x3e34fa}),_0x4e2551[_0x41785e(-0x1ac,-0x21b,-0x1c2,-_0x2daf3a._0x6e7f57)]=_0x3c2da4;let _0x378f9e=await _0x1c9d67(_0x4689c5(-0xab,-_0x2daf3a._0x33338d,-0xec,-_0x2daf3a._0x29db51),withMessageId(responseToAssistantMessage(_0x3c2da4),_0x353f43));_0x378f9e=withMessageId(_0x378f9e,_0x353f43);const _0x80e7df=getToolUseBlocks(_0x378f9e),_0x5b8dc1=await Promise[_0x41785e(-0x17e,-0x1c2,-_0x2daf3a._0x3394e2,-0x197)](_0x80e7df[_0x41785e(-0x1ce,-0x1d4,-0x1fe,-0x220)](_0x1d52d8=>_0x1c9d67('beforeToolExecution',_0x1d52d8)));_0x5b8dc1['length']>0x0&&(_0x378f9e=replaceToolUseBlocks(_0x378f9e,_0x5b8dc1));const _0x26f3af=withMessageId(_0x378f9e,_0x353f43);_0x378f9e=_0x26f3af;const _0x2ac97a=createReasoningMessage(_0x378f9e),_0x4023dc=createAssistantTextMessage(_0x378f9e),_0x560605=createToolUseMessage(_0x378f9e);_0x2ac97a&&await _0x1e984d({'type':_0x41785e(-_0x2daf3a._0x4f41cf,-_0x2daf3a._0x538e10,-0x287,-_0x2daf3a._0x4390b0),'message':withMessageId(_0x2ac97a,_0x435d4f)});_0x4023dc&&await _0x1e984d({'type':'assistant_message','message':withMessageId(_0x4023dc,_0x353f43)});_0x560605&&await _0x1e984d({'type':_0x41785e(-0x186,-0x1dd,-0x1fa,-_0x2daf3a._0x3bdea2),'message':withMessageId(_0x560605,_0x353f43)});_0x4e2551[_0x41785e(-0x1b2,-_0x2daf3a._0x34e37a,-0x22e,-0x1c0)]['push'](_0x26f3af);_0x5b8dc1[_0x41785e(-0x1e5,-0x234,-_0x2daf3a._0x110032,-_0x2daf3a._0x8ca130)]>0x0&&await _0x1fd085(_0x26f3af,_0xc5d2fb(![]));for(const _0x156049 of _0x5b8dc1){await _0x1e984d({'type':_0x4689c5(-_0x2daf3a._0x5dbdd1,-_0x2daf3a._0x31025b,-_0x2daf3a._0x335e02,-0xa9),'toolCall':_0x156049});}if(_0x5b8dc1[_0x41785e(-_0x2daf3a._0x474f02,-_0x2daf3a._0x106e2e,-0x200,-0x296)]===0x0){const _0x50fd2c=await _0x80442c(async()=>{await _0x1fd085(_0x26f3af,_0xc5d2fb(![]));});if(_0x50fd2c>0x0)continue;const _0x45a208=await _0x1c9d67(_0x41785e(-_0x2daf3a._0x39ac1d,-0x1f6,-_0x2daf3a._0x27e8cd,-_0x2daf3a._0x470e0a),_0x378f9e),_0x17dd71=withMessageId(_0x45a208,_0x353f43);return _0x4e2551[_0x4689c5(-0x97,-_0x2daf3a._0x13402d,-_0x2daf3a._0x33d6da,-_0x2daf3a._0x2cc129)]=_0x17dd71,_0x4e2551[_0x4689c5(-_0x2daf3a._0x51b519,-_0x2daf3a._0x583e91,-0xb0,-_0x2daf3a._0x14a997)][_0x4e2551[_0x41785e(-_0x2daf3a._0x11dd4f,-0x1e6,-_0x2daf3a._0x51b7e9,-0x236)]['length']-0x1]=_0x17dd71,await _0x1fd085(_0x17dd71,_0xc5d2fb(!![])),await _0x5ab86d({'type':_0x41785e(-0x20c,-_0x2daf3a._0x10171d,-0x1db,-_0x2daf3a._0x976aaf),'message':_0x17dd71}),throwIfAborted(_0x33505c),await _0x21bb5c[_0x41785e(-_0x2daf3a._0x15ec0f,-0x1ea,-_0x2daf3a._0xa06a1a,-_0x2daf3a._0x7e64d4)][_0x41785e(-_0x2daf3a._0x366b0f,-0x1d5,-0x189,-0x1ca)](_0x4689c5(-_0x2daf3a._0x1249bf,-_0x2daf3a._0x25bf68,-0xe6,-0x139),_0x4e2551,_0x2497f0),await _0x1e984d({'type':_0x41785e(-_0x2daf3a._0x4bb6cf,-_0x2daf3a._0x491675,-_0x2daf3a._0x32d736,-_0x2daf3a._0x2c7e9d),'state':_0x4e2551}),{'status':_0x4689c5(-0x8e,-0xc6,-_0x2daf3a._0x4b5da9,-0x71),'finalMessage':_0x17dd71,'state':_0x4e2551};}let _0x331d03=await _0x21bb5c[_0x4689c5(-_0x2daf3a._0x17e61f,-0x139,-0x108,-_0x2daf3a._0x532f43)][_0x41785e(-0x213,-_0x2daf3a._0x2d235e,-_0x2daf3a._0x2a51cb,-0x1d0)](_0x5b8dc1,_0x475e34);const _0x527ec7=_0x331d03[_0x41785e(-_0x2daf3a._0x4fe13a,-0x1c6,-_0x2daf3a._0x6ad07d,-0x177)](isAbortedToolResult),_0x467b69=_0x527ec7?_0x4deb03:_0x1c9d67,_0x340b61=_0x527ec7?_0x5ab86d:_0x1e984d;_0x331d03=await Promise[_0x4689c5(-_0x2daf3a._0x1c4b25,-_0x2daf3a._0x432513,-_0x2daf3a._0x3808f1,-0x7b)](_0x331d03[_0x41785e(-_0x2daf3a._0x19ca1b,-0x1d4,-_0x2daf3a._0xe32244,-_0x2daf3a._0x57db98)](_0x99342e=>_0x467b69(_0x4689c5(-0xa5,-0x84,-0xb5,-0x76),_0x99342e))),_0x4e2551[_0x41785e(-0x1eb,-0x22c,-0x271,-0x1cd)][_0x41785e(-0x207,-0x199,-0x147,-0x1ea)](..._0x331d03);for(const _0x20dab6 of _0x331d03){await _0x340b61({'type':_0x4689c5(-_0x2daf3a._0x3d61bf,-_0x2daf3a._0x199c2f,-0x10c,-0xa3),'result':_0x20dab6});}const _0x3c5ea8=await _0x467b69(_0x4689c5(-_0x2daf3a._0xdc7e3d,-_0x2daf3a._0x437e09,-_0x2daf3a._0x2d62df,-0x41),createToolResultUserMessage(_0x331d03));await _0x340b61({'type':'tool_result_message','message':_0x3c5ea8}),_0x4e2551[_0x41785e(-_0x2daf3a._0x4bfa57,-_0x2daf3a._0x3d8835,-_0x2daf3a._0xdd9327,-_0x2daf3a._0x216460)][_0x41785e(-0x1a7,-0x199,-_0x2daf3a._0x1eaff8,-0x171)](_0x3c5ea8),await _0x1fd085(_0x3c5ea8);if(_0x527ec7)return{'status':_0x4689c5(-_0x2daf3a._0x54611b,-0x55,-0x83,-0xca),'state':_0x4e2551};await _0x80442c();}}catch(_0x33ba38){if(!_0x33505c[_0x41785e(-0x1e2,-_0x2daf3a._0x1e842f,-0x206,-_0x2daf3a._0xbd3af3)])throw new TurnFailedError(_0x33ba38,_0x4e2551);return{'status':_0x4689c5(-0xaf,-_0x2daf3a._0x443487,-0x83,-_0x2daf3a._0xe69c34),'state':_0x4e2551};}}function createSessionId(){const _0x5166e6={_0x37dadf:0x1b9,_0x5ecfca:0x1bd,_0x17b77a:0x13a,_0x37fc80:0xd8,_0x5e900b:0x102},_0x2bf362={_0x5f342e:0xce,_0x53e198:0x227};function _0x5ada59(_0x1afbba,_0x4e2359,_0x13fad9,_0x31de86){return _0x1f4b8d(_0x13fad9,_0x4e2359-0x150,_0x1afbba-0x330,_0x31de86-0x138);}function _0xc949ed(_0x475a57,_0x1a162a,_0x32dcdf,_0x9dfb10){return _0x3b29bd(_0x475a57-_0x2bf362._0x5f342e,_0x9dfb10,_0x32dcdf-0xee,_0x1a162a- -_0x2bf362._0x53e198);}return _0x5ada59(0x1ba,0x195,0x154,_0x5166e6._0x37dadf)+Date[_0xc949ed(0x1be,0x167,_0x5166e6._0x5ecfca,_0x5166e6._0x17b77a)]()+'-'+Math[_0xc949ed(0x137,0x10a,0x157,0xe6)]()[_0xc949ed(0x121,0xc3,0xbe,0xc0)](0x10)[_0xc949ed(_0x5166e6._0x37fc80,0x145,0xd6,_0x5166e6._0x5e900b)](0x2,0xa);}function createTurnId(_0x9bf9e5){return'turn-'+_0x9bf9e5;}function createDefaultMessage(_0x49c5b0){if(_0x49c5b0===void 0x0)return void 0x0;return normalizeUserInput(_0x49c5b0);}function normalizeUserInput(_0x44bb86){const _0x45eac2={_0x36d776:0x2eb,_0x24938a:0x247,_0x47539c:0x2b3,_0x53153c:0x258,_0x54275d:0x285},_0x2a19d7={_0x56aa75:0x14e,_0x5bce89:0xd3},_0x2737c0={_0x523a5b:0x1d4,_0x4a431e:0x595};function _0x5e0c2c(_0x3dea90,_0x517dfb,_0x25ae40,_0x5be0b4){return _0x1f4b8d(_0x3dea90,_0x517dfb-_0x2737c0._0x523a5b,_0x5be0b4-_0x2737c0._0x4a431e,_0x5be0b4-0x6d);}function _0x360a81(_0x75a2d7,_0x4cd7af,_0x33361e,_0x1b5b5b){return _0x3b29bd(_0x75a2d7-0xc5,_0x1b5b5b,_0x33361e-_0x2a19d7._0x56aa75,_0x33361e- -_0x2a19d7._0x5bce89);}if(typeof _0x44bb86==='string')return{'role':_0x360a81(_0x45eac2._0x36d776,_0x45eac2._0x24938a,_0x45eac2._0x47539c,0x321),'content':[{'type':_0x360a81(0x21e,0x222,_0x45eac2._0x53153c,_0x45eac2._0x54275d),'text':_0x44bb86}]};return normalizeMessage(_0x44bb86);}function resolveChatModel(_0x4dc578){const _0x44fa86={_0x1b9102:0xbd,_0x476617:0x104,_0x39d6a2:0x12f},_0x12c0cc={_0x209b1a:0xdd,_0x26f33d:0x151,_0x51bfe2:0x3b8};function _0x5414da(_0x547eff,_0x4e168d,_0xa02531,_0x29d567){return _0x3b29bd(_0x547eff-_0x12c0cc._0x209b1a,_0x547eff,_0xa02531-_0x12c0cc._0x26f33d,_0x4e168d- -_0x12c0cc._0x51bfe2);}function _0x5a1efb(_0x3a6467,_0x1cce7f,_0x477efb,_0x481417){return _0x3b29bd(_0x3a6467-0x80,_0x3a6467,_0x477efb-0x3c,_0x1cce7f-0x110);}if(!_0x4dc578['chatModel'])throw new Error(_0x5414da(-0x7f,-_0x44fa86._0x1b9102,-_0x44fa86._0x476617,-0xd4));return _0x4dc578[_0x5414da(-0xe2,-0xe8,-0x14c,-_0x44fa86._0x39d6a2)];}function _0x5168(){const _0x10a8cc=['B3v0Chv0vg9Rzw5Z','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','CMvXDwvZDenVDw50','C3LZDgvT','BgLZDa','nduYofHkqMDuCG','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','zNvUy3rPB24','mtbRBxLdB0G','ChjVCgvYDgLLCW','A2LUza','y29UDgv4DfDPBMrVD0XPBwL0','Bw9KzwXdywXSq291BNq','Dg90ywXuB2TLBNm','CMvWB3j0zwrdB3n0','zxHLy3v0zq','Aw50zxjUywXmAwzLy3LJBgu','C3LZDgvTuhjVBxb0','yM9VBgvHBG','C2LNBMfS','y2f1C2u','CMvHC29UAw5Nx21LC3nHz2u','y29UDgvUDa','C3vTBwfYEuLUzgv4','Dg9tDhjPBMC','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','yMvMB3jLtw9KzwXszxf1zxn0','yw1VDw50vxnKvgLJA3m','Dg9VBf9Yzxn1Bhq','AxnbCNjHEq','Bwv0CMLJCW','Dg9VBf9YzwPLy3rLza','Dg9VBfj1BNrPBwu','BMv4Da','zMLSDgvY','DMfSDwu','yw55t2y','DxnHz2u','oIb1BMv4CgvJDgvKigzPzwXKici','B3jKzxi','Bwv0yq','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','BgvUz3rO','mtm3uNbVyMDV','CMvHC29UAw5Nx2nODw5R','oIbLEhbLy3rLzcbUDw1Izxi','CMvQzwn0','ChjVDMLKzxi','CNvU','Dg9VBhm','Dg9VBfjLC3vSDhm','CMvHza','zw50CMLLCW','CMvZB2X2zq','Dg90ywXnB2rLBfrPBwvnCW','mtyYnJC1senPBgXA','Dg90ywXpDxrWDxruB2TLBNm','zMLUywXnzxnZywDL','oIbLEhbLy3rLzcb2ywX1zsbTyxrJAgLUzYbHBNLpzIbZy2HLBwe','DhjPBq','yMvMB3jLqxnZAxn0yw50qxbWzw5K','Dg90ywXszwfZB25PBMDuB2TLBNm','C2v0u3LZDgvTuhjVBxb0','Aw5WDxrezwX0yq','z2v0','CMvHC29U','ywz0zxjuDxjUq29TCgXLDgu','BgfZDfjLC3bVBNnL','CMvWB3j0zwrdB3n0q2fSBenVDw50','ywjVCNq','Dg9VBf9VDxrWDxrFy2H1BMS','mte5odC0nMLxzvnODW','Dg9VBf91C2vFzgvSDge','CMvXDwvZDa','Dg9VBf9JB21WBgv0zwq','CMfJzq','C3rYAw5NAwz5','yxnZAxn0yw50x2nODw5R','yxnZAxn0yw50twvZC2fNzuLK','odCYmtLvz0LnuK0','Dw5WCMLJzwrnB2rLBenHBgXdB3vUDa','Bw9KzwXjzgvUDgL0Eq','oMfZC2LZDgfUDdO','Dw5RBM93BL90B29S','zgvSDge','ywrKrxzLBNrmAxn0zw5LCG','zw5HyMXLza','Aw5WDxruB2TLBNm','DhvYBKnVBxbSzxrLzef0','Dgv4Da','C3rYDwn0DxjLza','Dg90ywXdB3n0vxnKvgLJA3m','BNvTyMvY','Dg9VBenHBgXdB3vUDa','DxnLCL9TzxnZywDL','CMfUzg9T','oIbLEhbLy3rLzcbIB29SzwfU','C3rYzwfTAw5N','CgvYBwLZC2LVBKnSyxnZ','zgvWCW','oIbLEhbLy3rLzcbVyMPLy3q','mZzTrNrhsNi','zMLUza','Aw5WDxq','yMvMB3jLrMLUywXpDxrWDxq','zgvMyxvSDe1LC3nHz2u','B2jQzwn0','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','zhjHAw5tDgvLCMLUzW','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','oIb0zxjTAw5HBcbVyNnLCNzLCIaI','Aw5WDxrty2HLBwe','DgHLBG','DhLWzq','yxnRvxnLCG','ywz0zxjuB29SuMvZDwX0','CMvNAxn0CNK','C2vZC2LVBKLK','B3v0Chv0','CMvHC29UAw5Nu3rHCNrLzef0','BwvZC2fNzxm','CMvZCg9UC2u','BgLZDfrVB2Xty2HLBwfZ','CMvZzxrnzxnZywDLCW','mtGZnLH1AfjvyW','nte3odyWmfLUENfpvq','y29TCgXLDgvK','ChjVDMLKzxjtDgf0zq','Dg90ywXszxbVCNrLzenVC3rvC2ruAwnRCW','Dg9VBf91C2vFBwvZC2fNzq','y29UDgvUDf9KzwX0yq','ywz0zxjnB2rLBfjLC3bVBNnL','Dg9VBf9ZDgfYDgvK','iIbMB3iG','B2jZzxj2zxi','C29YDa','zw51Bq','CNvUt2jZzxj2zxjZ','BwfW','DhvYBKLK','ywnXDwLYzq','DhvYBL9JB21WBgv0zq','Bw9KzwW','z2v0q29UDgv4DfDPBMrVD0XPBwL0','ChjVDMLKzxjFC3rYzwfTx3jLC2v0','C2v0vg9VBhm','B3v0Chv0rM9YBwf0','CMvHC29UAw5Nvg9Rzw5Z','DhvYBLn0yxj0zwrbDa','oIbLEhbLy3rLzcbZDhjPBMC','Dg9VBf9JywXS','DgHPBMTPBMC','C29Tzq','zgvZy3jPChrPB24','C2XPy2u','Dg90ywXjBNb1DfrVA2vUCW','ywXS','D3jPDgu','oNjLyxnVBMLUzW','zxHLy3v0zunHBgXZ','B25vC2vYtwvZC2fNzq','Aw5JBhvKzxm','B25uB29Sq2fSBa','DgvYBwLUywW','C2v0u2vZC2LVBKLK','ywjVCNrLza','zxn0Aw1HDgvKq29ZDenHBgXdB3vUDa','zMLUywXFBwvZC2fNzq','BwvZC2fNzq','Dg90ywXfC3rPBwf0zwrdB3n0vxnKvgLJA3m','CMvHC29UAw5Nq29TCgXLDgvKqxq','iIbPCYbHBhjLywr5igvUywjSzwq','zxn0Aw1HDgvKq29ZDa','DhjHBNnMB3jTzxi','AxrLBuLK','CMvNAxn0zxi','C2v0','vw5RBM93BIb0B29SoIa','Bw9KzwXFCMvXDwvZDa','ywrK','DxnLCG','x3n5C3rLBvbYB21WDa','Bw9KzwXdywXSCW','BMfTzq','ChjVDMLKzxjFCMv0CNK','C2vZC2LVBKrPCG','AgfZt3DU','C2vZC2LVBI0','BM93','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','zg9Uzq','Bw9KzwXuAw1Ltxm','C2vUza','ChjPy2LUz1bYB3zPzgvYswq','ndjusfzJAhO','ywX3yxLZlwnVBMzPCM0','Bw9KzwXFCMvZCg9UC2u','ChvZAa','CMvXDwLYzwq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','y29TCgXLDgvZuMvXDwvZDa','Aw5KzxG','Bwf4vg9Rzw5Z','y29UDgvUDeLUzgv4','mZu0nda1B0D4s3P4','C3rYzwfT','ywz0zxjnzxnZywDLqxbWzw5K','C3rYAw5N','C2v0q2HHDe1VzgvS','mtaXntK4nhn6qvjhvq','zxH0zw5ZAw9UCW','Dg9VBhncEu5HBwu','sw52ywXPzcb0B29SigLUChv0igf0ia','AM9PBG','Dg9VBf91C2u','C3rHz2u','B25fDMvUDa','DhvYBKLUzgv4','zM9YrwfJAa','Bwf4','y2HHDe1VzgvS','zxjYB3i'];_0x5168=function(){return _0x10a8cc;};return _0x5168();}function createRegistry(_0x53c600){const _0x370aad={_0x35a91b:0x533,_0x3b04e2:0x4ed,_0x583d59:0x461,_0x54865f:0x42b,_0x2b414a:0x52c,_0x30503c:0x533},_0x5a3c39={_0x445a78:0x49,_0x33007d:0x279},_0xf78270={_0x339ce9:0x1bf,_0x50ac3a:0x6aa,_0x575308:0xe3};if(_0x53c600['registry'])return _0x53c600[_0xa6ed06(0x52e,_0x370aad._0x35a91b,0x51f,_0x370aad._0x3b04e2)];const _0x15aace=createExtensionRegistry();function _0xa6ed06(_0x5a0e79,_0x150016,_0x3d5a84,_0x408491){return _0x1f4b8d(_0x5a0e79,_0x150016-_0xf78270._0x339ce9,_0x408491-_0xf78270._0x50ac3a,_0x408491-_0xf78270._0x575308);}function _0x24a0cb(_0x28aa6b,_0x2a1e9a,_0x31c3ba,_0x2ae875){return _0x3b29bd(_0x28aa6b-0x41,_0x31c3ba,_0x31c3ba-_0x5a3c39._0x445a78,_0x2ae875- -_0x5a3c39._0x33007d);}const _0xaa8cea=_0x53c600[_0xa6ed06(0x4c6,_0x370aad._0x583d59,_0x370aad._0x54865f,0x46d)]??[];for(const _0x5567a6 of _0xaa8cea){_0x15aace[_0xa6ed06(_0x370aad._0x2b414a,_0x370aad._0x30503c,0x4d6,0x528)](_0x5567a6);}return _0x15aace;}var Agent=class{['_systemPrompt'];[_0x1f4b8d(-0x1e5,-0x1b6,-0x1ce,-0x185)];[_0x3b29bd(0x2fa,0x350,0x2c8,0x2f0)];[_0x3b29bd(0x2fd,0x321,0x310,0x347)];[_0x3b29bd(0x366,0x3a3,0x2de,0x34a)];['defaultMessage'];[_0x3b29bd(0x2ff,0x291,0x2d8,0x2cd)];constructor(_0x4a6bc6={}){const _0x377f61={_0x59d5cf:0x1d8,_0x2f0e9f:0x204,_0x48f4c0:0x1ff,_0x5926a9:0x1bb,_0x2de6ac:0x16,_0x2ba014:0x1ce,_0x44ae86:0x21e,_0x220004:0xa8,_0x4286cb:0xa5,_0x18fb88:0xb,_0x235b9b:0x29,_0x22f60c:0x255,_0x3e1f47:0x1b0,_0x5843b6:0x1f6,_0x40ecd3:0xb,_0x2ab789:0x7e,_0x208472:0xac,_0x59b2c8:0x4c,_0x26f4d8:0xb3,_0x2ad24f:0x7e,_0x13b934:0x268,_0x3a701e:0x228,_0x3bc80e:0xdf,_0x10e145:0xd4},_0x71f0a7={_0x5f0f1b:0x4e3,_0x35126f:0x47a,_0x1790d9:0x447},_0x15165d={_0x1337b6:0x19d,_0x52e040:0x133};this[_0x51da68(_0x377f61._0x59d5cf,_0x377f61._0x2f0e9f,0x1c3,_0x377f61._0x48f4c0)]=_0x4a6bc6[_0x51da68(_0x377f61._0x5926a9,0x204,0x214,0x1e6)]??createSessionId(),this[_0xb66ea6(-0x3b,0x30,-0x3d,_0x377f61._0x2de6ac)]=0x0,this['_systemPrompt']=_0x4a6bc6[_0x51da68(0x1b1,0x1a0,0x17a,0x133)]??'',this[_0x51da68(0x210,0x207,_0x377f61._0x2ba014,_0x377f61._0x44ae86)]=(_0x4a6bc6['messages']??[])[_0xb66ea6(_0x377f61._0x220004,0x82,0xa1,_0x377f61._0x4286cb)](normalizeMessage),this['defaultMessage']=createDefaultMessage(_0x4a6bc6['message']),this[_0xb66ea6(_0x377f61._0x18fb88,0x51,_0x377f61._0x235b9b,0x39)]=createAgentMetrics({'getContextWindowLimit':_0x4a6bc6[_0x51da68(_0x377f61._0x22f60c,0x21e,_0x377f61._0x3e1f47,_0x377f61._0x5843b6)]});const _0x3853cb=_0x4a6bc6[_0xb66ea6(_0x377f61._0x40ecd3,0x82,0x6b,0x15)];function _0xb66ea6(_0x5cf5de,_0x32ac5e,_0x454ee7,_0x84de50){return _0x3b29bd(_0x5cf5de-_0x15165d._0x1337b6,_0x32ac5e,_0x454ee7-_0x15165d._0x52e040,_0x84de50- -0x2b7);}const _0x1338b5=async(_0x1fe374,_0x231821)=>{this[_0x4aae72(_0x71f0a7._0x5f0f1b,_0x71f0a7._0x35126f,0x41b,_0x71f0a7._0x1790d9)]['recordEvent'](_0x1fe374);function _0x4aae72(_0x4d408f,_0x14c2dc,_0x1363b2,_0x30b477){return _0x51da68(_0x1363b2,_0x14c2dc-0x2cd,_0x1363b2-0x118,_0x30b477-0x19b);}await _0x3853cb?.(_0x1fe374,_0x231821);},_0x3e7c25=createInternalToolRuntime(_0x4a6bc6[_0xb66ea6(_0x377f61._0x2ab789,_0x377f61._0x208472,0x33,_0x377f61._0x59b2c8)]??[],{'onEvent':_0x1338b5,'onToolCall':_0x4a6bc6['onToolCall']});function _0x51da68(_0x5d4697,_0x452ea5,_0x44dcf2,_0x52de04){return _0x3b29bd(_0x5d4697-0x48,_0x5d4697,_0x44dcf2-0x19f,_0x452ea5- -0x143);}this[_0xb66ea6(0x10,_0x377f61._0x26f4d8,0x99,_0x377f61._0x2ad24f)]={'registry':createRegistry(_0x4a6bc6),'chatModel':resolveChatModel(_0x4a6bc6),'toolRuntime':_0x3e7c25,'askUser':_0x4a6bc6[_0x51da68(0x217,0x201,_0x377f61._0x13b934,_0x377f61._0x3a701e)],'setTopic':_0x4a6bc6['setTopic'],'onEvent':_0x1338b5,'sessionDir':_0x4a6bc6[_0xb66ea6(0xa1,0xb3,_0x377f61._0x3bc80e,_0x377f61._0x10e145)],'outputFormat':_0x4a6bc6['outputFormat']};}get[_0x1f4b8d(-0x20f,-0x238,-0x220,-0x1c0)](){return this['_systemPrompt'];}['setTools'](_0x42f672=[]){const _0x4de208={_0xe75d77:0x2d7,_0x7d7560:0x2af,_0x5b3bd4:0x6e,_0x5b7cd1:0x5,_0x444bb7:0x25,_0x6c5c09:0x3b},_0x28200f={_0x32a3a1:0x42},_0x54d918={_0x237b64:0x17};function _0x52c5d1(_0x661a44,_0x334746,_0xd6fee5,_0x4dffa2){return _0x3b29bd(_0x661a44-0x26,_0x661a44,_0xd6fee5-_0x54d918._0x237b64,_0xd6fee5- -0x33e);}function _0x3997a8(_0x12a101,_0x336601,_0x20746e,_0x4b236d){return _0x1f4b8d(_0x336601,_0x336601-0x7a,_0x20746e- -0x109,_0x4b236d-_0x28200f._0x32a3a1);}this[_0x3997a8(-0x28a,-0x2a9,-_0x4de208._0xe75d77,-_0x4de208._0x7d7560)]['toolRuntime'][_0x52c5d1(_0x4de208._0x5b3bd4,_0x4de208._0x5b7cd1,_0x4de208._0x444bb7,_0x4de208._0x6c5c09)](_0x42f672);}['getTools'](){const _0x10b07d={_0x37dfe2:0x168,_0x4722e5:0xfd,_0x221ed9:0x448},_0x4f51dc={_0x3508e3:0x18b},_0x32eb0f={_0x2df9bc:0xf3};function _0x299172(_0x353d9f,_0x2270c7,_0x700ff3,_0xfa1ee3){return _0x1f4b8d(_0xfa1ee3,_0x2270c7-0xe8,_0x700ff3-0xbf,_0xfa1ee3-_0x32eb0f._0x2df9bc);}function _0x32665e(_0x327ca3,_0xbbd507,_0xf28b75,_0x4037fa){return _0x1f4b8d(_0x327ca3,_0xbbd507-_0x4f51dc._0x3508e3,_0x4037fa-0x63e,_0x4037fa-0x1dd);}return this[_0x299172(-_0x10b07d._0x37dfe2,-_0x10b07d._0x4722e5,-0x10f,-0xb5)][_0x32665e(_0x10b07d._0x221ed9,0x430,0x413,0x42d)][_0x299172(-0x130,-0xd7,-0xf8,-0x116)]();}[_0x1f4b8d(-0x242,-0x204,-0x1f3,-0x1d1)](_0x208beb,_0x30e437={}){const _0x593023={_0x43b0be:0x18d,_0x4ea812:0x221,_0x2278d8:0x226,_0x283946:0x1e7,_0x2b666e:0x224,_0x4e62e8:0x1ea,_0xb88cc9:0x11,_0x5b12f8:0x3},_0x1fcbab={_0x4d149c:0x48},_0x2ddd81={_0x4a6724:0xa8,_0x1ac70c:0x60,_0x472e76:0x56e};function _0x2cf81b(_0x26d069,_0x1a6616,_0x524c2d,_0x1ffc52){return _0x3b29bd(_0x26d069-_0x2ddd81._0x4a6724,_0x26d069,_0x524c2d-_0x2ddd81._0x1ac70c,_0x524c2d- -_0x2ddd81._0x472e76);}function _0x5376ba(_0x5bab86,_0xf07f09,_0x3baa9b,_0x65156b){return _0x3b29bd(_0x5bab86-_0x1fcbab._0x4d149c,_0xf07f09,_0x3baa9b-0xc6,_0x3baa9b- -0x2bc);}this[_0x2cf81b(-0x184,-0x188,-0x1e7,-_0x593023._0x43b0be)]=_0x208beb,_0x30e437[_0x2cf81b(-0x26c,-0x1d2,-_0x593023._0x4ea812,-_0x593023._0x2278d8)]===!![]&&(this[_0x2cf81b(-0x239,-_0x593023._0x283946,-_0x593023._0x2b666e,-_0x593023._0x4e62e8)]=[],this[_0x5376ba(-0x1c,-0x5a,_0x593023._0xb88cc9,-_0x593023._0x5b12f8)]=0x0);}[_0x1f4b8d(-0x1e5,-0x192,-0x18d,-0x190)](_0x35d23b){const _0x3370c0={_0xde77b7:0x47c,_0x4944e3:0x4fd},_0x492485={_0x4fd846:0x687,_0x38f3c1:0x102};function _0x4cd88b(_0xec5282,_0x1e5014,_0x24a2d7,_0x53e52e){return _0x1f4b8d(_0x24a2d7,_0x1e5014-0xc3,_0x53e52e-_0x492485._0x4fd846,_0x53e52e-_0x492485._0x38f3c1);}this[_0x4cd88b(_0x3370c0._0xde77b7,_0x3370c0._0x4944e3,0x50d,0x4cb)]=_0x35d23b;}[_0x1f4b8d(-0x24b,-0x232,-0x23f,-0x1fe)](_0x34be40){const _0x3a0395={_0x43aafa:0x26};function _0xb14e07(_0x516e52,_0x3fc7ce,_0x447a3a,_0x196b1e){return _0x1f4b8d(_0x516e52,_0x3fc7ce-0x48,_0x196b1e-0x1e1,_0x196b1e-0x122);}this[_0xb14e07(-_0x3a0395._0x43aafa,0x66,0x22,0x13)]['chatModel']=_0x34be40;}async[_0x1f4b8d(-0x125,-0x180,-0x171,-0x12a)](_0x34d90f=this[_0x1f4b8d(-0x1c8,-0x19f,-0x1c8,-0x18b)],_0x5a0f34={}){const _0x15e2ce={_0x3a657c:0x31a,_0xc277f0:0x3a7,_0x5202e4:0x3c9,_0x4b5ea6:0x443,_0x28a07d:0x8a,_0x523941:0xa0,_0x112c4e:0x66,_0x47418b:0xd8,_0x593b82:0x3d0,_0x56c1df:0x3da,_0x31f3ea:0x43d,_0x14879e:0x107,_0x32c671:0x10d,_0x550592:0x3ec,_0x49c4d6:0x43a,_0x399adb:0xb0,_0x3f2390:0xa9,_0x52b760:0xca,_0x27fc4b:0x151,_0x5f4d6b:0xa3},_0xb46f86={_0x219ebc:0x593,_0x770e05:0x1ce},_0x140eed={_0x2037e9:0x13a};if(!_0x34d90f)throw new Error(_0x55d8f4(0x32b,_0x15e2ce._0x3a657c,0x363,0x38b));this['turnIndex']+=0x1;function _0x8c843f(_0x4d4077,_0x3fa3ed,_0x46f49c,_0x4b79e9){return _0x1f4b8d(_0x4b79e9,_0x3fa3ed-_0x140eed._0x2037e9,_0x4d4077-0x2c0,_0x4b79e9-0x21);}function _0x55d8f4(_0x5e58aa,_0xe334bc,_0xf9ec48,_0xf3eca7){return _0x1f4b8d(_0xe334bc,_0xe334bc-0x177,_0xf9ec48-_0xb46f86._0x219ebc,_0xf3eca7-_0xb46f86._0x770e05);}const _0x509434=_0x5a0f34[_0x55d8f4(_0x15e2ce._0xc277f0,0x420,0x3ce,_0x15e2ce._0x5202e4)];try{const _0x4c5941=await runTurn({'sessionId':this[_0x55d8f4(0x42d,_0x15e2ce._0x4b5ea6,0x3d7,0x3a1)],'turnId':createTurnId(this[_0x8c843f(_0x15e2ce._0x28a07d,0xca,0x5e,0x47)]),'streaming':_0x5a0f34['streaming'],'signal':_0x5a0f34['signal'],'system':this[_0x8c843f(_0x15e2ce._0x523941,_0x15e2ce._0x112c4e,0x6e,_0x15e2ce._0x47418b)],'messages':this['messages'],'message':normalizeUserInput(_0x34d90f),..._0x509434?{'drainSteering':async()=>(await _0x509434())[_0x8c843f(0x119,0x169,0x13b,0xee)](normalizeUserInput)}:{}},this['deps']);return this[_0x55d8f4(_0x15e2ce._0x593b82,0x397,_0x15e2ce._0x56c1df,_0x15e2ce._0x31f3ea)]=_0x4c5941['state'][_0x8c843f(_0x15e2ce._0x14879e,0x10a,0x10c,_0x15e2ce._0x32c671)][_0x55d8f4(0x436,0x399,_0x15e2ce._0x550592,_0x15e2ce._0x49c4d6)](normalizeMessage),_0x4c5941;}catch(_0x19f2b2){if(_0x19f2b2 instanceof TurnFailedError){this[_0x8c843f(0x107,0x160,_0x15e2ce._0x14879e,0xe2)]=synthesizeMissingToolResults(_0x19f2b2['state'][_0x8c843f(_0x15e2ce._0x14879e,0xc2,_0x15e2ce._0x399adb,_0x15e2ce._0x3f2390)][_0x8c843f(0x119,_0x15e2ce._0x52b760,_0x15e2ce._0x27fc4b,0x153)](normalizeMessage));throw _0x19f2b2[_0x8c843f(_0x15e2ce._0x5f4d6b,0xfb,0x44,0xd4)];}throw _0x19f2b2;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,resolveToolPermissionClass,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};