@nuvin/agent-core 0.1.0-rc.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuvin/agent-core",
3
- "version": "0.1.0-rc.9",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "description": "Core agent, model, format, and tool primitives for Nuvin",
6
6
  "license": "Apache-2.0",
@@ -52,7 +52,7 @@
52
52
  "tsup": "^8.5.1",
53
53
  "typescript": "^6.0.2",
54
54
  "vitest": "^4.1.2",
55
- "@nuvin/config": "0.2.0-rc.4"
55
+ "@nuvin/config": "0.2.0"
56
56
  },
57
57
  "dependencies": {
58
58
  "@anthropic-ai/sdk": "^0.82.0",
@@ -1 +0,0 @@
1
- (function(_0x120c21,_0xd8e9cd){const _0x2f84cb={_0x1f5c17:0x3d0,_0x24e950:0x3eb,_0x8d5976:0x382,_0x327990:0x426,_0x4d1f92:0x3d0,_0x562e2e:0x443,_0x29900a:0x227,_0x41bec0:0x1fa,_0x24d541:0x409,_0x24eb66:0x389,_0x5d65a8:0x26b,_0x3986ea:0x3b9,_0x7bd40c:0x3cf,_0x2400ba:0x39b,_0x1e8b46:0x3d2,_0x2066d6:0x169,_0x1205a0:0x1b0},_0x491af5={_0x14ceb4:0x281},_0x1c0447={_0x210b9b:0x320},_0x493837=_0x120c21();function _0x1f3af3(_0x4345d3,_0x1bd1c0,_0x431f35,_0x54cf94){return _0x55fb(_0x4345d3-_0x1c0447._0x210b9b,_0x1bd1c0);}function _0xa02ea1(_0x66114a,_0x137326,_0x3a1fde,_0x314baf){return _0x55fb(_0x3a1fde- -_0x491af5._0x14ceb4,_0x314baf);}while(!![]){try{const _0xfe14a2=parseInt(_0x1f3af3(_0x2f84cb._0x1f5c17,_0x2f84cb._0x24e950,0x3a4,_0x2f84cb._0x8d5976))/0x1+parseInt(_0x1f3af3(_0x2f84cb._0x327990,_0x2f84cb._0x4d1f92,0x44f,_0x2f84cb._0x562e2e))/0x2+-parseInt(_0xa02ea1(-0x1f3,-_0x2f84cb._0x29900a,-_0x2f84cb._0x41bec0,-0x1ff))/0x3+-parseInt(_0x1f3af3(0x429,_0x2f84cb._0x24d541,0x459,0x41f))/0x4+parseInt(_0x1f3af3(_0x2f84cb._0x24eb66,0x34a,0x36a,0x3ce))/0x5+parseInt(_0xa02ea1(-0x201,-0x1d1,-0x219,-_0x2f84cb._0x5d65a8))/0x6*(parseInt(_0x1f3af3(0x405,_0x2f84cb._0x3986ea,_0x2f84cb._0x7bd40c,0x436))/0x7)+parseInt(_0x1f3af3(_0x2f84cb._0x2400ba,0x39c,0x398,_0x2f84cb._0x1e8b46))/0x8*(parseInt(_0xa02ea1(-0x179,-_0x2f84cb._0x2066d6,-_0x2f84cb._0x1205a0,-0x206))/0x9);if(_0xfe14a2===_0xd8e9cd)break;else _0x493837['push'](_0x493837['shift']());}catch(_0x77b58a){_0x493837['push'](_0x493837['shift']());}}}(_0x12e2,0xc6d5b));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage,synthesizeMissingToolResults}from'./chunk-YWQXXHHU.js';import{TurnFailedError}from'./chunk-FFIZ6TKW.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x13fa76){const _0x2f8205={_0x21789f:0x1e4,_0x285236:0x1ec,_0x3e4282:0x1d1,_0x2bf627:0x5c},_0x36a8df={_0x1abfb8:0x21};function _0x172e44(_0x5eb8aa,_0x51b440,_0x382f67,_0x23ab4d){return _0x55fb(_0x382f67- -0x27e,_0x23ab4d);}function _0x1d3092(_0x119366,_0x2b15d7,_0x2988b3,_0x2c9385){return _0x55fb(_0x2988b3- -_0x36a8df._0x1abfb8,_0x119366);}return typeof _0x13fa76===_0x172e44(-_0x2f8205._0x21789f,-_0x2f8205._0x285236,-_0x2f8205._0x3e4282,-0x1f6)&&_0x13fa76!==null&&!Array[_0x1d3092(_0x2f8205._0x2bf627,0x55,0x8a,0x61)](_0x13fa76);}function isToolOutputEnvelope(_0x9d1d81){const _0x2671b1={_0x1433f6:0xd3,_0x7323b0:0x12b,_0x2e9835:0x1cc,_0x26f9d6:0x1f7,_0x597337:0x209,_0xa3d41c:0x18c,_0x258539:0x15d,_0x17df99:0x165},_0x43037a={_0xaeb78c:0x17e};if(typeof _0x9d1d81!=='object'||_0x9d1d81===null||Array[_0x1a756c(-0xa1,-_0x2671b1._0x1433f6,-_0x2671b1._0x7323b0,-0x82)](_0x9d1d81))return![];function _0x1a756c(_0x4a15b5,_0xbaa6d4,_0x4a1157,_0x1a955d){return _0x55fb(_0xbaa6d4- -_0x43037a._0xaeb78c,_0x4a1157);}function _0x140c0e(_0x31f085,_0x5700ed,_0x3752ed,_0x53333d){return _0x55fb(_0x31f085-0xc1,_0x5700ed);}if(typeof _0x9d1d81[_0x140c0e(_0x2671b1._0x2e9835,_0x2671b1._0x26f9d6,0x21c,_0x2671b1._0x597337)]!==_0x140c0e(_0x2671b1._0xa3d41c,_0x2671b1._0x258539,_0x2671b1._0x17df99,0x155))return![];const _0x558bd9=_0x9d1d81[_0x1a756c(-0x67,-0xa5,-0x5d,-0x6a)];return _0x558bd9===void 0x0||isJsonObject(_0x558bd9);}function validateAgainstSchema(_0x5aee70,_0x1a5bbe,_0x4c4b8b){const _0x111eb4={_0x404582:0xfd,_0x28c3a7:0xb6,_0x36be48:0x103,_0x4e6739:0x120,_0x516b89:0xef,_0x52edee:0xa8,_0x40d8f7:0xa4,_0x400d79:0x5c,_0x148be3:0xe7,_0x5db4fc:0x206,_0x77a716:0x20d,_0x15c113:0x1c3,_0x4966a0:0x10a,_0x56fcd0:0x159,_0x48359b:0x141,_0x164a68:0xd5,_0x23fb9c:0x9d,_0x4770ba:0x10c,_0x51f080:0x12b,_0x70a8bf:0x12c,_0x118426:0x1e0,_0x265dad:0x1f4,_0x150800:0x236,_0x2d9865:0x1eb,_0x35fd08:0xe8,_0x460ee0:0xd4,_0x19da2d:0xa5,_0x458ae3:0x97,_0x473545:0xa7,_0x2d3b5a:0xc2,_0x482c5d:0x163,_0xc95fef:0x145,_0x51f4d7:0x12b,_0x1c43b9:0xb5,_0x318edc:0x8b,_0x264e1b:0x7b,_0x25da62:0xf7,_0x151a0e:0xf7,_0x492d91:0xbb,_0x1e00f3:0x21c,_0x3c40aa:0x157},_0xdc1a6={_0x587cb8:0x1e,_0x544a6a:0x34,_0x35524a:0x1e},_0x1f7b8e={_0x2e866b:0x198},_0x4ecca9={_0x534a5c:0x32};function _0x87fc9(_0x264cc1,_0x3244ef,_0x91869a,_0x1c2b86){return _0x55fb(_0x264cc1-_0x4ecca9._0x534a5c,_0x1c2b86);}function _0x33c01e(_0x2ab092,_0x1d4d20,_0x599be6,_0x264e11){return _0x55fb(_0x2ab092- -0x2b8,_0x1d4d20);}switch(_0x4c4b8b['type']){case _0x87fc9(_0x111eb4._0x404582,_0x111eb4._0x28c3a7,_0x111eb4._0x36be48,_0x111eb4._0x4e6739):if(typeof _0x1a5bbe!==_0x87fc9(_0x111eb4._0x404582,_0x111eb4._0x516b89,0xb4,0xeb))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5aee70+_0x87fc9(_0x111eb4._0x52edee,_0x111eb4._0x40d8f7,_0x111eb4._0x400d79,_0x111eb4._0x148be3));return;case'number':if(typeof _0x1a5bbe!==_0x33c01e(-_0x111eb4._0x5db4fc,-_0x111eb4._0x77a716,-0x22e,-_0x111eb4._0x15c113))throw new Error(_0x87fc9(_0x111eb4._0x4966a0,_0x111eb4._0x56fcd0,_0x111eb4._0x48359b,_0x111eb4._0x164a68)+_0x5aee70+_0x87fc9(_0x111eb4._0x23fb9c,0xc2,0xce,0xe7));return;case'boolean':if(typeof _0x1a5bbe!==_0x87fc9(_0x111eb4._0x4770ba,_0x111eb4._0x51f080,0xed,_0x111eb4._0x70a8bf))throw new Error(_0x33c01e(-_0x111eb4._0x118426,-0x19f,-_0x111eb4._0x265dad,-0x1b0)+_0x5aee70+':\x20expected\x20boolean');return;case _0x33c01e(-_0x111eb4._0x150800,-0x23a,-_0x111eb4._0x2d9865,-0x258):if(!Array[_0x87fc9(0xdd,_0x111eb4._0x35fd08,_0x111eb4._0x460ee0,0xc8)](_0x1a5bbe))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5aee70+_0x87fc9(_0x111eb4._0x19da2d,_0x111eb4._0x458ae3,_0x111eb4._0x473545,_0x111eb4._0x2d3b5a));_0x1a5bbe['forEach']((_0x5b8567,_0x3d71a4)=>{function _0x35136b(_0x4ad13e,_0x398872,_0x10050b,_0x2d4756){return _0x33c01e(_0x398872-0x1c3,_0x2d4756,_0x10050b-_0x1f7b8e._0x2e866b,_0x2d4756-0x108);}validateAgainstSchema(_0x5aee70+'['+_0x3d71a4+']',_0x5b8567,_0x4c4b8b[_0x35136b(_0xdc1a6._0x587cb8,-_0xdc1a6._0x544a6a,0x12,_0xdc1a6._0x35524a)]);});return;case'object':if(!isJsonObject(_0x1a5bbe))throw new Error(_0x87fc9(0x10a,_0x111eb4._0x482c5d,0xc1,_0x111eb4._0xc95fef)+_0x5aee70+_0x87fc9(0x137,0xf3,0x180,_0x111eb4._0x51f4d7));for(const _0x4a9047 of _0x4c4b8b[_0x87fc9(_0x111eb4._0x1c43b9,0x78,_0x111eb4._0x318edc,_0x111eb4._0x264e1b)]??[]){if(!(_0x4a9047 in _0x1a5bbe))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x5aee70+_0x87fc9(_0x111eb4._0x25da62,_0x111eb4._0x151a0e,_0x111eb4._0x492d91,0xb9)+_0x4a9047+'\x22');}for(const [_0x1b305b,_0x56a943]of Object[_0x33c01e(-0x213,-0x244,-0x1dc,-_0x111eb4._0x1e00f3)](_0x4c4b8b[_0x87fc9(0x12a,_0x111eb4._0x3c40aa,0x114,0x12a)])){_0x1b305b in _0x1a5bbe&&validateAgainstSchema(_0x5aee70+'.'+_0x1b305b,_0x1a5bbe[_0x1b305b],_0x56a943);}}}function normalizeToolOutputValue(_0x441c8d){const _0x16b76a={_0x8c3e31:0x1cd,_0x1d1ac8:0x1aa,_0x25feaa:0x1cd,_0x38e7ad:0x1a3,_0x1ff016:0x1f5,_0x27b81d:0x1a0,_0x8aec28:0x276,_0x2704a3:0x29b,_0xfbc1e:0x28c,_0x1c11c7:0x2a1,_0x56d75a:0x2e1,_0x2fc902:0x2a0,_0x119ebc:0x2ac,_0x3cfcbc:0x25b,_0x50bac9:0x17f};if(isToolOutputEnvelope(_0x441c8d))return{'output':_0x441c8d[_0x5f0e6e(_0x16b76a._0x8c3e31,0x1c9,_0x16b76a._0x1d1ac8,0x1b1)],'structured':_0x441c8d['structured']??{'value':_0x441c8d[_0x5f0e6e(_0x16b76a._0x25feaa,0x1e2,0x1a5,0x186)]},..._0x441c8d[_0x5f0e6e(_0x16b76a._0x38e7ad,_0x16b76a._0x1ff016,0x196,_0x16b76a._0x27b81d)]!==void 0x0?{'content':_0x441c8d[_0x4e4bd8(-_0x16b76a._0x8aec28,-_0x16b76a._0x2704a3,-0x280,-0x26d)]}:{}};function _0x5f0e6e(_0x50e71b,_0x9629b0,_0x53d31e,_0x5e0553){return _0x55fb(_0x50e71b-0xc2,_0x5e0553);}function _0x4e4bd8(_0x1e0099,_0x820460,_0x5d95e6,_0x559450){return _0x55fb(_0x1e0099- -0x357,_0x5d95e6);}if(typeof _0x441c8d===_0x4e4bd8(-_0x16b76a._0xfbc1e,-_0x16b76a._0x1c11c7,-_0x16b76a._0x56d75a,-_0x16b76a._0x2fc902))return{'output':_0x441c8d,'structured':{'value':_0x441c8d}};if(typeof _0x441c8d===_0x4e4bd8(-0x2aa,-0x2d3,-0x2d3,-0x28d)&&_0x441c8d!==null&&!Array[_0x4e4bd8(-_0x16b76a._0x119ebc,-0x2f4,-0x2d8,-_0x16b76a._0x3cfcbc)](_0x441c8d))return{'output':JSON[_0x4e4bd8(-0x29c,-0x262,-0x285,-0x2a5)](_0x441c8d,null,0x2),'structured':_0x441c8d};return{'output':JSON[_0x5f0e6e(0x17d,0x12c,_0x16b76a._0x50bac9,0x138)](_0x441c8d,null,0x2),'structured':{'value':_0x441c8d}};}function createToolOutput(_0x49b11c,_0x48178d={'value':_0x49b11c},_0x1a715c){return{'output':_0x49b11c,'structured':_0x48178d,..._0x1a715c!==void 0x0?{'content':_0x1a715c}:{}};}var ToolExecutionError=class extends Error{[_0x26395f(-0x97,-0xa3,-0x4f,-0x4e)];constructor(_0x5e7e35,_0x358b0d={}){const _0x32d789={_0x28a6a9:0x11a,_0x401db6:0xd6,_0x5f00dc:0xe7,_0x3489fb:0x217,_0x5092c6:0x246},_0x1b9154={_0x1fa191:0x56},_0x179fd4={_0x35c61d:0x75,_0x2e2339:0x1c4,_0x34b963:0x15e};function _0xce6c9(_0x4b67f3,_0x12bff1,_0x530257,_0x124a1e){return _0x26395f(_0x4b67f3-_0x179fd4._0x35c61d,_0x12bff1- -_0x179fd4._0x2e2339,_0x530257,_0x124a1e-_0x179fd4._0x34b963);}super(_0x5e7e35);function _0x26c6de(_0xc9524b,_0x5286ba,_0x889736,_0x17b744){return _0x26395f(_0xc9524b-0x184,_0x17b744- -0x5b,_0xc9524b,_0x17b744-_0x1b9154._0x1fa191);}this[_0x26c6de(-0xe1,-_0x32d789._0x28a6a9,-_0x32d789._0x401db6,-_0x32d789._0x5f00dc)]=_0xce6c9(-_0x32d789._0x3489fb,-_0x32d789._0x5092c6,-0x24a,-0x242),this['structured']=_0x358b0d;}};function _0x45d766(_0x51d755,_0x34d503,_0x57c79d,_0x3d650a){return _0x55fb(_0x57c79d-0x2d4,_0x3d650a);}function defineTool(_0x3772e1){return _0x3772e1;}var ToolRegistry=class{[_0x26395f(-0xc0,-0xc8,-0xf2,-0xbc)]=new Map();constructor(_0xa05721=[]){const _0x259f62={_0x3f51a6:0x39c,_0xe079c0:0x1ed};function _0x1b615b(_0x28c836,_0x3ae6ae,_0x24a75a,_0x5de8d1){return _0x26395f(_0x28c836-0x81,_0x28c836-_0x259f62._0x3f51a6,_0x3ae6ae,_0x5de8d1-_0x259f62._0xe079c0);}for(const _0xd2f8d5 of _0xa05721){this[_0x1b615b(0x2de,0x2e9,0x330,0x2e8)](_0xd2f8d5);}}[_0x26395f(-0x83,-0xbe,-0xf9,-0x10b)](_0x362f6e){const _0x344c2f={_0x26b6e8:0x2b9,_0x2cd30b:0x293,_0x21d33f:0x2f2},_0x218c8d={_0x30b4e2:0xe5,_0x279620:0x14b,_0x177123:0x6d};function _0x24ca4d(_0x34fd6f,_0x3291d6,_0x580d4f,_0x3ce113){return _0x45d766(_0x34fd6f-_0x218c8d._0x30b4e2,_0x3291d6-_0x218c8d._0x279620,_0x34fd6f- -_0x218c8d._0x177123,_0x580d4f);}this['toolsByName'][_0x24ca4d(0x2e0,_0x344c2f._0x26b6e8,_0x344c2f._0x2cd30b,_0x344c2f._0x21d33f)](_0x362f6e['name'],_0x362f6e);}[_0x26395f(-0x10e,-0xe7,-0x13e,-0x135)](_0x2d1fc8){const _0x53ecb8={_0x177ec7:0x341,_0x2def8c:0x334,_0x2a8a08:0x316,_0x382223:0x331,_0x495eab:0x29f,_0x364d96:0x2f7},_0x3f6feb={_0x57cc67:0x3de},_0x5084e3={_0x246645:0xe2};function _0x49bd5d(_0x25253b,_0x5d51fc,_0x503e6e,_0x4c458a){return _0x26395f(_0x25253b-0x3a,_0x503e6e-0x4e,_0x4c458a,_0x4c458a-_0x5084e3._0x246645);}function _0x250b2c(_0x4e6778,_0x4e9ebe,_0x262bc6,_0x561a37){return _0x26395f(_0x4e6778-0x1b0,_0x262bc6-_0x3f6feb._0x57cc67,_0x561a37,_0x561a37-0x32);}return this[_0x250b2c(_0x53ecb8._0x177ec7,_0x53ecb8._0x2def8c,_0x53ecb8._0x2a8a08,0x35c)][_0x250b2c(_0x53ecb8._0x382223,_0x53ecb8._0x495eab,_0x53ecb8._0x364d96,0x33b)](_0x2d1fc8);}[_0x45d766(0x367,0x394,0x376,0x328)](){const _0x1d080e={_0x45cbf8:0x1f1,_0x42de3d:0x475,_0xb5a48e:0x48f,_0x10f018:0x452,_0x2c4406:0x4cd},_0x4e84de={_0x44845f:0x15e,_0x4b294a:0x4ea};function _0x5502a1(_0x34e215,_0x5ec310,_0x2ec517,_0x188320){return _0x26395f(_0x34e215-0x1eb,_0x34e215-0x2a7,_0x5ec310,_0x188320-0xba);}function _0x46e5db(_0x159843,_0x4e3c25,_0x186e2a,_0xcd14ab){return _0x26395f(_0x159843-_0x4e84de._0x44845f,_0x159843-_0x4e84de._0x4b294a,_0xcd14ab,_0xcd14ab-0xd9);}return[...this[_0x5502a1(0x1df,_0x1d080e._0x45cbf8,0x236,0x1a9)][_0x46e5db(_0x1d080e._0x42de3d,_0x1d080e._0xb5a48e,_0x1d080e._0x10f018,_0x1d080e._0x2c4406)]()];}[_0x45d766(0x389,0x2f9,0x343,0x357)](){const _0x19cc8f={_0x51521b:0x4bd,_0x4f81cd:0x43b};return this['list']()['map'](_0x37f239=>{function _0x556d0e(_0x55b08a,_0x427faf,_0x440d2a,_0x146622){return _0x55fb(_0x146622-0x388,_0x440d2a);}return{'name':_0x37f239['name'],'description':_0x37f239[_0x556d0e(0x482,_0x19cc8f._0x51521b,_0x19cc8f._0x4f81cd,0x494)],'input_schema':_0x37f239['inputSchema']};});}};function validateToolInput(_0x1ca69f,_0x12575c){const _0x244bd2={_0x6ff88f:0x166,_0x201caa:0x162,_0x42ef38:0x1a1,_0x17c7d8:0x18e},_0x4129b3={_0x56ad22:0x18a,_0x3cb0ec:0xf0};function _0x256a42(_0x5b47d1,_0x4886ac,_0x12bb46,_0x63331d){return _0x26395f(_0x5b47d1-_0x4129b3._0x56ad22,_0x4886ac- -_0x4129b3._0x3cb0ec,_0x12bb46,_0x63331d-0x11b);}return validateAgainstSchema(_0x256a42(-_0x244bd2._0x6ff88f,-_0x244bd2._0x201caa,-_0x244bd2._0x42ef38,-_0x244bd2._0x17c7d8),_0x1ca69f,_0x12575c),_0x1ca69f;}function deriveFinalToolOutput(_0xca5a9e){const _0x17593b={_0x27b213:0x387,_0x32a60d:0x3a2,_0xa3ebfb:0x361,_0x220866:0x3df,_0x208ce1:0x13d,_0x18a71e:0x2ec,_0x554828:0x2df,_0x90c9bc:0x2e0,_0x249ca6:0x322,_0x564e6e:0x315,_0x2512b3:0x2db,_0x4eba70:0x187},_0x2581ab={_0x4019e2:0x43},_0x1e0800={_0x5347c2:0xf6,_0x3cb116:0x424};if(_0xca5a9e['length']===0x0)return{'output':'','structured':{}};if(_0xca5a9e['length']===0x1)return{'output':_0xca5a9e[0x0][_0x2dbb64(_0x17593b._0x27b213,0x3b3,_0x17593b._0x32a60d,_0x17593b._0xa3ebfb)],'structured':_0xca5a9e[0x0]['structured'],..._0xca5a9e[0x0]['content']!==void 0x0?{'content':_0xca5a9e[0x0][_0x2dbb64(_0x17593b._0x220866,0x389,0x364,0x3a8)]}:{}};function _0x2dbb64(_0x12720d,_0x2c5c96,_0x2bda30,_0x5c22f0){return _0x26395f(_0x12720d-_0x1e0800._0x5347c2,_0x2c5c96-_0x1e0800._0x3cb116,_0x5c22f0,_0x5c22f0-0x1aa);}function _0x42051b(_0x52cb55,_0x54c3ab,_0x2368ec,_0x5a644b){return _0x26395f(_0x52cb55-_0x2581ab._0x4019e2,_0x52cb55-0x1e8,_0x5a644b,_0x5a644b-0x22);}const _0x5ee3ba=_0xca5a9e[_0x42051b(0x162,0x110,_0x17593b._0x208ce1,0x1b4)](_0x5a7106=>_0x5a7106[_0x42051b(0x14d,0xfb,0x197,0x115)]!==void 0x0);return{'output':_0xca5a9e['map'](_0x4d1cd3=>_0x4d1cd3[_0x42051b(0x177,0x136,0x1c1,0x19c)])[_0x2dbb64(_0x17593b._0x18a71e,0x331,_0x17593b._0x554828,_0x17593b._0x90c9bc)](''),'structured':{'chunks':_0xca5a9e[_0x2dbb64(_0x17593b._0x249ca6,_0x17593b._0x564e6e,0x2ef,_0x17593b._0x2512b3)](_0x12f37f=>_0x12f37f[_0x42051b(0x145,0xfd,0x103,0x10c)])},..._0x5ee3ba['length']===0x1?{'content':_0x5ee3ba[0x0][_0x42051b(0x14d,_0x17593b._0x4eba70,0x161,0x17f)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0x5989f7,_0x1f5995,_0x7f44ed,_0x5775ea=[]){const _0x7b2078={_0x47dfb8:0x212,_0x24ce9d:0x23a,_0xae28a1:0x287,_0x46a80d:0x1e3,_0x5f971d:0x251},_0x59c0e3={_0x1d2308:0x135,_0x152c3a:0x606},_0x1ddf59={_0x232769:0x1ae,_0x41b06e:0xca};function _0x26d1ff(_0x7f93f3,_0x2537ec,_0x58714f,_0x2b89a7){return _0x26395f(_0x7f93f3-0xd1,_0x2537ec- -_0x1ddf59._0x232769,_0x58714f,_0x2b89a7-_0x1ddf59._0x41b06e);}function _0x3264f2(_0xec1092,_0x50089d,_0x214e5e,_0x4f758b){return _0x45d766(_0xec1092-0x25,_0x50089d-_0x59c0e3._0x1d2308,_0x4f758b- -_0x59c0e3._0x152c3a,_0x50089d);}return{'callId':_0x5989f7['id'],'toolName':_0x5989f7[_0x26d1ff(-_0x7b2078._0x47dfb8,-_0x7b2078._0x24ce9d,-_0x7b2078._0xae28a1,-_0x7b2078._0x46a80d)],'status':_0x3264f2(-0x282,-_0x7b2078._0x5f971d,-0x2a2,-0x28f),'output':_0x1f5995,'structured':_0x7f44ed,'chunks':_0x5775ea,'meta':createToolMeta()};}function createRejectedToolResult(_0x2b2291,_0x195847){const _0x55bb18={_0x314e66:0x3a8,_0x4f3845:0x3aa,_0x35b26a:0x3b9,_0x5deb96:0x12d,_0x50ef3a:0xaf,_0x598afd:0xda,_0x470fbf:0x114,_0x32f723:0x14f,_0x4a914b:0x38b,_0x1706aa:0x3d0},_0x38f73d={_0x1d502b:0x1a4,_0x2bbd80:0x1cf,_0x36f2d3:0x1e},_0x80ae16={_0x2dbbd7:0x175,_0x518618:0x14f};function _0x34fae8(_0x3a5c29,_0x41dd85,_0xdca294,_0x266082){return _0x45d766(_0x3a5c29-_0x80ae16._0x2dbbd7,_0x41dd85-_0x80ae16._0x518618,_0xdca294- -0x4bd,_0x41dd85);}function _0x330119(_0x5c187a,_0x194fa4,_0x4e9098,_0xabcbd1){return _0x45d766(_0x5c187a-_0x38f73d._0x1d502b,_0x194fa4-_0x38f73d._0x2bbd80,_0x194fa4-_0x38f73d._0x36f2d3,_0x5c187a);}const _0x49e1e3=_0x195847?.[_0x330119(_0x55bb18._0x314e66,_0x55bb18._0x4f3845,_0x55bb18._0x35b26a,0x372)]()[_0x34fae8(-0x17a,-0x11a,-0x150,-_0x55bb18._0x5deb96)]?_0x195847:_0x34fae8(-_0x55bb18._0x50ef3a,-0x8c,-_0x55bb18._0x598afd,-0xba)+_0x2b2291['name'];return createErrorToolResult(_0x2b2291,_0x49e1e3,{'error':_0x34fae8(-_0x55bb18._0x470fbf,-0x136,-_0x55bb18._0x32f723,-0x10e),..._0x195847?.['trim']()[_0x330119(0x3e3,_0x55bb18._0x4a914b,0x349,_0x55bb18._0x1706aa)]?{'reason':_0x195847}:{}});}function createAbortedToolResult(_0x68ee81,_0x45c513,_0xaba578=[]){const _0x293a5a={_0x550dfa:0x5f},_0x3af4de={_0x5baadb:0xb7,_0x10c4a5:0x2f5},_0x2bc6c0=toAbortError(_0x45c513);function _0x1e0bb2(_0x1a93c3,_0x461bed,_0x3bebbe,_0x339af3){return _0x45d766(_0x1a93c3-0x107,_0x461bed-_0x3af4de._0x5baadb,_0x1a93c3- -_0x3af4de._0x10c4a5,_0x3bebbe);}return createErrorToolResult(_0x68ee81,_0x2bc6c0[_0x1e0bb2(_0x293a5a._0x550dfa,0xb3,0x6f,0xa3)],{'error':_0x2bc6c0['message'],'aborted':!![]},_0xaba578);}function _0x26395f(_0x4f219d,_0x5487db,_0x4fab0d,_0x248585){const _0x219ec8={_0x47e33e:0x17c};return _0x55fb(_0x5487db- -_0x219ec8._0x47e33e,_0x4fab0d);}function createSuccessToolResult(_0x1ce706,_0xe9114f,_0x3efc58){const _0x179ec6={_0x1333b8:0x8c,_0x3073e0:0xd4,_0x177f64:0xc6,_0x2cdd4c:0xdf},_0x5b6507={_0x1b4ca9:0x1f2,_0x5e7fa1:0x329};function _0x34433b(_0x2c9dfb,_0xd5e5df,_0x3151e0,_0xc42d4d){return _0x45d766(_0x2c9dfb-_0x5b6507._0x1b4ca9,_0xd5e5df-0x1cd,_0x2c9dfb- -_0x5b6507._0x5e7fa1,_0xd5e5df);}function _0xbf98cd(_0x5cba31,_0x5119e1,_0x36939a,_0x3c4a6a){return _0x26395f(_0x5cba31-0x15b,_0x36939a-0x4b2,_0x5cba31,_0x3c4a6a-0x9);}return{'callId':_0x1ce706['id'],'toolName':_0x1ce706['name'],'status':'ok','output':_0xe9114f['output'],'structured':_0xe9114f['structured'],..._0xe9114f[_0x34433b(_0x179ec6._0x1333b8,_0x179ec6._0x3073e0,_0x179ec6._0x177f64,0xa3)]!==void 0x0?{'content':_0xe9114f[_0x34433b(0x8c,0x9a,0x39,_0x179ec6._0x2cdd4c)]}:{},'chunks':_0x3efc58,'meta':createToolMeta()};}function createUnknownToolResult(_0xf25d2a){const _0x184b7b={_0x3e1ecc:0x32e},_0x1e57ce={_0x9a5e64:0x192};function _0x5eeb30(_0x5b94cb,_0x1d5e9f,_0x1ca297,_0x2ccae3){return _0x26395f(_0x5b94cb-_0x1e57ce._0x9a5e64,_0x2ccae3-0x3ba,_0x1d5e9f,_0x2ccae3-0x16c);}return createErrorToolResult(_0xf25d2a,'Unknown\x20tool:\x20'+_0xf25d2a[_0x5eeb30(0x2ec,0x34f,0x33d,_0x184b7b._0x3e1ecc)],{'error':'unknown_tool'});}function isDispatchDecision(_0x1adf3d){const _0x3164f1={_0xa8afa5:0x277,_0x439c0d:0x249,_0x1a74b6:0x214,_0x7598da:0x211,_0x32e198:0x4c0,_0x2827fb:0x498},_0xea2318={_0x19ad92:0x18e,_0x2aae71:0x16f,_0x2ff152:0x17};function _0x264d74(_0x1facd4,_0x3b7ee7,_0x59a76f,_0x15f142){return _0x26395f(_0x1facd4-0x1ad,_0x1facd4-0x517,_0x15f142,_0x15f142-0x132);}if(typeof _0x1adf3d!==_0x5d5a09(-_0x3164f1._0xa8afa5,-0x23e,-_0x3164f1._0x439c0d,-_0x3164f1._0x1a74b6)||_0x1adf3d===null)return![];function _0x5d5a09(_0x2792f2,_0x341887,_0x81314a,_0x2bd072){return _0x26395f(_0x2792f2-_0xea2318._0x19ad92,_0x341887- -_0xea2318._0x2aae71,_0x2792f2,_0x2bd072-_0xea2318._0x2ff152);}return _0x1adf3d['action']===_0x5d5a09(-0x225,-0x221,-_0x3164f1._0x7598da,-0x24c)||_0x1adf3d[_0x264d74(0x48e,0x447,_0x3164f1._0x32e198,_0x3164f1._0x2827fb)]==='run';}function normalizeExecutionError(_0x1132f9){const _0x52fdc4={_0x30225b:0x1f9,_0x359e9b:0x1e6,_0x107ff2:0x25f,_0x14b3e9:0x28a,_0x15abf1:0x244,_0x9bd8f3:0x219,_0x57f475:0x1c6,_0xdcef21:0x208},_0x41605c={_0x12f33d:0x47a},_0x5ecbe6={_0x4844d2:0x8e,_0x5c7c45:0x304};function _0x553d94(_0x56c544,_0x5393dd,_0xfa6792,_0x5b2073){return _0x26395f(_0x56c544-_0x5ecbe6._0x4844d2,_0x5393dd-_0x5ecbe6._0x5c7c45,_0x56c544,_0x5b2073-0x97);}if(_0x1132f9 instanceof ToolExecutionError)return{'errorMessage':_0x1132f9[_0x553d94(_0x52fdc4._0x30225b,0x208,_0x52fdc4._0x359e9b,_0x52fdc4._0x107ff2)],'structured':{'error':_0x1132f9[_0x1b30ac(-0x12f,-0x175,-0x126,-0xfb)],..._0x1132f9[_0x553d94(_0x52fdc4._0x14b3e9,0x261,_0x52fdc4._0x15abf1,_0x52fdc4._0x9bd8f3)]}};function _0x1b30ac(_0xc7e246,_0x335877,_0x1f4272,_0x591e00){return _0x45d766(_0xc7e246-0x13d,_0x335877-0x113,_0x1f4272- -_0x41605c._0x12f33d,_0x335877);}if(_0x1132f9 instanceof Error)return{'errorMessage':_0x1132f9[_0x553d94(_0x52fdc4._0x57f475,_0x52fdc4._0xdcef21,0x1b5,0x24c)],'structured':{'error':_0x1132f9['message']}};const _0x4a5f41=String(_0x1132f9);return{'errorMessage':_0x4a5f41,'structured':{'error':_0x4a5f41}};}async function emitEvent(_0x41dbbf,_0x147661,_0x42aead){await _0x41dbbf?.(_0x147661,_0x42aead);}async function resolveDispatchDecision(_0x1679bb,_0x5af387,_0x2b77ea){const _0x4c1988={_0x1b62a4:0x29d,_0x3bfc7e:0x265,_0x4d0d31:0x21d,_0x1045e4:0x235,_0x108785:0x236,_0x3972eb:0x221,_0x35c13a:0x204},_0x4fca33={_0x3686af:0x67,_0x28ec24:0x362},_0x2d43ac={_0x44bc2e:0x41d,_0x24f213:0x312,_0x394cae:0x323,_0xfa3149:0x320,_0x49472c:0x319,_0x3f08ee:0x32d},_0x3b7c7d={_0x1a747a:0x1dc,_0x179f87:0x221,_0xa994a3:0x1f5,_0x223c12:0x411,_0x165a9c:0x3ef,_0x434d00:0x424,_0x202d43:0x423,_0x39094b:0x3f4,_0x7c4e71:0x3e2,_0x59f5d6:0x3b3};if(!_0x1679bb)return{'action':_0x5dc50d(0x228,0x216,_0x4c1988._0x1b62a4,_0x4c1988._0x3bfc7e)};const _0x234dba=Promise['resolve']()['then'](()=>_0x1679bb(_0x5af387,_0x2b77ea));if(!_0x2b77ea[_0x5417d4(_0x4c1988._0x4d0d31,_0x4c1988._0x1045e4,0x24e,_0x4c1988._0x108785)]){const _0x90a733=await _0x234dba;return isDispatchDecision(_0x90a733)?_0x90a733:{'action':_0x5417d4(_0x4c1988._0x3972eb,0x1d9,0x1e6,_0x4c1988._0x35c13a)};}const _0x3223a4=new Promise((_0x55064d,_0x1486d5)=>{const _0x43e3ac={_0x11a687:0x18b},_0x478133={_0x102528:0x5ba};function _0x3edd62(_0xfd4a79,_0x265a8e,_0x301835,_0x205966){return _0x5dc50d(_0xfd4a79-0x1b8,_0x301835,_0x301835-0x138,_0xfd4a79- -_0x478133._0x102528);}const _0x411341=()=>{const _0x5499c6={_0x393118:0x33b};_0x2b77ea['signal']?.[_0x38a6fa(0x1f7,_0x3b7c7d._0x1a747a,_0x3b7c7d._0x179f87,_0x3b7c7d._0xa994a3)](_0x21369b(_0x3b7c7d._0x223c12,_0x3b7c7d._0x165a9c,0x3cc,_0x3b7c7d._0x434d00),_0x411341);function _0x21369b(_0x4b4950,_0x37fcd9,_0x1831fe,_0x5c7158){return _0x55fb(_0x1831fe-_0x5499c6._0x393118,_0x4b4950);}function _0x38a6fa(_0x51820a,_0xcb7995,_0x268880,_0x4c5284){return _0x55fb(_0x51820a-0x133,_0x4c5284);}_0x1486d5(toAbortError(_0x2b77ea['signal']?.[_0x21369b(_0x3b7c7d._0x202d43,_0x3b7c7d._0x39094b,_0x3b7c7d._0x7c4e71,_0x3b7c7d._0x59f5d6)]));};function _0x342f58(_0x971fa1,_0x55d673,_0x26d3ca,_0x1166fd){return _0x5dc50d(_0x971fa1-0x93,_0x55d673,_0x26d3ca-_0x43e3ac._0x11a687,_0x971fa1-0x1a9);}if(_0x2b77ea[_0x342f58(0x440,0x48b,_0x2d43ac._0x44bc2e,0x474)]?.[_0x3edd62(-0x34c,-0x345,-_0x2d43ac._0x24f213,-0x31c)]){_0x1486d5(toAbortError(_0x2b77ea[_0x3edd62(-0x323,-0x370,-0x327,-0x2df)]['reason']));return;}_0x2b77ea[_0x3edd62(-_0x2d43ac._0x394cae,-0x2ec,-_0x2d43ac._0xfa3149,-0x35f)]?.[_0x3edd62(-0x337,-_0x2d43ac._0x49472c,-_0x2d43ac._0x3f08ee,-0x30d)]('abort',_0x411341,{'once':!![]});});function _0x5dc50d(_0x27f123,_0x45181b,_0x5965d9,_0x4454cf){return _0x26395f(_0x27f123-_0x4fca33._0x3686af,_0x4454cf-_0x4fca33._0x28ec24,_0x45181b,_0x4454cf-0x8);}const _0x133f27=await Promise[_0x5417d4(0x2d7,0x29f,0x242,0x292)]([_0x234dba,_0x3223a4]);function _0x5417d4(_0x1167ee,_0x20f8a3,_0x475a4d,_0xe45271){return _0x45d766(_0x1167ee-0x4,_0x20f8a3-0x19a,_0xe45271- -0x14f,_0x1167ee);}return isDispatchDecision(_0x133f27)?_0x133f27:{'action':'run'};}async function executeToolCall(_0x42ae7a,_0x580d7b,_0x779217,_0x91eee,_0x4b26e9){const _0x5b52a9={_0x1f48d5:0x295,_0xf6a7ff:0x2e6,_0x43dfe5:0x2ef,_0x55fbea:0x32e,_0x2bf95e:0x2f4,_0x2c0a8d:0x2ef,_0x40c03f:0x295,_0x5f4de2:0x285,_0x444826:0x21a,_0x3740ca:0x2be,_0x336a2f:0x2cb,_0x2d9d7c:0x2fa,_0xcd266d:0x292,_0x4eadf9:0x237,_0x2f4552:0x293,_0x1ac2df:0x276,_0x12ecd9:0x233,_0x1a5162:0x268,_0x693b5f:0x324,_0x40e130:0x2d4,_0x2a892e:0x30f,_0x40a1b2:0x27a,_0x1dd8d4:0x296,_0x1208ac:0x287,_0x18a029:0x2d8,_0x43a22b:0x2b6,_0xd38320:0x308,_0x534724:0x243,_0x58c40c:0x266,_0x54d9b0:0x306,_0xc3abf:0x331,_0x3b93d1:0x2c1,_0x4001df:0x2ef,_0x49e214:0x2e5,_0x1e9cae:0x279,_0x12f347:0x346,_0x28e533:0x304,_0x124bae:0x276,_0x363690:0x2b4,_0x350bae:0x297,_0x4c9951:0x396,_0x1d0a8a:0x30d,_0x116a56:0x38d,_0x33cd2e:0x356,_0x2cacd3:0x274,_0x302844:0x1ea,_0x24af87:0x2b5,_0x58b75d:0x29a,_0x131417:0x338,_0x58febb:0x2aa},_0x2060b1={_0x20c99f:0x1c9},_0x33ce9b={_0x48ec2b:0x68,_0x88130f:0x1e0},_0x44b91e={..._0x779217,'toolCallId':_0x580d7b['id']};throwIfAborted(_0x44b91e[_0xd18d11(-_0x5b52a9._0x1f48d5,-0x280,-0x27a,-_0x5b52a9._0xf6a7ff)]);let _0x23ee25;try{_0x23ee25=await resolveDispatchDecision(_0x91eee,_0x580d7b,_0x44b91e);}catch(_0x1386c9){if(isAbortError(_0x1386c9)){const _0x2eb217=createAbortedToolResult(_0x580d7b,_0x1386c9);return await emitEvent(_0x4b26e9,{'type':_0x52ec7e(0x334,0x33b,0x2fa,_0x5b52a9._0x43dfe5),'toolCall':_0x580d7b,'result':_0x2eb217},_0x44b91e),_0x2eb217;}const {errorMessage:_0x188a81,structured:_0x53f9d7}=normalizeExecutionError(_0x1386c9),_0x4284ef=createErrorToolResult(_0x580d7b,_0x188a81,_0x53f9d7);return await emitEvent(_0x4b26e9,{'type':_0x52ec7e(_0x5b52a9._0x55fbea,_0x5b52a9._0x2bf95e,0x315,_0x5b52a9._0x2c0a8d),'toolCall':_0x580d7b,'result':_0x4284ef},_0x44b91e),_0x4284ef;}throwIfAborted(_0x44b91e[_0xd18d11(-_0x5b52a9._0x40c03f,-0x291,-0x2cb,-_0x5b52a9._0x5f4de2)]);function _0x52ec7e(_0x4d868a,_0x1ab85a,_0x436bbe,_0x26d173){return _0x45d766(_0x4d868a-_0x33ce9b._0x48ec2b,_0x1ab85a-_0x33ce9b._0x88130f,_0x26d173- -0x81,_0x4d868a);}if(_0x23ee25[_0xd18d11(-0x253,-0x260,-_0x5b52a9._0x444826,-0x21d)]==='reject'){const _0x5e87da=createRejectedToolResult(_0x580d7b,_0x23ee25[_0x52ec7e(_0x5b52a9._0x3740ca,_0x5b52a9._0x336a2f,0x344,_0x5b52a9._0x2d9d7c)]);return await emitEvent(_0x4b26e9,{'type':'tool_rejected','toolCall':_0x580d7b,'result':_0x5e87da},_0x44b91e),_0x5e87da;}const _0x3cf45a=_0x42ae7a[_0x52ec7e(0x2a7,_0x5b52a9._0xcd266d,0x298,0x2e8)](_0x580d7b[_0xd18d11(-0x256,-_0x5b52a9._0x4eadf9,-_0x5b52a9._0x2f4552,-0x25c)]);if(!_0x3cf45a){const _0x1622dc=createUnknownToolResult(_0x580d7b);return await emitEvent(_0x4b26e9,{'type':_0xd18d11(-0x2aa,-0x271,-0x26a,-_0x5b52a9._0x1ac2df),'toolCall':_0x580d7b,'result':_0x1622dc},_0x44b91e),_0x1622dc;}throwIfAborted(_0x44b91e['signal']),await emitEvent(_0x4b26e9,{'type':'tool_started','toolCall':_0x580d7b},_0x44b91e);function _0xd18d11(_0x1f9c15,_0x322ce9,_0x321682,_0xf0af63){return _0x26395f(_0x1f9c15-0x1e3,_0x1f9c15- -0x1ca,_0x322ce9,_0xf0af63-_0x2060b1._0x20c99f);}try{throwIfAborted(_0x44b91e[_0xd18d11(-0x295,-0x2e2,-0x26d,-0x2bb)]);const _0x288bb0=validateToolInput(_0x580d7b[_0xd18d11(-0x23c,-_0x5b52a9._0x12ecd9,-0x245,-_0x5b52a9._0x1a5162)],_0x3cf45a['inputSchema']),_0xbd16d4=await _0x3cf45a[_0x52ec7e(0x322,_0x5b52a9._0x693b5f,_0x5b52a9._0x40e130,_0x5b52a9._0x2a892e)](_0x288bb0,_0x44b91e),_0x400721=[],_0x4185b1=addAbortListener(_0x44b91e[_0xd18d11(-_0x5b52a9._0x1f48d5,-_0x5b52a9._0x40a1b2,-_0x5b52a9._0x1dd8d4,-0x28c)],()=>{void _0xbd16d4['return'](void 0x0)['catch'](()=>{});});try{throwIfAborted(_0x44b91e[_0xd18d11(-_0x5b52a9._0x1f48d5,-_0x5b52a9._0x1208ac,-_0x5b52a9._0x18a029,-0x29a)]);let _0x42c8d6=await _0xbd16d4[_0xd18d11(-_0x5b52a9._0x43a22b,-0x2a3,-0x2f5,-_0x5b52a9._0xd38320)]();while(!_0x42c8d6['done']){throwIfAborted(_0x44b91e['signal']);const _0x2f0ee1=normalizeToolOutputValue(_0x42c8d6[_0xd18d11(-_0x5b52a9._0x534724,-0x212,-_0x5b52a9._0x58c40c,-0x26c)]);_0x400721[_0x52ec7e(_0x5b52a9._0x54d9b0,0x337,0x31f,_0x5b52a9._0xc3abf)](_0x2f0ee1),await emitEvent(_0x4b26e9,{'type':_0xd18d11(-_0x5b52a9._0x3b93d1,-_0x5b52a9._0x4001df,-_0x5b52a9._0x49e214,-_0x5b52a9._0x1e9cae),'toolCall':_0x580d7b,'chunk':_0x2f0ee1},_0x44b91e),throwIfAborted(_0x44b91e[_0x52ec7e(_0x5b52a9._0x12f347,0x2eb,0x343,_0x5b52a9._0x28e533)]),_0x42c8d6=await _0xbd16d4[_0xd18d11(-_0x5b52a9._0x43a22b,-_0x5b52a9._0x124bae,-_0x5b52a9._0x363690,-0x27d)]();}throwIfAborted(_0x44b91e[_0xd18d11(-0x295,-_0x5b52a9._0x350bae,-0x2ca,-_0x5b52a9._0x350bae)]);const _0x2ec871=_0x42c8d6[_0x52ec7e(_0x5b52a9._0x4c9951,_0x5b52a9._0x1d0a8a,_0x5b52a9._0x116a56,_0x5b52a9._0x33cd2e)]===void 0x0?deriveFinalToolOutput(_0x400721):normalizeToolOutputValue(_0x42c8d6[_0xd18d11(-_0x5b52a9._0x534724,-_0x5b52a9._0x2cacd3,-_0x5b52a9._0x302844,-0x21b)]),_0x57f000=createSuccessToolResult(_0x580d7b,_0x2ec871,_0x400721);return await emitEvent(_0x4b26e9,{'type':_0x52ec7e(_0x5b52a9._0x24af87,_0x5b52a9._0x58b75d,_0x5b52a9._0x131417,0x2ef),'toolCall':_0x580d7b,'result':_0x57f000},_0x44b91e),_0x57f000;}catch(_0x30fa23){if(isAbortError(_0x30fa23)){const _0x40132e=createAbortedToolResult(_0x580d7b,_0x30fa23,_0x400721);return await emitEvent(_0x4b26e9,{'type':'tool_completed','toolCall':_0x580d7b,'result':_0x40132e},_0x44b91e),_0x40132e;}const {errorMessage:_0xf2c09a,structured:_0x39ab53}=normalizeExecutionError(_0x30fa23),_0x5d2e6a=createErrorToolResult(_0x580d7b,_0xf2c09a,_0x39ab53,_0x400721);return await emitEvent(_0x4b26e9,{'type':_0x52ec7e(0x323,_0x5b52a9._0x350bae,0x2da,0x2ef),'toolCall':_0x580d7b,'result':_0x5d2e6a},_0x44b91e),_0x5d2e6a;}finally{_0x4185b1();}}catch(_0x499fb2){if(isAbortError(_0x499fb2)){const _0x47b6dc=createAbortedToolResult(_0x580d7b,_0x499fb2);return await emitEvent(_0x4b26e9,{'type':'tool_completed','toolCall':_0x580d7b,'result':_0x47b6dc},_0x44b91e),_0x47b6dc;}const {errorMessage:_0x31ede4,structured:_0x4dc1af}=normalizeExecutionError(_0x499fb2),_0x12dbb3=createErrorToolResult(_0x580d7b,_0x31ede4,_0x4dc1af);return await emitEvent(_0x4b26e9,{'type':_0xd18d11(-_0x5b52a9._0x58febb,-0x27a,-0x2ca,-0x293),'toolCall':_0x580d7b,'result':_0x12dbb3},_0x44b91e),_0x12dbb3;}}function createInternalToolRuntime(_0x5af7c5=[],_0x560829={}){const _0x3e06b6={_0x1b9208:0x57,_0x5676a0:0x40},_0x39812e={_0x15b7fd:0x259,_0x202270:0x257,_0x439d60:0x20f,_0xa24bf8:0x2ad},_0x26cafd={_0x595b0c:0x67,_0x208eb5:0x1c},_0x21fd4a={_0x5a8e1a:0x1ec},_0x220a8d={_0x3fa7c7:0x2ec};let _0x495416=new ToolRegistry(_0x5af7c5);return{'listToolSchemas'(){return _0x495416['listToolSchemas']();},'setTools'(_0x6415ff){_0x495416=new ToolRegistry(_0x6415ff);},async 'executeCalls'(_0xa1c84e,_0x55e4bb){function _0x26ae6c(_0x530693,_0x57e201,_0x1659b4,_0x32f049){return _0x55fb(_0x32f049- -_0x220a8d._0x3fa7c7,_0x530693);}function _0x25caef(_0x33657c,_0x1e3ae5,_0x493fe3,_0x48aa63){return _0x55fb(_0x493fe3-_0x21fd4a._0x5a8e1a,_0x1e3ae5);}return await Promise[_0x26ae6c(-0x229,-_0x39812e._0x15b7fd,-_0x39812e._0x202270,-0x211)](_0xa1c84e[_0x25caef(0x270,_0x39812e._0x439d60,0x259,_0x39812e._0xa24bf8)](async _0x37acac=>{const _0x3719bd={_0xa15a8d:0x207};function _0x104ed1(_0x85b6c7,_0x61b192,_0x4ff86d,_0x3b4236){return _0x26ae6c(_0x85b6c7,_0x61b192-0x1cd,_0x4ff86d-0xbd,_0x4ff86d-_0x3719bd._0xa15a8d);}return await executeToolCall(_0x495416,_0x37acac,_0x55e4bb,_0x560829['onToolCall'],_0x560829[_0x104ed1(-0xa9,-0x5a,-_0x26cafd._0x595b0c,-_0x26cafd._0x208eb5)]);}));},async 'execute'(_0x5cfb5a,_0x2bcf43){function _0xcd09c1(_0x4a6ac0,_0x5305bc,_0x27991d,_0x12d980){return _0x55fb(_0x4a6ac0- -0xae,_0x12d980);}const [_0x288634]=await this[_0xcd09c1(0x54,_0x3e06b6._0x1b9208,_0x3e06b6._0x5676a0,0x3d)]([_0x5cfb5a],_0x2bcf43);return _0x288634;}};}function getOrderedObserverExtensions(_0x4d03c0,_0x138c94){const _0x213156={_0x483753:0x5,_0x405471:0x2b,_0x530ab0:0x36,_0x2cd810:0x52,_0x5d52e6:0x1f3,_0x5a32a0:0x215,_0x596d7d:0x242,_0x39c24e:0x1a0,_0x807edf:0x239,_0x52b0c4:0x278},_0x41e2e8={_0x1e3078:0x16a};function _0x44fb65(_0x56ce97,_0x3b9574,_0x296169,_0x45cac8){return _0x26395f(_0x56ce97-_0x41e2e8._0x1e3078,_0x3b9574-0x3a3,_0x296169,_0x45cac8-0x7a);}return _0x4d03c0['filter'](_0x5d52e0=>{function _0x1d2553(_0x1865d6,_0x503d58,_0x4e3897,_0x36e38a){return _0x55fb(_0x1865d6- -0x106,_0x36e38a);}function _0x225774(_0x96599e,_0xe2f977,_0x37d6f6,_0x4f26ae){return _0x55fb(_0x96599e-0x126,_0xe2f977);}return _0x5d52e0['enabled']!==![]&&_0x5d52e0[_0x1d2553(-_0x213156._0x483753,_0x213156._0x405471,_0x213156._0x530ab0,_0x213156._0x2cd810)]===_0x138c94&&_0x5d52e0[_0x225774(_0x213156._0x5d52e6,_0x213156._0x5a32a0,_0x213156._0x596d7d,_0x213156._0x39c24e)]===_0x225774(_0x213156._0x807edf,0x20e,_0x213156._0x52b0c4,0x254);})['sort']((_0x20721c,_0x4bef02)=>_0x20721c[_0x44fb65(0x2cb,0x2dd,0x2ff,0x332)]-_0x4bef02['order']);}function getOrderedTransformerExtensions(_0xc03a7b,_0x27c9e1){const _0xf9d602={_0x49b0cb:0x173,_0x43d072:0x2db,_0x7dc9ba:0x306,_0x51879f:0x31e,_0x5f4e72:0x2b2,_0x433046:0x29a,_0x4aee43:0x2ea},_0x525e7b={_0x46b2f1:0x2ad},_0x2c1d25={_0x361972:0x2db},_0x531391={_0x250736:0x1a};function _0x2c6b45(_0x4bc1b5,_0x4c94c5,_0x59b167,_0x54d46b){return _0x45d766(_0x4bc1b5-_0x531391._0x250736,_0x4c94c5-0x1e4,_0x59b167- -0x381,_0x54d46b);}function _0x13e461(_0xb4dd3d,_0x591301,_0x1601f4,_0x16c813){return _0x45d766(_0xb4dd3d-0x178,_0x591301-0xe3,_0x1601f4- -_0x2c1d25._0x361972,_0x16c813);}return _0xc03a7b['filter'](_0x584829=>{function _0x29cbae(_0x2ed403,_0x589143,_0x1e8c3a,_0x5d6e09){return _0x55fb(_0x1e8c3a- -_0x525e7b._0x46b2f1,_0x2ed403);}function _0x28edbd(_0x9596e8,_0x107b1d,_0x120f96,_0x60907c){return _0x55fb(_0x120f96-0x21d,_0x9596e8);}return _0x584829[_0x29cbae(-0x15d,-_0xf9d602._0x49b0cb,-0x1a5,-0x1c6)]!==![]&&_0x584829[_0x28edbd(_0xf9d602._0x43d072,_0xf9d602._0x7dc9ba,_0xf9d602._0x51879f,0x2f6)]===_0x27c9e1&&_0x584829[_0x28edbd(_0xf9d602._0x5f4e72,_0xf9d602._0x433046,_0xf9d602._0x4aee43,_0xf9d602._0x4aee43)]==='transformer';})['sort']((_0x188c10,_0xf11936)=>_0x188c10[_0x2c6b45(0x42,0x19,0x9,0x3c)]-_0xf11936[_0x13e461(0xa2,0xb8,0xaf,0x105)]);}function createExtensionRegistry(){const _0xbf606a={_0xcc59ab:0x3cc,_0x284975:0x41d},_0x165566={_0x3129ca:0x34d},_0x5500d3={_0x81a054:0x13b,_0x197bfa:0x15e},_0x2973ca={_0x3c3d2a:0x5d},_0x2f6be8=[];return{'register'(_0xfb9f85){function _0x5f1c5f(_0x2c96f0,_0x581bdc,_0x3c4a03,_0x452873){return _0x55fb(_0x3c4a03-_0x2973ca._0x3c3d2a,_0x581bdc);}_0x2f6be8[_0x5f1c5f(0x11c,0x142,_0x5500d3._0x81a054,_0x5500d3._0x197bfa)](_0xfb9f85);},async 'runTransformers'(_0x2ff25c,_0x2114be,_0x355865){function _0x2e6404(_0x53cdd2,_0xc89dd4,_0x411c31,_0x4047ca){return _0x55fb(_0x53cdd2-_0x165566._0x3129ca,_0x4047ca);}let _0x380b46=_0x2114be;for(const _0x54b6fd of getOrderedTransformerExtensions(_0x2f6be8,_0x2ff25c)){_0x380b46=await _0x54b6fd[_0x2e6404(_0xbf606a._0xcc59ab,0x3cd,_0xbf606a._0x284975,0x3d1)](_0x380b46,_0x355865);}return _0x380b46;},async 'runObservers'(_0x9316ae,_0x2fcb59,_0x4f43b6){for(const _0x4002f4 of getOrderedObserverExtensions(_0x2f6be8,_0x9316ae)){await _0x4002f4['run'](_0x2fcb59,_0x4f43b6);}}};}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(_0x54196e={}){const _0x26245e={_0x35f764:0x35c,_0x1a103a:0x311,_0x50a4b5:0x367},_0x434a82={_0x46a290:0x269,_0x2b3de1:0x2b4,_0x57161a:0x2af},_0x199d47={_0x5bdc5f:0x207,_0x17aa1b:0x29e,_0x294685:0x263,_0xedc5de:0x18c,_0x356057:0x153,_0x2ae0db:0x28e,_0x277358:0x269,_0x153c4b:0x288,_0x56357a:0x135,_0x549302:0xed,_0x4101fd:0x101,_0x5e3d97:0x17a,_0x1fa6da:0x1ed,_0x45beb1:0x294,_0x4a655e:0x2e6,_0x852dcd:0x134,_0x35447c:0x12b,_0x35314d:0x174,_0x513270:0x142,_0x4d3d0b:0x164,_0x35a097:0xd0,_0x1d3293:0x157,_0x23334d:0xc2,_0x28e237:0x14d,_0x90b04f:0x174,_0x30041f:0x170,_0x47ccd8:0x19f,_0x48bd82:0x1c9,_0x13f53c:0x153,_0x547d38:0x165,_0x715018:0x1ef,_0x37a438:0x19c,_0x587f99:0x26a,_0x236cd6:0x20c,_0x95d35e:0x206,_0x31c80f:0x26a,_0x208807:0x2d1,_0x596fb4:0x282,_0x53942e:0x196,_0x77e55:0x177,_0x2e64d9:0x160,_0x225f33:0x2ad,_0xb4386b:0x2a0,_0x1ae570:0x1cb,_0x25e378:0x179,_0x3a7618:0x2ad,_0x3ea407:0x24a,_0x527feb:0x113,_0x2faefc:0x1ff,_0x256f00:0x250};let _0x5ba18a=createEmptySnapshot();const _0x44214c=new Set();let _0x5b8215;const _0xd8ce79=()=>{const _0x3bb004={..._0x5ba18a};for(const _0x2b9999 of _0x44214c)_0x2b9999(_0x3bb004);};return{'getSnapshot'(){return{..._0x5ba18a};},'recordEvent'(_0x2bd02f){const _0x494bcb={_0xcc8e52:0x308};if(_0x2bd02f[_0x303b72(-0x21d,-_0x199d47._0x5bdc5f,-0x25e,-0x24b)]===_0x303b72(-0x25b,-0x2f7,-_0x199d47._0x17aa1b,-_0x199d47._0x294685)){_0x5b8215=Date[_0x117a90(0x195,_0x199d47._0xedc5de,_0x199d47._0x356057,0x18f)]();const _0x4b0474=_0x54196e['getContextWindowLimit']?.(_0x2bd02f[_0x303b72(-0x27d,-_0x199d47._0x2ae0db,-_0x199d47._0x277358,-_0x199d47._0x153c4b)]);_0x4b0474!==void 0x0&&(_0x5ba18a={..._0x5ba18a,'contextWindowLimit':_0x4b0474},_0xd8ce79());return;}function _0x117a90(_0x30adcd,_0x554016,_0x472a1a,_0x583f72){return _0x55fb(_0x472a1a-0x8d,_0x30adcd);}if(_0x2bd02f['type']==='model_response'){const _0x488bea=_0x2bd02f[_0x117a90(_0x199d47._0x56357a,_0x199d47._0x549302,_0x199d47._0x4101fd,0x151)]['usage'][_0x117a90(0x1de,_0x199d47._0x5e3d97,0x1a5,_0x199d47._0x1fa6da)],_0x23af1b=_0x2bd02f[_0x303b72(-0x29e,-0x286,-_0x199d47._0x45beb1,-_0x199d47._0x4a655e)][_0x117a90(_0x199d47._0x852dcd,_0x199d47._0x35447c,_0x199d47._0x35314d,_0x199d47._0x513270)][_0x117a90(0x15d,0x1b9,0x18c,_0x199d47._0x4d3d0b)],_0x31c17a=_0x2bd02f[_0x117a90(_0x199d47._0x35a097,_0x199d47._0x1d3293,_0x199d47._0x4101fd,_0x199d47._0x23334d)][_0x117a90(_0x199d47._0x28e237,0x16d,_0x199d47._0x90b04f,_0x199d47._0x30041f)][_0x117a90(0x197,_0x199d47._0x47ccd8,0x1a3,_0x199d47._0x48bd82)]??0x0,_0x14d7f6=_0x488bea+_0x23af1b,_0x1c5186=_0x5b8215===void 0x0?0x0:Date[_0x117a90(0x14f,0x177,_0x199d47._0x13f53c,_0x199d47._0x547d38)]()-_0x5b8215;_0x5b8215=void 0x0,_0x5ba18a={..._0x5ba18a,'totalTokens':_0x5ba18a[_0x303b72(-_0x199d47._0x715018,-0x27d,-0x236,-0x220)]+_0x14d7f6,'totalInputTokens':_0x5ba18a[_0x117a90(0x13b,0x183,0x163,0x121)]+_0x488bea,'totalOutputTokens':_0x5ba18a[_0x117a90(0x151,0x169,0x189,_0x199d47._0x37a438)]+_0x23af1b,'totalReasoningTokens':_0x5ba18a[_0x303b72(-_0x199d47._0x587f99,-_0x199d47._0x236cd6,-0x245,-_0x199d47._0x95d35e)]+_0x31c17a,'modelCallCount':_0x5ba18a[_0x303b72(-_0x199d47._0x31c80f,-_0x199d47._0x208807,-_0x199d47._0x596fb4,-0x267)]+0x1,'totalModelTimeMs':_0x5ba18a[_0x117a90(0x189,_0x199d47._0x53942e,_0x199d47._0x77e55,_0x199d47._0x2e64d9)]+_0x1c5186,'currentTokens':_0x14d7f6,'currentInputTokens':_0x488bea,'currentOutputTokens':_0x23af1b,'currentReasoningTokens':_0x31c17a,'currentModelTimeMs':_0x1c5186,..._0x5ba18a['contextWindowLimit']&&_0x14d7f6>0x0?{'contextWindowUsage':_0x14d7f6/_0x5ba18a[_0x303b72(-0x29a,-0x278,-0x249,-0x270)]}:{}},_0xd8ce79();return;}if(_0x2bd02f[_0x303b72(-_0x199d47._0x225f33,-_0x199d47._0xb4386b,-0x25e,-0x29c)]===_0x117a90(0x1a5,_0x199d47._0x1ae570,_0x199d47._0x25e378,0x1a5)){_0x5ba18a={..._0x5ba18a,'toolCallCount':_0x5ba18a[_0x303b72(-_0x199d47._0x3a7618,-_0x199d47._0x3ea407,-0x28e,-0x2ca)]+0x1},_0xd8ce79();return;}function _0x303b72(_0x5c845b,_0x5a1e85,_0x48dc34,_0x1b792e){return _0x55fb(_0x48dc34- -_0x494bcb._0xcc8e52,_0x1b792e);}_0x2bd02f[_0x117a90(_0x199d47._0x527feb,0x186,0x137,0x176)]==='turn_complete'&&(_0x5ba18a={..._0x5ba18a,'requestCount':_0x5ba18a[_0x303b72(-_0x199d47._0x2faefc,-_0x199d47._0x256f00,-0x21b,-0x21d)]+0x1},_0xd8ce79());},'reset'(){_0x5ba18a=createEmptySnapshot(),_0x5b8215=void 0x0,_0xd8ce79();},'subscribe'(_0x4cb022){const _0x372ff0={_0x3cdb56:0xb7,_0x349b8b:0x5e8};_0x44214c[_0x19d59b(-0x2d3,-_0x26245e._0x35f764,-_0x26245e._0x1a103a,-_0x26245e._0x50a4b5)](_0x4cb022);function _0x19d59b(_0x51f5dc,_0x5a0552,_0x20dd1a,_0x243b8f){return _0x55fb(_0x20dd1a- -0x3b5,_0x51f5dc);}return()=>{function _0x13945b(_0x29817e,_0x3a8ec8,_0x487fb2,_0x3b7b4a){return _0x19d59b(_0x29817e,_0x3a8ec8-_0x372ff0._0x3cdb56,_0x487fb2-_0x372ff0._0x349b8b,_0x3b7b4a-0x18a);}_0x44214c[_0x13945b(_0x434a82._0x46a290,_0x434a82._0x2b3de1,0x2b4,_0x434a82._0x57161a)](_0x4cb022);};}};}function makeExtensionContext(_0x4dba41){return{'state':_0x4dba41};}async function runStage(_0x341f93,_0x4b75c0,_0x224cae,_0x436756){const _0x534681={_0x19efba:0x279,_0x4839eb:0x2e8,_0x452cab:0x1df,_0x4cf563:0x173,_0x53553c:0x183},_0x27765e={_0x22fbcf:0x1b3},_0x30cc9c={_0x41bde0:0x59,_0x1755f3:0x1f4};function _0x5837cc(_0x47acfc,_0x567e2e,_0x53f55e,_0xa1a5e5){return _0x26395f(_0x47acfc-_0x30cc9c._0x41bde0,_0x53f55e- -_0x30cc9c._0x1755f3,_0x47acfc,_0xa1a5e5-0x96);}const _0x22df4e=await _0x341f93[_0x5837cc(-_0x534681._0x19efba,-0x24f,-0x294,-_0x534681._0x4839eb)](_0x4b75c0,_0x224cae,_0x436756);await _0x341f93[_0x342797(0x190,_0x534681._0x452cab,_0x534681._0x4cf563,_0x534681._0x53553c)](_0x4b75c0,_0x22df4e,_0x436756);function _0x342797(_0x1c2a3a,_0x393a8b,_0x4afa66,_0x4aa0a8){return _0x45d766(_0x1c2a3a-0x125,_0x393a8b-_0x27765e._0x22fbcf,_0x1c2a3a- -0x235,_0x4aa0a8);}return _0x22df4e;}async function emitEvent2(_0x13d745,_0x5b4765,_0x1c2c98){await _0x13d745?.(_0x5b4765,_0x1c2c98);}function replaceToolUseBlocks(_0x4d7464,_0x4b62a8){const _0x3b0aa7={_0x140ba2:0x137,_0x32ea88:0x131,_0x17887b:0x2f5},_0x112984={_0x17b3b6:0x209,_0x3f8a37:0x23e,_0x39a27e:0x254,_0x3ac236:0x21e,_0x179dc3:0x2dc,_0x2927eb:0x2d6,_0x22e29b:0x28b},_0x726ce3={_0x5c5f4a:0x1e5,_0x1ce225:0x1b6},_0xeea353={_0x5ab674:0x1cc,_0xf6abcc:0x5b},_0xd59295={_0xd28ff:0x3b,_0x6778bc:0x16b,_0x4957d8:0x665};let _0x49236f=0x0;function _0x180e88(_0x4683f7,_0x201771,_0x588e12,_0x134e75){return _0x45d766(_0x4683f7-_0xd59295._0xd28ff,_0x201771-_0xd59295._0x6778bc,_0x134e75- -_0xd59295._0x4957d8,_0x4683f7);}function _0x6b49e(_0xf5f9f2,_0x456544,_0x4b978f,_0x15d0cc){return _0x26395f(_0xf5f9f2-0xdb,_0x15d0cc-_0xeea353._0x5ab674,_0xf5f9f2,_0x15d0cc-_0xeea353._0xf6abcc);}return{..._0x4d7464,'content':_0x4d7464[_0x6b49e(0x16f,_0x3b0aa7._0x140ba2,0x14b,_0x3b0aa7._0x32ea88)][_0x180e88(-_0x3b0aa7._0x17887b,-0x356,-0x35b,-0x324)](_0x2047af=>{const _0x5d5712={_0x4a82df:0xa6,_0x3ac82f:0x127,_0x27c91f:0x318};if(_0x2047af[_0x3508d5(-_0x112984._0x17b3b6,-_0x112984._0x3f8a37,-_0x112984._0x39a27e,-_0x112984._0x3ac236)]!==_0x174d76(_0x112984._0x179dc3,_0x112984._0x2927eb,_0x112984._0x22e29b,0x29d))return _0x2047af;const _0x8d46b7=_0x4b62a8[_0x49236f];function _0x3508d5(_0x146926,_0x54058d,_0x1514d3,_0x595b91){return _0x6b49e(_0x146926,_0x54058d-_0x5d5712._0x4a82df,_0x1514d3-_0x5d5712._0x3ac82f,_0x595b91- -_0x5d5712._0x27c91f);}_0x49236f+=0x1;function _0x174d76(_0x5c7072,_0x3e35a4,_0x316a81,_0x53e2b7){return _0x6b49e(_0x3e35a4,_0x3e35a4-_0x726ce3._0x5c5f4a,_0x316a81-_0x726ce3._0x1ce225,_0x5c7072-0x17a);}return structuredClone(_0x8d46b7);})};}function createAssistantMessageId(_0x5ea468,_0x515372){return _0x5ea468+':assistant:'+_0x515372;}function createReasoningMessageId(_0x532c99){const _0x481b9f={_0x5c4075:0x351,_0x4dcf5c:0x339,_0x1ff9b2:0x382},_0x4e7660={_0x1b6ad9:0xc0};function _0x5cd1ed(_0x329b2b,_0x469a2d,_0x480495,_0x2e9f2c){return _0x26395f(_0x329b2b-_0x4e7660._0x1b6ad9,_0x329b2b- -0x256,_0x469a2d,_0x2e9f2c-0xb5);}return _0x532c99+_0x5cd1ed(-0x356,-_0x481b9f._0x5c4075,-_0x481b9f._0x4dcf5c,-_0x481b9f._0x1ff9b2);}function withMessageId(_0x509628,_0x4ca217){if(_0x509628['id']===_0x4ca217)return _0x509628;return{..._0x509628,'id':_0x4ca217};}function createAssistantChunkEvent(_0x3e72a5,_0x556f38){const _0x21845={_0x29ce2a:0x1ac,_0x4ee82c:0x17a,_0x35dee1:0x19d,_0x5cec4b:0x1e1,_0x4faa66:0x23f,_0x41cb08:0x21d,_0x9685a5:0x22c,_0xc38e6f:0x234,_0x501ead:0x23d,_0x165288:0x281,_0x73669a:0x290,_0x423f73:0x2e4},_0x3dd564={_0x17181d:0x1e9,_0x1cc12a:0x162},_0x3fe970={_0xf82004:0x121,_0x7b348a:0x1c4};if(_0x3e72a5['type']!=='content_delta')return void 0x0;function _0x212023(_0x1b15f3,_0x178e98,_0x3a654a,_0x5c7d07){return _0x26395f(_0x1b15f3-0x44,_0x3a654a- -_0x3fe970._0xf82004,_0x178e98,_0x5c7d07-_0x3fe970._0x7b348a);}function _0xf9b789(_0x4efd54,_0x14d61f,_0x392387,_0xf6ac4a){return _0x45d766(_0x4efd54-_0x3dd564._0x17181d,_0x14d61f-_0x3dd564._0x1cc12a,_0xf6ac4a- -0x106,_0x14d61f);}if(_0x3e72a5[_0x212023(-_0x21845._0x29ce2a,-_0x21845._0x4ee82c,-_0x21845._0x35dee1,-_0x21845._0x5cec4b)]===void 0x0)return void 0x0;return{'type':_0x212023(-_0x21845._0x4faa66,-_0x21845._0x41cb08,-_0x21845._0x9685a5,-0x1fb),'index':_0x3e72a5[_0xf9b789(0x2a1,_0x21845._0xc38e6f,_0x21845._0x501ead,_0x21845._0x165288)]??0x0,'messageId':_0x556f38,'chunk':{'type':'content_delta','index':_0x3e72a5[_0xf9b789(0x25c,0x23b,0x251,_0x21845._0x165288)]??0x0,'text':_0x3e72a5[_0xf9b789(_0x21845._0x73669a,0x30d,_0x21845._0x423f73,0x2ce)]}};}function createToolUseChunkEvent(_0x8359e4,_0x5dd227){const _0x8c07cb={_0x199750:0x34e,_0x54f98f:0x3c4,_0x1734ad:0x12,_0x243740:0x82,_0x36bad0:0x37e,_0xbd26f:0x2d4,_0x412efd:0x4e,_0x2e9a50:0x37e,_0x3e6782:0x323,_0xe4c08f:0x36a,_0x5f3aa1:0x15,_0xca6531:0x66,_0x5e50be:0x65},_0x172379={_0x23357d:0x1be,_0x316927:0xdb},_0x153740={_0x2c517b:0x3ba};if(_0x8359e4['type']!==_0x1ad46a(0x37a,_0x8c07cb._0x199750,_0x8c07cb._0x54f98f,0x37e))return void 0x0;function _0x5f1841(_0x3c386c,_0x33ae29,_0x59348e,_0x113f83){return _0x45d766(_0x3c386c-0x37,_0x33ae29-0x199,_0x3c386c- -_0x153740._0x2c517b,_0x59348e);}function _0x1ad46a(_0xeacdbc,_0x4cb12a,_0x437032,_0x280bd7){return _0x45d766(_0xeacdbc-_0x172379._0x23357d,_0x4cb12a-_0x172379._0x316927,_0x280bd7- -0x5a,_0x4cb12a);}return{'type':_0x5f1841(-0x6,_0x8c07cb._0x1734ad,0x42,-0x35),'index':_0x8359e4[_0x5f1841(-0x33,-_0x8c07cb._0x243740,-0x83,-0x52)]??0x0,'messageId':_0x5dd227,'chunk':{'type':_0x1ad46a(0x3c8,0x382,0x338,_0x8c07cb._0x36bad0),'id':_0x8359e4['id']??'','index':_0x8359e4[_0x1ad46a(0x34d,_0x8c07cb._0xbd26f,0x376,0x32d)]??0x0,..._0x8359e4[_0x5f1841(0xa,_0x8c07cb._0x412efd,0x5d,0x31)]!==void 0x0?{'name':_0x8359e4[_0x1ad46a(_0x8c07cb._0x2e9a50,_0x8c07cb._0x3e6782,0x346,_0x8c07cb._0xe4c08f)]}:{},..._0x8359e4['inputDelta']!==void 0x0?{'inputDelta':_0x8359e4[_0x5f1841(_0x8c07cb._0x5f3aa1,_0x8c07cb._0xca6531,_0x8c07cb._0x5e50be,0x38)]}:{}}};}function createReasoningChunkEvent(_0x1e1d1a,_0x435635){const _0xe1f428={_0x3edbcf:0x145,_0x4e83a9:0x147,_0x4d1b4b:0x152,_0x1ce7dc:0x1c9,_0x281609:0x171,_0x5611cb:0xad,_0x4db3e6:0xbb,_0x248429:0x157,_0x151b8e:0x9a,_0x32bb49:0x84,_0x36b69b:0x15e,_0x1b905a:0x137,_0x294651:0x146,_0x5f6593:0x8c,_0xe5abdc:0xf0,_0x38f0cb:0x114,_0x220dab:0xeb,_0x58d08f:0x130,_0x9fe65b:0xe3,_0x17380b:0xde,_0x5d2d43:0x17f,_0x1c6407:0xb4,_0x23431d:0x6f,_0xb9ac7a:0x79,_0x56ea54:0x59,_0x340c48:0xac,_0x6eb897:0x2e,_0x5d9a73:0x3e,_0x16e5ce:0x81,_0x5be365:0x169,_0x4b4e55:0x178,_0x450907:0x7a,_0x389eec:0x7a,_0x418cd7:0xa0,_0x170252:0x178,_0x489179:0x149,_0x16e4c7:0x174,_0xab0002:0xcf,_0x58b82b:0xa1},_0x13b99b={_0x388c66:0x224,_0x298312:0x90},_0x1f5643={_0x45e669:0x1,_0x239b11:0x1bf};function _0x5452b0(_0x25bcc8,_0x4c4c16,_0x2d1431,_0xfee032){return _0x45d766(_0x25bcc8-_0x1f5643._0x45e669,_0x4c4c16-_0x1f5643._0x239b11,_0x2d1431- -0x2f4,_0xfee032);}function _0x500665(_0x22b939,_0x4c0ab0,_0x16dfcd,_0xf8e40a){return _0x26395f(_0x22b939-0x65,_0x16dfcd-_0x13b99b._0x388c66,_0x4c0ab0,_0xf8e40a-_0x13b99b._0x298312);}switch(_0x1e1d1a[_0x500665(_0xe1f428._0x3edbcf,_0xe1f428._0x4e83a9,_0xe1f428._0x4d1b4b,0x17f)]){case _0x500665(_0xe1f428._0x1ce7dc,0x139,_0xe1f428._0x281609,0x1a8):return{'type':_0x5452b0(0xd3,_0xe1f428._0x5611cb,0x8c,_0xe1f428._0x4db3e6),'index':_0x1e1d1a[_0x500665(_0xe1f428._0x248429,0x179,0x15b,0x11d)],'messageId':_0x435635,'chunk':{'type':'anthropic_thinking_delta','index':_0x1e1d1a['index']??0x0,'thinking':_0x1e1d1a[_0x5452b0(_0xe1f428._0x151b8e,0xca,0x7b,_0xe1f428._0x32bb49)]??''},'text':_0x1e1d1a['thinking']??''};case _0x500665(_0xe1f428._0x36b69b,0xe9,_0xe1f428._0x1b905a,_0xe1f428._0x294651):return{'type':_0x5452b0(0x7d,0x3c,_0xe1f428._0x5f6593,0x6f),'index':_0x1e1d1a[_0x500665(_0xe1f428._0xe5abdc,0x15a,_0xe1f428._0x38f0cb,_0xe1f428._0x220dab)],'messageId':_0x435635,'chunk':{'type':_0x500665(_0xe1f428._0x58d08f,_0xe1f428._0x9fe65b,0x137,0x108),'contentIndex':_0x1e1d1a[_0x500665(0x14c,_0xe1f428._0x17380b,0x114,0x127)]??0x0,'delta':_0x1e1d1a['delta']??'','itemId':_0x1e1d1a[_0x500665(_0xe1f428._0x5d2d43,0x15b,0x168,0x1a6)]??'','outputIndex':_0x1e1d1a[_0x5452b0(0xe6,_0xe1f428._0x1c6407,0xbf,_0xe1f428._0x23431d)]??0x0},'text':_0x1e1d1a['delta']??''};case'openai_reasoning_summary_delta':return{'type':'reasoning_chunk','index':_0x1e1d1a[_0x5452b0(_0xe1f428._0xb9ac7a,_0xe1f428._0x56ea54,_0xe1f428._0x340c48,_0xe1f428._0x5611cb)],'messageId':_0x435635,'chunk':{'type':_0x5452b0(_0xe1f428._0x6eb897,_0xe1f428._0x5d9a73,_0xe1f428._0x16e5ce,_0xe1f428._0x5d9a73),'delta':_0x1e1d1a[_0x500665(_0xe1f428._0x5be365,0x1bf,0x178,_0xe1f428._0x4b4e55)]??'','itemId':_0x1e1d1a[_0x5452b0(_0xe1f428._0x450907,_0xe1f428._0x389eec,_0xe1f428._0x418cd7,0x86)]??'','outputIndex':_0x1e1d1a['outputIndex']??0x0,'summaryIndex':_0x1e1d1a[_0x500665(_0xe1f428._0x170252,_0xe1f428._0x489179,_0xe1f428._0x16e4c7,0x12b)]??0x0},'text':_0x1e1d1a[_0x5452b0(0x87,_0xe1f428._0xab0002,0xb0,_0xe1f428._0x58b82b)]??''};default:return void 0x0;}}function isAbortedToolResult(_0x446b59){const _0x170e5f={_0x4f97c0:0x18b,_0xf0dc0b:0x1e6,_0x522937:0x18c,_0x2e8d04:0x4c4,_0x38ed48:0x119,_0x4d2cbf:0x123,_0x1453ba:0x171},_0x47eb2e={_0x206eb6:0x1d3},_0x26fd90={_0x15bcf8:0x1cd};function _0x340c4e(_0xbbe73f,_0x359542,_0xeabcbb,_0x6db471){return _0x45d766(_0xbbe73f-0x101,_0x359542-_0x26fd90._0x15bcf8,_0x6db471- -0x1eb,_0xbbe73f);}function _0x5e854d(_0x5f0200,_0x59a551,_0x46d668,_0x3268cf){return _0x45d766(_0x5f0200-0x5f,_0x59a551-_0x47eb2e._0x206eb6,_0x46d668-0x111,_0x59a551);}return _0x446b59[_0x340c4e(_0x170e5f._0x4f97c0,_0x170e5f._0xf0dc0b,0x1c8,0x1b0)]===_0x340c4e(0x18c,0x1c9,0x174,_0x170e5f._0x522937)&&_0x446b59[_0x5e854d(0x4d3,0x498,0x4be,_0x170e5f._0x2e8d04)][_0x340c4e(0x17e,_0x170e5f._0x38ed48,_0x170e5f._0x4d2cbf,_0x170e5f._0x1453ba)]===!![];}async function executeModelRequest(_0x2498b6,_0x259282,_0x41d392,_0x13f03e,_0x181de4){const _0x42c7d3={_0x36def9:0x15a,_0x42056d:0xe8,_0x156916:0x113,_0x4ebcf5:0x117,_0x3dfbc9:0x323,_0x2d09f9:0x2d8,_0x3cd387:0x308,_0x5c8e15:0x2ef,_0x2e7720:0x321,_0x4bb7ea:0xce,_0x57dedb:0x12f,_0x391760:0x123,_0x453981:0xdd,_0x5e4653:0x297,_0x37efe7:0x172,_0x113d8f:0xe7,_0x5d1b7a:0xf8,_0x519fb8:0x127,_0x2d18c2:0xdc,_0x25d6bc:0x12e,_0x5b6967:0x271,_0x5c8aae:0x2b1,_0x3d8ebf:0x31e,_0x6884b6:0x2d6,_0x337d17:0x32f,_0x19d19a:0x2e1,_0x33f1b3:0x199,_0x4538fd:0xe0,_0x1b8e76:0x14f,_0x28a2dc:0x11b,_0x580f95:0x2f4,_0x4b1654:0x2bd,_0x366ff9:0x300,_0x1132f8:0x2f4,_0x674075:0x2ee,_0x31d18a:0x2a0,_0x3aad0a:0x2d4,_0x4755e8:0x292,_0x2f9de1:0x2b1,_0x4dd96a:0x2aa,_0x363ca8:0x36d,_0x3ff951:0x32f,_0x2d2459:0x14f,_0x1de33c:0x161,_0x1a2e53:0xc7,_0x31e945:0xde,_0x56c3e4:0x33d,_0x1cd457:0x2fa,_0x287078:0x2a8,_0x5a1c1f:0x270,_0x21620f:0x2b1,_0x586e76:0xd0,_0x527a00:0x114,_0x5e7e1c:0x2da,_0x52be5a:0x330,_0x2e911f:0x2d7,_0x2c6032:0x326,_0x1dddfd:0x148,_0x41b52a:0x19e,_0x359860:0x10b},_0x25c0da={_0x46bf05:0x7b,_0x508cc0:0x3a,_0x3f0ffa:0x674},_0x45f67d={_0x133690:0x51,_0x6d015b:0xa8};throwIfAborted(_0x259282[_0x40801(-0x11c,-0xfc,-_0x42c7d3._0x36def9,-0xe9)]);function _0x40801(_0xb02934,_0x46d91e,_0x550bca,_0x12c7f8){return _0x26395f(_0xb02934-0xb6,_0xb02934- -_0x45f67d._0x133690,_0x46d91e,_0x12c7f8-_0x45f67d._0x6d015b);}if(!_0x259282['streaming']||!_0x41d392[_0x40801(-0xd0,-_0x42c7d3._0x42056d,-0xb4,-0x109)][_0x40801(-0x10b,-_0x42c7d3._0x156916,-_0x42c7d3._0x4ebcf5,-0x140)])return await _0x41d392[_0x11aacf(-0x2e3,-0x2ed,-0x2a3,-0x2db)][_0x11aacf(-0x342,-0x328,-_0x42c7d3._0x3dfbc9,-_0x42c7d3._0x2d09f9)](_0x2498b6,{'signal':_0x259282[_0x11aacf(-_0x42c7d3._0x3cd387,-0x317,-_0x42c7d3._0x5c8e15,-0x2fe)]});let _0x28f8cd;for await(const _0x5af4b8 of _0x41d392['chatModel'][_0x11aacf(-_0x42c7d3._0x2e7720,-0x296,-0x2de,-0x2d3)](_0x2498b6,{'signal':_0x259282[_0x40801(-0x11c,-_0x42c7d3._0x4bb7ea,-_0x42c7d3._0x57dedb,-0xce)]})){throwIfAborted(_0x259282['signal']);if(_0x5af4b8[_0x40801(-_0x42c7d3._0x391760,-0x10d,-0x126,-_0x42c7d3._0x453981)]===_0x11aacf(-0x2d3,-0x2a3,-0x2a7,-_0x42c7d3._0x5e4653)){_0x181de4['meta'][_0x40801(-0x15b,-0x177,-_0x42c7d3._0x37efe7,-0x187)]!==void 0x0&&_0x181de4[_0x40801(-0xde,-0xc1,-_0x42c7d3._0x113d8f,-_0x42c7d3._0x5d1b7a)][_0x40801(-_0x42c7d3._0x519fb8,-_0x42c7d3._0x2d18c2,-_0x42c7d3._0x25d6bc,-0xe6)]===void 0x0&&(_0x181de4[_0x11aacf(-_0x42c7d3._0x5b6967,-0x301,-_0x42c7d3._0x5c8aae,-0x2cd)][_0x11aacf(-_0x42c7d3._0x3d8ebf,-_0x42c7d3._0x6884b6,-0x2fa,-_0x42c7d3._0x337d17)]=Date[_0x11aacf(-_0x42c7d3._0x19d19a,-0x2df,-0x2da,-0x2db)]());_0x28f8cd=_0x5af4b8[_0x40801(-0x159,-_0x42c7d3._0x33f1b3,-0x12e,-0x162)];continue;}if(_0x5af4b8[_0x40801(-_0x42c7d3._0x391760,-0xf0,-0x138,-_0x42c7d3._0x4538fd)]===_0x40801(-_0x42c7d3._0x113d8f,-0x10f,-0xfe,-0x105)){await emitEvent2(_0x41d392[_0x40801(-_0x42c7d3._0x1b8e76,-0x12e,-0xf8,-_0x42c7d3._0x28a2dc)],_0x5af4b8,_0x13f03e);continue;}const _0x347887=createReasoningChunkEvent(_0x5af4b8,_0x181de4['reasoningMessageId']);if(_0x347887&&_0x347887[_0x11aacf(-_0x42c7d3._0x580f95,-0x347,-0x2f6,-_0x42c7d3._0x4b1654)]===_0x11aacf(-0x2dd,-_0x42c7d3._0x366ff9,-_0x42c7d3._0x1132f8,-_0x42c7d3._0x674075)&&_0x347887[_0x11aacf(-0x270,-0x2f7,-_0x42c7d3._0x31d18a,-0x2ae)]['length']>0x0){_0x181de4[_0x11aacf(-_0x42c7d3._0x3aad0a,-_0x42c7d3._0x4755e8,-_0x42c7d3._0x2f9de1,-_0x42c7d3._0x4dd96a)][_0x11aacf(-_0x42c7d3._0x363ca8,-0x352,-0x32e,-_0x42c7d3._0x3ff951)]===void 0x0&&(_0x181de4['meta']['reasoningStartedAt']=Date['now']());await emitEvent2(_0x41d392[_0x40801(-_0x42c7d3._0x2d2459,-0x144,-0x11a,-_0x42c7d3._0x1de33c)],_0x347887,_0x13f03e);continue;}const _0x5ac88e=createAssistantChunkEvent(_0x5af4b8,_0x181de4['assistantMessageId']);if(_0x5ac88e){_0x181de4[_0x40801(-0xde,-0xe8,-_0x42c7d3._0x113d8f,-_0x42c7d3._0x1a2e53)]['reasoningStartedAt']!==void 0x0&&_0x181de4[_0x40801(-_0x42c7d3._0x31e945,-_0x42c7d3._0x2d18c2,-0x112,-0x114)][_0x11aacf(-0x314,-_0x42c7d3._0x56c3e4,-_0x42c7d3._0x1cd457,-_0x42c7d3._0x287078)]===void 0x0&&(_0x181de4[_0x11aacf(-_0x42c7d3._0x5a1c1f,-0x2fb,-_0x42c7d3._0x21620f,-_0x42c7d3._0x287078)][_0x40801(-0x127,-_0x42c7d3._0x586e76,-0xe8,-_0x42c7d3._0x527a00)]=Date[_0x11aacf(-0x2ed,-0x2f7,-_0x42c7d3._0x5e7e1c,-0x2e4)]());await emitEvent2(_0x41d392[_0x11aacf(-_0x42c7d3._0x52be5a,-_0x42c7d3._0x2e911f,-0x322,-_0x42c7d3._0x2c6032)],_0x5ac88e,_0x13f03e);continue;}const _0x7762e8=createToolUseChunkEvent(_0x5af4b8,_0x181de4['assistantMessageId']);_0x7762e8&&await emitEvent2(_0x41d392[_0x40801(-0x14f,-_0x42c7d3._0x1dddfd,-_0x42c7d3._0x41b52a,-_0x42c7d3._0x359860)],_0x7762e8,_0x13f03e);}function _0x11aacf(_0x48d8ba,_0x4f9f05,_0x158bf0,_0x1571bf){return _0x45d766(_0x48d8ba-_0x25c0da._0x46bf05,_0x4f9f05-_0x25c0da._0x508cc0,_0x158bf0- -_0x25c0da._0x3f0ffa,_0x1571bf);}if(!_0x28f8cd)throw new Error('Model\x20stream\x20ended\x20without\x20a\x20final\x20response');return _0x28f8cd;}function makeTurnGuards(_0xd3c170,_0x2ec5f0,_0x15ba0d,_0x371ca1,_0x1bfd77){return{async 'stage'(_0x111cb0,_0x2133e4){return throwIfAborted(_0xd3c170),await runStage(_0x2ec5f0,_0x111cb0,_0x2133e4,_0x371ca1);},async 'emit'(_0x3bf70e){throwIfAborted(_0xd3c170),await emitEvent2(_0x15ba0d,_0x3bf70e,_0x1bfd77);},async 'stageUnchecked'(_0x4745cf,_0x3c8d9d){return await runStage(_0x2ec5f0,_0x4745cf,_0x3c8d9d,_0x371ca1);},async 'emitUnchecked'(_0x40e58e){await emitEvent2(_0x15ba0d,_0x40e58e,_0x1bfd77);}};}async function runTurn(_0x2f76b1,_0x497f7c){const _0x1c30a1={_0x3ffec8:0x74,_0x51896c:0x20,_0x577522:0x2e,_0x4b99c8:0x8c,_0x90416f:0x10c,_0x2d5d5d:0xf9,_0x2a1637:0xe5,_0x58e3be:0x14b,_0x4a34a6:0x4e,_0x2e9e15:0x40,_0x21b4d6:0x30,_0x1c67a9:0x32,_0x2b6f13:0x2e,_0x34fcc2:0x186,_0x20ae50:0x1b1,_0x222800:0x168,_0x20bde2:0x121,_0x1ae181:0x137,_0x28ba6c:0x164,_0xf9244:0x1d7,_0x133655:0x33,_0x4e7aaa:0x1a,_0x9749e8:0x90,_0x5a2746:0x7f,_0x39def1:0x122,_0x4d8c04:0xd9,_0x55c1f7:0xd0,_0x4e41bf:0xa6,_0x54f512:0x113,_0x5a903e:0x130,_0x138ee1:0xd6,_0x3df32f:0x13d,_0x22c765:0xfe,_0x51b520:0x12d,_0x5f0c55:0x15e,_0x5a3cb5:0x113,_0x301491:0xe2,_0x9826c7:0xc3,_0x3facca:0x9c,_0xe53e44:0x41,_0x341a7d:0x54,_0x1abdb4:0x19,_0x2ef9bd:0x14c,_0x1c6fdd:0x176,_0x4d4436:0x6b,_0x5c74b3:0x3e,_0x3e2de3:0xb7,_0x58b369:0x4b,_0x20ac55:0xa3,_0x2ba15a:0xe7,_0x28c9ad:0xba,_0x47e6e4:0xad,_0x45ffe2:0x13e,_0x4ef558:0xc0,_0x2155fc:0xca,_0x5e1daa:0xc0,_0xd7223a:0xd5,_0x5ca937:0x105,_0x25cae0:0x38,_0x1c922b:0x15,_0x2a75f3:0x5c,_0x23e0ee:0x115,_0x1eccb0:0x17,_0x40e53b:0x1d,_0x4b8029:0x97,_0x33d59a:0xeb,_0x4ff94e:0x57,_0x1fe422:0x36,_0x1f8e81:0x160,_0x5df760:0x153,_0x3e085b:0x196,_0x1fd97f:0x18,_0x4f39ac:0xbf,_0x19aa8b:0x10c,_0x502760:0x15f,_0x2b901a:0x13c,_0x2fe03f:0x184,_0x12fb2a:0x16d,_0x53018c:0x160,_0x580e7b:0x66,_0xf6d317:0x146,_0x2d3339:0x182,_0x515e24:0x11b,_0x396f58:0xee,_0x58d9b1:0x18b,_0x4d960a:0x1aa,_0x1e7c6b:0xc6,_0x5c99d0:0xc5,_0x398c16:0x7d,_0x28be4a:0x37,_0x5f0ad7:0x104,_0xde927:0x118,_0x5248f3:0x14a,_0x3702b0:0xda,_0x3f80c0:0x151,_0x5a340f:0x127,_0x4cc54a:0x130,_0x415f82:0x154,_0x20563b:0x5d,_0x58481f:0xd,_0xfbe537:0x67,_0x29ef21:0x15d,_0x2a9bbc:0x12c,_0x3ef823:0x14c,_0xa94012:0xaf,_0x252f72:0xb1,_0x36329a:0xff,_0x16f6f1:0x196,_0x16284c:0x17b,_0x200dbc:0x59,_0x341d4c:0xf4,_0x5a3ccc:0xcc,_0x41d9bc:0x19f,_0x5d0338:0x163,_0x3be75e:0x184,_0x55633c:0x96,_0x53adbb:0xaa,_0x57b779:0xf1,_0x3b8f63:0xeb,_0x17157e:0x18c,_0xafd6e1:0x16e},_0x4fdb7b={_0x49bddf:0xdf,_0x4f9ae1:0xe9},_0x3f6697={_0x582a05:0x3ae,_0x28b165:0x32a,_0x1622be:0x303,_0x4654d0:0x410},_0x2eecb7=_0x2f76b1[_0x2fd1c4(_0x1c30a1._0x3ffec8,_0x1c30a1._0x51896c,0x51,_0x1c30a1._0x577522)]??new AbortController()[_0x2fd1c4(0x74,0x6c,0x25,_0x1c30a1._0x4b99c8)],_0x1c5ddd={'sessionId':_0x2f76b1[_0x457858(-0x14e,-0x17a,-_0x1c30a1._0x90416f,-_0x1c30a1._0x2d5d5d)],'turnId':_0x2f76b1['turnId'],'system':normalizeSystem(_0x2f76b1[_0x457858(-0x108,-_0x1c30a1._0x2a1637,-0xb3,-_0x1c30a1._0x58e3be)]),'messages':(_0x2f76b1[_0x2fd1c4(0x38,_0x1c30a1._0x4a34a6,_0x1c30a1._0x577522,_0x1c30a1._0x2e9e15)]??[])[_0x2fd1c4(_0x1c30a1._0x21b4d6,-0xe,_0x1c30a1._0x1c67a9,_0x1c30a1._0x2b6f13)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0,'sessionDir':typeof _0x497f7c[_0x457858(-_0x1c30a1._0x34fcc2,-0x1a1,-_0x1c30a1._0x20ae50,-_0x1c30a1._0x222800)]===_0x457858(-_0x1c30a1._0x20bde2,-0xcb,-_0x1c30a1._0x1ae181,-_0x1c30a1._0x28ba6c)?_0x497f7c[_0x457858(-0x186,-0x163,-_0x1c30a1._0xf9244,-0x131)]():_0x497f7c[_0x2fd1c4(_0x1c30a1._0x133655,-_0x1c30a1._0x4e7aaa,0x76,-0xb)]},_0x24077c=makeExtensionContext(_0x1c5ddd),_0x265fe6={'sessionId':_0x1c5ddd[_0x2fd1c4(0x6b,_0x1c30a1._0x9749e8,_0x1c30a1._0x5a2746,0x7c)],'turnId':_0x1c5ddd[_0x457858(-_0x1c30a1._0x39def1,-0x142,-_0x1c30a1._0x4d8c04,-_0x1c30a1._0x55c1f7)],'state':_0x1c5ddd,'signal':_0x2eecb7,..._0x497f7c[_0x2fd1c4(_0x1c30a1._0x4e41bf,0x53,0xd8,0x78)]?{'askUser':_0x497f7c[_0x457858(-_0x1c30a1._0x54f512,-0xc0,-_0x1c30a1._0x5a903e,-_0x1c30a1._0x138ee1)]}:{},..._0x497f7c[_0x457858(-_0x1c30a1._0x3df32f,-0x11a,-_0x1c30a1._0x22c765,-0x128)]?{'setTopic':_0x497f7c[_0x457858(-0x13d,-_0x1c30a1._0x51b520,-_0x1c30a1._0x5f0c55,-_0x1c30a1._0x5a3cb5)]}:{}},{stage:_0x578fdc,emit:_0x7867c7,stageUnchecked:_0x3bf4eb,emitUnchecked:_0x53d820}=makeTurnGuards(_0x2eecb7,_0x497f7c[_0x457858(-_0x1c30a1._0x301491,-_0x1c30a1._0x9826c7,-_0x1c30a1._0x3facca,-0xd1)],_0x497f7c[_0x2fd1c4(_0x1c30a1._0xe53e44,0x42,_0x1c30a1._0x341a7d,_0x1c30a1._0x1abdb4)],_0x24077c,_0x265fe6),_0x100bd3=async(_0x43db7a,_0x2df31e)=>{const _0x355ec1={_0x11564a:0x276,_0x335d6c:0x1be},_0x2d1c05={_0xa8b16d:0x37};function _0xde8ce1(_0x563349,_0x36d9a2,_0x4b237e,_0x20a656){return _0x457858(_0x36d9a2-0x4d5,_0x20a656,_0x4b237e-0x20,_0x20a656-_0x2d1c05._0xa8b16d);}const _0x5312d8=_0x2df31e?{..._0x24077c,'turnMeta':_0x2df31e}:_0x24077c;function _0x4cacc2(_0x2faf82,_0x35627d,_0x5e4066,_0x37955c){return _0x2fd1c4(_0x2faf82-_0x355ec1._0x11564a,_0x35627d-_0x355ec1._0x335d6c,_0x37955c,_0x37955c-0x1ea);}await _0x497f7c[_0xde8ce1(0x426,0x3f3,0x3bd,_0x3f6697._0x582a05)][_0x4cacc2(_0x3f6697._0x28b165,0x2e7,_0x3f6697._0x1622be,0x34a)](_0xde8ce1(0x401,0x3f4,_0x3f6697._0x4654d0,0x3ab),structuredClone(_0x43db7a),_0x5312d8);};function _0x457858(_0x4c7038,_0x36aa41,_0x1a763a,_0x5492d4){return _0x45d766(_0x4c7038-_0x4fdb7b._0x49bddf,_0x36aa41-_0x4fdb7b._0x4f9ae1,_0x4c7038- -0x4ca,_0x36aa41);}let _0x3a9737=0x0;function _0x2fd1c4(_0x2756ba,_0x268214,_0xcc3eea,_0x28db85){return _0x26395f(_0x2756ba-0x134,_0x2756ba-0x13f,_0xcc3eea,_0x28db85-0x96);}try{const _0xc084b2=await _0x578fdc(_0x457858(-0x169,-0x1b0,-_0x1c30a1._0x2ef9bd,-0x13b),normalizeMessage(_0x2f76b1[_0x457858(-_0x1c30a1._0x1c6fdd,-0x187,-0x1a4,-0x1af)]));_0x1c5ddd[_0x2fd1c4(0x38,_0x1c30a1._0x4d4436,0x49,_0x1c30a1._0x5c74b3)][_0x2fd1c4(0xa1,0x65,0x4f,0xbb)](_0xc084b2),await _0x100bd3(_0xc084b2),await _0x7867c7({'type':_0x457858(-0xf8,-0x135,-0x137,-0xd1),'message':_0xc084b2});while(!![]){throwIfAborted(_0x2eecb7),_0x3a9737+=0x1;const _0x492313=createAssistantMessageId(_0x1c5ddd['turnId'],_0x3a9737),_0x464de8=createReasoningMessageId(_0x492313),_0x3fd9a2={'model':_0x497f7c['chatModel'][_0x2fd1c4(0x7a,_0x1c30a1._0x3e2de3,_0x1c30a1._0x58b369,0xbf)],..._0x497f7c[_0x2fd1c4(0xc0,_0x1c30a1._0x20ac55,_0x1c30a1._0x2ba15a,_0x1c30a1._0x28c9ad)][_0x2fd1c4(0x57,0x55,_0x1c30a1._0x47e6e4,_0x1c30a1._0x58b369)]?{'provider':_0x497f7c['chatModel']['provider']}:{}};let _0x329f7c={'model':_0x497f7c[_0x457858(-0xf9,-0xb9,-_0x1c30a1._0x45ffe2,-0xb3)]['model'],..._0x497f7c[_0x2fd1c4(_0x1c30a1._0x4ef558,_0x1c30a1._0x2155fc,0x85,0xfd)]['maxTokens']!==void 0x0?{'maxTokens':_0x497f7c[_0x2fd1c4(_0x1c30a1._0x5e1daa,_0x1c30a1._0xd7223a,_0x1c30a1._0x5ca937,0x7c)][_0x2fd1c4(0xd3,0x127,0xcb,0x12a)]}:{},'system':structuredClone(_0x1c5ddd['system']),'messages':structuredClone(_0x1c5ddd[_0x2fd1c4(_0x1c30a1._0x25cae0,-_0x1c30a1._0x1c922b,0x23,_0x1c30a1._0x2a75f3)]),'tools':_0x497f7c[_0x457858(-0x148,-0x15a,-0x192,-_0x1c30a1._0x23e0ee)][_0x2fd1c4(0x32,_0x1c30a1._0x1eccb0,_0x1c30a1._0x40e53b,0xd)](),'metadata':{'sessionId':_0x1c5ddd[_0x457858(-0x14e,-0x148,-0x103,-0x16e)],'turnId':_0x1c5ddd[_0x2fd1c4(_0x1c30a1._0x4b8029,0xb3,_0x1c30a1._0x33d59a,0x7f)]},..._0x497f7c[_0x2fd1c4(0x59,_0x1c30a1._0x4ff94e,0x58,_0x1c30a1._0x1fe422)]?{'outputFormat':_0x497f7c[_0x457858(-_0x1c30a1._0x1f8e81,-0x14c,-_0x1c30a1._0x5df760,-_0x1c30a1._0x3e085b)]}:{}};_0x329f7c=await _0x578fdc(_0x2fd1c4(0x5b,0x4e,0x35,_0x1c30a1._0x1fd97f),_0x329f7c),await _0x7867c7({'type':'model_request','request':_0x329f7c}),_0x3fd9a2[_0x2fd1c4(0x92,0x4a,_0x1c30a1._0x4f39ac,0x63)]=Date[_0x457858(-0x130,-0x155,-_0x1c30a1._0x19aa8b,-0x100)]();let _0x2cfce7=await executeModelRequest(_0x329f7c,_0x2f76b1,_0x497f7c,_0x265fe6,{'assistantMessageId':_0x492313,'reasoningMessageId':_0x464de8,'meta':_0x3fd9a2});_0x3fd9a2[_0x457858(-_0x1c30a1._0x502760,-_0x1c30a1._0x2b901a,-0x155,-0x114)]=Date[_0x457858(-_0x1c30a1._0x5a903e,-0x135,-0x147,-_0x1c30a1._0x2fe03f)](),_0x2cfce7=await _0x578fdc('afterModelResponse',_0x2cfce7),await _0x7867c7({'type':_0x457858(-0x119,-_0x1c30a1._0x12fb2a,-_0x1c30a1._0x53018c,-0x10a),'response':_0x2cfce7}),_0x1c5ddd[_0x2fd1c4(0xae,_0x1c30a1._0x580e7b,0xc1,0xf2)]=_0x2cfce7;let _0x157b97=await _0x578fdc(_0x457858(-0x147,-_0x1c30a1._0xf6d317,-_0x1c30a1._0x2d3339,-0xf5),withMessageId(responseToAssistantMessage(_0x2cfce7),_0x492313));_0x157b97=withMessageId(_0x157b97,_0x492313);const _0x1d4c65=getToolUseBlocks(_0x157b97),_0x5afc46=await Promise[_0x457858(-_0x1c30a1._0x515e24,-_0x1c30a1._0x396f58,-0x164,-0xf2)](_0x1d4c65['map'](_0x268647=>_0x578fdc(_0x457858(-0x17f,-0x15b,-0x135,-0x1cc),_0x268647)));_0x5afc46[_0x457858(-0x15d,-_0x1c30a1._0x58d9b1,-_0x1c30a1._0x4d960a,-0x169)]>0x0&&(_0x157b97=replaceToolUseBlocks(_0x157b97,_0x5afc46));const _0x2ebb10=withMessageId(_0x157b97,_0x492313);_0x157b97=_0x2ebb10;const _0x202f2b=createReasoningMessage(_0x157b97),_0x410f27=createAssistantTextMessage(_0x157b97),_0x36c855=createToolUseMessage(_0x157b97);_0x202f2b&&await _0x7867c7({'type':_0x2fd1c4(0x91,_0x1c30a1._0x1e7c6b,_0x1c30a1._0x5c99d0,0x7d),'message':withMessageId(_0x202f2b,_0x464de8)});_0x410f27&&await _0x7867c7({'type':_0x2fd1c4(_0x1c30a1._0x398c16,0xc4,_0x1c30a1._0x28be4a,0x87),'message':withMessageId(_0x410f27,_0x492313)});_0x36c855&&await _0x7867c7({'type':_0x457858(-_0x1c30a1._0x5f0ad7,-0x122,-0x142,-0x102),'message':withMessageId(_0x36c855,_0x492313)});_0x1c5ddd['messages'][_0x457858(-_0x1c30a1._0xde927,-_0x1c30a1._0x5248f3,-_0x1c30a1._0x3702b0,-_0x1c30a1._0x3f80c0)](_0x2ebb10);_0x5afc46[_0x457858(-0x15d,-_0x1c30a1._0x5a340f,-0x1aa,-_0x1c30a1._0x4cc54a)]>0x0&&await _0x100bd3(_0x2ebb10,_0x3fd9a2);for(const _0x539615 of _0x5afc46){await _0x7867c7({'type':_0x457858(-0x10a,-_0x1c30a1._0x415f82,-0x13a,-0x10d),'toolCall':_0x539615});}if(_0x5afc46[_0x2fd1c4(_0x1c30a1._0x2a75f3,0x84,0xb3,0x37)]===0x0){const _0x574d55=await _0x578fdc('beforeFinalOutput',_0x157b97),_0x4152ad=withMessageId(_0x574d55,_0x492313);return _0x1c5ddd['finalMessage']=_0x4152ad,_0x1c5ddd[_0x2fd1c4(_0x1c30a1._0x25cae0,0x32,_0x1c30a1._0x1eccb0,_0x1c30a1._0x20563b)][_0x1c5ddd[_0x2fd1c4(0x38,-_0x1c30a1._0x58481f,-0x9,_0x1c30a1._0xfbe537)][_0x457858(-_0x1c30a1._0x29ef21,-_0x1c30a1._0x2a9bbc,-_0x1c30a1._0x3ef823,-0x13a)]-0x1]=_0x4152ad,await _0x100bd3(_0x4152ad,_0x3fd9a2),await _0x7867c7({'type':'final_message','message':_0x4152ad}),throwIfAborted(_0x2eecb7),await _0x497f7c[_0x2fd1c4(0xd7,_0x1c30a1._0xa94012,_0x1c30a1._0x252f72,0x116)][_0x457858(-0x105,-_0x1c30a1._0x36329a,-0xe3,-0x14e)]('afterTurnComplete',_0x1c5ddd,_0x24077c),await _0x7867c7({'type':'turn_complete','state':_0x1c5ddd}),{'status':_0x457858(-0x16c,-_0x1c30a1._0x16f6f1,-_0x1c30a1._0x16284c,-0x1b5),'finalMessage':_0x4152ad,'state':_0x1c5ddd};}let _0x140475=await _0x497f7c[_0x2fd1c4(0x71,0x53,_0x1c30a1._0x200dbc,0x50)][_0x457858(-_0x1c30a1._0x341d4c,-_0x1c30a1._0x5a3ccc,-0xcb,-0xf3)](_0x5afc46,_0x265fe6);const _0x44730e=_0x140475[_0x457858(-_0x1c30a1._0x28ba6c,-0x1a0,-_0x1c30a1._0x41d9bc,-0x1a5)](isAbortedToolResult),_0x38ed20=_0x44730e?_0x3bf4eb:_0x578fdc,_0xfeea50=_0x44730e?_0x53d820:_0x7867c7;_0x140475=await Promise['all'](_0x140475['map'](_0x315c7d=>_0x38ed20('afterToolResult',_0x315c7d))),_0x1c5ddd['toolResults']['push'](..._0x140475);for(const _0x18f86c of _0x140475){await _0xfeea50({'type':_0x457858(-_0x1c30a1._0x5d0338,-0x1a0,-_0x1c30a1._0x3be75e,-0x129),'result':_0x18f86c});}const _0x2cc264=await _0x38ed20('beforeToolResultAppend',createToolResultUserMessage(_0x140475));await _0xfeea50({'type':_0x2fd1c4(_0x1c30a1._0x28c9ad,_0x1c30a1._0x55633c,_0x1c30a1._0x53adbb,_0x1c30a1._0x57b779),'message':_0x2cc264}),_0x1c5ddd['messages'][_0x457858(-_0x1c30a1._0xde927,-0xce,-_0x1c30a1._0x3b8f63,-0xfe)](_0x2cc264),await _0x100bd3(_0x2cc264);if(_0x44730e)return{'status':_0x457858(-0x16e,-0x1b4,-0x17a,-_0x1c30a1._0x17157e),'state':_0x1c5ddd};}}catch(_0x5e1271){if(!_0x2eecb7['aborted'])throw new TurnFailedError(_0x5e1271,_0x1c5ddd);return{'status':_0x457858(-_0x1c30a1._0xafd6e1,-0x1af,-0x153,-0x150),'state':_0x1c5ddd};}}function createSessionId(){const _0x37e7b7={_0x607b34:0x122,_0x39486c:0x121,_0xd2c1ce:0x182,_0xee2000:0x10b,_0x4902ad:0x17c,_0x4863a3:0x12c,_0x4b3431:0x181,_0x5ba1dd:0x151,_0x756be4:0x165,_0x3fd6ed:0x2aa,_0x27aef3:0x2cd},_0x27d979={_0x36c893:0x1d3},_0x4edb95={_0x53884d:0x1a,_0x5f0980:0x39b};function _0x20c562(_0x4c56cb,_0x21e014,_0x170ce8,_0x27ca08){return _0x26395f(_0x4c56cb-_0x4edb95._0x53884d,_0x21e014-_0x4edb95._0x5f0980,_0x4c56cb,_0x27ca08-0xd5);}function _0x57a06b(_0xac4c0b,_0x43c9c0,_0x57f640,_0x442860){return _0x26395f(_0xac4c0b-0xe,_0x57f640-0x1ff,_0x43c9c0,_0x442860-_0x27d979._0x36c893);}return'session-'+Date[_0x57a06b(_0x37e7b7._0x607b34,_0x37e7b7._0x39486c,0x149,_0x37e7b7._0xd2c1ce)]()+'-'+Math[_0x57a06b(_0x37e7b7._0xee2000,_0x37e7b7._0x4902ad,_0x37e7b7._0x4863a3,0x14d)]()[_0x57a06b(_0x37e7b7._0x4b3431,_0x37e7b7._0x5ba1dd,_0x37e7b7._0x756be4,0x1a8)](0x10)[_0x20c562(0x2fa,_0x37e7b7._0x3fd6ed,0x266,_0x37e7b7._0x27aef3)](0x2,0xa);}function _0x12e2(){const _0x6842d5=['B3v0Chv0rM9YBwf0','DhvYBKnVBxbSzxrLzef0','yMvMB3jLtw9KzwXszxf1zxn0','BgvUz3rO','Dg9VBf9YzwPLy3rLza','DgHPBMTPBMC','Dg9VBf9JB21WBgv0zwq','ywrKrxzLBNrmAxn0zw5LCG','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','CMvXDwvZDa','C2v0u2vZC2LVBKLK','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','BgLZDa','zxjYB3i','ywrK','zw50CMLLCW','CMvHC29UAw5Nq29TCgXLDgvKqxq','CMvHC29U','C2vZC2LVBKLK','CMfUzg9T','DhLWzq','AxnbCNjHEq','CMvHC29UAw5Nx2nODw5R','B2jQzwn0','Dg9VBfj1BNrPBwu','yMvMB3jLqxnZAxn0yw50qxbWzw5K','odi2odq5AKHOEwTh','C2LNBMfS','BNvTyMvY','Aw5KzxG','Dg9VBhncEu5HBwu','z2v0vg9VBhm','B3jKzxi','Bw9KzwW','DhjPBq','C2v0vg9WAwm','yxnZAxn0yw50x21LC3nHz2u','C3rYAw5NAwz5','zxHLy3v0zq','CMvJB3jKrxzLBNq','CMvNAxn0zxi','y29UDgv4DfDPBMrVD0XPBwL0','AxrLBuLK','AxrLBxm','C3rYzwfT','Dg90ywXszwfZB25PBMDuB2TLBNm','CMvTB3zLrxzLBNrmAxn0zw5LCG','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','BM93','C3rHDhvZ','C3rYzwfTAw5N','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','CMvQzwn0','C3rYAw5N','C3vTBwfYEuLUzgv4','A2LUza','CMvHC29UAw5Nx21LC3nHz2u','DhvYBLn0yxj0zwrbDa','zgvSDge','mteYotv6q2TZyxG','Dg90ywXuB2TLBNm','Bwv0CMLJCW','DhvYBKLK','zNvUy3rPB24','Dg90ywXjBNb1DfrVA2vUCW','C2v0vg9VBhm','sw52ywXPzcb0B29SigLUChv0igf0ia','C3rYDwn0DxjLza','yM9VBgvHBG','ywXS','CNvUvhjHBNnMB3jTzxjZ','Bw9KzwXFCMvZCg9UC2u','ChvZAa','B3v0Chv0sw5KzxG','Dg9VBf91C2vFy2H1BMS','y29UDgvUDa','Dg9tDhjPBMC','yxnRvxnLCG','zgvWCW','mtrduLLkAhe','ChjVDMLKzxjFCMv0CNK','DxnHz2u','C2vUza','x3n5C3rLBvbYB21WDa','Dg90ywXnB2rLBfrPBwvnCW','BgfZDfjLC3bVBNnL','Dg9VBf9JywXS','CMvXDwvZDenVDw50','C3LZDgvT','Bwv0yq','BMfTzq','CNvUt2jZzxj2zxjZ','Dg9VBf91C2vFBwvZC2fNzq','ywn0Aw9U','C3rHDgu','zgvMyxvSDe1LC3nHz2u','zMLSDgvY','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','ChjVCgvYDgLLCW','zg9Uzq','vg9VBev4zwn1DgLVBKvYCM9Y','Aw5WDxrezwX0yq','Dg90ywXpDxrWDxruB2TLBNm','y2HHDe1VzgvS','DxnLCL9TzxnZywDL','B3v0Chv0vg9Rzw5Z','Dgv4Da','C3rHz2u','zxHLy3v0zunHBgXZ','DMfSDwu','Dg9VBf91C2vFzgvSDge','oIbLEhbLy3rLzcbVyMPLy3q','mJy0mty2mMHwz2XkvW','DMfSDwvZ','zw5HyMXLza','nde4odq0nfznthbduG','Aw5WDxq','B3v0Chv0','zgvZy3jPChrPB24','CMfJzq','y2f1C2u','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','Bwf4vg9Rzw5Z','qwDLBNqGCMvXDwLYzxmGysbJAgf0tw9KzwW','Dg9VBf91C2u','B2jZzxj2zxi','CMvNAxn0CNK','ywz0zxjnzxnZywDLqxbWzw5K','CMvHC29UAw5Nvg9Rzw5Z','C2v0u3LZDgvTuhjVBxb0','Aw5WDxruB2TLBNm','mtq2nZK2nKfkBLHUyG','mZm1mZC1nujuCMPezq','Bw9KzwXFCMvXDwvZDa','oIbLEhbLy3rLzcbUDw1Izxi','y29UDgvUDeLUzgv4','BwfW','DhvYBI0','BgLZDfrVB2Xty2HLBwfZ','C2vZC2LVBKrPCG','yxnZAxn0yw50x2nODw5R','CMvHC29UAw5Nu3rHCNrLzef0','oIbLEhbLy3rLzcbHCNjHEq','CMvZCg9UC2u','BwvZC2fNzxm','oIbLEhbLy3rLzcbZDhjPBMC','yMvMB3jLvg9VBev4zwn1DgLVBG','C3LZDgvTuhjVBxb0','C2v0','Dg9VBenHBgXdB3vUDa','odHKDxzjuhm','oNjLyxnVBMLUzW','y29TCgXLDgu','B25fDMvUDa','CNvU','BwvZC2fNzq','zgvSzxrL','yxjYyxK','CMvXDwLYzwq','B25uB29Sq2fSBa','Dg9VBf9VDxrWDxrFy2H1BMS','Bw9KzwXdywXSq291BNq','ndm4mda2mfbgrM9fEG','ywjVCNrLza','AM9PBG','y29TCgXLDgvK','C2XPy2u','DhvYBKLUzgv4','B25vC2vYtwvZC2fNzq','zxH0zw5ZAw9UCW','B3bLBMfPx3jLyxnVBMLUz19KzwX0yq','BMv4Da','ywjVCNq','C29Tzq','Dg9VBf9Yzxn1Bhq','ChjVDMLKzxi','z2v0'];_0x12e2=function(){return _0x6842d5;};return _0x12e2();}function createTurnId(_0x54bed9){const _0x5a5a19={_0x54c13e:0x3a,_0x22ae49:0x99},_0x46ad40={_0x592c8b:0x1e6};function _0x38295b(_0x197f9,_0x12d650,_0x36dbd7,_0x58682c){return _0x45d766(_0x197f9-0x99,_0x12d650-_0x46ad40._0x592c8b,_0x58682c- -0x2f2,_0x12d650);}return _0x38295b(_0x5a5a19._0x54c13e,_0x5a5a19._0x22ae49,0x72,0x50)+_0x54bed9;}function createDefaultMessage(_0x3da2a4){if(_0x3da2a4===void 0x0)return void 0x0;return normalizeUserInput(_0x3da2a4);}function _0x55fb(_0x11738b,_0x10a822){_0x11738b=_0x11738b-0x68;const _0x12e2bb=_0x12e2();let _0x55fb6f=_0x12e2bb[_0x11738b];if(_0x55fb['lKovXA']===undefined){var _0x21dcbd=function(_0x3166da){const _0x1022f1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x13fa76='',_0x9d1d81='';for(let _0x558bd9=0x0,_0x5aee70,_0x1a5bbe,_0x4c4b8b=0x0;_0x1a5bbe=_0x3166da['charAt'](_0x4c4b8b++);~_0x1a5bbe&&(_0x5aee70=_0x558bd9%0x4?_0x5aee70*0x40+_0x1a5bbe:_0x1a5bbe,_0x558bd9++%0x4)?_0x13fa76+=String['fromCharCode'](0xff&_0x5aee70>>(-0x2*_0x558bd9&0x6)):0x0){_0x1a5bbe=_0x1022f1['indexOf'](_0x1a5bbe);}for(let _0x5b8567=0x0,_0x3d71a4=_0x13fa76['length'];_0x5b8567<_0x3d71a4;_0x5b8567++){_0x9d1d81+='%'+('00'+_0x13fa76['charCodeAt'](_0x5b8567)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x9d1d81);};_0x55fb['PYHBCs']=_0x21dcbd,_0x55fb['ulbADO']={},_0x55fb['lKovXA']=!![];}const _0x1ed04d=_0x12e2bb[0x0],_0x1a559a=_0x11738b+_0x1ed04d,_0x23837a=_0x55fb['ulbADO'][_0x1a559a];return!_0x23837a?(_0x55fb6f=_0x55fb['PYHBCs'](_0x55fb6f),_0x55fb['ulbADO'][_0x1a559a]=_0x55fb6f):_0x55fb6f=_0x23837a,_0x55fb6f;}function normalizeUserInput(_0x1b0521){const _0x5ef994={_0x14b1c5:0x32,_0x30960e:0x59,_0x3dc116:0x1e9},_0x341d4a={_0x5974fb:0x16b,_0xbde895:0x16d,_0x336f40:0xe3},_0x35f67f={_0x3e8ac5:0xb0,_0x47873c:0x1d7};function _0x8e471b(_0x59aeb8,_0x28f60f,_0x3fba59,_0x434d42){return _0x26395f(_0x59aeb8-_0x35f67f._0x3e8ac5,_0x434d42-0x58,_0x59aeb8,_0x434d42-_0x35f67f._0x47873c);}function _0x4aab56(_0xea0966,_0x30a95f,_0x4a1efd,_0x58dd31){return _0x26395f(_0xea0966-_0x341d4a._0x5974fb,_0x4a1efd- -_0x341d4a._0xbde895,_0x30a95f,_0x58dd31-_0x341d4a._0x336f40);}if(typeof _0x1b0521===_0x8e471b(-0xa7,-_0x5ef994._0x14b1c5,-0xa8,-_0x5ef994._0x30960e))return{'role':'user','content':[{'type':_0x4aab56(-0x23e,-0x242,-_0x5ef994._0x3dc116,-0x19b),'text':_0x1b0521}]};return normalizeMessage(_0x1b0521);}function resolveChatModel(_0x389dbb){const _0x284408={_0x2359d0:0x3a2,_0xe8727f:0x3b7,_0x5d960e:0x480,_0x167aba:0x423,_0x368d46:0x43d},_0x1d8e80={_0x1d0dee:0xe8,_0x2f25e4:0x19c},_0x348034={_0x54aa6a:0x5,_0xd5a491:0x148,_0x161f78:0x95};function _0x357c99(_0x4ef49e,_0x54852d,_0x4109eb,_0x4706e6){return _0x45d766(_0x4ef49e-_0x348034._0x54aa6a,_0x54852d-_0x348034._0xd5a491,_0x54852d-_0x348034._0x161f78,_0x4109eb);}function _0x4c482d(_0x85af4a,_0x1c839f,_0x48fb49,_0x57f984){return _0x26395f(_0x85af4a-_0x1d8e80._0x1d0dee,_0x1c839f-0x443,_0x57f984,_0x57f984-_0x1d8e80._0x2f25e4);}if(!_0x389dbb['chatModel'])throw new Error(_0x4c482d(_0x284408._0x2359d0,0x3d8,_0x284408._0xe8727f,0x40d));return _0x389dbb[_0x357c99(_0x284408._0x5d960e,0x466,_0x284408._0x167aba,_0x284408._0x368d46)];}function createRegistry(_0xf597c6){const _0x3c1b03={_0x42be77:0x34c,_0x47bbe7:0x2bc,_0x4f6b1a:0x24a,_0x3bcff5:0x15},_0xb774ef={_0x41a1eb:0x91,_0x2a9715:0xf3},_0x44e0c6={_0x272528:0xca};if(_0xf597c6[_0x172c20(0x363,_0x3c1b03._0x42be77,0x31e,0x31d)])return _0xf597c6['registry'];const _0x91f346=createExtensionRegistry();function _0x172c20(_0x187aed,_0xfa621c,_0x48b29d,_0x180c9d){return _0x45d766(_0x187aed-0x131,_0xfa621c-0x11e,_0x48b29d- -_0x44e0c6._0x272528,_0x187aed);}const _0x3b845c=_0xf597c6[_0x172c20(0x2d6,_0x3c1b03._0x47bbe7,0x298,_0x3c1b03._0x4f6b1a)]??[];function _0x50351a(_0x408dea,_0x3df30c,_0x3b6ec8,_0x4d99fc){return _0x26395f(_0x408dea-_0xb774ef._0x41a1eb,_0x3df30c-_0xb774ef._0x2a9715,_0x3b6ec8,_0x4d99fc-0x88);}for(const _0x3359a4 of _0x3b845c){_0x91f346[_0x50351a(0x6c,0x35,-_0x3c1b03._0x3bcff5,0x8b)](_0x3359a4);}return _0x91f346;}var Agent=class{[_0x45d766(0x385,0x385,0x3bd,0x3a6)];[_0x26395f(-0x6a,-0x98,-0x80,-0xe8)];[_0x45d766(0x3ef,0x3ce,0x3a7,0x3b1)];[_0x26395f(-0x126,-0xd4,-0xbf,-0x107)];[_0x26395f(-0x114,-0x107,-0xb6,-0x12d)];[_0x45d766(0x3d5,0x3c5,0x3c9,0x3ab)];[_0x45d766(0x320,0x335,0x360,0x37f)];constructor(_0x2174f4={}){const _0x18e2d6={_0x4048e3:0xb2,_0xd15d54:0xcf,_0x2ed06c:0x6e,_0x3a2acb:0x83,_0x17a6df:0x103,_0xeb2934:0x12e,_0xc24f99:0x109,_0x5e7517:0x118,_0x459c59:0x170,_0x35048c:0xed,_0x5dd377:0x180,_0x52c050:0xa8,_0x5cdfc8:0xd2,_0x42a81d:0x105,_0x30f62d:0x189,_0x22a189:0x134,_0x644c4b:0xed,_0x560d76:0xb9,_0x5035d6:0x121,_0x19e5d1:0x129,_0x344ce6:0xb0,_0x4809d8:0xbb,_0x540349:0xd6,_0x5a1634:0x10d,_0x5dc1e8:0xd7,_0xf01f1:0xaf,_0xb7c020:0x80,_0xaffcdc:0xf6,_0x56feda:0x11b,_0x11731d:0x111,_0x71b60d:0xa1,_0x58a4a6:0xde,_0x159f01:0x66,_0x488ccf:0xf5,_0x50d032:0xea,_0x48195a:0xbf,_0x3742d6:0x113},_0x28ce7e={_0x258eff:0x255,_0x585230:0x25d,_0x11bced:0x7d,_0x15cab5:0xad,_0x38ca20:0xc2},_0x306a34={_0x3cedd6:0xb4,_0x13078a:0x22},_0x21d189={_0x1cdc9c:0x11b};this[_0x51688f(-_0x18e2d6._0x4048e3,-0x9d,-_0x18e2d6._0xd15d54,-0x88)]=_0x2174f4[_0x51688f(-_0x18e2d6._0x4048e3,-_0x18e2d6._0x2ed06c,-0x98,-_0x18e2d6._0x3a2acb)]??createSessionId(),this[_0x23c134(-_0x18e2d6._0x17a6df,-_0x18e2d6._0xeb2934,-0x12f,-0x11d)]=0x0,this[_0x23c134(-_0x18e2d6._0xc24f99,-0xc8,-_0x18e2d6._0x5e7517,-0xc0)]=_0x2174f4[_0x23c134(-_0x18e2d6._0x459c59,-_0x18e2d6._0x35048c,-_0x18e2d6._0x5dd377,-0x131)]??'',this[_0x51688f(-0xe5,-_0x18e2d6._0x52c050,-0x137,-_0x18e2d6._0x5cdfc8)]=(_0x2174f4[_0x23c134(-_0x18e2d6._0x42a81d,-_0x18e2d6._0x30f62d,-0x150,-_0x18e2d6._0x22a189)]??[])[_0x51688f(-_0x18e2d6._0x644c4b,-_0x18e2d6._0x560d76,-_0x18e2d6._0x5035d6,-0x122)](normalizeMessage);function _0x23c134(_0x268a31,_0xf60368,_0x5d7ae6,_0x141863){return _0x45d766(_0x268a31-_0x21d189._0x1cdc9c,_0xf60368-0x6c,_0x141863- -0x47d,_0xf60368);}this['defaultMessage']=createDefaultMessage(_0x2174f4[_0x23c134(-_0x18e2d6._0x35048c,-0x12a,-0x137,-_0x18e2d6._0x19e5d1)]),this[_0x51688f(-0x87,-0x3e,-_0x18e2d6._0x344ce6,-_0x18e2d6._0x4809d8)]=createAgentMetrics({'getContextWindowLimit':_0x2174f4['getContextWindowLimit']});function _0x51688f(_0x1809ab,_0x3e941c,_0x59a7fb,_0x32d514){return _0x26395f(_0x1809ab-_0x306a34._0x3cedd6,_0x1809ab-_0x306a34._0x13078a,_0x3e941c,_0x32d514-0x19e);}const _0x12b66c=_0x2174f4[_0x51688f(-0xdc,-0xed,-0xc8,-0xb7)],_0x441d91=async(_0x18eb60,_0xe5c764)=>{const _0xa183f={_0x367278:0x14d,_0x1df762:0x6f};function _0x1909b1(_0x40eade,_0x1f0b67,_0xa4ef6a,_0x2752a7){return _0x23c134(_0x40eade-_0xa183f._0x367278,_0x1f0b67,_0xa4ef6a-0x1e5,_0x40eade-_0xa183f._0x1df762);}function _0x4e8c60(_0x3f7ab1,_0x1d3130,_0x4bb81e,_0x4e42f5){return _0x23c134(_0x3f7ab1-0xc,_0x4e42f5,_0x4bb81e-0xf2,_0x1d3130-0x333);}this[_0x4e8c60(_0x28ce7e._0x258eff,_0x28ce7e._0x585230,0x225,0x26c)][_0x1909b1(-_0x28ce7e._0x11bced,-_0x28ce7e._0x15cab5,-_0x28ce7e._0x38ca20,-0x5f)](_0x18eb60),await _0x12b66c?.(_0x18eb60,_0xe5c764);},_0x12bea0=createInternalToolRuntime(_0x2174f4['tools']??[],{'onEvent':_0x441d91,'onToolCall':_0x2174f4[_0x51688f(-_0x18e2d6._0x540349,-_0x18e2d6._0xc24f99,-_0x18e2d6._0x5a1634,-_0x18e2d6._0x5dc1e8)]});this[_0x23c134(-_0x18e2d6._0xf01f1,-_0x18e2d6._0xb7c020,-0xa2,-0xc5)]={'registry':createRegistry(_0x2174f4),'chatModel':resolveChatModel(_0x2174f4),'toolRuntime':_0x12bea0,'askUser':_0x2174f4[_0x23c134(-_0x18e2d6._0xaffcdc,-_0x18e2d6._0x56feda,-_0x18e2d6._0x11731d,-0xc6)],'setTopic':_0x2174f4[_0x51688f(-_0x18e2d6._0x71b60d,-_0x18e2d6._0x58a4a6,-_0x18e2d6._0x159f01,-_0x18e2d6._0x488ccf)],'onEvent':_0x441d91,'sessionDir':_0x2174f4[_0x51688f(-_0x18e2d6._0x50d032,-0x9f,-0xad,-0xe6)],'outputFormat':_0x2174f4[_0x23c134(-0xf3,-_0x18e2d6._0x48195a,-0x14e,-_0x18e2d6._0x3742d6)]};}get['systemPrompt'](){return this['_systemPrompt'];}[_0x45d766(0x375,0x36e,0x3ab,0x3cc)](_0x73fc31=[]){const _0x166427={_0xf101b0:0x3d5,_0x5779fb:0x3af,_0x284a1e:0x3a2,_0x338f20:0x3fa,_0x38d5cc:0x3eb},_0x3d89be={_0x118168:0x18e,_0x327dfc:0x36d};function _0x49ade3(_0x114a6c,_0x2de993,_0x8bce6c,_0xa5044b){return _0x45d766(_0x114a6c-0x189,_0x2de993-0x13a,_0x2de993- -0x9,_0x8bce6c);}function _0x515754(_0x6dbc48,_0x1d5ef2,_0x1b4f9e,_0x1b8b4c){return _0x45d766(_0x6dbc48-0x5d,_0x1d5ef2-_0x3d89be._0x118168,_0x1b4f9e- -_0x3d89be._0x327dfc,_0x1b8b4c);}this[_0x49ade3(_0x166427._0xf101b0,_0x166427._0x5779fb,0x3ee,0x3c9)]['toolRuntime'][_0x49ade3(0x389,_0x166427._0x284a1e,_0x166427._0x338f20,_0x166427._0x38d5cc)](_0x73fc31);}[_0x26395f(-0xcf,-0xc7,-0xf4,-0x112)](){const _0x266ff7={_0x40db6b:0xca,_0x191dab:0x124,_0x43bbd3:0x1bf},_0x1ff3ac={_0x37838a:0x1bd},_0x4cdf77={_0x9708a9:0x15b,_0x59bbc5:0x4cf};function _0x5bc1ae(_0x3f0360,_0x41685f,_0xad8d54,_0x164af7){return _0x45d766(_0x3f0360-0x2b,_0x41685f-_0x4cdf77._0x9708a9,_0xad8d54- -_0x4cdf77._0x59bbc5,_0x3f0360);}function _0x665fbf(_0x31eedd,_0x3fb7d0,_0x2acf55,_0x532982){return _0x45d766(_0x31eedd-0x1e4,_0x3fb7d0-_0x1ff3ac._0x37838a,_0x2acf55- -0x1c7,_0x532982);}return this[_0x5bc1ae(-_0x266ff7._0x40db6b,-0x13c,-0x117,-_0x266ff7._0x191dab)]['toolRuntime'][_0x665fbf(_0x266ff7._0x191dab,0x1aa,0x17c,_0x266ff7._0x43bbd3)]();}[_0x45d766(0x40a,0x3b0,0x3eb,0x433)](_0x464368,_0x20e696={}){const _0x3c4f0e={_0x3a29cd:0xe4,_0x5f5d69:0xbd,_0x5d2faf:0x30,_0x2c2520:0x6a},_0x2ead25={_0x3d1e78:0x9,_0x98f33d:0x86},_0x27bbe9={_0x4baa13:0x77,_0x4a4253:0x25,_0x26106c:0x175};this[_0x39e862(-_0x3c4f0e._0x3a29cd,-0x7d,-0xf9,-0xb8)]=_0x464368;function _0x39e862(_0x314c15,_0x6f4cba,_0x45712e,_0x2c0c63){return _0x26395f(_0x314c15-_0x27bbe9._0x4baa13,_0x2c0c63- -_0x27bbe9._0x4a4253,_0x314c15,_0x2c0c63-_0x27bbe9._0x26106c);}function _0x52ce03(_0x3ec987,_0x2c555f,_0x2d5fbf,_0x4d7648){return _0x26395f(_0x3ec987-_0x2ead25._0x3d1e78,_0x2d5fbf-_0x2ead25._0x98f33d,_0x4d7648,_0x4d7648-0x195);}_0x20e696['resetMessages']===!![]&&(this['messages']=[],this[_0x52ce03(-_0x3c4f0e._0x5f5d69,-_0x3c4f0e._0x5d2faf,-_0x3c4f0e._0x2c2520,-0x63)]=0x0);}[_0x26395f(-0xee,-0xdc,-0x121,-0x9e)](_0xab4f94){const _0x3c5ee5={_0x20852c:0xce,_0x36bcc1:0xcb,_0x1ac2ae:0xf4,_0x34b629:0x107},_0x3747f3={_0x347e60:0x44a};function _0x523a2a(_0x4a59df,_0x1b6154,_0x615a47,_0x5b65b7){return _0x45d766(_0x4a59df-0x125,_0x1b6154-0x108,_0x4a59df- -_0x3747f3._0x347e60,_0x1b6154);}this[_0x523a2a(-_0x3c5ee5._0x20852c,-_0x3c5ee5._0x36bcc1,-_0x3c5ee5._0x1ac2ae,-_0x3c5ee5._0x34b629)]=_0xab4f94;}['setChatModel'](_0xdf93b){this['deps']['chatModel']=_0xdf93b;}async[_0x45d766(0x413,0x408,0x3bc,0x369)](_0x3a048c=this[_0x26395f(-0x5b,-0x87,-0xa8,-0x82)],_0x4b4066={}){const _0x4440b4={_0x2ea847:0x21e,_0x4cc7b3:0x1c6,_0x179e35:0x1c3,_0x10b370:0x209,_0x336103:0x3a2,_0x87dcb3:0x427,_0x10d969:0x3bc,_0x277c13:0x41a,_0xf885c0:0x3e5,_0xfab16e:0x216,_0x3bc31d:0x1df,_0x517e94:0x1d6,_0x1c5448:0x3fb,_0x21c043:0x181,_0x238e64:0x1e3,_0x125504:0x219,_0x418a15:0x1ce,_0x380955:0x1c4,_0x2baa4d:0x48a,_0x3ad694:0x440,_0x2ad7eb:0x445,_0x49c1d4:0x1a5,_0x55af2a:0x1f8,_0x59899d:0x205,_0x2d5f18:0x45a,_0x2861df:0x40b,_0x526ab1:0x466},_0x5b5793={_0x16cc2e:0xd9,_0x29d4b1:0xe5},_0x5508c7={_0x4e4c54:0x12e};function _0x97a8b3(_0x54d42c,_0x1cced5,_0xf88f8d,_0x30e320){return _0x26395f(_0x54d42c-0x144,_0x54d42c-0x4ce,_0x1cced5,_0x30e320-_0x5508c7._0x4e4c54);}if(!_0x3a048c)throw new Error(_0x2b5243(0x1b5,0x22b,0x1c0,0x1ff));function _0x2b5243(_0x5ca806,_0x400e6c,_0x8021de,_0x17e7d0){return _0x26395f(_0x5ca806-_0x5b5793._0x16cc2e,_0x17e7d0-0x2dd,_0x5ca806,_0x17e7d0-_0x5b5793._0x29d4b1);}this[_0x2b5243(_0x4440b4._0x2ea847,0x1f1,_0x4440b4._0x4cc7b3,0x1ed)]+=0x1;try{const _0xb345bc=await runTurn({'sessionId':this[_0x2b5243(_0x4440b4._0x179e35,0x232,0x1fb,_0x4440b4._0x10b370)],'turnId':createTurnId(this[_0x97a8b3(0x3de,_0x4440b4._0x336103,_0x4440b4._0x87dcb3,_0x4440b4._0x10d969)]),'streaming':_0x4b4066[_0x97a8b3(_0x4440b4._0x277c13,0x3ec,0x415,_0x4440b4._0xf885c0)],'signal':_0x4b4066[_0x2b5243(_0x4440b4._0xfab16e,0x21d,0x252,0x212)],'system':this[_0x2b5243(0x206,0x1bb,0x1c9,0x1d9)],'messages':this[_0x2b5243(0x1d6,_0x4440b4._0x3bc31d,0x20a,_0x4440b4._0x517e94)],'message':normalizeUserInput(_0x3a048c)},this['deps']);return this['messages']=_0xb345bc[_0x97a8b3(0x446,0x429,0x3f5,_0x4440b4._0x1c5448)][_0x2b5243(0x1f7,_0x4440b4._0x21c043,0x22e,_0x4440b4._0x517e94)][_0x2b5243(0x1d1,_0x4440b4._0x238e64,_0x4440b4._0x125504,_0x4440b4._0x418a15)](normalizeMessage),_0xb345bc;}catch(_0x3239d4){if(_0x3239d4 instanceof TurnFailedError){this[_0x2b5243(_0x4440b4._0x380955,0x208,0x19f,0x1d6)]=synthesizeMissingToolResults(_0x3239d4[_0x97a8b3(0x446,_0x4440b4._0x2baa4d,_0x4440b4._0x3ad694,_0x4440b4._0x2ad7eb)]['messages'][_0x2b5243(_0x4440b4._0x49c1d4,_0x4440b4._0x55af2a,_0x4440b4._0x59899d,0x1ce)](normalizeMessage));throw _0x3239d4[_0x97a8b3(0x460,_0x4440b4._0x2d5f18,_0x4440b4._0x2861df,_0x4440b4._0x526ab1)];}throw _0x3239d4;}}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
@@ -1 +0,0 @@
1
- (function(_0x73535c,_0x141015){const _0x5e06f0={_0x5dd539:0x3fa,_0x3c9aa9:0x3fc,_0xcdf78a:0x293,_0x57cee4:0x29d,_0x48a6ae:0x2a4,_0x74a7cd:0x2c5,_0x1fc17a:0x2ab,_0x1e562e:0x297,_0x45fe62:0x2af,_0x513745:0x3e8,_0x250165:0x40a,_0x230ea7:0x2c4,_0x591102:0x2ad,_0x51df5a:0x2c9,_0x47abb2:0x2ba,_0x577174:0x2d0,_0x12ee2d:0x43d,_0x37f7d6:0x40f,_0x4729b0:0x420,_0x57b472:0x3ee,_0x557b54:0x40f},_0xcc9e={_0x1f4a43:0x2f2};function _0x322b02(_0x5aaed3,_0x4cdb63,_0x5b0b2c,_0x2a485a){return _0x26cf(_0x5aaed3-_0xcc9e._0x1f4a43,_0x5b0b2c);}function _0x497b72(_0x4b02c7,_0x3ae7d4,_0xaa0c78,_0x4ba554){return _0x26cf(_0x3ae7d4-0x1a7,_0x4ba554);}const _0x3c0d81=_0x73535c();while(!![]){try{const _0x3b21b0=parseInt(_0x322b02(0x3f3,_0x5e06f0._0x5dd539,0x3f8,_0x5e06f0._0x3c9aa9))/0x1+-parseInt(_0x497b72(_0x5e06f0._0xcdf78a,_0x5e06f0._0x57cee4,_0x5e06f0._0x48a6ae,0x295))/0x2*(parseInt(_0x497b72(_0x5e06f0._0x74a7cd,_0x5e06f0._0x1fc17a,_0x5e06f0._0x1e562e,_0x5e06f0._0x45fe62))/0x3)+-parseInt(_0x322b02(0x3e7,0x3df,0x3c8,_0x5e06f0._0x513745))/0x4*(parseInt(_0x322b02(0x411,0x3f2,0x414,_0x5e06f0._0x250165))/0x5)+-parseInt(_0x497b72(0x293,_0x5e06f0._0x45fe62,0x295,_0x5e06f0._0x230ea7))/0x6+parseInt(_0x497b72(0x2c9,_0x5e06f0._0x591102,_0x5e06f0._0x51df5a,0x2a1))/0x7+parseInt(_0x497b72(0x2d2,0x2bc,_0x5e06f0._0x47abb2,_0x5e06f0._0x577174))/0x8*(parseInt(_0x322b02(0x422,_0x5e06f0._0x12ee2d,_0x5e06f0._0x37f7d6,_0x5e06f0._0x4729b0))/0x9)+parseInt(_0x322b02(0x3fe,_0x5e06f0._0x57b472,_0x5e06f0._0x557b54,0x40e))/0xa;if(_0x3b21b0===_0x141015)break;else _0x3c0d81['push'](_0x3c0d81['shift']());}catch(_0x2467a3){_0x3c0d81['push'](_0x3c0d81['shift']());}}}(_0x1328,0xc0a9f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-YWQXXHHU.js';function systemToInstructions(_0xb6e51d){const _0x543ef5={_0xe2e122:0x443,_0x2f7a3c:0x47c,_0x33dc16:0x490,_0x333b5a:0x49f},_0x1193b9={_0x365831:0x38c};function _0x37d635(_0x5b5d13,_0x5a2563,_0x28afc8,_0x4a5de7){return _0x26cf(_0x5a2563-_0x1193b9._0x365831,_0x4a5de7);}function _0x268cf3(_0xf3e01e,_0x51684c,_0x4f857d,_0x2f6c77){return _0x26cf(_0x4f857d-0x331,_0x51684c);}return normalizeContent(_0xb6e51d)[_0x268cf3(0x43b,0x449,_0x543ef5._0xe2e122,0x42c)](_0x22cf85=>_0x22cf85[_0x37d635(0x46f,0x484,0x482,0x467)]===_0x37d635(0x499,0x4ac,0x4ab,0x4bb))[_0x37d635(_0x543ef5._0x2f7a3c,0x483,_0x543ef5._0x33dc16,0x498)](_0x47e52c=>_0x47e52c['text'])[_0x37d635(_0x543ef5._0x333b5a,0x4a3,0x499,0x497)]('\x0a\x0a');}function _0x1328(){const _0x2fbc65=['yxnZAxn0yw50','AM9PBG','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','C291CMnL','Dg9VBf91C2vFAwq','zwzMB3j0','C3bSAwnL','Bw9KzwW','Aw5WDxrFC2nOzw1H','mtbMtvzjyvy','Dgv4Da','BwvZC2fNzxm','DhjPBq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','B2jQzwn0','o2jHC2u2ncW','BgvUz3rO','zNvUy3rPB25Fy2fSBf9VDxrWDxq','C3vTBwfYEq','yxv0BW','CMvHC29UAw5N','C3rYDwn0DxjLzf9VDxrWDxq','DxnLCI12AxnPyMXL','B3v0Chv0rM9YBwf0','zNvUy3rPB25Fy2fSBa','ANnVBL9Zy2HLBwe','nJn6ze13CgG','ChjVDMLKzxjtDgf0zq','Aw1Hz2u','mJKYmZe2mhLtt3vtAa','mJa1ndjKEujpr1K','BwfW','DhLWzq','AxnbCNjHEq','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','BwvKAwfFDhLWzq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','Aw5WDxrFAw1Hz2u','BwvZC2fNzq','C3LZDgvT','Bwf4vg9Rzw5Z','nZy0mtq4yLzcs2fv','Aw5WDxrFDgv4Da','Dg9VBhm','mJC2DhL6u3bl','ChvZAa','ntaXnJaZoxb1B1PhtW','CM9Szq','ntaXotu5nfnKwKLHuq','A2v5CW','DMLZAwjPBgL0Eq','BMfTzq','mtu1nZGZodbywNPctfa','C3rYAw5N','zNvUy3rPB24','zgf0yq','y29UDgvUDa','C3rYAwn0','zMLSDgvY','Dg9VBf91C2u','B3v0Chv0x3rLEhq','mteZnty1nLjSD0nMEG'];_0x1328=function(){return _0x2fbc65;};return _0x1328();}function pushUserContentMessage(_0x3b042f,_0x102d55,_0x598922){const _0x4574ee={_0x3aac49:0x4bd,_0x553930:0x499,_0x4974ab:0x49e,_0x135b52:0x19,_0x45024b:0x20,_0x55f905:0x492,_0x3e3f15:0x494,_0x1936f0:0x486};if(_0x598922[_0x34aa0b(_0x4574ee._0x3aac49,0x483,_0x4574ee._0x553930,_0x4574ee._0x4974ab)]===0x0)return;function _0x34aa0b(_0x12c903,_0x3711a6,_0x481783,_0x5dd512){return _0x26cf(_0x5dd512-0x378,_0x3711a6);}function _0x5c28de(_0x5ba164,_0x438001,_0x863a1e,_0x557c4a){return _0x26cf(_0x863a1e- -0xf3,_0x438001);}_0x3b042f[_0x5c28de(0x19,_0x4574ee._0x135b52,0x12,_0x4574ee._0x45024b)]({'type':_0x34aa0b(_0x4574ee._0x55f905,_0x4574ee._0x3e3f15,_0x4574ee._0x1936f0,0x476),'role':_0x102d55,'content':_0x598922});}function hasSerializableToolUse(_0x1b4b60){const _0x98da15={_0x415953:0x216,_0x423b12:0x217,_0x1a7cf5:0x218,_0x5d232d:0x230,_0x508ef9:0x22c};function _0x1700ee(_0x476a53,_0x25abe1,_0xe77d16,_0x1fc3b2){return _0x26cf(_0x476a53-0xc0,_0xe77d16);}function _0x24ba86(_0x22b469,_0x2170e5,_0x54ae43,_0x1c88b4){return _0x26cf(_0x54ae43-0x10a,_0x22b469);}return _0x1b4b60['id'][_0x24ba86(_0x98da15._0x415953,_0x98da15._0x423b12,0x22c,_0x98da15._0x1a7cf5)]()['length']>0x0&&_0x1b4b60[_0x1700ee(0x1cb,0x1c4,0x1b7,0x1e5)][_0x24ba86(_0x98da15._0x5d232d,0x246,_0x98da15._0x508ef9,0x23c)]()['length']>0x0;}function hasSerializableToolResult(_0x5368c6){const _0x1aa1ee={_0x2bcc99:0x2e4,_0xca5eee:0x95,_0x3b0b0c:0x65},_0x278497={_0x5be197:0x1ca};function _0x332744(_0x2fbda5,_0xf0a7d6,_0x5157a1,_0xd6b419){return _0x26cf(_0xf0a7d6-_0x278497._0x5be197,_0x2fbda5);}function _0x156c51(_0xc61dc7,_0x1a8df1,_0x1b262f,_0x3cddc7){return _0x26cf(_0x1b262f- -0x198,_0xc61dc7);}return _0x5368c6[_0x332744(0x2cc,_0x1aa1ee._0x2bcc99,0x2d9,0x2e9)][_0x156c51(-_0x1aa1ee._0xca5eee,-0x6e,-0x76,-_0x1aa1ee._0x3b0b0c)]()['length']>0x0;}function isResponseInputObject(_0x47894e){const _0x3f7876={_0x500bd3:0x59,_0x11ce0c:0x25,_0x40e6d5:0x1e,_0x858dd5:0x28},_0x259da3={_0xb754c6:0x226};function _0x9b97a2(_0x3561e7,_0x1a5fb6,_0x297b12,_0x5df710){return _0x26cf(_0x297b12- -0x135,_0x5df710);}function _0xf46221(_0x2fc3b6,_0x536ca8,_0x756f64,_0x2a5148){return _0x26cf(_0x2a5148- -_0x259da3._0xb754c6,_0x2fc3b6);}if(typeof _0x47894e!=='object'||_0x47894e===null||Array[_0x9b97a2(-_0x3f7876._0x500bd3,-_0x3f7876._0x11ce0c,-0x3c,-0x26)](_0x47894e))return![];const _0x3e2474=_0x47894e;return typeof _0x3e2474['type']===_0x9b97a2(-_0x3f7876._0x40e6d5,-0x24,-_0x3f7876._0x858dd5,-0x14);}function isImageToolResultBlock(_0x22a080){const _0x39d6c6={_0x3f4aab:0x446,_0x4c0272:0x43e,_0x49bd94:0x233,_0x3031ec:0x216,_0x3ac7f6:0x1f7,_0x3ade22:0x21f,_0x41b6b5:0x21d,_0x54b95e:0x431,_0x341a36:0x422,_0x3d2cf3:0x435,_0x3c940a:0x415,_0x44e8d8:0x40d,_0xb6c9ed:0x1f9,_0x46e946:0x208,_0x1658ad:0x217,_0x5cc8aa:0x22c,_0x2e99f6:0x232},_0x1e1bcb={_0x2dca0a:0x32f};if(typeof _0x22a080!==_0x2ea73e(0x431,_0x39d6c6._0x3f4aab,_0x39d6c6._0x4c0272,0x440)||_0x22a080===null||Array['isArray'](_0x22a080))return![];function _0x2ea73e(_0x437708,_0x1478de,_0x1d0947,_0x5710c5){return _0x26cf(_0x5710c5-0x31c,_0x437708);}const _0x1b45e6=_0x22a080;function _0x3c91be(_0x2942d3,_0x382b42,_0x244b8c,_0xf22efa){return _0x26cf(_0x2942d3- -_0x1e1bcb._0x2dca0a,_0xf22efa);}return _0x1b45e6[_0x2ea73e(0x40b,0x406,0x401,0x414)]===_0x3c91be(-0x23b,-0x231,-_0x39d6c6._0x49bd94,-0x247)&&_0x1b45e6[_0x3c91be(-_0x39d6c6._0x3031ec,-_0x39d6c6._0x3ac7f6,-_0x39d6c6._0x3ade22,-_0x39d6c6._0x41b6b5)]?.[_0x2ea73e(0x425,0x405,_0x39d6c6._0x54b95e,0x414)]==='base64'&&typeof _0x1b45e6[_0x2ea73e(0x449,0x44a,_0x39d6c6._0x341a36,_0x39d6c6._0x3d2cf3)][_0x2ea73e(_0x39d6c6._0x3c940a,0x406,_0x39d6c6._0x44e8d8,0x417)]==='string'&&typeof _0x1b45e6[_0x3c91be(-0x216,-_0x39d6c6._0xb6c9ed,-0x231,-_0x39d6c6._0x46e946)]['data']===_0x3c91be(-0x222,-_0x39d6c6._0x1658ad,-_0x39d6c6._0x5cc8aa,-_0x39d6c6._0x2e99f6);}function getToolResultText(_0x3d442f){const _0x5ae3b8={_0xaff452:0x192,_0xa4d4f7:0x19e,_0x30a409:0x2af,_0x5eecb7:0x2ae},_0x56a7db={_0x17e992:0x18f,_0x29f77e:0x19c,_0xe0087e:0x1bb,_0x3acbfc:0x1a6},_0x3f5779={_0x7b99dd:0x29f};if(typeof _0x3d442f===_0x210c0b(-0x17f,-_0x5ae3b8._0xaff452,-_0x5ae3b8._0xa4d4f7,-0x178))return _0x3d442f;function _0x2a49ba(_0x287e5c,_0x2bf378,_0x524892,_0x406002){return _0x26cf(_0x287e5c- -0x3ab,_0x524892);}function _0x210c0b(_0x1f159d,_0x1a1a91,_0x388530,_0x1a955e){return _0x26cf(_0x1a1a91- -_0x3f5779._0x7b99dd,_0x1a955e);}const _0x5ac31=_0x3d442f['filter'](_0xc8e302=>{const _0x3953e7={_0x1f789e:0x90};function _0x223fcb(_0x27996f,_0x507f46,_0x520057,_0x55aa05){return _0x210c0b(_0x27996f-_0x3953e7._0x1f789e,_0x507f46-0x448,_0x520057-0x1dc,_0x55aa05);}function _0x1de1e5(_0x141b99,_0xd2e332,_0x383db3,_0x19f255){return _0x210c0b(_0x141b99-0x15c,_0xd2e332- -0x14,_0x383db3-0x3c,_0x19f255);}return typeof _0xc8e302===_0x1de1e5(-0x185,-_0x56a7db._0x17e992,-0x18e,-_0x56a7db._0x29f77e)&&_0xc8e302!==null&&_0xc8e302[_0x1de1e5(-0x1cd,-_0x56a7db._0xe0087e,-_0x56a7db._0x3acbfc,-0x1ba)]==='text';})['map'](_0xe06405=>_0xe06405[_0x210c0b(-0x16a,-0x17f,-0x198,-0x18a)])['join']('\x0a\x0a')['trim']();return _0x5ac31['length']>0x0?_0x5ac31:_0x2a49ba(-_0x5ae3b8._0x30a409,-0x2b1,-_0x5ae3b8._0x5eecb7,-0x2be);}function getToolResultImages(_0x40e874){const _0x23053d={_0x26566e:0x38b,_0x52ffb6:0x399,_0x5dd5b3:0x3a4,_0xdb8c6b:0x397},_0x1cb2c0={_0x4614f4:0x292};function _0x4855fa(_0x38af06,_0x4e3387,_0xc700f7,_0x24b2c1){return _0x26cf(_0x38af06-_0x1cb2c0._0x4614f4,_0x4e3387);}function _0x22283d(_0x215f88,_0x312646,_0x56821a,_0x451757){return _0x26cf(_0x56821a-0x3d5,_0x312646);}return Array[_0x4855fa(_0x23053d._0x26566e,_0x23053d._0x52ffb6,0x37d,0x386)](_0x40e874)?_0x40e874[_0x4855fa(_0x23053d._0x5dd5b3,0x390,0x389,_0x23053d._0xdb8c6b)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x461314){const _0x3a5ae5={_0x3651c9:0x107,_0x312ed2:0x11d,_0xcd4770:0x10a,_0x5ed881:0x111,_0x1297e5:0x159},_0x5c8115={_0x501481:0x3a};function _0xa6af03(_0x5b8a58,_0x260c56,_0x43ae6b,_0x33edcb){return _0x26cf(_0x43ae6b-_0x5c8115._0x501481,_0x33edcb);}function _0x117186(_0x5bb986,_0x5c528f,_0x3bc282,_0x42e8c9){return _0x26cf(_0x5bb986- -0x23,_0x42e8c9);}return _0x461314[_0x117186(_0x3a5ae5._0x3651c9,_0x3a5ae5._0x312ed2,_0x3a5ae5._0xcd4770,_0x3a5ae5._0x5ed881)]?.[_0xa6af03(0x148,0x133,0x144,_0x3a5ae5._0x1297e5)]??'user-visible';}function _0x26cf(_0x359b51,_0x473bd4){_0x359b51=_0x359b51-0xf3;const _0x1328ae=_0x1328();let _0x26cf55=_0x1328ae[_0x359b51];if(_0x26cf['mytnjE']===undefined){var _0x108dee=function(_0xa17192){const _0x39059f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb6e51d='',_0x22cf85='';for(let _0x47e52c=0x0,_0x3b042f,_0x102d55,_0x598922=0x0;_0x102d55=_0xa17192['charAt'](_0x598922++);~_0x102d55&&(_0x3b042f=_0x47e52c%0x4?_0x3b042f*0x40+_0x102d55:_0x102d55,_0x47e52c++%0x4)?_0xb6e51d+=String['fromCharCode'](0xff&_0x3b042f>>(-0x2*_0x47e52c&0x6)):0x0){_0x102d55=_0x39059f['indexOf'](_0x102d55);}for(let _0x1b4b60=0x0,_0x5368c6=_0xb6e51d['length'];_0x1b4b60<_0x5368c6;_0x1b4b60++){_0x22cf85+='%'+('00'+_0xb6e51d['charCodeAt'](_0x1b4b60)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x22cf85);};_0x26cf['VlSWEy']=_0x108dee,_0x26cf['NPHtbu']={},_0x26cf['mytnjE']=!![];}const _0x1cdd88=_0x1328ae[0x0],_0x38645a=_0x359b51+_0x1cdd88,_0x3991d7=_0x26cf['NPHtbu'][_0x38645a];return!_0x3991d7?(_0x26cf55=_0x26cf['VlSWEy'](_0x26cf55),_0x26cf['NPHtbu'][_0x38645a]=_0x26cf55):_0x26cf55=_0x3991d7,_0x26cf55;}function createOpenAiResponsesReasoning(_0xd8fae4){const _0x341850={_0x13df08:0x49a,_0x508a49:0x489,_0x54958e:0xb,_0x3aeffc:0xb,_0x254832:0x1,_0x24be11:0x2,_0x52d883:0x8,_0x2add95:0x14,_0x156b20:0xc,_0x485549:0x47f,_0x2fecc3:0x47f,_0x4a2d44:0x49d,_0x19ca0d:0x485,_0x2bc063:0x48a,_0x3e3cd0:0x46c},_0x1723f5=resolveOpenAiReasoningConfig(_0xd8fae4[_0x2ae52d(_0x341850._0x13df08,0x48e,_0x341850._0x508a49,0x485)]);function _0x2ae52d(_0x55e23c,_0x57aef0,_0x1b43f5,_0x2baded){return _0x26cf(_0x57aef0-0x364,_0x1b43f5);}if(!_0x1723f5)return{};const _0x388944={},_0x2c9515=_0x1723f5[_0x237459(_0x341850._0x54958e,_0x341850._0x3aeffc,_0x341850._0x254832,_0x341850._0x24be11)]??(resolveReasoningVisibility(_0xd8fae4)===_0x237459(0x9,0xf,_0x341850._0x52d883,_0x341850._0x2add95)?_0x237459(0x27,_0x341850._0x156b20,-0xe,-0xc):void 0x0);function _0x237459(_0x12f10d,_0x4e1d1c,_0x5b04ae,_0x54a284){return _0x26cf(_0x4e1d1c- -0x11d,_0x54a284);}return _0x1723f5[_0x2ae52d(0x485,_0x341850._0x485549,0x47d,0x47f)]&&(_0x388944[_0x2ae52d(0x472,_0x341850._0x2fecc3,0x47f,_0x341850._0x4a2d44)]=_0x1723f5['effort']),_0x2c9515&&(_0x388944['summary']=_0x2c9515),{..._0x1723f5['includeEncryptedContent']===![]?{}:{'include':[_0x2ae52d(0x47e,0x47c,0x479,0x495)]},...Object[_0x2ae52d(0x485,0x46d,0x452,0x486)](_0x388944)[_0x2ae52d(_0x341850._0x19ca0d,_0x341850._0x2bc063,_0x341850._0x3e3cd0,0x492)]>0x0?{'reasoning':_0x388944}:{}};}function pushAssistantProviderState(_0x1625b8,_0x17fffc){const _0x3be776={_0x398148:0x26e,_0x131429:0x28c,_0x26083e:0x273,_0x2881dc:0x252,_0x38e481:0x264,_0x5f1074:0x4b3,_0x3cb6bd:0x4f4,_0x4654be:0x4f1,_0x4596e7:0x4e3,_0x562af3:0x4f4};if(_0x17fffc[_0x105b2f(-0x26a,-_0x3be776._0x398148,-_0x3be776._0x131429,-_0x3be776._0x26083e)]!==_0x105b2f(-_0x3be776._0x2881dc,-0x283,-0x25a,-_0x3be776._0x38e481))return![];function _0x42a6f7(_0x462874,_0x9b594a,_0x54caa5,_0x5a8876){return _0x26cf(_0x5a8876-0x3c0,_0x54caa5);}const _0xb62b8d=_0x17fffc[_0x42a6f7(0x4b1,0x4bf,0x4cc,_0x3be776._0x5f1074)]?.[_0x42a6f7(_0x3be776._0x3cb6bd,_0x3be776._0x4654be,0x501,_0x3be776._0x4596e7)]??[];if(_0xb62b8d[_0x42a6f7(0x4f3,_0x3be776._0x562af3,0x4df,0x4e6)]===0x0)return![];for(const _0x43af1 of _0xb62b8d){isResponseInputObject(_0x43af1)&&_0x1625b8['push'](structuredClone(_0x43af1));}function _0x105b2f(_0x23f211,_0x26b9c3,_0x490d82,_0x520929){return _0x26cf(_0x520929- -0x37a,_0x26b9c3);}return!![];}function toOpenAiResponsesRequest(_0xcc1aa){const _0x27fc22={_0xec3f59:0x288,_0x3c437a:0x27c,_0x2d1ae8:0x42,_0x3b8c25:0x6a,_0x313da7:0x37,_0xc74f67:0x26b,_0x48700b:0x3d,_0x177871:0x32,_0x4f6b9b:0x26a,_0x4f233a:0x4c,_0x10d995:0x5f,_0x42c50c:0x59,_0x3837c1:0x41,_0x7713d5:0x237,_0x5afd31:0x24a,_0x5767b2:0x257,_0x8bd29c:0x262,_0x4bdc51:0x25b,_0x4e3245:0x261,_0x4e8c55:0x239,_0x5a3444:0x4c,_0x345553:0x275,_0x461bfb:0x27b,_0x1471ba:0x268,_0x4a2d0f:0x25a,_0x6fb761:0x280,_0x59be97:0x25a,_0x105a7c:0x249,_0x102069:0x24e,_0x21b13f:0x259,_0x41e3f1:0x269,_0x9bea2c:0x61,_0x562c49:0x7c,_0x4b1326:0x6d,_0x59975e:0x27d,_0x477d9d:0x261,_0x576b4c:0x242,_0x341d46:0x254,_0xc9ace6:0x26e,_0x250e8d:0x27d,_0x4deecb:0x267,_0x551dbb:0x270,_0x1e5f07:0x27c,_0x277d4f:0x266,_0xd64f4b:0x26e,_0x1b6301:0x7b,_0x19c310:0x24f,_0x453666:0x250,_0x55a82c:0x271,_0x1343d2:0x27a,_0x1a347d:0x25d,_0x9baf0d:0x5a,_0x10101f:0x75,_0x1bbf07:0x5c,_0x313fb4:0x26d,_0x17dae7:0x3f,_0xef43c8:0x255,_0x53da56:0x259,_0x30b3ba:0x52,_0x421e1b:0x6c,_0x2f52ae:0x86,_0x1824af:0x6e,_0x5dfb37:0x25c,_0x4a7497:0x26f,_0x4284b3:0x28f,_0x22b57a:0x287,_0x4a909d:0x283,_0x2adf2:0x25d},_0x3ff091={_0x5eee00:0x7f,_0x1f60a8:0x9a,_0x12a331:0x8a},_0x2d6fe5={_0x16b5cb:0x1e1,_0x1dc0cd:0x1b4},_0x42e115=[];function _0x4716ae(_0x2d93fa,_0x584f87,_0x5bc54a,_0x540c1d){return _0x26cf(_0x5bc54a-0x156,_0x2d93fa);}for(const _0x16d30d of _0xcc1aa[_0x4716ae(_0x27fc22._0xec3f59,0x282,0x277,_0x27fc22._0x3c437a)]){if(pushAssistantProviderState(_0x42e115,_0x16d30d))continue;const _0x398227=[];for(const _0x3b9f03 of normalizeContent(_0x16d30d[_0x394800(0x46,_0x27fc22._0x2d1ae8,_0x27fc22._0x3b8c25,0x4f)])){if(_0x3b9f03[_0x394800(0x46,_0x27fc22._0x313da7,0x27,0x37)]===_0x4716ae(_0x27fc22._0xc74f67,0x25a,0x276,0x268)){_0x398227[_0x394800(_0x27fc22._0x48700b,0x2f,_0x27fc22._0x177871,0x44)](_0x16d30d['role']==='assistant'?{'type':_0x4716ae(0x255,0x26d,_0x27fc22._0x4f6b9b,_0x27fc22._0xec3f59),'text':_0x3b9f03[_0x394800(0x53,0x77,_0x27fc22._0x4f233a,_0x27fc22._0x10d995)]}:{'type':_0x394800(0x23,0x33,_0x27fc22._0x42c50c,_0x27fc22._0x3837c1),'text':_0x3b9f03[_0x394800(0x52,0x54,_0x27fc22._0x10d995,0x5f)]});continue;}if(_0x3b9f03['type']===_0x4716ae(_0x27fc22._0x7713d5,0x233,_0x27fc22._0x5afd31,_0x27fc22._0x5767b2)){_0x398227[_0x4716ae(0x24a,_0x27fc22._0x8bd29c,_0x27fc22._0x4bdc51,_0x27fc22._0x4e3245)]({'type':_0x4716ae(_0x27fc22._0x4e8c55,0x265,0x253,0x24c),'image_url':'data:'+_0x3b9f03[_0x4716ae(0x259,0x286,0x26f,0x25a)][_0x394800(0x4b,_0x27fc22._0x5a3444,0x3a,0x3a)]+_0x4716ae(_0x27fc22._0x345553,0x26e,_0x27fc22._0x461bfb,_0x27fc22._0x1471ba)+_0x3b9f03[_0x394800(0x69,0x74,0x6b,0x58)][_0x4716ae(0x266,0x248,0x265,0x265)]});continue;}pushUserContentMessage(_0x42e115,_0x16d30d['role'],_0x398227[_0x4716ae(_0x27fc22._0x4a2d0f,_0x27fc22._0x6fb761,0x272,_0x27fc22._0x59be97)](0x0));if(_0x3b9f03[_0x4716ae(_0x27fc22._0x105a7c,0x23f,_0x27fc22._0x102069,0x258)]===_0x4716ae(0x27f,_0x27fc22._0x21b13f,_0x27fc22._0x41e3f1,0x261)){if(!hasSerializableToolUse(_0x3b9f03))continue;_0x42e115['push']({'type':_0x394800(_0x27fc22._0x9bea2c,_0x27fc22._0x562c49,0x73,_0x27fc22._0x4b1326),'call_id':_0x3b9f03['id'],'name':_0x3b9f03[_0x4716ae(0x26f,_0x27fc22._0x59975e,_0x27fc22._0x477d9d,0x270)],'arguments':JSON['stringify'](_0x3b9f03['input']??{})});continue;}if(_0x3b9f03['type']==='tool_result'){if(!hasSerializableToolResult(_0x3b9f03))continue;const _0x1261d8=getToolResultText(_0x3b9f03['content']);_0x42e115[_0x4716ae(_0x27fc22._0x576b4c,_0x27fc22._0x341d46,0x25b,0x243)]({'type':_0x4716ae(0x284,_0x27fc22._0xc9ace6,_0x27fc22._0x250e8d,_0x27fc22._0x250e8d),'call_id':_0x3b9f03[_0x4716ae(_0x27fc22._0x4deecb,0x266,_0x27fc22._0x551dbb,0x276)],'output':_0x1261d8});const _0xbdfb2c=getToolResultImages(_0x3b9f03[_0x4716ae(0x25e,_0x27fc22._0x1e5f07,_0x27fc22._0x277d4f,_0x27fc22._0xd64f4b)]);_0xbdfb2c[_0x394800(0x58,_0x27fc22._0x1b6301,0x4d,0x65)]>0x0&&_0x42e115[_0x4716ae(0x26d,0x272,_0x27fc22._0x4bdc51,0x249)]({'type':'message','role':'user','content':[{'type':'input_text','text':_0x4716ae(_0x27fc22._0x19c310,0x23b,_0x27fc22._0x453666,0x25d)+_0x3b9f03[_0x4716ae(_0x27fc22._0x55a82c,0x25a,_0x27fc22._0x551dbb,_0x27fc22._0x1343d2)]+'.'},..._0xbdfb2c['map'](_0x5bb2ab=>({'type':_0x394800(0x54,0x1d,0x3c,0x3c),'image_url':'data:'+_0x5bb2ab['source']['media_type']+';base64,'+_0x5bb2ab[_0x394800(0x40,0x67,0x5b,0x58)][_0x4716ae(0x25a,0x283,0x265,0x27e)]}))]});}}pushUserContentMessage(_0x42e115,_0x16d30d[_0x4716ae(0x23e,0x24e,_0x27fc22._0x1a347d,_0x27fc22._0x551dbb)],_0x398227);}function _0x394800(_0x4939fd,_0x2522d4,_0x14145a,_0x111a72){return _0x26cf(_0x111a72- -0xc1,_0x14145a);}return{...createOpenAiResponsesReasoning(_0xcc1aa),'model':_0xcc1aa[_0x394800(0x60,_0x27fc22._0x9baf0d,_0x27fc22._0x10101f,_0x27fc22._0x1bbf07)],'instructions':systemToInstructions(_0xcc1aa[_0x4716ae(_0x27fc22._0x8bd29c,0x26d,0x255,_0x27fc22._0x313fb4)]),'input':_0x42e115,..._0xcc1aa[_0x394800(0x39,0x38,0x52,_0x27fc22._0x17dae7)]!==void 0x0?{'max_output_tokens':_0xcc1aa[_0x4716ae(0x24f,_0x27fc22._0xef43c8,0x256,0x272)]}:{},'tools':_0xcc1aa[_0x4716ae(0x243,0x263,_0x27fc22._0x53da56,0x268)]['map'](_0x1c3ccd=>{const _0x5ebc58={_0x3c0262:0x166,_0x53610a:0x117};function _0x4ef862(_0x4ce3d9,_0x456e68,_0x40961f,_0x223800){return _0x394800(_0x4ce3d9-_0x5ebc58._0x3c0262,_0x456e68-_0x5ebc58._0x53610a,_0x223800,_0x40961f-0x41);}function _0x8225ed(_0x111152,_0x5c980e,_0x5bfc08,_0x3f463e){return _0x394800(_0x111152-0xf3,_0x5c980e-_0x2d6fe5._0x16b5cb,_0x111152,_0x5c980e- -_0x2d6fe5._0x1dc0cd);}return{'type':_0x4ef862(0xa5,_0x3ff091._0x5eee00,0x8e,_0x3ff091._0x1f60a8),'name':_0x1c3ccd['name'],'description':_0x1c3ccd['description'],'parameters':_0x1c3ccd[_0x4ef862(0xb9,0x8c,0x9e,_0x3ff091._0x12a331)]};}),..._0xcc1aa[_0x394800(_0x27fc22._0x562c49,_0x27fc22._0x30b3ba,0x66,_0x27fc22._0x421e1b)]?{'text':{'format':{'type':_0x394800(0x58,_0x27fc22._0x2f52ae,0x60,_0x27fc22._0x1824af),'name':_0xcc1aa['outputFormat'][_0x4716ae(_0x27fc22._0x5dfb37,0x25b,0x261,0x251)]??_0x394800(0x56,_0x27fc22._0x10d995,0x5c,0x6a),'schema':_0xcc1aa[_0x4716ae(_0x27fc22._0x4a7497,0x274,0x283,0x276)]['schema'],'strict':_0xcc1aa[_0x4716ae(_0x27fc22._0x4284b3,_0x27fc22._0x22b57a,_0x27fc22._0x4a909d,0x2a1)][_0x4716ae(0x27b,0x26e,0x267,_0x27fc22._0x2adf2)]??!![]}}}:{}};}export{toOpenAiResponsesRequest};