@nuvin/agent-core 0.0.0-rc.12 → 0.0.0-rc.14

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(_0x384481,_0x3f6227){const _0xba977={_0x56597e:0x1fb,_0x10c547:0x1e7,_0x6b0805:0x199,_0x2edb25:0x1c6,_0x4e0f36:0x1f5,_0x58d0fd:0x1ea,_0x3e0b13:0x195,_0x5d5c33:0x1b1,_0x5b54cb:0x1c6,_0x12c224:0x1e3,_0x2a37e2:0x16f,_0x408339:0x1c8,_0x4b0041:0x177,_0x2da236:0x168,_0x386ef3:0x188,_0x239c1c:0x21c,_0x486f4c:0x234,_0xb9b965:0x154,_0x32dc58:0x195,_0x55cacf:0x19f,_0x505e30:0x114,_0x237026:0x1dd},_0x15a4b1={_0x35149d:0x330},_0x5af72d={_0x31506b:0x4e};function _0x3d157c(_0x3dbe51,_0x50c5aa,_0x400f19,_0x299f3a){return _0xf276(_0x50c5aa-_0x5af72d._0x31506b,_0x299f3a);}function _0x394a4f(_0x5d48bd,_0x9f8499,_0x4a8eb4,_0xc683e2){return _0xf276(_0x5d48bd- -_0x15a4b1._0x35149d,_0xc683e2);}const _0x3ae94d=_0x384481();while(!![]){try{const _0x37f0f7=-parseInt(_0x3d157c(_0xba977._0x56597e,_0xba977._0x10c547,_0xba977._0x6b0805,0x207))/0x1*(-parseInt(_0x394a4f(-0x1d3,-_0xba977._0x2edb25,-0x214,-0x218))/0x2)+parseInt(_0x3d157c(_0xba977._0x4e0f36,0x1a3,_0xba977._0x58d0fd,0x1cf))/0x3+-parseInt(_0x3d157c(0x1e4,0x1b4,_0xba977._0x3e0b13,0x176))/0x4+-parseInt(_0x394a4f(-_0xba977._0x5d5c33,-_0xba977._0x5b54cb,-0x1cc,-_0xba977._0x12c224))/0x5*(-parseInt(_0x3d157c(0x1dd,0x1bd,0x17a,0x17b))/0x6)+-parseInt(_0x394a4f(-_0xba977._0x2a37e2,-_0xba977._0x408339,-0x14c,-0x12d))/0x7*(parseInt(_0x394a4f(-_0xba977._0x4b0041,-_0xba977._0x2da236,-0x174,-_0xba977._0x386ef3))/0x8)+parseInt(_0x394a4f(-0x1de,-_0xba977._0x239c1c,-0x1d3,-_0xba977._0x486f4c))/0x9*(parseInt(_0x394a4f(-_0xba977._0xb9b965,-_0xba977._0x32dc58,-_0xba977._0x55cacf,-_0xba977._0x505e30))/0xa)+-parseInt(_0x394a4f(-0x18c,-0x189,-0x147,-_0xba977._0x237026))/0xb;if(_0x37f0f7===_0x3f6227)break;else _0x3ae94d['push'](_0x3ae94d['shift']());}catch(_0x187940){_0x3ae94d['push'](_0x3ae94d['shift']());}}}(_0x1dcb,0xe57e5));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-SEP4YYY3.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x176a4f){const _0x3cca5a={_0x5423de:0xe5},_0x19bddf={_0x16ddf3:0x37d};function _0x23c8d1(_0x9bac9e,_0x360017,_0x5c9b99,_0x28db71){return _0xf276(_0x5c9b99- -_0x19bddf._0x16ddf3,_0x360017);}function _0x4287e4(_0x271adf,_0x98ae94,_0x28e4a3,_0x4ad2c5){return _0xf276(_0x4ad2c5- -0x271,_0x28e4a3);}return typeof _0x176a4f===_0x4287e4(-0x103,-_0x3cca5a._0x5423de,-0xef,-0xde)&&_0x176a4f!==null&&!Array[_0x23c8d1(-0x1f5,-0x1c8,-0x1e0,-0x1f2)](_0x176a4f);}function isToolOutputEnvelope(_0x22a762){const _0x14068f={_0x153ef8:0x1d9,_0x1e0f5c:0x22b,_0x38ba54:0x71,_0x26d933:0x6f,_0x20c94e:0x2f,_0xc5b4a0:0x92};if(typeof _0x22a762!=='object'||_0x22a762===null||Array[_0x4fd010(0x227,_0x14068f._0x153ef8,0x23f,_0x14068f._0x1e0f5c)](_0x22a762))return![];if(typeof _0x22a762[_0x42189c(0x65,0x7d,_0x14068f._0x38ba54,0x2b)]!==_0x42189c(_0x14068f._0x38ba54,_0x14068f._0x26d933,_0x14068f._0x20c94e,0x20))return![];function _0x42189c(_0xb0a18f,_0x589932,_0x1446ae,_0x3269b6){return _0xf276(_0x1446ae- -0x162,_0x3269b6);}const _0x2c9978=_0x22a762[_0x42189c(0xd3,0x84,_0x14068f._0xc5b4a0,0x75)];function _0x4fd010(_0x1f7929,_0x314b6e,_0x569a74,_0x4c95b5){return _0xf276(_0x4c95b5-0x8e,_0x569a74);}return _0x2c9978===void 0x0||isJsonObject(_0x2c9978);}function validateAgainstSchema(_0x9fdb14,_0x14eb1e,_0x119c65){const _0xa29bd={_0x5b978d:0x26d,_0x2c2b9b:0x290,_0x199b2c:0x26f,_0x1216bb:0x294,_0x4862e0:0x2a7,_0x248db2:0x292,_0x598f98:0x29e,_0x199937:0x281,_0x49eacd:0x297,_0x5ba1f3:0x278,_0x35601e:0x2c6,_0x847ce:0x30e,_0x2ddc33:0x265,_0x20d31e:0x239,_0x4cc830:0x22c,_0x598dfe:0x2b5,_0x372734:0x274,_0xbd26a2:0x302,_0x3a91ff:0x24b,_0x35984c:0x2b4,_0x394492:0x29e,_0x5620a3:0x266,_0x554fd0:0x2ae,_0x36fae1:0x2b2,_0x580ff6:0x29a,_0xabe7b5:0x2af,_0x57bc34:0x2bd,_0x23b6ce:0x2a9,_0x3e9e39:0x2e5,_0x438520:0x29b,_0x461c41:0x2d2,_0x1ed729:0x2a5,_0x4e41da:0x256,_0x3860a4:0x270,_0x21be26:0x2e6,_0x32827f:0x270},_0x557302={_0x9f54c5:0x3fd},_0x47f764={_0x5378f4:0x188,_0x4736f2:0x166},_0x5e842e={_0x4079e6:0x112},_0x565409={_0x83f720:0x116};function _0x5e42bf(_0x737a8,_0x414a02,_0x1b5b30,_0xaf77ae){return _0xf276(_0xaf77ae-_0x565409._0x83f720,_0x414a02);}function _0x5a6055(_0x13d4a0,_0xb066f7,_0x47a979,_0x5bd243){return _0xf276(_0xb066f7-_0x5e842e._0x4079e6,_0x47a979);}switch(_0x119c65[_0x5a6055(_0xa29bd._0x5b978d,0x2b5,0x2fd,_0xa29bd._0x2c2b9b)]){case _0x5e42bf(_0xa29bd._0x199b2c,_0xa29bd._0x1216bb,0x26c,_0xa29bd._0x4862e0):if(typeof _0x14eb1e!=='string')throw new Error(_0x5e42bf(_0xa29bd._0x248db2,0x276,_0xa29bd._0x598f98,_0xa29bd._0x199937)+_0x9fdb14+_0x5e42bf(0x284,_0xa29bd._0x49eacd,_0xa29bd._0x5ba1f3,_0xa29bd._0x35601e));return;case'number':if(typeof _0x14eb1e!==_0x5a6055(0x2cd,_0xa29bd._0x847ce,0x355,0x2d4))throw new Error(_0x5a6055(_0xa29bd._0x2ddc33,0x27d,_0xa29bd._0x20d31e,_0xa29bd._0x4cc830)+_0x9fdb14+_0x5e42bf(_0xa29bd._0x598dfe,0x2f2,_0xa29bd._0x372734,0x2cc));return;case _0x5a6055(0x2ab,0x2e0,_0xa29bd._0xbd26a2,0x2c6):if(typeof _0x14eb1e!=='boolean')throw new Error(_0x5a6055(0x2c6,0x27d,_0xa29bd._0x3a91ff,_0xa29bd._0x35984c)+_0x9fdb14+_0x5e42bf(_0xa29bd._0x394492,0x2ab,0x235,_0xa29bd._0x5620a3));return;case _0x5a6055(0x2ed,_0xa29bd._0x554fd0,0x2ab,_0xa29bd._0x36fae1):if(!Array[_0x5a6055(_0xa29bd._0x580ff6,_0xa29bd._0xabe7b5,_0xa29bd._0x57bc34,0x2a1)](_0x14eb1e))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x9fdb14+_0x5a6055(0x265,_0xa29bd._0x23b6ce,0x301,_0xa29bd._0x3e9e39));_0x14eb1e[_0x5e42bf(0x275,0x2c3,0x255,_0xa29bd._0x438520)]((_0x4e7644,_0x8cd357)=>{function _0x468531(_0x301b5d,_0x343ad2,_0x553c85,_0x2d2449){return _0x5a6055(_0x301b5d-0x197,_0x2d2449-_0x47f764._0x5378f4,_0x553c85,_0x2d2449-_0x47f764._0x4736f2);}validateAgainstSchema(_0x9fdb14+'['+_0x8cd357+']',_0x4e7644,_0x119c65[_0x468531(0x3c0,0x44a,0x444,_0x557302._0x9f54c5)]);});return;case _0x5a6055(_0xa29bd._0x461c41,_0xa29bd._0x1ed729,_0xa29bd._0x4e41da,0x2dd):if(!isJsonObject(_0x14eb1e))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x9fdb14+_0x5e42bf(0x262,_0xa29bd._0x3860a4,0x2c7,0x27a));for(const _0x4d244b of _0x119c65[_0x5e42bf(0x275,_0xa29bd._0x5ba1f3,0x249,0x290)]??[]){if(!(_0x4d244b in _0x14eb1e))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x9fdb14+_0x5e42bf(_0xa29bd._0x21be26,0x29f,_0xa29bd._0x32827f,0x2c8)+_0x4d244b+'\x22');}for(const [_0x299a28,_0x177851]of Object['entries'](_0x119c65[_0x5e42bf(0x2dd,0x2bf,0x319,0x300)])){_0x299a28 in _0x14eb1e&&validateAgainstSchema(_0x9fdb14+'.'+_0x299a28,_0x14eb1e[_0x299a28],_0x177851);}}}function normalizeToolOutputValue(_0x224dd0){const _0x411449={_0x354fd9:0x1d8,_0x462f5d:0x1a9,_0x1cfdca:0x156,_0x4f7276:0x166,_0x287b43:0x1b3,_0x46cde1:0x1fa,_0x5e8303:0x1ba,_0x1a8812:0x1d4,_0xfdaa87:0x209,_0x4d21dc:0x252,_0x338d15:0x236,_0x3bc469:0x21e,_0x243809:0x1d3,_0x3e864e:0x216,_0x2e8019:0x208,_0x3bb396:0x1e9,_0x1774e7:0x1c4,_0x2a41a3:0x201,_0x2307ed:0x20a,_0x39308a:0x1ef,_0x3ac427:0x1bf,_0x12f89b:0x201,_0x46ed8b:0x202},_0x50df5b={_0x4d8989:0x3a7};function _0x4bb42b(_0x5cf0ba,_0xd3216e,_0x2edb3f,_0x471352){return _0xf276(_0xd3216e- -0x37c,_0x471352);}if(isToolOutputEnvelope(_0x224dd0))return{'output':_0x224dd0[_0x4bb42b(-_0x411449._0x354fd9,-_0x411449._0x462f5d,-_0x411449._0x1cfdca,-_0x411449._0x4f7276)],'structured':_0x224dd0[_0x143bfd(-0x1b1,-0x196,-_0x411449._0x287b43,-0x1bf)]??{'value':_0x224dd0[_0x143bfd(-_0x411449._0x46cde1,-_0x411449._0x5e8303,-_0x411449._0x1a8812,-0x226)]},..._0x224dd0[_0x4bb42b(-_0x411449._0xfdaa87,-_0x411449._0x46cde1,-_0x411449._0x4d21dc,-_0x411449._0x338d15)]!==void 0x0?{'content':_0x224dd0[_0x4bb42b(-0x23b,-0x1fa,-_0x411449._0x3bc469,-0x237)]}:{}};if(typeof _0x224dd0===_0x143bfd(-_0x411449._0x243809,-0x208,-_0x411449._0x3e864e,-_0x411449._0x2e8019))return{'output':_0x224dd0,'structured':{'value':_0x224dd0}};if(typeof _0x224dd0===_0x4bb42b(-0x194,-_0x411449._0x3bb396,-0x214,-0x1ef)&&_0x224dd0!==null&&!Array[_0x143bfd(-_0x411449._0x1774e7,-_0x411449._0x2a41a3,-_0x411449._0x2307ed,-_0x411449._0x39308a)](_0x224dd0))return{'output':JSON['stringify'](_0x224dd0,null,0x2),'structured':_0x224dd0};function _0x143bfd(_0x49a11a,_0x285502,_0x8a47b9,_0x4d0b4f){return _0xf276(_0x8a47b9- -_0x50df5b._0x4d8989,_0x4d0b4f);}return{'output':JSON[_0x4bb42b(-0x1c6,-_0x411449._0x3ac427,-_0x411449._0x12f89b,-_0x411449._0x46ed8b)](_0x224dd0,null,0x2),'structured':{'value':_0x224dd0}};}function createToolOutput(_0x12c0e7,_0xe5f04e={'value':_0x12c0e7},_0x47f86d){return{'output':_0x12c0e7,'structured':_0xe5f04e,..._0x47f86d!==void 0x0?{'content':_0x47f86d}:{}};}var ToolExecutionError=class extends Error{[_0x2581b(0x5b8,0x614,0x5fd,0x5d8)];constructor(_0x11ca8c,_0x5079d7={}){const _0x3f7cd8={_0x3c9065:0x1e0,_0x6131e0:0x244,_0xdeeed8:0x170,_0x5a7a54:0x1ae},_0x37ddef={_0x4e4786:0xf7,_0x3d47b9:0x136},_0xa23f0a={_0x2faff1:0x18d,_0xed454e:0x134,_0x19be51:0x747};super(_0x11ca8c),this[_0x59518b(-0x251,-_0x3f7cd8._0x3c9065,-0x204,-_0x3f7cd8._0x6131e0)]='ToolExecutionError';function _0x59518b(_0x523727,_0x3e3f08,_0x367e4c,_0x59a5a5){return _0x2581b(_0x523727-_0xa23f0a._0x2faff1,_0x523727,_0x367e4c-_0xa23f0a._0xed454e,_0x367e4c- -_0xa23f0a._0x19be51);}function _0x456bfd(_0x44ca26,_0x7dcf7d,_0x2859c1,_0x5b17f2){return _0x2581b(_0x44ca26-0x11c,_0x7dcf7d,_0x2859c1-_0x37ddef._0x4e4786,_0x44ca26- -_0x37ddef._0x3d47b9);}this[_0x59518b(-0x1a9,-_0x3f7cd8._0xdeeed8,-0x16f,-_0x3f7cd8._0x5a7a54)]=_0x5079d7;}};function defineTool(_0x283df2){return _0x283df2;}var ToolRegistry=class{[_0x5c95e7(0x58,0x98,0x60,0x69)]=new Map();constructor(_0x5cbc86=[]){const _0xebda4f={_0x141425:0x76,_0x4672e8:0x37},_0x163399={_0x16afb6:0xde};function _0x538afa(_0x3321cc,_0x3e0701,_0x5208cc,_0x501f6e){return _0x2581b(_0x3321cc-_0x163399._0x16afb6,_0x3321cc,_0x5208cc-0x118,_0x501f6e- -0x616);}for(const _0x5c9cec of _0x5cbc86){this[_0x538afa(0x2,-0x6b,-_0xebda4f._0x141425,-_0xebda4f._0x4672e8)](_0x5c9cec);}}[_0x5c95e7(0xd7,0xbd,0xe3,0x11a)](_0x337167){const _0x22b6b8={_0x34cbdd:0x44f,_0x1710b9:0x437,_0x3228ef:0x46a,_0x195620:0x128,_0x166a0e:0x15e,_0x36a9de:0x149},_0x4c11ba={_0x342a3c:0x1d2,_0x1090ff:0x5};function _0x179dc0(_0x4f7d69,_0x3b0834,_0x58d993,_0x304c6a){return _0x5c95e7(_0x4f7d69-0xed,_0x3b0834-_0x4c11ba._0x342a3c,_0x3b0834,_0x304c6a-_0x4c11ba._0x1090ff);}function _0x34e65c(_0x4e81ad,_0x3270ab,_0xc8608a,_0x4bf4c5){return _0x5c95e7(_0x3270ab-0x392,_0x3270ab-0xe5,_0xc8608a,_0x4bf4c5-0xc8);}this['toolsByName'][_0x34e65c(_0x22b6b8._0x34cbdd,_0x22b6b8._0x1710b9,_0x22b6b8._0x3228ef,0x3e3)](_0x337167[_0x179dc0(_0x22b6b8._0x195620,0xf8,_0x22b6b8._0x166a0e,_0x22b6b8._0x36a9de)],_0x337167);}['get'](_0x22d6ff){const _0x307365={_0x298873:0x2f,_0x2af0fa:0x6d,_0x3bb9f3:0x8a,_0x422a68:0x1d},_0x5b2007={_0xa9d2b4:0x8c,_0x47c9d9:0xd7,_0x2fb0f6:0x55},_0x334df7={_0x295100:0x1dc};function _0x285cf1(_0x36cb22,_0x5a578c,_0x61b3d1,_0x22c54a){return _0x2581b(_0x36cb22-_0x334df7._0x295100,_0x61b3d1,_0x61b3d1-0x77,_0x5a578c- -0x295);}function _0x171a42(_0x3e9e6a,_0x2b6e14,_0x46159e,_0x1ec93a){return _0x5c95e7(_0x3e9e6a- -_0x5b2007._0xa9d2b4,_0x2b6e14-_0x5b2007._0x47c9d9,_0x1ec93a,_0x1ec93a-_0x5b2007._0x2fb0f6);}return this[_0x171a42(-0x34,-0x60,-_0x307365._0x298873,-0x1e)][_0x171a42(-0x33,-_0x307365._0x2af0fa,-_0x307365._0x3bb9f3,_0x307365._0x422a68)](_0x22d6ff);}[_0x5c95e7(0x93,0x80,0xb3,0xd2)](){const _0x5a6f4b={_0x1404f7:0xd7,_0x303de1:0x97,_0x1337af:0x9c},_0x4f7ba4={_0x301730:0x58};function _0x1e4fb7(_0x2e5088,_0x4438c,_0x2c1c7c,_0x208232){return _0x2581b(_0x2e5088-0x29,_0x2e5088,_0x2c1c7c-_0x4f7ba4._0x301730,_0x4438c- -0x637);}return[...this[_0x1e4fb7(-0x96,-_0x5a6f4b._0x1404f7,-_0x5a6f4b._0x303de1,-_0x5a6f4b._0x1337af)]['values']()];}['listToolSchemas'](){const _0x121963={_0x42f7e0:0x144,_0x96660c:0x18b,_0x3a89b1:0x174,_0x4e5b24:0x42c,_0x27ffe5:0x468,_0x3ee925:0x41c},_0x449c65={_0x41a7d7:0x201,_0x58dcc6:0x1bd},_0x573cf8={_0x3d6679:0x410},_0x2ba408={_0x557ffe:0x396};function _0x236f84(_0x34734e,_0x275073,_0x410a66,_0x1cba6a){return _0x5c95e7(_0x1cba6a-_0x2ba408._0x557ffe,_0x275073-0x52,_0x275073,_0x1cba6a-0x17b);}function _0x4c2128(_0x1c474c,_0x3ff222,_0x32dbee,_0x5be27a){return _0x2581b(_0x1c474c-0x19d,_0x5be27a,_0x32dbee-0x8e,_0x32dbee- -_0x573cf8._0x3d6679);}return this[_0x4c2128(0x19c,_0x121963._0x42f7e0,_0x121963._0x96660c,_0x121963._0x3a89b1)]()[_0x236f84(0x3f2,_0x121963._0x4e5b24,_0x121963._0x27ffe5,_0x121963._0x3ee925)](_0x4b4bb9=>{const _0x46044e={_0x531230:0x1e2,_0x2ab4cc:0x105,_0x13bf22:0x35d};function _0x1f5eed(_0x206714,_0x53f6ea,_0x267ea8,_0x685b7c){return _0x4c2128(_0x206714-0x86,_0x53f6ea-0x14d,_0x685b7c-0x14,_0x267ea8);}function _0x34e650(_0x4c1527,_0x7af94a,_0x3f23bf,_0x43fb91){return _0x4c2128(_0x4c1527-_0x46044e._0x531230,_0x7af94a-_0x46044e._0x2ab4cc,_0x4c1527-_0x46044e._0x13bf22,_0x3f23bf);}return{'name':_0x4b4bb9['name'],'description':_0x4b4bb9[_0x1f5eed(_0x449c65._0x41a7d7,0x1c0,0x220,0x1c9)],'input_schema':_0x4b4bb9[_0x1f5eed(0x1df,0x19a,0x208,_0x449c65._0x58dcc6)]};});}};function validateToolInput(_0x2f1c4c,_0x4b1b2d){return validateAgainstSchema('input',_0x2f1c4c,_0x4b1b2d),_0x2f1c4c;}function deriveFinalToolOutput(_0x3ea56f){const _0x86288a={_0x25c900:0x358,_0x411576:0x399,_0x1710da:0x375,_0x2e7999:0x3ae,_0x4bd5a4:0x3ce,_0x2d0f54:0x3a9,_0x3ce82a:0x83,_0x1b4560:0x18,_0x10e249:0x40,_0x2cb842:0x16,_0xad476e:0x33a},_0x252eae={_0x2e88a0:0x9c,_0x346c7d:0x149};if(_0x3ea56f[_0x3235b7(_0x86288a._0x25c900,_0x86288a._0x411576,0x349,_0x86288a._0x1710da)]===0x0)return{'output':'','structured':{}};function _0x3ab18f(_0xb58360,_0x2e98fa,_0x25cc31,_0x29462e){return _0x5c95e7(_0x25cc31- -_0x252eae._0x2e88a0,_0x2e98fa-_0x252eae._0x346c7d,_0x2e98fa,_0x29462e-0x112);}if(_0x3ea56f['length']===0x1)return{'output':_0x3ea56f[0x0]['output'],'structured':_0x3ea56f[0x0][_0x3235b7(_0x86288a._0x2e7999,_0x86288a._0x4bd5a4,_0x86288a._0x2d0f54,0x3b2)],..._0x3ea56f[0x0][_0x3ab18f(-0x2f,-_0x86288a._0x3ce82a,-0x3e,-0x87)]!==void 0x0?{'content':_0x3ea56f[0x0][_0x3ab18f(0x2,-0x4a,-0x3e,-0x23)]}:{}};const _0x10860c=_0x3ea56f['filter'](_0x421ca6=>_0x421ca6[_0x3ab18f(-0x17,-0x32,-0x3e,-0x54)]!==void 0x0);function _0x3235b7(_0x1edabd,_0x460e25,_0x101065,_0x48c38a){return _0x2581b(_0x1edabd-0x9c,_0x460e25,_0x101065-0x10,_0x101065- -0x22f);}return{'output':_0x3ea56f['map'](_0xc5f8b9=>_0xc5f8b9[_0x3ab18f(0x4f,-0x34,0x13,-0x4)])['join'](''),'structured':{'chunks':_0x3ea56f[_0x3ab18f(_0x86288a._0x1b4560,-_0x86288a._0x10e249,-_0x86288a._0x2cb842,-0x26)](_0x15e43f=>_0x15e43f[_0x3235b7(0x390,0x3c4,0x3a9,0x3f4)])},..._0x10860c[_0x3235b7(0x37a,0x320,0x349,_0x86288a._0xad476e)]===0x1?{'content':_0x10860c[0x0]['content']}:{}};}function _0xf276(_0x4ed2bc,_0x3faa01){_0x4ed2bc=_0x4ed2bc-0x14e;const _0x1dcbd7=_0x1dcb();let _0xf276d0=_0x1dcbd7[_0x4ed2bc];if(_0xf276['rwLEHZ']===undefined){var _0x1e225c=function(_0x110a4e){const _0x1b788f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x176a4f='',_0x22a762='';for(let _0x2c9978=0x0,_0x9fdb14,_0x14eb1e,_0x119c65=0x0;_0x14eb1e=_0x110a4e['charAt'](_0x119c65++);~_0x14eb1e&&(_0x9fdb14=_0x2c9978%0x4?_0x9fdb14*0x40+_0x14eb1e:_0x14eb1e,_0x2c9978++%0x4)?_0x176a4f+=String['fromCharCode'](0xff&_0x9fdb14>>(-0x2*_0x2c9978&0x6)):0x0){_0x14eb1e=_0x1b788f['indexOf'](_0x14eb1e);}for(let _0x4e7644=0x0,_0x8cd357=_0x176a4f['length'];_0x4e7644<_0x8cd357;_0x4e7644++){_0x22a762+='%'+('00'+_0x176a4f['charCodeAt'](_0x4e7644)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x22a762);};_0xf276['xuTaKd']=_0x1e225c,_0xf276['BrjpEj']={},_0xf276['rwLEHZ']=!![];}const _0x36b9c2=_0x1dcbd7[0x0],_0xe4572e=_0x4ed2bc+_0x36b9c2,_0xf315a9=_0xf276['BrjpEj'][_0xe4572e];return!_0xf315a9?(_0xf276d0=_0xf276['xuTaKd'](_0xf276d0),_0xf276['BrjpEj'][_0xe4572e]=_0xf276d0):_0xf276d0=_0xf315a9,_0xf276d0;}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x32c6f9,_0x3f858c,_0xe2c336,_0x2cb4d4=[]){const _0x45d21c={_0x16ce7e:0x11d,_0xb66dc8:0xf8,_0x21a537:0x11a,_0x58e321:0xde},_0x53aff7={_0x20c98a:0x6c};function _0x5e51b3(_0xbf0dfc,_0x515af3,_0x187b88,_0x4c91d0){return _0x2581b(_0xbf0dfc-_0x53aff7._0x20c98a,_0xbf0dfc,_0x187b88-0x1a0,_0x4c91d0- -0x676);}function _0x18e301(_0x18fc41,_0x31d8a3,_0x32d28c,_0x2b0ffe){return _0x2581b(_0x18fc41-0x83,_0x32d28c,_0x32d28c-0x1c3,_0x31d8a3- -0x426);}return{'callId':_0x32c6f9['id'],'toolName':_0x32c6f9[_0x18e301(0x14a,_0x45d21c._0x16ce7e,_0x45d21c._0xb66dc8,_0x45d21c._0x21a537)],'status':_0x18e301(0x121,0x11f,_0x45d21c._0x58e321,0x158),'output':_0x3f858c,'structured':_0xe2c336,'chunks':_0x2cb4d4,'meta':createToolMeta()};}function createRejectedToolResult(_0x348853,_0xad8db4){const _0x3b4aa6={_0x57eec5:0x12d,_0x39c69a:0x11f,_0xe4cb9d:0x16a,_0x9498ab:0xc4,_0x5db3b9:0x107,_0x30d965:0x32b,_0x31e74b:0x350,_0x1df0bd:0x3d3,_0x1aae9e:0x3b8,_0x358dc7:0x3a3,_0x19de6b:0x3f4},_0x32a2aa={_0x305e8b:0x54,_0x149953:0x1ad,_0xf35aec:0x1cb},_0x133449={_0x13674d:0x1ab,_0x486948:0x1f},_0x5f3a94=_0xad8db4?.[_0x53b049(_0x3b4aa6._0x57eec5,_0x3b4aa6._0x39c69a,0x152,_0x3b4aa6._0xe4cb9d)]()[_0x53b049(0xe5,_0x3b4aa6._0x9498ab,_0x3b4aa6._0x5db3b9,0x99)]?_0xad8db4:_0x29988b(_0x3b4aa6._0x30d965,_0x3b4aa6._0x31e74b,0x3a8,0x3a5)+_0x348853['name'];function _0x29988b(_0xfd7fce,_0x5a2f7a,_0x18d252,_0x54b833){return _0x5c95e7(_0x5a2f7a-0x2ed,_0x5a2f7a-_0x133449._0x13674d,_0xfd7fce,_0x54b833-_0x133449._0x486948);}function _0x53b049(_0x58c255,_0x194522,_0x2b0c4b,_0x45b714){return _0x5c95e7(_0x194522-_0x32a2aa._0x305e8b,_0x194522-_0x32a2aa._0x149953,_0x45b714,_0x45b714-_0x32a2aa._0xf35aec);}return createErrorToolResult(_0x348853,_0x5f3a94,{'error':'tool_rejected',..._0xad8db4?.[_0x29988b(_0x3b4aa6._0x1df0bd,_0x3b4aa6._0x1aae9e,_0x3b4aa6._0x358dc7,_0x3b4aa6._0x19de6b)]()[_0x29988b(0x339,0x35d,0x37b,0x3a0)]?{'reason':_0xad8db4}:{}});}function createAbortedToolResult(_0x170fed,_0x56ff82,_0x58309c=[]){const _0x58a1cf={_0xf4d663:0x196,_0x767de3:0x1b0,_0x494382:0x1ac,_0x4b4e5f:0x17f,_0x3ec985:0x1b4,_0x4b8faa:0x170},_0x2ad5a4={_0x499e90:0x71,_0x4033aa:0x427},_0xc25a9d={_0x44e519:0xba,_0x2eb9c8:0xd0,_0x18691b:0x78a};function _0x55ad36(_0x408ab4,_0x508cb3,_0x286117,_0x2f96dd){return _0x2581b(_0x408ab4-_0xc25a9d._0x44e519,_0x408ab4,_0x286117-_0xc25a9d._0x2eb9c8,_0x508cb3- -_0xc25a9d._0x18691b);}const _0x15f274=toAbortError(_0x56ff82);function _0x339129(_0x1ab214,_0x9a15b2,_0x406640,_0x2cc9f0){return _0x2581b(_0x1ab214-0x194,_0x406640,_0x406640-_0x2ad5a4._0x499e90,_0x9a15b2- -_0x2ad5a4._0x4033aa);}return createErrorToolResult(_0x170fed,_0x15f274[_0x339129(_0x58a1cf._0xf4d663,_0x58a1cf._0x767de3,0x180,_0x58a1cf._0x494382)],{'error':_0x15f274[_0x55ad36(-_0x58a1cf._0x4b4e5f,-0x1b3,-_0x58a1cf._0x3ec985,-_0x58a1cf._0x4b8faa)],'aborted':!![]},_0x58309c);}function createSuccessToolResult(_0x5d2fe4,_0x2694b7,_0x431c9d){const _0x2e4099={_0x23fd45:0x507,_0x1d94f0:0x4df,_0xa4dbc0:0x4af,_0x1932be:0x586,_0x11d12e:0x546,_0x1768c8:0x574,_0x5a2e09:0x56f,_0x4bcc53:0x22b,_0x290a45:0x1fe,_0x367e66:0x25a,_0x229c12:0x251,_0x5d1d1e:0x1fd},_0x11b228={_0x218a05:0x4a4},_0x442af6={_0x5c95d2:0x290};function _0x2017de(_0x5d3d42,_0x35b99f,_0x50bd8e,_0x1bc28c){return _0x5c95e7(_0x50bd8e- -_0x442af6._0x5c95d2,_0x35b99f-0x19,_0x1bc28c,_0x1bc28c-0xca);}function _0x2e0c00(_0x18b121,_0x58deed,_0x30a2a2,_0x16ded0){return _0x5c95e7(_0x30a2a2-_0x11b228._0x218a05,_0x58deed-0x3b,_0x16ded0,_0x16ded0-0x1c8);}return{'callId':_0x5d2fe4['id'],'toolName':_0x5d2fe4[_0x2e0c00(0x486,_0x2e4099._0x23fd45,_0x2e4099._0x1d94f0,_0x2e4099._0xa4dbc0)],'status':'ok','output':_0x2694b7[_0x2e0c00(0x58d,0x535,0x553,0x519)],'structured':_0x2694b7[_0x2e0c00(_0x2e4099._0x1932be,_0x2e4099._0x11d12e,_0x2e4099._0x1768c8,_0x2e4099._0x5a2e09)],..._0x2694b7[_0x2017de(-_0x2e4099._0x4bcc53,-_0x2e4099._0x290a45,-0x232,-_0x2e4099._0x367e66)]!==void 0x0?{'content':_0x2694b7[_0x2017de(-0x244,-_0x2e4099._0x229c12,-0x232,-_0x2e4099._0x5d1d1e)]}:{},'chunks':_0x431c9d,'meta':createToolMeta()};}function createUnknownToolResult(_0x504002){const _0x5a031e={_0x37740e:0x47b,_0x993863:0x459,_0x89a848:0x1e,_0x579ed4:0x3,_0x33700a:0x59},_0x5e603e={_0x1fb6bf:0x65};function _0x11e9e6(_0x541001,_0x5e3a39,_0xf0fd01,_0xce9f2d){return _0x2581b(_0x541001-0x8f,_0x541001,_0xf0fd01-0xf9,_0xce9f2d- -0xea);}function _0x4d2ef0(_0x4aebb4,_0x4d5189,_0x2cfce0,_0x4e6d65){return _0x5c95e7(_0x2cfce0-0xa,_0x4d5189-_0x5e603e._0x1fb6bf,_0x4d5189,_0x4e6d65-0xc0);}return createErrorToolResult(_0x504002,'Unknown\x20tool:\x20'+_0x504002[_0x11e9e6(_0x5a031e._0x37740e,0x48a,0x49f,_0x5a031e._0x993863)],{'error':_0x4d2ef0(-_0x5a031e._0x89a848,_0x5a031e._0x579ed4,0x34,_0x5a031e._0x33700a)});}function _0x1dcb(){const _0x456a3f=['C2vZC2LVBKrPCG','oIbLEhbLy3rLzcbZDhjPBMC','B3jKzxi','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','B2jZzxj2zxi','ywrK','DgHPBMTPBMC','oIbLEhbLy3rLzcbUDw1Izxi','BgLZDa','C2vZC2LVBKLK','mJC5nZu0ngDQC3nzAG','Dg9VBfj1BNrPBwu','A2LUza','C3rHDhvZ','C3rYAw5NAwz5','ywn0Aw9U','DhvYBI0','CMvHC29UAw5Nx21LC3nHz2u','mJfuD3j5Bva','ywz0zxjuDxjUq29TCgXLDgu','Dg9VBf9Yzxn1Bhq','z2v0q29UDgv4DfDPBMrVD0XPBwL0','Bwv0CMLJCW','Dgv4Da','Aw5WDxq','C3rYzwfTAw5N','C2v0','Dg9tDhjPBMC','Dg9VBf91C2vFBwvZC2fNzq','ywrKrxzLBNrmAxn0zw5LCG','CMfUzg9T','yM9VBgvHBG','zMLUywXFBwvZC2fNzq','Dg9VBfjLC3vSDhm','yMvMB3jLqxnZAxn0yw50qxbWzw5K','y29TCgXLDgvK','B3v0Chv0','CMvHC29U','Aw5WDxrty2HLBwe','y29TCgXLDgu','Dg90ywXpDxrWDxruB2TLBNm','ywz0zxjnzxnZywDLqxbWzw5K','B25vC2vYtwvZC2fNzq','Dg9VBenHBgXdB3vUDa','BMv4Da','nduYnZe5meHrBgHeCW','C3rHDgu','Dg90ywXszwfZB25PBMDuB2TLBNm','DhvYBKLUzgv4','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','zgvZy3jPChrPB24','yxnZAxn0yw50twvZC2fNzuLK','CMvZB2X2zq','C2v0q2HHDe1VzgvS','ywz0zxjnB2rLBfjLC3bVBNnL','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','ywz0zxjuB29SuMvZDwX0','CMvXDwvZDa','AxrLBuLK','ChjVCgvYDgLLCW','DhjHBNnMB3jTzxi','zgvWCW','BM93','CNvUt2jZzxj2zxjZ','DhjPBq','CNvUvhjHBNnMB3jTzxjZ','zMLUywXnzxnZywDL','CMvHC29UAw5Nx2nODw5R','BwvZC2fNzq','C3rYDwn0DxjLza','yMvMB3jLrMLUywXpDxrWDxq','ywjVCNq','zgvSDge','y29UDgvUDeLUzgv4','DMfSDwu','zw5HyMXLza','CMvNAxn0zxi','BNvTyMvY','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','y29UDgv4DfDPBMrVD0XPBwL0','zgvSzxrL','Dw5RBM93BL90B29S','C2v0u2vZC2LVBKLK','oIbLEhbLy3rLzcbIB29SzwfU','oNjLyxnVBMLUzW','ovrss0T4Ca','zxHLy3v0zq','CMvXDwvZDenVDw50','ndu1ndC0n3jWq3LZzq','zgvMyxvSDe1LC3nHz2u','C3rYzwfT','CMvQzwn0','C2LNBMfS','CMfJzq','Bw9KzwXFCMvXDwvZDa','y2HHDe1VzgvS','mJK1neDLBfrzBa','yMvMB3jLvg9VBev4zwn1DgLVBG','BMfTzq','CMvJB3jKrxzLBNq','zxjYB3i','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','AxrLBxm','oIbLEhbLy3rLzcbVyMPLy3q','y29UDgvUDf9KzwX0yq','mtyZmZG2neHOEKzuzG','Aw5WDxruB2TLBNm','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','Bw9KzwW','B25fDMvUDa','sw52ywXPzcb0B29SigLUChv0igf0ia','BwvZC2fNzxm','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','Bw9KzwXFCMvZCg9UC2u','odqZndu5mfn3zgvWCG','DhvYBL9JB21WBgv0zq','CMvNAxn0CNK','Aw5KzxG','y2f1C2u','ywjVCNrLza','y2f0y2G','BgLZDfrVB2Xty2HLBwfZ','Dg9VBf91C2vFzgvSDge','B3v0Chv0vg9Rzw5Z','C2vUza','CMvXDwLYzwq','Dg9VBf91C2vFy2H1BMS','Dg9VBhncEu5HBwu','z2v0','CNvU','nwrtwNnmuW','Aw5WDxrezwX0yq','Dg90ywXjBNb1DfrVA2vUCW','y29UDgvUDa','DxnLCG','zMLSDgvY','zM9YrwfJAa','CMvTB3zLrxzLBNrmAxn0zw5LCG','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','C29Tzq','DhvYBKLK','zg9Uzq','Dg9VBf9JB21WBgv0zwq','Dg9VBf9YzwPLy3rLza','ywXS','C3vTBwfYEuLUzgv4','C29YDa','C3LZDgvT','C3rYAw5N','DgHLBG','B2jQzwn0','BgvUz3rO','x3n5C3rLBvbYB21WDa','CMvZCg9UC2u','oIbLEhbLy3rLzcbHCNjHEq','DxnHz2u','ndDPtNb2swu','C2v0u3LZDgvTuhjVBxb0','B25uB29Sq2fSBa','yxjYyxK','AxnbCNjHEq','C2v0vg9VBhm','Dg9VBf9JywXS','ChvZAa','C3rHz2u','zxHLy3v0zunHBgXZ','DhLWzq','mte1mZq2mJjqwfDMrhu','yxnRvxnLCG','Bwf4vg9Rzw5Z','C3LZDgvTuhjVBxb0','CMv0DxjU','CMvZzxrnzxnZywDLCW','BwfW','Bw9KzwXdywXSq291BNq','C2vZC2LVBI0','C2XPy2u','ChjVDMLKzxjFCMv0CNK'];_0x1dcb=function(){return _0x456a3f;};return _0x1dcb();}function _0x2581b(_0x2a6516,_0x5920c1,_0x5a7ad1,_0x16b9e1){const _0x4f73a2={_0x412efa:0x3e4};return _0xf276(_0x16b9e1-_0x4f73a2._0x412efa,_0x5920c1);}function isDispatchDecision(_0x4dac7c){const _0x1f63fe={_0x5ea94d:0xe0,_0x43a6ef:0x12d,_0x364c2a:0xe5,_0x52b097:0x2a3,_0x4f7e04:0x26f},_0xbcccf={_0x39da07:0x149},_0x1dd2da={_0x23143c:0xe7};function _0x5303df(_0x5ad424,_0x5ea37a,_0x3b6260,_0x2201c5){return _0x5c95e7(_0x5ea37a- -0x168,_0x5ea37a-_0x1dd2da._0x23143c,_0x5ad424,_0x2201c5-0x110);}if(typeof _0x4dac7c!==_0x5303df(-_0x1f63fe._0x5ea94d,-0xf9,-0xba,-_0x1f63fe._0x43a6ef)||_0x4dac7c===null)return![];function _0x92154(_0x477521,_0x36a5b0,_0x11f0a1,_0x4e5ae2){return _0x5c95e7(_0x36a5b0-0x215,_0x36a5b0-_0xbcccf._0x39da07,_0x11f0a1,_0x4e5ae2-0x1b3);}return _0x4dac7c[_0x5303df(-0xf0,-0xce,-0x7c,-_0x1f63fe._0x364c2a)]==='reject'||_0x4dac7c['action']===_0x92154(_0x1f63fe._0x52b097,_0x1f63fe._0x4f7e04,0x258,0x24f);}function normalizeExecutionError(_0x3a2c17){const _0x46cf32={_0x813d71:0x128,_0x3ef94d:0xdd,_0x1072bb:0x110,_0x15f962:0x59d,_0x24e301:0x58d,_0x3cf91b:0x59c,_0x327982:0x549,_0x2f6c83:0x56b},_0x21d83b={_0x3853a0:0x146,_0x520221:0x3b},_0x4b0dea={_0x174aae:0xbf};function _0x13ba6e(_0x294494,_0xfae1a9,_0x48dcc6,_0x45ff54){return _0x2581b(_0x294494-_0x4b0dea._0x174aae,_0xfae1a9,_0x48dcc6-0x5a,_0x45ff54- -0x6c3);}if(_0x3a2c17 instanceof ToolExecutionError)return{'errorMessage':_0x3a2c17[_0x13ba6e(-_0x46cf32._0x813d71,-0x130,-_0x46cf32._0x3ef94d,-0xec)],'structured':{'error':_0x3a2c17[_0x13ba6e(-0x12a,-_0x46cf32._0x1072bb,-0xcb,-0xec)],..._0x3a2c17[_0x285553(_0x46cf32._0x15f962,0x57f,0x57b,_0x46cf32._0x24e301)]}};if(_0x3a2c17 instanceof Error)return{'errorMessage':_0x3a2c17[_0x285553(_0x46cf32._0x3cf91b,_0x46cf32._0x3cf91b,_0x46cf32._0x327982,_0x46cf32._0x2f6c83)],'structured':{'error':_0x3a2c17['message']}};const _0x3ddcb1=String(_0x3a2c17);function _0x285553(_0x5d61b7,_0x2019e0,_0x16971e,_0x55cb26){return _0x2581b(_0x5d61b7-0x118,_0x2019e0,_0x16971e-_0x21d83b._0x3853a0,_0x5d61b7- -_0x21d83b._0x520221);}return{'errorMessage':_0x3ddcb1,'structured':{'error':_0x3ddcb1}};}async function emitEvent(_0x192cf9,_0x4fd899,_0x21f8c2){await _0x192cf9?.(_0x4fd899,_0x21f8c2);}async function resolveDispatchDecision(_0x56a021,_0x1bebee,_0x5a9a92){const _0x2ab25c={_0x138589:0x46b,_0x2ac47f:0x47e,_0x59dfae:0x574,_0x2794f3:0x5b2,_0xa1ccd3:0x54f,_0x25e9fb:0x3e9,_0x2d153e:0x3e3,_0x1d43f9:0x580,_0x311942:0x595,_0x354c61:0x570},_0x8e4c24={_0x3d43ae:0x125,_0x56514b:0x2},_0x2c8d92={_0x424aaa:0x183,_0x51b7a5:0x196,_0x3d8bba:0x12b,_0x20a3dc:0x168,_0xa9e2ed:0x149,_0x34911c:0x1c0,_0x56c295:0x197,_0x573157:0x1bb,_0x1c2776:0x108,_0x44d634:0x15b,_0xe9a73f:0x10b,_0x3eb518:0x3fa,_0xbc861d:0xb7,_0x35df12:0x497,_0x1ac0bd:0x44a},_0x4040ae={_0x261225:0x1d5},_0xd1a902={_0x5ba450:0x3ac,_0x4cc515:0x1dd};function _0x6b4765(_0x41de61,_0x2d2937,_0x1d9019,_0x4ab3e4){return _0x5c95e7(_0x41de61-_0xd1a902._0x5ba450,_0x2d2937-_0xd1a902._0x4cc515,_0x1d9019,_0x4ab3e4-0x1e3);}if(!_0x56a021)return{'action':_0x6b4765(0x406,0x414,0x45b,0x406)};const _0x2ca516=Promise[_0x6b4765(_0x2ab25c._0x138589,0x45e,_0x2ab25c._0x2ac47f,0x4b3)]()[_0x3b0f23(_0x2ab25c._0x59dfae,0x5a1,_0x2ab25c._0x2794f3,_0x2ab25c._0xa1ccd3)](()=>_0x56a021(_0x1bebee,_0x5a9a92));if(!_0x5a9a92['signal']){const _0x3d0ccc=await _0x2ca516;return isDispatchDecision(_0x3d0ccc)?_0x3d0ccc:{'action':_0x6b4765(0x406,0x3cd,_0x2ab25c._0x25e9fb,_0x2ab25c._0x2d153e)};}const _0x4811aa=new Promise((_0x308440,_0x31ef0d)=>{const _0x385b4a={_0x596649:0xfe,_0x51a97f:0x1f0},_0x623f68={_0x5f5c4e:0x212,_0x1ba70f:0x1c4,_0x43885d:0x25a,_0x11f94a:0x282,_0x176efa:0x2d6,_0x4b2e9d:0x2cf},_0x9866bf=()=>{function _0x538f0f(_0x31c334,_0x4c16f4,_0x21408c,_0x37e5f8){return _0xf276(_0x4c16f4- -0x160,_0x37e5f8);}function _0x43b80f(_0x5930ce,_0x2e6304,_0x236978,_0x3d92a1){return _0xf276(_0x5930ce-0x8c,_0x2e6304);}_0x5a9a92[_0x538f0f(0x3f,-0x7,0x4b,0x1c)]?.[_0x43b80f(_0x623f68._0x5f5c4e,0x222,_0x623f68._0x1ba70f,_0x623f68._0x43885d)](_0x43b80f(_0x623f68._0x11f94a,0x263,_0x623f68._0x176efa,_0x623f68._0x4b2e9d),_0x9866bf),_0x31ef0d(toAbortError(_0x5a9a92['signal']?.['reason']));};if(_0x5a9a92[_0xa9b597(-_0x2c8d92._0x424aaa,-0x1c7,-_0x2c8d92._0x51b7a5,-_0x2c8d92._0x3d8bba)]?.[_0xa9b597(-_0x2c8d92._0x20a3dc,-0x12a,-_0x2c8d92._0xa9e2ed,-_0x2c8d92._0x34911c)]){_0x31ef0d(toAbortError(_0x5a9a92[_0xa9b597(-0x183,-0x147,-_0x2c8d92._0x56c295,-_0x2c8d92._0x573157)][_0xa9b597(-_0x2c8d92._0x1c2776,-_0x2c8d92._0x44d634,-0x141,-_0x2c8d92._0xe9a73f)]));return;}function _0x44ed1c(_0xb35432,_0x165a69,_0x197634,_0x3a70bc){return _0x6b4765(_0xb35432-0x19,_0x165a69-0x64,_0x165a69,_0x3a70bc-_0x4040ae._0x261225);}function _0xa9b597(_0x2f2c19,_0x126e5d,_0x3cf779,_0x175ef7){return _0x6b4765(_0x2f2c19- -0x564,_0x126e5d-_0x385b4a._0x596649,_0x175ef7,_0x175ef7-_0x385b4a._0x51a97f);}_0x5a9a92[_0x44ed1c(_0x2c8d92._0x3eb518,0x405,0x40b,0x3e7)]?.[_0xa9b597(-0x110,-0xd5,-_0x2c8d92._0xbc861d,-0x100)](_0x44ed1c(_0x2c8d92._0x35df12,0x4db,_0x2c8d92._0x1ac0bd,0x485),_0x9866bf,{'once':!![]});});function _0x3b0f23(_0x506440,_0x4380cc,_0x58d54c,_0x446944){return _0x2581b(_0x506440-_0x8e4c24._0x3d43ae,_0x446944,_0x58d54c-0x0,_0x506440- -_0x8e4c24._0x56514b);}const _0x5721c2=await Promise[_0x3b0f23(0x53c,_0x2ab25c._0x1d43f9,0x55b,_0x2ab25c._0x311942)]([_0x2ca516,_0x4811aa]);return isDispatchDecision(_0x5721c2)?_0x5721c2:{'action':_0x3b0f23(0x560,0x51b,0x54a,_0x2ab25c._0x354c61)};}async function executeToolCall(_0x3ed505,_0x1e70bc,_0x89bb83,_0x45fe9e,_0x16ab58){const _0x650511={_0x22c2c3:0x19a,_0x3a2faf:0x141,_0x3159cb:0x14a,_0x383699:0xbf,_0x6f7a02:0x1b0,_0x2d3db3:0x1cb,_0x2f7504:0x18f,_0x42e869:0x168,_0x24d3a8:0x17c,_0x4bd47a:0x177,_0x711a65:0x16e,_0x63ebed:0xe1,_0x5dd488:0xd5,_0x22428e:0x135,_0x444454:0x149,_0x45ebc0:0x173,_0x21a681:0x104,_0x357799:0x7d,_0x4c5bb7:0xe2,_0x5a9f78:0x1b1,_0x283be5:0x148,_0x2e078b:0x131,_0x59b90c:0x105,_0x4e8db3:0xea,_0x4abdd2:0xbd,_0x5cdc75:0x19a,_0x5cf642:0x1fa,_0x4a3096:0x195,_0x53795f:0x11b,_0x3083c5:0xed,_0x111174:0x68,_0x144195:0x16b,_0x1790f6:0x1b7,_0x1b5d5c:0x1bb,_0x4fdf74:0x135,_0x11f10d:0x4a,_0x10ba13:0x86,_0x399ed0:0x89,_0x5d3d7f:0xd3,_0x469c95:0x167,_0x77c1c2:0x153,_0x12546b:0xd3},_0x57496f={_0x16e5a0:0x40c,_0x18315a:0x413,_0x321dd4:0x3f7,_0x49a6f0:0xe8},_0x535ac7={_0x148122:0x3d,_0x3babb6:0x4ad},_0xf5d4={_0x1e292f:0xfb},_0x4fb46a={_0x37cd69:0x408},_0x2c3c26={_0x119631:0x113},_0x190790={..._0x89bb83,'toolCallId':_0x1e70bc['id']};throwIfAborted(_0x190790[_0x221291(0x135,0xfa,0xf3,0x11f)]);const _0x60350f=await resolveDispatchDecision(_0x45fe9e,_0x1e70bc,_0x190790);throwIfAborted(_0x190790['signal']);if(_0x60350f[_0x221291(_0x650511._0x22c2c3,0x159,0x1b8,_0x650511._0x3a2faf)]===_0x3a0fb5(-0xf5,-0x106,-_0x650511._0x3159cb,-_0x650511._0x383699)){const _0x1f2006=createRejectedToolResult(_0x1e70bc,_0x60350f[_0x221291(_0x650511._0x6f7a02,0x1eb,_0x650511._0x2d3db3,_0x650511._0x2f7504)]);return await emitEvent(_0x16ab58,{'type':_0x221291(_0x650511._0x42e869,_0x650511._0x24d3a8,_0x650511._0x4bd47a,_0x650511._0x711a65),'toolCall':_0x1e70bc,'result':_0x1f2006},_0x190790),_0x1f2006;}const _0xabb868=_0x3ed505[_0x3a0fb5(-0x89,-_0x650511._0x63ebed,-_0x650511._0x5dd488,-0xc5)](_0x1e70bc['name']);if(!_0xabb868){const _0x52c5b9=createUnknownToolResult(_0x1e70bc);return await emitEvent(_0x16ab58,{'type':'tool_completed','toolCall':_0x1e70bc,'result':_0x52c5b9},_0x190790),_0x52c5b9;}function _0x3a0fb5(_0x20330d,_0x43a12c,_0x38acf8,_0x11b69e){return _0x2581b(_0x20330d-0x159,_0x11b69e,_0x38acf8-_0x2c3c26._0x119631,_0x43a12c- -0x642);}throwIfAborted(_0x190790[_0x221291(_0x650511._0x22428e,_0x650511._0x444454,0x12f,0xf5)]);function _0x221291(_0x5c2bc7,_0x172765,_0x105509,_0x45c653){return _0x2581b(_0x5c2bc7-0x1ed,_0x45c653,_0x105509-0xb3,_0x5c2bc7- -_0x4fb46a._0x37cd69);}await emitEvent(_0x16ab58,{'type':'tool_started','toolCall':_0x1e70bc},_0x190790);try{throwIfAborted(_0x190790[_0x221291(_0x650511._0x22428e,0xef,_0x650511._0x45ebc0,_0x650511._0x21a681)]);const _0x2b1828=validateToolInput(_0x1e70bc[_0x3a0fb5(-0xce,-0x97,-_0x650511._0x357799,-_0x650511._0x4c5bb7)],_0xabb868[_0x221291(_0x650511._0x5a9f78,0x1d1,0x1a7,0x1b7)]),_0x290c75=await _0xabb868[_0x3a0fb5(-0x11c,-0x10b,-0x142,-0x147)](_0x2b1828,_0x190790),_0x5c2ca6=[],_0x3a5813=addAbortListener(_0x190790[_0x3a0fb5(-0x124,-0x105,-0xc3,-_0x650511._0x283be5)],()=>{function _0x444242(_0xb9d90a,_0x11e500,_0x2d181e,_0x43cd85){return _0x3a0fb5(_0xb9d90a-_0xf5d4._0x1e292f,_0x2d181e-0x41,_0x2d181e-0x173,_0xb9d90a);}function _0x5dd272(_0x38a8be,_0x305247,_0x1ee1ee,_0x2cef9b){return _0x3a0fb5(_0x38a8be-_0x535ac7._0x148122,_0x1ee1ee-_0x535ac7._0x3babb6,_0x1ee1ee-0x14a,_0x305247);}void _0x290c75[_0x5dd272(_0x57496f._0x16e5a0,_0x57496f._0x18315a,_0x57496f._0x321dd4,0x445)](void 0x0)[_0x444242(-0x54,-_0x57496f._0x49a6f0,-0xa8,-0xa8)](()=>{});});try{throwIfAborted(_0x190790[_0x3a0fb5(-_0x650511._0x2e078b,-_0x650511._0x59b90c,-_0x650511._0x4e8db3,-_0x650511._0x4abdd2)]);let _0x291d36=await _0x290c75[_0x221291(0x1b7,_0x650511._0x5cdc75,_0x650511._0x5cf642,_0x650511._0x4a3096)]();while(!_0x291d36[_0x221291(0x166,_0x650511._0x53795f,0x12d,0x160)]){throwIfAborted(_0x190790[_0x221291(_0x650511._0x22428e,_0x650511._0x3083c5,0x12e,0xed)]);const _0x9f8318=normalizeToolOutputValue(_0x291d36[_0x3a0fb5(-0x5d,-0x65,-0x1b,-_0x650511._0x111174)]);_0x5c2ca6[_0x221291(0x17c,0x170,_0x650511._0x144195,0x143)](_0x9f8318),await emitEvent(_0x16ab58,{'type':'tool_output_chunk','toolCall':_0x1e70bc,'chunk':_0x9f8318},_0x190790),throwIfAborted(_0x190790['signal']),_0x291d36=await _0x290c75[_0x221291(_0x650511._0x1790f6,_0x650511._0x45ebc0,_0x650511._0x1b5d5c,0x18c)]();}throwIfAborted(_0x190790[_0x221291(_0x650511._0x4fdf74,0x163,0xe8,0xee)]);const _0x5a44fc=_0x291d36[_0x3a0fb5(-_0x650511._0x11f10d,-0x65,-0x7f,-_0x650511._0x10ba13)]===void 0x0?deriveFinalToolOutput(_0x5c2ca6):normalizeToolOutputValue(_0x291d36['value']),_0x97e229=createSuccessToolResult(_0x1e70bc,_0x5a44fc,_0x5c2ca6);return await emitEvent(_0x16ab58,{'type':_0x3a0fb5(-_0x650511._0x399ed0,-_0x650511._0x5d3d7f,-0x12a,-0xfa),'toolCall':_0x1e70bc,'result':_0x97e229},_0x190790),_0x97e229;}catch(_0x2d48dd){if(isAbortError(_0x2d48dd)){const _0x3bc72b=createAbortedToolResult(_0x1e70bc,_0x2d48dd,_0x5c2ca6);return await emitEvent(_0x16ab58,{'type':'tool_completed','toolCall':_0x1e70bc,'result':_0x3bc72b},_0x190790),_0x3bc72b;}const {errorMessage:_0x2f90fd,structured:_0x173f91}=normalizeExecutionError(_0x2d48dd),_0x4379d3=createErrorToolResult(_0x1e70bc,_0x2f90fd,_0x173f91,_0x5c2ca6);return await emitEvent(_0x16ab58,{'type':'tool_completed','toolCall':_0x1e70bc,'result':_0x4379d3},_0x190790),_0x4379d3;}finally{_0x3a5813();}}catch(_0x160d00){if(isAbortError(_0x160d00)){const _0x44a676=createAbortedToolResult(_0x1e70bc,_0x160d00);return await emitEvent(_0x16ab58,{'type':_0x221291(_0x650511._0x469c95,_0x650511._0x77c1c2,0x13a,0x11c),'toolCall':_0x1e70bc,'result':_0x44a676},_0x190790),_0x44a676;}const {errorMessage:_0x31c836,structured:_0x49e36f}=normalizeExecutionError(_0x160d00),_0x37e000=createErrorToolResult(_0x1e70bc,_0x31c836,_0x49e36f);return await emitEvent(_0x16ab58,{'type':_0x3a0fb5(-0x119,-_0x650511._0x12546b,-0xd9,-0xdd),'toolCall':_0x1e70bc,'result':_0x37e000},_0x190790),_0x37e000;}}function createInternalToolRuntime(_0x22ab55=[],_0xfc5a3c={}){const _0x16a77f={_0x18c007:0x3bf,_0x11768b:0x382};let _0x54a4a0=new ToolRegistry(_0x22ab55);return{'listToolSchemas'(){const _0x25644f={_0x3763fc:0x1f3};function _0x5e99dc(_0x346e0d,_0x5ce8d7,_0x24acc5,_0x4f4647){return _0xf276(_0x24acc5-_0x25644f._0x3763fc,_0x346e0d);}return _0x54a4a0[_0x5e99dc(_0x16a77f._0x18c007,0x387,0x369,_0x16a77f._0x11768b)]();},'setTools'(_0x4ec83e){_0x54a4a0=new ToolRegistry(_0x4ec83e);},async 'executeCalls'(_0x3e51ef,_0x2b6a93){const _0x16dc3c={_0x3283e7:0x3ec,_0x3a1c6c:0x3ba},_0x13494={_0x57ed4f:0x22f};return await Promise['all'](_0x3e51ef['map'](async _0x86887=>{function _0x4c06ed(_0x1b515c,_0x3c2b9b,_0x4a245f,_0x13148c){return _0xf276(_0x3c2b9b-_0x13494._0x57ed4f,_0x1b515c);}return await executeToolCall(_0x54a4a0,_0x86887,_0x2b6a93,_0xfc5a3c[_0x4c06ed(_0x16dc3c._0x3283e7,0x3ca,0x401,_0x16dc3c._0x3a1c6c)],_0xfc5a3c['onEvent']);}));},async 'execute'(_0x1a8e58,_0x1dc717){function _0x443042(_0x246dd1,_0x3096d7,_0x589d4c,_0x5c97cb){return _0xf276(_0x246dd1-0x1fe,_0x589d4c);}const [_0x46226b]=await this[_0x443042(0x3a0,0x359,0x3d3,0x3e6)]([_0x1a8e58],_0x1dc717);return _0x46226b;}};}function getOrderedObserverExtensions(_0x408635,_0x302cfa){const _0x3c2c09={_0x4b75fd:0xd5,_0x526db5:0xcd,_0x19ebcc:0x3a0,_0x27e09b:0x367,_0x179b37:0x3aa},_0x4c01f3={_0x4cd343:0x2a3,_0x25c271:0x103,_0x3b6a0b:0xf2,_0x12783a:0x239,_0x265804:0x245},_0x1761a1={_0x163e96:0xd2},_0x1358f5={_0x5a1847:0x17a,_0x31b767:0x54,_0x59d1a7:0x1c9},_0x4ce70b={_0x1edc02:0x167};function _0x22986f(_0x1bd59a,_0x1facbb,_0x2005d0,_0x5e4f1a){return _0x5c95e7(_0x1bd59a- -0x135,_0x1facbb-_0x4ce70b._0x1edc02,_0x5e4f1a,_0x5e4f1a-0x147);}function _0x34143c(_0xea0ab2,_0x184fe3,_0x23924b,_0x2b6004){return _0x2581b(_0xea0ab2-_0x1358f5._0x5a1847,_0x2b6004,_0x23924b-_0x1358f5._0x31b767,_0x23924b- -_0x1358f5._0x59d1a7);}return _0x408635[_0x22986f(-_0x3c2c09._0x4b75fd,-0x103,-0xc7,-_0x3c2c09._0x526db5)](_0x4dc70f=>{const _0x57c332={_0x377204:0x2f8};function _0xdc4205(_0x5db725,_0x468581,_0x5d77ab,_0x9ba4cf){return _0x22986f(_0x9ba4cf-_0x57c332._0x377204,_0x468581-0x171,_0x5d77ab-0x126,_0x5d77ab);}function _0x4b1e44(_0x52bb7c,_0x517030,_0x228aa8,_0x189c9a){return _0x22986f(_0x517030-0x1aa,_0x517030-_0x1761a1._0x163e96,_0x228aa8-0x12a,_0x228aa8);}return _0x4dc70f[_0xdc4205(_0x4c01f3._0x4cd343,0x2bf,0x273,0x299)]!==![]&&_0x4dc70f[_0x4b1e44(_0x4c01f3._0x25c271,_0x4c01f3._0x3b6a0b,0x138,0x101)]===_0x302cfa&&_0x4dc70f['kind']===_0xdc4205(_0x4c01f3._0x12783a,_0x4c01f3._0x265804,_0x4c01f3._0x265804,0x252);})[_0x34143c(_0x3c2c09._0x19ebcc,_0x3c2c09._0x27e09b,_0x3c2c09._0x179b37,0x3e4)]((_0x5788b6,_0x44cf9e)=>_0x5788b6['order']-_0x44cf9e[_0x22986f(-0xa8,-0xfc,-0xe9,-0x6b)]);}function getOrderedTransformerExtensions(_0x4fed29,_0x193f08){const _0x2af6a7={_0x3e3a10:0x4da,_0x55a4c3:0x4b6,_0x4e5aae:0x4c7},_0x29936c={_0x1d8557:0x1b7,_0x49552b:0x1f1,_0x144e1a:0x172,_0x2e5459:0x16f,_0x240364:0x1a8,_0xe35544:0x183,_0x31a656:0x161},_0x24e832={_0x85577b:0x3a0,_0x40517a:0x46},_0x3db964={_0x1543e1:0x4};function _0x20467c(_0x4fc58a,_0x595ad2,_0x5e32ff,_0x52746a){return _0x5c95e7(_0x595ad2-0x8d,_0x595ad2-_0x3db964._0x1543e1,_0x5e32ff,_0x52746a-0x67);}function _0x3e1130(_0x2a8f6e,_0x1b9641,_0xdabd0d,_0x235a6e){return _0x5c95e7(_0x1b9641-0x481,_0x1b9641-0x1b0,_0x235a6e,_0x235a6e-0xb4);}return _0x4fed29[_0x3e1130(_0x2af6a7._0x3e3a10,0x4e1,0x4db,_0x2af6a7._0x55a4c3)](_0x33d64c=>{const _0x272824={_0x5292e7:0x187,_0x21fdd9:0x68a,_0x378047:0x4};function _0x42a63a(_0x3dfec3,_0xd6fc0d,_0x1c3af1,_0x530522){return _0x3e1130(_0x3dfec3-0x4e,_0xd6fc0d- -_0x24e832._0x85577b,_0x1c3af1-_0x24e832._0x40517a,_0x1c3af1);}function _0x114541(_0x3b02ae,_0x133414,_0xfa1d96,_0x3ea761){return _0x3e1130(_0x3b02ae-_0x272824._0x5292e7,_0x133414- -_0x272824._0x21fdd9,_0xfa1d96-_0x272824._0x378047,_0xfa1d96);}return _0x33d64c[_0x42a63a(0x1c7,_0x29936c._0x1d8557,_0x29936c._0x49552b,0x17c)]!==![]&&_0x33d64c['stage']===_0x193f08&&_0x33d64c[_0x114541(-0x162,-_0x29936c._0x144e1a,-0x17d,-0x1b6)]===_0x42a63a(_0x29936c._0x2e5459,_0x29936c._0x240364,_0x29936c._0xe35544,_0x29936c._0x31a656);})[_0x3e1130(0x4ca,0x4ec,0x4d0,_0x2af6a7._0x4e5aae)]((_0x19fc6d,_0x5749b5)=>_0x19fc6d[_0x3e1130(0x551,0x50e,0x4d2,0x4bd)]-_0x5749b5[_0x20467c(0x161,0x11a,0x161,0xf9)]);}function createExtensionRegistry(){const _0x175d0b={_0x176914:0xe1},_0xc83a2a={_0x41a96a:0xa8},_0x1d9f0d={_0x5e8a09:0x4fc,_0x2c328b:0x4ce,_0xf8dcdc:0x4ed},_0x55eccb={_0x54baae:0x18d,_0x1c3c69:0x1c3},_0x2e5dc6=[];return{'register'(_0x55a40d){function _0x978db4(_0x334136,_0x43b8af,_0x57cd84,_0x3bc2d0){return _0xf276(_0x57cd84- -0x385,_0x334136);}_0x2e5dc6[_0x978db4(-_0x55eccb._0x54baae,-0x212,-0x1e5,-_0x55eccb._0x1c3c69)](_0x55a40d);},async 'runTransformers'(_0x574651,_0x85a5d5,_0x5082be){let _0x569266=_0x85a5d5;function _0x215fc5(_0x26f84e,_0x20effe,_0x4a1ab9,_0xde10d0){return _0xf276(_0x26f84e-0x37e,_0x20effe);}for(const _0x3fcf1e of getOrderedTransformerExtensions(_0x2e5dc6,_0x574651)){_0x569266=await _0x3fcf1e[_0x215fc5(_0x1d9f0d._0x5e8a09,0x4e2,_0x1d9f0d._0x2c328b,_0x1d9f0d._0xf8dcdc)](_0x569266,_0x5082be);}return _0x569266;},async 'runObservers'(_0x24c62c,_0x3a39d7,_0x2b8707){function _0x2d61e4(_0x312eb0,_0x2260ff,_0x5a73b8,_0x24c5c7){return _0xf276(_0x24c5c7- -_0xc83a2a._0x41a96a,_0x2260ff);}for(const _0xdd4ca5 of getOrderedObserverExtensions(_0x2e5dc6,_0x24c62c)){await _0xdd4ca5[_0x2d61e4(0xed,_0x175d0b._0x176914,0x12b,0xd6)](_0x3a39d7,_0x2b8707);}}};}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};}function createAgentMetrics(_0x4b230b={}){const _0x5f58db={_0x5c5d54:0x12a},_0x5a00ae={_0x42a079:0x3fb,_0x4e5970:0x37c},_0x5c25ff={_0x5f45ab:0x382,_0x53b8bb:0x3a9,_0x5b83d0:0x3b3,_0x36142a:0xc9,_0x44f62d:0xee,_0x52e1d9:0x402,_0xd8552d:0x3f1,_0x4117f3:0x3a5,_0x56782d:0x6d,_0x5322cb:0x3a6,_0x2bca9b:0x3e4,_0x484915:0x3b5,_0x18bdc6:0x3f2,_0x232d8c:0x426,_0x3bef36:0xdc,_0x134f5d:0xd0,_0x1e4aec:0x66,_0x288909:0x75,_0x499091:0x5f,_0x50139f:0x53,_0x5e0ddc:0x4f,_0x974c34:0xac,_0x3a944a:0x95,_0x4cbe16:0x13e,_0x52d4f9:0xea,_0xa92f7b:0x98,_0x1c3cc4:0x5b,_0x441919:0x125,_0x3b035e:0xf3,_0x403ac5:0x3f9,_0x10a078:0xfb,_0x350798:0x44c,_0x41a04c:0x45d,_0x268534:0x423,_0x3407db:0x73,_0x436154:0xca,_0x4171b7:0xc8,_0x155745:0x9c,_0x170bc1:0x3dd,_0x39acfa:0x3f1,_0x5d2399:0x3ab,_0x3e2850:0x403,_0x2e43aa:0x47,_0x209708:0x1c,_0x3fdf0b:0x79};let _0x135d77=createEmptySnapshot();const _0x519b10=new Set();let _0x537bb2;const _0x1cb506=()=>{const _0x504a3f={..._0x135d77};for(const _0x14d749 of _0x519b10)_0x14d749(_0x504a3f);};return{'getSnapshot'(){return{..._0x135d77};},'recordEvent'(_0x39bfb9){const _0x31ea7f={_0x7edf57:0x24e};function _0x9a0e6a(_0x5c048f,_0xeaf31a,_0x232bf9,_0x51a977){return _0xf276(_0x51a977- -0x103,_0x232bf9);}if(_0x39bfb9['type']===_0x35e336(_0x5c25ff._0x5f45ab,_0x5c25ff._0x53b8bb,0x385,_0x5c25ff._0x5b83d0)){_0x537bb2=Date['now']();const _0x111e16=_0x4b230b[_0x9a0e6a(0xeb,_0x5c25ff._0x36142a,0x73,0xc1)]?.(_0x39bfb9[_0x9a0e6a(0x11e,0x113,_0x5c25ff._0x44f62d,0xe5)]);_0x111e16!==void 0x0&&(_0x135d77={..._0x135d77,'contextWindowLimit':_0x111e16},_0x1cb506());return;}function _0x35e336(_0x16312b,_0x1a4ef7,_0x32bfb1,_0x41a797){return _0xf276(_0x1a4ef7-_0x31ea7f._0x7edf57,_0x41a797);}if(_0x39bfb9[_0x35e336(_0x5c25ff._0x52e1d9,_0x5c25ff._0xd8552d,_0x5c25ff._0x4117f3,0x41c)]===_0x9a0e6a(0x75,_0x5c25ff._0x56782d,0x76,0x6b)){const _0x5d6e32=_0x39bfb9[_0x35e336(_0x5c25ff._0x5322cb,_0x5c25ff._0x2bca9b,0x3de,0x438)]['usage'][_0x35e336(0x385,_0x5c25ff._0x484915,0x378,_0x5c25ff._0x18bdc6)],_0x3ba083=_0x39bfb9[_0x35e336(_0x5c25ff._0x232d8c,0x3e4,0x3bf,0x431)][_0x9a0e6a(0xa4,_0x5c25ff._0x3bef36,_0x5c25ff._0x134f5d,0x95)][_0x9a0e6a(0xbe,_0x5c25ff._0x1e4aec,0xb7,_0x5c25ff._0x288909)],_0x28264e=_0x39bfb9[_0x9a0e6a(_0x5c25ff._0x499091,_0x5c25ff._0x50139f,0x6a,0x93)][_0x9a0e6a(_0x5c25ff._0x5e0ddc,_0x5c25ff._0x974c34,0x9c,_0x5c25ff._0x3a944a)]['reasoningTokens']??0x0,_0x310f31=_0x5d6e32+_0x3ba083,_0x4cd862=_0x537bb2===void 0x0?0x0:Date[_0x9a0e6a(_0x5c25ff._0x4cbe16,0x94,0x12c,_0x5c25ff._0x52d4f9)]()-_0x537bb2;_0x537bb2=void 0x0,_0x135d77={..._0x135d77,'totalTokens':_0x135d77['totalTokens']+_0x310f31,'totalInputTokens':_0x135d77[_0x9a0e6a(_0x5c25ff._0xa92f7b,0x8f,_0x5c25ff._0x1c3cc4,0x7e)]+_0x5d6e32,'totalOutputTokens':_0x135d77[_0x35e336(0x3e6,0x425,0x3f4,0x479)]+_0x3ba083,'totalReasoningTokens':_0x135d77[_0x9a0e6a(_0x5c25ff._0x441919,0xbb,_0x5c25ff._0x3b035e,0xdb)]+_0x28264e,'modelCallCount':_0x135d77[_0x35e336(0x3bb,_0x5c25ff._0x403ac5,0x42c,0x43f)]+0x1,'totalModelTimeMs':_0x135d77['totalModelTimeMs']+_0x4cd862,'currentTokens':_0x310f31,'currentInputTokens':_0x5d6e32,'currentOutputTokens':_0x3ba083,'currentReasoningTokens':_0x28264e,'currentModelTimeMs':_0x4cd862,..._0x135d77[_0x9a0e6a(0xb2,0xee,0x13e,_0x5c25ff._0x10a078)]&&_0x310f31>0x0?{'contextWindowUsage':_0x310f31/_0x135d77[_0x35e336(0x480,_0x5c25ff._0x350798,_0x5c25ff._0x41a04c,0x450)]}:{}},_0x1cb506();return;}if(_0x39bfb9[_0x35e336(_0x5c25ff._0x268534,0x3f1,0x3f6,0x3be)]===_0x9a0e6a(_0x5c25ff._0x3407db,_0x5c25ff._0x436154,_0x5c25ff._0x4171b7,_0x5c25ff._0x155745)){_0x135d77={..._0x135d77,'toolCallCount':_0x135d77[_0x35e336(0x47f,0x428,0x45f,_0x5c25ff._0x170bc1)]+0x1},_0x1cb506();return;}_0x39bfb9[_0x35e336(0x418,_0x5c25ff._0x39acfa,_0x5c25ff._0x5d2399,_0x5c25ff._0x3e2850)]===_0x9a0e6a(_0x5c25ff._0x2e43aa,0x90,_0x5c25ff._0x209708,0x6d)&&(_0x135d77={..._0x135d77,'requestCount':_0x135d77[_0x9a0e6a(0x82,0x2a,_0x5c25ff._0x3fdf0b,0x51)]+0x1},_0x1cb506());},'reset'(){_0x135d77=createEmptySnapshot(),_0x537bb2=void 0x0,_0x1cb506();},'subscribe'(_0x350fc8){const _0x3fcc7b={_0x3a6927:0x11c,_0x131646:0x16b},_0x31de74={_0x4f4347:0x38};_0x519b10[_0xd866a4(0x17c,_0x5f58db._0x5c5d54,0x18f,0x188)](_0x350fc8);function _0xd866a4(_0x55a5a3,_0x5e2bb5,_0x287692,_0x409196){return _0xf276(_0x55a5a3- -_0x31de74._0x4f4347,_0x409196);}return()=>{function _0x194ee5(_0x27d900,_0x4c4c65,_0xe2d761,_0x54727b){return _0xd866a4(_0x4c4c65-0x1fc,_0x4c4c65-_0x3fcc7b._0x3a6927,_0xe2d761-_0x3fcc7b._0x131646,_0xe2d761);}_0x519b10[_0x194ee5(_0x5a00ae._0x42a079,0x3c3,_0x5a00ae._0x4e5970,0x40e)](_0x350fc8);};}};}function makeExtensionContext(_0x2aaf32){return{'state':_0x2aaf32};}async function runStage(_0x5541e6,_0x4d54e6,_0x475536,_0x3b8994){const _0x2ea2ec={_0x1fd295:0x173,_0x42397d:0x1a1,_0x334df6:0x17b,_0x18939d:0x3f3,_0x12f1ab:0x3f9},_0x332dc4={_0xff2431:0x32f,_0x293d24:0xb9},_0x30d11a={_0x201770:0x3,_0x2b57c3:0x1ef};function _0x3c6a0b(_0x54abb8,_0x5cc922,_0x59624d,_0x50e6a0){return _0x5c95e7(_0x5cc922-0xd5,_0x5cc922-_0x30d11a._0x201770,_0x59624d,_0x50e6a0-_0x30d11a._0x2b57c3);}function _0x59f0d9(_0x539b8e,_0x3aa50f,_0x5f84ca,_0xfa02db){return _0x5c95e7(_0x5f84ca-_0x332dc4._0xff2431,_0x3aa50f-0xbc,_0x3aa50f,_0xfa02db-_0x332dc4._0x293d24);}const _0x3d341d=await _0x5541e6[_0x3c6a0b(_0x2ea2ec._0x1fd295,_0x2ea2ec._0x42397d,0x1b2,_0x2ea2ec._0x334df6)](_0x4d54e6,_0x475536,_0x3b8994);return await _0x5541e6[_0x59f0d9(_0x2ea2ec._0x18939d,0x42a,_0x2ea2ec._0x12f1ab,0x3c8)](_0x4d54e6,_0x3d341d,_0x3b8994),_0x3d341d;}async function emitEvent2(_0x3dd542,_0xab9d94,_0x3d83e2){await _0x3dd542?.(_0xab9d94,_0x3d83e2);}function replaceToolUseBlocks(_0xbf713,_0x5aa3ea){const _0x4fb3d4={_0x1af61d:0xd5,_0x4b23d1:0x7b,_0x4d028c:0xd2,_0x29269c:0x124,_0x2c6d33:0xca},_0x3be4f3={_0x5141f5:0x3ac,_0x1cc1d3:0x349},_0x404a63={_0x3dec4b:0x489,_0x531223:0x58,_0x12bdb2:0x188},_0x11a458={_0x3b5d1b:0x74,_0x4128e0:0x125};let _0x222d57=0x0;function _0x1094d7(_0x506550,_0x320273,_0x125591,_0x9f0d38){return _0x5c95e7(_0x125591-_0x11a458._0x3b5d1b,_0x320273-0x79,_0x506550,_0x9f0d38-_0x11a458._0x4128e0);}function _0x4eb7b7(_0xd6333,_0x159338,_0x1cbe52,_0x5209e1){return _0x5c95e7(_0x1cbe52-_0x404a63._0x3dec4b,_0x159338-_0x404a63._0x531223,_0x5209e1,_0x5209e1-_0x404a63._0x12bdb2);}return{..._0xbf713,'content':_0xbf713[_0x1094d7(_0x4fb3d4._0x1af61d,_0x4fb3d4._0x4b23d1,_0x4fb3d4._0x4d028c,0xab)][_0x1094d7(0xe0,_0x4fb3d4._0x29269c,0xfa,_0x4fb3d4._0x2c6d33)](_0x39d6c5=>{if(_0x39d6c5[_0x7ddda5(_0x3be4f3._0x5141f5,0x397,0x351,_0x3be4f3._0x1cc1d3)]!=='tool_use')return _0x39d6c5;const _0x2d59b3=_0x5aa3ea[_0x222d57];_0x222d57+=0x1;function _0x7ddda5(_0x661d98,_0x3aeab5,_0x45d344,_0x35dc2e){return _0x1094d7(_0x45d344,_0x3aeab5-0x12f,_0x3aeab5-0x2a4,_0x35dc2e-0x129);}return structuredClone(_0x2d59b3);})};}function createAssistantMessageId(_0x1306d2,_0x2a3e8a){return _0x1306d2+':assistant:'+_0x2a3e8a;}function createReasoningMessageId(_0x1cd600){const _0x38e72c={_0x2f56e0:0x90},_0x55dfd2={_0x568348:0x112,_0x4c5a08:0x4a5};function _0xefb610(_0x49fbdb,_0x5a8563,_0x278e01,_0x15fa81){return _0x2581b(_0x49fbdb-0x180,_0x15fa81,_0x278e01-_0x55dfd2._0x568348,_0x278e01- -_0x55dfd2._0x4c5a08);}return _0x1cd600+_0xefb610(0x41,0x6f,_0x38e72c._0x2f56e0,0xb8);}function withMessageId(_0x45eab6,_0x33292b){if(_0x45eab6['id']===_0x33292b)return _0x45eab6;return{..._0x45eab6,'id':_0x33292b};}function createAssistantChunkEvent(_0x4e2420,_0x9e3fd3){const _0x5537a7={_0x51f5d7:0x45b,_0x5b2ed3:0x42e,_0x5d29ee:0x436,_0x3e19df:0x41b,_0x883ffa:0x189,_0x5ce5e0:0x160,_0x340ec0:0x448},_0x1713fb={_0x3edfca:0x1e5,_0x5a0443:0x420};function _0x5d96b0(_0x255e75,_0xcdac05,_0x50cfbe,_0x2c8500){return _0x2581b(_0x255e75-0x54,_0x255e75,_0x50cfbe-_0x1713fb._0x3edfca,_0xcdac05- -_0x1713fb._0x5a0443);}if(_0x4e2420[_0x15bc7a(_0x5537a7._0x51f5d7,0x473,0x474,0x482)]!==_0x15bc7a(0x3f4,_0x5537a7._0x5b2ed3,_0x5537a7._0x5d29ee,_0x5537a7._0x3e19df))return void 0x0;if(_0x4e2420['text']===void 0x0)return void 0x0;function _0x15bc7a(_0xf5a1d9,_0x12e7d2,_0x33986e,_0x41cb06){return _0x5c95e7(_0x33986e-0x3f5,_0x12e7d2-0xa5,_0x12e7d2,_0x41cb06-0x3a);}return{'type':'assistant_chunk','index':_0x4e2420[_0x5d96b0(_0x5537a7._0x883ffa,0x136,_0x5537a7._0x5ce5e0,0x174)]??0x0,'messageId':_0x9e3fd3,'chunk':{'type':_0x15bc7a(_0x5537a7._0x340ec0,0x3e1,_0x5537a7._0x5d29ee,0x41d),'index':_0x4e2420['index']??0x0,'text':_0x4e2420['text']}};}function createToolUseChunkEvent(_0x28e4ca,_0x2a76fa){const _0x5abdef={_0x257419:0x1fe,_0x27c715:0x1bc,_0x2b734a:0x243,_0x3dcfcc:0x209,_0x39b3d0:0x1d2,_0x45d0fd:0x208,_0x3ba791:0x1bf,_0xdb38aa:0x3c7,_0x55f2de:0x3eb,_0x375611:0x3a3,_0x39ac6f:0x3ef,_0xd6608:0x39a,_0x4f75e2:0x367,_0x456e76:0x387,_0x3a036c:0x34e,_0x43da2d:0x387,_0x3de60f:0x22d},_0x40cdec={_0x1c3651:0x7e},_0x965b90={_0x2d8c16:0x18f,_0x40a7db:0xe1,_0x51cbde:0x389};function _0x1346c7(_0x51fef3,_0x5d6690,_0x40b4f9,_0x3a01c5){return _0x2581b(_0x51fef3-_0x965b90._0x2d8c16,_0x40b4f9,_0x40b4f9-_0x965b90._0x40a7db,_0x5d6690- -_0x965b90._0x51cbde);}if(_0x28e4ca[_0x1346c7(0x1b6,_0x5abdef._0x257419,_0x5abdef._0x27c715,_0x5abdef._0x2b734a)]!==_0x1346c7(_0x5abdef._0x3dcfcc,_0x5abdef._0x39b3d0,_0x5abdef._0x45d0fd,_0x5abdef._0x3ba791))return void 0x0;function _0x19eca4(_0x408239,_0x64dcdb,_0x3de539,_0x2fa234){return _0x2581b(_0x408239-_0x40cdec._0x1c3651,_0x3de539,_0x3de539-0x38,_0x2fa234- -0x1bc);}return{'type':_0x19eca4(_0x5abdef._0xdb38aa,0x3f2,_0x5abdef._0x55f2de,_0x5abdef._0x375611),'index':_0x28e4ca[_0x19eca4(0x3c1,0x3b8,_0x5abdef._0x39ac6f,_0x5abdef._0xd6608)]??0x0,'messageId':_0x2a76fa,'chunk':{'type':'tool_use_delta','id':_0x28e4ca['id']??'','index':_0x28e4ca[_0x1346c7(0x220,0x1cd,0x182,0x1b8)]??0x0,..._0x28e4ca[_0x19eca4(_0x5abdef._0x4f75e2,0x3a0,0x330,_0x5abdef._0x456e76)]!==void 0x0?{'name':_0x28e4ca[_0x19eca4(_0x5abdef._0x3a036c,0x370,0x334,_0x5abdef._0x43da2d)]}:{},..._0x28e4ca[_0x1346c7(_0x5abdef._0x3de60f,0x1db,0x1b1,0x1f8)]!==void 0x0?{'inputDelta':_0x28e4ca['inputDelta']}:{}}};}function createReasoningChunkEvent(_0x20c384,_0x2e7ec2){const _0x45e1d1={_0x1041fc:0x11,_0x32b002:0x69,_0x3a9b65:0x36,_0x2473be:0x32,_0x1e6dc9:0x607,_0x4410a7:0x42,_0x51f3bd:0x4a,_0x3376fa:0x1,_0xeff157:0x50,_0x982beb:0x11,_0xa71a58:0x17,_0x33294a:0x84,_0x21386d:0x6,_0x1d76c7:0x5a0,_0x2b4fb3:0x43,_0x5ac3cf:0xb,_0x3d69be:0x11,_0xa6f5a4:0x10,_0x13cd33:0x91,_0x16c24a:0x70,_0x2c044e:0xd,_0x4254e7:0x26,_0x5f571c:0x4d7,_0x222bf7:0x579,_0x17aaf3:0x79,_0x447d79:0x35,_0x1feec5:0xa,_0x170646:0x3d},_0x3330b9={_0x1fe0f6:0x6f,_0x252e4c:0x99,_0x319829:0x16},_0x4f8597={_0x35e733:0x17e,_0x22686c:0x598};function _0x3eaad4(_0xf37c90,_0xec0eb7,_0x1e26ec,_0x1e3750){return _0x2581b(_0xf37c90-_0x4f8597._0x35e733,_0xec0eb7,_0x1e26ec-0x97,_0xf37c90- -_0x4f8597._0x22686c);}function _0x1042f(_0x4579b3,_0xd88308,_0x14ec20,_0x407d92){return _0x2581b(_0x4579b3-_0x3330b9._0x1fe0f6,_0xd88308,_0x14ec20-_0x3330b9._0x252e4c,_0x14ec20- -_0x3330b9._0x319829);}switch(_0x20c384[_0x3eaad4(-_0x45e1d1._0x1041fc,-0x63,-_0x45e1d1._0x32b002,_0x45e1d1._0x3a9b65)]){case _0x3eaad4(_0x45e1d1._0x2473be,0x7d,0x79,0x48):return{'type':'reasoning_chunk','index':_0x20c384['index'],'messageId':_0x2e7ec2,'chunk':{'type':_0x1042f(0x5b2,_0x45e1d1._0x1e6dc9,0x5b4,0x56f),'index':_0x20c384[_0x3eaad4(-_0x45e1d1._0x4410a7,0x9,-_0x45e1d1._0x51f3bd,-0x3c)]??0x0,'thinking':_0x20c384['thinking']??''},'text':_0x20c384[_0x3eaad4(_0x45e1d1._0x3376fa,-_0x45e1d1._0xeff157,-_0x45e1d1._0x982beb,_0x45e1d1._0xa71a58)]??''};case'openai_reasoning_delta':return{'type':'reasoning_chunk','index':_0x20c384[_0x3eaad4(0x44,_0x45e1d1._0x33294a,0x5b,-_0x45e1d1._0x21386d)],'messageId':_0x2e7ec2,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x20c384['contentIndex']??0x0,'delta':_0x20c384['delta']??'','itemId':_0x20c384[_0x1042f(0x5d9,0x5e2,0x5b7,_0x45e1d1._0x1d76c7)]??'','outputIndex':_0x20c384['outputIndex']??0x0},'text':_0x20c384[_0x3eaad4(_0x45e1d1._0x2b4fb3,_0x45e1d1._0x5ac3cf,-_0x45e1d1._0x3d69be,0x67)]??''};case _0x3eaad4(-0x52,-0x11,-_0x45e1d1._0xa6f5a4,-_0x45e1d1._0x13cd33):return{'type':_0x3eaad4(0x3e,-0xe,_0x45e1d1._0x16c24a,-_0x45e1d1._0x2c044e),'index':_0x20c384[_0x3eaad4(-_0x45e1d1._0x4254e7,-0x33,-0x54,-0x40)],'messageId':_0x2e7ec2,'chunk':{'type':_0x1042f(_0x45e1d1._0x5f571c,_0x45e1d1._0x222bf7,0x530,0x57a),'delta':_0x20c384[_0x3eaad4(_0x45e1d1._0x2b4fb3,-0x2,_0x45e1d1._0x17aaf3,-0x5)]??'','itemId':_0x20c384[_0x3eaad4(_0x45e1d1._0x447d79,0x24,0x5,0x68)]??'','outputIndex':_0x20c384['outputIndex']??0x0,'summaryIndex':_0x20c384[_0x3eaad4(-0x26,-0x78,-_0x45e1d1._0x1feec5,-_0x45e1d1._0x170646)]??0x0},'text':_0x20c384['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x34b732){const _0x47735d={_0x4f39d5:0x2ab,_0x36bb22:0x2f7,_0x3d7e19:0x2c2,_0x5caf62:0x3c9,_0x4dfb69:0x374,_0x5dc445:0x362,_0xb62ac2:0x34b,_0x58fe76:0x319},_0x155df5={_0x18cea6:0x16a},_0x534637={_0x415ceb:0x1b4,_0x90e32b:0x1a3};function _0x460692(_0x9f77b6,_0x564879,_0xb52913,_0x508977){return _0x2581b(_0x9f77b6-_0x534637._0x415ceb,_0x9f77b6,_0xb52913-_0x534637._0x90e32b,_0x508977- -0x2de);}function _0x221d13(_0x35d1c3,_0x198d26,_0x3c64fa,_0x487cc3){return _0x5c95e7(_0x198d26-0x337,_0x198d26-_0x155df5._0x18cea6,_0x3c64fa,_0x487cc3-0xe6);}return _0x34b732[_0x460692(_0x47735d._0x4f39d5,_0x47735d._0x36bb22,0x2ff,_0x47735d._0x3d7e19)]===_0x221d13(_0x47735d._0x5caf62,_0x47735d._0x4dfb69,0x3c1,_0x47735d._0x5dc445)&&_0x34b732[_0x460692(0x2f4,_0x47735d._0xb62ac2,_0x47735d._0x58fe76,0x2fa)]['aborted']===!![];}async function executeModelRequest(_0x59f6f0,_0x1f2559,_0x2ab55c,_0x3657c2,_0xef3aa9){const _0x400214={_0x117b62:0x46a,_0x2619f7:0x504,_0x30f08c:0x4df,_0x4d548b:0x342,_0x4b79be:0x3c1,_0xfecf0d:0x383,_0x1ff0da:0x3e8,_0x3ed799:0x344,_0xe1d755:0x365,_0x2f141a:0x34f,_0x4baf5a:0x46b,_0x2a99e9:0x4c3,_0x1fd085:0x375,_0x108f09:0x37f,_0x1431ab:0x368,_0xd4eaa9:0x381,_0x22cee3:0x391,_0x1d82fa:0x349,_0x4e8e96:0x481,_0x8942eb:0x513,_0x1e6cbb:0x469,_0x34926f:0x506,_0x50989d:0x3a6,_0x5305f4:0x3ad,_0x3096a6:0x3dd,_0x4289bf:0x50d,_0x4bda14:0x50e,_0x259be6:0x4e7,_0x382816:0x4d5,_0x8af166:0x465,_0x23927a:0x486,_0x5e6cb3:0x3cd,_0xe18fcc:0x398,_0x1624cf:0x416,_0x1ba4d5:0x361,_0x58eccb:0x334,_0x5418e4:0x4f8,_0x193893:0x4a6,_0x4387f3:0x355,_0x482bff:0x37a,_0x25f234:0x358,_0x114fdc:0x333,_0x231f0d:0x308},_0x408aae={_0x4dfa1f:0x128,_0x1b70c4:0xc8},_0x9bed85={_0x1bf7a6:0x24};throwIfAborted(_0x1f2559[_0x44e56f(0x467,0x437,0x475,_0x400214._0x117b62)]);function _0x10b60b(_0x1c648d,_0x2e224f,_0x422cae,_0x69cc4f){return _0x5c95e7(_0x1c648d-0x30f,_0x2e224f-_0x9bed85._0x1bf7a6,_0x422cae,_0x69cc4f-0xa8);}if(!_0x1f2559[_0x44e56f(_0x400214._0x2619f7,0x4d2,0x4e4,_0x400214._0x30f08c)]||!_0x2ab55c['chatModel'][_0x10b60b(_0x400214._0x4d548b,0x38a,0x321,0x38b)])return await _0x2ab55c['chatModel'][_0x10b60b(_0x400214._0x4b79be,_0x400214._0xfecf0d,_0x400214._0x1ff0da,0x369)](_0x59f6f0,{'signal':_0x1f2559[_0x10b60b(_0x400214._0x3ed799,_0x400214._0xe1d755,_0x400214._0x2f141a,0x38f)]});let _0x150a76;for await(const _0x1e6155 of _0x2ab55c['chatModel'][_0x44e56f(0x452,_0x400214._0x4baf5a,0x473,_0x400214._0x2a99e9)](_0x59f6f0,{'signal':_0x1f2559['signal']})){throwIfAborted(_0x1f2559[_0x44e56f(0x4b5,0x4c2,0x475,0x442)]);if(_0x1e6155['type']===_0x10b60b(_0x400214._0x1fd085,_0x400214._0x108f09,0x39a,_0x400214._0x1431ab)){_0x150a76=_0x1e6155[_0x10b60b(_0x400214._0xd4eaa9,0x39b,_0x400214._0x22cee3,_0x400214._0x1d82fa)];continue;}if(_0x1e6155[_0x44e56f(_0x400214._0x4e8e96,_0x400214._0x8942eb,0x4bf,_0x400214._0x1e6cbb)]===_0x44e56f(0x4b2,0x4ff,0x4ca,_0x400214._0x34926f)){await emitEvent2(_0x2ab55c['onEvent'],_0x1e6155,_0x3657c2);continue;}const _0x252e2d=createReasoningChunkEvent(_0x1e6155,_0xef3aa9['reasoningMessageId']);if(_0x252e2d&&_0x252e2d[_0x10b60b(0x38e,_0x400214._0x50989d,_0x400214._0x5305f4,_0x400214._0x3096a6)]===_0x44e56f(_0x400214._0x4289bf,0x4b6,_0x400214._0x4bda14,_0x400214._0x259be6)&&_0x252e2d[_0x44e56f(0x51d,_0x400214._0x382816,0x4e2,0x526)]['length']>0x0){await emitEvent2(_0x2ab55c[_0x44e56f(_0x400214._0x8af166,0x453,_0x400214._0x23927a,0x494)],_0x252e2d,_0x3657c2);continue;}const _0x4cafb0=createAssistantChunkEvent(_0x1e6155,_0xef3aa9[_0x10b60b(_0x400214._0x5e6cb3,_0x400214._0xe18fcc,0x3dc,_0x400214._0x1624cf)]);if(_0x4cafb0){await emitEvent2(_0x2ab55c[_0x10b60b(0x355,_0x400214._0x1ba4d5,_0x400214._0x58eccb,0x3aa)],_0x4cafb0,_0x3657c2);continue;}const _0x5093a6=createToolUseChunkEvent(_0x1e6155,_0xef3aa9[_0x44e56f(_0x400214._0x5418e4,_0x400214._0x193893,0x4fe,_0x400214._0x8942eb)]);_0x5093a6&&await emitEvent2(_0x2ab55c[_0x10b60b(_0x400214._0x4387f3,0x3aa,_0x400214._0x482bff,0x363)],_0x5093a6,_0x3657c2);}function _0x44e56f(_0x1efc2d,_0x21e39e,_0x27984f,_0x18d2e8){return _0x2581b(_0x1efc2d-0x30,_0x1efc2d,_0x27984f-_0x408aae._0x4dfa1f,_0x27984f- -_0x408aae._0x1b70c4);}if(!_0x150a76)throw new Error(_0x10b60b(_0x400214._0x25f234,_0x400214._0x114fdc,0x37d,_0x400214._0x231f0d));return _0x150a76;}function makeTurnGuards(_0x367a1b,_0x56310b,_0x51e851,_0x42f0f9,_0x48d645){return{async 'stage'(_0x3ac393,_0x5e844b){return throwIfAborted(_0x367a1b),await runStage(_0x56310b,_0x3ac393,_0x5e844b,_0x42f0f9);},async 'emit'(_0x4bec04){throwIfAborted(_0x367a1b),await emitEvent2(_0x51e851,_0x4bec04,_0x48d645);},async 'stageUnchecked'(_0x2c428,_0x52af84){return await runStage(_0x56310b,_0x2c428,_0x52af84,_0x42f0f9);},async 'emitUnchecked'(_0x1df3ff){await emitEvent2(_0x51e851,_0x1df3ff,_0x48d645);}};}async function runTurn(_0x38ee20,_0x50d390){const _0x43c852={_0x2897d1:0x27a,_0x418ba1:0x232,_0x2c16c6:0x2ba,_0x54eae1:0x30d,_0x36d3f1:0x52b,_0x5051ce:0x520,_0x150341:0x2b1,_0x3bd4d8:0x2b8,_0x34fecd:0x2e6,_0x11befe:0x23e,_0x1f43f1:0x56c,_0x71ebf9:0x581,_0x247feb:0x31d,_0x4a0741:0x2bb,_0x193ef4:0x311,_0x3ede5b:0x2a6,_0x49ebb0:0x284,_0x5ee226:0x2c6,_0x4f2ec5:0x29d,_0x17b910:0x257,_0xb2ba97:0x28f,_0x437037:0x361,_0x2793c9:0x314,_0x151269:0x355,_0x340eb0:0x259,_0x23be40:0x542,_0x1d0f47:0x2aa,_0x49293a:0x283,_0x5f6d17:0x4ec,_0x308211:0x4e2,_0x55167e:0x50b,_0x144a0b:0x4fa,_0x13f877:0x549,_0x5582c4:0x555,_0x2ae418:0x590,_0x15ebac:0x532,_0x31b599:0x575,_0x15c4b7:0x586,_0x501c52:0x562,_0x4c9ee1:0x55c,_0x5714bc:0x560,_0xafa345:0x24b,_0x3a8c6e:0x55a,_0x2b639f:0x504,_0x5c281f:0x27c,_0xb1d280:0x2ae,_0x2895a1:0x2e7,_0x4bffaf:0x306,_0x27ce91:0x2d8,_0x16afc9:0x31b,_0x3a8696:0x4b7,_0x3c5c1e:0x4ff,_0x6306d5:0x2f2,_0x14236f:0x339,_0x1f4616:0x52f,_0x1e3bdf:0x523,_0x47cfa7:0x28c,_0x20f834:0x2e0,_0x407950:0x2e1,_0x308070:0x33a,_0x367705:0x2a5,_0x37fb69:0x550,_0x20edeb:0x549,_0x4e18cc:0x536,_0x4db2de:0x2f5,_0x578dbb:0x26d,_0x37a934:0x2b5,_0x28b7c7:0x2ec,_0x270fad:0x316,_0x29b77b:0x2fd,_0x4ad9dc:0x2de,_0x5687e9:0x593,_0x48a68a:0x5bb,_0x3113f5:0x518,_0x4cec75:0x4ed,_0x56a72c:0x526,_0x255721:0x54e,_0x49bba4:0x2b5,_0x106810:0x2d2,_0x3da9ce:0x287,_0x5a85a9:0x5b2,_0xc3abef:0x571,_0x4c1009:0x246,_0x2fb2c:0x292,_0x468129:0x2e3,_0x1fa1ec:0x291,_0x146efc:0x2c4,_0x1817f6:0x30a,_0x59c90b:0x347,_0x2256f7:0x50c,_0x22ed61:0x566,_0x334900:0x581,_0x2aa32b:0x54d,_0x26f19a:0x4f3,_0x150079:0x576,_0x1eb86e:0x2cb,_0x23c8b6:0x2fc,_0xf9a591:0x2f1,_0x2d7062:0x2fb,_0x43e079:0x5a3,_0xdfb3af:0x565,_0x25843d:0x5b6,_0x387755:0x512,_0x1af0c3:0x589,_0x22f6c7:0x53c,_0x3b39f8:0x4cb,_0x672aaa:0x50e,_0x1a1fa0:0x295,_0xbcbda9:0x293,_0x3abbcd:0x295,_0x3fc5a8:0x296,_0x3c6ef1:0x255},_0x3e11f6={_0x3d7ebf:0x15a,_0x3e43fd:0x29,_0x203588:0x2e,_0x5929f6:0x17b,_0x73d7b0:0x204,_0x444b84:0x1bd},_0x205ef9={_0x5e5b73:0x3bd,_0x2e9e65:0xa2},_0x13ac39={_0x43b268:0x31f},_0x5c1909={_0x4dcd46:0xf7},_0x10be99={_0x17092d:0x245,_0x244a3c:0x1ea},_0x1d9749=_0x38ee20[_0x5afede(0x227,_0x43c852._0x2897d1,0x2a5,_0x43c852._0x418ba1)]??new AbortController()[_0x5afede(0x2a0,0x27a,_0x43c852._0x2c16c6,0x278)];function _0x5afede(_0x52c910,_0x4b4b9c,_0x2a5540,_0x1bb34c){return _0x5c95e7(_0x4b4b9c-_0x10be99._0x17092d,_0x4b4b9c-_0x10be99._0x244a3c,_0x52c910,_0x1bb34c-0x16f);}const _0x564868={'sessionId':_0x38ee20[_0x5afede(_0x43c852._0x54eae1,0x2d9,0x329,0x319)],'turnId':_0x38ee20[_0x45a75d(0x4fe,_0x43c852._0x36d3f1,_0x43c852._0x5051ce,0x56a)],'system':normalizeSystem(_0x38ee20[_0x5afede(0x2c6,_0x43c852._0x150341,_0x43c852._0x3bd4d8,0x26e)]),'messages':(_0x38ee20[_0x5afede(0x271,0x28d,_0x43c852._0x34fecd,_0x43c852._0x11befe)]??[])['map'](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x50d390[_0x45a75d(0x52f,0x551,_0x43c852._0x1f43f1,_0x43c852._0x71ebf9)]==='function'?_0x50d390[_0x5afede(0x2f5,0x2d0,0x2bd,_0x43c852._0x247feb)]():_0x50d390[_0x5afede(0x2c0,0x2d0,0x323,0x27b)]},_0x1d8190=makeExtensionContext(_0x564868);function _0x45a75d(_0x5decee,_0x4995ab,_0x10ea1f,_0x13ee2b){return _0x5c95e7(_0x4995ab-0x4c6,_0x4995ab-_0x5c1909._0x4dcd46,_0x5decee,_0x13ee2b-0xaf);}const _0xb18a7c={'sessionId':_0x564868[_0x5afede(_0x43c852._0x4a0741,0x2d9,_0x43c852._0x193ef4,_0x43c852._0x3ede5b)],'turnId':_0x564868['turnId'],'state':_0x564868,'signal':_0x1d9749,..._0x50d390[_0x5afede(_0x43c852._0x49ebb0,_0x43c852._0x5ee226,_0x43c852._0x4f2ec5,0x29d)]?{'askUser':_0x50d390['askUser']}:{}},{stage:_0x3f31b4,emit:_0x3c497a,stageUnchecked:_0x3737b0,emitUnchecked:_0x37ccc6}=makeTurnGuards(_0x1d9749,_0x50d390[_0x45a75d(0x4d6,0x513,0x4db,0x525)],_0x50d390[_0x5afede(_0x43c852._0x17b910,0x28b,0x23a,_0x43c852._0xb2ba97)],_0x1d8190,_0xb18a7c),_0x10e8df=async _0x44bff4=>{function _0x51b554(_0x208bea,_0x455353,_0x3a3b97,_0x5897e9){return _0x5afede(_0x455353,_0x5897e9- -_0x13ac39._0x43b268,_0x3a3b97-0xf7,_0x5897e9-0x1d9);}function _0x239a6f(_0x447e2f,_0x4d76ba,_0x313b1b,_0x45913d){return _0x45a75d(_0x313b1b,_0x45913d- -_0x205ef9._0x5e5b73,_0x313b1b-0xbc,_0x45913d-_0x205ef9._0x2e9e65);}await _0x50d390[_0x239a6f(0x102,_0x3e11f6._0x3d7ebf,0xff,0x156)][_0x51b554(_0x3e11f6._0x3e43fd,_0x3e11f6._0x203588,-0x37,-0x10)](_0x239a6f(_0x3e11f6._0x5929f6,_0x3e11f6._0x73d7b0,0x1b6,_0x3e11f6._0x444b84),structuredClone(_0x44bff4),_0x1d8190);};let _0x1f03f7=0x0;try{const _0xba93c2=await _0x3f31b4(_0x45a75d(0x599,0x57b,0x575,0x525),normalizeMessage(_0x38ee20[_0x5afede(_0x43c852._0x437037,_0x43c852._0x2793c9,_0x43c852._0x151269,0x31e)]));_0x564868[_0x5afede(0x2b5,0x28d,0x23b,_0x43c852._0x340eb0)][_0x45a75d(0x527,_0x43c852._0x23be40,0x503,0x532)](_0xba93c2),await _0x10e8df(_0xba93c2),await _0x3c497a({'type':'user_message','message':_0xba93c2});while(!![]){throwIfAborted(_0x1d9749),_0x1f03f7+=0x1;const _0x1e6570=createAssistantMessageId(_0x564868[_0x5afede(0x2c1,_0x43c852._0x1d0f47,0x2a4,_0x43c852._0x49293a)],_0x1f03f7),_0x54ecc2=createReasoningMessageId(_0x1e6570);let _0x26e7b6={'model':_0x50d390[_0x45a75d(0x4fb,0x4fe,_0x43c852._0x5f6d17,_0x43c852._0x308211)][_0x45a75d(0x536,_0x43c852._0x55167e,_0x43c852._0x144a0b,_0x43c852._0x13f877)],'maxTokens':_0x50d390[_0x45a75d(0x52a,0x4fe,0x4b7,_0x43c852._0x5582c4)][_0x45a75d(_0x43c852._0x2ae418,0x548,0x562,0x56b)]??0x4000,'system':structuredClone(_0x564868[_0x45a75d(0x551,_0x43c852._0x15ebac,_0x43c852._0x31b599,_0x43c852._0x15c4b7)]),'messages':structuredClone(_0x564868['messages']),'tools':_0x50d390[_0x45a75d(_0x43c852._0x501c52,_0x43c852._0x4c9ee1,0x5a4,_0x43c852._0x5714bc)][_0x5afede(_0x43c852._0xafa345,0x297,_0x43c852._0xafa345,0x2cc)](),'metadata':{'sessionId':_0x564868[_0x45a75d(0x586,_0x43c852._0x3a8c6e,_0x43c852._0x2b639f,0x58b)],'turnId':_0x564868['turnId']}};_0x26e7b6=await _0x3f31b4('beforeModelRequest',_0x26e7b6),await _0x3c497a({'type':_0x5afede(0x259,_0x43c852._0x5c281f,_0x43c852._0xb1d280,0x29b),'request':_0x26e7b6});let _0x4f345b=await executeModelRequest(_0x26e7b6,_0x38ee20,_0x50d390,_0xb18a7c,{'assistantMessageId':_0x1e6570,'reasoningMessageId':_0x54ecc2});_0x4f345b=await _0x3f31b4(_0x5afede(_0x43c852._0x2895a1,_0x43c852._0x4bffaf,_0x43c852._0x27ce91,_0x43c852._0x16afc9),_0x4f345b),await _0x3c497a({'type':_0x45a75d(0x4fa,0x510,_0x43c852._0x3a8696,_0x43c852._0x3c5c1e),'response':_0x4f345b}),_0x564868['lastResponse']=_0x4f345b;let _0x37de5b=await _0x3f31b4(_0x5afede(0x308,_0x43c852._0x6306d5,_0x43c852._0x14236f,0x2b5),withMessageId(responseToAssistantMessage(_0x4f345b),_0x1e6570));_0x37de5b=withMessageId(_0x37de5b,_0x1e6570);const _0x22cdc6=getToolUseBlocks(_0x37de5b),_0x2305b8=await Promise[_0x45a75d(0x536,_0x43c852._0x1f4616,_0x43c852._0x1e3bdf,0x562)](_0x22cdc6[_0x5afede(_0x43c852._0x47cfa7,0x2cb,0x30a,0x301)](_0x9feff8=>_0x3f31b4(_0x5afede(0x234,0x27f,0x2ab,0x2ab),_0x9feff8)));_0x2305b8[_0x45a75d(0x53a,0x536,0x4fe,0x55e)]>0x0&&(_0x37de5b=replaceToolUseBlocks(_0x37de5b,_0x2305b8));const _0x53954a=withMessageId(_0x37de5b,_0x1e6570);_0x37de5b=_0x53954a;const _0x529a53=createReasoningMessage(_0x37de5b),_0x432c4=createAssistantTextMessage(_0x37de5b),_0x44f6ee=createToolUseMessage(_0x37de5b);_0x529a53&&await _0x3c497a({'type':_0x5afede(_0x43c852._0x20f834,_0x43c852._0x407950,_0x43c852._0x308070,_0x43c852._0x367705),'message':withMessageId(_0x529a53,_0x54ecc2)});_0x432c4&&await _0x3c497a({'type':'assistant_message','message':withMessageId(_0x432c4,_0x1e6570)});_0x44f6ee&&await _0x3c497a({'type':_0x45a75d(0x571,0x56d,_0x43c852._0x37fb69,0x557),'message':withMessageId(_0x44f6ee,_0x1e6570)});_0x564868[_0x45a75d(0x54b,0x50e,0x543,_0x43c852._0x20edeb)]['push'](_0x53954a);_0x2305b8[_0x45a75d(0x520,_0x43c852._0x4e18cc,0x4fc,0x554)]>0x0&&await _0x10e8df(_0x53954a);for(const _0x3324a2 of _0x2305b8){await _0x3c497a({'type':_0x5afede(0x2fb,0x2c0,_0x43c852._0x4db2de,_0x43c852._0x578dbb),'toolCall':_0x3324a2});}if(_0x2305b8[_0x5afede(0x2f5,_0x43c852._0x37a934,0x2ca,0x28b)]===0x0){const _0x4e6f6e=await _0x3f31b4(_0x5afede(_0x43c852._0x28b7c7,_0x43c852._0x270fad,_0x43c852._0x29b77b,_0x43c852._0x4ad9dc),_0x37de5b),_0x2afc9f=withMessageId(_0x4e6f6e,_0x1e6570);return _0x564868[_0x45a75d(0x596,_0x43c852._0x5687e9,0x557,_0x43c852._0x48a68a)]=_0x2afc9f,_0x564868[_0x45a75d(0x51b,0x50e,0x4b6,_0x43c852._0x3113f5)][_0x564868[_0x45a75d(_0x43c852._0x4cec75,0x50e,_0x43c852._0x56a72c,_0x43c852._0x255721)][_0x5afede(0x2b5,_0x43c852._0x49bba4,_0x43c852._0x106810,_0x43c852._0x3da9ce)]-0x1]=_0x2afc9f,await _0x10e8df(_0x2afc9f),await _0x3c497a({'type':_0x45a75d(_0x43c852._0x5a85a9,_0x43c852._0xc3abef,0x5a0,0x55d),'message':_0x2afc9f}),throwIfAborted(_0x1d9749),await _0x50d390[_0x5afede(_0x43c852._0x4c1009,_0x43c852._0x2fb2c,0x298,0x2a0)]['runObservers'](_0x5afede(0x292,_0x43c852._0x468129,0x2c2,0x32b),_0x564868,_0x1d8190),await _0x3c497a({'type':_0x5afede(0x27c,_0x43c852._0x1fa1ec,_0x43c852._0x146efc,0x23f),'state':_0x564868}),{'status':_0x5afede(_0x43c852._0x1817f6,0x2f3,_0x43c852._0x59c90b,0x2d0),'finalMessage':_0x2afc9f,'state':_0x564868};}let _0x5683b3=await _0x50d390[_0x45a75d(0x574,0x55c,_0x43c852._0x2256f7,_0x43c852._0x22ed61)][_0x45a75d(0x50d,0x544,_0x43c852._0x334900,_0x43c852._0x15ebac)](_0x2305b8,_0xb18a7c);const _0x294f44=_0x5683b3[_0x45a75d(_0x43c852._0x2aa32b,0x52a,0x512,_0x43c852._0x26f19a)](isAbortedToolResult),_0x516af9=_0x294f44?_0x3737b0:_0x3f31b4,_0x1d5fc0=_0x294f44?_0x37ccc6:_0x3c497a;_0x5683b3=await Promise[_0x45a75d(_0x43c852._0x150079,_0x43c852._0x1f4616,0x566,0x50c)](_0x5683b3[_0x5afede(0x2dc,_0x43c852._0x1eb86e,0x303,_0x43c852._0x23c8b6)](_0x375ecb=>_0x516af9(_0x5afede(0x358,0x308,0x337,0x2c8),_0x375ecb))),_0x564868[_0x5afede(0x345,_0x43c852._0xf9a591,0x2ba,0x33e)][_0x5afede(0x2b1,0x2c1,0x27c,_0x43c852._0x2d7062)](..._0x5683b3);for(const _0x6a6b16 of _0x5683b3){await _0x1d5fc0({'type':_0x45a75d(_0x43c852._0x43e079,_0x43c852._0xdfb3af,_0x43c852._0x25843d,_0x43c852._0x387755),'result':_0x6a6b16});}const _0x5d2f9f=await _0x516af9(_0x45a75d(0x55d,0x582,_0x43c852._0x1af0c3,_0x43c852._0x22f6c7),createToolResultUserMessage(_0x5683b3));await _0x1d5fc0({'type':'tool_result_message','message':_0x5d2f9f}),_0x564868[_0x45a75d(_0x43c852._0x3b39f8,_0x43c852._0x672aaa,0x539,0x517)][_0x45a75d(0x55b,0x542,0x54b,0x4eb)](_0x5d2f9f),await _0x10e8df(_0x5d2f9f);if(_0x294f44)return{'status':'aborted','state':_0x564868};}}catch(_0x5de6be){if(!_0x1d9749[_0x5afede(0x2a7,_0x43c852._0x1a1fa0,0x296,_0x43c852._0xbcbda9)])throw new TurnFailedError(_0x5de6be,_0x564868);return{'status':_0x5afede(_0x43c852._0x11befe,_0x43c852._0x3abbcd,_0x43c852._0x3fc5a8,_0x43c852._0x3c6ef1),'state':_0x564868};}}function createSessionId(){const _0x5c2c14={_0x2fea91:0x1f3,_0xd2f6c:0x20c,_0x282f9f:0x2ed,_0x84886f:0x30b,_0x2a7b91:0x2de,_0x3e0e6b:0x1a9,_0x3dc8c9:0x205,_0x45880e:0x210,_0x59966c:0x20b,_0x478b6a:0x1bf},_0x39907a={_0x533f81:0x31c},_0x47c7d1={_0x53092a:0x294};function _0x3cb845(_0x385eb9,_0x5a95c6,_0x4e4fb,_0x32e9e0){return _0x5c95e7(_0x5a95c6- -_0x47c7d1._0x53092a,_0x5a95c6-0xc,_0x385eb9,_0x32e9e0-0x138);}function _0x5c8b39(_0x92814a,_0x482be8,_0x5dbff2,_0x606c07){return _0x2581b(_0x92814a-0x11c,_0x92814a,_0x5dbff2-0x19,_0x482be8- -_0x39907a._0x533f81);}return _0x3cb845(-_0x5c2c14._0x2fea91,-_0x5c2c14._0xd2f6c,-0x1d6,-0x254)+Date[_0x5c8b39(_0x5c2c14._0x282f9f,0x2b5,_0x5c2c14._0x84886f,0x2f5)]()+'-'+Math[_0x5c8b39(0x25b,0x295,0x2da,_0x5c2c14._0x2a7b91)]()[_0x3cb845(-_0x5c2c14._0x3e0e6b,-0x1ee,-0x197,-_0x5c2c14._0x3dc8c9)](0x10)[_0x3cb845(-_0x5c2c14._0x45880e,-_0x5c2c14._0x59966c,-0x205,-_0x5c2c14._0x478b6a)](0x2,0xa);}function _0x5c95e7(_0x222274,_0x13eaf7,_0x21b7a8,_0x411d8f){return _0xf276(_0x222274- -0x124,_0x21b7a8);}function createTurnId(_0x3515c4){const _0x2c7b96={_0x28bbd4:0x280},_0x3e8db5={_0x20caf0:0x51,_0x5b8730:0x36f};function _0x12ec0c(_0xcc7210,_0x4f7a53,_0xd77675,_0x47fa2d){return _0x2581b(_0xcc7210-0x12e,_0xcc7210,_0xd77675-_0x3e8db5._0x20caf0,_0xd77675- -_0x3e8db5._0x5b8730);}return _0x12ec0c(_0x2c7b96._0x28bbd4,0x212,0x234,0x245)+_0x3515c4;}function createDefaultMessage(_0x582aaa){if(_0x582aaa===void 0x0)return void 0x0;return normalizeUserInput(_0x582aaa);}function normalizeUserInput(_0x215a11){const _0x272a2d={_0x38ac17:0xc2,_0xe93593:0xee,_0x210021:0xeb,_0x38e1ba:0xdb,_0x4a019b:0xbb,_0xfc09af:0x91},_0x4cebff={_0xf6295d:0x13a,_0x161a69:0x77,_0x2ba016:0x73},_0x3d7390={_0xd0af55:0x7d};if(typeof _0x215a11===_0x5ba377(-_0x272a2d._0x38ac17,-0x88,-_0x272a2d._0xe93593,-0xcd))return{'role':_0x5ba377(-_0x272a2d._0x210021,-0xd6,-0xc7,-_0x272a2d._0x38e1ba),'content':[{'type':_0x5ba377(-_0x272a2d._0x4a019b,-_0x272a2d._0xfc09af,-0x9b,-0x98),'text':_0x215a11}]};function _0x75b366(_0x899e59,_0x3cbd0e,_0x23803e,_0x125e9f){return _0x2581b(_0x899e59-_0x3d7390._0xd0af55,_0x125e9f,_0x23803e-0x166,_0x3cbd0e- -0x126);}function _0x5ba377(_0x16f956,_0x189fc3,_0x4e8ca5,_0x51c19c){return _0x5c95e7(_0x51c19c- -_0x4cebff._0xf6295d,_0x189fc3-_0x4cebff._0x161a69,_0x4e8ca5,_0x51c19c-_0x4cebff._0x2ba016);}return normalizeMessage(_0x215a11);}function resolveChatModel(_0x24866f){const _0x23b41a={_0x5a3431:0x76,_0x3fd266:0xd0},_0x53c3cf={_0x3ca456:0xde},_0x26a630={_0x4afa96:0x23,_0x3508c9:0x75};function _0xb75091(_0x56c39f,_0x5a98dd,_0x235399,_0x2d1a88){return _0x5c95e7(_0x2d1a88-_0x26a630._0x4afa96,_0x5a98dd-_0x26a630._0x3508c9,_0x5a98dd,_0x2d1a88-0x17c);}if(!_0x24866f[_0x1b686a(-0x59,-0xc6,-0xa6,-0xd0)])throw new Error(_0x1b686a(-_0x23b41a._0x5a3431,-_0x23b41a._0x3fd266,-0x9a,-0xac));function _0x1b686a(_0x3326c5,_0x1d18d4,_0x2a9b96,_0x4c84e2){return _0x5c95e7(_0x2a9b96- -_0x53c3cf._0x3ca456,_0x1d18d4-0x72,_0x1d18d4,_0x4c84e2-0xc2);}return _0x24866f[_0xb75091(0xb,0x3e,0x8c,0x5b)];}function createRegistry(_0x598a4b){const _0x30683a={_0x379b38:0x213,_0x42fd19:0x259,_0x19d8b6:0x1aa},_0x286373={_0x19012f:0x26a,_0x134c5e:0xfb,_0xadc302:0x10a},_0x15d294={_0x53ae79:0x23};function _0x2efb8b(_0x50229e,_0x7d972e,_0x2329e6,_0xd79cc3){return _0x2581b(_0x50229e-0x129,_0x2329e6,_0x2329e6-_0x15d294._0x53ae79,_0x7d972e- -0x3ab);}function _0x1f068e(_0x555334,_0x289adc,_0x44f574,_0x4fed1a){return _0x5c95e7(_0x44f574- -_0x286373._0x19012f,_0x289adc-_0x286373._0x134c5e,_0x4fed1a,_0x4fed1a-_0x286373._0xadc302);}if(_0x598a4b[_0x1f068e(-_0x30683a._0x379b38,-0x229,-0x21d,-_0x30683a._0x42fd19)])return _0x598a4b[_0x2efb8b(0x1c5,_0x30683a._0x19d8b6,0x1c4,0x1c3)];const _0x5d8446=createExtensionRegistry(),_0x1f00da=_0x598a4b['extensions']??[];for(const _0x292a37 of _0x1f00da){_0x5d8446['register'](_0x292a37);}return _0x5d8446;}var Agent=class{['_systemPrompt'];[_0x2581b(0x5c2,0x5b3,0x5e2,0x5d0)];[_0x2581b(0x562,0x5b3,0x5de,0x5a9)];['sessionId'];[_0x2581b(0x526,0x58b,0x562,0x550)];[_0x5c95e7(0x32,0x7d,0x45,-0x1e)];[_0x5c95e7(0xbb,0xd6,0xd0,0x8b)];constructor(_0xb6137f={}){const _0x58c8b0={_0x3a06db:0x1de,_0x21dfaa:0x215,_0x134c51:0x1b9,_0x35e73f:0x28f,_0x14d1f1:0x269,_0x2948d1:0x22c,_0x323475:0x202,_0x280066:0x25f,_0x1f67a6:0x19b,_0x23d150:0x1b4,_0x28b6ca:0x1a5,_0x4b678d:0x1e1,_0x28c51f:0x213,_0x341508:0x207,_0x5e01e0:0x1e9,_0x53866d:0x1c9,_0x2bae5c:0x202,_0x27c459:0x1fc,_0x72cf28:0x212,_0x5b4746:0x234,_0x1d8b4d:0x256,_0x39db67:0x20c},_0x5e98cb={_0x1a609e:0x2a,_0x53a21b:0x191,_0x1ec7f6:0x1db},_0x5ab52d={_0x26a7a0:0xa5},_0x513ef0={_0x5084d6:0xf8,_0x2de78a:0x13,_0x3810c7:0x3be},_0x4eb02a={_0x3ddeb2:0x1d5};this[_0x918269(_0x58c8b0._0x3a06db,_0x58c8b0._0x21dfaa,0x1c9,_0x58c8b0._0x134c51)]=_0xb6137f[_0x58390a(_0x58c8b0._0x35e73f,_0x58c8b0._0x14d1f1,0x23f,_0x58c8b0._0x2948d1)]??createSessionId(),this[_0x918269(0x205,_0x58c8b0._0x323475,0x254,0x214)]=0x0,this[_0x58390a(_0x58c8b0._0x280066,0x246,0x27c,0x1f2)]=_0xb6137f[_0x918269(0x1cd,_0x58c8b0._0x1f67a6,_0x58c8b0._0x23d150,_0x58c8b0._0x28b6ca)]??'',this['messages']=(_0xb6137f['messages']??[])[_0x918269(0x1d0,0x199,0x1fb,_0x58c8b0._0x4b678d)](normalizeMessage),this[_0x58390a(_0x58c8b0._0x28c51f,_0x58c8b0._0x341508,0x242,_0x58c8b0._0x5e01e0)]=createDefaultMessage(_0xb6137f[_0x918269(0x219,_0x58c8b0._0x53866d,_0x58c8b0._0x2bae5c,0x1c8)]),this['metrics']=createAgentMetrics({'getContextWindowLimit':_0xb6137f['getContextWindowLimit']});function _0x58390a(_0x5646c9,_0x35f919,_0xd76429,_0x2570a7){return _0x5c95e7(_0x35f919-_0x4eb02a._0x3ddeb2,_0x35f919-0x4a,_0x5646c9,_0x2570a7-0x25);}const _0xcfc19e=_0xb6137f['onEvent'];function _0x918269(_0x34e74c,_0x5a2c34,_0x1bf1f8,_0x4de48b){return _0x2581b(_0x34e74c-_0x513ef0._0x5084d6,_0x5a2c34,_0x1bf1f8-_0x513ef0._0x2de78a,_0x34e74c- -_0x513ef0._0x3810c7);}const _0x171ed4=async(_0x3f8522,_0x5e4b0d)=>{const _0x487378={_0x3ede4a:0x96};function _0x4af466(_0x3b83ad,_0x2da62d,_0x483dcf,_0x1445bb){return _0x918269(_0x2da62d- -0x32d,_0x3b83ad,_0x483dcf-_0x487378._0x3ede4a,_0x1445bb-0x12a);}this[_0x12088c(-0x5,_0x5e98cb._0x1a609e,-0x36,-0x48)][_0x4af466(-_0x5e98cb._0x53a21b,-0x1a7,-0x1ec,-_0x5e98cb._0x1ec7f6)](_0x3f8522);function _0x12088c(_0x59ceee,_0x32ed19,_0x184fbd,_0x5b11b9){return _0x58390a(_0x5b11b9,_0x59ceee- -0x27b,_0x184fbd-_0x5ab52d._0x26a7a0,_0x5b11b9-0x19c);}await _0xcfc19e?.(_0x3f8522,_0x5e4b0d);},_0x2df744=createInternalToolRuntime(_0xb6137f['tools']??[],{'onEvent':_0x171ed4,'onToolCall':_0xb6137f[_0x58390a(0x201,0x24c,_0x58c8b0._0x27c459,0x275)]});this[_0x918269(_0x58c8b0._0x72cf28,0x23d,0x218,0x1ed)]={'registry':createRegistry(_0xb6137f),'chatModel':resolveChatModel(_0xb6137f),'toolRuntime':_0x2df744,'askUser':_0xb6137f[_0x58390a(_0x58c8b0._0x5b4746,_0x58c8b0._0x1d8b4d,_0x58c8b0._0x14d1f1,0x23d)],'onEvent':_0x171ed4,'sessionDir':_0xb6137f[_0x58390a(_0x58c8b0._0x39db67,0x260,0x2ab,0x2b1)]};}get[_0x2581b(0x5a2,0x54b,0x5c7,0x58b)](){return this['_systemPrompt'];}[_0x5c95e7(0x7a,0x86,0xc2,0xb7)](_0x390cee=[]){const _0x1fee35={_0xae1638:0x1f2,_0x35fb31:0x250,_0x51dfc3:0x244,_0x4befa2:0x1a5,_0x8d756a:0x1e5},_0x41c794={_0xa8b312:0x20d,_0x320180:0x17},_0x3cc752={_0xc95587:0x17c,_0x280554:0x1df,_0x585cd1:0x1d6};function _0x22c128(_0x470878,_0x3f1584,_0x47418b,_0xb7296b){return _0x5c95e7(_0xb7296b-_0x3cc752._0xc95587,_0x3f1584-_0x3cc752._0x280554,_0x470878,_0xb7296b-_0x3cc752._0x585cd1);}function _0x1bf3f5(_0x31be0c,_0x4a3e63,_0x29109c,_0x32dc73){return _0x5c95e7(_0x4a3e63- -_0x41c794._0xa8b312,_0x4a3e63-0xf0,_0x32dc73,_0x32dc73-_0x41c794._0x320180);}this[_0x22c128(_0x1fee35._0xae1638,0x28b,_0x1fee35._0x35fb31,_0x1fee35._0x51dfc3)][_0x22c128(0x22d,0x24c,0x1cd,0x212)][_0x22c128(_0x1fee35._0x4befa2,_0x1fee35._0x8d756a,0x1a9,0x1f6)](_0x390cee);}[_0x5c95e7(0x76,0x42,0xc5,0x3f)](_0x9f6103,_0x4edf83={}){const _0x1baaa7={_0x10a70e:0x21b,_0x4a1c56:0x242,_0x54d63a:0x16e,_0x37a718:0x1b6,_0x244fe5:0x18d,_0x54bc9b:0x1e3,_0x1c0f6f:0x217,_0xe4e390:0x138,_0x30c7d6:0x112},_0x5783c0={_0x484dc0:0x1e0},_0x3908cf={_0x42a770:0x18e,_0x54a9f8:0x9d,_0x305bb5:0x6fb};this[_0x4a45ab(_0x1baaa7._0x10a70e,0x1ce,_0x1baaa7._0x4a1c56,0x1fe)]=_0x9f6103;function _0x3985eb(_0x46173b,_0x46cfe3,_0x5bcb06,_0x23b833){return _0x2581b(_0x46173b-_0x3908cf._0x42a770,_0x46cfe3,_0x5bcb06-_0x3908cf._0x54a9f8,_0x46173b- -_0x3908cf._0x305bb5);}function _0x4a45ab(_0x18fa78,_0xd16048,_0x135519,_0x522891){return _0x2581b(_0x18fa78-0x123,_0xd16048,_0x135519-_0x5783c0._0x484dc0,_0x522891- -0x37b);}_0x4edf83[_0x3985eb(-_0x1baaa7._0x54d63a,-0x1c5,-_0x1baaa7._0x37a718,-0x12c)]===!![]&&(this[_0x4a45ab(_0x1baaa7._0x244fe5,_0x1baaa7._0x54bc9b,_0x1baaa7._0x1c0f6f,0x1d5)]=[],this[_0x3985eb(-_0x1baaa7._0xe4e390,-_0x1baaa7._0x30c7d6,-0x138,-0x12b)]=0x0);}[_0x5c95e7(0x2b,0x63,0x75,0x17)](_0x48a669){const _0x189bf4={_0x31aabd:0x46e},_0x5f3f4a={_0x2f7eff:0x39b};function _0x185db0(_0x35ac4a,_0x4ea422,_0x1e324a,_0x4e1125){return _0x5c95e7(_0x35ac4a-_0x5f3f4a._0x2f7eff,_0x4ea422-0x145,_0x4ea422,_0x4e1125-0x141);}this[_0x185db0(0x42f,0x45b,_0x189bf4._0x31aabd,0x46b)]=_0x48a669;}[_0x2581b(0x576,0x5d7,0x573,0x5c8)](_0x5ce493){const _0x269706={_0x3f98ae:0x493,_0x5f35b0:0x493,_0x59c352:0x410,_0x2acbb5:0x446},_0x5e13f0={_0x5794ef:0x136,_0x3b0907:0x1,_0x40c780:0xfa};function _0x4d35aa(_0x9efd1c,_0x25c546,_0x495ef7,_0x3c9a4f){return _0x2581b(_0x9efd1c-0x1a,_0x25c546,_0x495ef7-0x1ba,_0x495ef7- -0x22b);}function _0x5f1381(_0x2c62ab,_0x1e5cb9,_0x410f38,_0x104e8f){return _0x2581b(_0x2c62ab-_0x5e13f0._0x5794ef,_0x410f38,_0x410f38-_0x5e13f0._0x3b0907,_0x104e8f- -_0x5e13f0._0x40c780);}this[_0x5f1381(0x4b0,_0x269706._0x3f98ae,_0x269706._0x5f35b0,0x4d6)][_0x5f1381(_0x269706._0x59c352,0x404,0x40a,_0x269706._0x2acbb5)]=_0x5ce493;}async[_0x2581b(0x539,0x567,0x53f,0x55d)](_0x3850e2=this['defaultMessage'],_0x2f3c81={}){const _0x10c4e1={_0x52792b:0x269,_0x20f6b0:0x224,_0x5e7ab2:0x21a,_0x156dae:0x215,_0x350e3c:0x188,_0x28e864:0x1ff,_0x271e67:0x1df,_0x1313c6:0x220,_0x1fe7e0:0x249,_0x5e3059:0x1d0,_0xe90611:0x206,_0x436390:0x1af,_0x15f889:0x12e,_0x2b0bb1:0x1ce,_0x2e5ae2:0x149,_0x328550:0x1b8,_0x3d60bb:0x1b8,_0x3d5124:0x193,_0x4c1cee:0x1e2,_0x6edafa:0x1fa,_0x480622:0x23e,_0x380614:0x127,_0x3e8edf:0x17a,_0xb1f789:0x211,_0x1c9836:0x13e,_0x2d5b85:0x18c,_0x200385:0x193,_0x55f55e:0x1eb,_0xe7b56c:0x16a,_0x3210db:0x1ab,_0x3b39f0:0x14a},_0x151fb5={_0x19ec4a:0x4c},_0x1fe532={_0x43598d:0x2b,_0x88512c:0x3d6};if(!_0x3850e2)throw new Error(_0x11c9d7(0x264,_0x10c4e1._0x52792b,0x25a,_0x10c4e1._0x20f6b0));function _0x1c1d65(_0x38ebd8,_0x547404,_0x4704c8,_0x2d65fb){return _0x2581b(_0x38ebd8-0x1eb,_0x2d65fb,_0x4704c8-_0x1fe532._0x43598d,_0x4704c8- -_0x1fe532._0x88512c);}this[_0x1c1d65(_0x10c4e1._0x5e7ab2,_0x10c4e1._0x156dae,0x1ed,0x226)]+=0x1;function _0x11c9d7(_0x1b6832,_0x63d127,_0x8ec46b,_0x2d3622){return _0x2581b(_0x1b6832-0xa7,_0x1b6832,_0x8ec46b-_0x151fb5._0x19ec4a,_0x2d3622- -0x3bd);}try{const _0x440481=await runTurn({'sessionId':this[_0x11c9d7(0x1c0,_0x10c4e1._0x350e3c,_0x10c4e1._0x28e864,_0x10c4e1._0x271e67)],'turnId':createTurnId(this[_0x11c9d7(_0x10c4e1._0x1313c6,_0x10c4e1._0x1fe7e0,_0x10c4e1._0x5e3059,_0x10c4e1._0xe90611)]),'streaming':_0x2f3c81['streaming'],'signal':_0x2f3c81[_0x1c1d65(0x113,_0x10c4e1._0x436390,0x167,_0x10c4e1._0x15f889)],'system':this[_0x11c9d7(0x221,0x1bb,0x1c4,_0x10c4e1._0x2b0bb1)],'messages':this[_0x11c9d7(_0x10c4e1._0x2e5ae2,_0x10c4e1._0x328550,_0x10c4e1._0x3d60bb,_0x10c4e1._0x3d5124)],'message':normalizeUserInput(_0x3850e2)},this[_0x1c1d65(_0x10c4e1._0x4c1cee,0x22a,_0x10c4e1._0x6edafa,_0x10c4e1._0x480622)]);return this[_0x1c1d65(0x141,_0x10c4e1._0x380614,_0x10c4e1._0x3e8edf,0x1c0)]=_0x440481[_0x11c9d7(0x1b5,0x24e,_0x10c4e1._0xb1f789,0x204)][_0x11c9d7(_0x10c4e1._0x1c9836,_0x10c4e1._0x2d5b85,0x1af,_0x10c4e1._0x200385)]['map'](normalizeMessage),_0x440481;}catch(_0x34ee49){if(_0x34ee49 instanceof TurnFailedError){this[_0x11c9d7(_0x10c4e1._0x55f55e,0x1c4,_0x10c4e1._0xe7b56c,_0x10c4e1._0x3d5124)]=synthesizeMissingToolResults(_0x34ee49['state'][_0x1c1d65(0x137,_0x10c4e1._0x3210db,0x17a,_0x10c4e1._0x3b39f0)]['map'](normalizeMessage));throw _0x34ee49[_0x1c1d65(0x14c,0x190,0x181,_0x10c4e1._0x5e3059)];}throw _0x34ee49;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
1
+ (function(_0x402538,_0x5093c9){const _0x15d65e={_0x3e6b89:0x8f,_0x55b93a:0x6a,_0x167446:0x19,_0x2cab4a:0x68,_0x444a03:0x8f,_0x523a02:0x42,_0x408c18:0xbc,_0x7479cd:0xa9,_0x1107a5:0xb2,_0x36e1d6:0xa3,_0x42a8be:0x73,_0x504fc9:0xb3,_0x29773b:0xb4,_0x5c2d2b:0xbf,_0xe473c7:0x3ee,_0x102cf0:0x411,_0x1141b1:0x3b,_0x83288b:0x36,_0x3841d5:0x60,_0x39f6c4:0x449,_0x118ef6:0x43b},_0x5a189c={_0x4fb51b:0x2c4},_0x5f2c73=_0x402538();function _0x1a47e9(_0x48a45d,_0xeddb8c,_0x46fe0e,_0x4d8e98){return _0x4978(_0x4d8e98- -0xdf,_0x48a45d);}function _0x4918df(_0x5dc652,_0x1c8359,_0x1ef515,_0x120ed8){return _0x4978(_0x1c8359-_0x5a189c._0x4fb51b,_0x1ef515);}while(!![]){try{const _0x692729=parseInt(_0x1a47e9(_0x15d65e._0x3e6b89,0x42,_0x15d65e._0x55b93a,0x59))/0x1+-parseInt(_0x1a47e9(0x3a,0x5,0x88,0x50))/0x2*(parseInt(_0x1a47e9(_0x15d65e._0x167446,_0x15d65e._0x2cab4a,_0x15d65e._0x444a03,_0x15d65e._0x523a02))/0x3)+parseInt(_0x1a47e9(0x9f,0xb5,_0x15d65e._0x408c18,_0x15d65e._0x7479cd))/0x4+-parseInt(_0x1a47e9(0x5e,_0x15d65e._0x1107a5,_0x15d65e._0x36e1d6,_0x15d65e._0x42a8be))/0x5*(-parseInt(_0x1a47e9(_0x15d65e._0x504fc9,0x81,_0x15d65e._0x29773b,_0x15d65e._0x5c2d2b))/0x6)+-parseInt(_0x4918df(_0x15d65e._0xe473c7,0x425,_0x15d65e._0x102cf0,0x3f3))/0x7*(-parseInt(_0x1a47e9(_0x15d65e._0x1141b1,_0x15d65e._0x83288b,0x1d,_0x15d65e._0x3841d5))/0x8)+-parseInt(_0x4918df(0x4af,0x47d,0x4cf,0x4ac))/0x9+parseInt(_0x4918df(_0x15d65e._0x39f6c4,0x3fd,_0x15d65e._0x118ef6,0x3cd))/0xa;if(_0x692729===_0x5093c9)break;else _0x5f2c73['push'](_0x5f2c73['shift']());}catch(_0x462a43){_0x5f2c73['push'](_0x5f2c73['shift']());}}}(_0x362e,0xc13de));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-SEP4YYY3.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x256849){return typeof _0x256849==='object'&&_0x256849!==null&&!Array['isArray'](_0x256849);}function _0x4978(_0x461fc5,_0x706a88){_0x461fc5=_0x461fc5-0x119;const _0x362e31=_0x362e();let _0x49780f=_0x362e31[_0x461fc5];if(_0x4978['vZWnOb']===undefined){var _0x3d6f9c=function(_0x5462d4){const _0x10a73d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x256849='',_0xecc54c='';for(let _0x29fd32=0x0,_0x157b89,_0x38d21f,_0x16b471=0x0;_0x38d21f=_0x5462d4['charAt'](_0x16b471++);~_0x38d21f&&(_0x157b89=_0x29fd32%0x4?_0x157b89*0x40+_0x38d21f:_0x38d21f,_0x29fd32++%0x4)?_0x256849+=String['fromCharCode'](0xff&_0x157b89>>(-0x2*_0x29fd32&0x6)):0x0){_0x38d21f=_0x10a73d['indexOf'](_0x38d21f);}for(let _0x1b8ac3=0x0,_0x5d5511=_0x256849['length'];_0x1b8ac3<_0x5d5511;_0x1b8ac3++){_0xecc54c+='%'+('00'+_0x256849['charCodeAt'](_0x1b8ac3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xecc54c);};_0x4978['atFzHI']=_0x3d6f9c,_0x4978['YxLSjt']={},_0x4978['vZWnOb']=!![];}const _0x5a8b2b=_0x362e31[0x0],_0x14ca14=_0x461fc5+_0x5a8b2b,_0x328a71=_0x4978['YxLSjt'][_0x14ca14];return!_0x328a71?(_0x49780f=_0x4978['atFzHI'](_0x49780f),_0x4978['YxLSjt'][_0x14ca14]=_0x49780f):_0x49780f=_0x328a71,_0x49780f;}function isToolOutputEnvelope(_0xecc54c){const _0x4fdc36={_0xa777bb:0x18d,_0x41f26d:0x133,_0x1ae201:0xde,_0x176794:0xcf,_0x25b040:0x164,_0x43d514:0x1c2,_0x52d270:0x188},_0x4a7ad0={_0x2e385c:0x1c5},_0x31b5b2={_0x13ddbc:0x2e4};function _0xe65427(_0x89b2dc,_0x3ddbcd,_0x46edb7,_0x15a1b9){return _0x4978(_0x46edb7- -_0x31b5b2._0x13ddbc,_0x3ddbcd);}if(typeof _0xecc54c!==_0xe65427(-0xe7,-_0x4fdc36._0xa777bb,-0x139,-_0x4fdc36._0x41f26d)||_0xecc54c===null||Array[_0x14b007(-0x3a,-0xe,-0x1e,0x13)](_0xecc54c))return![];if(typeof _0xecc54c['output']!==_0x14b007(-0x6d,-0xa3,-_0x4fdc36._0x1ae201,-_0x4fdc36._0x176794))return![];function _0x14b007(_0xb47279,_0x790b2a,_0x721b2f,_0x50591f){return _0x4978(_0x790b2a- -_0x4a7ad0._0x2e385c,_0xb47279);}const _0x29fd32=_0xecc54c[_0xe65427(-_0x4fdc36._0x25b040,-_0x4fdc36._0x43d514,-_0x4fdc36._0x52d270,-0x15f)];return _0x29fd32===void 0x0||isJsonObject(_0x29fd32);}function validateAgainstSchema(_0x157b89,_0x38d21f,_0x16b471){const _0x4abb66={_0x5699ae:0xa8,_0x283ff8:0x7c,_0x82f51c:0x7a,_0x351bd6:0x1c0,_0x232fc4:0x2a,_0x3bfaac:0x9,_0xace4ca:0x48,_0x21b973:0x5e,_0x2efef5:0x1fa,_0x3943a1:0x58,_0x1806b7:0x33,_0x5a0331:0x6,_0x4f62ba:0x38,_0x11f048:0x1c8,_0x53cb8d:0x1b6,_0x4778f0:0x16d,_0x3635db:0x197,_0x110cff:0x18a,_0x362d02:0x16e,_0x580940:0x146,_0x77ba45:0x171,_0x3fcfff:0x39,_0x217f5d:0x44,_0x2b8259:0x190,_0x261446:0x135,_0x427ded:0x14a,_0x2dc9e7:0x3a,_0x27df7f:0x8a,_0x5f73c8:0x53,_0x7c6a98:0x3e,_0x4e0480:0x140,_0x1bb7e3:0x16c,_0x20e95c:0x167,_0x140040:0x1e4,_0x364ca7:0x1cf,_0x32a428:0x1aa},_0x4c10b9={_0x542bb2:0x545,_0x520642:0x54a,_0xa56436:0x529,_0x30e558:0x574},_0x594a97={_0x1f8966:0x1d8,_0x1442cc:0x4a2},_0x4597c4={_0x2e920e:0x2f7};function _0x135764(_0x283e57,_0x5b118c,_0x5500e0,_0xab8113){return _0x4978(_0x5500e0- -0x12c,_0xab8113);}function _0x4eb04f(_0x9e0df5,_0x3d0744,_0x4453e6,_0x3a4277){return _0x4978(_0x3d0744- -_0x4597c4._0x2e920e,_0x4453e6);}switch(_0x16b471[_0x135764(_0x4abb66._0x5699ae,_0x4abb66._0x283ff8,_0x4abb66._0x82f51c,0x54)]){case _0x4eb04f(-0x1f2,-0x1d5,-_0x4abb66._0x351bd6,-0x1cb):if(typeof _0x38d21f!==_0x135764(-_0x4abb66._0x232fc4,-_0x4abb66._0x3bfaac,-0xa,-_0x4abb66._0xace4ca))throw new Error(_0x135764(0x2e,0x4e,_0x4abb66._0x21b973,0x6c)+_0x157b89+_0x4eb04f(-0x195,-0x1b5,-_0x4abb66._0x2efef5,-0x208));return;case _0x135764(-_0x4abb66._0x3943a1,_0x4abb66._0x1806b7,-_0x4abb66._0x5a0331,_0x4abb66._0x4f62ba):if(typeof _0x38d21f!==_0x4eb04f(-_0x4abb66._0x11f048,-0x1d1,-0x1a4,-0x1c0))throw new Error(_0x4eb04f(-_0x4abb66._0x53cb8d,-_0x4abb66._0x4778f0,-_0x4abb66._0x3635db,-0x11c)+_0x157b89+_0x4eb04f(-_0x4abb66._0x110cff,-_0x4abb66._0x362d02,-_0x4abb66._0x580940,-_0x4abb66._0x77ba45));return;case'boolean':if(typeof _0x38d21f!==_0x135764(-_0x4abb66._0x3fcfff,_0x4abb66._0x217f5d,-0xd,-0x48))throw new Error(_0x4eb04f(-_0x4abb66._0x2b8259,-0x16d,-0x119,-0x1bc)+_0x157b89+_0x4eb04f(-_0x4abb66._0x261446,-0x15e,-0x1a4,-_0x4abb66._0x427ded));return;case _0x135764(_0x4abb66._0x2dc9e7,_0x4abb66._0x27df7f,_0x4abb66._0x5f73c8,_0x4abb66._0x7c6a98):if(!Array[_0x4eb04f(-0x160,-_0x4abb66._0x4e0480,-0x151,-0x118)](_0x38d21f))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x157b89+_0x4eb04f(-_0x4abb66._0x1bb7e3,-_0x4abb66._0x20e95c,-0x18e,-0x16b));_0x38d21f[_0x135764(0xc7,0x8b,0x8f,0xaa)]((_0x1b8ac3,_0x5d5511)=>{function _0x59d6a5(_0x1d3843,_0x3faf29,_0x380468,_0x38ccae){return _0x135764(_0x1d3843-0x188,_0x3faf29-_0x594a97._0x1f8966,_0x380468-_0x594a97._0x1442cc,_0x1d3843);}validateAgainstSchema(_0x157b89+'['+_0x5d5511+']',_0x1b8ac3,_0x16b471[_0x59d6a5(_0x4c10b9._0x542bb2,_0x4c10b9._0x520642,_0x4c10b9._0xa56436,_0x4c10b9._0x30e558)]);});return;case'object':if(!isJsonObject(_0x38d21f))throw new Error(_0x135764(0x32,0x80,0x5e,0x49)+_0x157b89+':\x20expected\x20object');for(const _0x5555e6 of _0x16b471[_0x4eb04f(-_0x4abb66._0x53cb8d,-0x1bd,-0x16b,-_0x4abb66._0x4778f0)]??[]){if(!(_0x5555e6 in _0x38d21f))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x157b89+':\x20missing\x20required\x20field\x20\x22'+_0x5555e6+'\x22');}for(const [_0x55920d,_0x53943c]of Object[_0x4eb04f(-_0x4abb66._0x140040,-_0x4abb66._0x364ca7,-0x187,-_0x4abb66._0x32a428)](_0x16b471['properties'])){_0x55920d in _0x38d21f&&validateAgainstSchema(_0x157b89+'.'+_0x55920d,_0x38d21f[_0x55920d],_0x53943c);}}}function normalizeToolOutputValue(_0x290632){const _0x12a4b5={_0x56ea99:0x5f,_0x13cbbd:0xf,_0x352f13:0x4c,_0x24a8e:0x247,_0x4e84b5:0x23b,_0x2ef129:0x62,_0x41d96a:0x7,_0x57d533:0x270,_0x2586ef:0x1f2,_0x528d78:0x234,_0x1dac1d:0x238,_0xfb01cc:0x252,_0x55585a:0x201,_0x22dcde:0x64,_0x2ccb66:0x58,_0x5798a9:0x53,_0x53ffcc:0x294,_0x34f8a6:0x29a,_0x58e2d3:0x26b,_0x4e6354:0x71},_0x67c986={_0x211167:0xdf},_0x49976f={_0x1ab81e:0x158};if(isToolOutputEnvelope(_0x290632))return{'output':_0x290632[_0xbf1ba4(_0x12a4b5._0x56ea99,_0x12a4b5._0x13cbbd,0x8a,_0x12a4b5._0x352f13)],'structured':_0x290632[_0x148432(_0x12a4b5._0x24a8e,0x21a,_0x12a4b5._0x4e84b5,0x25d)]??{'value':_0x290632[_0xbf1ba4(_0x12a4b5._0x2ef129,_0x12a4b5._0x41d96a,0x25,0x4c)]},..._0x290632['content']!==void 0x0?{'content':_0x290632[_0x148432(_0x12a4b5._0x57d533,_0x12a4b5._0x2586ef,_0x12a4b5._0x528d78,_0x12a4b5._0x1dac1d)]}:{}};if(typeof _0x290632===_0x148432(_0x12a4b5._0xfb01cc,0x248,_0x12a4b5._0x55585a,0x1ba))return{'output':_0x290632,'structured':{'value':_0x290632}};if(typeof _0x290632===_0xbf1ba4(_0x12a4b5._0x22dcde,_0x12a4b5._0x2ccb66,0x95,_0x12a4b5._0x5798a9)&&_0x290632!==null&&!Array[_0x148432(_0x12a4b5._0x53ffcc,_0x12a4b5._0x34f8a6,0x296,_0x12a4b5._0x58e2d3)](_0x290632))return{'output':JSON[_0xbf1ba4(0x8a,0x27,_0x12a4b5._0x4e6354,0x56)](_0x290632,null,0x2),'structured':_0x290632};function _0xbf1ba4(_0x26d7c7,_0x2afa13,_0x4c7de7,_0x3c4115){return _0x4978(_0x3c4115- -_0x49976f._0x1ab81e,_0x26d7c7);}function _0x148432(_0x2b1158,_0x190108,_0x3fdd11,_0x1eedbe){return _0x4978(_0x3fdd11-_0x67c986._0x211167,_0x2b1158);}return{'output':JSON['stringify'](_0x290632,null,0x2),'structured':{'value':_0x290632}};}function createToolOutput(_0x2c5466,_0x2442e9={'value':_0x2c5466},_0x103c26){return{'output':_0x2c5466,'structured':_0x2442e9,..._0x103c26!==void 0x0?{'content':_0x103c26}:{}};}var ToolExecutionError=class extends Error{[_0x2cb4b9(0x33,0x22,0x1e,0x49)];constructor(_0x24c76b,_0x349a52={}){const _0x1d6e1d={_0x5b59ba:0x4d5,_0x24be5a:0x519,_0x3754b4:0x4ca,_0xd35e67:0x469,_0xf17686:0x48f,_0x268383:0x427},_0x47c36a={_0x38a702:0x1e3};super(_0x24c76b),this[_0x1b1ef5(0x4cc,_0x1d6e1d._0x5b59ba,_0x1d6e1d._0x24be5a,_0x1d6e1d._0x3754b4)]='ToolExecutionError';function _0x1b1ef5(_0x1a4fba,_0x2feab5,_0x828bdb,_0x1fa160){return _0x2cb4b9(_0x828bdb,_0x2feab5-_0x47c36a._0x38a702,_0x1a4fba-0x44b,_0x1fa160-0x99);}function _0x353b4e(_0xe96eb0,_0x57adbd,_0xfa07f5,_0x3bdcaf){return _0x2cb4b9(_0xe96eb0,_0x57adbd-0x163,_0x3bdcaf-0xb8,_0x3bdcaf-0x32);}this[_0x1b1ef5(_0x1d6e1d._0xd35e67,0x49c,_0x1d6e1d._0xf17686,_0x1d6e1d._0x268383)]=_0x349a52;}};function defineTool(_0x4043da){return _0x4043da;}var ToolRegistry=class{[_0xc4fa22(0x476,0x41a,0x461,0x471)]=new Map();constructor(_0x50500f=[]){const _0xb9a0ca={_0x150a27:0x20a},_0x1e619f={_0x2a98b0:0x13};function _0x4f842a(_0x20064f,_0x30951f,_0x21be0f,_0x352a6b){return _0xc4fa22(_0x21be0f,_0x30951f-_0x1e619f._0x2a98b0,_0x352a6b- -0x237,_0x352a6b-0x18);}for(const _0x4a4ad3 of _0x50500f){this[_0x4f842a(0x22b,_0xb9a0ca._0x150a27,0x243,0x22c)](_0x4a4ad3);}}[_0xc4fa22(0x420,0x462,0x463,0x48a)](_0x55710b){const _0x2e40bf={_0x65ffdd:0x166,_0x110c16:0x148},_0x25a155={_0x3c1d05:0x1b9,_0x3b08db:0x550},_0x32a1b0={_0x42154d:0x183};function _0x478154(_0x149f21,_0x5ac6a0,_0x1e778e,_0x392c8b){return _0x2cb4b9(_0x5ac6a0,_0x5ac6a0-0x132,_0x392c8b-_0x32a1b0._0x42154d,_0x392c8b-0x164);}function _0x4250df(_0x3af6e2,_0x5a6a99,_0x4124a2,_0x3cb2f4){return _0xc4fa22(_0x3af6e2,_0x5a6a99-_0x25a155._0x3c1d05,_0x5a6a99- -_0x25a155._0x3b08db,_0x3cb2f4-0xdb);}this[_0x478154(0x18b,0x17b,0x187,0x1be)][_0x4250df(-_0x2e40bf._0x65ffdd,-_0x2e40bf._0x110c16,-0x101,-0xfb)](_0x55710b['name'],_0x55710b);}[_0xc4fa22(0x470,0x45e,0x432,0x3fc)](_0x5a4d8e){const _0x2d0a46={_0x520271:0x2c,_0x81ff03:0xb1,_0x56e6c2:0x6b,_0x43c8be:0x5c},_0x462b1a={_0x5cf5c9:0x13,_0x5e05ea:0x159},_0x183831={_0x1a944a:0x12,_0x22b529:0x1df};function _0x255007(_0x3647b5,_0x25771a,_0x589119,_0x34be31){return _0x2cb4b9(_0x3647b5,_0x25771a-0xd9,_0x25771a-_0x183831._0x1a944a,_0x34be31-_0x183831._0x22b529);}function _0x1ed563(_0x4653cc,_0x4dd4af,_0x110f5b,_0x223a51){return _0x2cb4b9(_0x223a51,_0x4dd4af-_0x462b1a._0x5cf5c9,_0x110f5b-0x2e,_0x223a51-_0x462b1a._0x5e05ea);}return this[_0x1ed563(0x17,_0x2d0a46._0x520271,0x69,_0x2d0a46._0x81ff03)][_0x1ed563(_0x2d0a46._0x56e6c2,0x7,0x3a,_0x2d0a46._0x43c8be)](_0x5a4d8e);}[_0x2cb4b9(-0x1a,0x28,0x18,0x6a)](){const _0x1cb74b={_0x1f689c:0x3cb,_0x1fb01e:0x3f5},_0x6f0274={_0x235358:0x77},_0x72221c={_0x219705:0x15c,_0x4c3453:0x177};function _0x5bf590(_0x2699ef,_0x27757b,_0x4fd80d,_0x3e1bab){return _0x2cb4b9(_0x3e1bab,_0x27757b-_0x72221c._0x219705,_0x4fd80d- -0x204,_0x3e1bab-_0x72221c._0x4c3453);}function _0x152bc9(_0x1cc265,_0x2f4508,_0x51e481,_0x3ee187){return _0xc4fa22(_0x1cc265,_0x2f4508-0xac,_0x3ee187- -_0x6f0274._0x235358,_0x3ee187-0xd);}return[...this[_0x152bc9(0x3ec,0x3ab,_0x1cb74b._0x1f689c,0x3ea)][_0x152bc9(0x3b6,0x3de,0x3de,_0x1cb74b._0x1fb01e)]()];}[_0x2cb4b9(0x7e,0xc6,0x82,0x77)](){const _0xa98985={_0x3df280:0x39,_0x4349b3:0x6,_0x654ffe:0x3c,_0x2f8393:0x114,_0x11859c:0x150},_0x24a32e={_0x3f5d10:0xdf,_0x44450a:0x130},_0x46cf0c={_0x2a2df7:0x9a},_0x21ed73={_0x314c6a:0x69,_0xacb23f:0x19c};function _0x5ab2c8(_0x31ef43,_0x10477d,_0x45a415,_0x37f0ca){return _0xc4fa22(_0x31ef43,_0x10477d-_0x21ed73._0x314c6a,_0x10477d- -0x444,_0x37f0ca-_0x21ed73._0xacb23f);}function _0x3650ea(_0x2a3ee3,_0x1820bc,_0x4ed948,_0x140ef0){return _0xc4fa22(_0x4ed948,_0x1820bc-0xe0,_0x140ef0- -0x592,_0x140ef0-_0x46cf0c._0x2a2df7);}return this[_0x5ab2c8(-_0xa98985._0x3df280,-_0xa98985._0x4349b3,_0xa98985._0x654ffe,0x42)]()[_0x3650ea(-0x15f,-0x19f,-_0xa98985._0x2f8393,-_0xa98985._0x11859c)](_0x16a1dc=>{const _0x4a2082={_0x94d67a:0x11c,_0x17ae49:0x1ca};function _0x566693(_0x2301aa,_0xf527e1,_0x4389fb,_0x2f6169){return _0x3650ea(_0x2301aa-_0x4a2082._0x94d67a,_0xf527e1-0x60,_0x2301aa,_0xf527e1-_0x4a2082._0x17ae49);}return{'name':_0x16a1dc[_0x566693(0xbc,_0x24a32e._0x3f5d10,0x112,_0x24a32e._0x44450a)],'description':_0x16a1dc['description'],'input_schema':_0x16a1dc['inputSchema']};});}};function validateToolInput(_0x57c157,_0x2c36cf){const _0x5c1452={_0x1519d9:0x424,_0x5d104d:0x3ce},_0x46be6e={_0x5275b0:0x1f0,_0x153c93:0x39a};function _0x25992a(_0x2b0cde,_0x541fc0,_0x19adca,_0x524b0a){return _0x2cb4b9(_0x2b0cde,_0x541fc0-_0x46be6e._0x5275b0,_0x19adca-_0x46be6e._0x153c93,_0x524b0a-0x125);}return validateAgainstSchema(_0x25992a(0x3f4,_0x5c1452._0x1519d9,0x3f6,_0x5c1452._0x5d104d),_0x57c157,_0x2c36cf),_0x57c157;}function deriveFinalToolOutput(_0x38b176){const _0x23d991={_0x1d52c1:0x48c,_0x326359:0x486,_0x457107:0x30,_0x6cea31:0xe,_0x5e7e81:0x468,_0x583114:0x442,_0x380724:0x44a,_0x2bf0a0:0x488,_0x1616b7:0x79,_0x117d45:0x50d,_0x3c4415:0x517,_0x2592ae:0x4aa,_0x2d5770:0x4e0,_0x4ed428:0x3f,_0x5a931a:0x5b},_0x518026={_0x19aed0:0x156,_0x459d2e:0x471};function _0x55d96b(_0x141568,_0x500052,_0x3cefa2,_0x614317){return _0x2cb4b9(_0x141568,_0x500052-_0x518026._0x19aed0,_0x614317-_0x518026._0x459d2e,_0x614317-0x1a2);}if(_0x38b176['length']===0x0)return{'output':'','structured':{}};if(_0x38b176[_0x55d96b(_0x23d991._0x1d52c1,0x438,0x492,_0x23d991._0x326359)]===0x1)return{'output':_0x38b176[0x0][_0x51a5d0(_0x23d991._0x457107,-0x2f,_0x23d991._0x6cea31,-0x5)],'structured':_0x38b176[0x0][_0x55d96b(_0x23d991._0x5e7e81,0x4e1,0x4d2,0x48f)],..._0x38b176[0x0][_0x55d96b(0x4b9,_0x23d991._0x583114,_0x23d991._0x380724,_0x23d991._0x2bf0a0)]!==void 0x0?{'content':_0x38b176[0x0][_0x51a5d0(-0x3a,-0x82,-0x41,-_0x23d991._0x1616b7)]}:{}};function _0x51a5d0(_0x2edf3d,_0x441f81,_0x35c429,_0x38ce2b){return _0x2cb4b9(_0x441f81,_0x441f81-0x22,_0x35c429- -0x58,_0x38ce2b-0x9d);}const _0x555588=_0x38b176[_0x55d96b(_0x23d991._0x117d45,_0x23d991._0x3c4415,_0x23d991._0x2592ae,_0x23d991._0x2d5770)](_0x23f994=>_0x23f994[_0x51a5d0(-0x1d,-0xf,-0x41,-0x6b)]!==void 0x0);return{'output':_0x38b176[_0x51a5d0(-0x4b,-_0x23d991._0x4ed428,-0x3c,-_0x23d991._0x5a931a)](_0x56469d=>_0x56469d[_0x55d96b(0x4ce,0x4fc,0x4d5,0x4d7)])['join'](''),'structured':{'chunks':_0x38b176['map'](_0x33b020=>_0x33b020['structured'])},..._0x555588['length']===0x1?{'content':_0x555588[0x0]['content']}:{}};}function _0xc4fa22(_0x2623c5,_0x73c40d,_0x218b82,_0x120dd9){const _0x1099c2={_0x1410ce:0x2e8};return _0x4978(_0x218b82-_0x1099c2._0x1410ce,_0x2623c5);}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x2ed34f,_0x255fe1,_0x329ada,_0x5078ef=[]){const _0x6dcdcb={_0x2c6031:0xd4},_0x3fcd20={_0xc39298:0x38,_0x5bfb08:0x120,_0x1bf77a:0xc1};function _0x2ac10f(_0xdc496b,_0x9bc53b,_0x4b44ee,_0x33e69d){return _0x2cb4b9(_0xdc496b,_0x9bc53b-_0x3fcd20._0xc39298,_0x33e69d- -_0x3fcd20._0x5bfb08,_0x33e69d-_0x3fcd20._0x1bf77a);}return{'callId':_0x2ed34f['id'],'toolName':_0x2ed34f[_0x2ac10f(-_0x6dcdcb._0x2c6031,-0xd2,-0x94,-0x9f)],'status':'error','output':_0x255fe1,'structured':_0x329ada,'chunks':_0x5078ef,'meta':createToolMeta()};}function createRejectedToolResult(_0x5cc0bd,_0x41b098){const _0x355c74={_0x43e0ee:0x2be,_0x27541b:0x287,_0x18686b:0x75,_0x2a2078:0x89,_0x5cb5a1:0x5b,_0x1341e7:0x8c,_0x10eb98:0x18,_0x268ec4:0x14,_0x32b75a:0x19,_0x2bf24d:0xb,_0x53d8ac:0xad,_0x4aa2dd:0x2b2,_0x4e193a:0x294};function _0x568b84(_0x211980,_0x533e2a,_0x47b5ca,_0x497001){return _0x2cb4b9(_0x497001,_0x533e2a-0x114,_0x47b5ca-0x2d0,_0x497001-0x106);}const _0x3f2514=_0x41b098?.[_0x568b84(0x2ec,0x310,_0x355c74._0x43e0ee,_0x355c74._0x27541b)]()[_0x5e99d1(-_0x355c74._0x18686b,-0x26,-0x58,-_0x355c74._0x2a2078)]?_0x41b098:_0x5e99d1(-0x5f,-0x44,-_0x355c74._0x5cb5a1,-_0x355c74._0x1341e7)+_0x5cc0bd[_0x5e99d1(-_0x355c74._0x10eb98,0x14,_0x355c74._0x268ec4,_0x355c74._0x32b75a)];function _0x5e99d1(_0x2ee137,_0x18eae2,_0x2d68a2,_0x37bf15){return _0xc4fa22(_0x2ee137,_0x18eae2-0x61,_0x2d68a2- -0x493,_0x37bf15-0x1f2);}return createErrorToolResult(_0x5cc0bd,_0x3f2514,{'error':_0x5e99d1(-0xb,-0x2d,-_0x355c74._0x2bf24d,0x49),..._0x41b098?.[_0x5e99d1(-_0x355c74._0x53d8ac,-0xa8,-0x7f,-0xce)]()[_0x568b84(_0x355c74._0x4aa2dd,_0x355c74._0x4e193a,0x2e5,0x298)]?{'reason':_0x41b098}:{}});}function createAbortedToolResult(_0x5d42a7,_0x4f6e1a,_0x4362e3=[]){const _0x236721=toAbortError(_0x4f6e1a);return createErrorToolResult(_0x5d42a7,_0x236721['message'],{'error':_0x236721['message'],'aborted':!![]},_0x4362e3);}function createSuccessToolResult(_0x208f2e,_0xe8265d,_0x649195){const _0xa31e5c={_0x1685a5:0x143,_0x5b52c8:0x160,_0x1e4982:0x17f,_0x30b4fc:0x14c,_0x19c791:0x15f,_0x4e0733:0x192,_0x1531d4:0x1aa,_0x1429c1:0x1c8},_0x51e1e9={_0x1e4924:0x44c},_0x7715cf={_0x57edb6:0xe0};function _0x226f88(_0x39a244,_0xe7a62a,_0x203932,_0x2e267c){return _0xc4fa22(_0xe7a62a,_0xe7a62a-0x1c7,_0x39a244- -0x5cf,_0x2e267c-_0x7715cf._0x57edb6);}function _0x1443ad(_0x3caa5d,_0x4a0346,_0x186b08,_0x152248){return _0xc4fa22(_0x4a0346,_0x4a0346-0x179,_0x186b08- -_0x51e1e9._0x1e4924,_0x152248-0x13b);}return{'callId':_0x208f2e['id'],'toolName':_0x208f2e['name'],'status':'ok','output':_0xe8265d[_0x226f88(-_0xa31e5c._0x1685a5,-0xfa,-_0xa31e5c._0x5b52c8,-_0xa31e5c._0x1e4982)],'structured':_0xe8265d[_0x226f88(-0x18b,-0x191,-_0xa31e5c._0x30b4fc,-0x1df)],..._0xe8265d[_0x226f88(-0x192,-0x1ca,-0x150,-_0xa31e5c._0x19c791)]!==void 0x0?{'content':_0xe8265d[_0x226f88(-_0xa31e5c._0x4e0733,-0x1a9,-_0xa31e5c._0x1531d4,-_0xa31e5c._0x1429c1)]}:{},'chunks':_0x649195,'meta':createToolMeta()};}function createUnknownToolResult(_0xe30945){const _0x2a765e={_0x23a8ea:0x4ce,_0x13f950:0x4b1,_0xa66927:0x4d3,_0x56e64b:0x574,_0x2e8cd8:0x57c,_0x127f47:0x56d,_0x5188a2:0x537,_0x1a4fd1:0x586,_0x407482:0x531},_0x1ba3b6={_0x1a6c9e:0x614,_0x394de7:0x1ae},_0x57f710={_0x1fc603:0x58};function _0x5a397b(_0x3d9063,_0xa15de7,_0x4dbf67,_0x52095f){return _0x2cb4b9(_0x4dbf67,_0xa15de7-_0x57f710._0x1fc603,_0x3d9063-0x4f3,_0x52095f-0x14b);}function _0x471f0a(_0x44e918,_0x200ccc,_0x42cf77,_0x397079){return _0xc4fa22(_0x397079,_0x200ccc-0x114,_0x42cf77- -_0x1ba3b6._0x1a6c9e,_0x397079-_0x1ba3b6._0x394de7);}return createErrorToolResult(_0xe30945,_0x5a397b(_0x2a765e._0x23a8ea,_0x2a765e._0x13f950,0x4ba,_0x2a765e._0xa66927)+_0xe30945[_0x5a397b(_0x2a765e._0x56e64b,_0x2a765e._0x2e8cd8,_0x2a765e._0x127f47,0x5c0)],{'error':_0x5a397b(_0x2a765e._0x5188a2,0x554,_0x2a765e._0x1a4fd1,_0x2a765e._0x407482)});}function isDispatchDecision(_0x450734){const _0x30e379={_0x699433:0x14a,_0x144b90:0x16d,_0x30edc1:0x1ca,_0x5be3fc:0x19c,_0x31b007:0x1b6,_0xd47551:0x1c7,_0x2de2ed:0x1bd,_0x697ad0:0x192},_0x1deb4b={_0x42d9f0:0x1ea,_0xf987d0:0x1d1};function _0x51491d(_0x19be9a,_0x5e4b14,_0x23c8be,_0x4a7c8f){return _0x2cb4b9(_0x5e4b14,_0x5e4b14-_0x1deb4b._0x42d9f0,_0x4a7c8f- -0x1da,_0x4a7c8f-_0x1deb4b._0xf987d0);}if(typeof _0x450734!==_0x51491d(-0x19a,-_0x30e379._0x699433,-0x12c,-_0x30e379._0x144b90)||_0x450734===null)return![];function _0x4b3243(_0x504203,_0x5345da,_0x20db63,_0x2beb64){return _0xc4fa22(_0x2beb64,_0x5345da-0x11f,_0x5345da- -0x29a,_0x2beb64-0x4a);}return _0x450734['action']===_0x4b3243(0x1b2,_0x30e379._0x30edc1,_0x30e379._0x5be3fc,0x219)||_0x450734[_0x51491d(-_0x30e379._0x31b007,-0x1ac,-0x1fa,-_0x30e379._0xd47551)]===_0x51491d(-0x175,-_0x30e379._0x2de2ed,-0x14c,-_0x30e379._0x697ad0);}function normalizeExecutionError(_0x3b76af){const _0x42e046={_0x1b9c6c:0xd1,_0x58aec4:0x101,_0x2aebe0:0xfc,_0x18e20c:0x11b,_0xf75d2:0x90,_0x46f9fa:0x190,_0x4e45bc:0x169},_0x3fcc41={_0x260036:0x1cb},_0x24df75={_0x563f19:0x19d};function _0x118951(_0x17f5f3,_0xde8194,_0x3a61f9,_0x333455){return _0xc4fa22(_0xde8194,_0xde8194-0x27,_0x17f5f3- -0x2b0,_0x333455-_0x24df75._0x563f19);}if(_0x3b76af instanceof ToolExecutionError)return{'errorMessage':_0x3b76af['message'],'structured':{'error':_0x3b76af[_0xfec736(0x9c,0x122,_0x42e046._0x1b9c6c,0x8e)],..._0x3b76af[_0xfec736(_0x42e046._0x58aec4,0xad,0xd5,0x11f)]}};function _0xfec736(_0x3e614a,_0xfb618f,_0x17c527,_0x9021fb){return _0x2cb4b9(_0x3e614a,_0xfb618f-_0x3fcc41._0x260036,_0x17c527-0xb7,_0x9021fb-0x116);}if(_0x3b76af instanceof Error)return{'errorMessage':_0x3b76af[_0xfec736(_0x42e046._0x2aebe0,_0x42e046._0x18e20c,0xd1,_0x42e046._0xf75d2)],'structured':{'error':_0x3b76af[_0x118951(_0x42e046._0x46f9fa,0x19a,_0x42e046._0x4e45bc,0x193)]}};const _0x170e1a=String(_0x3b76af);return{'errorMessage':_0x170e1a,'structured':{'error':_0x170e1a}};}async function emitEvent(_0x5997dc,_0x5bc323,_0xd4d442){await _0x5997dc?.(_0x5bc323,_0xd4d442);}async function resolveDispatchDecision(_0x27df97,_0x222680,_0x12f3c2){const _0x31c65c={_0x2095f2:0x380,_0x1b37a3:0x331,_0x2fa3fa:0x378,_0x1ecaf8:0x4fb,_0x17dff1:0x4f0,_0x5d2a4d:0x323,_0x1e3619:0x385,_0x2d61dd:0x3a3,_0x5ac293:0x3cf},_0x506956={_0x261f27:0x10d,_0x5f08b3:0x17b,_0x2d764f:0x156,_0x56e695:0x190,_0x26984e:0x1c2,_0x160772:0x5b,_0x17cd56:0x85,_0x365a45:0x4d,_0x1d6d3a:0x6,_0x37f198:0x6e},_0xdeb8a2={_0x2e9a07:0x2a4,_0x10ae34:0x2a6,_0x55a527:0x1ae,_0x265a0e:0x1eb,_0x55889a:0x1a9,_0xf7d720:0x326,_0x57f5de:0x2fd},_0x4993a0={_0x28b424:0x6e,_0x2b1b4c:0xfc},_0x1d08a2={_0x46b1ac:0x187},_0x182fcd={_0x32d994:0x4a};if(!_0x27df97)return{'action':_0x6b27d6(0x3d0,0x3cf,0x3f0,0x3e4)};function _0xcad17b(_0x366796,_0x287792,_0x52e531,_0x1231a0){return _0xc4fa22(_0x52e531,_0x287792-_0x182fcd._0x32d994,_0x287792-0x82,_0x1231a0-0x1ad);}const _0x12be15=Promise['resolve']()['then'](()=>_0x27df97(_0x222680,_0x12f3c2));function _0x6b27d6(_0x521f53,_0x2e113f,_0x481fa1,_0x37aa6b){return _0x2cb4b9(_0x37aa6b,_0x2e113f-_0x1d08a2._0x46b1ac,_0x2e113f-0x387,_0x37aa6b-0xa7);}if(!_0x12f3c2[_0x6b27d6(0x368,_0x31c65c._0x2095f2,_0x31c65c._0x1b37a3,_0x31c65c._0x2fa3fa)]){const _0x2effe6=await _0x12be15;return isDispatchDecision(_0x2effe6)?_0x2effe6:{'action':_0xcad17b(_0x31c65c._0x1ecaf8,_0x31c65c._0x17dff1,0x4e3,0x50d)};}const _0x3dde43=new Promise((_0x470c4e,_0x33ba41)=>{function _0x51149c(_0x23effc,_0xa955c6,_0x47663d,_0x425c93){return _0xcad17b(_0x23effc-_0x4993a0._0x28b424,_0x425c93- -0x663,_0x47663d,_0x425c93-_0x4993a0._0x2b1b4c);}const _0xba5ae4=()=>{const _0x15e378={_0x162669:0x15a};function _0x5be6d4(_0x206276,_0x4f795c,_0x50f036,_0x1242e9){return _0x4978(_0x4f795c-_0x15e378._0x162669,_0x206276);}_0x12f3c2[_0x5be6d4(_0xdeb8a2._0x2e9a07,0x291,_0xdeb8a2._0x10ae34,0x283)]?.[_0x2e2f77(_0xdeb8a2._0x55a527,_0xdeb8a2._0x265a0e,0x1f4,_0xdeb8a2._0x55889a)]('abort',_0xba5ae4);function _0x2e2f77(_0x43e5ad,_0x4b6728,_0x590341,_0x51ecec){return _0x4978(_0x43e5ad- -0x1,_0x590341);}_0x33ba41(toAbortError(_0x12f3c2['signal']?.[_0x5be6d4(_0xdeb8a2._0xf7d720,_0xdeb8a2._0x57f5de,0x2df,0x340)]));};if(_0x12f3c2['signal']?.['aborted']){_0x33ba41(toAbortError(_0x12f3c2['signal'][_0x51149c(-_0x506956._0x261f27,-_0x506956._0x5f08b3,-0x18b,-_0x506956._0x2d764f)]));return;}function _0x14af4d(_0x56fc8e,_0x45a994,_0x803d12,_0x4c9886){return _0x6b27d6(_0x56fc8e-0x160,_0x56fc8e- -0x450,_0x803d12-0xa2,_0x803d12);}_0x12f3c2[_0x51149c(-_0x506956._0x56e695,-0x19f,-0x19c,-_0x506956._0x26984e)]?.[_0x14af4d(-0xa7,-_0x506956._0x160772,-_0x506956._0x17cd56,-0x88)](_0x14af4d(-_0x506956._0x365a45,_0x506956._0x1d6d3a,-0x4a,-_0x506956._0x37f198),_0xba5ae4,{'once':!![]});}),_0x1866d8=await Promise[_0x6b27d6(_0x31c65c._0x5d2a4d,0x374,_0x31c65c._0x1e3619,0x395)]([_0x12be15,_0x3dde43]);return isDispatchDecision(_0x1866d8)?_0x1866d8:{'action':_0x6b27d6(_0x31c65c._0x2d61dd,_0x31c65c._0x5ac293,0x39e,0x3c9)};}async function executeToolCall(_0x564ba1,_0xb60e9,_0x248e6a,_0x2c33c8,_0x460775){const _0x6cface={_0x3ff848:0x365,_0x5a13a8:0x326,_0x4a4001:0x355,_0x5ae0de:0x180,_0x5d5eb2:0x1a8,_0x293d1b:0x1da,_0x272a00:0x1a5,_0x5b9a3b:0x1ed,_0x3b3752:0x227,_0xd70507:0x190,_0x481633:0x1aa,_0x13ffc4:0x2f7,_0x1b1b9a:0x311,_0x4755b9:0x169,_0x28197f:0x18a,_0x3f431a:0x1d6,_0x5c3e64:0x21d,_0x393300:0x1e0,_0xdce547:0x306,_0x4c3f6c:0x375,_0x3fcd22:0x326,_0x3a075f:0x186,_0x3eba57:0x1c7,_0x4dd295:0x337,_0x15219c:0x326,_0x3970dd:0x1f6,_0x4b8d77:0x1cd,_0x30847b:0x374,_0x14a2d7:0x2ef,_0x3a1fdd:0x2f4,_0x25d4dc:0x36c,_0x4133c0:0x370,_0x5555e4:0x15e,_0x1a5bdb:0x150,_0x217ce8:0x366,_0x270a53:0x3ab,_0xf98c7f:0x195,_0xec3bd9:0x189,_0x2ea574:0x1b1,_0x2ac143:0x195,_0x22b7ff:0x1a9,_0xb7f478:0x393,_0x14c7f2:0x3c7,_0x8d7b19:0x3ca},_0x3d241c={_0x24841f:0x3e6},_0x3d5201={_0x12bacb:0x1b6},_0x56d752={_0x558010:0x1d5,_0xf26d49:0x32d};function _0x764dbc(_0x468f7f,_0x52bd1d,_0x348eb2,_0xc5f0b8){return _0x2cb4b9(_0x468f7f,_0x52bd1d-_0x56d752._0x558010,_0xc5f0b8-_0x56d752._0xf26d49,_0xc5f0b8-0xc3);}const _0x2c95e7={..._0x248e6a,'toolCallId':_0xb60e9['id']};throwIfAborted(_0x2c95e7['signal']);const _0x317e25=await resolveDispatchDecision(_0x2c33c8,_0xb60e9,_0x2c95e7);throwIfAborted(_0x2c95e7[_0x764dbc(_0x6cface._0x3ff848,0x338,0x2e9,_0x6cface._0x5a13a8)]);if(_0x317e25['action']===_0x764dbc(_0x6cface._0x4a4001,0x342,0x383,0x36b)){const _0xcbba4b=createRejectedToolResult(_0xb60e9,_0x317e25[_0x5d2f58(-0x144,-_0x6cface._0x5ae0de,-0x181,-0x186)]);return await emitEvent(_0x460775,{'type':'tool_rejected','toolCall':_0xb60e9,'result':_0xcbba4b},_0x2c95e7),_0xcbba4b;}const _0x58e1f0=_0x564ba1[_0x5d2f58(-_0x6cface._0x5d5eb2,-0x227,-_0x6cface._0x293d1b,-0x20a)](_0xb60e9['name']);if(!_0x58e1f0){const _0x43a065=createUnknownToolResult(_0xb60e9);return await emitEvent(_0x460775,{'type':'tool_completed','toolCall':_0xb60e9,'result':_0x43a065},_0x2c95e7),_0x43a065;}throwIfAborted(_0x2c95e7[_0x5d2f58(-0x23b,-_0x6cface._0x272a00,-_0x6cface._0x5b9a3b,-_0x6cface._0x3b3752)]),await emitEvent(_0x460775,{'type':_0x5d2f58(-_0x6cface._0xd70507,-0x19a,-_0x6cface._0x481633,-0x1c0),'toolCall':_0xb60e9},_0x2c95e7);function _0x5d2f58(_0x2cf323,_0x834914,_0x34f3f4,_0x261cc4){return _0xc4fa22(_0x2cf323,_0x834914-_0x3d5201._0x12bacb,_0x34f3f4- -0x60c,_0x261cc4-0x170);}try{throwIfAborted(_0x2c95e7[_0x764dbc(0x333,_0x6cface._0x13ffc4,_0x6cface._0x1b1b9a,0x326)]);const _0x558906=validateToolInput(_0xb60e9[_0x5d2f58(-0x13a,-_0x6cface._0x4755b9,-_0x6cface._0x28197f,-0x163)],_0x58e1f0[_0x5d2f58(-_0x6cface._0x3f431a,-_0x6cface._0x5c3e64,-_0x6cface._0x393300,-0x1a9)]),_0x5f02bb=await _0x58e1f0[_0x764dbc(_0x6cface._0xdce547,0x304,0x35e,0x330)](_0x558906,_0x2c95e7),_0x3c65e1=[],_0x2406aa=addAbortListener(_0x2c95e7['signal'],()=>{const _0x98df81={_0x11258e:0x183};function _0x52f071(_0x58f812,_0x33717b,_0x3b8017,_0x1d6e91){return _0x5d2f58(_0x58f812,_0x33717b-0x135,_0x1d6e91-0x592,_0x1d6e91-_0x98df81._0x11258e);}void _0x5f02bb['return'](void 0x0)[_0x52f071(0x3c8,0x3a6,0x3cc,_0x3d241c._0x24841f)](()=>{});});try{throwIfAborted(_0x2c95e7[_0x764dbc(_0x6cface._0x4c3f6c,0x30c,0x2e6,_0x6cface._0x3fcd22)]);let _0x5616de=await _0x5f02bb['next']();while(!_0x5616de[_0x5d2f58(-_0x6cface._0x3a075f,-0x20e,-_0x6cface._0x3eba57,-0x1e6)]){throwIfAborted(_0x2c95e7[_0x764dbc(0x315,0x353,_0x6cface._0x4dd295,_0x6cface._0x15219c)]);const _0x5cd989=normalizeToolOutputValue(_0x5616de[_0x5d2f58(-0x19a,-0x11a,-0x168,-0x17d)]);_0x3c65e1[_0x5d2f58(-0x25a,-_0x6cface._0x3970dd,-0x209,-_0x6cface._0x4b8d77)](_0x5cd989),await emitEvent(_0x460775,{'type':_0x764dbc(0x348,0x312,_0x6cface._0x30847b,0x343),'toolCall':_0xb60e9,'chunk':_0x5cd989},_0x2c95e7),throwIfAborted(_0x2c95e7[_0x764dbc(_0x6cface._0x14a2d7,_0x6cface._0x3a1fdd,0x2fd,0x326)]),_0x5616de=await _0x5f02bb[_0x764dbc(_0x6cface._0x25d4dc,0x350,0x3bb,_0x6cface._0x4133c0)]();}throwIfAborted(_0x2c95e7[_0x5d2f58(-0x1f1,-0x203,-0x1ed,-0x214)]);const _0x1a9e71=_0x5616de[_0x5d2f58(-_0x6cface._0x5555e4,-_0x6cface._0x1a5bdb,-0x168,-0x124)]===void 0x0?deriveFinalToolOutput(_0x3c65e1):normalizeToolOutputValue(_0x5616de[_0x764dbc(_0x6cface._0x217ce8,0x396,0x3ff,_0x6cface._0x270a53)]),_0x291d43=createSuccessToolResult(_0xb60e9,_0x1a9e71,_0x3c65e1);return await emitEvent(_0x460775,{'type':_0x5d2f58(-0x1a7,-0x168,-_0x6cface._0xf98c7f,-_0x6cface._0xec3bd9),'toolCall':_0xb60e9,'result':_0x291d43},_0x2c95e7),_0x291d43;}catch(_0x33ea77){if(isAbortError(_0x33ea77)){const _0x230c12=createAbortedToolResult(_0xb60e9,_0x33ea77,_0x3c65e1);return await emitEvent(_0x460775,{'type':_0x764dbc(0x388,0x375,0x354,0x37e),'toolCall':_0xb60e9,'result':_0x230c12},_0x2c95e7),_0x230c12;}const {errorMessage:_0x35ad9b,structured:_0x4ef7ca}=normalizeExecutionError(_0x33ea77),_0x113f34=createErrorToolResult(_0xb60e9,_0x35ad9b,_0x4ef7ca,_0x3c65e1);return await emitEvent(_0x460775,{'type':_0x5d2f58(-_0x6cface._0x2ea574,-0x1a8,-_0x6cface._0x2ac143,-0x1e7),'toolCall':_0xb60e9,'result':_0x113f34},_0x2c95e7),_0x113f34;}finally{_0x2406aa();}}catch(_0xae89){if(isAbortError(_0xae89)){const _0x372549=createAbortedToolResult(_0xb60e9,_0xae89);return await emitEvent(_0x460775,{'type':_0x5d2f58(-0x147,-_0x6cface._0x22b7ff,-0x195,-0x172),'toolCall':_0xb60e9,'result':_0x372549},_0x2c95e7),_0x372549;}const {errorMessage:_0x15052e,structured:_0x34d561}=normalizeExecutionError(_0xae89),_0x447b10=createErrorToolResult(_0xb60e9,_0x15052e,_0x34d561);return await emitEvent(_0x460775,{'type':_0x764dbc(_0x6cface._0xb7f478,_0x6cface._0x14c7f2,_0x6cface._0x8d7b19,0x37e),'toolCall':_0xb60e9,'result':_0x447b10},_0x2c95e7),_0x447b10;}}function createInternalToolRuntime(_0x4d9c1f=[],_0x32fb3d={}){const _0x4b512b={_0x256cda:0x1df,_0x9a1294:0x1da,_0x4c727e:0x201},_0x1338ed={_0x475aee:0x225},_0x43f8f0={_0x1b37f0:0x61,_0x206174:0x33,_0x18e980:0x10,_0x460c6f:0x17};let _0x24c671=new ToolRegistry(_0x4d9c1f);return{'listToolSchemas'(){const _0x2dcc54={_0x36ab04:0x1d0};function _0x5f848d(_0x169f36,_0x4f777f,_0x1ec1a7,_0x4fec41){return _0x4978(_0x1ec1a7- -_0x2dcc54._0x36ab04,_0x4f777f);}return _0x24c671[_0x5f848d(-_0x43f8f0._0x1b37f0,_0x43f8f0._0x206174,-_0x43f8f0._0x18e980,-_0x43f8f0._0x460c6f)]();},'setTools'(_0x193ea5){_0x24c671=new ToolRegistry(_0x193ea5);},async 'executeCalls'(_0x5d3c08,_0x1af978){const _0x1b7201={_0x14e406:0x51};return await Promise['all'](_0x5d3c08['map'](async _0xf15e0c=>{function _0x23d457(_0x45c19c,_0xef8d61,_0x1bcf59,_0xe06aa1){return _0x4978(_0x1bcf59-_0x1b7201._0x14e406,_0xe06aa1);}return await executeToolCall(_0x24c671,_0xf15e0c,_0x1af978,_0x32fb3d[_0x23d457(_0x1338ed._0x475aee,0x217,0x1e7,0x213)],_0x32fb3d['onEvent']);}));},async 'execute'(_0xa503b0,_0x3d6bb7){const [_0x39d6da]=await this[_0x300217(-_0x4b512b._0x256cda,-0x221,-_0x4b512b._0x9a1294,-_0x4b512b._0x4c727e)]([_0xa503b0],_0x3d6bb7);function _0x300217(_0x207b96,_0x3c3984,_0x5bd9a5,_0xedee2){return _0x4978(_0x207b96- -0x34f,_0x3c3984);}return _0x39d6da;}};}function getOrderedObserverExtensions(_0x157264,_0xe956de){const _0x55511b={_0x4d8dc6:0x74,_0x27260c:0x39},_0x5e91fc={_0x15ee48:0x25a,_0x5900b9:0x264,_0x1b4327:0x265,_0x2aa648:0x2c4,_0x56099c:0x2c3,_0x243767:0x2cf,_0x3e86b8:0x2d5,_0x4dbd64:0x31b},_0x53a7a1={_0x45b035:0x259},_0x48cefd={_0x13b1e2:0x10e,_0x10b3ae:0xe1,_0x3c31df:0x2a6},_0x377e4b={_0x459e04:0x66},_0x1d3b20={_0x18c0de:0x128};function _0x14def8(_0x342f9a,_0x591a7b,_0xc5658c,_0x421011){return _0x2cb4b9(_0x591a7b,_0x591a7b-_0x1d3b20._0x18c0de,_0x421011- -0x36,_0x421011-0x142);}function _0x3181c5(_0x5b0615,_0x410ed1,_0xf6c53c,_0x1a71e7){return _0xc4fa22(_0x410ed1,_0x410ed1-0xbf,_0xf6c53c- -0x348,_0x1a71e7-_0x377e4b._0x459e04);}return _0x157264[_0x14def8(0x56,0x78,_0x55511b._0x4d8dc6,_0x55511b._0x27260c)](_0x247872=>{function _0xb1d24e(_0x56baa5,_0x47d1c0,_0x5837c1,_0x41b45c){return _0x14def8(_0x56baa5-_0x48cefd._0x13b1e2,_0x41b45c,_0x5837c1-_0x48cefd._0x10b3ae,_0x56baa5-_0x48cefd._0x3c31df);}function _0x5c0446(_0x147a94,_0x568f64,_0x4624f5,_0x35292b){return _0x14def8(_0x147a94-0x187,_0x4624f5,_0x4624f5-0x166,_0x147a94-_0x53a7a1._0x45b035);}return _0x247872[_0x5c0446(0x28e,0x2b0,_0x5e91fc._0x15ee48,_0x5e91fc._0x5900b9)]!==![]&&_0x247872[_0xb1d24e(0x29a,_0x5e91fc._0x1b4327,0x254,_0x5e91fc._0x2aa648)]===_0xe956de&&_0x247872[_0xb1d24e(0x2b0,0x2dd,0x2da,_0x5e91fc._0x56099c)]===_0xb1d24e(_0x5e91fc._0x243767,0x28a,_0x5e91fc._0x3e86b8,_0x5e91fc._0x4dbd64);})['sort']((_0x3611de,_0x17c0ee)=>_0x3611de[_0x14def8(0x71,0x5,-0x1d,0x27)]-_0x17c0ee['order']);}function _0x2cb4b9(_0x4f725e,_0x5e9398,_0x3f3164,_0xc54931){return _0x4978(_0x3f3164- -0x13e,_0x4f725e);}function getOrderedTransformerExtensions(_0x394e97,_0x464aa9){const _0x520997={_0xe3a044:0x1d1,_0x472f02:0x1dd,_0x3c6b0a:0x1ce,_0x13390b:0x1c0},_0x59882b={_0x25003f:0x1cd,_0x5b4c08:0x1b4,_0x4e9796:0x1ba,_0x40bb69:0x1d0,_0x286306:0x208,_0x7285ba:0x154,_0xa77de1:0x10a},_0x1e54b8={_0x43fd5d:0x15e,_0x5a9064:0x9b},_0x321738={_0x316474:0x185,_0x872cde:0x120};function _0x2412e3(_0x31f280,_0x568b16,_0x32ee0e,_0x2c5ce1){return _0xc4fa22(_0x32ee0e,_0x568b16-0x3,_0x568b16-0x1f,_0x2c5ce1-0x4b);}function _0x2d1ee7(_0x1dab20,_0x44cb21,_0x4e51c5,_0x39308d){return _0x2cb4b9(_0x1dab20,_0x44cb21-0xf3,_0x4e51c5-_0x321738._0x316474,_0x39308d-_0x321738._0x872cde);}return _0x394e97[_0x2d1ee7(_0x520997._0xe3a044,0x1fe,0x1f4,0x1bd)](_0x4b1f2e=>{function _0x4b9475(_0xf8955e,_0x2751c9,_0x1d94f4,_0x5dfff0){return _0x2d1ee7(_0x1d94f4,_0x2751c9-0x121,_0x5dfff0- -0x29f,_0x5dfff0-0x182);}function _0x297da9(_0x520c26,_0xe4c0fd,_0xbb302d,_0x19f9b0){return _0x2d1ee7(_0xbb302d,_0xe4c0fd-_0x1e54b8._0x43fd5d,_0xe4c0fd-0xb,_0x19f9b0-_0x1e54b8._0x5a9064);}return _0x4b1f2e[_0x297da9(0x1b6,0x1fb,_0x59882b._0x25003f,_0x59882b._0x5b4c08)]!==![]&&_0x4b1f2e[_0x297da9(0x169,_0x59882b._0x4e9796,0x1e1,0x17d)]===_0x464aa9&&_0x4b1f2e[_0x297da9(0x21a,_0x59882b._0x40bb69,_0x59882b._0x286306,0x1df)]===_0x4b9475(-0x120,-_0x59882b._0x7285ba,-0x128,-_0x59882b._0xa77de1);})[_0x2d1ee7(0x1a9,_0x520997._0x472f02,_0x520997._0x3c6b0a,_0x520997._0x13390b)]((_0x2aa368,_0x589ed6)=>_0x2aa368[_0x2d1ee7(0x1dd,0x1c6,0x1e2,0x1f3)]-_0x589ed6[_0x2d1ee7(0x225,0x1f8,0x1e2,0x1c8)]);}function createExtensionRegistry(){const _0x45875d={_0x274d02:0xae,_0x124dee:0xe4,_0x369330:0x130,_0x395a36:0xaf},_0x131cc1={_0x271d19:0x119},_0x3d1539={_0x529c0f:0x19a,_0x5f29de:0x1ab},_0x406564=[];return{'register'(_0x314340){const _0x7109a7={_0x1425e2:0x7f};function _0x59476e(_0x12453d,_0x15e0b1,_0x1e7987,_0x3141a4){return _0x4978(_0x15e0b1-_0x7109a7._0x1425e2,_0x1e7987);}_0x406564[_0x59476e(0x153,_0x3d1539._0x529c0f,0x1dc,_0x3d1539._0x5f29de)](_0x314340);},async 'runTransformers'(_0x27b5b0,_0x4948e2,_0x5113d7){let _0x1d7751=_0x4948e2;function _0x336c58(_0x4aaa73,_0x3d6769,_0x39b194,_0x2d4a7b){return _0x4978(_0x3d6769- -0x28b,_0x4aaa73);}for(const _0x1a1ff7 of getOrderedTransformerExtensions(_0x406564,_0x27b5b0)){_0x1d7751=await _0x1a1ff7[_0x336c58(-_0x131cc1._0x271d19,-0x105,-0xed,-0xdd)](_0x1d7751,_0x5113d7);}return _0x1d7751;},async 'runObservers'(_0x49053e,_0x288583,_0x5b8ba3){function _0x57b6f9(_0x5700a2,_0x5458b9,_0x23622d,_0x2ac495){return _0x4978(_0x5458b9- -0x26a,_0x23622d);}for(const _0x429c8b of getOrderedObserverExtensions(_0x406564,_0x49053e)){await _0x429c8b[_0x57b6f9(-_0x45875d._0x274d02,-_0x45875d._0x124dee,-_0x45875d._0x369330,-_0x45875d._0x395a36)](_0x288583,_0x5b8ba3);}}};}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};}function createAgentMetrics(_0x47371b={}){const _0x193fec={_0x5a7350:0x232,_0x59e3d9:0x221},_0x277acc={_0x2b8cfa:0xaa,_0x3c0c2f:0x130,_0x3b7b14:0x138,_0x248d3d:0x147,_0x2dc889:0x7,_0xae1bce:0x3f,_0x5dc0bd:0x8a,_0x52aee8:0x5b,_0x181ceb:0x1de,_0x3509c0:0x1be,_0x4ff0b3:0x187,_0x263bd8:0xb2,_0x27cdbf:0x9f,_0x181e4c:0x1bb,_0x14ca73:0x194,_0x45367d:0x1f0,_0x38caf8:0x151,_0x418246:0x18c,_0x5432a3:0x15b,_0x3ed5ed:0x143,_0x263557:0x1b9,_0x56b491:0x1fb,_0x987d2e:0x42,_0xcde29c:0x18c,_0xdf35fe:0xf1,_0x49286c:0x93,_0x21c145:0x154,_0x316e7c:0x19f,_0x5d1106:0x1a8,_0x1d887d:0x1ce,_0x359130:0x1ed,_0x2ad0cc:0x1eb,_0x176094:0x72,_0x4d71da:0x80,_0x49ef5a:0xb,_0x366f66:0x87,_0x272f7e:0x69,_0x2d4141:0x5a,_0x2a0623:0xb3,_0x2b2c4d:0x10a,_0x28f72c:0x1d,_0x8d9703:0x6f};let _0x48f5e3=createEmptySnapshot();const _0x5f618c=new Set();let _0x2bc53e;const _0x42dddd=()=>{const _0x40f847={..._0x48f5e3};for(const _0x63e47d of _0x5f618c)_0x63e47d(_0x40f847);};return{'getSnapshot'(){return{..._0x48f5e3};},'recordEvent'(_0x567268){const _0x2983bf={_0x549c1e:0x1e7};function _0x1d71fc(_0x4c1c90,_0x15f437,_0x2b2053,_0x4f16b8){return _0x4978(_0x4f16b8- -_0x2983bf._0x549c1e,_0x2b2053);}if(_0x567268['type']==='model_request'){_0x2bc53e=Date[_0x1d71fc(-0x99,-0xe0,-0x83,-_0x277acc._0x2b8cfa)]();const _0x2764e8=_0x47371b[_0xda3e3b(-_0x277acc._0x3c0c2f,-0x16b,-_0x277acc._0x3b7b14,-_0x277acc._0x248d3d)]?.(_0x567268['request']);_0x2764e8!==void 0x0&&(_0x48f5e3={..._0x48f5e3,'contextWindowLimit':_0x2764e8},_0x42dddd());return;}if(_0x567268[_0x1d71fc(-0x33,-0x81,-0x81,-0x41)]===_0x1d71fc(-_0x277acc._0x2dc889,-_0x277acc._0xae1bce,-_0x277acc._0x5dc0bd,-_0x277acc._0x52aee8)){const _0x2fc32c=_0x567268[_0xda3e3b(-_0x277acc._0x181ceb,-0x18c,-_0x277acc._0x3509c0,-_0x277acc._0x4ff0b3)][_0x1d71fc(-0xdb,-_0x277acc._0x263bd8,-0xae,-_0x277acc._0x27cdbf)][_0xda3e3b(-0x1bc,-_0x277acc._0x181e4c,-_0x277acc._0x14ca73,-_0x277acc._0x45367d)],_0x4180f0=_0x567268[_0xda3e3b(-_0x277acc._0x38caf8,-_0x277acc._0x418246,-_0x277acc._0x5432a3,-_0x277acc._0x3ed5ed)][_0xda3e3b(-0x163,-0x1b6,-_0x277acc._0x263557,-_0x277acc._0x56b491)][_0x1d71fc(-0x7c,-0x8f,-0x81,-_0x277acc._0x987d2e)],_0x334dca=_0x567268[_0xda3e3b(-0x140,-_0x277acc._0xcde29c,-0x15c,-0x15b)]['usage']['reasoningTokens']??0x0,_0x493987=_0x2fc32c+_0x4180f0,_0x3d0a36=_0x2bc53e===void 0x0?0x0:Date[_0x1d71fc(-_0x277acc._0xdf35fe,-0x7b,-_0x277acc._0x49286c,-_0x277acc._0x2b8cfa)]()-_0x2bc53e;_0x2bc53e=void 0x0,_0x48f5e3={..._0x48f5e3,'totalTokens':_0x48f5e3['totalTokens']+_0x493987,'totalInputTokens':_0x48f5e3[_0xda3e3b(-_0x277acc._0x21c145,-_0x277acc._0x14ca73,-_0x277acc._0x316e7c,-0x1d0)]+_0x2fc32c,'totalOutputTokens':_0x48f5e3[_0xda3e3b(-0x1bb,-0x18b,-0x1d6,-_0x277acc._0x5d1106)]+_0x4180f0,'totalReasoningTokens':_0x48f5e3[_0xda3e3b(-0x1f9,-_0x277acc._0x1d887d,-_0x277acc._0x359130,-0x1b0)]+_0x334dca,'modelCallCount':_0x48f5e3['modelCallCount']+0x1,'totalModelTimeMs':_0x48f5e3[_0xda3e3b(-0x214,-0x1e1,-0x209,-_0x277acc._0x2ad0cc)]+_0x3d0a36,'currentTokens':_0x493987,'currentInputTokens':_0x2fc32c,'currentOutputTokens':_0x4180f0,'currentReasoningTokens':_0x334dca,'currentModelTimeMs':_0x3d0a36,..._0x48f5e3[_0x1d71fc(-_0x277acc._0x176094,-0x93,-_0x277acc._0x4d71da,-0x55)]&&_0x493987>0x0?{'contextWindowUsage':_0x493987/_0x48f5e3[_0x1d71fc(-0x23,-0x42,-0x6f,-0x55)]}:{}},_0x42dddd();return;}function _0xda3e3b(_0x595960,_0x26a07a,_0x4c2428,_0xa9ac6e){return _0x4978(_0x26a07a- -0x2fe,_0x595960);}if(_0x567268[_0x1d71fc(_0x277acc._0x49ef5a,-_0x277acc._0x366f66,-_0x277acc._0x272f7e,-0x41)]===_0x1d71fc(-_0x277acc._0x176094,-0x5a,-_0x277acc._0x2d4141,-0x46)){_0x48f5e3={..._0x48f5e3,'toolCallCount':_0x48f5e3[_0x1d71fc(-0xa9,-0xd0,-0x102,-_0x277acc._0x2a0623)]+0x1},_0x42dddd();return;}_0x567268['type']===_0xda3e3b(-0x19c,-0x152,-_0x277acc._0x2b2c4d,-0x15d)&&(_0x48f5e3={..._0x48f5e3,'requestCount':_0x48f5e3[_0x1d71fc(-_0x277acc._0x28f72c,-0x85,-_0x277acc._0x8d9703,-0x37)]+0x1},_0x42dddd());},'reset'(){_0x48f5e3=createEmptySnapshot(),_0x2bc53e=void 0x0,_0x42dddd();},'subscribe'(_0x2c99c9){const _0x291a9a={_0x126adb:0x18e,_0x1ca888:0x13b},_0x2f47e9={_0x24f892:0x78},_0x285bd5={_0x3e6b0e:0x9f};_0x5f618c[_0x5cab14(0x251,_0x193fec._0x5a7350,_0x193fec._0x59e3d9,0x27f)](_0x2c99c9);function _0x5cab14(_0xb8abe,_0x259e0a,_0x5be865,_0x5cbdd1){return _0x4978(_0xb8abe-_0x285bd5._0x3e6b0e,_0x5cbdd1);}return()=>{function _0x1e4df5(_0x3c4dfc,_0x30a73d,_0x4c889e,_0x377be1){return _0x5cab14(_0x3c4dfc- -_0x2f47e9._0x24f892,_0x30a73d-0x17c,_0x4c889e-0x1ce,_0x30a73d);}_0x5f618c[_0x1e4df5(_0x291a9a._0x126adb,0x1dd,_0x291a9a._0x1ca888,0x174)](_0x2c99c9);};}};}function makeExtensionContext(_0x2fd77d){return{'state':_0x2fd77d};}async function runStage(_0x26537e,_0x68fa74,_0x212dd4,_0x4cf2f7){const _0x5a2253={_0x38bbb8:0x3ba},_0x56e381={_0x22ee75:0x19f,_0x35c59c:0x12a};function _0xbcd00(_0x213993,_0x229c36,_0x394228,_0x204aa9){return _0x2cb4b9(_0x229c36,_0x229c36-_0x56e381._0x22ee75,_0x213993-0x37d,_0x204aa9-_0x56e381._0x35c59c);}const _0x54b45c=await _0x26537e['runTransformers'](_0x68fa74,_0x212dd4,_0x4cf2f7);return await _0x26537e[_0xbcd00(0x3f3,_0x5a2253._0x38bbb8,0x40f,0x43a)](_0x68fa74,_0x54b45c,_0x4cf2f7),_0x54b45c;}async function emitEvent2(_0x181f8e,_0x210d0b,_0x140938){await _0x181f8e?.(_0x210d0b,_0x140938);}function _0x362e(){const _0x23dc96=['Dg9VBf91C2u','DhjHBNnMB3jTzxi','DxnLCL9TzxnZywDL','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','ywn0Aw9U','otCYmtqWChnNrfzS','BgvUz3rO','Dg9VBf9VDxrWDxrFy2H1BMS','y29UDgvUDa','BgLZDa','y29UDgvUDeLUzgv4','BwvZC2fNzq','Bwv0CMLJCW','BwfW','C2v0u2vZC2LVBKLK','C3rYDwn0DxjLza','zg9Uzq','Dg9VBfj1BNrPBwu','C2v0vg9VBhm','ywrKrxzLBNrmAxn0zw5LCG','n0LtEg5zAG','C2vZC2LVBKLK','Bw9KzwXFCMvXDwvZDa','CMvJB3jKrxzLBNq','Dg9VBf91C2vFy2H1BMS','BgfZDfjLC3bVBNnL','zgvSzxrL','C3rHz2u','yMvMB3jLvg9VBev4zwn1DgLVBG','Dg90ywXjBNb1DfrVA2vUCW','B25fDMvUDa','CMvHC29UAw5NtwvZC2fNzuLK','DhvYBI0','C2vZC2LVBI0','C3rHDgu','zxHLy3v0zunHBgXZ','C2vUza','CMvZCg9UC2u','Dg90ywXpDxrWDxruB2TLBNm','C3rYzwfTAw5N','CMvNAxn0CNK','Aw5KzxG','DxnLCG','y2f0y2G','Dg9VBhncEu5HBwu','Dg9VBf9ZDgfYDgvK','CMvNAxn0zxi','CMvQzwn0','Dg9VBf91C2vFzgvSDge','A2LUza','yxjYyxK','x3n5C3rLBvbYB21WDa','BMv4Da','Dw5RBM93BL90B29S','ywz0zxjnB2rLBfjLC3bVBNnL','DMfSDwvZ','zxH0zw5ZAw9UCW','CNvU','C29YDa','mZq3mte4neLMz2HRDq','oIbLEhbLy3rLzcbUDw1Izxi','sw52ywXPzcb0B29SigLUChv0igf0ia','B3v0Chv0sw5KzxG','Bw9KzwXFCMvZCg9UC2u','zNvUy3rPB24','C3rYzwfT','Dg9VBf9JB21WBgv0zwq','oIbLEhbLy3rLzcbHCNjHEq','y2f1C2u','y29UDgv4DfDPBMrVD0XPBwL0','z2v0q29UDgv4DfDPBMrVD0XPBwL0','Aw5WDxrezwX0yq','zgvSDge','B25uB29Sq2fSBa','DhvYBKLK','zgvMyxvSDe1LC3nHz2u','oIbLEhbLy3rLzcbIB29SzwfU','Aw5WDxq','B3jKzxi','zMLUywXnzxnZywDL','B2jZzxj2zxi','nKntCwvjrW','Dg9VBf91C2vFBwvZC2fNzq','Dg9VBf9YzwPLy3rLza','Dg9VBf9JywXS','C2vZC2LVBKrPCG','CMvHC29U','B3v0Chv0','B3v0Chv0vg9Rzw5Z','DhLWzq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','yxnRvxnLCG','zw5HyMXLza','DhvYBKLUzgv4','B2jQzwn0','DhvYBL9JB21WBgv0zq','zMLSDgvY','C3rYAw5NAwz5','CMvTB3zLrxzLBNrmAxn0zw5LCG','CMvXDwvZDenVDw50','CMvHC29UAw5Nx21LC3nHz2u','ywrK','AxrLBxm','CNvUt2jZzxj2zxjZ','C3vTBwfYEuLUzgv4','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','AxnbCNjHEq','ywjVCNrLza','ndC0nZG3ofPOtur6vq','ywjVCNq','zM9YrwfJAa','DMfSDwu','Bw9KzwW','y29TCgXLDgu','BMfTzq','BgLZDfrVB2Xty2HLBwfZ','vw5RBM93BIb0B29SoIa','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','ChvZAa','ywXS','Dg90ywXnB2rLBfrPBwvnCW','Dg9VBfjLC3vSDhm','yM9VBgvHBG','C2v0','ndGWue9OCKXH','C3rYAw5N','BwvZC2fNzxm','ywz0zxjuDxjUq29TCgXLDgu','C3LZDgvT','BNvTyMvY','C3LZDgvTuhjVBxb0','zw50CMLLCW','CMvHC29UAw5Nx2nODw5R','Dg9tDhjPBMC','CMfJzq','DhjPBq','y2HHDe1VzgvS','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','mtuYotjoBfHOsKm','Dg90ywXszwfZB25PBMDuB2TLBNm','yxnZAxn0yw50twvZC2fNzuLK','AxrLBuLK','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','Dg9VBenHBgXdB3vUDa','ywz0zxjnzxnZywDLqxbWzw5K','yxnZAxn0yw50x21LC3nHz2u','C2LNBMfS','ntm2mtG0sxvAuw5z','nJq3mZm5mgLUt0nKqq','CMvXDwLYzwq','CMvZzxrnzxnZywDLCW','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','BM93','zgvWCW','mJm3mZm4nfbssLvXsG','yMvMB3jLqxnZAxn0yw50qxbWzw5K','zxHLy3v0zq','oIbLEhbLy3rLzcbZDhjPBMC','Aw5WDxruB2TLBNm','Aw5WDxrty2HLBwe','DgHPBMTPBMC','Dg9VBf9Yzxn1Bhq','C2XPy2u','DxnHz2u','oNjLyxnVBMLUzW','z2v0','Dgv4Da','y29UDgvUDf9KzwX0yq'];_0x362e=function(){return _0x23dc96;};return _0x362e();}function replaceToolUseBlocks(_0x30d3d8,_0x11417d){const _0x46ea00={_0x23b4e9:0x1b9,_0x58ad81:0x1ec,_0x1c841d:0x1ce},_0x510235={_0x2ef922:0x2e8},_0xd92313={_0x502ef9:0x142},_0x1d9e56={_0x56aae3:0x1d0,_0x2965e5:0x121},_0x13e45f={_0x5aa540:0x81};function _0x544924(_0x439913,_0x26f5ae,_0xdde8f4,_0x5d5862){return _0xc4fa22(_0x5d5862,_0x26f5ae-_0x13e45f._0x5aa540,_0xdde8f4- -0x51c,_0x5d5862-0x1e8);}let _0x360331=0x0;function _0x36609e(_0x27e391,_0x1d7e6b,_0x7ccb58,_0x1e9f5b){return _0x2cb4b9(_0x1d7e6b,_0x1d7e6b-0x52,_0x1e9f5b- -_0x1d9e56._0x56aae3,_0x1e9f5b-_0x1d9e56._0x2965e5);}return{..._0x30d3d8,'content':_0x30d3d8[_0x36609e(-0x1c4,-0x1fd,-0x184,-_0x46ea00._0x23b4e9)][_0x36609e(-_0x46ea00._0x58ad81,-0x1cf,-_0x46ea00._0x1c841d,-0x1b4)](_0x26c926=>{if(_0x26c926['type']!==_0x26cc89(_0x510235._0x2ef922,0x353,0x306,0x2e7))return _0x26c926;const _0x4f75c3=_0x11417d[_0x360331];_0x360331+=0x1;function _0x26cc89(_0x49cf7e,_0x3cb54c,_0x1826fd,_0x136d91){return _0x544924(_0x49cf7e-0x76,_0x3cb54c-_0xd92313._0x502ef9,_0x1826fd-0x3ed,_0x49cf7e);}return structuredClone(_0x4f75c3);})};}function createAssistantMessageId(_0x3aef7e,_0x1c0a56){return _0x3aef7e+':assistant:'+_0x1c0a56;}function createReasoningMessageId(_0xb798ec){const _0x3acc06={_0x455a88:0x3,_0x5a906b:0x6b},_0x1b69f9={_0x2db45f:0x65};function _0x57b150(_0x55a6ff,_0x40ae77,_0x35a99f,_0x541440){return _0xc4fa22(_0x35a99f,_0x40ae77-0x157,_0x541440- -0x3da,_0x541440-_0x1b69f9._0x2db45f);}return _0xb798ec+_0x57b150(0x90,_0x3acc06._0x455a88,_0x3acc06._0x5a906b,0x57);}function withMessageId(_0x1ea88f,_0x21292d){if(_0x1ea88f['id']===_0x21292d)return _0x1ea88f;return{..._0x1ea88f,'id':_0x21292d};}function createAssistantChunkEvent(_0x3823a7,_0x4f3fe3){const _0x302a94={_0x17ef61:0x6b,_0x3d4afb:0x34,_0x235539:0x7a,_0x3165ec:0x22,_0x685deb:0x2e2,_0x3027aa:0x291,_0x2f3867:0x290,_0x2af535:0x28e,_0x4e5970:0x27c,_0x115bde:0x5d,_0x266948:0x17,_0x24ec41:0x42},_0x5cab2c={_0x46f006:0x102,_0xb6b6ef:0x78};function _0x13a39c(_0x4af16e,_0x549964,_0x48bfea,_0x21846b){return _0x2cb4b9(_0x4af16e,_0x549964-0x1f,_0x21846b-0x26e,_0x21846b-0x2f);}function _0x51bb22(_0x336d96,_0x38ebf1,_0x6f3495,_0x14a64b){return _0x2cb4b9(_0x14a64b,_0x38ebf1-_0x5cab2c._0x46f006,_0x336d96- -_0x5cab2c._0xb6b6ef,_0x14a64b-0x1be);}if(_0x3823a7['type']!==_0x51bb22(-0x6a,-0x73,-0xa5,-0xaa))return void 0x0;if(_0x3823a7[_0x51bb22(-_0x302a94._0x17ef61,-_0x302a94._0x3d4afb,-_0x302a94._0x235539,-_0x302a94._0x3165ec)]===void 0x0)return void 0x0;return{'type':'assistant_chunk','index':_0x3823a7[_0x13a39c(0x2b1,_0x302a94._0x685deb,_0x302a94._0x3027aa,0x2a6)]??0x0,'messageId':_0x4f3fe3,'chunk':{'type':_0x13a39c(0x239,_0x302a94._0x2f3867,_0x302a94._0x2af535,_0x302a94._0x4e5970),'index':_0x3823a7[_0x51bb22(-0x40,-_0x302a94._0x115bde,-_0x302a94._0x266948,-0x4a)]??0x0,'text':_0x3823a7[_0x51bb22(-0x6b,-_0x302a94._0x24ec41,-0x92,-0x67)]}};}function createToolUseChunkEvent(_0xf46b91,_0x25ccaa){const _0x80ccc1={_0x4dec9f:0x1f,_0xfef93c:0x249,_0x5d7577:0xa,_0x5a5626:0x35,_0x5e17bd:0x2d3,_0x12d0ea:0x33,_0x145dcb:0x2b3,_0x28f929:0x2b7},_0x4d3918={_0xf4b9bf:0x15c,_0x26dbe9:0x46f};function _0x46a174(_0x4f9cac,_0x5aa512,_0x3efa5e,_0x1fa974){return _0xc4fa22(_0x3efa5e,_0x5aa512-0xee,_0x5aa512- -0x1c9,_0x1fa974-0x82);}function _0x573c8b(_0xebe059,_0x53465b,_0x147406,_0xc01577){return _0xc4fa22(_0x53465b,_0x53465b-_0x4d3918._0xf4b9bf,_0xebe059- -_0x4d3918._0x26dbe9,_0xc01577-0x53);}if(_0xf46b91[_0x573c8b(_0x80ccc1._0x4dec9f,-0x5,0x33,-0x2b)]!=='tool_use_delta')return void 0x0;return{'type':_0x46a174(0x23d,0x284,0x2a1,_0x80ccc1._0xfef93c),'index':_0xf46b91[_0x46a174(0x2b4,0x295,0x27e,0x2a5)]??0x0,'messageId':_0x25ccaa,'chunk':{'type':_0x573c8b(-_0x80ccc1._0x5d7577,0x3c,-0x43,-_0x80ccc1._0x5a5626),'id':_0xf46b91['id']??'','index':_0xf46b91[_0x46a174(0x245,0x295,0x274,_0x80ccc1._0x5e17bd)]??0x0,..._0xf46b91[_0x573c8b(0x38,_0x80ccc1._0x12d0ea,0x40,0x19)]!==void 0x0?{'name':_0xf46b91[_0x573c8b(0x38,0xd,0x79,0x3a)]}:{},..._0xf46b91['inputDelta']!==void 0x0?{'inputDelta':_0xf46b91[_0x46a174(0x274,_0x80ccc1._0x145dcb,0x291,_0x80ccc1._0x28f929)]}:{}}};}function createReasoningChunkEvent(_0x17dc8f,_0x30f0c){const _0x1f089d={_0x81cc1b:0x2ef,_0x13c2ae:0x286,_0x5539fa:0x2c0,_0x51fc17:0x332,_0x8b1104:0x2fc,_0x384050:0x327,_0x1197d1:0x309,_0x23cbc2:0x31d,_0x320a96:0x26f,_0x37bc59:0x2bb,_0x6601f6:0x29a,_0x2ebf88:0xba,_0x31f223:0xe8,_0x2eebdc:0x74,_0x5c75be:0xce,_0x417c24:0x2c6,_0x290821:0x271,_0xf46bac:0xe6,_0x334463:0x2f2,_0x2743ad:0x2db,_0x49d3fb:0x2d8,_0x31a252:0x336,_0x718b84:0x2ec,_0x39bf70:0x32b,_0x20fc75:0x2ba,_0x31efc8:0x30b,_0x590236:0xfd,_0xb8284e:0xad,_0x9168ba:0xf9,_0x1c45b9:0x32c},_0x1834bd={_0x39a340:0x10a,_0x45373b:0x54a},_0x476095={_0x470d60:0x35};function _0x55b7db(_0x256ac6,_0x142194,_0x1818c2,_0x5a8329){return _0xc4fa22(_0x1818c2,_0x142194-_0x476095._0x470d60,_0x5a8329- -0x172,_0x5a8329-0x107);}function _0x2bca49(_0x287f48,_0x3bf5f8,_0x99679d,_0x145c4a){return _0xc4fa22(_0x287f48,_0x3bf5f8-_0x1834bd._0x39a340,_0x99679d- -_0x1834bd._0x45373b,_0x145c4a-0x3);}switch(_0x17dc8f[_0x55b7db(0x2d2,0x331,_0x1f089d._0x81cc1b,0x31c)]){case _0x55b7db(0x2fc,0x34e,0x33d,0x31d):return{'type':_0x55b7db(_0x1f089d._0x13c2ae,0x2b9,_0x1f089d._0x5539fa,0x29f),'index':_0x17dc8f[_0x55b7db(_0x1f089d._0x51fc17,_0x1f089d._0x8b1104,_0x1f089d._0x384050,0x2ec)],'messageId':_0x30f0c,'chunk':{'type':_0x55b7db(0x2fa,_0x1f089d._0x1197d1,0x347,_0x1f089d._0x23cbc2),'index':_0x17dc8f['index']??0x0,'thinking':_0x17dc8f['thinking']??''},'text':_0x17dc8f[_0x55b7db(_0x1f089d._0x320a96,0x2cf,0x2ef,_0x1f089d._0x37bc59)]??''};case'openai_reasoning_delta':return{'type':_0x55b7db(0x28c,_0x1f089d._0x6601f6,0x292,0x29f),'index':_0x17dc8f[_0x55b7db(0x2fe,0x2d1,0x317,0x2cd)],'messageId':_0x30f0c,'chunk':{'type':_0x2bca49(-_0x1f089d._0x2ebf88,-_0x1f089d._0x31f223,-0xac,-_0x1f089d._0x2eebdc),'contentIndex':_0x17dc8f['contentIndex']??0x0,'delta':_0x17dc8f[_0x2bca49(-_0x1f089d._0x5c75be,-0x116,-0xcd,-0xdc)]??'','itemId':_0x17dc8f[_0x55b7db(0x2aa,_0x1f089d._0x417c24,_0x1f089d._0x290821,0x2a8)]??'','outputIndex':_0x17dc8f[_0x2bca49(-0x116,-0x9e,-0xd7,-_0x1f089d._0xf46bac)]??0x0},'text':_0x17dc8f['delta']??''};case'openai_reasoning_summary_delta':return{'type':_0x55b7db(_0x1f089d._0x334463,_0x1f089d._0x2743ad,0x25e,0x29f),'index':_0x17dc8f[_0x55b7db(_0x1f089d._0x49d3fb,_0x1f089d._0x31a252,_0x1f089d._0x718b84,_0x1f089d._0x39bf70)],'messageId':_0x30f0c,'chunk':{'type':_0x2bca49(-0x15e,-0x14e,-0x126,-0xf3),'delta':_0x17dc8f[_0x55b7db(0x31c,0x350,_0x1f089d._0x20fc75,_0x1f089d._0x31efc8)]??'','itemId':_0x17dc8f['itemId']??'','outputIndex':_0x17dc8f['outputIndex']??0x0,'summaryIndex':_0x17dc8f[_0x2bca49(-0x59,-_0x1f089d._0x590236,-_0x1f089d._0xb8284e,-_0x1f089d._0x9168ba)]??0x0},'text':_0x17dc8f[_0x55b7db(_0x1f089d._0x1c45b9,0x33e,0x30d,0x30b)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x2de873){const _0x37a24c={_0x34871d:0x38c,_0x19b92e:0x3b1,_0x3a6b66:0x38b},_0xd40f38={_0x318cd6:0x393,_0x5160d6:0xe3};function _0x282295(_0x96fa82,_0x29b12e,_0x3e1981,_0x3ac140){return _0x2cb4b9(_0x3e1981,_0x29b12e-0x145,_0x29b12e-_0xd40f38._0x318cd6,_0x3ac140-_0xd40f38._0x5160d6);}return _0x2de873['status']==='error'&&_0x2de873[_0x282295(_0x37a24c._0x34871d,_0x37a24c._0x19b92e,0x3b8,_0x37a24c._0x3a6b66)]['aborted']===!![];}async function executeModelRequest(_0x48c4bc,_0x270a41,_0x3c2bb0,_0x902a5b,_0x2f1be5){const _0x14f496={_0x5a0dcc:0x35d,_0x509282:0x315,_0x5379b4:0x2da,_0x5c5be0:0x308,_0x32d9f8:0x30a,_0x5271d6:0x381,_0x4b8aa8:0x3fc,_0x2154fc:0x3c4,_0x4ad559:0x3cf,_0x3d14a3:0x2ee,_0x29701b:0x2e4,_0x234b44:0x2f4,_0xeeeecc:0x36d,_0x56dba7:0x33b,_0x20124b:0x32b,_0x2aead6:0x353,_0x4162c1:0x39a,_0x43d39c:0x31f,_0x5c6709:0x314,_0x559ccb:0x2db,_0xded0fc:0x341,_0x569fe4:0x318,_0x9024e6:0x311,_0x394877:0x2d9,_0x917101:0x33a,_0x26eca2:0x32a,_0x36a42a:0x300,_0x1c8ff6:0x348,_0x4f1f4d:0x31a,_0x4a21ed:0x31d,_0x47d565:0x358,_0x592c0c:0x2f9,_0x5b8a9f:0x2ef,_0x2e3780:0x351,_0xf8edb7:0x2c2,_0x49cb51:0x2cd,_0x39c89c:0x2ca,_0x19e93e:0x342,_0x3da4f1:0x2a4},_0x41f827={_0x51de44:0x6},_0x361b39={_0x30850e:0x14,_0xbb393e:0x2eb,_0x3175af:0x1dc};throwIfAborted(_0x270a41[_0x225005(_0x14f496._0x5a0dcc,0x2f5,0x348,_0x14f496._0x509282)]);if(!_0x270a41['streaming']||!_0x3c2bb0[_0x47c22e(0x29c,_0x14f496._0x5379b4,0x2d9,_0x14f496._0x5c5be0)]['stream'])return await _0x3c2bb0[_0x225005(_0x14f496._0x32d9f8,0x35f,0x33e,_0x14f496._0x5271d6)][_0x225005(_0x14f496._0x4b8aa8,_0x14f496._0x2154fc,_0x14f496._0x4ad559,0x37b)](_0x48c4bc,{'signal':_0x270a41[_0x47c22e(_0x14f496._0x3d14a3,_0x14f496._0x29701b,0x2d1,_0x14f496._0x234b44)]});let _0x6f0db;for await(const _0x5995cc of _0x3c2bb0[_0x225005(_0x14f496._0xeeeecc,0x38c,0x33e,0x2f8)][_0x47c22e(0x35b,_0x14f496._0x56dba7,0x35a,0x311)](_0x48c4bc,{'signal':_0x270a41[_0x47c22e(0x2ac,0x2e4,0x2fa,_0x14f496._0x20124b)]})){throwIfAborted(_0x270a41['signal']);if(_0x5995cc[_0x47c22e(0x352,_0x14f496._0x2aead6,0x305,_0x14f496._0x4162c1)]==='done'){_0x6f0db=_0x5995cc[_0x47c22e(0x32f,_0x14f496._0x43d39c,_0x14f496._0x5c6709,_0x14f496._0x559ccb)];continue;}if(_0x5995cc[_0x47c22e(_0x14f496._0xded0fc,0x353,0x350,0x37b)]==='provider_retry'){await emitEvent2(_0x3c2bb0[_0x47c22e(0x30e,_0x14f496._0x569fe4,0x30a,_0x14f496._0x9024e6)],_0x5995cc,_0x902a5b);continue;}const _0x3fb6b4=createReasoningChunkEvent(_0x5995cc,_0x2f1be5[_0x47c22e(_0x14f496._0x394877,0x319,0x316,_0x14f496._0x917101)]);if(_0x3fb6b4&&_0x3fb6b4['type']==='reasoning_chunk'&&_0x3fb6b4['text'][_0x47c22e(_0x14f496._0x26eca2,_0x14f496._0x36a42a,0x2d8,_0x14f496._0x1c8ff6)]>0x0){await emitEvent2(_0x3c2bb0[_0x47c22e(_0x14f496._0x4f1f4d,0x318,_0x14f496._0x4a21ed,_0x14f496._0x47d565)],_0x3fb6b4,_0x902a5b);continue;}const _0x49a9c6=createAssistantChunkEvent(_0x5995cc,_0x2f1be5['assistantMessageId']);if(_0x49a9c6){await emitEvent2(_0x3c2bb0[_0x47c22e(_0x14f496._0x592c0c,0x318,_0x14f496._0x5b8a9f,_0x14f496._0x2e3780)],_0x49a9c6,_0x902a5b);continue;}const _0x57cc61=createToolUseChunkEvent(_0x5995cc,_0x2f1be5[_0x47c22e(_0x14f496._0xf8edb7,0x2de,_0x14f496._0x49cb51,_0x14f496._0x39c89c)]);_0x57cc61&&await emitEvent2(_0x3c2bb0[_0x225005(0x39b,_0x14f496._0x19e93e,0x37c,0x3c6)],_0x57cc61,_0x902a5b);}if(!_0x6f0db)throw new Error(_0x47c22e(_0x14f496._0x3da4f1,0x2db,_0x14f496._0xf8edb7,0x2b3));function _0x47c22e(_0x3adf3b,_0xc0fd74,_0x1884c7,_0x566937){return _0x2cb4b9(_0x566937,_0xc0fd74-_0x361b39._0x30850e,_0xc0fd74-_0x361b39._0xbb393e,_0x566937-_0x361b39._0x3175af);}function _0x225005(_0x4a6121,_0x50a0f0,_0x4b4f65,_0x3e30da){return _0xc4fa22(_0x3e30da,_0x50a0f0-_0x41f827._0x51de44,_0x4b4f65- -0xd7,_0x3e30da-0x1d7);}return _0x6f0db;}function makeTurnGuards(_0x1b39c0,_0x42608c,_0x220585,_0x25853b,_0x5a8949){return{async 'stage'(_0x4fc6ea,_0x47742d){return throwIfAborted(_0x1b39c0),await runStage(_0x42608c,_0x4fc6ea,_0x47742d,_0x25853b);},async 'emit'(_0x38bbad){throwIfAborted(_0x1b39c0),await emitEvent2(_0x220585,_0x38bbad,_0x5a8949);},async 'stageUnchecked'(_0x235a56,_0x1e7408){return await runStage(_0x42608c,_0x235a56,_0x1e7408,_0x25853b);},async 'emitUnchecked'(_0x57a5b6){await emitEvent2(_0x220585,_0x57a5b6,_0x5a8949);}};}async function runTurn(_0x3b22c1,_0x2f0d57){const _0x389beb={_0xd258e9:0x2ac,_0x412270:0x305,_0x2bda95:0x2a7,_0x36f781:0x2af,_0x413622:0x30c,_0x289122:0x2d,_0x1b7aa9:0x28,_0xea4978:0x63,_0x5d8410:0x27a,_0x364c9:0x2a0,_0x18a895:0x2d,_0x44f71b:0x20,_0x1d9913:0x26,_0x1dcecf:0x2d,_0x458ec5:0x281,_0x566ad6:0x292,_0x43f99b:0x221,_0x4645a9:0x29e,_0x519814:0x28b,_0x31eafc:0x26f,_0x1424a5:0x20f,_0x3939b0:0x21a,_0x40edcc:0x23b,_0x368ae7:0x285,_0x122eb8:0x3b,_0x5e2ede:0xb,_0x2cdaca:0x52,_0x2c11d8:0x3f,_0x283abf:0x1d,_0x2d87d7:0x5a,_0x45d564:0x294,_0x5c72f4:0x2a9,_0x4784da:0x2a5,_0x24ddb6:0x23,_0x155f52:0x22,_0x48a7b0:0x263,_0x25a0f0:0x22d,_0x197a4d:0x279,_0x841f0a:0x82,_0x3f56fa:0x6d,_0x1f5f4f:0x50,_0x209062:0x76,_0x5803b9:0x271,_0x1f8987:0x272,_0x5c85c7:0x1ed,_0x3b6bfc:0x262,_0x22255e:0x23a,_0x522d20:0x2b0,_0x35b2e2:0x21,_0x354e90:0xf,_0x57ed6b:0x288,_0x138a13:0x55,_0xb5c7a4:0x42,_0x3e090:0x39,_0xe6b29d:0x1b,_0x595b8d:0x2a3,_0x264a57:0x26f,_0x1119e4:0x2d7,_0x3238c9:0x289,_0x5d8070:0x2bc,_0x116e49:0x23e,_0x125005:0x22,_0xa43c7b:0x71,_0x330e88:0x5a,_0x141e32:0x3c,_0x3a0ba5:0x54,_0x1c1a53:0x2ad,_0x1b89a5:0x28c,_0x5306ed:0x2ec,_0x38070c:0x244,_0xc56abb:0x25f,_0xf28401:0x22c,_0x3ef06d:0x2c0,_0x2a8181:0x2fe,_0x498084:0x2c8,_0x1d74d0:0x10,_0x2daece:0x6a,_0x5dc4be:0x2c,_0x2c5a0e:0x48,_0x51b8b1:0x27,_0x14c45a:0x2c0,_0x5a12ed:0x2d7,_0xca1d46:0x28,_0x4519b5:0x67,_0x2e5a18:0x28b,_0x55123a:0x7,_0x41757d:0x89,_0xb5687d:0x4d,_0x198af1:0x91,_0x4b3736:0x51,_0x57e3fb:0x96,_0x1d2f66:0x273,_0x2cccc6:0x2c6,_0x5bf538:0x2a1,_0x12d089:0x2a4,_0x1da4ff:0xe,_0x4e64a6:0x1b,_0x23e42a:0x11,_0x16758e:0x25,_0x1fc4fc:0x19,_0x4730cf:0x29d,_0x449067:0x2e1,_0x251ea8:0x2bc,_0x36f8b0:0x2f2,_0x3712d9:0xb,_0x291db7:0x43,_0x12281e:0x64,_0x532494:0x85,_0x4bd65a:0x248,_0x5121d5:0x1ee,_0x107b9e:0x234},_0x2e3a07={_0x4c621d:0x18b},_0x38cdeb={_0xd0213f:0x142,_0x20867b:0x128},_0x5b9826={_0x332a6e:0x303,_0x50153c:0x30b,_0x2701dc:0x2cb,_0x2dda20:0x2c3,_0x122d9c:0x285},_0x4ee12a={_0x16854b:0x571,_0x2d4eab:0x10c,_0xe0e00f:0x144},_0x112ae9=_0x3b22c1['signal']??new AbortController()[_0x47e4d8(-_0x389beb._0xd258e9,-0x26a,-0x2a2,-0x274)],_0x38a040={'sessionId':_0x3b22c1[_0x177665(-0x1d,0x8,-0x13,-0x29)],'turnId':_0x3b22c1['turnId'],'system':normalizeSystem(_0x3b22c1[_0x47e4d8(-0x2be,-0x28a,-_0x389beb._0x412270,-0x307)]),'messages':(_0x3b22c1[_0x47e4d8(-0x2c0,-_0x389beb._0x2bda95,-_0x389beb._0x36f781,-_0x389beb._0x413622)]??[])[_0x177665(_0x389beb._0x289122,_0x389beb._0x1b7aa9,-0x1b,-_0x389beb._0xea4978)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x2f0d57[_0x47e4d8(-0x241,-0x23a,-0x224,-0x1f8)]===_0x47e4d8(-0x256,-_0x389beb._0x5d8410,-_0x389beb._0x364c9,-0x258)?_0x2f0d57[_0x177665(0x3e,0x41,_0x389beb._0x18a895,-_0x389beb._0x44f71b)]():_0x2f0d57[_0x177665(_0x389beb._0x1d9913,0x68,_0x389beb._0x1dcecf,0x75)]},_0x296cf9=makeExtensionContext(_0x38a040),_0x388743={'sessionId':_0x38a040[_0x47e4d8(-_0x389beb._0x458ec5,-0x26b,-_0x389beb._0x566ad6,-0x2cb)],'turnId':_0x38a040[_0x47e4d8(-0x24c,-_0x389beb._0x43f99b,-_0x389beb._0x4645a9,-_0x389beb._0x519814)],'state':_0x38a040,'signal':_0x112ae9,..._0x2f0d57[_0x47e4d8(-0x23b,-_0x389beb._0x31eafc,-_0x389beb._0x1424a5,-_0x389beb._0x3939b0)]?{'askUser':_0x2f0d57[_0x47e4d8(-_0x389beb._0x40edcc,-0x287,-0x26c,-_0x389beb._0x368ae7)]}:{}},{stage:_0x59a856,emit:_0x13fa84,stageUnchecked:_0x4fe36b,emitUnchecked:_0x2b3c59}=makeTurnGuards(_0x112ae9,_0x2f0d57[_0x177665(-0x22,-_0x389beb._0x122eb8,0x0,_0x389beb._0x5e2ede)],_0x2f0d57[_0x177665(-_0x389beb._0x2cdaca,_0x389beb._0x2c11d8,-0xa,0xc)],_0x296cf9,_0x388743),_0x45a435=async _0x30dd92=>{const _0x2fc7e2={_0x4bd496:0x104,_0x18c1cb:0x15f,_0x4e6070:0x8f};function _0x4ac482(_0x560105,_0x9c7279,_0x3d8eb9,_0x204934){return _0x47e4d8(_0x560105-_0x4ee12a._0x16854b,_0x9c7279-_0x4ee12a._0x2d4eab,_0x3d8eb9-_0x4ee12a._0xe0e00f,_0x9c7279);}function _0x2e9a85(_0x4ae563,_0x4132b5,_0x5d4aac,_0x1ec2dd){return _0x177665(_0x4ae563-_0x2fc7e2._0x4bd496,_0x1ec2dd,_0x4ae563-_0x2fc7e2._0x18c1cb,_0x1ec2dd-_0x2fc7e2._0x4e6070);}await _0x2f0d57[_0x4ac482(_0x5b9826._0x332a6e,0x2f0,_0x5b9826._0x50153c,_0x5b9826._0x2701dc)]['runObservers'](_0x4ac482(_0x5b9826._0x2dda20,_0x5b9826._0x122d9c,0x2cf,0x29b),structuredClone(_0x30dd92),_0x296cf9);};let _0x207da5=0x0;function _0x47e4d8(_0x541b66,_0xd8c411,_0x1d4f49,_0x5809f3){return _0x2cb4b9(_0x5809f3,_0xd8c411-_0x38cdeb._0xd0213f,_0x541b66- -0x2a5,_0x5809f3-_0x38cdeb._0x20867b);}function _0x177665(_0x56369e,_0xdadf78,_0x5dd231,_0x398fee){return _0x2cb4b9(_0xdadf78,_0xdadf78-_0x2e3a07._0x4c621d,_0x5dd231- -0x37,_0x398fee-0x25);}try{const _0x485617=await _0x59a856('onUserMessage',normalizeMessage(_0x3b22c1['message']));_0x38a040[_0x177665(-_0x389beb._0x283abf,-0x6a,-0x52,-0x30)][_0x177665(-0x2d,-0xa8,-_0x389beb._0x2d87d7,-0x7)](_0x485617),await _0x45a435(_0x485617),await _0x13fa84({'type':_0x47e4d8(-_0x389beb._0x45d564,-_0x389beb._0x5c72f4,-0x242,-_0x389beb._0x4784da),'message':_0x485617});while(!![]){throwIfAborted(_0x112ae9),_0x207da5+=0x1;const _0x44120c=createAssistantMessageId(_0x38a040[_0x177665(0x6b,-_0x389beb._0x24ddb6,_0x389beb._0x155f52,0x56)],_0x207da5),_0x12b50c=createReasoningMessageId(_0x44120c);let _0x491e36={'model':_0x2f0d57['chatModel'][_0x47e4d8(-0x226,-_0x389beb._0x48a7b0,-_0x389beb._0x25a0f0,-_0x389beb._0x197a4d)],'maxTokens':_0x2f0d57['chatModel']['maxTokens']??0x4000,'system':structuredClone(_0x38a040[_0x177665(-_0x389beb._0x841f0a,-_0x389beb._0x3f56fa,-_0x389beb._0x1f5f4f,-_0x389beb._0x209062)]),'messages':structuredClone(_0x38a040[_0x47e4d8(-0x2c0,-_0x389beb._0x5803b9,-0x312,-0x2e9)]),'tools':_0x2f0d57[_0x47e4d8(-0x285,-0x26e,-_0x389beb._0x1f8987,-0x24f)][_0x47e4d8(-0x223,-0x205,-0x1ed,-_0x389beb._0x5c85c7)](),'metadata':{'sessionId':_0x38a040[_0x47e4d8(-0x281,-_0x389beb._0x3b6bfc,-_0x389beb._0x22255e,-_0x389beb._0x522d20)],'turnId':_0x38a040[_0x177665(0x50,_0x389beb._0x35b2e2,0x22,-_0x389beb._0x354e90)]}};_0x491e36=await _0x59a856('beforeModelRequest',_0x491e36),await _0x13fa84({'type':_0x47e4d8(-0x280,-0x2a5,-_0x389beb._0x57ed6b,-0x2c6),'request':_0x491e36});let _0x390827=await executeModelRequest(_0x491e36,_0x3b22c1,_0x2f0d57,_0x388743,{'assistantMessageId':_0x44120c,'reasoningMessageId':_0x12b50c});_0x390827=await _0x59a856(_0x177665(_0x389beb._0x138a13,-_0x389beb._0xb5c7a4,0xe,_0x389beb._0x3e090),_0x390827),await _0x13fa84({'type':'model_response','response':_0x390827}),_0x38a040[_0x177665(-0x3,0x35,-_0x389beb._0x354e90,_0x389beb._0xe6b29d)]=_0x390827;let _0x453a73=await _0x59a856(_0x47e4d8(-_0x389beb._0x595b8d,-_0x389beb._0x264a57,-0x28a,-_0x389beb._0x1119e4),withMessageId(responseToAssistantMessage(_0x390827),_0x44120c));_0x453a73=withMessageId(_0x453a73,_0x44120c);const _0x1372f0=getToolUseBlocks(_0x453a73),_0x5d7a47=await Promise['all'](_0x1372f0[_0x47e4d8(-_0x389beb._0x3238c9,-_0x389beb._0x5d8070,-0x23b,-_0x389beb._0x116e49)](_0x5c4260=>_0x59a856(_0x47e4d8(-0x27a,-0x297,-0x268,-0x2b3),_0x5c4260)));_0x5d7a47[_0x177665(-0x61,_0x389beb._0x1b7aa9,-_0x389beb._0x125005,-_0x389beb._0xa43c7b)]>0x0&&(_0x453a73=replaceToolUseBlocks(_0x453a73,_0x5d7a47));const _0x57cf90=withMessageId(_0x453a73,_0x44120c);_0x453a73=_0x57cf90;const _0x32bbd1=createReasoningMessage(_0x453a73),_0x3d785b=createAssistantTextMessage(_0x453a73),_0x59e0ac=createToolUseMessage(_0x453a73);_0x32bbd1&&await _0x13fa84({'type':_0x177665(_0x389beb._0x330e88,-0x8,_0x389beb._0x141e32,_0x389beb._0x3a0ba5),'message':withMessageId(_0x32bbd1,_0x12b50c)});_0x3d785b&&await _0x13fa84({'type':_0x47e4d8(-_0x389beb._0x1c1a53,-_0x389beb._0x1b89a5,-_0x389beb._0x5306ed,-0x25c),'message':withMessageId(_0x3d785b,_0x44120c)});_0x59e0ac&&await _0x13fa84({'type':_0x47e4d8(-_0x389beb._0x38070c,-_0x389beb._0xc56abb,-_0x389beb._0xf28401,-0x23b),'message':withMessageId(_0x59e0ac,_0x44120c)});_0x38a040[_0x47e4d8(-_0x389beb._0x3ef06d,-0x30f,-0x2e9,-_0x389beb._0x2a8181)][_0x47e4d8(-_0x389beb._0x498084,-0x2f3,-0x299,-0x29f)](_0x57cf90);_0x5d7a47[_0x177665(_0x389beb._0x1d74d0,-0x4d,-0x22,-0x76)]>0x0&&await _0x45a435(_0x57cf90);for(const _0x42c8a8 of _0x5d7a47){await _0x13fa84({'type':_0x177665(-0x13,_0x389beb._0x2daece,_0x389beb._0x5dc4be,0x8),'toolCall':_0x42c8a8});}if(_0x5d7a47[_0x177665(_0x389beb._0x125005,-0x3d,-0x22,0x2e)]===0x0){const _0x450dc9=await _0x59a856('beforeFinalOutput',_0x453a73),_0x461a72=withMessageId(_0x450dc9,_0x44120c);return _0x38a040[_0x177665(0x34,_0x389beb._0x2c5a0e,_0x389beb._0x51b8b1,_0x389beb._0xea4978)]=_0x461a72,_0x38a040[_0x47e4d8(-_0x389beb._0x14c45a,-_0x389beb._0x1b89a5,-_0x389beb._0x5a12ed,-0x28b)][_0x38a040[_0x177665(-0x1a,-0x3b,-0x52,-0x18)][_0x177665(0x25,-_0x389beb._0xca1d46,-0x22,-_0x389beb._0x4519b5)]-0x1]=_0x461a72,await _0x45a435(_0x461a72),await _0x13fa84({'type':'final_message','message':_0x461a72}),throwIfAborted(_0x112ae9),await _0x2f0d57[_0x47e4d8(-0x26e,-_0x389beb._0x2e5a18,-_0x389beb._0x522d20,-0x240)][_0x177665(0x7,_0x389beb._0x55123a,0x3f,_0x389beb._0x41757d)](_0x177665(-_0x389beb._0xb5687d,-_0x389beb._0x198af1,-_0x389beb._0x4b3736,-_0x389beb._0x57e3fb),_0x38a040,_0x296cf9),await _0x13fa84({'type':'turn_complete','state':_0x38a040}),{'status':'completed','finalMessage':_0x461a72,'state':_0x38a040};}let _0xbf32ed=await _0x2f0d57['toolRuntime'][_0x47e4d8(-_0x389beb._0x1d2f66,-0x27b,-_0x389beb._0x2cccc6,-_0x389beb._0x5bf538)](_0x5d7a47,_0x388743);const _0x98c40b=_0xbf32ed['some'](isAbortedToolResult),_0x507b59=_0x98c40b?_0x4fe36b:_0x59a856,_0x3f0cba=_0x98c40b?_0x2b3c59:_0x13fa84;_0xbf32ed=await Promise[_0x47e4d8(-0x2c7,-_0x389beb._0x197a4d,-_0x389beb._0x12d089,-0x292)](_0xbf32ed[_0x177665(-_0x389beb._0x1da4ff,-0x9,-_0x389beb._0x4e64a6,-_0x389beb._0x23e42a)](_0x1e016d=>_0x507b59('afterToolResult',_0x1e016d))),_0x38a040[_0x47e4d8(-0x2c5,-_0x389beb._0x5803b9,-0x2f6,-_0x389beb._0x2bda95)][_0x177665(-_0x389beb._0x16758e,-_0x389beb._0x1fc4fc,-0x5a,-0x9)](..._0xbf32ed);for(const _0x183dfa of _0xbf32ed){await _0x3f0cba({'type':_0x47e4d8(-_0x389beb._0x4730cf,-0x2c8,-_0x389beb._0x449067,-_0x389beb._0x251ea8),'result':_0x183dfa});}const _0x3d3fe7=await _0x507b59('beforeToolResultAppend',createToolResultUserMessage(_0xbf32ed));await _0x3f0cba({'type':'tool_result_message','message':_0x3d3fe7}),_0x38a040[_0x47e4d8(-0x2c0,-0x2ae,-0x29e,-_0x389beb._0x36f8b0)]['push'](_0x3d3fe7),await _0x45a435(_0x3d3fe7);if(_0x98c40b)return{'status':_0x177665(0x93,_0x389beb._0x3712d9,_0x389beb._0x291db7,0x79),'state':_0x38a040};}}catch(_0x27d5d6){if(!_0x112ae9[_0x177665(0x36,_0x389beb._0x12281e,_0x389beb._0x291db7,_0x389beb._0x532494)])throw new TurnFailedError(_0x27d5d6,_0x38a040);return{'status':_0x47e4d8(-0x22b,-_0x389beb._0x4bd65a,-_0x389beb._0x5121d5,-_0x389beb._0x107b9e),'state':_0x38a040};}}function createSessionId(){const _0x3e3bdd={_0x25c835:0x36a,_0x403ea9:0x34e,_0xe0de99:0x353,_0x20ee3d:0x31d,_0x56ed68:0x2b8,_0x132c4f:0x343,_0x4cd808:0x30a,_0x73f925:0x2e8,_0x19a50d:0x357,_0x7bccb8:0x2fc},_0x243b45={_0x12b14:0x2bc,_0x3ac574:0xef},_0x1a734a={_0x4ce4c1:0x4a,_0xad7e68:0x31e,_0x4dc5b5:0x125};function _0x22f774(_0x13e1eb,_0x1b2472,_0x20cdc2,_0x1579d3){return _0x2cb4b9(_0x1b2472,_0x1b2472-_0x1a734a._0x4ce4c1,_0x1579d3-_0x1a734a._0xad7e68,_0x1579d3-_0x1a734a._0x4dc5b5);}function _0x2fb32f(_0x4ffca1,_0x385a6b,_0xf5fdf9,_0x1d56c3){return _0x2cb4b9(_0x385a6b,_0x385a6b-0x38,_0x4ffca1-_0x243b45._0x12b14,_0x1d56c3-_0x243b45._0x3ac574);}return _0x22f774(0x33b,0x34d,_0x3e3bdd._0x25c835,_0x3e3bdd._0x403ea9)+Date[_0x22f774(_0x3e3bdd._0xe0de99,0x300,0x33c,_0x3e3bdd._0x20ee3d)]()+'-'+Math['random']()[_0x22f774(_0x3e3bdd._0x56ed68,_0x3e3bdd._0x132c4f,0x313,_0x3e3bdd._0x4cd808)](0x10)[_0x22f774(_0x3e3bdd._0x73f925,_0x3e3bdd._0x19a50d,_0x3e3bdd._0x7bccb8,0x327)](0x2,0xa);}function createTurnId(_0xa01604){const _0x542a94={_0x1d492b:0x70,_0x30a846:0x8b,_0x243a24:0x41};function _0x3f9552(_0x2b3dec,_0x4652cf,_0x18803e,_0x3694ef){return _0xc4fa22(_0x18803e,_0x4652cf-0xe0,_0x4652cf- -0x3e5,_0x3694ef-0x130);}return _0x3f9552(0xb3,_0x542a94._0x1d492b,_0x542a94._0x30a846,_0x542a94._0x243a24)+_0xa01604;}function createDefaultMessage(_0x40a1ab){if(_0x40a1ab===void 0x0)return void 0x0;return normalizeUserInput(_0x40a1ab);}function normalizeUserInput(_0x2fe224){const _0x19d363={_0x35d59e:0x2d,_0x1cafa7:0xb,_0x4b4611:0x5b,_0x3600b9:0xa0,_0x8b216:0x99},_0x2d1dfb={_0x123878:0xa0};if(typeof _0x2fe224===_0x24fc94(_0x19d363._0x35d59e,0x67,_0x19d363._0x1cafa7,-0x13))return{'role':_0x113783(_0x19d363._0x4b4611,0x2c,_0x19d363._0x3600b9,_0x19d363._0x8b216),'content':[{'type':'text','text':_0x2fe224}]};function _0x24fc94(_0x5b7fb2,_0xa642e1,_0x5c0bef,_0x3328a){return _0xc4fa22(_0x3328a,_0xa642e1-0x2d,_0x5b7fb2- -0x3dd,_0x3328a-0x9b);}function _0x113783(_0x32c29c,_0x4f2a41,_0x2ab13d,_0x2eee60){return _0xc4fa22(_0x2ab13d,_0x4f2a41-0x1be,_0x32c29c- -0x404,_0x2eee60-_0x2d1dfb._0x123878);}return normalizeMessage(_0x2fe224);}function resolveChatModel(_0x2f6f11){const _0xc0b621={_0x3bfae8:0xda,_0xf9f810:0xae,_0x308a49:0x13f},_0x1c7e3e={_0x373682:0xd6,_0x2cc728:0x85},_0x456285={_0x4cf803:0x1c2};function _0x2b92cf(_0x1df4cd,_0x2d2ae2,_0x3335b9,_0x41dbb8){return _0xc4fa22(_0x1df4cd,_0x2d2ae2-0xdf,_0x2d2ae2- -0x240,_0x41dbb8-_0x456285._0x4cf803);}function _0x4b2224(_0x472918,_0x1960d3,_0x10ba83,_0x4f4101){return _0x2cb4b9(_0x10ba83,_0x1960d3-0x5d,_0x472918- -_0x1c7e3e._0x373682,_0x4f4101-_0x1c7e3e._0x2cc728);}if(!_0x2f6f11[_0x4b2224(-0xe7,-_0xc0b621._0x3bfae8,-0xb0,-_0xc0b621._0xf9f810)])throw new Error(_0x4b2224(-0xfa,-_0xc0b621._0x308a49,-0x10b,-0x109));return _0x2f6f11['chatModel'];}function createRegistry(_0x434dee){const _0x12407a={_0x4331fa:0x235,_0x13ee57:0x25e,_0x2ca5c5:0xaf,_0x212de8:0x1fb,_0x5ae7e7:0x25f},_0x5cac4d={_0xe5447d:0x122,_0x566039:0xd5},_0x1a2e6e={_0x3ef134:0xb0,_0x2275a9:0x38};if(_0x434dee[_0x7cf638(0x1fe,_0x12407a._0x4331fa,0x227,_0x12407a._0x13ee57)])return _0x434dee[_0x1f675c(0xeb,_0x12407a._0x2ca5c5,0xce,0xd8)];const _0x1420e4=createExtensionRegistry();function _0x7cf638(_0x4eeba6,_0x4fa6f6,_0x446e6f,_0x30dbe4){return _0xc4fa22(_0x4eeba6,_0x4fa6f6-_0x1a2e6e._0x3ef134,_0x4fa6f6- -0x228,_0x30dbe4-_0x1a2e6e._0x2275a9);}const _0x573568=_0x434dee[_0x7cf638(_0x12407a._0x212de8,0x245,_0x12407a._0x5ae7e7,0x256)]??[];for(const _0xf5ac06 of _0x573568){_0x1420e4['register'](_0xf5ac06);}function _0x1f675c(_0x7855ec,_0xf8b047,_0x4af51d,_0x547f96){return _0x2cb4b9(_0x4af51d,_0xf8b047-_0x5cac4d._0xe5447d,_0xf8b047-0x78,_0x547f96-_0x5cac4d._0x566039);}return _0x1420e4;}var Agent=class{['_systemPrompt'];[_0x2cb4b9(0x4f,-0x19,0x0,-0x1d)];['metrics'];['sessionId'];[_0x2cb4b9(-0x57,-0x60,-0x1b,-0x39)];[_0x2cb4b9(0x8d,0x6f,0x5a,0x50)];[_0x2cb4b9(0xaf,0xad,0x6c,0x7e)];constructor(_0x5d0fb6={}){const _0x49a09a={_0x12b79e:0x1e,_0x54929f:0x1f,_0x1864b2:0x1f,_0x583db3:0x22,_0x2eac62:0x47d,_0x47d48b:0x3ff,_0x2492a7:0x4bd,_0x3bceb1:0x4dd,_0x56c12:0x49a,_0x33b720:0x3c,_0x3326bb:0xa,_0x38c25d:0x5e,_0x8463b4:0x489,_0xeb071e:0x474,_0x5b00e4:0x45,_0x40bb90:0x4f4,_0x17ce5c:0x54,_0x12b943:0x11},_0x1fcc86={_0x5f0c6e:0x21,_0x1791aa:0x2c3},_0x1f91f8={_0x4fe510:0x1eb},_0x270384={_0x6e6f7:0x10c,_0x186c1c:0x10,_0x414582:0x5a},_0x4ce0c0={_0x125227:0x46e,_0x5e6b01:0xf2};function _0x2f42ba(_0x194045,_0x27e56e,_0x52ba65,_0x643e83){return _0x2cb4b9(_0x27e56e,_0x27e56e-0x88,_0x194045-_0x4ce0c0._0x125227,_0x643e83-_0x4ce0c0._0x5e6b01);}function _0x394a45(_0xf77702,_0xe2b1b8,_0x2aee27,_0x52c6ba){return _0x2cb4b9(_0x52c6ba,_0xe2b1b8-_0x270384._0x6e6f7,_0xe2b1b8- -_0x270384._0x186c1c,_0x52c6ba-_0x270384._0x414582);}this[_0x394a45(-_0x49a09a._0x12b79e,0x14,-0x30,-_0x49a09a._0x54929f)]=_0x5d0fb6[_0x394a45(-_0x49a09a._0x1864b2,0x14,_0x49a09a._0x583db3,0x5c)]??createSessionId(),this[_0x2f42ba(0x4da,0x4e1,0x4ef,0x4a5)]=0x0,this[_0x394a45(0x11,0x32,0x1b,0x86)]=_0x5d0fb6['systemPrompt']??'',this[_0x2f42ba(0x453,0x47d,_0x49a09a._0x2eac62,0x43d)]=(_0x5d0fb6[_0x2f42ba(0x453,0x42e,_0x49a09a._0x47d48b,0x466)]??[])[_0x2f42ba(0x48a,_0x49a09a._0x2492a7,_0x49a09a._0x3bceb1,_0x49a09a._0x56c12)](normalizeMessage),this[_0x394a45(0x55,0x4a,_0x49a09a._0x33b720,0x16)]=createDefaultMessage(_0x5d0fb6[_0x394a45(-0x23,_0x49a09a._0x3326bb,0x4f,_0x49a09a._0x38c25d)]),this[_0x2f42ba(_0x49a09a._0x8463b4,0x472,_0x49a09a._0xeb071e,0x475)]=createAgentMetrics({'getContextWindowLimit':_0x5d0fb6[_0x394a45(0x6a,_0x49a09a._0x5b00e4,0x88,0x96)]});const _0x5aad7a=_0x5d0fb6[_0x394a45(-0x17,0x1d,0x38,0x5f)],_0xeea11d=async(_0x1c6f7f,_0x202713)=>{function _0x5b529e(_0x43bdb6,_0x5b235a,_0x148004,_0x5e0aa5){return _0x2f42ba(_0x43bdb6- -_0x1f91f8._0x4fe510,_0x148004,_0x148004-0x6d,_0x5e0aa5-0x1bb);}function _0x57c173(_0x46c878,_0x102731,_0x219ec1,_0x5e9abb){return _0x394a45(_0x46c878-0xf4,_0x219ec1-0x16,_0x219ec1-0xa,_0x5e9abb);}this[_0x57c173(0x12,0x62,_0x1fcc86._0x5f0c6e,-0x1)][_0x5b529e(0x2a9,0x292,0x2f5,_0x1fcc86._0x1791aa)](_0x1c6f7f),await _0x5aad7a?.(_0x1c6f7f,_0x202713);},_0x172db0=createInternalToolRuntime(_0x5d0fb6['tools']??[],{'onEvent':_0xeea11d,'onToolCall':_0x5d0fb6['onToolCall']});this['deps']={'registry':createRegistry(_0x5d0fb6),'chatModel':resolveChatModel(_0x5d0fb6),'toolRuntime':_0x172db0,'askUser':_0x5d0fb6[_0x2f42ba(0x4d8,_0x49a09a._0x40bb90,0x4be,0x4a3)],'onEvent':_0xeea11d,'sessionDir':_0x5d0fb6[_0x394a45(0x82,_0x49a09a._0x17ce5c,_0x49a09a._0x12b943,0x6c)]};}get[_0x2cb4b9(0x3d,-0x64,-0x17,-0x32)](){const _0x4dc7de={_0x25b176:0x99,_0x13b569:0x44};function _0x420b36(_0x3d222c,_0xb709ef,_0x5e12a5,_0x4c2c5a){return _0x2cb4b9(_0xb709ef,_0xb709ef-0x179,_0x3d222c-0x43,_0x4c2c5a-0x37);}return this[_0x420b36(0x85,_0x4dc7de._0x25b176,_0x4dc7de._0x13b569,0xcf)];}[_0xc4fa22(0x44f,0x40e,0x447,0x47b)](_0x1f1d48=[]){const _0x4714fb={_0x3d75c8:0x323,_0x18ce2b:0x307,_0x549386:0x322,_0x1fb78c:0x343,_0x82a87:0x363,_0x311092:0x38b,_0x9dcb40:0x344},_0x3f50ea={_0x253809:0x23};function _0x81b50a(_0x637205,_0xa784d2,_0x459b87,_0x566c79){return _0xc4fa22(_0x566c79,_0xa784d2-0x1e3,_0xa784d2- -0x1f3,_0x566c79-_0x3f50ea._0x253809);}function _0x508d12(_0x5d25b4,_0xc1f5ce,_0x43a808,_0x31a357){return _0x2cb4b9(_0x31a357,_0xc1f5ce-0x1c,_0x43a808-0x323,_0x31a357-0x11c);}this[_0x508d12(0x2ea,0x2e8,_0x4714fb._0x3d75c8,0x2f4)][_0x508d12(_0x4714fb._0x18ce2b,_0x4714fb._0x549386,_0x4714fb._0x1fb78c,_0x4714fb._0x82a87)][_0x508d12(_0x4714fb._0x311092,0x32d,_0x4714fb._0x9dcb40,0x2f0)](_0x1f1d48);}['setSystemPrompt'](_0x49566e,_0x356f36={}){const _0x2c600a={_0x10c59f:0x27f,_0x2a9872:0x267},_0x84293f={_0x234422:0x21,_0x46e8af:0x280};this['_systemPrompt']=_0x49566e;function _0x17b005(_0xe20799,_0x2d233e,_0x1d603b,_0x534257){return _0x2cb4b9(_0x1d603b,_0x2d233e-_0x84293f._0x234422,_0x2d233e- -_0x84293f._0x46e8af,_0x534257-0xc2);}_0x356f36[_0x17b005(-_0x2c600a._0x10c59f,-0x283,-0x24c,-_0x2c600a._0x2a9872)]===!![]&&(this['messages']=[],this['turnIndex']=0x0);}[_0xc4fa22(0x3ff,0x48a,0x443,0x428)](_0x5d7a03){const _0x3831e2={_0x157cef:0x463};function _0x59c8a1(_0x22204f,_0x588de7,_0x42297b,_0x408b33){return _0xc4fa22(_0x588de7,_0x588de7-0x2e,_0x408b33- -_0x3831e2._0x157cef,_0x408b33-0x8b);}this[_0x59c8a1(0xa,-0x60,-0x48,-0x19)]=_0x5d7a03;}['setChatModel'](_0x38a7be){const _0x47646d={_0x576f9e:0x9d,_0x343c2e:0x42,_0x1e84b1:0xac,_0x47bec3:0x58},_0x3fb7df={_0xa69579:0x44d},_0x13f727={_0x5ca168:0x112};function _0x205ff6(_0x13c2b9,_0x16ed4d,_0x231802,_0x1f15a2){return _0xc4fa22(_0x13c2b9,_0x16ed4d-_0x13f727._0x5ca168,_0x1f15a2- -0x3bd,_0x1f15a2-0x1b1);}function _0x4823cd(_0xbe77cb,_0x183730,_0x44abcf,_0x1a336b){return _0x2cb4b9(_0x44abcf,_0x183730-0x1d8,_0xbe77cb-_0x3fb7df._0xa69579,_0x1a336b-0x1d9);}this[_0x205ff6(_0x47646d._0x576f9e,_0x47646d._0x343c2e,_0x47646d._0x1e84b1,0x69)][_0x205ff6(0x42,0x3a,0x16,_0x47646d._0x47bec3)]=_0x38a7be;}async[_0xc4fa22(0x445,0x47d,0x459,0x45e)](_0x30a059=this[_0xc4fa22(0x4b9,0x493,0x480,0x441)],_0x55a03a={}){const _0x2218e8={_0x1a9e40:0x22e,_0x4b9af8:0x276,_0x331b5f:0x24b,_0x1657f7:0x2d7,_0x37da30:0x2b8,_0x141143:0x30b,_0x2df868:0x2c3,_0x51b2e4:0x279,_0x419a37:0x2cf,_0x3ce988:0x2a8,_0x29d999:0x298,_0x1cfd95:0x217,_0x5333ab:0x234,_0x594ec0:0x249,_0xb52722:0x282,_0x141f97:0x25e,_0x502dbb:0x26f,_0x76da31:0x284,_0x184969:0x24c,_0x5a8269:0x2fd,_0x4177fc:0x29b,_0x29f0cc:0x26f,_0x1b4c73:0x284,_0x161fae:0x2b6,_0x31ab24:0x2e7,_0x5d73d4:0x250,_0x3aed72:0x2f3,_0x27ed76:0x2d4,_0x441290:0x30c,_0x2160b8:0x2de},_0x26f8b1={_0xe8c097:0xbf},_0x539a29={_0x4bf881:0x14,_0xce65e:0x29f};if(!_0x30a059)throw new Error(_0xbef2e8(_0x2218e8._0x1a9e40,_0x2218e8._0x4b9af8,0x269,_0x2218e8._0x331b5f));function _0x46bc76(_0xe52669,_0x6295a4,_0x463266,_0x49de5e){return _0x2cb4b9(_0x49de5e,_0x6295a4-_0x539a29._0x4bf881,_0x463266-_0x539a29._0xce65e,_0x49de5e-0x145);}function _0xbef2e8(_0x201bff,_0xfdd5d4,_0x4b90d5,_0x445412){return _0x2cb4b9(_0x201bff,_0xfdd5d4-_0x26f8b1._0xe8c097,_0xfdd5d4-0x281,_0x445412-0xf4);}this[_0x46bc76(_0x2218e8._0x1657f7,_0x2218e8._0x37da30,_0x2218e8._0x141143,0x2ba)]+=0x1;try{const _0x524421=await runTurn({'sessionId':this[_0x46bc76(0x2fb,0x295,_0x2218e8._0x2df868,_0x2218e8._0x51b2e4)],'turnId':createTurnId(this[_0x46bc76(0x2cf,0x346,0x30b,0x2be)]),'streaming':_0x55a03a[_0xbef2e8(_0x2218e8._0x419a37,0x2b7,_0x2218e8._0x3ce988,0x2f8)],'signal':_0x55a03a[_0x46bc76(0x298,0x261,_0x2218e8._0x29d999,0x281)],'system':this[_0xbef2e8(0x26f,0x26a,_0x2218e8._0x1cfd95,0x237)],'messages':this[_0x46bc76(_0x2218e8._0x5333ab,_0x2218e8._0x594ec0,0x284,_0x2218e8._0x4b9af8)],'message':normalizeUserInput(_0x30a059)},this[_0x46bc76(_0x2218e8._0xb52722,0x26f,0x29f,0x2d2)]);return this['messages']=_0x524421['state'][_0x46bc76(_0x2218e8._0x419a37,0x29e,0x284,_0x2218e8._0x141f97)]['map'](normalizeMessage),_0x524421;}catch(_0x161660){if(_0x161660 instanceof TurnFailedError){this[_0x46bc76(0x24c,_0x2218e8._0x502dbb,_0x2218e8._0x76da31,_0x2218e8._0x184969)]=synthesizeMissingToolResults(_0x161660[_0x46bc76(_0x2218e8._0x5a8269,0x2d1,0x2d0,_0x2218e8._0x4177fc)][_0x46bc76(_0x2218e8._0x29f0cc,0x29b,_0x2218e8._0x1b4c73,_0x2218e8._0x161fae)][_0xbef2e8(0x279,0x29d,_0x2218e8._0x31ab24,_0x2218e8._0x5d73d4)](normalizeMessage));throw _0x161660[_0xbef2e8(_0x2218e8._0x3aed72,_0x2218e8._0x27ed76,_0x2218e8._0x441290,_0x2218e8._0x2160b8)];}throw _0x161660;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1 +1 @@
1
- (function(_0x1597d0,_0x33e985){var _0x587b22={_0x19d030:0x418,_0x591723:0x40b,_0x5e2faa:0x41a,_0x23587f:0x41b,_0x2fcaf1:0x395,_0x461ebb:0x3a7,_0x409330:0x3a1,_0x57d91a:0x3a6,_0x1af722:0x3ae,_0x35c3c9:0x3a0,_0x2dc2d3:0x3a4,_0x455cb9:0x3ae,_0x51fe68:0x397,_0x4d16ba:0x392,_0x4356d0:0x39a,_0x35cec4:0x39f,_0x1e5e6f:0x39b,_0x1ad59c:0x390,_0x18ccc7:0x40d,_0x2e0c9e:0x40f,_0x28d452:0x412,_0x246e44:0x3a0,_0x5e1444:0x3a6,_0x369ee7:0x39e,_0x17255a:0x395},_0x45b263={_0x5704f2:0x215},_0xc93a96=_0x1597d0();function _0x4d6f45(_0x29f460,_0x47539b,_0x54a381,_0x211115){return _0x44a3(_0x54a381-0x19e,_0x47539b);}function _0x405ffb(_0x280eac,_0x3390ee,_0x49cc77,_0x4459c4){return _0x44a3(_0x4459c4-_0x45b263._0x5704f2,_0x3390ee);}while(!![]){try{var _0x3ecf1c=-parseInt(_0x405ffb(0x413,0x40f,_0x587b22._0x19d030,0x417))/0x1+parseInt(_0x405ffb(0x3ff,0x413,0x3ff,_0x587b22._0x591723))/0x2*(parseInt(_0x405ffb(_0x587b22._0x5e2faa,_0x587b22._0x23587f,0x40f,0x41a))/0x3)+parseInt(_0x4d6f45(_0x587b22._0x2fcaf1,_0x587b22._0x461ebb,_0x587b22._0x409330,_0x587b22._0x57d91a))/0x4*(parseInt(_0x4d6f45(_0x587b22._0x1af722,_0x587b22._0x35c3c9,_0x587b22._0x2dc2d3,_0x587b22._0x455cb9))/0x5)+-parseInt(_0x4d6f45(0x38d,_0x587b22._0x51fe68,_0x587b22._0x4d16ba,0x38e))/0x6*(parseInt(_0x4d6f45(0x3a6,_0x587b22._0x4356d0,_0x587b22._0x35cec4,_0x587b22._0x1e5e6f))/0x7)+parseInt(_0x4d6f45(_0x587b22._0x1ad59c,_0x587b22._0x2fcaf1,0x395,0x390))/0x8*(parseInt(_0x405ffb(_0x587b22._0x18ccc7,_0x587b22._0x5e2faa,_0x587b22._0x2e0c9e,_0x587b22._0x28d452))/0x9)+-parseInt(_0x4d6f45(_0x587b22._0x246e44,_0x587b22._0x5e1444,_0x587b22._0x369ee7,_0x587b22._0x17255a))/0xa+parseInt(_0x4d6f45(0x3a7,0x3a3,0x3a2,0x3a3))/0xb;if(_0x3ecf1c===_0x33e985)break;else _0xc93a96['push'](_0xc93a96['shift']());}catch(_0x29423b){_0xc93a96['push'](_0xc93a96['shift']());}}}(_0x642a,0x4f9f2));var OperationAbortedError=class extends Error{[_0x388a80(0xce,0xe4,0xde,0xd8)]=_0x388a80(0xc1,0xc2,0xcc,0xcb);constructor(_0x19fd29=_0x388a80(0xdd,0xd7,0xd2,0xd4)){super(_0x19fd29),this['name']='AbortError';}};function toAbortError(_0x2f2774){var _0x1d8130={_0x5c14d1:0x301,_0x3f6d36:0x302,_0x19b8f0:0x31c,_0x5bcf79:0x314};if(isAbortError(_0x2f2774))return _0x2f2774;function _0x3642d9(_0x4d629b,_0x3bf177,_0x39b5d5,_0x4f5fb7){return _0x388a80(_0x4d629b-0xa1,_0x4f5fb7,_0x39b5d5-0x182,_0x4d629b-0x22f);}function _0x5a6e18(_0x151155,_0x2bc976,_0x2571a6,_0x53f666){return _0x23b500(_0x2bc976,_0x2bc976-0x163,_0x2571a6-0x0,_0x151155-0xb9);}if(_0x2f2774 instanceof Error)return new OperationAbortedError(_0x2f2774[_0x3642d9(_0x1d8130._0x5c14d1,0x2f5,0x309,_0x1d8130._0x3f6d36)]);if(typeof _0x2f2774==='string'&&_0x2f2774[_0x5a6e18(0x315,0x321,_0x1d8130._0x19b8f0,_0x1d8130._0x5bcf79)]>0x0)return new OperationAbortedError(_0x2f2774);return new OperationAbortedError();}function isAbortError(_0x5a664c){var _0x5f1993={_0x5ecd74:0x396,_0x51d15a:0x396,_0xc9aaa:0x39f,_0x242b90:0x397,_0x1f9655:0x393,_0xeb5f62:0x394,_0x4e6159:0x38f,_0x5bb20e:0x12b,_0x509638:0x13d},_0x152e68={_0x4f68ee:0x1dd,_0x5430c5:0x203};function _0x55afd1(_0x5b85a2,_0x192eae,_0x48c7d8,_0x45a6ab){return _0x388a80(_0x5b85a2-0x1a7,_0x48c7d8,_0x48c7d8-_0x152e68._0x4f68ee,_0x5b85a2- -_0x152e68._0x5430c5);}function _0x552a3c(_0x1c6e02,_0x2cce47,_0x8f4d7a,_0x33b512){return _0x388a80(_0x1c6e02-0x1d9,_0x33b512,_0x8f4d7a-0x5e,_0x8f4d7a-0x2bf);}return _0x5a664c instanceof OperationAbortedError||_0x5a664c instanceof Error&&(_0x5a664c[_0x552a3c(0x38f,_0x5f1993._0x5ecd74,_0x5f1993._0x51d15a,_0x5f1993._0xc9aaa)]===_0x552a3c(_0x5f1993._0x242b90,_0x5f1993._0x1f9655,_0x5f1993._0xeb5f62,_0x5f1993._0x4e6159)||_0x55afd1(-0x12b,-0x134,-_0x5f1993._0x5bb20e,-0x128)in _0x5a664c&&_0x5a664c[_0x552a3c(_0x5f1993._0x242b90,0x391,0x397,0x38e)]===_0x55afd1(-0x138,-0x12d,-_0x5f1993._0x509638,-0x139));}function throwIfAborted(_0x5060bd){var _0x14b355={_0x3051bb:0x2fa,_0x5a660c:0x2f8},_0x349336={_0x122679:0xba,_0x4cc0e0:0x121};function _0x17e964(_0x28f96b,_0x57705f,_0x5ca5e8,_0x4c3ee3){return _0x23b500(_0x28f96b,_0x57705f-_0x349336._0x122679,_0x5ca5e8-_0x349336._0x4cc0e0,_0x4c3ee3-0x95);}if(!_0x5060bd?.['aborted'])return;throw toAbortError(_0x5060bd[_0x17e964(_0x14b355._0x3051bb,0x2f2,_0x14b355._0x5a660c,_0x14b355._0x5a660c)]);}function _0x388a80(_0x5f59e2,_0x7ce2bf,_0x2f8efc,_0x4b1fee){var _0x468cf3={_0x102060:0x127};return _0x44a3(_0x4b1fee- -_0x468cf3._0x102060,_0x7ce2bf);}function _0x642a(){var _0x3641b9=['mJK4ntK1nff4rvLmBG','ywrKrxzLBNrmAxn0zw5LCG','ndjNELrbCKu','ofP6BNr0Aa','CMvTB3zLrxzLBNrmAxn0zw5LCG','BwvZC2fNzq','CMvHC29U','t3bLCMf0Aw9UigfIB3j0zwq','qwjVCNrfCNjVCG','mJy5nZeWmM9VAfzsta','BMfTzq','y29Kzq','mJGXmZC4mgnQsKrLCG','n3zVu0DcyG','mJaZnda3tezlyKTZ','nZy0EKDvwLDQ','nZe1mdy0oxP5AwfXua','mte1odLlEMXXrfC','nZi3mfv4wMjdra','ywjVCNq','ywjVCNrLza','qujpuLrFrvjs','BgvUz3rO'];_0x642a=function(){return _0x3641b9;};return _0x642a();}function addAbortListener(_0x264b79,_0x234d39){var _0x2f0e6b={_0x337891:0x1ee,_0x5603e6:0x37,_0x5a70a1:0x2e,_0x2792cc:0x2d,_0x252ae2:0x1e7,_0x2edb05:0x1e9},_0x402d38={_0x2360b0:0x158,_0x209714:0x154,_0x500d22:0x14a},_0x5a2754={_0x4156a2:0x6f,_0x1a7d68:0xa0},_0x3e2eef={_0xa17763:0x144,_0x4dbcbd:0x87};if(!_0x264b79)return()=>{};if(_0x264b79[_0x501262(0x1e4,_0x2f0e6b._0x337891,0x1ea,0x1e5)])return _0x234d39(),()=>{};function _0x501262(_0x20af69,_0x59eb11,_0x547c9b,_0x265293){return _0x23b500(_0x265293,_0x59eb11-_0x3e2eef._0xa17763,_0x547c9b-0x16b,_0x547c9b- -_0x3e2eef._0x4dbcbd);}function _0x198979(_0x26b964,_0x30983a,_0x291d25,_0x524dbf){return _0x388a80(_0x26b964-0x13,_0x26b964,_0x291d25-_0x5a2754._0x4156a2,_0x30983a- -_0x5a2754._0x1a7d68);}const _0x521396=()=>{_0x234d39();};return _0x264b79[_0x198979(_0x2f0e6b._0x5603e6,_0x2f0e6b._0x5a70a1,0x23,_0x2f0e6b._0x2792cc)](_0x501262(_0x2f0e6b._0x252ae2,0x1e6,_0x2f0e6b._0x2edb05,0x1ea),_0x521396,{'once':!![]}),()=>{var _0x48e3f0={_0x36b249:0x198,_0x1d3d46:0x47,_0x5794d3:0x9c};function _0x5b55f6(_0x5ceca4,_0x3cddbf,_0xe6bf89,_0xbe7f8d){return _0x501262(_0x5ceca4-_0x48e3f0._0x36b249,_0x3cddbf-_0x48e3f0._0x1d3d46,_0xe6bf89- -_0x48e3f0._0x5794d3,_0xbe7f8d);}function _0x78b528(_0x210ef2,_0x1a4f96,_0x471464,_0x4d9880){return _0x501262(_0x210ef2-0x18f,_0x1a4f96-0x1c3,_0x1a4f96-0x1b7,_0x210ef2);}_0x264b79[_0x5b55f6(0x133,0x142,0x13e,0x148)](_0x5b55f6(_0x402d38._0x2360b0,_0x402d38._0x209714,0x14d,_0x402d38._0x500d22),_0x521396);};}function _0x44a3(_0x5b69d4,_0x35b84e){_0x5b69d4=_0x5b69d4-0x1f2;var _0x642ae9=_0x642a();var _0x44a32f=_0x642ae9[_0x5b69d4];if(_0x44a3['RIpFqv']===undefined){var _0x5e9cb4=function(_0x26ee53){var _0x3f02bb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x19fd29='',_0x2f2774='';for(var _0x5a664c=0x0,_0x5060bd,_0x264b79,_0x234d39=0x0;_0x264b79=_0x26ee53['charAt'](_0x234d39++);~_0x264b79&&(_0x5060bd=_0x5a664c%0x4?_0x5060bd*0x40+_0x264b79:_0x264b79,_0x5a664c++%0x4)?_0x19fd29+=String['fromCharCode'](0xff&_0x5060bd>>(-0x2*_0x5a664c&0x6)):0x0){_0x264b79=_0x3f02bb['indexOf'](_0x264b79);}for(var _0x521396=0x0,_0x17f802=_0x19fd29['length'];_0x521396<_0x17f802;_0x521396++){_0x2f2774+='%'+('00'+_0x19fd29['charCodeAt'](_0x521396)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f2774);};_0x44a3['DfSTKe']=_0x5e9cb4,_0x44a3['hLwOtx']={},_0x44a3['RIpFqv']=!![];}var _0x440a87=_0x642ae9[0x0],_0x2ef77a=_0x5b69d4+_0x440a87,_0x15df0c=_0x44a3['hLwOtx'][_0x2ef77a];return!_0x15df0c?(_0x44a32f=_0x44a3['DfSTKe'](_0x44a32f),_0x44a3['hLwOtx'][_0x2ef77a]=_0x44a32f):_0x44a32f=_0x15df0c,_0x44a32f;}function _0x23b500(_0x4734bb,_0x137d9c,_0xce4390,_0x1d9d81){return _0x44a3(_0x1d9d81-0x69,_0x4734bb);}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
1
+ (function(_0x30f087,_0x540b83){var _0x4b8f75={_0x1f97ee:0x3f9,_0xb410d5:0x407,_0x5b2e9e:0x402,_0x3e4eb8:0x406,_0x5dc8d1:0x40c,_0x685e9d:0x3f4,_0x392ede:0x3ff,_0x4a9a03:0x2e7,_0x334589:0x2e4,_0x20e126:0x409,_0x589fb1:0x3f5,_0x291a33:0x3f9,_0x1380cd:0x401,_0x406704:0x3f6,_0x3b4508:0x40e,_0x1615fb:0x3ff,_0x2ac0c4:0x3fa,_0x31922c:0x403,_0x3405c3:0x2ee},_0x4fcea0=_0x30f087();function _0x2849eb(_0x5922fd,_0x9e215e,_0x12b721,_0x177d33){return _0x5eec(_0x9e215e-0x253,_0x12b721);}function _0x265f4f(_0x134177,_0x40f844,_0x4ccb2b,_0x54209a){return _0x5eec(_0x134177-0x364,_0x54209a);}while(!![]){try{var _0x237885=parseInt(_0x265f4f(0x403,0x402,_0x4b8f75._0x1f97ee,0x405))/0x1*(-parseInt(_0x265f4f(_0x4b8f75._0xb410d5,_0x4b8f75._0x5b2e9e,_0x4b8f75._0x3e4eb8,_0x4b8f75._0x5dc8d1))/0x2)+parseInt(_0x265f4f(0x3fc,_0x4b8f75._0x685e9d,0x3f4,0x3f6))/0x3+-parseInt(_0x265f4f(0x409,0x412,0x404,_0x4b8f75._0x392ede))/0x4*(-parseInt(_0x2849eb(_0x4b8f75._0x4a9a03,_0x4b8f75._0x334589,0x2dd,0x2e2))/0x5)+parseInt(_0x265f4f(_0x4b8f75._0x3e4eb8,0x3fd,_0x4b8f75._0x20e126,0x401))/0x6*(parseInt(_0x265f4f(0x3fe,0x3fd,_0x4b8f75._0x589fb1,_0x4b8f75._0x291a33))/0x7)+-parseInt(_0x265f4f(_0x4b8f75._0x392ede,0x404,0x3fb,0x3fa))/0x8+parseInt(_0x265f4f(_0x4b8f75._0x1380cd,0x40c,_0x4b8f75._0x406704,0x408))/0x9*(parseInt(_0x265f4f(0x405,_0x4b8f75._0x20e126,0x411,_0x4b8f75._0x3b4508))/0xa)+-parseInt(_0x265f4f(_0x4b8f75._0x5b2e9e,_0x4b8f75._0x1615fb,_0x4b8f75._0x2ac0c4,_0x4b8f75._0x31922c))/0xb*(parseInt(_0x2849eb(_0x4b8f75._0x3405c3,0x2ea,0x2e3,0x2e6))/0xc);if(_0x237885===_0x540b83)break;else _0x4fcea0['push'](_0x4fcea0['shift']());}catch(_0x344a9d){_0x4fcea0['push'](_0x4fcea0['shift']());}}}(_0x4549,0xd7b16));var OperationAbortedError=class extends Error{[_0x30d797(0x292,0x296,0x29e,0x28b)]=_0x27ab05(0x3a9,0x3ad,0x3a9,0x3aa);constructor(_0x37d904=_0x30d797(0x288,0x292,0x290,0x28f)){var _0x17b7aa={_0x3bfbd3:0x47,_0x639d63:0x3c,_0x57ffc0:0x252,_0x5c1b7b:0x259,_0x20fdae:0x24d},_0x27e565={_0x5801e3:0x5f4,_0x28de84:0xdb,_0x476668:0x129},_0x2324c4={_0x117689:0x115,_0x5c2be1:0x23e};super(_0x37d904);function _0x5a076d(_0x10bd71,_0x465539,_0x51f265,_0x587216){return _0x30d797(_0x10bd71-_0x2324c4._0x117689,_0x10bd71- -_0x2324c4._0x5c2be1,_0x51f265-0x12e,_0x587216);}function _0x23cc38(_0x53e59a,_0x217c24,_0x44ae3c,_0x4bbe5b){return _0x27ab05(_0x53e59a- -_0x27e565._0x5801e3,_0x217c24,_0x44ae3c-_0x27e565._0x28de84,_0x4bbe5b-_0x27e565._0x476668);}this[_0x5a076d(_0x17b7aa._0x3bfbd3,_0x17b7aa._0x639d63,0x51,0x4f)]=_0x23cc38(-_0x17b7aa._0x57ffc0,-_0x17b7aa._0x5c1b7b,-_0x17b7aa._0x20fdae,-0x24d);}};function toAbortError(_0x327a6f){var _0xcf76f4={_0x123b68:0x6d,_0x411e75:0x62},_0x4b035c={_0x3acfc3:0x297,_0x101685:0xf7,_0x333cf4:0x14b},_0x861af={_0x10ffba:0xb4};function _0x3d7c6a(_0x5edf21,_0x25181f,_0x540551,_0x2b0f3f){return _0x30d797(_0x5edf21-_0x861af._0x10ffba,_0x5edf21- -0x22b,_0x540551-0x5c,_0x25181f);}if(isAbortError(_0x327a6f))return _0x327a6f;function _0x5b58b1(_0xee56b6,_0x1d96ab,_0x3928eb,_0x238f55){return _0x27ab05(_0x238f55- -_0x4b035c._0x3acfc3,_0x3928eb,_0x3928eb-_0x4b035c._0x101685,_0x238f55-_0x4b035c._0x333cf4);}if(_0x327a6f instanceof Error)return new OperationAbortedError(_0x327a6f['message']);if(typeof _0x327a6f===_0x3d7c6a(_0xcf76f4._0x123b68,0x62,_0xcf76f4._0x411e75,0x73)&&_0x327a6f[_0x5b58b1(0x10c,0x112,0x114,0x115)]>0x0)return new OperationAbortedError(_0x327a6f);return new OperationAbortedError();}function _0x30d797(_0x1ede36,_0x32f935,_0x521035,_0x8efb52){return _0x5eec(_0x32f935-0x1f2,_0x8efb52);}function isAbortError(_0x4ec3e5){var _0x5c9581={_0x2bd52c:0x3d2,_0x3032e1:0x3d2,_0x1f310f:0x5b,_0x3f61e8:0x61,_0x23ab30:0x62,_0x63e85:0x5d,_0x459112:0x69,_0x2df79d:0x3e3,_0x1c0a65:0x3db},_0x3e807f={_0x25666b:0x1e7,_0x56b7f8:0x45},_0x1810b6={_0xa94bea:0x69,_0x112627:0xdc};function _0x31f903(_0x1d4f54,_0x598ea9,_0x24a353,_0xd031a8){return _0x30d797(_0x1d4f54-_0x1810b6._0xa94bea,_0x1d4f54- -0x229,_0x24a353-_0x1810b6._0x112627,_0x24a353);}function _0x5b11fe(_0x1a66d1,_0x1c4b20,_0x168123,_0x2d97e0){return _0x27ab05(_0x2d97e0-0x2c,_0x1c4b20,_0x168123-_0x3e807f._0x25666b,_0x2d97e0-_0x3e807f._0x56b7f8);}return _0x4ec3e5 instanceof OperationAbortedError||_0x4ec3e5 instanceof Error&&(_0x4ec3e5[_0x5b11fe(_0x5c9581._0x2bd52c,_0x5c9581._0x3032e1,0x3d2,0x3cf)]===_0x31f903(_0x5c9581._0x1f310f,_0x5c9581._0x3f61e8,_0x5c9581._0x23ab30,_0x5c9581._0x63e85)||_0x31f903(0x6d,0x6d,0x65,_0x5c9581._0x459112)in _0x4ec3e5&&_0x4ec3e5[_0x5b11fe(_0x5c9581._0x2df79d,0x3dd,_0x5c9581._0x1c0a65,0x3e0)]===_0x31f903(0x62,0x6b,_0x5c9581._0x23ab30,_0x5c9581._0x63e85));}function _0x5eec(_0x4ba747,_0x37c6ba){_0x4ba747=_0x4ba747-0x90;var _0x45498a=_0x4549();var _0x5eec5c=_0x45498a[_0x4ba747];if(_0x5eec['TAjlLR']===undefined){var _0xa26122=function(_0x25bfc7){var _0x167406='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x37d904='',_0x327a6f='';for(var _0x4ec3e5=0x0,_0x516c06,_0x553dad,_0x1eaf77=0x0;_0x553dad=_0x25bfc7['charAt'](_0x1eaf77++);~_0x553dad&&(_0x516c06=_0x4ec3e5%0x4?_0x516c06*0x40+_0x553dad:_0x553dad,_0x4ec3e5++%0x4)?_0x37d904+=String['fromCharCode'](0xff&_0x516c06>>(-0x2*_0x4ec3e5&0x6)):0x0){_0x553dad=_0x167406['indexOf'](_0x553dad);}for(var _0x3d521b=0x0,_0x53057f=_0x37d904['length'];_0x3d521b<_0x53057f;_0x3d521b++){_0x327a6f+='%'+('00'+_0x37d904['charCodeAt'](_0x3d521b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x327a6f);};_0x5eec['DsbxVW']=_0xa26122,_0x5eec['Qcelca']={},_0x5eec['TAjlLR']=!![];}var _0x208631=_0x45498a[0x0],_0x1495f8=_0x4ba747+_0x208631,_0x386cc1=_0x5eec['Qcelca'][_0x1495f8];return!_0x386cc1?(_0x5eec5c=_0x5eec['DsbxVW'](_0x5eec5c),_0x5eec['Qcelca'][_0x1495f8]=_0x5eec5c):_0x5eec5c=_0x386cc1,_0x5eec5c;}function _0x4549(){var _0x95d9ee=['mtfRveziBw8','mZiWwLbXtgTq','t3bLCMf0Aw9UigfIB3j0zwq','mJC0mtaWwNHSr0fr','mJa5ngj1uerdvW','mZaWmefPuhLhBW','y29Kzq','mZq5mdqZnMzOr2PVsW','C3rYAw5N','ywjVCNq','mtbnwvPNuvC','qwjVCNrfCNjVCG','BMfTzq','CMvHC29U','ywjVCNrLza','CMvTB3zLrxzLBNrmAxn0zw5LCG','mZe5mZaWnJHkzeT0qK8','ndCWmZK3ou9QAMPgEq','qujpuLrFrvjs','mtqXmZnyBgnQwfy','nJK2nte2mfblu3fLvG','BgvUz3rO','mJG4y0vhuLHf'];_0x4549=function(){return _0x95d9ee;};return _0x4549();}function _0x27ab05(_0x3230db,_0x59139f,_0x24fd84,_0x4f7edb){var _0x55a324={_0x41c58b:0x310};return _0x5eec(_0x3230db-_0x55a324._0x41c58b,_0x59139f);}function throwIfAborted(_0x516c06){var _0x12d32d={_0x36ea95:0xb7,_0x33fd77:0x250,_0x373474:0x24c},_0x4a4926={_0x4dcae2:0x345},_0x1c6613={_0x2763bf:0x26};function _0x9ac6c5(_0x2fc12f,_0x177e6e,_0x27e5d7,_0x2c48b2){return _0x30d797(_0x2fc12f-_0x1c6613._0x2763bf,_0x27e5d7- -0x4d2,_0x27e5d7-0x6c,_0x2c48b2);}if(!_0x516c06?.[_0x358bac(-0xbe,-0xbf,-0xca,-_0x12d32d._0x36ea95)])return;function _0x358bac(_0x5363b4,_0x4cbd92,_0x3f72af,_0x9e55bd){return _0x30d797(_0x5363b4-0x0,_0x5363b4- -_0x4a4926._0x4dcae2,_0x3f72af-0xe7,_0x4cbd92);}throw toAbortError(_0x516c06[_0x9ac6c5(-0x256,-_0x12d32d._0x33fd77,-_0x12d32d._0x373474,-0x256)]);}function addAbortListener(_0x553dad,_0x1eaf77){var _0x3ca88f={_0x33b9c8:0x35,_0x42ad5f:0x42,_0x335fbe:0x44,_0x4d2f0f:0x48},_0x525d63={_0xef9568:0xc0,_0x565002:0xcb,_0x74f28e:0xd5,_0x11800b:0xce,_0x5e755f:0x28c,_0x1a0536:0x297},_0x2a37f6={_0x51835e:0x1ac,_0x100f60:0x2d0},_0x52da93={_0x48a542:0x3e4,_0x40edf0:0x36,_0x11f0e0:0x1e4},_0xd62840={_0x393e5d:0x157,_0x4ed0a0:0x190};function _0xd8e2b1(_0x177d83,_0x3befa2,_0x4749b2,_0x3fb6cc){return _0x30d797(_0x177d83-_0xd62840._0x393e5d,_0x3befa2- -0x4aa,_0x4749b2-_0xd62840._0x4ed0a0,_0x4749b2);}if(!_0x553dad)return()=>{};if(_0x553dad[_0x54ed2c(-0x41,-_0x3ca88f._0x33b9c8,-0x37,-0x3f)])return _0x1eaf77(),()=>{};const _0x3d521b=()=>{_0x1eaf77();};_0x553dad['addEventListener'](_0x54ed2c(-_0x3ca88f._0x42ad5f,-_0x3ca88f._0x335fbe,-_0x3ca88f._0x4d2f0f,-_0x3ca88f._0x335fbe),_0x3d521b,{'once':!![]});function _0x54ed2c(_0x1d63a2,_0x3c1105,_0x206a0e,_0x57ca1b){return _0x27ab05(_0x57ca1b- -_0x52da93._0x48a542,_0x206a0e,_0x206a0e-_0x52da93._0x40edf0,_0x57ca1b-_0x52da93._0x11f0e0);}return()=>{var _0x520a74={_0x3a065b:0x180,_0x55a176:0x2ed};function _0x4ed8ba(_0x175239,_0xa5fccf,_0x497720,_0x3f45bc){return _0xd8e2b1(_0x175239-_0x520a74._0x3a065b,_0xa5fccf-_0x520a74._0x55a176,_0x175239,_0x3f45bc-0x146);}function _0x29e4d7(_0x32a236,_0xc109f1,_0x11c459,_0xb8154d){return _0x54ed2c(_0x32a236-_0x2a37f6._0x51835e,_0xc109f1-0x107,_0xb8154d,_0xc109f1-_0x2a37f6._0x100f60);}_0x553dad[_0x4ed8ba(_0x525d63._0xef9568,_0x525d63._0x565002,_0x525d63._0x74f28e,_0x525d63._0x11800b)](_0x29e4d7(0x290,_0x525d63._0x5e755f,_0x525d63._0x1a0536,0x298),_0x3d521b);};}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
@@ -1,5 +1,5 @@
1
- import { g as ContentBlock, h as TextBlock, i as ContentInput, S as SystemInput, j as MessageInput, M as Message, k as CompileRequestInput, l as ModelRequest, C as ChatRequest, m as ModelResponse, n as ChatResponse, o as ToolUseBlock, p as ToolResultBlock, q as ToolResult } from '../types-DQXrm4dp.js';
2
- export { t as toOpenAiResponsesRequest } from '../provider-adapters-BZo_Yh3I.js';
1
+ import { g as ContentBlock, h as TextBlock, i as ContentInput, S as SystemInput, j as MessageInput, M as Message, k as CompileRequestInput, l as ModelRequest, C as ChatRequest, m as ModelResponse, n as ChatResponse, o as ToolUseBlock, p as ToolResultBlock, q as ToolResult } from '../types-CSXSwpwn.js';
2
+ export { t as toOpenAiResponsesRequest } from '../provider-adapters-CVC34mwR.js';
3
3
 
4
4
  declare function hasPastedImages(input: string): boolean;
5
5
  declare function contentFromPastedText(input: string): ContentBlock[];
@@ -1 +1 @@
1
- (function(_0xfc42af,_0xad71a8){const _0x2c7a1d={_0x43e625:0x1c3,_0x350ce1:0x2ed,_0x274f3:0x2de,_0x13f6e1:0x2e6,_0x4342de:0x1bb,_0x455473:0x1c1,_0x497d89:0x1b5,_0x3d8f98:0x1b1,_0x359304:0x1c2,_0x1b62fc:0x1bc,_0x41eb40:0x1ce,_0x4bc340:0x1c6,_0x3f8e7d:0x1cc,_0x1efca2:0x1d0,_0x18ea8d:0x1d4,_0xd94e26:0x1cf,_0x1ab458:0x1c7,_0x479e81:0x1bd,_0x3e70a1:0x2df,_0x16f36e:0x2d5},_0x420b63={_0x534cf3:0x3cb};function _0x5ec475(_0x6b86e2,_0x269918,_0x3d470a,_0x257f34){return _0x2a4d(_0x6b86e2-0xd9,_0x3d470a);}const _0x335b8a=_0xfc42af();function _0x10510f(_0x34d8c3,_0x56b388,_0x4b4f9d,_0x2753b0){return _0x2a4d(_0x2753b0- -_0x420b63._0x534cf3,_0x34d8c3);}while(!![]){try{const _0x25283e=-parseInt(_0x5ec475(0x1cd,_0x2c7a1d._0x43e625,0x1cc,0x1d7))/0x1+parseInt(_0x10510f(-0x2e6,-_0x2c7a1d._0x350ce1,-_0x2c7a1d._0x274f3,-_0x2c7a1d._0x13f6e1))/0x2+-parseInt(_0x5ec475(_0x2c7a1d._0x4342de,_0x2c7a1d._0x455473,_0x2c7a1d._0x497d89,_0x2c7a1d._0x3d8f98))/0x3*(parseInt(_0x5ec475(0x1c7,_0x2c7a1d._0x359304,_0x2c7a1d._0x1b62fc,_0x2c7a1d._0x41eb40))/0x4)+parseInt(_0x5ec475(0x1cf,_0x2c7a1d._0x43e625,_0x2c7a1d._0x4bc340,_0x2c7a1d._0x3f8e7d))/0x5+-parseInt(_0x5ec475(_0x2c7a1d._0x1efca2,_0x2c7a1d._0x18ea8d,_0x2c7a1d._0xd94e26,0x1c7))/0x6+-parseInt(_0x5ec475(0x1c6,_0x2c7a1d._0x359304,_0x2c7a1d._0x1ab458,0x1cd))/0x7+-parseInt(_0x5ec475(0x1bf,0x1c2,_0x2c7a1d._0x479e81,0x1bc))/0x8*(-parseInt(_0x10510f(-0x2dc,-_0x2c7a1d._0x3e70a1,-_0x2c7a1d._0x16f36e,-0x2e1))/0x9);if(_0x25283e===_0xad71a8)break;else _0x335b8a['push'](_0x335b8a['shift']());}catch(_0x4ae0c8){_0x335b8a['push'](_0x335b8a['shift']());}}}(_0x2ee8,0x544c1));import{toOpenAiResponsesRequest}from'../chunk-T7UKN6FZ.js';import'../chunk-NYZR4XKO.js';import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-SEP4YYY3.js';function _0x2a4d(_0x252968,_0x4944a5){_0x252968=_0x252968-0xe2;const _0x2ee857=_0x2ee8();let _0x2a4dbe=_0x2ee857[_0x252968];if(_0x2a4d['xZlHKW']===undefined){var _0x2f3c15=function(_0x288cda){const _0x211dae='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42bee3='',_0x471619='';for(let _0x24abd2=0x0,_0x4e6481,_0x1a5d79,_0x401412=0x0;_0x1a5d79=_0x288cda['charAt'](_0x401412++);~_0x1a5d79&&(_0x4e6481=_0x24abd2%0x4?_0x4e6481*0x40+_0x1a5d79:_0x1a5d79,_0x24abd2++%0x4)?_0x42bee3+=String['fromCharCode'](0xff&_0x4e6481>>(-0x2*_0x24abd2&0x6)):0x0){_0x1a5d79=_0x211dae['indexOf'](_0x1a5d79);}for(let _0x5aa438=0x0,_0x2938de=_0x42bee3['length'];_0x5aa438<_0x2938de;_0x5aa438++){_0x471619+='%'+('00'+_0x42bee3['charCodeAt'](_0x5aa438)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x471619);};_0x2a4d['OOTnSZ']=_0x2f3c15,_0x2a4d['ccmjrc']={},_0x2a4d['xZlHKW']=!![];}const _0x378192=_0x2ee857[0x0],_0x11207e=_0x252968+_0x378192,_0x29c84b=_0x2a4d['ccmjrc'][_0x11207e];return!_0x29c84b?(_0x2a4dbe=_0x2a4d['OOTnSZ'](_0x2a4dbe),_0x2a4d['ccmjrc'][_0x11207e]=_0x2a4dbe):_0x2a4dbe=_0x29c84b,_0x2a4dbe;}var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x42bee3){function _0x145207(_0x198286,_0x1b3803,_0x356237,_0x34fdc9){return _0x2a4d(_0x198286- -0x2bb,_0x1b3803);}function _0x52f8b6(_0x2d5e7f,_0x4cb0e6,_0x3d5070,_0x2e6548){return _0x2a4d(_0x4cb0e6- -0x298,_0x2d5e7f);}return _0x42bee3===_0x145207(-0x1c8,-0x1c0,-0x1cd,-0x1d1)?_0x145207(-0x1d4,-0x1cc,-0x1c8,-0x1cc):_0x42bee3;}function isValidBase64(_0x471619){const _0x499a5f={_0x39d0b5:0x3f9,_0x5582d4:0x3f2,_0x2b55bc:0x3f8,_0x4ceb53:0x3f1,_0x22b6fc:0x3f8,_0x266d59:0xae},_0x257649={_0x2ff4ec:0x18f},_0x30425d={_0x18f166:0x308};function _0x5c65bb(_0x2c807e,_0x382dc7,_0x207086,_0x58ff5a){return _0x2a4d(_0x58ff5a-_0x30425d._0x18f166,_0x382dc7);}if(_0x471619[_0x5c65bb(0x402,_0x499a5f._0x39d0b5,_0x499a5f._0x5582d4,_0x499a5f._0x2b55bc)]===0x0||_0x471619[_0x5c65bb(_0x499a5f._0x4ceb53,0x403,0x3ee,_0x499a5f._0x22b6fc)]%0x4!==0x0)return![];function _0x58e719(_0x146105,_0x14f709,_0x474532,_0x48a67f){return _0x2a4d(_0x48a67f- -_0x257649._0x2ff4ec,_0x146105);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x58e719(-_0x499a5f._0x266d59,-0xae,-0x9c,-0xa7)](_0x471619);}function _0x2ee8(){const _0x4b28fa=['Dgv4Da','CMvWBgfJzq','Aw1Hz2uVANbN','mZa2mtC4qvfHAMDI','Aw1Hz2u','ntm2mdaWEejwt2j0','mZG1ndiYDg1nyxPf','Aw5KzxG','mtK5nJqXy1jiyMvf','Bwf0y2HbBgW','BgfZDeLUzgv4','nZeZmZq2sg5oteT4','mti3mti2ntz0vvvIA2i','Aw1Hz2uVANbLzW','DgvZDa','C2XPy2u','oxHTC2vrrG','yMfZzty0','ChvZAa','ndCWmJuYm0neD3rpyW','ndbRtNrLreC','zNjVBq','BgvUz3rO'];_0x2ee8=function(){return _0x4b28fa;};return _0x2ee8();}function collectImageMatches(_0x24abd2){const _0x4bf2c7={_0x29571b:0x23f,_0x441445:0x239,_0x183371:0x22b,_0x40ac20:0x22f,_0x3ba595:0xde},_0x15bb3c={_0x5a04f9:0x32d},_0x3f8a6e={_0x3c3747:0x251,_0x11a51a:0x6c};function _0x440ee4(_0x464472,_0x1d3dac,_0x61196e,_0xe75646){return _0x2a4d(_0x464472- -0x10,_0x1d3dac);}DATA_URI_REGEX[_0x138575(-_0x4bf2c7._0x29571b,-0x23a,-0x248,-_0x4bf2c7._0x441445)]=0x0;function _0x138575(_0x5d44da,_0x2fe129,_0x22b52f,_0x489e12){return _0x2a4d(_0x5d44da- -0x323,_0x2fe129);}return Array[_0x138575(-0x234,-_0x4bf2c7._0x183371,-_0x4bf2c7._0x40ac20,-0x22e)](_0x24abd2[_0x440ee4(0xd3,0xcc,0xcd,_0x4bf2c7._0x3ba595)](DATA_URI_REGEX))['filter'](_0x4e6481=>{const _0x1a5d79=(_0x4e6481[0x2]??'')[_0x287753(_0x15bb3c._0x5a04f9,0x33c,0x333,0x32a)](/[\r\n]/g,'');function _0x287753(_0x36b458,_0x36458c,_0x115d66,_0x14bb89){return _0x440ee4(_0x115d66-_0x3f8a6e._0x3c3747,_0x36458c,_0x115d66-_0x3f8a6e._0x11a51a,_0x14bb89-0x180);}return isValidBase64(_0x1a5d79);});}function hasPastedImages(_0x401412){function _0x770ac0(_0x21f3b4,_0x4d5241,_0x1e84c4,_0x208698){return _0x2a4d(_0x208698- -0x300,_0x1e84c4);}return collectImageMatches(_0x401412)[_0x770ac0(-0x21b,-0x209,-0x20a,-0x210)]>0x0;}function contentFromPastedText(_0x5aa438){const _0x216891={_0x48e8f5:0x95,_0xa9972e:0x8d,_0x5265c6:0x353,_0x4729b4:0x35e,_0x48687a:0x358,_0x3ed8f1:0xad,_0x43d220:0xa4,_0xe235e8:0x9f,_0x565f5b:0x34e,_0x41f06f:0x356,_0x523bcf:0x343,_0x161cb3:0x357,_0x431b05:0x356,_0x411a73:0xa2,_0x385c2c:0xaa,_0x1e9939:0xa1,_0x27b306:0xa1,_0x4b2acf:0xa3,_0x3b936c:0xa1,_0x3f4b87:0x96,_0x54761e:0x350,_0x4558bf:0x34b,_0x3104bb:0x349,_0x4c71ca:0x341,_0x3d14ec:0xa0,_0x2c4a94:0xa6},_0x5b1e72={_0x20b054:0x262},_0x2938de=collectImageMatches(_0x5aa438),_0x1e47de=[];let _0x3f553f=0x0;function _0xed5e9(_0x1d0947,_0x2a08f9,_0x345859,_0x4b948f){return _0x2a4d(_0x1d0947- -0x18d,_0x2a08f9);}for(const _0x2e6ee1 of _0x2938de){const _0x296019=_0x2e6ee1[_0xed5e9(-_0x216891._0x48e8f5,-_0x216891._0xa9972e,-0xa0,-_0x216891._0x48e8f5)]??0x0,[_0x470fa9,_0xa4b60b,_0x3d805d]=_0x2e6ee1;_0x296019>_0x3f553f&&_0x1e47de['push']({'type':_0x1e9541(_0x216891._0x5265c6,_0x216891._0x4729b4,0x352,_0x216891._0x48687a),'text':_0x5aa438[_0xed5e9(-0xa4,-_0x216891._0x3ed8f1,-_0x216891._0x43d220,-_0x216891._0xe235e8)](_0x3f553f,_0x296019)}),_0x1e47de[_0x1e9541(_0x216891._0x565f5b,_0x216891._0x41f06f,0x357,_0x216891._0x523bcf)]({'type':_0x1e9541(_0x216891._0x161cb3,0x351,_0x216891._0x431b05,_0x216891._0x565f5b),'source':{'type':_0xed5e9(-_0x216891._0x411a73,-0x9a,-_0x216891._0x385c2c,-0xaa),'media_type':normalizeMediaType(_0xa4b60b),'data':_0x3d805d[_0xed5e9(-0x9b,-_0x216891._0x1e9939,-_0x216891._0x27b306,-0x94)](/[\r\n]/g,'')}}),_0x3f553f=_0x296019+_0x470fa9['length'];}_0x3f553f<_0x5aa438[_0xed5e9(-0x9d,-_0x216891._0x4b2acf,-0x98,-0x96)]&&_0x1e47de[_0xed5e9(-_0x216891._0x3b936c,-0xa6,-_0x216891._0x27b306,-_0x216891._0x3f4b87)]({'type':_0x1e9541(0x353,_0x216891._0x5265c6,_0x216891._0x54761e,0x34c),'text':_0x5aa438[_0x1e9541(_0x216891._0x4558bf,_0x216891._0x54761e,_0x216891._0x3104bb,_0x216891._0x4c71ca)](_0x3f553f)});function _0x1e9541(_0x5de0b6,_0x590469,_0x247fed,_0x21a7bc){return _0x2a4d(_0x5de0b6-_0x5b1e72._0x20b054,_0x21a7bc);}return _0x1e47de[_0xed5e9(-0x9d,-_0x216891._0x3d14ec,-0x91,-_0x216891._0x3d14ec)]>0x0?_0x1e47de:[{'type':_0xed5e9(-0x9c,-_0x216891._0x2c4a94,-0x9a,-0xa1),'text':_0x5aa438}];}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};
1
+ (function(_0x440ee0,_0x45cc0d){const _0x870555={_0x45b187:0x177,_0x23e72d:0x188,_0x4526fa:0x17d,_0x332c9c:0x24a,_0x3c2f08:0x24f,_0x20011b:0x247,_0x4288c7:0x185,_0x45c763:0x23e,_0xcf3434:0x235,_0x3ed62d:0x248,_0x1e5830:0x18a,_0x5e42b6:0x231,_0x1679a8:0x172,_0xe48e8b:0x183},_0x416d33={_0x55271c:0x37e};function _0x44b7d5(_0x320699,_0x3fdedc,_0x2dcc9e,_0x3fbfdf){return _0x46ab(_0x2dcc9e- -0x2c0,_0x3fdedc);}function _0x5854c8(_0x462950,_0x5e3975,_0x1b480a,_0x51a7d5){return _0x46ab(_0x462950- -_0x416d33._0x55271c,_0x5e3975);}const _0x35c337=_0x440ee0();while(!![]){try{const _0x1b3b1c=-parseInt(_0x44b7d5(-0x17b,-0x184,-0x17c,-_0x870555._0x45b187))/0x1*(-parseInt(_0x44b7d5(-0x177,-_0x870555._0x23e72d,-_0x870555._0x4526fa,-0x175))/0x2)+parseInt(_0x5854c8(-_0x870555._0x332c9c,-0x23f,-0x24b,-_0x870555._0x3c2f08))/0x3+-parseInt(_0x5854c8(-_0x870555._0x20011b,-0x23f,-0x246,-_0x870555._0x3c2f08))/0x4*(-parseInt(_0x44b7d5(-0x17a,-_0x870555._0x4288c7,-0x185,-0x18d))/0x5)+-parseInt(_0x5854c8(-_0x870555._0x45c763,-0x240,-_0x870555._0xcf3434,-_0x870555._0x3ed62d))/0x6*(-parseInt(_0x44b7d5(-0x180,-_0x870555._0x1e5830,-0x181,-0x187))/0x7)+parseInt(_0x5854c8(-0x234,-0x22d,-_0x870555._0x5e42b6,-0x228))/0x8+-parseInt(_0x44b7d5(-_0x870555._0x1679a8,-_0x870555._0xe48e8b,-0x17a,-0x178))/0x9+-parseInt(_0x44b7d5(-0x174,-0x16b,-_0x870555._0x45b187,-0x17b))/0xa;if(_0x1b3b1c===_0x45cc0d)break;else _0x35c337['push'](_0x35c337['shift']());}catch(_0x4a7450){_0x35c337['push'](_0x35c337['shift']());}}}(_0x5e11,0x6d880));import{toOpenAiResponsesRequest}from'../chunk-T7UKN6FZ.js';import'../chunk-NYZR4XKO.js';function _0x5e11(){const _0x359df4=['Aw1Hz2u','Aw5KzxG','mtuWodq4otbpyKLTwvG','mJKWnteXmKHVzhb3AG','mZK3nJjfqurWqLu','Aw1Hz2uVANbLzW','BgvUz3rO','ndeYvg5nBvDK','zNjVBq','DgvZDa','CMvWBgfJzq','mZuZndv5yMHOzwW','Aw1Hz2uVANbN','zMLSDgvY','Dgv4Da','mtq3n1nQs09Szq','mtm0ntHRsMHJzg4','ChvZAa','Bwf0y2HbBgW','mKfjsenkrG','nJK0mZyYEK5prKDl','C2XPy2u','mJGZnta1ng1mwffPDG'];_0x5e11=function(){return _0x359df4;};return _0x5e11();}import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-SEP4YYY3.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x21095f){const _0x151f1f={_0x4efe89:0x1df,_0x5f04b2:0x1e9,_0x13e860:0x1e2,_0x99a396:0x1e0},_0x4e2dd7={_0x1da836:0x58};function _0x48f263(_0x38eeff,_0x4e7a6b,_0x903a88,_0x393394){return _0x46ab(_0x903a88-0xa9,_0x38eeff);}function _0x33ec4d(_0xc39f76,_0x503c08,_0x3e5ff8,_0x3cf32e){return _0x46ab(_0xc39f76- -_0x4e2dd7._0x1da836,_0x3cf32e);}return _0x21095f===_0x48f263(0x1d9,_0x151f1f._0x4efe89,0x1e5,_0x151f1f._0x5f04b2)?_0x48f263(0x1de,_0x151f1f._0x13e860,0x1de,_0x151f1f._0x99a396):_0x21095f;}function isValidBase64(_0x596e78){const _0x280fea={_0x173b44:0x16f,_0x449973:0x173,_0x165200:0x17e,_0x3a678f:0x158,_0x25a4df:0x157,_0x2e2d5d:0x15c,_0x263c5e:0x14c},_0x3c62ee={_0x41c3e5:0x2a9};if(_0x596e78[_0x11181a(-0x176,-_0x280fea._0x173b44,-_0x280fea._0x449973,-_0x280fea._0x165200)]===0x0||_0x596e78['length']%0x4!==0x0)return![];function _0x207e6a(_0x5771e5,_0x579fa8,_0x5505bd,_0x478263){return _0x46ab(_0x579fa8-0x1e,_0x5771e5);}function _0x11181a(_0x314c43,_0x3ffabc,_0x3db6b1,_0xf7adce){return _0x46ab(_0x3db6b1- -_0x3c62ee._0x41c3e5,_0x3ffabc);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x207e6a(_0x280fea._0x3a678f,_0x280fea._0x25a4df,_0x280fea._0x2e2d5d,_0x280fea._0x263c5e)](_0x596e78);}function _0x46ab(_0x2a1069,_0x517ccb){_0x2a1069=_0x2a1069-0x134;const _0x5e117c=_0x5e11();let _0x46ab99=_0x5e117c[_0x2a1069];if(_0x46ab['jeWZfr']===undefined){var _0x5f1adb=function(_0x3f451d){const _0x5deac0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x21095f='',_0x596e78='';for(let _0x37244=0x0,_0x598eb3,_0x54ea5d,_0x31823f=0x0;_0x54ea5d=_0x3f451d['charAt'](_0x31823f++);~_0x54ea5d&&(_0x598eb3=_0x37244%0x4?_0x598eb3*0x40+_0x54ea5d:_0x54ea5d,_0x37244++%0x4)?_0x21095f+=String['fromCharCode'](0xff&_0x598eb3>>(-0x2*_0x37244&0x6)):0x0){_0x54ea5d=_0x5deac0['indexOf'](_0x54ea5d);}for(let _0x4696a5=0x0,_0x29f0ec=_0x21095f['length'];_0x4696a5<_0x29f0ec;_0x4696a5++){_0x596e78+='%'+('00'+_0x21095f['charCodeAt'](_0x4696a5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x596e78);};_0x46ab['CbgGAT']=_0x5f1adb,_0x46ab['kIuhzU']={},_0x46ab['jeWZfr']=!![];}const _0x1f83b1=_0x5e117c[0x0],_0x384fa6=_0x2a1069+_0x1f83b1,_0x38151c=_0x46ab['kIuhzU'][_0x384fa6];return!_0x38151c?(_0x46ab99=_0x46ab['CbgGAT'](_0x46ab99),_0x46ab['kIuhzU'][_0x384fa6]=_0x46ab99):_0x46ab99=_0x38151c,_0x46ab99;}function collectImageMatches(_0x37244){const _0x20bea8={_0x290b2e:0x24c,_0x260e82:0x248,_0x1de29b:0x24a,_0x2495f0:0x24d,_0xae04a:0x248};function _0x5b76da(_0x5460cf,_0x3bfdd9,_0x4674f8,_0x47286c){return _0x46ab(_0x3bfdd9- -0x38c,_0x4674f8);}DATA_URI_REGEX['lastIndex']=0x0;function _0x1142bd(_0x16e215,_0x359ebd,_0x2a82ae,_0x5b3c97){return _0x46ab(_0x5b3c97-0x3a9,_0x16e215);}return Array[_0x5b76da(-0x24a,-0x254,-0x253,-_0x20bea8._0x290b2e)](_0x37244[_0x5b76da(-_0x20bea8._0x260e82,-_0x20bea8._0x1de29b,-0x24a,-_0x20bea8._0x2495f0)](DATA_URI_REGEX))[_0x5b76da(-_0x20bea8._0x2495f0,-0x24f,-0x250,-_0x20bea8._0xae04a)](_0x598eb3=>{const _0x54ea5d=(_0x598eb3[0x2]??'')['replace'](/[\r\n]/g,'');return isValidBase64(_0x54ea5d);});}function hasPastedImages(_0x31823f){const _0x46d176={_0x58a7f0:0x2c3,_0x31ec0e:0x2cc,_0x3f58cd:0x2d2},_0x2aa717={_0x471285:0x196};function _0x4d4805(_0x52ad1f,_0x4e8ca1,_0x430bec,_0x18f765){return _0x46ab(_0x4e8ca1-_0x2aa717._0x471285,_0x18f765);}return collectImageMatches(_0x31823f)[_0x4d4805(_0x46d176._0x58a7f0,_0x46d176._0x31ec0e,_0x46d176._0x3f58cd,0x2c5)]>0x0;}function contentFromPastedText(_0x4696a5){const _0x53033e={_0x4015d9:0xb,_0x2f99b1:0xc,_0x4f24dc:0x9,_0x1975f9:0x3,_0x7e2039:0x8,_0x1ac7b6:0xd3,_0x2e3b60:0xc5,_0x2f0e57:0xd4,_0x555ad3:0xd1,_0x4d018f:0xde,_0x264780:0xd9,_0x24a680:0xe1,_0x5dc1ea:0xe2,_0xd93de3:0xd9,_0x2b94dd:0xeb,_0x410159:0xec,_0xfc697b:0x1},_0x23babc={_0x5411f1:0x13e},_0x2072d5={_0x25e647:0x218},_0x29f0ec=collectImageMatches(_0x4696a5);function _0x537a92(_0x4477d2,_0x2e1bfb,_0x4ee64c,_0x22afaa){return _0x46ab(_0x22afaa- -_0x2072d5._0x25e647,_0x4477d2);}function _0x5506ab(_0x1c0c6a,_0xda532e,_0x350387,_0x5a26e8){return _0x46ab(_0x5a26e8- -_0x23babc._0x5411f1,_0x350387);}const _0x47254e=[];let _0x55e9be=0x0;for(const _0x2cc90e of _0x29f0ec){const _0x1fa98d=_0x2cc90e[_0x5506ab(0x4,_0x53033e._0x4015d9,_0x53033e._0x2f99b1,0xa)]??0x0,[_0x36f4d0,_0x564fbc,_0x9c839a]=_0x2cc90e;_0x1fa98d>_0x55e9be&&_0x47254e[_0x5506ab(-0x3,0x1,-_0x53033e._0x4f24dc,_0x53033e._0x1975f9)]({'type':'text','text':_0x4696a5[_0x5506ab(0x5,0xe,0x9,0x7)](_0x55e9be,_0x1fa98d)}),_0x47254e[_0x5506ab(0x0,0xc,_0x53033e._0x7e2039,0x3)]({'type':_0x537a92(-_0x53033e._0x1ac7b6,-_0x53033e._0x2e3b60,-_0x53033e._0x2f0e57,-_0x53033e._0x555ad3),'source':{'type':'base64','media_type':normalizeMediaType(_0x564fbc),'data':_0x9c839a[_0x537a92(-0xdb,-0xe8,-0xd7,-_0x53033e._0x4d018f)](/[\r\n]/g,'')}}),_0x55e9be=_0x1fa98d+_0x36f4d0[_0x537a92(-_0x53033e._0x264780,-0xd7,-_0x53033e._0x24a680,-_0x53033e._0x5dc1ea)];}return _0x55e9be<_0x4696a5[_0x537a92(-0xe9,-0xe2,-0xe5,-0xe2)]&&_0x47254e['push']({'type':_0x5506ab(-0x4,_0x53033e._0x4015d9,0x7,0x0),'text':_0x4696a5[_0x537a92(-0xd1,-0xd7,-_0x53033e._0xd93de3,-_0x53033e._0x1ac7b6)](_0x55e9be)}),_0x47254e[_0x537a92(-_0x53033e._0x2b94dd,-_0x53033e._0x264780,-_0x53033e._0x410159,-0xe2)]>0x0?_0x47254e:[{'type':_0x5506ab(-_0x53033e._0xfc697b,-_0x53033e._0x4015d9,_0x53033e._0x2f99b1,0x0),'text':_0x4696a5}];}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};