@nuvin/agent-core 0.0.0-rc.6 → 0.0.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VERSION +2 -2
- package/dist/agent/index.d.ts +40 -3
- package/dist/agent/index.js +1 -1
- package/dist/chunk-4DNIDCX7.js +1 -1
- package/dist/chunk-G2FR4UGO.js +1 -1
- package/dist/chunk-KVFXQ7HW.js +1 -0
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.d.ts +2 -2
- package/dist/formats/index.js +1 -1
- package/dist/models/index.d.ts +10 -4
- package/dist/models/index.js +1 -1
- package/dist/{provider-adapters-aW7frG5B.d.ts → provider-adapters-BGVEzrOK.d.ts} +1 -1
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/tools/index.d.ts +131 -3
- package/dist/tools/index.js +1 -1
- package/dist/{types-BS0Io2Vs.d.ts → types-mpqTRf_e.d.ts} +40 -17
- package/package.json +2 -2
- package/dist/chunk-P54V754C.js +0 -1
package/dist/VERSION
CHANGED
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
|
-
import { R as RunTurnDeps, M as Message,
|
|
2
|
-
export {
|
|
1
|
+
import { A as AgentEvent, C as ChatRequest, R as RunTurnDeps, M as Message, a as AgentOptions, b as AgentInput, c as AgentSendOptions, T as TurnResult, E as EngineChatModel, d as ExtensionRegistry, e as TurnInput } from '../types-mpqTRf_e.js';
|
|
2
|
+
export { f as TurnState } from '../types-mpqTRf_e.js';
|
|
3
|
+
|
|
4
|
+
type AgentMetricsSnapshot = {
|
|
5
|
+
totalTokens: number;
|
|
6
|
+
totalInputTokens: number;
|
|
7
|
+
totalOutputTokens: number;
|
|
8
|
+
totalReasoningTokens: number;
|
|
9
|
+
requestCount: number;
|
|
10
|
+
modelCallCount: number;
|
|
11
|
+
toolCallCount: number;
|
|
12
|
+
totalModelTimeMs: number;
|
|
13
|
+
currentTokens: number;
|
|
14
|
+
currentInputTokens: number;
|
|
15
|
+
currentOutputTokens: number;
|
|
16
|
+
currentReasoningTokens: number;
|
|
17
|
+
currentModelTimeMs: number;
|
|
18
|
+
contextWindowLimit?: number;
|
|
19
|
+
contextWindowUsage?: number;
|
|
20
|
+
};
|
|
21
|
+
type AgentMetricsChangeHandler = (snapshot: AgentMetricsSnapshot) => void;
|
|
22
|
+
type AgentMetricsOptions = {
|
|
23
|
+
getContextWindowLimit?: (request: ChatRequest) => number | undefined;
|
|
24
|
+
};
|
|
25
|
+
interface AgentMetrics {
|
|
26
|
+
getSnapshot(): AgentMetricsSnapshot;
|
|
27
|
+
recordEvent(event: AgentEvent): void;
|
|
28
|
+
reset(): void;
|
|
29
|
+
subscribe(handler: AgentMetricsChangeHandler): () => void;
|
|
30
|
+
}
|
|
31
|
+
declare function createAgentMetrics(options?: AgentMetricsOptions): AgentMetrics;
|
|
3
32
|
|
|
4
33
|
declare class Agent {
|
|
5
34
|
private _systemPrompt;
|
|
6
35
|
readonly deps: RunTurnDeps;
|
|
36
|
+
readonly metrics: AgentMetrics;
|
|
7
37
|
sessionId: string;
|
|
8
38
|
messages: Message[];
|
|
9
39
|
readonly defaultMessage?: Message;
|
|
@@ -24,8 +54,15 @@ declare class Agent {
|
|
|
24
54
|
send(input?: AgentInput | undefined, options?: AgentSendOptions): Promise<TurnResult>;
|
|
25
55
|
}
|
|
26
56
|
|
|
57
|
+
declare const SUMMARY_SYSTEM_PROMPT = "You are a session-continuity summarizer for a CLI coding assistant. The conversation you are summarizing is an in-progress coding session that was interrupted because the context window is full. Your summary will be injected into a fresh session so the assistant can resume work without losing progress.\n\nProduce a structured summary using the following sections. Omit any section that has no relevant content.\n\n### Session Goal\nState the user's original request or objective in 1-2 sentences.\n\n### Work Completed\nList what has already been done, with specifics:\n- Files created, modified, or deleted (include paths)\n- Key implementation decisions made and their rationale\n- Commands run and their outcomes (pass/fail)\n- Tests written or executed and their results\n\n### Current State\nDescribe where things stand right now:\n- What was the assistant doing when the session ended?\n- Any in-progress file edits or partially completed steps\n- Error messages, failing tests, or blockers encountered\n- The current branch, working directory, or environment state if mentioned\n\n### Remaining Work\nList what still needs to be done to complete the original goal:\n- Specific next steps, in order if sequence matters\n- Known issues or edge cases still unaddressed\n- Any pending user decisions or questions that were unanswered\n\n### Key Context\nPreserve critical details that would be expensive to re-derive:\n- Architecture or design patterns being followed\n- Important variable names, function signatures, or API shapes\n- File paths and line numbers referenced repeatedly\n- Constraints or requirements the user specified\n- Todo list items and their status (pending/in_progress/completed)\n\nRules:\n- Be precise and specific. Use exact file paths, function names, and error messages \u2014 not vague references.\n- Do NOT include conversational pleasantries, repeated back-and-forth, or exploratory dead ends that were abandoned.\n- Do NOT summarize tool calls verbatim. Capture their outcomes and decisions, not the mechanics.\n- Keep the total summary under 1500 tokens. Prioritize actionable state over narrative.\n- Write for a coding agent that will read this summary and immediately resume work, not for a human reader.";
|
|
58
|
+
declare const SUMMARY_MESSAGE_PREFIX = "Previous conversation summary:";
|
|
59
|
+
declare function summarizeMessages(messages: Message[], chatModel: EngineChatModel, options?: {
|
|
60
|
+
signal?: AbortSignal;
|
|
61
|
+
}): Promise<string>;
|
|
62
|
+
declare function buildSummaryMessage(summary: string): Message;
|
|
63
|
+
|
|
27
64
|
declare function createExtensionRegistry(): ExtensionRegistry;
|
|
28
65
|
|
|
29
66
|
declare function runTurn(input: TurnInput, deps: RunTurnDeps): Promise<TurnResult>;
|
|
30
67
|
|
|
31
|
-
export { Agent, AgentInput, AgentOptions, AgentSendOptions, ExtensionRegistry, RunTurnDeps, TurnInput, TurnResult, createExtensionRegistry, runTurn };
|
|
68
|
+
export { Agent, AgentInput, type AgentMetrics, type AgentMetricsChangeHandler, type AgentMetricsOptions, type AgentMetricsSnapshot, AgentOptions, AgentSendOptions, ExtensionRegistry, RunTurnDeps, SUMMARY_MESSAGE_PREFIX, SUMMARY_SYSTEM_PROMPT, TurnInput, TurnResult, buildSummaryMessage, createAgentMetrics, createExtensionRegistry, runTurn, summarizeMessages };
|
package/dist/agent/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xe690(_0x1d8096,_0x54a605){_0x1d8096=_0x1d8096-0xee;var _0x40636f=_0x4063();var _0xe69009=_0x40636f[_0x1d8096];if(_0xe690['Pwjpdk']===undefined){var _0x362f48=function(_0x4b790e){var _0x50c71a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2a901d='',_0x4bd862='';for(var _0x47f9bd=0x0,_0x421f56,_0x3be4ed,_0x435c0a=0x0;_0x3be4ed=_0x4b790e['charAt'](_0x435c0a++);~_0x3be4ed&&(_0x421f56=_0x47f9bd%0x4?_0x421f56*0x40+_0x3be4ed:_0x3be4ed,_0x47f9bd++%0x4)?_0x2a901d+=String['fromCharCode'](0xff&_0x421f56>>(-0x2*_0x47f9bd&0x6)):0x0){_0x3be4ed=_0x50c71a['indexOf'](_0x3be4ed);}for(var _0x16e5b8=0x0,_0x61c3cd=_0x2a901d['length'];_0x16e5b8<_0x61c3cd;_0x16e5b8++){_0x4bd862+='%'+('00'+_0x2a901d['charCodeAt'](_0x16e5b8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4bd862);};_0xe690['fWYRBI']=_0x362f48,_0xe690['TkXfVl']={},_0xe690['Pwjpdk']=!![];}var _0x364e3e=_0x40636f[0x0],_0x420415=_0x1d8096+_0x364e3e,_0x9f0c30=_0xe690['TkXfVl'][_0x420415];return!_0x9f0c30?(_0xe69009=_0xe690['fWYRBI'](_0xe69009),_0xe690['TkXfVl'][_0x420415]=_0xe69009):_0xe69009=_0x9f0c30,_0xe69009;}(function(_0x4ee528,_0xc2d3d0){var _0x360e2a={_0x27afbf:0x1fd,_0xe4edcf:0x1fa,_0x1c7444:0x201,_0x13e29b:0x1ff,_0x39527c:0x135,_0x59adc8:0x136,_0x315f3d:0x204,_0x34788f:0x1f7,_0x3cbcac:0x1f8,_0x509155:0x1fb,_0x5721da:0x13c,_0x4f5c96:0x139,_0x30792e:0x137,_0x1468d2:0x204,_0x47eda1:0x205,_0x13fa11:0x204,_0x5d2930:0x135,_0x2fff12:0x131,_0x1ac877:0x1f9},_0x59cf75={_0x4bc8d0:0x41};function _0x475b8a(_0x6ecb13,_0x20d275,_0x4f1e51,_0x3d49af){return _0xe690(_0x20d275-_0x59cf75._0x4bc8d0,_0x3d49af);}var _0x3c0291=_0x4ee528();function _0x438d1e(_0xb7ccc0,_0x4140c3,_0x336e3b,_0x2dab50){return _0xe690(_0x2dab50- -0x2f2,_0x336e3b);}while(!![]){try{var _0x50a1e5=parseInt(_0x438d1e(-_0x360e2a._0x27afbf,-_0x360e2a._0xe4edcf,-_0x360e2a._0x1c7444,-_0x360e2a._0x13e29b))/0x1+parseInt(_0x475b8a(0x132,0x137,_0x360e2a._0x39527c,0x13c))/0x2*(parseInt(_0x475b8a(_0x360e2a._0x59adc8,0x130,0x12c,0x136))/0x3)+parseInt(_0x438d1e(-0x200,-_0x360e2a._0x315f3d,-0x204,-0x200))/0x4*(parseInt(_0x438d1e(-0x1ff,-_0x360e2a._0x34788f,-_0x360e2a._0x3cbcac,-_0x360e2a._0x509155))/0x5)+-parseInt(_0x475b8a(_0x360e2a._0x5721da,_0x360e2a._0x4f5c96,_0x360e2a._0x5721da,0x134))/0x6*(-parseInt(_0x475b8a(0x137,_0x360e2a._0x39527c,0x136,_0x360e2a._0x30792e))/0x7)+parseInt(_0x438d1e(-_0x360e2a._0x1468d2,-0x201,-_0x360e2a._0x47eda1,-_0x360e2a._0x13fa11))/0x8+-parseInt(_0x475b8a(_0x360e2a._0x5d2930,0x131,0x130,_0x360e2a._0x2fff12))/0x9*(parseInt(_0x438d1e(-0x1fc,-0x200,-0x1fe,-_0x360e2a._0x1c7444))/0xa)+-parseInt(_0x438d1e(-0x1fb,-_0x360e2a._0x1ac877,-0x203,-_0x360e2a._0x27afbf))/0xb;if(_0x50a1e5===_0xc2d3d0)break;else _0x3c0291['push'](_0x3c0291['shift']());}catch(_0x1239cf){_0x3c0291['push'](_0x3c0291['shift']());}}}(_0x4063,0x7a779));import{Agent,createExtensionRegistry,runTurn}from'../chunk-P54V754C.js';import'../chunk-G2FR4UGO.js';import'../chunk-X7VAACWY.js';export{Agent,createExtensionRegistry,runTurn};function _0x4063(){var _0x2ca3ff=['mtu0mdK4nKXgvwj4BG','mZmXmtmXmMrPEeDjEq','oda2otfRAenMD3a','ndvOwxLfEfK','mta0mZmWmgTyALrkrq','mtu1mtuZmK1osLncBa','ntKYndy5AxLZqMHi','n05iwxHPsG','mti1mJC1mtviyujAtu0','mZHQD2joEgG','nxjQChnLua'];_0x4063=function(){return _0x2ca3ff;};return _0x4063();}
|
|
1
|
+
function _0xff84(_0x120768,_0x1058cb){_0x120768=_0x120768-0xf7;const _0x3be42f=_0x3be4();let _0xff841d=_0x3be42f[_0x120768];if(_0xff84['Cwbrby']===undefined){var _0x5eae84=function(_0x40dbfc){const _0x2409d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x11832b='',_0x3abad5='';for(let _0x5ed264=0x0,_0x2fe64f,_0xf1aa89,_0x55187f=0x0;_0xf1aa89=_0x40dbfc['charAt'](_0x55187f++);~_0xf1aa89&&(_0x2fe64f=_0x5ed264%0x4?_0x2fe64f*0x40+_0xf1aa89:_0xf1aa89,_0x5ed264++%0x4)?_0x11832b+=String['fromCharCode'](0xff&_0x2fe64f>>(-0x2*_0x5ed264&0x6)):0x0){_0xf1aa89=_0x2409d8['indexOf'](_0xf1aa89);}for(let _0x387aa2=0x0,_0x2828f9=_0x11832b['length'];_0x387aa2<_0x2828f9;_0x387aa2++){_0x3abad5+='%'+('00'+_0x11832b['charCodeAt'](_0x387aa2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3abad5);};_0xff84['icrnZW']=_0x5eae84,_0xff84['EJOihB']={},_0xff84['Cwbrby']=!![];}const _0x4c6a6f=_0x3be42f[0x0],_0x2ac901=_0x120768+_0x4c6a6f,_0x3acf03=_0xff84['EJOihB'][_0x2ac901];return!_0x3acf03?(_0xff841d=_0xff84['icrnZW'](_0xff841d),_0xff84['EJOihB'][_0x2ac901]=_0xff841d):_0xff841d=_0x3acf03,_0xff841d;}(function(_0x232ae4,_0x4d897d){const _0x2ca679={_0x3bf866:0x2d5,_0x11cdca:0x2eb,_0x437340:0x2e0,_0x2af085:0xd3,_0xfc3476:0xe9,_0x3934c7:0x2e4,_0x5608a1:0x2ef,_0x21aaff:0xdd,_0x3dfe1a:0xe4,_0x299c9:0x2ea,_0x3f1ceb:0x2e2,_0x52d21b:0xe0,_0x4ef787:0xec,_0x50b7c0:0xe8,_0x51ed24:0xe6,_0x349840:0xec,_0x1bab88:0xe5,_0x1fa1cb:0xe6,_0x4b4a6b:0xfa},_0x3daf7d={_0x259242:0x1ed};function _0x1b622c(_0x171d23,_0x54d738,_0x49d0d2,_0x45cc83){return _0xff84(_0x49d0d2- -_0x3daf7d._0x259242,_0x54d738);}function _0x5a7864(_0x2383bf,_0x220a07,_0x17f9a8,_0x48200c){return _0xff84(_0x220a07-0x1d8,_0x2383bf);}const _0x4158cf=_0x232ae4();while(!![]){try{const _0xdd274e=-parseInt(_0x5a7864(0x2dd,0x2ea,0x2db,0x2f5))/0x1*(parseInt(_0x5a7864(_0x2ca679._0x3bf866,0x2e3,_0x2ca679._0x11cdca,_0x2ca679._0x437340))/0x2)+parseInt(_0x1b622c(-_0x2ca679._0x2af085,-0xe5,-0xdd,-_0x2ca679._0xfc3476))/0x3*(-parseInt(_0x5a7864(0x2e1,0x2de,_0x2ca679._0x437340,0x2dc))/0x4)+parseInt(_0x5a7864(0x2d5,_0x2ca679._0x3934c7,0x2ed,_0x2ca679._0x5608a1))/0x5*(parseInt(_0x1b622c(-0xdf,-_0x2ca679._0x21aaff,-_0x2ca679._0x3dfe1a,-0xd9))/0x6)+-parseInt(_0x5a7864(_0x2ca679._0x299c9,_0x2ca679._0x3f1ceb,0x2d5,0x2d6))/0x7*(parseInt(_0x1b622c(-0xe9,-_0x2ca679._0x52d21b,-0xe0,-_0x2ca679._0x4ef787))/0x8)+parseInt(_0x1b622c(-_0x2ca679._0x50b7c0,-_0x2ca679._0xfc3476,-0xe5,-0xe5))/0x9+-parseInt(_0x1b622c(-0xe9,-_0x2ca679._0x51ed24,-_0x2ca679._0x349840,-0xe3))/0xa+parseInt(_0x1b622c(-_0x2ca679._0x1bab88,-_0x2ca679._0x1fa1cb,-0xf0,-_0x2ca679._0x4b4a6b))/0xb;if(_0xdd274e===_0x4d897d)break;else _0x4158cf['push'](_0x4158cf['shift']());}catch(_0xfba0ee){_0x4158cf['push'](_0x4158cf['shift']());}}}(_0x3be4,0xe9468));import{Agent,createAgentMetrics,createExtensionRegistry,runTurn}from'../chunk-KVFXQ7HW.js';import{getTextFromMessage}from'../chunk-G2FR4UGO.js';import'../chunk-X7VAACWY.js';function _0x9f335a(_0x1900d7,_0x165a54,_0x353673,_0x3d2650){const _0x49e3ea={_0x37af38:0x322};return _0xff84(_0x353673-_0x49e3ea._0x37af38,_0x165a54);}function roleLabel(_0x11832b){const _0x2eddf0={_0x1fd267:0xeb,_0x39b8b6:0xf7,_0x53aef6:0xec,_0x45e721:0xf1,_0x28ad4:0x106,_0x118ca8:0xf6,_0x1e8c8a:0x103,_0x4fca16:0x50},_0xed2639={_0x1f20a7:0x1ff};function _0x10e4a3(_0x379fdf,_0x4c2a1a,_0x254920,_0x99c3e1){return _0xff84(_0x99c3e1- -_0xed2639._0x1f20a7,_0x254920);}if(_0x11832b==='user')return'User';if(_0x11832b===_0x10e4a3(-_0x2eddf0._0x1fd267,-_0x2eddf0._0x39b8b6,-_0x2eddf0._0x53aef6,-_0x2eddf0._0x45e721))return _0x10e4a3(-_0x2eddf0._0x28ad4,-0xfe,-_0x2eddf0._0x118ca8,-_0x2eddf0._0x1e8c8a);function _0x65b42d(_0x20c1ef,_0x692686,_0x22b64d,_0x455136){return _0xff84(_0x20c1ef- -0xb6,_0x22b64d);}return _0x65b42d(0x49,0x46,_0x2eddf0._0x4fca16,0x4c);}function _0x317fc9(_0x55c0e1,_0x1ea22b,_0x11721c,_0x10e359){return _0xff84(_0x10e359- -0xb6,_0x55c0e1);}function messagesToText(_0x3abad5){const _0x4c28a5={_0x4004f6:0x2b1,_0x17c013:0x2a7,_0x2e128e:0x265,_0xae6be2:0x25b,_0x1b3419:0x271,_0xb49307:0x2b9,_0x1ec87e:0x2b0},_0x5a815c={_0x221f40:0x25,_0x589987:0x24,_0x42f3f6:0x30,_0x1266b2:0x40a,_0x448340:0x3f5},_0x3a7bdf={_0x3dfcfb:0x69d},_0x13a464={_0x4de18b:0x157};function _0x55cdfe(_0x354f89,_0x265e01,_0x2206b7,_0x5a801c){return _0xff84(_0x354f89-_0x13a464._0x4de18b,_0x265e01);}function _0x597b58(_0x2e2336,_0x334c40,_0x3e241d,_0x1513e3){return _0xff84(_0x1513e3- -0x3a7,_0x3e241d);}return _0x3abad5[_0x597b58(-_0x4c28a5._0x4004f6,-0x2b6,-_0x4c28a5._0x17c013,-0x2ad)](_0x5ed264=>{const _0x1dcb10={_0x57d06e:0x1c6},_0x2fe64f=getTextFromMessage(_0x5ed264)[_0x345a91(0x3b,_0x5a815c._0x221f40,_0x5a815c._0x589987,_0x5a815c._0x42f3f6)]();function _0x298cea(_0x2b0008,_0x472cbb,_0x8e6a6a,_0x31cefc){return _0x597b58(_0x2b0008-0x27,_0x472cbb-0x6b,_0x8e6a6a,_0x31cefc-_0x3a7bdf._0x3dfcfb);}function _0x345a91(_0x462040,_0x10cc1c,_0x2c07eb,_0x2526e0){return _0x597b58(_0x462040-0x94,_0x10cc1c-_0x1dcb10._0x57d06e,_0x10cc1c,_0x2526e0-0x2d2);}return _0x2fe64f?roleLabel(_0x5ed264[_0x298cea(_0x5a815c._0x1266b2,_0x5a815c._0x448340,0x3fc,0x3fd)])+':\x20'+_0x2fe64f:'';})[_0x55cdfe(0x268,_0x4c28a5._0x2e128e,_0x4c28a5._0xae6be2,_0x4c28a5._0x1b3419)](_0xf1aa89=>_0xf1aa89[_0x597b58(-0x2b3,-0x2ab,-0x29f,-0x2a9)]>0x0)[_0x597b58(-_0x4c28a5._0xb49307,-0x2a5,-0x2a5,-_0x4c28a5._0x1ec87e)]('\x0a\x0a');}var SUMMARY_SYSTEM_PROMPT=_0x317fc9(0x46,0x4c,0x44,0x43),NO_HISTORY=_0x317fc9(0x4c,0x43,0x49,0x42),SUMMARY_MESSAGE_PREFIX=_0x317fc9(0x4a,0x5d,0x49,0x4e);async function summarizeMessages(_0x55187f,_0x387aa2,_0x2828f9={}){const _0x131c74={_0x2ba6e5:0x45f,_0x35dcdf:0x45,_0x2697cf:0x39,_0x55bb68:0x4e,_0x536365:0x3c,_0x28906f:0x37,_0x32d453:0x51,_0x65cd5f:0x45e,_0x1de474:0x45c,_0x22731f:0x45b,_0x66a564:0x2d,_0x3beb94:0x22,_0x37e4f5:0x2e,_0x44e194:0x35,_0x692229:0x27,_0x2b6a8f:0x464,_0x12a85a:0x459,_0x3eca0a:0x45f,_0x17b134:0x34,_0x3ec39f:0x26,_0x534cf9:0x3f,_0x4e543f:0x462},_0x16bdc5={_0x11e393:0x144,_0x37c917:0x18},_0x55f8e1={_0x4a6f6a:0x3f};if(_0x55187f[_0x12f33e(0x454,_0x131c74._0x2ba6e5,0x460,_0x131c74._0x2ba6e5)]===0x0)return NO_HISTORY;const _0x4af3c2=messagesToText(_0x55187f),_0x46b701={'model':_0x387aa2[_0x1337aa(_0x131c74._0x35dcdf,_0x131c74._0x2697cf,_0x131c74._0x55bb68,_0x131c74._0x536365)],'maxTokens':_0x387aa2[_0x1337aa(0x46,_0x131c74._0x28906f,0x53,_0x131c74._0x32d453)]??0x1000,'system':[{'type':_0x12f33e(_0x131c74._0x65cd5f,_0x131c74._0x1de474,0x458,_0x131c74._0x22731f),'text':SUMMARY_SYSTEM_PROMPT}],'messages':[{'role':'user','content':[{'type':_0x1337aa(_0x131c74._0x66a564,_0x131c74._0x3beb94,_0x131c74._0x37e4f5,0x21),'text':_0x4af3c2}]}],'tools':[],'metadata':{'sessionId':_0x1337aa(_0x131c74._0x44e194,_0x131c74._0x692229,0x31,0x3b),'turnId':_0x12f33e(0x45f,_0x131c74._0x2b6a8f,_0x131c74._0x12a85a,_0x131c74._0x3eca0a)}};function _0x12f33e(_0x13c84e,_0x224a7a,_0x266043,_0x37fc20){return _0x9f335a(_0x13c84e-0xc8,_0x13c84e,_0x224a7a-_0x55f8e1._0x4a6f6a,_0x37fc20-0x24);}const _0x2406a5=await _0x387aa2['complete'](_0x46b701,{'signal':_0x2828f9['signal']});function _0x1337aa(_0x493b37,_0xf8372,_0x512c06,_0x19bd53){return _0x317fc9(_0x19bd53,_0xf8372-_0x16bdc5._0x11e393,_0x512c06-0x20,_0x493b37- -_0x16bdc5._0x37c917);}return _0x2406a5[_0x1337aa(_0x131c74._0x17b134,_0x131c74._0x3ec39f,0x3d,0x43)][_0x1337aa(0x43,0x3f,_0x131c74._0x55bb68,_0x131c74._0x534cf9)](_0x174110=>_0x174110[_0x12f33e(0x46c,0x461,0x46e,0x470)]===_0x1337aa(0x2d,0x2e,0x29,0x39))[_0x12f33e(0x45a,0x45b,_0x131c74._0x4e543f,0x458)](_0x259a87=>_0x259a87[_0x12f33e(0x46a,0x45c,0x46b,0x45e)])['join']('')['trim']();}function _0x3be4(){const _0x4b64f9=['tM8Gy29UDMvYC2f0Aw9UigHPC3rVCNKGDg8GC3vTBwfYAxPLlG','ww91igfYzsbHihnLC3nPB24Ty29UDgLUDwL0EsbZDw1TyxjPEMvYigzVCIbHienmssbJB2rPBMCGyxnZAxn0yw50lIbuAguGy29UDMvYC2f0Aw9UihLVDsbHCMuGC3vTBwfYAxPPBMCGAxmGyw4GAw4TChjVz3jLC3mGy29KAw5NihnLC3nPB24GDgHHDcb3yxmGAw50zxjYDxb0zwqGyMvJyxvZzsb0AguGy29UDgv4Dcb3Aw5KB3CGAxmGzNvSBc4Gww91CIbZDw1Tyxj5ihDPBgWGyMuGAw5Qzwn0zwqGAw50BYbHigzYzxnOihnLC3nPB24GC28GDgHLigfZC2LZDgfUDcbJyw4GCMvZDw1LihDVCMSGD2L0Ag91DcbSB3nPBMCGChjVz3jLC3mUcGPqCM9KDwnLigeGC3rYDwn0DxjLzcbZDw1Tyxj5ihvZAw5NihrOzsbMB2XSB3DPBMCGC2vJDgLVBNmUie9TAxqGyw55ihnLy3rPB24GDgHHDcbOyxmGBM8GCMvSzxzHBNqGy29UDgvUDc4kcImJiYbtzxnZAw9UieDVywWku3rHDguGDgHLihvZzxiNCYbVCMLNAw5HBcbYzxf1zxn0ig9Yig9IAMvJDgL2zsbPBIaXltiGC2vUDgvUy2vZlGOkiYmJifDVCMSGq29TCgXLDgvKcKXPC3qGD2HHDcbOyxmGywXYzwfKEsbIzwvUigrVBMuSihDPDgGGC3bLy2LMAwnZoGOTiezPBgvZignYzwf0zwqSig1VzgLMAwvKlcbVCIbKzwXLDgvKicHPBMnSDwrLihbHDgHZkqOTieTLEsbPBxbSzw1LBNrHDgLVBIbKzwnPC2LVBNmGBwfKzsbHBMqGDgHLAxiGCMf0Aw9UywXLcI0Gq29TBwfUzhmGCNvUigfUzcb0AgvPCIbVDxrJB21LCYaOCgfZCY9MywLSkqOTifrLC3rZihDYAxr0zw4GB3iGzxHLy3v0zwqGyw5KihrOzwLYihjLC3vSDhmkcImJiYbdDxjYzw50ifn0yxrLcKrLC2nYAwjLihDOzxjLihrOAw5NCYbZDgfUzcbYAwDODcbUB3C6cI0Gv2HHDcb3yxmGDgHLigfZC2LZDgfUDcbKB2LUzYb3AgvUihrOzsbZzxnZAw9UigvUzgvKpWOTiefUEsbPBI1WCM9NCMvZCYbMAwXLigvKAxrZig9YihbHCNrPywXSEsbJB21WBgv0zwqGC3rLChmklsbfCNjVCIbTzxnZywDLCYWGzMfPBgLUzYb0zxn0CYWGB3iGyMXVy2TLCNmGzw5JB3vUDgvYzwqklsbuAguGy3vYCMvUDcbICMfUy2GSihDVCMTPBMCGzgLYzwn0B3j5lcbVCIbLBNzPCM9UBwvUDcbZDgf0zsbPzIbTzw50Aw9UzwqkcImJiYbszw1HAw5PBMCGv29YAWPmAxn0ihDOyxqGC3rPBgWGBMvLzhmGDg8GyMuGzg9Uzsb0BYbJB21WBgv0zsb0AguGB3jPz2LUywWGz29HBdOklsbtCgvJAwzPyYbUzxH0ihn0zxbZlcbPBIbVCMrLCIbPzIbZzxf1zw5JzsbTyxr0zxjZcI0Gs25VD24GAxnZDwvZig9YigvKz2uGy2fZzxmGC3rPBgWGDw5HzgrYzxnZzwqklsbbBNKGCgvUzgLUzYb1C2vYigrLy2LZAw9UCYbVCIbXDwvZDgLVBNmGDgHHDcb3zxjLihvUyw5ZD2vYzwqkcImJiYblzxKGq29UDgv4DaPqCMvZzxj2zsbJCML0AwnHBcbKzxrHAwXZihrOyxqGD291BgqGyMuGzxHWzw5ZAxzLihrVihjLlwrLCML2ztOklsbbCMnOAxrLy3r1CMuGB3iGzgvZAwDUihbHDhrLCM5ZigjLAw5NigzVBgXVD2vKcI0Gsw1WB3j0yw50ihzHCMLHyMXLig5HBwvZlcbMDw5JDgLVBIbZAwDUyxr1CMvZlcbVCIbbueKGC2HHCgvZcI0GrMLSzsbWyxrOCYbHBMqGBgLUzsbUDw1IzxjZihjLzMvYzw5JzwqGCMvWzwf0zwrSEqOTienVBNn0CMfPBNrZig9YihjLCxvPCMvTzw50CYb0AguGDxnLCIbZCgvJAwzPzwqklsbuB2rVigXPC3qGAxrLBxmGyw5KihrOzwLYihn0yxr1CYaOCgvUzgLUzY9PBL9WCM9NCMvZCY9JB21WBgv0zwqPcGPsDwXLCZOklsbczsbWCMvJAxnLigfUzcbZCgvJAwzPyY4GvxnLigv4ywn0igzPBguGCgf0AhmSigz1BMn0Aw9Uig5HBwvZlcbHBMqGzxjYB3iGBwvZC2fNzxmG4Ocuig5VDcb2ywD1zsbYzwzLCMvUy2vZlGOTierVie5pvcbPBMnSDwrLignVBNzLCNnHDgLVBMfSihbSzwfZyw50CMLLCYWGCMvWzwf0zwqGyMfJAY1HBMqTzM9YDgGSig9Yigv4CgXVCMf0B3j5igrLywqGzw5KCYb0Agf0ihDLCMuGywjHBMrVBMvKlGOTierVie5pvcbZDw1TyxjPEMuGDg9VBcbJywXSCYb2zxjIyxrPBs4Gq2fWDhvYzsb0AgvPCIbVDxrJB21LCYbHBMqGzgvJAxnPB25ZlcbUB3qGDgHLig1Ly2HHBMLJCY4klsblzwvWihrOzsb0B3rHBcbZDw1Tyxj5ihvUzgvYide1mdaGDg9Rzw5ZlIbqCMLVCML0AxPLigfJDgLVBMfIBguGC3rHDguGB3zLCIbUyxjYyxrPDMuUcI0Gv3jPDguGzM9YigeGy29KAw5NigfNzw50ihrOyxqGD2LSBcbYzwfKihrOAxmGC3vTBwfYEsbHBMqGAw1TzwrPyxrLBhKGCMvZDw1LihDVCMSSig5VDcbMB3iGysbODw1HBIbYzwfKzxiU','BwfW','Dgv4Da','qxnZAxn0yw50','ndGZndqWnJviD2fxrw8','BgvUz3rO','vg9VBa','DhLWzq','mtC4nta3mfjhq0flrW','y29UDgvUDa','C3vTBwfYEq','uhjLDMLVDxmGy29UDMvYC2f0Aw9Uihn1Bw1HCNK6','DhjPBq','mtG4mJi4mgr3quLMAW','CM9Szq','mta2otmXnJfts0PMt1G','mtmYodrNAgLStva','n1H4vND3zG','mtCXndiYDM5WzM5r','mtKXnvDLqvDMra','mtiYmZi2ndHWC05IsLO','yxnZAxn0yw50','DxnLCG','mtjUs3bOCMK','zMLSDgvY','mJj3ExbdDve','Bw9KzwW','Bwf4vg9Rzw5Z','AM9PBG'];_0x3be4=function(){return _0x4b64f9;};return _0x3be4();}function buildSummaryMessage(_0x3f66ef){const _0x333ed3={_0x23b149:0x2fe,_0x3262b5:0x2f3,_0x10804a:0x2f2,_0x3bc500:0x2ea,_0x4d1d43:0x2e9,_0x1ba330:0x2df},_0xc6572c={_0x3e4b9c:0x485},_0x3480e7={_0x2e90b7:0x6e};function _0x531339(_0x538a69,_0x5a4710,_0x5064c8,_0x371a04){return _0x9f335a(_0x538a69-0xb8,_0x5a4710,_0x538a69- -0x133,_0x371a04-_0x3480e7._0x2e90b7);}function _0x2e7ac4(_0x49183f,_0x449404,_0x16aa56,_0x4229f3){return _0x317fc9(_0x4229f3,_0x449404-0x11e,_0x16aa56-0x14a,_0x49183f-_0xc6572c._0x3e4b9c);}return{'role':_0x531339(_0x333ed3._0x23b149,_0x333ed3._0x3262b5,0x303,_0x333ed3._0x10804a),'content':[{'type':_0x531339(_0x333ed3._0x3bc500,_0x333ed3._0x4d1d43,_0x333ed3._0x1ba330,0x2f8),'text':SUMMARY_MESSAGE_PREFIX+'\x0a\x0a'+_0x3f66ef}]};}export{Agent,SUMMARY_MESSAGE_PREFIX,SUMMARY_SYSTEM_PROMPT,buildSummaryMessage,createAgentMetrics,createExtensionRegistry,runTurn,summarizeMessages};
|
package/dist/chunk-4DNIDCX7.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x7200bc,_0x2caeb9){const _0x5dc98e={_0x4631d8:0x22,_0x578378:0xf9,_0x5d2f54:0x11f,_0x1deeb3:0x63,_0x4e1e3d:0x49,_0x13c45d:0x55,_0x18087c:0x10d,_0x60196:0x118,_0x305e56:0xfa,_0x5717af:0x103,_0x28942f:0xe0,_0x5a1135:0x10a,_0x17e9c7:0x128,_0x1e60d5:0x111,_0x5c3383:0x12,_0x2ad0d1:0x38,_0x3b5af1:0x110,_0xf2f6b8:0x108,_0x32e7ed:0x112,_0x22403a:0xe9,_0x19d79c:0x46,_0x11c5a5:0x21,_0x23cd8b:0x1f},_0x3edb84={_0x3a0fd1:0x120};function _0x9f94f1(_0x5365c1,_0x58feef,_0xde55d5,_0x76be75){return _0x55e4(_0x58feef-0x1a,_0x76be75);}const _0x3ac232=_0x7200bc();function _0x509c01(_0x13017b,_0x3b21d7,_0x3303ec,_0xaa0530){return _0x55e4(_0x13017b- -_0x3edb84._0x3a0fd1,_0x3b21d7);}while(!![]){try{const _0x20b508=-parseInt(_0x509c01(-0x33,-0x26,-_0x5dc98e._0x4631d8,-0x23))/0x1*(-parseInt(_0x9f94f1(_0x5dc98e._0x578378,0x112,0x124,_0x5dc98e._0x5d2f54))/0x2)+-parseInt(_0x509c01(-0x45,-_0x5dc98e._0x1deeb3,-0x58,-_0x5dc98e._0x4e1e3d))/0x3*(parseInt(_0x509c01(-0x3c,-0x2c,-_0x5dc98e._0x13c45d,-0x3f))/0x4)+parseInt(_0x9f94f1(_0x5dc98e._0x18087c,0x10f,_0x5dc98e._0x60196,0x111))/0x5*(parseInt(_0x9f94f1(0x117,_0x5dc98e._0x305e56,0x10a,_0x5dc98e._0x5717af))/0x6)+parseInt(_0x9f94f1(0xf5,0xf1,_0x5dc98e._0x28942f,0x100))/0x7*(parseInt(_0x9f94f1(_0x5dc98e._0x5a1135,0x116,_0x5dc98e._0x17e9c7,_0x5dc98e._0x1e60d5))/0x8)+-parseInt(_0x509c01(-0x26,-_0x5dc98e._0x5c3383,-0x14,-_0x5dc98e._0x2ad0d1))/0x9*(parseInt(_0x9f94f1(_0x5dc98e._0x3b5af1,_0x5dc98e._0xf2f6b8,_0x5dc98e._0x32e7ed,_0x5dc98e._0x22403a))/0xa)+parseInt(_0x509c01(-0x2f,-_0x5dc98e._0x19d79c,-0x22,-0x1b))/0xb+parseInt(_0x509c01(-_0x5dc98e._0x11c5a5,-0x21,-0x5,-0x5))/0xc*(-parseInt(_0x509c01(-_0x5dc98e._0x23cd8b,-0x30,-0xf,-0x31))/0xd);if(_0x20b508===_0x2caeb9)break;else _0x3ac232['push'](_0x3ac232['shift']());}catch(_0x531816){_0x3ac232['push'](_0x3ac232['shift']());}}}(_0x2a76,0x6101f));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x2e593f){const _0x4ca23e={_0x3d67b6:0x31b,_0x323d14:0x311},_0x2ef67c={_0x4e20b9:0x75};function _0x2d2514(_0x108d7a,_0x9747b,_0x3af2f8,_0x1aa7ac){return _0x55e4(_0x3af2f8- -_0x2ef67c._0x4e20b9,_0x9747b);}function _0x277825(_0x4ba280,_0xd75793,_0x596392,_0xc4791c){return _0x55e4(_0x596392-0x238,_0xd75793);}return normalizeContent(_0x2e593f)[_0x277825(0x308,0x325,_0x4ca23e._0x3d67b6,_0x4ca23e._0x323d14)](_0x1165a5=>_0x1165a5[_0x277825(0x340,0x334,0x349,0x33a)]===_0x277825(0x31f,0x310,0x314,0x312))['map'](_0x1e75e4=>_0x1e75e4['text'])['join']('\x0a\x0a');}function pushUserContentMessage(_0x362846,_0x1d9901,_0x3817ea){const _0x12825e={_0x3d2e67:0x7c,_0x18f736:0x6d,_0xcffe2b:0x29,_0x1c692a:0x1f,_0x48bde1:0x10,_0x32100b:0x24},_0x37d6ef={_0x17f4fc:0xf3};function _0x30ec4d(_0x1fce4d,_0x2bd2cb,_0x5944bb,_0x379414){return _0x55e4(_0x379414- -0xb3,_0x2bd2cb);}function _0x410d78(_0x242e9d,_0x38e507,_0xee67f5,_0x3b061c){return _0x55e4(_0x242e9d- -_0x37d6ef._0x17f4fc,_0x38e507);}if(_0x3817ea[_0x30ec4d(0x50,_0x12825e._0x3d2e67,_0x12825e._0x18f736,0x60)]===0x0)return;_0x362846[_0x30ec4d(_0x12825e._0xcffe2b,0x4a,_0x12825e._0x1c692a,0x33)]({'type':_0x410d78(_0x12825e._0x48bde1,_0x12825e._0x32100b,0x3,0xb),'role':_0x1d9901,'content':_0x3817ea});}function _0x55e4(_0x636da6,_0x3a509e){_0x636da6=_0x636da6-0xd7;const _0x2a7626=_0x2a76();let _0x55e459=_0x2a7626[_0x636da6];if(_0x55e4['rbYYFb']===undefined){var _0x2f3e27=function(_0x2acdc0){const _0x43cdbd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e593f='',_0x1165a5='';for(let _0x1e75e4=0x0,_0x362846,_0x1d9901,_0x3817ea=0x0;_0x1d9901=_0x2acdc0['charAt'](_0x3817ea++);~_0x1d9901&&(_0x362846=_0x1e75e4%0x4?_0x362846*0x40+_0x1d9901:_0x1d9901,_0x1e75e4++%0x4)?_0x2e593f+=String['fromCharCode'](0xff&_0x362846>>(-0x2*_0x1e75e4&0x6)):0x0){_0x1d9901=_0x43cdbd['indexOf'](_0x1d9901);}for(let _0x5594e8=0x0,_0x64f7ae=_0x2e593f['length'];_0x5594e8<_0x64f7ae;_0x5594e8++){_0x1165a5+='%'+('00'+_0x2e593f['charCodeAt'](_0x5594e8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1165a5);};_0x55e4['pOGYaG']=_0x2f3e27,_0x55e4['DncdGc']={},_0x55e4['rbYYFb']=!![];}const _0x4c2b91=_0x2a7626[0x0],_0x78160c=_0x636da6+_0x4c2b91,_0x3fccbc=_0x55e4['DncdGc'][_0x78160c];return!_0x3fccbc?(_0x55e459=_0x55e4['pOGYaG'](_0x55e459),_0x55e4['DncdGc'][_0x78160c]=_0x55e459):_0x55e459=_0x3fccbc,_0x55e459;}function hasSerializableToolUse(_0x5594e8){const _0x4482e3={_0x13eec4:0x298,_0x542af2:0x290,_0x27945b:0x274,_0x2da9a9:0x164,_0x49b9fa:0x180,_0x5ef09b:0x16b,_0x7b582f:0x194,_0x29ba1f:0x19f,_0x477a25:0x19c,_0x4af38d:0x171,_0x302d7d:0x171,_0x3b6deb:0x16f,_0x2e8b4b:0x297,_0x2f46a1:0x28b};function _0x54b08c(_0xf3012c,_0x4b4b02,_0x52fc93,_0x2601a6){return _0x55e4(_0xf3012c- -0x277,_0x2601a6);}function _0x426dd6(_0x858cfb,_0x872606,_0x10a81b,_0x4473bd){return _0x55e4(_0x10a81b- -0x396,_0x4473bd);}return _0x5594e8['id'][_0x426dd6(-0x276,-_0x4482e3._0x13eec4,-_0x4482e3._0x542af2,-_0x4482e3._0x27945b)]()[_0x54b08c(-_0x4482e3._0x2da9a9,-_0x4482e3._0x49b9fa,-_0x4482e3._0x5ef09b,-0x165)]>0x0&&_0x5594e8[_0x54b08c(-0x19d,-_0x4482e3._0x7b582f,-_0x4482e3._0x29ba1f,-_0x4482e3._0x477a25)][_0x54b08c(-_0x4482e3._0x4af38d,-_0x4482e3._0x302d7d,-_0x4482e3._0x3b6deb,-0x16f)]()[_0x426dd6(-_0x4482e3._0x2e8b4b,-0x284,-0x283,-_0x4482e3._0x2f46a1)]>0x0;}function hasSerializableToolResult(_0x64f7ae){const _0x3a8269={_0x19cb1c:0x218};function _0x35091c(_0xaa08d3,_0x18db67,_0x5e766e,_0x3ffa82){return _0x55e4(_0x18db67- -0x2ed,_0x3ffa82);}return _0x64f7ae[_0x35091c(-0x1ec,-0x1fd,-_0x3a8269._0x19cb1c,-0x1e4)]['trim']()['length']>0x0;}function isResponseInputObject(_0x3e4c62){const _0x5e6df1={_0x15042b:0x3e,_0x389e0b:0x3f,_0x21a1d4:0x27,_0x2f0d93:0xba,_0x382dd0:0xc8,_0x346ce8:0x1e,_0x11f6a0:0x9,_0x5b41c2:0x28,_0x37e859:0x35},_0x11a849={_0x253836:0x46},_0x59186d={_0x225203:0x11a};function _0x5eb04c(_0x375507,_0x51ceff,_0x286ec0,_0x522e1d){return _0x55e4(_0x522e1d- -_0x59186d._0x225203,_0x286ec0);}if(typeof _0x3e4c62!==_0x5eb04c(-_0x5e6df1._0x15042b,-_0x5e6df1._0x389e0b,-0x12,-_0x5e6df1._0x21a1d4)||_0x3e4c62===null||Array[_0x5ed9ad(0xa2,0xb7,_0x5e6df1._0x2f0d93,_0x5e6df1._0x382dd0)](_0x3e4c62))return![];function _0x5ed9ad(_0x3f3c07,_0x322388,_0x595497,_0x3f3d45){return _0x55e4(_0x322388- -_0x11a849._0x253836,_0x3f3d45);}const _0x3d537d=_0x3e4c62;return typeof _0x3d537d[_0x5eb04c(0xc,-_0x5e6df1._0x346ce8,0x9,-_0x5e6df1._0x11f6a0)]===_0x5eb04c(-_0x5e6df1._0x5b41c2,-0x32,-0x49,-_0x5e6df1._0x37e859);}function isImageToolResultBlock(_0x44d2d2){const _0x2595b1={_0x1accaf:0x2e3,_0x52b846:0x2c4,_0x22d46f:0x147,_0x572b7f:0x151,_0xd6c651:0x15c,_0x12def5:0x175,_0x4d71e4:0x16d,_0x1d101c:0x2e0,_0x56cf4b:0x2cb,_0x116799:0x299,_0x3e14aa:0x2c4,_0x55d899:0x2b6,_0x59fd0c:0x29f},_0x126a77={_0x521bc9:0x58};function _0x36ec01(_0x268696,_0xfb4e38,_0x8fa478,_0xfd31ca){return _0x55e4(_0x268696-_0x126a77._0x521bc9,_0xfb4e38);}if(typeof _0x44d2d2!==_0x53590d(0x2ba,_0x2595b1._0x1accaf,_0x2595b1._0x52b846,0x2ad)||_0x44d2d2===null||Array['isArray'](_0x44d2d2))return![];const _0x9b789=_0x44d2d2;function _0x53590d(_0x46e81a,_0x10c660,_0x13c05d,_0x37b41c){return _0x55e4(_0x13c05d-0x1d1,_0x37b41c);}return _0x9b789['type']===_0x36ec01(0x136,_0x2595b1._0x22d46f,_0x2595b1._0x572b7f,0x11e)&&_0x9b789['source']?.['type']==='base64'&&typeof _0x9b789['source']['media_type']==='string'&&typeof _0x9b789[_0x36ec01(_0x2595b1._0xd6c651,0x145,_0x2595b1._0x12def5,_0x2595b1._0x4d71e4)][_0x53590d(0x2d1,0x2d7,_0x2595b1._0x1d101c,_0x2595b1._0x56cf4b)]===_0x53590d(_0x2595b1._0x116799,_0x2595b1._0x3e14aa,_0x2595b1._0x55d899,_0x2595b1._0x59fd0c);}function getToolResultText(_0x377516){const _0x54f684={_0xaccdb2:0x318,_0x4ad649:0x335,_0xcfdfc3:0x31f,_0xb23576:0x333,_0x4bb694:0x339,_0x45cbf8:0x335,_0x2ae618:0x30d,_0x272a12:0x356,_0x4dbb9a:0x363,_0x127259:0x35f,_0x2f83f7:0x355,_0x193c75:0x361},_0x1cbcc0={_0x1811cb:0x250},_0x4e2f0f={_0x509ca3:0xc6,_0x4c3729:0xba,_0x472c9c:0xdf,_0x4916e2:0xa6,_0x5ac178:0xa8,_0x4a2b49:0xbb,_0x37807d:0x62,_0x1ae422:0x93},_0x1d4963={_0x30f782:0x3d7};function _0x1b3caa(_0x3b058e,_0xf45872,_0xd4b109,_0xe06f61){return _0x55e4(_0xd4b109- -_0x1d4963._0x30f782,_0xf45872);}if(typeof _0x377516===_0x4b536a(_0x54f684._0xaccdb2,_0x54f684._0x4ad649,0x354,0x350))return _0x377516;const _0x290aa5=_0x377516[_0x4b536a(_0x54f684._0xcfdfc3,_0x54f684._0xb23576,0x346,0x324)](_0x43d4f9=>{const _0x197cf8={_0x3ec00c:0xa7},_0x5f44ab={_0x33a74d:0x3a1,_0x1f8415:0x17d};function _0x3d0688(_0x50ff68,_0xb665c4,_0xd67979,_0x28451d){return _0x4b536a(_0x50ff68-0x2d,_0xb665c4- -_0x5f44ab._0x33a74d,_0xd67979-_0x5f44ab._0x1f8415,_0x50ff68);}function _0x40a29c(_0x8a6dca,_0x5d3ed0,_0x1b8327,_0x530864){return _0x4b536a(_0x8a6dca-0xb8,_0x5d3ed0- -0x409,_0x1b8327-_0x197cf8._0x3ec00c,_0x530864);}return typeof _0x43d4f9===_0x40a29c(-0xcb,-_0x4e2f0f._0x509ca3,-_0x4e2f0f._0x4c3729,-_0x4e2f0f._0x472c9c)&&_0x43d4f9!==null&&_0x43d4f9[_0x40a29c(-_0x4e2f0f._0x4916e2,-_0x4e2f0f._0x5ac178,-_0x4e2f0f._0x4a2b49,-0x98)]===_0x3d0688(-_0x4e2f0f._0x37807d,-0x75,-_0x4e2f0f._0x1ae422,-0x82);})[_0x4b536a(0x323,_0x54f684._0x4bb694,_0x54f684._0x45cbf8,0x351)](_0x35ad5e=>_0x35ad5e[_0x1b3caa(-0x2f8,-0x319,-0x2fb,-0x30e)])[_0x1b3caa(-_0x54f684._0x2ae618,-0x30d,-0x2ef,-0x304)]('\x0a\x0a')[_0x4b536a(0x371,_0x54f684._0x272a12,0x366,0x362)]();function _0x4b536a(_0x57ed0a,_0x5aee22,_0x562541,_0x3a4a24){return _0x55e4(_0x5aee22-_0x1cbcc0._0x1811cb,_0x3a4a24);}return _0x290aa5[_0x4b536a(0x37f,_0x54f684._0x4dbb9a,0x35c,_0x54f684._0x127259)]>0x0?_0x290aa5:_0x4b536a(0x364,_0x54f684._0x2f83f7,0x357,_0x54f684._0x193c75);}function getToolResultImages(_0x35ccfc){const _0x33b0a9={_0x44e388:0x92,_0x59a80c:0x90};function _0x19995b(_0x18f719,_0x10dfad,_0x2be863,_0x33e377){return _0x55e4(_0x18f719- -0x175,_0x2be863);}return Array['isArray'](_0x35ccfc)?_0x35ccfc[_0x19995b(-_0x33b0a9._0x44e388,-0x90,-0x86,-_0x33b0a9._0x59a80c)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x163528){const _0x223ca9={_0x19a037:0x421,_0x2607ce:0x415,_0x6e87cd:0x3f7,_0x3dc6c0:0x40a,_0x1aa5c5:0x313,_0x37d158:0x2f9},_0x554242={_0x8d9170:0x31c};function _0x30f4de(_0x4e1b59,_0x3b9db8,_0x328fe0,_0x52e807){return _0x55e4(_0x3b9db8-_0x554242._0x8d9170,_0x4e1b59);}function _0x30d436(_0x3cb506,_0x1dd0a9,_0x4e21e9,_0x37a6ab){return _0x55e4(_0x37a6ab-0x21c,_0x4e21e9);}return _0x163528[_0x30f4de(0x40a,0x423,_0x223ca9._0x19a037,0x409)]?.[_0x30f4de(0x420,_0x223ca9._0x2607ce,_0x223ca9._0x6e87cd,_0x223ca9._0x3dc6c0)]??_0x30d436(_0x223ca9._0x1aa5c5,0x2e1,0x2fb,_0x223ca9._0x37d158);}function createOpenAiResponsesReasoning(_0x4807d8){const _0x1dc136={_0x271b08:0x3b4,_0xe52021:0x3a8,_0x531c93:0x3ce,_0x144dbb:0x3d2,_0x2ebac1:0x3de,_0x3ec623:0x3e5,_0x28b3f4:0x1ad,_0x4e939f:0x3c0,_0x296c3e:0x3b8,_0x2b1e60:0x3c5,_0x5664ad:0x3cf,_0x16351d:0x3aa,_0x2aae50:0x3b5,_0xdac03b:0x399,_0x11b7df:0x1ca,_0xb8609c:0x1b3,_0x2e4727:0x1d8,_0x566065:0x1ef},_0x1ab8ff={_0x5b209f:0x2c0};function _0x498381(_0x454c94,_0x3fb2f2,_0x7021b3,_0x32a8a3){return _0x55e4(_0x454c94-0xc6,_0x32a8a3);}const _0x8ea926=resolveOpenAiReasoningConfig(_0x4807d8['reasoning']);if(!_0x8ea926)return{};const _0xe150e2={};function _0x4a870c(_0x2c16b7,_0x5348e2,_0x2fe91e,_0x5de10a){return _0x55e4(_0x2c16b7-_0x1ab8ff._0x5b209f,_0x5348e2);}const _0x2dda63=_0x8ea926[_0x4a870c(_0x1dc136._0x271b08,0x3c0,_0x1dc136._0xe52021,_0x1dc136._0x531c93)]??(resolveReasoningVisibility(_0x4807d8)==='user-visible'?_0x4a870c(_0x1dc136._0x144dbb,_0x1dc136._0x2ebac1,_0x1dc136._0x3ec623,0x3ed):void 0x0);return _0x8ea926['effort']&&(_0xe150e2[_0x498381(0x1c6,_0x1dc136._0x28b3f4,0x1d2,0x1cf)]=_0x8ea926[_0x4a870c(_0x1dc136._0x4e939f,_0x1dc136._0x296c3e,_0x1dc136._0xe52021,_0x1dc136._0x2b1e60)]),_0x2dda63&&(_0xe150e2[_0x4a870c(0x3b4,0x3b4,_0x1dc136._0x5664ad,_0x1dc136._0x16351d)]=_0x2dda63),{..._0x8ea926[_0x4a870c(0x3b6,_0x1dc136._0x296c3e,_0x1dc136._0x2aae50,_0x1dc136._0xdac03b)]===![]?{}:{'include':[_0x498381(0x1c4,0x1d8,_0x1dc136._0x11b7df,_0x1dc136._0xb8609c)]},...Object['keys'](_0xe150e2)[_0x498381(0x1d9,_0x1dc136._0x2e4727,0x1be,_0x1dc136._0x566065)]>0x0?{'reasoning':_0xe150e2}:{}};}function pushAssistantProviderState(_0x4ef8be,_0x20bd56){const _0x30888f={_0x4009aa:0x490,_0x47e813:0x5,_0x1c5d2a:0x2f,_0x499e9e:0x23,_0x5d4bb7:0x13,_0x3f4ca5:0x489,_0x4bac96:0x7,_0x28acbe:0x498,_0x16b34b:0x49f},_0x311c2a={_0x80e2ad:0xfd};if(_0x20bd56[_0x5e3a41(0x49f,_0x30888f._0x4009aa,0x4aa,0x480)]!==_0x2f0a42(_0x30888f._0x47e813,_0x30888f._0x1c5d2a,_0x30888f._0x499e9e,_0x30888f._0x5d4bb7))return![];function _0x2f0a42(_0x256265,_0x3afa94,_0x8b6a2e,_0x38b51d){return _0x55e4(_0x38b51d- -_0x311c2a._0x80e2ad,_0x8b6a2e);}function _0x5e3a41(_0x1b37ba,_0xf3ae1e,_0x5c8051,_0xaa561c){return _0x55e4(_0xf3ae1e-0x3a4,_0xaa561c);}const _0x51ca9a=_0x20bd56[_0x5e3a41(_0x30888f._0x3f4ca5,0x485,0x47a,0x473)]?.[_0x2f0a42(0x2,0x9,-0x1,0xe)]??[];if(_0x51ca9a[_0x2f0a42(0xd,0x33,_0x30888f._0x4bac96,0x16)]===0x0)return![];for(const _0x426339 of _0x51ca9a){isResponseInputObject(_0x426339)&&_0x4ef8be[_0x5e3a41(_0x30888f._0x28acbe,0x48a,_0x30888f._0x16b34b,0x479)](structuredClone(_0x426339));}return!![];}function _0x2a76(){const _0xc1a5dd=['B2jQzwn0','C3vTBwfYEq','mtvguxLzufK','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zgf0ytO','ndb6Bvrrzum','DMLZAwjPBgL0Eq','mJm3odqZwffHBeTr','zgvZy3jPChrPB24','mZKXodK1mNbiy1f5rW','AxnbCNjHEq','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','mJaZmJK1nMn5uwzLsG','zwzMB3j0','mtnsDw9oze4','Aw5WDxrFDgv4Da','BwvZC2fNzq','C291CMnL','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','DhjPBq','CMvHC29UAw5N','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','Aw5WDxrFAw1Hz2u','y29UDgvUDa','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','Dg9VBf91C2u','Bwf4vg9Rzw5Z','C3LZDgvT','zgf0yq','yxnZAxn0yw50','DhLWzq','yxv0BW','BgvUz3rO','n2vUEg5rDa','BwvKAwfFDhLWzq','Aw5WDxq','BMfTzq','ndu5ndq3BfrsCuPV','Dgv4Da','DxnLCI12AxnPyMXL','Aw1Hz2u','Aw5WDxrFC2nOzw1H','mti2nduYnfzcExnkrW','ChjVDMLKzxjtDgf0zq','o2jHC2u2ncW','zMLSDgvY','ohfJre5LDG','C3rYAw5N','ChvZAa','DxnLCG','AM9PBG','BwfW','C3bSAwnL','BwvZC2fNzxm','CM9Szq','odC2mLLVs0LgBG','mJmWsMj0rufY','zNvUy3rPB25Fy2fSBa','Dg9VBf91C2vFAwq','mJaXodu0ngXPvgL6BG','zNvUy3rPB24'];_0x2a76=function(){return _0xc1a5dd;};return _0x2a76();}function toOpenAiResponsesRequest(_0x524667){const _0x4cee3={_0x28abbd:0x3f5,_0x4d9b3d:0x40d,_0x38289b:0x3f5,_0x5c2b85:0x20a,_0x3100ff:0x211,_0x40f726:0x212,_0x4a248:0x1fd,_0x48e693:0x221,_0x1f8ef5:0x225,_0x84f9a3:0x248,_0x11903e:0x230,_0x247ce1:0x203,_0x26eebe:0x20f,_0x2224a6:0x206,_0x35ac5b:0x218,_0x45b8b8:0x3fe,_0x5abdc5:0x414,_0x4292e6:0x205,_0x431c54:0x1fd,_0x4e048f:0x20b,_0xa6db37:0x3da,_0x1e0e14:0x400,_0x4b4bb1:0x208,_0x4be03c:0x3f0,_0x5a17ba:0x3ea,_0x111b6b:0x403,_0x5390f9:0x3e3,_0x463cdd:0x23a,_0x12795b:0x259,_0x4343f7:0x1f4,_0x1d048c:0x204,_0x1f1b42:0x213,_0x227b80:0x41c,_0xc3bfe4:0x415,_0x3ccc5c:0x401,_0x391b6f:0x20e,_0x3dfa33:0x211,_0x5698e9:0x3f0,_0x1625de:0x40a,_0x2540a9:0x1f3,_0x1ef5d6:0x22d,_0x5e5ea7:0x222,_0x2c028c:0x412,_0xa9e74f:0x414,_0x4876ac:0x3fa,_0x596692:0x3dd,_0x2ebd1e:0x22b,_0x4bd988:0x22d,_0x451324:0x239,_0x152b22:0x3de,_0x5ab552:0x3ec,_0x1fdd91:0x3fd,_0x3d9235:0x206,_0x8d5a44:0x207,_0x588565:0x3f3,_0x477e21:0x40a},_0x409d48={_0x4c075b:0x72,_0x26f040:0x7,_0x48f0c3:0x2a,_0x3cd466:0x4},_0x3ab790={_0x47225d:0x196,_0x1c88b5:0x3e5},_0x3b3668={_0x56b8c1:0x29d};function _0x493ce1(_0x27b626,_0x3e35ae,_0x282533,_0x463181){return _0x55e4(_0x3e35ae-0x30a,_0x463181);}const _0x191a4a=[];for(const _0x561064 of _0x524667[_0x493ce1(_0x4cee3._0x28abbd,0x3f5,_0x4cee3._0x4d9b3d,_0x4cee3._0x38289b)]){if(pushAssistantProviderState(_0x191a4a,_0x561064))continue;const _0x544507=[];for(const _0x125045 of normalizeContent(_0x561064[_0xada9cb(-_0x4cee3._0x5c2b85,-_0x4cee3._0x3100ff,-0x223,-0x20e)])){if(_0x125045['type']==='text'){_0x544507['push']({'type':_0xada9cb(-_0x4cee3._0x40f726,-_0x4cee3._0x4a248,-_0x4cee3._0x48e693,-_0x4cee3._0x1f8ef5),'text':_0x125045[_0xada9cb(-0x238,-_0x4cee3._0x84f9a3,-_0x4cee3._0x11903e,-0x227)]});continue;}if(_0x125045[_0xada9cb(-_0x4cee3._0x247ce1,-0x1fd,-0x1f0,-_0x4cee3._0x26eebe)]==='image'){_0x544507['push']({'type':'input_image','image_url':_0xada9cb(-0x21d,-_0x4cee3._0x2224a6,-_0x4cee3._0x35ac5b,-0x20d)+_0x125045[_0x493ce1(_0x4cee3._0x45b8b8,0x40e,_0x4cee3._0x5abdc5,0x400)]['media_type']+';base64,'+_0x125045['source'][_0xada9cb(-_0x4cee3._0x4292e6,-0x213,-_0x4cee3._0x431c54,-0x218)]});continue;}pushUserContentMessage(_0x191a4a,_0x561064[_0xada9cb(-0x228,-0x229,-0x225,-_0x4cee3._0x4e048f)],_0x544507[_0x493ce1(_0x4cee3._0xa6db37,0x3f4,0x3d5,_0x4cee3._0x1e0e14)](0x0));if(_0x125045['type']===_0xada9cb(-_0x4cee3._0x4b4bb1,-0x205,-0x20e,-0x204)){if(!hasSerializableToolUse(_0x125045))continue;_0x191a4a[_0x493ce1(0x3da,_0x4cee3._0x4be03c,_0x4cee3._0x5a17ba,0x3fd)]({'type':_0x493ce1(_0x4cee3._0x111b6b,0x3f9,0x3e4,_0x4cee3._0x5390f9),'call_id':_0x125045['id'],'name':_0x125045[_0xada9cb(-_0x4cee3._0x463cdd,-0x21b,-_0x4cee3._0x84f9a3,-0x257)],'arguments':JSON['stringify'](_0x125045[_0xada9cb(-0x23b,-_0x4cee3._0x12795b,-0x254,-0x224)]??{})});continue;}if(_0x125045['type']==='tool_result'){if(!hasSerializableToolResult(_0x125045))continue;const _0x3084fc=getToolResultText(_0x125045[_0xada9cb(-0x20a,-0x1fe,-_0x4cee3._0x4343f7,-_0x4cee3._0x1d048c)]);_0x191a4a[_0x493ce1(0x3f7,0x3f0,0x3da,_0x4cee3._0x5390f9)]({'type':'function_call_output','call_id':_0x125045[_0xada9cb(-0x224,-0x218,-0x206,-_0x4cee3._0x1f1b42)],'output':_0x3084fc});const _0x101d26=getToolResultImages(_0x125045[_0x493ce1(_0x4cee3._0x227b80,0x414,_0x4cee3._0xc3bfe4,_0x4cee3._0x3ccc5c)]);_0x101d26[_0xada9cb(-0x201,-_0x4cee3._0x1f1b42,-_0x4cee3._0x391b6f,-_0x4cee3._0x3dfa33)]>0x0&&_0x191a4a[_0x493ce1(0x407,_0x4cee3._0x5698e9,_0x4cee3._0x1625de,0x3e1)]({'type':_0xada9cb(-_0x4cee3._0x3dfa33,-_0x4cee3._0x2540a9,-0x208,-0x217),'role':_0xada9cb(-_0x4cee3._0x1ef5d6,-_0x4cee3._0x5e5ea7,-0x217,-0x23d),'content':[{'type':'input_text','text':_0x493ce1(_0x4cee3._0x227b80,_0x4cee3._0x2c028c,0x3f3,_0x4cee3._0xa9e74f)+_0x125045[_0x493ce1(0x3e3,_0x4cee3._0x4876ac,0x3e1,_0x4cee3._0x596692)]+'.'},..._0x101d26[_0xada9cb(-_0x4cee3._0x2ebd1e,-_0x4cee3._0x4bd988,-_0x4cee3._0x451324,-0x240)](_0x3dc820=>({'type':_0xada9cb(-0x20b,-0x212,-0x21c,-0x201),'image_url':_0x493ce1(0x419,0x401,0x3f9,0x3e7)+_0x3dc820[_0xada9cb(-0x210,-0x219,-0x229,-0x207)][_0xada9cb(-0x23c,-0x24f,-0x239,-0x23d)]+_0x493ce1(0x3d7,0x3ec,0x3fc,0x3d9)+_0x3dc820[_0xada9cb(-0x210,-0x21a,-0x22b,-0x216)]['data']}))]});}}pushUserContentMessage(_0x191a4a,_0x561064[_0x493ce1(_0x4cee3._0x152b22,0x3f6,_0x4cee3._0x5ab552,_0x4cee3._0x1fdd91)],_0x544507);}function _0xada9cb(_0x460160,_0x51b823,_0x2fa77d,_0x4087ed){return _0x55e4(_0x460160- -0x314,_0x4087ed);}return{...createOpenAiResponsesReasoning(_0x524667),'model':_0x524667['model'],'instructions':systemToInstructions(_0x524667[_0xada9cb(-_0x4cee3._0x3d9235,-0x210,-0x203,-0x215)]),'input':_0x191a4a,'max_output_tokens':_0x524667[_0xada9cb(-_0x4cee3._0x8d5a44,-0x20a,-0x219,-0x1ea)],'tools':_0x524667['tools'][_0x493ce1(0x3fe,_0x4cee3._0x588565,0x3ed,_0x4cee3._0x477e21)](_0x443d67=>{function _0x4b27af(_0x230c35,_0x15f97b,_0x4d6323,_0x3e149c){return _0xada9cb(_0x230c35-_0x3b3668._0x56b8c1,_0x15f97b-0x1db,_0x4d6323-0x6,_0x4d6323);}function _0x31fb81(_0x2f2f5d,_0x12d556,_0x595bec,_0x2843e4){return _0x493ce1(_0x2f2f5d-_0x3ab790._0x47225d,_0x12d556- -_0x3ab790._0x1c88b5,_0x595bec-0x4b,_0x595bec);}return{'type':_0x4b27af(0x7b,0x99,0x5f,_0x409d48._0x4c075b),'name':_0x443d67[_0x31fb81(0x1c,-0x1,_0x409d48._0x26f040,0x1c)],'description':_0x443d67[_0x31fb81(0x30,0x20,_0x409d48._0x48f0c3,0x18)],'parameters':_0x443d67[_0x31fb81(_0x409d48._0x3cd466,0x4,-0x14,-0x1b)]};})};}export{toOpenAiResponsesRequest};
|
|
1
|
+
(function(_0x5c4391,_0x3c2056){const _0x557f82={_0x1151bb:0x2b4,_0x1b2190:0x2c9,_0x1e299c:0x2b6,_0x34524c:0x2c2,_0x1b3f8c:0x2d1,_0x714d3:0x2d6,_0x52f647:0x2c4,_0x2cacd3:0x2e5,_0x3e25c3:0xa8,_0x4b3587:0xa2,_0x39d34c:0x8e,_0x2ae60f:0x76,_0x183911:0x74,_0x336331:0x64,_0x44a875:0xa4,_0x1a797f:0x9b,_0x1bb7a7:0x91,_0x544913:0x2b7,_0xdd4a47:0x2b2,_0xc15ea1:0x2cd,_0x2189ac:0x2c5,_0x236dc7:0x2ec,_0x3a2c34:0xcc,_0x2f817c:0x8f,_0x26b5ba:0x92,_0x5144d4:0x82,_0x2c705d:0x81},_0x40f62e=_0x5c4391();function _0x218ec3(_0xb951e8,_0x271f64,_0x14860b,_0xffa460){return _0x43c4(_0x271f64- -0x1b2,_0x14860b);}function _0x6d52f6(_0x3836f0,_0x254546,_0x5a02df,_0xe7d175){return _0x43c4(_0x3836f0-0x1b9,_0x254546);}while(!![]){try{const _0xf4522d=parseInt(_0x6d52f6(0x2b8,0x2cc,_0x557f82._0x1151bb,0x2c8))/0x1+parseInt(_0x6d52f6(_0x557f82._0x1b2190,_0x557f82._0x1e299c,_0x557f82._0x34524c,_0x557f82._0x1b3f8c))/0x2*(-parseInt(_0x6d52f6(0x2ce,_0x557f82._0x714d3,_0x557f82._0x52f647,_0x557f82._0x2cacd3))/0x3)+-parseInt(_0x218ec3(-0x89,-0xa3,-_0x557f82._0x3e25c3,-0x8f))/0x4*(-parseInt(_0x218ec3(-_0x557f82._0x4b3587,-0x88,-_0x557f82._0x39d34c,-_0x557f82._0x2ae60f))/0x5)+parseInt(_0x218ec3(-0x74,-0x81,-_0x557f82._0x183911,-_0x557f82._0x336331))/0x6*(parseInt(_0x218ec3(-_0x557f82._0x44a875,-_0x557f82._0x1a797f,-_0x557f82._0x1bb7a7,-0xa2))/0x7)+parseInt(_0x6d52f6(_0x557f82._0x544913,_0x557f82._0xdd4a47,_0x557f82._0xc15ea1,0x299))/0x8+-parseInt(_0x6d52f6(0x2d3,0x2bd,_0x557f82._0x2189ac,_0x557f82._0x236dc7))/0x9*(parseInt(_0x218ec3(-_0x557f82._0x3a2c34,-0xb1,-0xb9,-0xba))/0xa)+-parseInt(_0x218ec3(-0x8a,-_0x557f82._0x2f817c,-0x84,-0x78))/0xb*(parseInt(_0x218ec3(-_0x557f82._0x26b5ba,-0x80,-_0x557f82._0x5144d4,-_0x557f82._0x2c705d))/0xc);if(_0xf4522d===_0x3c2056)break;else _0x40f62e['push'](_0x40f62e['shift']());}catch(_0x437f23){_0x40f62e['push'](_0x40f62e['shift']());}}}(_0x1f0f,0xc2a99));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';function _0x1f0f(){const _0x7c9552=['Dgv4Da','zNvUy3rPB25Fy2fSBf9VDxrWDxq','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','zMLSDgvY','odGWng1SB0zHEa','ndjuz0Psv1m','C3bSAwnL','y29UDgvUDa','zwzMB3j0','zNvUy3rPB24','nda0mdDmCxvuBhK','AM9PBG','ndq1ntG3og9qyMn4rW','C3vTBwfYEq','Aw5WDxrFC2nOzw1H','mJqYmvHxwKXHBG','ChjVDMLKzxjtDgf0zq','Aw5WDxq','Aw5WDxrFAw1Hz2u','o2jHC2u2ncW','BgvUz3rO','BwvZC2fNzq','DxnLCI12AxnPyMXL','Aw5WDxrFDgv4Da','nZD1r2fhsKq','DxnLCG','yxv0BW','DhjPBq','BwfW','A2v5CW','ChvZAa','mJG1nvPSzhvgAa','CM9Szq','DhLWzq','BwvKAwfFDhLWzq','C291CMnL','yxnZAxn0yw50','Dg9VBf91C2u','mtjHqKDWDuS','mZy2ndG2mhPlrMHKDa','DMLZAwjPBgL0Eq','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','C3LZDgvT','BMfTzq','Dg9VBf9Yzxn1Bhq','zgf0yq','ndaZndrMvvfvB2i','mtm5mJq1mKnqDwT2uW','yMfZzty0','mJyZnZb4zhfKB3m','B2jQzwn0','CMvHC29UAw5N','Aw1Hz2u','C3rYAw5N','AxnbCNjHEq','Bw9KzwW','Dg9VBhm','Dg9VBf91C2vFAwq'];_0x1f0f=function(){return _0x7c9552;};return _0x1f0f();}import{normalizeContent}from'./chunk-G2FR4UGO.js';function systemToInstructions(_0x28b838){const _0x40daea={_0x3f66c2:0x38d,_0xe43d5a:0x394,_0x2855a3:0x3a6,_0x2fc16f:0x47f,_0xb1fa01:0x452},_0x5e6314={_0x1ec421:0x26d};function _0x27f6e7(_0x2035be,_0x828105,_0x118086,_0x12e64f){return _0x43c4(_0x12e64f-0x352,_0x118086);}function _0x154a96(_0x4dcef0,_0x4892af,_0x540cc0,_0x2ee151){return _0x43c4(_0x4892af-_0x5e6314._0x1ec421,_0x2ee151);}return normalizeContent(_0x28b838)['filter'](_0x1f1efb=>_0x1f1efb[_0x27f6e7(0x487,0x472,0x460,0x47e)]==='text')[_0x154a96(_0x40daea._0x3f66c2,_0x40daea._0xe43d5a,_0x40daea._0x2855a3,0x37b)](_0x12c25b=>_0x12c25b[_0x154a96(0x386,0x377,0x38e,0x38e)])[_0x27f6e7(0x46e,_0x40daea._0x2fc16f,_0x40daea._0xb1fa01,0x468)]('\x0a\x0a');}function _0x43c4(_0x29fc0c,_0x291a19){_0x29fc0c=_0x29fc0c-0xfb;const _0x1f0f33=_0x1f0f();let _0x43c455=_0x1f0f33[_0x29fc0c];if(_0x43c4['GBlbXH']===undefined){var _0x170d33=function(_0xdd3131){const _0x42b9b1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28b838='',_0x1f1efb='';for(let _0x12c25b=0x0,_0x5ecbac,_0x1b144f,_0x3d95cb=0x0;_0x1b144f=_0xdd3131['charAt'](_0x3d95cb++);~_0x1b144f&&(_0x5ecbac=_0x12c25b%0x4?_0x5ecbac*0x40+_0x1b144f:_0x1b144f,_0x12c25b++%0x4)?_0x28b838+=String['fromCharCode'](0xff&_0x5ecbac>>(-0x2*_0x12c25b&0x6)):0x0){_0x1b144f=_0x42b9b1['indexOf'](_0x1b144f);}for(let _0x50a464=0x0,_0x39d3dd=_0x28b838['length'];_0x50a464<_0x39d3dd;_0x50a464++){_0x1f1efb+='%'+('00'+_0x28b838['charCodeAt'](_0x50a464)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f1efb);};_0x43c4['VaWnBb']=_0x170d33,_0x43c4['zxMOjx']={},_0x43c4['GBlbXH']=!![];}const _0x13014d=_0x1f0f33[0x0],_0x4a8cbc=_0x29fc0c+_0x13014d,_0x282231=_0x43c4['zxMOjx'][_0x4a8cbc];return!_0x282231?(_0x43c455=_0x43c4['VaWnBb'](_0x43c455),_0x43c4['zxMOjx'][_0x4a8cbc]=_0x43c455):_0x43c455=_0x282231,_0x43c455;}function pushUserContentMessage(_0x5ecbac,_0x1b144f,_0x3d95cb){if(_0x3d95cb['length']===0x0)return;_0x5ecbac['push']({'type':'message','role':_0x1b144f,'content':_0x3d95cb});}function hasSerializableToolUse(_0x50a464){const _0x44e821={_0x5daf2c:0x2b8,_0x5d4216:0x17e,_0xba555c:0x174,_0x44f91d:0x16d,_0x49c21a:0x2f8,_0x2834a5:0x2e5,_0xf77d39:0x2c0,_0x4aaddf:0x2b0,_0x2927c8:0x2c1},_0x4b78df={_0x557da4:0x3e0};function _0x7f229a(_0x2e3b36,_0x44b01a,_0x178f69,_0x2ccb15){return _0x43c4(_0x2ccb15- -_0x4b78df._0x557da4,_0x44b01a);}function _0x2e8360(_0x52ed56,_0x29e9f0,_0x43313e,_0x49820d){return _0x43c4(_0x52ed56- -0x29d,_0x49820d);}return _0x50a464['id'][_0x7f229a(-0x2c5,-_0x44e821._0x5daf2c,-0x2c9,-0x2ba)]()[_0x2e8360(-_0x44e821._0x5d4216,-_0x44e821._0xba555c,-_0x44e821._0x44f91d,-0x19a)]>0x0&&_0x50a464[_0x7f229a(-_0x44e821._0x49c21a,-0x302,-0x2ff,-_0x44e821._0x2834a5)]['trim']()[_0x7f229a(-0x2ca,-_0x44e821._0xf77d39,-_0x44e821._0x4aaddf,-_0x44e821._0x2927c8)]>0x0;}function hasSerializableToolResult(_0x39d3dd){const _0x4b88db={_0x7cdba3:0x23c,_0x2d4648:0x228};function _0x2082f1(_0x46a336,_0x11594d,_0x59c27e,_0x6bde28){return _0x43c4(_0x46a336-0x18b,_0x6bde28);}function _0x9e6d5e(_0x5b3810,_0x1d45dc,_0x4db843,_0x13a65f){return _0x43c4(_0x5b3810-0x133,_0x1d45dc);}return _0x39d3dd[_0x9e6d5e(_0x4b88db._0x7cdba3,_0x4b88db._0x2d4648,0x24e,0x22c)][_0x2082f1(0x2b1,0x29d,0x2bd,0x2b2)]()['length']>0x0;}function isResponseInputObject(_0x3f98f9){const _0x588dc9={_0x2a5ece:0x3d1,_0x462255:0x19d,_0x6fcf8b:0x19c},_0x1a72c0={_0x4843f1:0x2cf};if(typeof _0x3f98f9!==_0x44e265(0x3e9,0x3b5,0x3cb,_0x588dc9._0x2a5ece)||_0x3f98f9===null||Array['isArray'](_0x3f98f9))return![];function _0x2214ae(_0x33dc1a,_0x2f0798,_0x558b97,_0x4386a3){return _0x43c4(_0x4386a3-0x6c,_0x558b97);}const _0x2fdf8b=_0x3f98f9;function _0x44e265(_0xf0d463,_0x47cd75,_0xaf22fc,_0x2acbd2){return _0x43c4(_0x2acbd2-_0x1a72c0._0x4843f1,_0xf0d463);}return typeof _0x2fdf8b[_0x2214ae(_0x588dc9._0x462255,0x17c,_0x588dc9._0x6fcf8b,0x198)]===_0x2214ae(0x15e,0x163,0x18f,0x171);}function isImageToolResultBlock(_0x9771d2){const _0x551560={_0x4774b5:0x268,_0x404004:0x252,_0x8ca1ff:0x264,_0x317e03:0x253,_0x4ecc67:0x250,_0x2a3f11:0x233,_0x28d560:0x273,_0x1dd8cf:0x267,_0x2fb6d9:0x285,_0xcea1e:0x271,_0x4ab75d:0x250,_0x5339e0:0x254,_0x45130a:0x239,_0x3f06d5:0x27a,_0x17b32f:0x27b,_0xba6a11:0x277,_0x2a0552:0x279,_0x43ca0d:0x28e,_0x4604e2:0x24a,_0x235b48:0x251,_0x1c0848:0x248,_0xaadad5:0x26a,_0x4a1489:0x267,_0x218f12:0x22c,_0x122469:0x234,_0x6e39c7:0x247,_0x4f5632:0x24c,_0x44cfc8:0x221,_0x1e56d2:0x23e},_0x1f01ef={_0x356359:0x139};function _0x1e1805(_0x48fe13,_0x1e488f,_0x2d63c2,_0x120f94){return _0x43c4(_0x120f94-_0x1f01ef._0x356359,_0x2d63c2);}if(typeof _0x9771d2!=='object'||_0x9771d2===null||Array[_0x63a48f(_0x551560._0x4774b5,_0x551560._0x404004,_0x551560._0x8ca1ff,_0x551560._0x317e03)](_0x9771d2))return![];function _0x63a48f(_0x23979c,_0x49c31a,_0xab086b,_0x4e9906){return _0x43c4(_0x49c31a-0x14c,_0x23979c);}const _0x19e219=_0x9771d2;return _0x19e219[_0x63a48f(0x27c,0x278,0x262,0x292)]===_0x63a48f(0x234,_0x551560._0x4ecc67,0x265,_0x551560._0x2a3f11)&&_0x19e219[_0x1e1805(_0x551560._0x28d560,0x263,0x27f,_0x551560._0x1dd8cf)]?.[_0x63a48f(0x295,0x278,_0x551560._0x2fb6d9,_0x551560._0xcea1e)]===_0x1e1805(0x226,_0x551560._0x4ab75d,_0x551560._0x5339e0,_0x551560._0x45130a)&&typeof _0x19e219[_0x63a48f(0x285,_0x551560._0x3f06d5,0x292,_0x551560._0x17b32f)][_0x63a48f(_0x551560._0xba6a11,_0x551560._0x2a0552,_0x551560._0x43ca0d,0x26c)]===_0x63a48f(_0x551560._0x4604e2,_0x551560._0x235b48,0x265,_0x551560._0x1c0848)&&typeof _0x19e219[_0x1e1805(0x276,_0x551560._0x4ecc67,_0x551560._0xaadad5,_0x551560._0x4a1489)][_0x63a48f(_0x551560._0x218f12,0x249,_0x551560._0x122469,0x259)]===_0x1e1805(_0x551560._0x6e39c7,_0x551560._0x4f5632,_0x551560._0x44cfc8,_0x551560._0x1e56d2);}function getToolResultText(_0x48bcd2){const _0x35bd7d={_0x14529c:0xb9,_0x889517:0x8d,_0x2d26d7:0x29d,_0xb6899b:0x2a9,_0x3662f7:0x2c6,_0x8a68d8:0x28a,_0x221450:0x280,_0x3d091a:0x289,_0x473454:0x2a9,_0x4103b3:0x28f,_0x4b1069:0x2a0,_0x5da4ec:0x283,_0x3ec050:0x99,_0x3bde0b:0x95,_0x28b00a:0xae,_0x60532d:0x7d,_0x62c963:0x79},_0x37818d={_0x3dd648:0x13b,_0x4db0e2:0x13f,_0x11a5c3:0x9b,_0x51bf7c:0xac,_0x1436f2:0xb1},_0x4c3d78={_0x52c9bf:0x168,_0x437630:0x200},_0x344e42={_0x310a05:0x1cb},_0x2a0757={_0x5efc18:0x1a1},_0x4e36b3={_0x4158dd:0x3b6};function _0xb0bf69(_0x398183,_0xe87b06,_0x1c95ea,_0x3c29e5){return _0x43c4(_0x1c95ea- -_0x4e36b3._0x4158dd,_0x3c29e5);}if(typeof _0x48bcd2===_0x142cbe(-0x9c,-_0x35bd7d._0x14529c,-_0x35bd7d._0x889517,-0x91))return _0x48bcd2;function _0x142cbe(_0xd5e20,_0x404950,_0x5bfb22,_0x4c791d){return _0x43c4(_0xd5e20- -_0x2a0757._0x5efc18,_0x5bfb22);}const _0x790114=_0x48bcd2[_0xb0bf69(-_0x35bd7d._0x2d26d7,-_0x35bd7d._0xb6899b,-0x2a8,-_0x35bd7d._0x3662f7)](_0x3526e4=>{function _0x290dce(_0x10a7b7,_0x40b19d,_0x313c62,_0x2229bd){return _0x142cbe(_0x40b19d-_0x344e42._0x310a05,_0x40b19d-0x21,_0x10a7b7,_0x2229bd-0xba);}function _0x10fa3e(_0x216c6c,_0x365061,_0x249088,_0x39a122){return _0xb0bf69(_0x216c6c-0x151,_0x365061-_0x4c3d78._0x52c9bf,_0x365061-_0x4c3d78._0x437630,_0x39a122);}return typeof _0x3526e4===_0x290dce(0x118,0x12c,_0x37818d._0x3dd648,0x144)&&_0x3526e4!==null&&_0x3526e4[_0x290dce(_0x37818d._0x4db0e2,0x156,0x152,0x15c)]===_0x10fa3e(-_0x37818d._0x11a5c3,-_0x37818d._0x51bf7c,-0xac,-_0x37818d._0x1436f2);})[_0xb0bf69(-_0x35bd7d._0x8a68d8,-_0x35bd7d._0x221450,-0x28f,-_0x35bd7d._0x3d091a)](_0x2316ee=>_0x2316ee[_0xb0bf69(-0x2a8,-0x297,-0x2ac,-0x2b6)])[_0xb0bf69(-_0x35bd7d._0x473454,-_0x35bd7d._0x4103b3,-_0x35bd7d._0x4b1069,-_0x35bd7d._0x5da4ec)]('\x0a\x0a')[_0x142cbe(-0x7b,-0x71,-_0x35bd7d._0x3ec050,-0x7b)]();return _0x790114['length']>0x0?_0x790114:_0x142cbe(-_0x35bd7d._0x3bde0b,-_0x35bd7d._0x28b00a,-_0x35bd7d._0x60532d,-_0x35bd7d._0x62c963);}function getToolResultImages(_0x5b7494){const _0x101b4d={_0x4dabee:0x4d6,_0x55ce01:0x4f9,_0x555d20:0x4cc,_0x37b65b:0x4df};function _0x219565(_0x572b63,_0x1ce9c5,_0xdf0096,_0x592701){return _0x43c4(_0x592701-0x3d1,_0x572b63);}return Array['isArray'](_0x5b7494)?_0x5b7494[_0x219565(_0x101b4d._0x4dabee,_0x101b4d._0x55ce01,_0x101b4d._0x555d20,_0x101b4d._0x37b65b)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x5b02a6){const _0x19b6c0={_0x2677e3:0x55,_0x22133f:0x75,_0x19f39c:0x69,_0x53bb13:0xac,_0x2c7964:0x9a,_0x30cdb5:0x42},_0x5b6285={_0x5555da:0x1cd};function _0xc07f8b(_0x18774b,_0x41e760,_0x5b446a,_0x56840e){return _0x43c4(_0x5b446a- -_0x5b6285._0x5555da,_0x18774b);}function _0x3332e6(_0x208d3c,_0x334207,_0x14122e,_0x52034e){return _0x43c4(_0x14122e- -0x16c,_0x52034e);}return _0x5b02a6[_0x3332e6(-_0x19b6c0._0x2677e3,-_0x19b6c0._0x22133f,-_0x19b6c0._0x19f39c,-0x4d)]?.[_0xc07f8b(-0xa8,-_0x19b6c0._0x53bb13,-_0x19b6c0._0x2c7964,-0xa2)]??_0x3332e6(-0x42,-_0x19b6c0._0x30cdb5,-0x4b,-0x5c);}function createOpenAiResponsesReasoning(_0x5a23d4){const _0x184d98={_0x1f6ce8:0x2ca,_0x259867:0x2c3,_0x506cbf:0x29a,_0x3cf58a:0x2c1,_0x4a3daa:0x2b6,_0x3810e7:0x2a6,_0x276a15:0x290,_0x9f10c2:0x162,_0xa41e6:0x2a7,_0x18f895:0x2c8,_0x1b8b23:0x291,_0x5968f7:0x2a8,_0x1d6ebc:0x2af,_0x2c5cf2:0x299,_0x1f1657:0x2ba,_0x5f4bd5:0x2c5,_0x5d1c47:0x29f,_0x46f0fe:0x29f},_0x175eaa=resolveOpenAiReasoningConfig(_0x5a23d4[_0x1ec062(-_0x184d98._0x1f6ce8,-0x2c2,-0x2c4,-_0x184d98._0x259867)]);if(!_0x175eaa)return{};function _0x1ec062(_0x567f2c,_0x337ed4,_0x32146b,_0x55d4a4){return _0x43c4(_0x32146b- -0x3c7,_0x567f2c);}const _0x19290e={},_0x3230e1=_0x175eaa[_0x1ec062(-0x2c7,-_0x184d98._0x506cbf,-0x2af,-0x296)]??(resolveReasoningVisibility(_0x5a23d4)===_0x1ec062(-_0x184d98._0x3cf58a,-_0x184d98._0x4a3daa,-_0x184d98._0x3810e7,-_0x184d98._0x276a15)?_0x41ed4f(-_0x184d98._0x9f10c2,-0x16b,-0x181,-0x150):void 0x0);_0x175eaa['effort']&&(_0x19290e[_0x1ec062(-_0x184d98._0xa41e6,-0x297,-0x2b4,-0x29a)]=_0x175eaa[_0x1ec062(-0x297,-0x2b5,-0x2b4,-_0x184d98._0x18f895)]);_0x3230e1&&(_0x19290e[_0x1ec062(-_0x184d98._0x1b8b23,-_0x184d98._0x5968f7,-_0x184d98._0x1d6ebc,-_0x184d98._0x2c5cf2)]=_0x3230e1);function _0x41ed4f(_0x14c3ec,_0x117096,_0x29817e,_0x30b298){return _0x43c4(_0x117096- -0x290,_0x14c3ec);}return{..._0x175eaa[_0x1ec062(-_0x184d98._0x4a3daa,-0x2cf,-_0x184d98._0x1f1657,-_0x184d98._0x5f4bd5)]===![]?{}:{'include':['reasoning.encrypted_content']},...Object[_0x1ec062(-0x2a3,-_0x184d98._0x5d1c47,-_0x184d98._0x46f0fe,-0x286)](_0x19290e)['length']>0x0?{'reasoning':_0x19290e}:{}};}function pushAssistantProviderState(_0x1b462b,_0x225be0){const _0x5785d6={_0x36d415:0x3b9,_0x4503bc:0x3b9,_0x324436:0x3b5,_0x2a598c:0x3bd,_0x2d8fdc:0x3d8,_0x52b19e:0x3da,_0x123e0b:0x496,_0x5e688a:0x4ac,_0x5419d9:0x3c3,_0x2f74df:0x3cc,_0xb3daf0:0x3c8,_0x2183f5:0x394,_0x2fb008:0x3b7,_0x480299:0x3b4,_0x13a7ab:0x3a6};function _0x200bb1(_0x43435c,_0x5b5b9c,_0x28bf19,_0xa54ed5){return _0x43c4(_0x43435c-0x28e,_0x5b5b9c);}if(_0x225be0[_0x200bb1(_0x5785d6._0x36d415,_0x5785d6._0x4503bc,_0x5785d6._0x324436,0x3c1)]!==_0x200bb1(_0x5785d6._0x2a598c,_0x5785d6._0x2d8fdc,0x3bc,_0x5785d6._0x52b19e))return![];function _0x5d5d95(_0x5f2449,_0xfe1cd1,_0x1d3d7d,_0x3aeb19){return _0x43c4(_0x5f2449-0x37c,_0x1d3d7d);}const _0x4ac8a1=_0x225be0[_0x5d5d95(0x497,_0x5785d6._0x123e0b,0x47c,_0x5785d6._0x5e688a)]?.[_0x200bb1(_0x5785d6._0x5419d9,_0x5785d6._0x2f74df,_0x5785d6._0xb3daf0,0x3a5)]??[];if(_0x4ac8a1[_0x200bb1(0x3ad,0x3af,_0x5785d6._0x2183f5,0x395)]===0x0)return![];for(const _0x27c8ea of _0x4ac8a1){isResponseInputObject(_0x27c8ea)&&_0x1b462b[_0x200bb1(_0x5785d6._0x2fb008,_0x5785d6._0x480299,0x3c7,_0x5785d6._0x13a7ab)](structuredClone(_0x27c8ea));}return!![];}function toOpenAiResponsesRequest(_0x4d5053){const _0x4f1307={_0x45cae5:0x16,_0x5a4610:0x2d,_0x12a5b1:0x15,_0x21a8fe:0x289,_0x19796e:0x293,_0x53213e:0x29d,_0xb49b76:0x2a0,_0x5fd075:0x26,_0x343ff3:0x24,_0x4c6c90:0x292,_0x465c2e:0x2a8,_0x2d69a2:0x2b8,_0x22c79a:0x280,_0x244cb3:0x3b,_0xb002ed:0x21,_0x57a854:0x11,_0xd70be8:0x32,_0xb95c53:0x14,_0x287a90:0x27e,_0x29f25d:0x26c,_0x13a239:0x9,_0x82a438:0x1b,_0x40c81f:0x27e,_0x43f988:0x285,_0x122b86:0x1c,_0x17016a:0x4,_0x487c2f:0x22,_0x5f4d6d:0x34,_0x318db5:0x23,_0x2c37af:0x2b9,_0x40f44d:0x2bb,_0x23452d:0x290,_0x10ed8c:0x27d,_0x3f24a6:0x28d,_0x181576:0x288,_0x45c202:0x2b0,_0x3289e3:0x2be,_0x5ef257:0x2c1,_0x1ea5d8:0x16,_0x51d974:0x1,_0x406306:0x21,_0x5ed6f5:0x31,_0xb6668c:0x5,_0x5b8279:0x3,_0x3d8467:0x26,_0x4b4dea:0x2a3,_0x474f8d:0x2b4,_0x275047:0x2bd,_0x30b920:0x17,_0x100949:0xd,_0x3d44a4:0x28,_0x480094:0xa,_0x139608:0x28b,_0x347c64:0x25b,_0x540d4f:0x297,_0x88b4c9:0x287,_0x50c2a2:0x285,_0x158d1e:0x4,_0x38453e:0x25c,_0x4edf86:0x9,_0x18f4aa:0xe,_0x5a084a:0x2b},_0x6c2035={_0x331fb6:0x136,_0x4826cc:0x109,_0x2d7a5f:0x109,_0x472c98:0x18a,_0x2202e1:0x173},_0x34df72={_0x3d8c38:0x198,_0x3ffcce:0x10a,_0x118887:0x1c0},_0x29f1c8={_0x228308:0x3ac},_0x596972={_0x16bae7:0xfc},_0x286ae6=[];for(const _0x71b2d8 of _0x4d5053['messages']){if(pushAssistantProviderState(_0x286ae6,_0x71b2d8))continue;const _0x1a2f21=[];for(const _0x33b9a0 of normalizeContent(_0x71b2d8[_0x4e0bde(-0x1,0x6,_0x4f1307._0x45cae5,_0x4f1307._0x5a4610)])){if(_0x33b9a0[_0x4e0bde(_0x4f1307._0x12a5b1,0x4e,0x30,0x40)]===_0x4f63cf(-0x2a2,-_0x4f1307._0x21a8fe,-_0x4f1307._0x19796e,-_0x4f1307._0x53213e)){_0x1a2f21[_0x4f63cf(-0x283,-_0x4f1307._0xb49b76,-0x284,-0x28a)]({'type':_0x4e0bde(0x25,0x18,_0x4f1307._0x5fd075,_0x4f1307._0x343ff3),'text':_0x33b9a0[_0x4f63cf(-0x2a2,-0x284,-_0x4f1307._0x4c6c90,-0x29a)]});continue;}if(_0x33b9a0['type']===_0x4f63cf(-_0x4f1307._0x465c2e,-_0x4f1307._0x2d69a2,-0x28b,-0x28e)){_0x1a2f21[_0x4f63cf(-0x283,-0x29d,-0x280,-_0x4f1307._0x22c79a)]({'type':_0x4e0bde(0x1b,_0x4f1307._0x244cb3,_0x4f1307._0xb002ed,_0x4f1307._0x57a854),'image_url':'data:'+_0x33b9a0[_0x4e0bde(0x25,0x45,_0x4f1307._0xd70be8,0x45)][_0x4e0bde(_0x4f1307._0xb95c53,0x45,0x31,0x28)]+';base64,'+_0x33b9a0[_0x4f63cf(-_0x4f1307._0x287a90,-_0x4f1307._0x29f25d,-0x27e,-0x265)][_0x4e0bde(_0x4f1307._0x13a239,0x1b,0x1,_0x4f1307._0x82a438)]});continue;}pushUserContentMessage(_0x286ae6,_0x71b2d8[_0x4f63cf(-0x281,-_0x4f1307._0x40c81f,-0x263,-_0x4f1307._0x43f988)],_0x1a2f21[_0x4e0bde(0x0,_0x4f1307._0x122b86,0x15,-_0x4f1307._0x17016a)](0x0));if(_0x33b9a0['type']===_0x4e0bde(0x45,_0x4f1307._0x487c2f,_0x4f1307._0x5f4d6d,_0x4f1307._0x318db5)){if(!hasSerializableToolUse(_0x33b9a0))continue;_0x286ae6['push']({'type':'function_call','call_id':_0x33b9a0['id'],'name':_0x33b9a0[_0x4f63cf(-0x2b1,-_0x4f1307._0x2c37af,-_0x4f1307._0x40f44d,-0x2b8)],'arguments':JSON['stringify'](_0x33b9a0[_0x4f63cf(-_0x4f1307._0x23452d,-_0x4f1307._0x10ed8c,-0x293,-_0x4f1307._0x287a90)]??{})});continue;}if(_0x33b9a0[_0x4f63cf(-0x280,-0x26d,-_0x4f1307._0x3f24a6,-_0x4f1307._0x181576)]===_0x4f63cf(-_0x4f1307._0x45c202,-_0x4f1307._0x3289e3,-_0x4f1307._0x5ef257,-0x2a8)){if(!hasSerializableToolResult(_0x33b9a0))continue;const _0xd9e25=getToolResultText(_0x33b9a0[_0x4e0bde(0x29,-0x1,_0x4f1307._0x1ea5d8,-_0x4f1307._0x51d974)]);_0x286ae6[_0x4e0bde(0x21,_0x4f1307._0x406306,0x2d,_0x4f1307._0x5ed6f5)]({'type':_0x4e0bde(_0x4f1307._0xb6668c,-_0x4f1307._0x5b8279,0xf,_0x4f1307._0x3d8467),'call_id':_0x33b9a0[_0x4f63cf(-_0x4f1307._0x4b4dea,-_0x4f1307._0x474f8d,-_0x4f1307._0x275047,-0x2b5)],'output':_0xd9e25});const _0x21b16e=getToolResultImages(_0x33b9a0[_0x4e0bde(_0x4f1307._0x30b920,0x13,0x16,_0x4f1307._0x487c2f)]);_0x21b16e['length']>0x0&&_0x286ae6['push']({'type':_0x4e0bde(0x27,_0x4f1307._0x100949,0x24,0x1d),'role':_0x4e0bde(0x37,0xe,_0x4f1307._0x3d44a4,_0x4f1307._0x480094),'content':[{'type':_0x4f63cf(-0x28a,-0x289,-0x2a2,-0x281),'text':_0x4f63cf(-0x278,-0x25d,-_0x4f1307._0x139608,-_0x4f1307._0x347c64)+_0x33b9a0[_0x4f63cf(-0x2a3,-0x2a7,-_0x4f1307._0x540d4f,-_0x4f1307._0x88b4c9)]+'.'},..._0x21b16e['map'](_0x12229e=>({'type':_0x4f63cf(-0x28f,-0x290,-0x280,-0x29f),'image_url':'data:'+_0x12229e[_0x4f63cf(-0x27e,-0x269,-0x265,-0x28d)]['media_type']+_0x4f63cf(-0x28e,-0x287,-0x2a8,-0x279)+_0x12229e[_0x4e0bde(0x23,0x2c,0x32,0x1a)]['data']}))]});}}pushUserContentMessage(_0x286ae6,_0x71b2d8[_0x4f63cf(-0x281,-_0x4f1307._0x43f988,-0x27d,-_0x4f1307._0x50c2a2)],_0x1a2f21);}function _0x4e0bde(_0x5c76f3,_0xfb14fe,_0x2a8af4,_0x1c5840){return _0x43c4(_0x2a8af4- -_0x596972._0x16bae7,_0x5c76f3);}function _0x4f63cf(_0x4f7603,_0xef96f6,_0x4324e9,_0x2f768e){return _0x43c4(_0x4f7603- -_0x29f1c8._0x228308,_0x4324e9);}return{...createOpenAiResponsesReasoning(_0x4d5053),'model':_0x4d5053[_0x4e0bde(_0x4f1307._0x158d1e,0x17,0xb,0x25)],'instructions':systemToInstructions(_0x4d5053[_0x4f63cf(-0x276,-0x262,-_0x4f1307._0x38453e,-0x259)]),'input':_0x286ae6,'max_output_tokens':_0x4d5053['maxTokens'],'tools':_0x4d5053[_0x4e0bde(_0x4f1307._0x4edf86,-_0x4f1307._0x18f4aa,0xc,0x12)][_0x4e0bde(_0x4f1307._0x5a084a,_0x4f1307._0xb95c53,0x2b,0x47)](_0x3929ed=>{const _0x3ff613={_0x2b66e5:0x39,_0x408568:0x10};function _0x14b7ec(_0x1db9bc,_0x544634,_0x12d5c7,_0x253c22){return _0x4f63cf(_0x1db9bc-0x109,_0x544634-_0x3ff613._0x2b66e5,_0x544634,_0x253c22-_0x3ff613._0x408568);}function _0x26dad8(_0x10fa18,_0xf5f51f,_0x5774cb,_0x579a57){return _0x4e0bde(_0x579a57,_0xf5f51f-_0x34df72._0x3d8c38,_0xf5f51f-_0x34df72._0x3ffcce,_0x579a57-_0x34df72._0x118887);}return{'type':_0x26dad8(_0x6c2035._0x331fb6,0x122,0x135,_0x6c2035._0x4826cc),'name':_0x3929ed[_0x26dad8(0x120,_0x6c2035._0x2d7a5f,0x125,0x118)],'description':_0x3929ed['description'],'parameters':_0x3929ed[_0x14b7ec(-_0x6c2035._0x472c98,-0x17d,-0x191,-_0x6c2035._0x2202e1)]};})};}export{toOpenAiResponsesRequest};
|
package/dist/chunk-G2FR4UGO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4d27d9,_0x13c0cb){const _0x4bd3b5={_0x80c9f1:0xbb,_0x2ab308:0xa6,_0x5034f1:0x1,_0x273200:0xd,_0x5c582a:0x1b,_0x2b645a:0xc6,_0x5011b1:0x9a,_0xc34def:0x12,_0x175fd8:0x21,_0x11ddcd:0xde,_0x193270:0xd6,_0x2ca310:0xbb},_0x812c8a={_0x28d825:0x114},_0x145b98={_0x27f674:0x1b8};function _0x2513c4(_0x2efef4,_0x10dc34,_0x468ffb,_0x5af1e6){return _0x188d(_0x10dc34- -_0x145b98._0x27f674,_0x5af1e6);}const _0x2398f1=_0x4d27d9();function _0x2c09d3(_0x2ab29d,_0x106b97,_0x3ce718,_0x3b8620){return _0x188d(_0x3ce718- -_0x812c8a._0x28d825,_0x106b97);}while(!![]){try{const _0x47933d=-parseInt(_0x2c09d3(_0x4bd3b5._0x80c9f1,_0x4bd3b5._0x2ab308,0xb2,0x9a))/0x1+parseInt(_0x2513c4(_0x4bd3b5._0x5034f1,_0x4bd3b5._0x273200,0x13,-0xf))/0x2*(-parseInt(_0x2c09d3(0xa6,0xc2,0xc1,0xbb))/0x3)+-parseInt(_0x2513c4(-0xb,0x1,-0x6,_0x4bd3b5._0x5c582a))/0x4*(-parseInt(_0x2c09d3(0xca,0xc9,0xbf,_0x4bd3b5._0x2b645a))/0x5)+-parseInt(_0x2c09d3(0x8e,0x96,_0x4bd3b5._0x5011b1,0xa7))/0x6+-parseInt(_0x2513c4(0x27,_0x4bd3b5._0xc34def,0x1a,_0x4bd3b5._0x175fd8))/0x7*(-parseInt(_0x2513c4(0x10,-0x2,0x13,-0x1a))/0x8)+parseInt(_0x2c09d3(0xc9,0xb8,0xc6,0xab))/0x9+-parseInt(_0x2c09d3(0xca,_0x4bd3b5._0x11ddcd,0xc5,0xc9))/0xa*(-parseInt(_0x2c09d3(_0x4bd3b5._0x193270,_0x4bd3b5._0x2ca310,0xc3,0xb0))/0xb);if(_0x47933d===_0x13c0cb)break;else _0x2398f1['push'](_0x2398f1['shift']());}catch(_0x187c66){_0x2398f1['push'](_0x2398f1['shift']());}}}(_0x544e,0xdf5f1));function createTextBlock(_0x4ee91a){const _0xaad905={_0x3ca124:0x193,_0x369bba:0x182};function _0x1c123a(_0x2d5caf,_0x1c0603,_0x2df6b0,_0x54b372){return _0x188d(_0x2df6b0- -0x337,_0x2d5caf);}return{'type':_0x1c123a(-_0xaad905._0x3ca124,-0x171,-_0xaad905._0x369bba,-0x18b),'text':_0x4ee91a};}function normalizeTextBlock(_0x4000ea){const _0x2e476b={_0x23e534:0x555,_0x413b53:0x559,_0x22a212:0x546};function _0x1203b4(_0x8d89e,_0x4687b2,_0x16d488,_0x510b75){return _0x188d(_0x4687b2-0x3a4,_0x510b75);}return createTextBlock(_0x4000ea[_0x1203b4(_0x2e476b._0x23e534,_0x2e476b._0x413b53,_0x2e476b._0x22a212,0x53f)]??'');}function normalizeContent(_0x3f6328){const _0x29895e={_0x4c2aa3:0x4c,_0x222237:0x53,_0x2a0c4e:0x5b},_0x2d698d={_0x53e5e9:0x546,_0x1cd355:0x54b,_0x3a4f08:0x53a},_0x44dfa6={_0x1b33b3:0x226};if(typeof _0x3f6328===_0x3e6674(0x6f,0x84,0x53,0x7c))return[createTextBlock(_0x3f6328)];if(!Array[_0x3e6674(_0x29895e._0x4c2aa3,_0x29895e._0x222237,0x57,_0x29895e._0x2a0c4e)](_0x3f6328))return[];function _0x3e6674(_0x3c1d8d,_0x3a9d3f,_0x4dc602,_0x33cd37){return _0x188d(_0x3c1d8d- -0x15e,_0x33cd37);}function _0x173f2b(_0x4a752a,_0x397781,_0x54d09f,_0x35e066){return _0x188d(_0x54d09f- -_0x44dfa6._0x1b33b3,_0x4a752a);}return _0x3f6328['map'](_0x4d458c=>{const _0x328389={_0x4010ae:0x4d2,_0x5a755b:0xb6,_0x120c44:0x14d};function _0x31a1a8(_0x3f43f0,_0x4a8ff5,_0x38afe4,_0x370103){return _0x3e6674(_0x3f43f0-_0x328389._0x4010ae,_0x4a8ff5-_0x328389._0x5a755b,_0x38afe4-_0x328389._0x120c44,_0x4a8ff5);}if(_0x4d458c[_0x31a1a8(_0x2d698d._0x53e5e9,0x52f,_0x2d698d._0x1cd355,_0x2d698d._0x3a4f08)]==='text')return normalizeTextBlock(_0x4d458c);return structuredClone(_0x4d458c);});}function normalizeSystem(_0x1834c0=[]){const _0x4c349a={_0x389052:0x2f};function _0x431eff(_0x1e8561,_0x56389c,_0x21e8c5,_0x41ed3b){return _0x188d(_0x1e8561-0x30,_0x56389c);}function _0x8a4ff0(_0x12a8be,_0x257a4b,_0x1231e0,_0x336797){return _0x188d(_0x1231e0-_0x4c349a._0x389052,_0x257a4b);}return normalizeContent(_0x1834c0)['filter'](_0x4dbd61=>_0x4dbd61[_0x431eff(0x202,0x20b,0x1e9,0x1ec)]===_0x431eff(0x1e5,0x1fc,0x1d8,0x1fe));}function normalizeMessage(_0x597bac){const _0x11f67e={_0x7392ba:0x1b4,_0x6dba0a:0x19a,_0x55480d:0x1a6,_0x38c80d:0x1bd,_0xf3beaa:0x1a9,_0x51af19:0x1a7},_0x4acea6={_0xd10885:0x368};function _0x41e0e7(_0x16c0c0,_0x2106ab,_0x1358da,_0x5b5b56){return _0x188d(_0x5b5b56- -0x375,_0x1358da);}function _0x76b360(_0x3fedfb,_0xa50401,_0x325681,_0x3e699e){return _0x188d(_0x3fedfb- -_0x4acea6._0xd10885,_0xa50401);}return{...typeof _0x597bac['id']===_0x41e0e7(-_0x11f67e._0x7392ba,-_0x11f67e._0x6dba0a,-0x193,-0x1a8)?{'id':_0x597bac['id']}:{},'role':_0x597bac['role'],'content':normalizeContent(_0x597bac[_0x76b360(-0x1bf,-0x1b0,-0x1b0,-0x1d9)]),..._0x597bac[_0x76b360(-0x1a9,-0x1c1,-_0x11f67e._0x55480d,-_0x11f67e._0x38c80d)]?{'providerState':structuredClone(_0x597bac[_0x76b360(-_0x11f67e._0xf3beaa,-0x198,-0x19b,-_0x11f67e._0x51af19)])}:{}};}function compileRequest(_0x41e433){const _0x269123={_0x2cc1d3:0x3c3,_0x1e7b2a:0x3d7,_0x200f13:0x3db,_0x43cb13:0x3c0,_0x118fa3:0x21c,_0x151dc7:0x1fd,_0x435b3f:0x3d1,_0x3ee6f9:0x3c4,_0x2fbfc9:0x3ae,_0x88b86e:0x3c8,_0x484eb4:0x3c8,_0x92965e:0x3ee,_0x37c4c8:0x3d4,_0x2bb0f1:0x3e6,_0x433c57:0x1f1,_0x75cb44:0x3e1,_0x195486:0x3fd},_0x45e303={_0x544f5b:0x3d6},_0x5b8428={_0x249d25:0x218};function _0x5d7b46(_0x2edbe7,_0x196622,_0x566292,_0x11adcc){return _0x188d(_0x196622-_0x5b8428._0x249d25,_0x566292);}function _0x4a7d1f(_0x1887cd,_0x296319,_0x455a5b,_0x2c9f4d){return _0x188d(_0x296319- -_0x45e303._0x544f5b,_0x455a5b);}return{'model':_0x41e433[_0x5d7b46(0x3c5,_0x269123._0x2cc1d3,0x3bb,0x3cc)]??'claude-sonnet-4-20250514','max_tokens':_0x41e433['max_tokens']??0x400,..._0x41e433[_0x5d7b46(_0x269123._0x1e7b2a,_0x269123._0x200f13,0x3bf,_0x269123._0x43cb13)]?{'reasoning':structuredClone(_0x41e433[_0x4a7d1f(-_0x269123._0x118fa3,-0x213,-_0x269123._0x151dc7,-0x219)])}:{},'system':normalizeSystem(_0x41e433[_0x5d7b46(_0x269123._0x435b3f,_0x269123._0x3ee6f9,_0x269123._0x2fbfc9,0x3aa)]),'messages':_0x41e433[_0x5d7b46(0x3e4,_0x269123._0x88b86e,_0x269123._0x200f13,_0x269123._0x484eb4)]['map'](normalizeMessage),'tools':structuredClone(_0x41e433[_0x5d7b46(_0x269123._0x92965e,0x3e8,_0x269123._0x37c4c8,_0x269123._0x2bb0f1)]??[]),'metadata':{'session_id':_0x41e433[_0x4a7d1f(-_0x269123._0x433c57,-0x1f9,-0x1ec,-0x1ea)],'turn_id':_0x41e433[_0x5d7b46(_0x269123._0x75cb44,0x3f4,_0x269123._0x195486,0x407)]}};}function toChatRequest(_0x1dd9b9){const _0x586957={_0x52dcc2:0x3ef,_0x52b930:0x3e1,_0x13840d:0x405,_0x59cfca:0x3d9,_0x59d7cf:0xc6,_0x43b1ca:0xba,_0xc03d23:0xcb,_0x5b239b:0xe0,_0x4120e7:0xba,_0x55c8d5:0xbb,_0x1efa53:0xcb,_0x2f61f3:0xb3,_0x15fe99:0xc7,_0x4c33a7:0xbe,_0x37a628:0x3fc,_0x306468:0x3e4,_0x36f40f:0x411,_0xc603ab:0x420,_0x119b41:0xd3,_0x153287:0xb7,_0x496742:0xc0};function _0x2b2312(_0x31b681,_0x275482,_0x1069f1,_0xeb6c87){return _0x188d(_0x275482- -0xf8,_0x31b681);}function _0x23848c(_0x1c3246,_0x4f65d5,_0x4ca2b4,_0x2c7c7d){return _0x188d(_0x1c3246-0x244,_0x4ca2b4);}return{'model':_0x1dd9b9[_0x23848c(_0x586957._0x52dcc2,_0x586957._0x52b930,_0x586957._0x13840d,_0x586957._0x59cfca)],'maxTokens':_0x1dd9b9[_0x2b2312(_0x586957._0x59d7cf,0xc3,_0x586957._0x43b1ca,0xc4)],..._0x1dd9b9[_0x2b2312(0xc5,_0x586957._0xc03d23,_0x586957._0x5b239b,_0x586957._0x4120e7)]?{'reasoning':structuredClone(_0x1dd9b9[_0x2b2312(_0x586957._0x55c8d5,_0x586957._0x1efa53,0xb9,_0x586957._0x2f61f3)])}:{},'system':structuredClone(_0x1dd9b9[_0x2b2312(_0x586957._0x15fe99,0xb4,0xd0,_0x586957._0x4c33a7)]),'messages':structuredClone(_0x1dd9b9[_0x23848c(0x3f4,0x3d9,_0x586957._0x37a628,_0x586957._0x306468)]),'tools':structuredClone(_0x1dd9b9[_0x23848c(0x414,_0x586957._0x36f40f,0x404,_0x586957._0xc603ab)]),'metadata':{'sessionId':_0x1dd9b9['metadata']['session_id'],'turnId':_0x1dd9b9['metadata'][_0x2b2312(_0x586957._0x119b41,_0x586957._0x153287,_0x586957._0x496742,0xcc)]}};}function toModelRequest(_0x215013){const _0x40a9fa={_0xb812c1:0x68,_0x3f467f:0x83,_0x22d228:0xa6,_0x16a075:0x8f,_0x4ca96e:0x7f,_0x36e63b:0x8e,_0x1f7e98:0x95,_0x26d45d:0x81,_0x4970ff:0x50,_0x251907:0x80,_0x28b9bd:0x79,_0x5f3735:0x96},_0x434fb3={_0x3ea9c5:0x146},_0x362555={_0x517b39:0x129};function _0x3fdc91(_0x54e41a,_0x1851e2,_0x5d26c4,_0x1a6120){return _0x188d(_0x54e41a- -_0x362555._0x517b39,_0x1a6120);}function _0x9f6c11(_0x570dd9,_0xabb057,_0x42a886,_0x25b787){return _0x188d(_0x42a886- -_0x434fb3._0x3ea9c5,_0x25b787);}return{'model':_0x215013[_0x9f6c11(0x6a,_0x40a9fa._0xb812c1,0x65,0x57)],'max_tokens':_0x215013[_0x9f6c11(0x78,_0x40a9fa._0x3f467f,0x6d,0x67)],..._0x215013[_0x3fdc91(0x9a,_0x40a9fa._0x22d228,0xa9,_0x40a9fa._0x16a075)]?{'reasoning':structuredClone(_0x215013[_0x3fdc91(0x9a,_0x40a9fa._0x4ca96e,_0x40a9fa._0x36e63b,0x80)])}:{},'system':structuredClone(_0x215013[_0x3fdc91(0x83,_0x40a9fa._0x3f467f,_0x40a9fa._0x1f7e98,_0x40a9fa._0x26d45d)]),'messages':structuredClone(_0x215013[_0x9f6c11(0x65,_0x40a9fa._0x4970ff,0x6a,_0x40a9fa._0x251907)]),'tools':structuredClone(_0x215013['tools']),'metadata':{'session_id':_0x215013['metadata']['sessionId'],'turn_id':_0x215013[_0x9f6c11(_0x40a9fa._0x28b9bd,_0x40a9fa._0x5f3735,0x95,0xaf)]['turnId']}};}function _0x544e(){const _0x7bf690=['AM9PBG','Dgv4Da','odG5oda4tvDIA2j0','C3rVCf9YzwfZB24','B3v0Chv0x3rVA2vUCW','mJqXmZC0mejHBuziyq','Dg9VBf91C2u','Bwf4x3rVA2vUCW','DhjPBq','kgvUy3j5ChrLzcbYzwfZB25PBMCP','DxnHz2u','ChjVDMLKzxjtDgf0zq','C3vTBwfYEq','y2fSBeLK','BwfW','CMvHC29UAw5N','zMLSDgvY','mtbkrK9ZD1m','mti5ntC1mffmr1DrAG','B3v0Chv0vg9Rzw5Z','C3rHDhvZ','CMvHC29UAw5Nx3rVA2vUCW','mJfTuerpreC','BwvZC2fNzq','C3rVCfjLyxnVBG','C3rYAw5N','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','yw50AhjVCgLJx3rOAw5RAw5N','Dg9VBhm','Aw5WDxrFDg9Rzw5Z','DhLWzq','nvHUyuH1vq','Dg9VBf9Yzxn1Bhq','nZyZmtG4zxnrshrs','yxnZAxn0yw50','mtCXmZK3mdv6rg9PwMK','DgHPBMTPBMC','mtbmww53tuO','mteXnJK4mtLiDxPQCgS','Bwv0ywrHDge','DhvYBKLK','C2vZC2LVBKLK','zxjYB3i','BgvUz3rO','y29UDgvUDa','AxnbCNjHEq','Bw9KzwW','C3LZDgvT','zw5JCNLWDgvKq29UDgvUDa','mtuYmJiWmeH4BNP0rq','DhvYBL9Pza','BwvZC2fNzxm','B3bLBMfPx3jLyxnVBMLUzW','CMvHC29UAw5Nvg9Rzw5Z','Bwf4vg9Rzw5Z'];_0x544e=function(){return _0x7bf690;};return _0x544e();}function toProviderModelRequest(_0x3436c5){const _0x5beec8={_0x11fd9c:0x23e,_0x4baa82:0x255,_0x205ca4:0x347,_0xbb74d3:0x341};function _0x41abca(_0x4244b4,_0x29203d,_0x352068,_0x458b6c){return _0x188d(_0x4244b4-0x97,_0x458b6c);}function _0x48f80e(_0x52f01e,_0x1eb176,_0x5efde6,_0x53f074){return _0x188d(_0x5efde6-0x186,_0x52f01e);}return{'model':_0x3436c5[_0x41abca(0x242,_0x5beec8._0x11fd9c,0x23b,_0x5beec8._0x4baa82)],'max_tokens':_0x3436c5['maxTokens'],'system':structuredClone(_0x3436c5['system']),'messages':structuredClone(_0x3436c5[_0x48f80e(_0x5beec8._0x205ca4,_0x5beec8._0xbb74d3,0x336,0x333)]),'tools':structuredClone(_0x3436c5[_0x41abca(0x267,0x26a,0x258,0x272)])};}function toChatResponse(_0x5161dc){const _0x4661aa={_0x20acc4:0x408,_0x13a127:0x3e6,_0x438fc0:0x3e2,_0x3bad77:0x126,_0x4f006d:0x12f,_0x2657ab:0x406,_0x4189f5:0x410,_0x23016f:0x3f8,_0x1a6525:0x423,_0x243652:0x437,_0x4200d3:0x135,_0x401003:0x13f,_0x13c49d:0x14c,_0x2a21e5:0x155,_0x22bb13:0x148,_0x3f098d:0x136,_0x341345:0x41b,_0x5af6fd:0x417,_0x9b55f7:0x402,_0x4def2e:0x41e,_0x129813:0x42c,_0x1974fc:0x411},_0x2916b8={_0x5c3cc2:0x252},_0x3c2dda={_0x3833e0:0x2f3};function _0x453186(_0x317bda,_0x24e469,_0x4fb96f,_0x1c1b95){return _0x188d(_0x24e469- -_0x3c2dda._0x3833e0,_0x4fb96f);}function _0x524d69(_0x2e8064,_0x314c5f,_0x46c349,_0x262818){return _0x188d(_0x314c5f-_0x2916b8._0x5c3cc2,_0x2e8064);}return{'id':_0x5161dc['id'],'content':structuredClone(_0x5161dc[_0x524d69(_0x4661aa._0x20acc4,0x3fb,_0x4661aa._0x13a127,_0x4661aa._0x438fc0)]),'stopReason':_0x5161dc[_0x453186(-0x12a,-0x13c,-_0x4661aa._0x3bad77,-_0x4661aa._0x4f006d)],'usage':{'inputTokens':_0x5161dc[_0x524d69(_0x4661aa._0x2657ab,_0x4661aa._0x4189f5,_0x4661aa._0x23016f,0x409)][_0x524d69(0x416,_0x4661aa._0x1a6525,0x436,_0x4661aa._0x243652)],'outputTokens':_0x5161dc[_0x453186(-0x130,-_0x4661aa._0x4200d3,-_0x4661aa._0x401003,-_0x4661aa._0x13c49d)][_0x453186(-_0x4661aa._0x2a21e5,-0x13b,-_0x4661aa._0x22bb13,-_0x4661aa._0x4f006d)],..._0x5161dc[_0x453186(-_0x4661aa._0x3f098d,-0x135,-0x129,-0x120)][_0x524d69(0x403,_0x4661aa._0x341345,0x40e,_0x4661aa._0x5af6fd)]!==void 0x0?{'reasoningTokens':_0x5161dc[_0x524d69(0x3f6,0x410,_0x4661aa._0x9b55f7,_0x4661aa._0x4def2e)]['reasoning_tokens']}:{}},..._0x5161dc['providerState']?{'providerState':structuredClone(_0x5161dc[_0x524d69(_0x4661aa._0x129813,_0x4661aa._0x1974fc,0x424,0x3f8)])}:{}};}function toModelResponse(_0x3e3c8f){const _0x5bbdb4={_0x360639:0x510,_0x544d2b:0x4fc,_0x5f3609:0x4f0,_0x4d26a8:0x2c5,_0x423c7d:0x2f5,_0x3af5e9:0x4d8,_0x20960a:0x4df,_0x25e30c:0x4da,_0x301deb:0x4c7,_0x3c76f5:0x2ca,_0x579387:0x2e5,_0x5c99d2:0x2d4,_0x3c3dc2:0x2b2,_0x3ccce2:0x2c2,_0x396f23:0x2c6,_0x4bffa5:0x2c8,_0xf6056a:0x2e6,_0x1d22a5:0x2d9,_0x1bfc20:0x2e8,_0x110be8:0x4ec,_0x254682:0x4f4,_0x220c96:0x4ef,_0x169a87:0x4ee,_0x4ccb24:0x4e1,_0x6c8ecd:0x4ff,_0x4445ae:0x4f0,_0x34a7e7:0x2c5,_0x4c4a73:0x2d5};function _0x5cac42(_0x4538f1,_0x267f99,_0x2e7d01,_0x3c9ba3){return _0x188d(_0x2e7d01-0x331,_0x267f99);}function _0x2856e9(_0xa229f,_0x5b1275,_0x4c91fa,_0x50c74f){return _0x188d(_0x4c91fa-0x108,_0x50c74f);}return{'id':_0x3e3c8f['id'],'type':_0x5cac42(0x4eb,_0x5bbdb4._0x360639,_0x5bbdb4._0x544d2b,_0x5bbdb4._0x5f3609),'role':_0x2856e9(0x2eb,_0x5bbdb4._0x4d26a8,0x2de,_0x5bbdb4._0x423c7d),'content':structuredClone(_0x3e3c8f[_0x5cac42(_0x5bbdb4._0x3af5e9,_0x5bbdb4._0x20960a,_0x5bbdb4._0x25e30c,_0x5bbdb4._0x301deb)]),'stop_reason':_0x3e3c8f[_0x2856e9(_0x5bbdb4._0x3c76f5,_0x5bbdb4._0x579387,_0x5bbdb4._0x5c99d2,0x2dc)],'stop_sequence':null,'usage':{'input_tokens':_0x3e3c8f['usage']['inputTokens'],'output_tokens':_0x3e3c8f[_0x2856e9(_0x5bbdb4._0x3c3dc2,_0x5bbdb4._0x3ccce2,_0x5bbdb4._0x396f23,_0x5bbdb4._0x4bffa5)][_0x2856e9(_0x5bbdb4._0xf6056a,_0x5bbdb4._0x1d22a5,0x2cf,_0x5bbdb4._0x1bfc20)],..._0x3e3c8f['usage']['reasoningTokens']!==void 0x0?{'reasoning_tokens':_0x3e3c8f[_0x5cac42(_0x5bbdb4._0x110be8,_0x5bbdb4._0x254682,_0x5bbdb4._0x220c96,0x4fb)][_0x5cac42(_0x5bbdb4._0x169a87,_0x5bbdb4._0x4ccb24,0x4e3,_0x5bbdb4._0x254682)]}:{}},..._0x3e3c8f[_0x5cac42(0x4f3,_0x5bbdb4._0x6c8ecd,_0x5bbdb4._0x4445ae,0x4ec)]?{'providerState':structuredClone(_0x3e3c8f[_0x2856e9(_0x5bbdb4._0x34a7e7,0x2c0,0x2c7,_0x5bbdb4._0x4c4a73)])}:{}};}function _0x188d(_0x4fae18,_0x4da065){_0x4fae18=_0x4fae18-0x1a7;const _0x544e76=_0x544e();let _0x188d18=_0x544e76[_0x4fae18];if(_0x188d['VNPbOk']===undefined){var _0x41603f=function(_0x5cf7f2){const _0x151964='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4ee91a='',_0x4000ea='';for(let _0x3f6328=0x0,_0x4d458c,_0x1834c0,_0x4dbd61=0x0;_0x1834c0=_0x5cf7f2['charAt'](_0x4dbd61++);~_0x1834c0&&(_0x4d458c=_0x3f6328%0x4?_0x4d458c*0x40+_0x1834c0:_0x1834c0,_0x3f6328++%0x4)?_0x4ee91a+=String['fromCharCode'](0xff&_0x4d458c>>(-0x2*_0x3f6328&0x6)):0x0){_0x1834c0=_0x151964['indexOf'](_0x1834c0);}for(let _0x597bac=0x0,_0x41e433=_0x4ee91a['length'];_0x597bac<_0x41e433;_0x597bac++){_0x4000ea+='%'+('00'+_0x4ee91a['charCodeAt'](_0x597bac)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4000ea);};_0x188d['cESYNx']=_0x41603f,_0x188d['KvoWhM']={},_0x188d['VNPbOk']=!![];}const _0x4cb136=_0x544e76[0x0],_0x1e2379=_0x4fae18+_0x4cb136,_0x18b685=_0x188d['KvoWhM'][_0x1e2379];return!_0x18b685?(_0x188d18=_0x188d['cESYNx'](_0x188d18),_0x188d['KvoWhM'][_0x1e2379]=_0x188d18):_0x188d18=_0x18b685,_0x188d18;}function responseToAssistantMessage(_0x55db10){const _0x463bd5={_0x1e0cee:0x169,_0x1af89f:0x13e,_0x590b2c:0x142,_0x1435fe:0x13,_0x412b89:0x2,_0xaa8eb7:0x46,_0x20e5a0:0x2e,_0x3d263a:0x2c};function _0x19ac47(_0x2e4022,_0x42036b,_0xccf8b2,_0x1a8185){return _0x188d(_0x42036b- -0x191,_0xccf8b2);}function _0x505b2c(_0x2a657f,_0x854336,_0x4c4e0b,_0x6b3811){return _0x188d(_0x6b3811- -0x87,_0x4c4e0b);}return{'role':_0x505b2c(_0x463bd5._0x1e0cee,_0x463bd5._0x1af89f,_0x463bd5._0x590b2c,0x14f),'content':normalizeContent(_0x55db10[_0x19ac47(_0x463bd5._0x1435fe,0x18,0x1,_0x463bd5._0x412b89)]),..._0x55db10[_0x19ac47(_0x463bd5._0xaa8eb7,_0x463bd5._0x20e5a0,0x45,_0x463bd5._0x3d263a)]?{'providerState':structuredClone(_0x55db10['providerState'])}:{}};}function createReasoningMessage(_0x1ebd02){const _0x50485c={_0x210b39:0x511,_0x3cb6d1:0x4e5,_0x51f521:0x516,_0x1ed4de:0x5,_0x5f23c1:0x26,_0x3f45a9:0x22},_0x5c845e={_0x5d9d15:0xcf,_0x141bee:0xce,_0x3aace6:0xeb,_0x1caeab:0xc5,_0x55bf29:0xc2,_0x381cd1:0xdc,_0x1cbe19:0x54c,_0x240fee:0x56a},_0x3ef823={_0x12a7a5:0x44d,_0x183f59:0x137};function _0x3b4634(_0x300ea9,_0x4adb7f,_0x21f1fa,_0x4ef821){return _0x188d(_0x4adb7f-0x357,_0x4ef821);}function _0x22f06c(_0x575968,_0x562a70,_0x206cfb,_0x121f56){return _0x188d(_0x562a70- -0x1cb,_0x575968);}const _0x32178c=normalizeContent(_0x1ebd02?.[_0x3b4634(_0x50485c._0x210b39,0x500,_0x50485c._0x3cb6d1,_0x50485c._0x51f521)])[_0x22f06c(-_0x50485c._0x1ed4de,-0x7,-0x5,-0xf)](_0x161a6d=>{const _0x94bf1d={_0x2e3be2:0x1b6};function _0x1055bd(_0x40340b,_0x565a6a,_0x1a53af,_0x27fb15){return _0x3b4634(_0x40340b-0x1ae,_0x27fb15- -_0x3ef823._0x12a7a5,_0x1a53af-_0x3ef823._0x183f59,_0x565a6a);}function _0x1e8fa1(_0x2171ac,_0xee547b,_0x59c5a2,_0x36fdde){return _0x22f06c(_0xee547b,_0x2171ac-0x57b,_0x59c5a2-_0x94bf1d._0x2e3be2,_0x36fdde-0xfd);}return _0x161a6d['type']===_0x1055bd(_0x5c845e._0x5d9d15,0xe6,0xdc,0xd8)||_0x161a6d['type']===_0x1055bd(_0x5c845e._0x141bee,_0x5c845e._0x3aace6,_0x5c845e._0x1caeab,0xd9)||_0x161a6d[_0x1055bd(_0x5c845e._0x55bf29,0xe5,0xde,_0x5c845e._0x381cd1)]===_0x1e8fa1(0x561,0x566,_0x5c845e._0x1cbe19,_0x5c845e._0x240fee);});if(_0x32178c[_0x22f06c(-_0x50485c._0x5f23c1,-0x23,-0x29,-_0x50485c._0x3f45a9)]===0x0)return void 0x0;return{'role':'assistant','content':_0x32178c};}function createAssistantTextMessage(_0x2471b6){const _0xef19f9={_0x10272c:0x400,_0x2035d9:0x54b},_0x219fa0={_0x2e263d:0x375},_0x22578f={_0x1d5e5e:0xfd,_0x1b6932:0x102,_0x58d23e:0xe5},_0xcb7ce1=normalizeContent(_0x2471b6?.[_0x39cab8(0x3de,0x3e4,0x3db,_0xef19f9._0x10272c)])['filter'](_0x477b8c=>{function _0x206b95(_0x323465,_0x393ece,_0x1688ac,_0x3a5977){return _0x39cab8(_0x323465-0x77,_0x393ece- -0x310,_0x323465,_0x3a5977-0x12b);}return _0x477b8c[_0x206b95(0x100,_0x22578f._0x1d5e5e,_0x22578f._0x1b6932,_0x22578f._0x58d23e)]==='text';});function _0xd7af2e(_0x23e896,_0x4c991f,_0x2f9e26,_0x1a3a5a){return _0x188d(_0x4c991f-_0x219fa0._0x2e263d,_0x2f9e26);}if(_0xcb7ce1['length']===0x0)return void 0x0;function _0x39cab8(_0x2f1793,_0xe06f0f,_0x55ffec,_0x7fb9e6){return _0x188d(_0xe06f0f-0x23b,_0x55ffec);}return{'role':_0xd7af2e(0x549,_0xef19f9._0x2035d9,0x531,0x540),'content':_0xcb7ce1};}function createToolUseMessage(_0x5c71ed){const _0x24f9e8={_0x698038:0x520,_0x4f365b:0x531,_0x2d028f:0x548,_0xdeba23:0x543,_0x43b52d:0x35,_0x188fd8:0x48,_0x34b964:0x70,_0x3b7943:0x6b},_0x5c4391={_0x5bdb0e:0x36d},_0x5ac25b={_0x5a3bec:0x49c,_0xfea889:0x48a,_0x517571:0x49e},_0x4a9560=normalizeContent(_0x5c71ed?.[_0x4803df(0x516,0x503,0x523,_0x24f9e8._0x698038)])[_0x4803df(_0x24f9e8._0x4f365b,_0x24f9e8._0x2d028f,0x53e,_0x24f9e8._0xdeba23)](_0x2088b3=>{const _0x4304b1={_0x2f09c9:0x1d4,_0x3b6b66:0xca};function _0x57cb86(_0x3f9e2c,_0x49d143,_0x5c346b,_0x574d72){return _0x17f022(_0x3f9e2c-_0x4304b1._0x2f09c9,_0x5c346b-0x43b,_0x5c346b-_0x4304b1._0x3b6b66,_0x49d143);}return _0x2088b3['type']===_0x57cb86(_0x5ac25b._0x5a3bec,0x470,_0x5ac25b._0xfea889,_0x5ac25b._0x517571);});if(_0x4a9560[_0x17f022(0x4f,0x3d,_0x24f9e8._0x43b52d,_0x24f9e8._0x188fd8)]===0x0)return void 0x0;function _0x17f022(_0x590819,_0x421821,_0x59507c,_0x32553b){return _0x188d(_0x421821- -0x16b,_0x32553b);}function _0x4803df(_0x64629d,_0x25b39b,_0x14035c,_0x146152){return _0x188d(_0x64629d-_0x5c4391._0x5bdb0e,_0x25b39b);}return{'role':_0x17f022(_0x24f9e8._0x34b964,_0x24f9e8._0x3b7943,0x76,0x6b),'content':_0x4a9560};}function getTextFromMessage(_0x478d27){const _0x3f27e3={_0x304456:0x5a6,_0x252b23:0x5a4,_0x4202e2:0x202,_0x32d56a:0x21e,_0x42e997:0x227,_0x1fcd42:0x1f4,_0x3c1284:0x210,_0x4ee3a9:0x226},_0x6a17c2={_0x3eb062:0x5c};function _0x3cc586(_0x2f5f64,_0x4809c2,_0x138aa8,_0x1e9715){return _0x188d(_0x1e9715-0x3e0,_0x4809c2);}function _0x47e4a1(_0x302574,_0x303287,_0x746362,_0x1be555){return _0x188d(_0x746362-_0x6a17c2._0x3eb062,_0x302574);}return normalizeContent(_0x478d27?.[_0x47e4a1(0x21c,0x210,0x205,0x210)])[_0x3cc586(0x5af,0x5ad,_0x3f27e3._0x304456,_0x3f27e3._0x252b23)](_0x23c646=>_0x23c646['type']===_0x47e4a1(0x224,0x207,0x211,0x211))[_0x47e4a1(0x214,_0x3f27e3._0x4202e2,_0x3f27e3._0x32d56a,_0x3f27e3._0x42e997)](_0x3620e3=>_0x3620e3['text'])[_0x47e4a1(0x20b,_0x3f27e3._0x1fcd42,_0x3f27e3._0x3c1284,_0x3f27e3._0x4ee3a9)]('\x0a');}function getReasoningTextFromMessage(_0x1783f6){const _0x2599c7={_0x33be79:0x3c1,_0x190ebd:0x3c7,_0x187c3b:0x3c0},_0x42ede7={_0x3383a7:0xa6,_0x3dd7b:0xb8,_0x24c073:0xac,_0x16a34c:0xc1,_0x50f519:0xbf,_0x26efa0:0xc6,_0x40c486:0xb2,_0x5aec3d:0xe3,_0x9c41e6:0xcf,_0x21a67:0xce,_0x1c54cb:0x1f0,_0xf94d5:0xbe,_0x43daea:0xc4,_0x5ea440:0xa9,_0x526694:0x9e,_0x20d494:0xb8,_0x226c96:0xf4,_0x445720:0xe6,_0x1f8fa7:0x1ea,_0x15235f:0x1dc,_0x523f67:0x1e5,_0xc81b29:0xd5,_0x1822cc:0xde,_0x4c6d2d:0xd2,_0x235a49:0x1ed,_0x491add:0x203,_0x5c76d7:0x1f0,_0x4f232a:0x1dc,_0x1ae50a:0x1f8,_0x358256:0x20f,_0x5a0738:0x1fd,_0x10905a:0xe7,_0x33d879:0xdd,_0x5c565a:0xd3},_0x4db2da={_0x1f7a26:0x20c};function _0x200192(_0x1e5b66,_0x45228b,_0x40a867,_0x52aa29){return _0x188d(_0x52aa29-_0x4db2da._0x1f7a26,_0x1e5b66);}return normalizeContent(_0x1783f6?.['content'])['flatMap'](_0x479ad6=>{function _0x4dc00d(_0x4f098a,_0x4426ea,_0x5a32c5,_0x4b831f){return _0x188d(_0x4b831f- -0x28a,_0x4f098a);}if(_0x479ad6[_0x4dc00d(-0xac,-0xa2,-_0x42ede7._0x3383a7,-_0x42ede7._0x3dd7b)]===_0x4dc00d(-0xd1,-_0x42ede7._0x24c073,-_0x42ede7._0x16a34c,-0xbb))return _0x479ad6[_0x4dc00d(-_0x42ede7._0x50f519,-_0x42ede7._0x3383a7,-_0x42ede7._0x26efa0,-_0x42ede7._0x40c486)][_0x4dc00d(-_0x42ede7._0x5aec3d,-0xb5,-_0x42ede7._0x9c41e6,-_0x42ede7._0x21a67)]()[_0x1a2be9(-0x1f4,-_0x42ede7._0x1c54cb,-0x1f4,-0x1fd)]>0x0?[_0x479ad6['thinking']]:[];if(_0x479ad6[_0x1a2be9(-0x1d0,-0x1ea,-0x1b7,-0x1d3)]===_0x4dc00d(-_0x42ede7._0xf94d5,-0xb8,-_0x42ede7._0x43daea,-0xbc))return['(redacted\x20reasoning)'];function _0x1a2be9(_0x44e7b1,_0x3e6451,_0x43484d,_0x98569b){return _0x188d(_0x98569b- -0x3a5,_0x44e7b1);}if(_0x479ad6[_0x4dc00d(-_0x42ede7._0x5ea440,-0x9d,-_0x42ede7._0x526694,-_0x42ede7._0x20d494)]!==_0x4dc00d(-_0x42ede7._0x226c96,-0xe7,-_0x42ede7._0x445720,-0xd9))return[];const _0x4ff9f7=_0x479ad6[_0x1a2be9(-_0x42ede7._0x1f8fa7,-_0x42ede7._0x15235f,-0x1ec,-_0x42ede7._0x523f67)]['map'](_0x53d25b=>_0x53d25b[_0x4dc00d(-0xc7,-0xef,-0xdd,-0xd5)])[_0x4dc00d(-0xcb,-0xd9,-_0x42ede7._0xc81b29,-_0x42ede7._0x26efa0)](_0x461343=>_0x461343[_0x1a2be9(-0x1d5,-0x1de,-0x1ed,-0x1e9)]()[_0x1a2be9(-0x1f8,-0x203,-0x1e6,-0x1fd)]>0x0)[_0x4dc00d(-_0x42ede7._0x1822cc,-_0x42ede7._0x4c6d2d,-0xf1,-0xd6)]('\x0a\x0a');if(_0x4ff9f7[_0x1a2be9(-0x1eb,-_0x42ede7._0x235a49,-0x20b,-0x1fd)]>0x0)return[_0x4ff9f7];if(_0x479ad6['text']&&_0x479ad6[_0x1a2be9(-_0x42ede7._0x491add,-0x1fd,-0x1e8,-_0x42ede7._0x5c76d7)][_0x1a2be9(-0x1e5,-0x1d4,-_0x42ede7._0x4f232a,-0x1e9)]()[_0x1a2be9(-_0x42ede7._0x1ae50a,-0x207,-_0x42ede7._0x358256,-_0x42ede7._0x5a0738)]>0x0)return[_0x479ad6['text']];return _0x479ad6[_0x4dc00d(-_0x42ede7._0x10905a,-0xf6,-_0x42ede7._0x33d879,-0xdd)]?[_0x4dc00d(-0xb7,-_0x42ede7._0x5c565a,-0xe4,-0xcd)]:[];})[_0x200192(0x3be,_0x2599c7._0x33be79,_0x2599c7._0x190ebd,_0x2599c7._0x187c3b)]('\x0a\x0a');}function getToolUseBlocks(_0x5a7ce1){const _0x1cf1bd={_0x4d8290:0x19e,_0x14d995:0x182},_0x50c203={_0x55ebea:0x3ac};function _0x4b8466(_0x35ef3d,_0x39258a,_0x553380,_0x52e39b){return _0x188d(_0x52e39b- -_0x50c203._0x55ebea,_0x35ef3d);}function _0x3dbfd3(_0x519d53,_0x1e6fb7,_0x260b71,_0x178c98){return _0x188d(_0x260b71- -0x3a,_0x178c98);}return normalizeContent(_0x5a7ce1?.['content'])[_0x3dbfd3(_0x1cf1bd._0x4d8290,0x170,0x18a,_0x1cf1bd._0x14d995)](_0x33f24a=>_0x33f24a[_0x4b8466(-0x1f1,-0x1f2,-0x1e4,-0x1da)]===_0x4b8466(-0x204,-0x209,-0x204,-0x1f2));}function getToolResultBlocks(_0x5cfc5c){const _0x38108f={_0x44e81c:0x391,_0x3f3b78:0x36c,_0x279e58:0x37f,_0x9eed45:0x133,_0x45f27f:0x114},_0x38f15a={_0x371bed:0x2e7},_0x8fb608={_0x53a354:0x1d6};function _0x30a0e9(_0x2fa8b0,_0x17e64c,_0x488d8b,_0x83b298){return _0x188d(_0x83b298-_0x8fb608._0x53a354,_0x488d8b);}function _0x3c509d(_0x43f593,_0x437296,_0x2e9215,_0x413e3c){return _0x188d(_0x43f593- -_0x38f15a._0x371bed,_0x413e3c);}return normalizeContent(_0x5cfc5c?.[_0x30a0e9(_0x38108f._0x44e81c,_0x38108f._0x3f3b78,0x37b,_0x38108f._0x279e58)])[_0x3c509d(-0x123,-0x10c,-_0x38108f._0x9eed45,-_0x38108f._0x45f27f)](_0x2aaacd=>_0x2aaacd[_0x30a0e9(0x39c,0x3a6,0x3a4,0x3a8)]==='tool_result');}function createToolResultUserMessage(_0x1c3b9e){const _0x198064={_0x42562c:0x2c,_0x509bcb:0x26,_0x557af9:0x37},_0x9ac7a7={_0x781334:0x15a,_0x462564:0x163,_0x325415:0x150,_0x4b2364:0x14e,_0xfa83d4:0x142,_0x452289:0x158,_0x918ae2:0x174,_0x5aca05:0x16e},_0x3f5e45={_0x54a4fb:0xcd,_0x12f769:0x15a,_0x51147f:0x16},_0x4db736={_0x17aab5:0x196};function _0x23997e(_0x1f7c5a,_0x37a7ad,_0x47c5f8,_0x4a0a6f){return _0x188d(_0x37a7ad- -_0x4db736._0x17aab5,_0x47c5f8);}return{'role':'user','content':_0x1c3b9e[_0x23997e(0x39,_0x198064._0x42562c,_0x198064._0x509bcb,_0x198064._0x557af9)](_0x12ca1b=>{const _0x571bcd={_0x14ac6e:0x19,_0x5bde73:0x125};function _0x5276aa(_0x11da68,_0xb78d38,_0xa9eea7,_0xdc679e){return _0x23997e(_0x11da68-_0x571bcd._0x14ac6e,_0xb78d38-_0x571bcd._0x5bde73,_0x11da68,_0xdc679e-0x13a);}function _0x4993a1(_0x47b9d4,_0x1f86ca,_0x4a3d3d,_0x4d596c){return _0x23997e(_0x47b9d4-_0x3f5e45._0x54a4fb,_0x4d596c-_0x3f5e45._0x12f769,_0x1f86ca,_0x4d596c-_0x3f5e45._0x51147f);}return{'type':_0x5276aa(_0x9ac7a7._0x781334,_0x9ac7a7._0x462564,0x159,0x16a),'tool_use_id':_0x12ca1b[_0x5276aa(0x141,_0x9ac7a7._0x325415,_0x9ac7a7._0x4b2364,0x150)],'content':_0x12ca1b['content']??_0x12ca1b['output'],'is_error':_0x12ca1b[_0x5276aa(_0x9ac7a7._0xfa83d4,0x157,0x153,_0x9ac7a7._0x452289)]===_0x4993a1(0x168,_0x9ac7a7._0x918ae2,_0x9ac7a7._0x5aca05,0x16b)};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};
|
|
1
|
+
(function(_0x3c388d,_0xf0cbf5){const _0x100a71={_0xf54a8a:0x239,_0x2533b9:0x22d,_0x5999b4:0x230,_0x4d71b3:0xa,_0x528707:0x2f,_0x432e9c:0x240,_0x317c0c:0x239,_0x19d2cb:0x23e,_0x591680:0x251,_0x331d86:0x251,_0x2d9566:0x15,_0x5e4ae8:0x25,_0x5ebad5:0x37,_0xef0c33:0x30,_0x5a1bc6:0x29,_0x22311c:0x238,_0x5ecd44:0x24f,_0x5b2a52:0x24e,_0x211f72:0x257,_0x144a93:0x229,_0x37157a:0x229,_0x2af85e:0x5e,_0x3c7884:0x241},_0x21d85f={_0x42bca6:0x12e};function _0xb2d9e1(_0x415773,_0x32274e,_0x45062c,_0x7bccdf){return _0x584d(_0x415773-0xd9,_0x7bccdf);}const _0x42c202=_0x3c388d();function _0x5ab78b(_0x1fe330,_0x10d2c3,_0x3ca648,_0x262fc7){return _0x584d(_0x3ca648- -_0x21d85f._0x42bca6,_0x262fc7);}while(!![]){try{const _0x2ccd3b=-parseInt(_0xb2d9e1(_0x100a71._0xf54a8a,_0x100a71._0x2533b9,_0x100a71._0x5999b4,0x21c))/0x1+parseInt(_0x5ab78b(0x36,_0x100a71._0x4d71b3,0x1f,_0x100a71._0x528707))/0x2+-parseInt(_0xb2d9e1(_0x100a71._0x432e9c,0x258,_0x100a71._0x317c0c,_0x100a71._0x19d2cb))/0x3*(-parseInt(_0xb2d9e1(_0x100a71._0x591680,_0x100a71._0x331d86,0x252,0x26c))/0x4)+parseInt(_0x5ab78b(0x2c,_0x100a71._0x2d9566,_0x100a71._0x5e4ae8,0x36))/0x5*(parseInt(_0x5ab78b(_0x100a71._0x5ebad5,0x39,_0x100a71._0xef0c33,_0x100a71._0x5a1bc6))/0x6)+-parseInt(_0x5ab78b(0x44,0x2d,0x2d,0x3f))/0x7*(parseInt(_0xb2d9e1(_0x100a71._0x22311c,0x22e,_0x100a71._0x5ecd44,0x252))/0x8)+parseInt(_0xb2d9e1(_0x100a71._0x5b2a52,_0x100a71._0x22311c,0x24d,_0x100a71._0x211f72))/0x9*(parseInt(_0xb2d9e1(0x223,0x233,_0x100a71._0x144a93,_0x100a71._0x37157a))/0xa)+-parseInt(_0x5ab78b(0x2e,_0x100a71._0x2af85e,0x43,0x2d))/0xb*(parseInt(_0xb2d9e1(_0x100a71._0x3c7884,0x24d,0x258,0x244))/0xc);if(_0x2ccd3b===_0xf0cbf5)break;else _0x42c202['push'](_0x42c202['shift']());}catch(_0x581b60){_0x42c202['push'](_0x42c202['shift']());}}}(_0xb23c,0xcc446));function createTextBlock(_0x277879){const _0xe58c6a={_0x4e4e46:0x178};function _0x498295(_0x5dfb94,_0x51881b,_0x56d105,_0x51300f){return _0x584d(_0x5dfb94- -0x2d6,_0x51881b);}return{'type':_0x498295(-0x187,-0x1a2,-_0xe58c6a._0x4e4e46,-0x193),'text':_0x277879};}function normalizeTextBlock(_0x4f83eb){return createTextBlock(_0x4f83eb['text']??'');}function normalizeContent(_0x4aa6d1){const _0x1c0240={_0x435544:0x2bd,_0x5433d6:0x2b0,_0x2a5285:0x2c6,_0x1f15db:0x2eb,_0x1e48b9:0x2d3,_0x56c978:0x2bf,_0x18189a:0x2b9},_0x2fb2a0={_0x4ed5e2:0x12d};function _0x324407(_0x5a6a31,_0x3bc22d,_0x3835ee,_0x149ec8){return _0x584d(_0x149ec8-0x15f,_0x5a6a31);}function _0x32b5b5(_0x294928,_0x57e2c5,_0x55ee03,_0x466453){return _0x584d(_0x294928-_0x2fb2a0._0x4ed5e2,_0x57e2c5);}if(typeof _0x4aa6d1===_0x324407(_0x1c0240._0x435544,0x2c1,0x2c2,_0x1c0240._0x5433d6))return[createTextBlock(_0x4aa6d1)];if(!Array[_0x324407(0x2ed,_0x1c0240._0x2a5285,_0x1c0240._0x1f15db,_0x1c0240._0x1e48b9)](_0x4aa6d1))return[];return _0x4aa6d1[_0x324407(0x2df,_0x1c0240._0x56c978,_0x1c0240._0x18189a,0x2c4)](_0x30f8fe=>{if(_0x30f8fe['type']==='text')return normalizeTextBlock(_0x30f8fe);return structuredClone(_0x30f8fe);});}function normalizeSystem(_0x9a9d23=[]){return normalizeContent(_0x9a9d23)['filter'](_0x3cdeda=>_0x3cdeda['type']==='text');}function _0xb23c(){const _0x2e495c=['mtyXntG0mtbltgvhq3O','Bw9KzwW','Aw5WDxruB2TLBNm','mJe1nZa1nMDnsxvLEq','CMvHC29UAw5Nvg9Rzw5Z','Dgv4Da','C3rVCf9YzwfZB24','C3rYAw5N','Bwv0ywrHDge','mtvlDxzeu0G','y29UDgvUDa','zw5JCNLWDgvKq29UDgvUDa','DhLWzq','DhvYBL9Pza','C2vZC2LVBKLK','DhvYBKLK','BgvUz3rO','nty5mdKZwvzswKn4','ChjVDMLKzxjtDgf0zq','zMXHDe1HCa','oty3mJu0y05RDgPv','ndbSvgjQqNG','nZqZnJDnsKzfBeO','yxnZAxn0yw50','C3LZDgvT','Aw5WDxrFDg9Rzw5Z','DgHPBMTPBMC','BwfW','B3bLBMfPx3jLyxnVBMLUzW','m3HgqKnTDq','mta0mJHyDxz3vxO','Dg9VBf91C2u','CM9Szq','DxnLCG','DhjPBq','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','zMLSDgvY','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','CMvHC29UAw5N','ndm4mZvjyLPyDva','AM9PBG','C3vTBwfYEq','AxnbCNjHEq','ou9MD3rIsq','B3v0Chv0','DxnHz2u','nJqXmdaZnMvjwKfKwG','yw50AhjVCgLJx3rOAw5RAw5N','kgvUy3j5ChrLzcbYzwfZB25PBMCP','Bwf4vg9Rzw5Z','Dg9VBf9Yzxn1Bhq','B3v0Chv0x3rVA2vUCW','Dg9VBhm','Bwf4x3rVA2vUCW','B3v0Chv0vg9Rzw5Z','CMvHC29UAw5Nx3rVA2vUCW','BwvZC2fNzxm'];_0xb23c=function(){return _0x2e495c;};return _0xb23c();}function normalizeMessage(_0x3af569){const _0x567487={_0x2cbcc6:0x2c,_0x2e5767:0x42,_0x2d4244:0x42,_0x46c356:0xa1},_0x39df90={_0x104b93:0x128},_0x2f7e2c={_0x1c76c4:0xc4};function _0x1befd4(_0x25a906,_0x49faa7,_0x173f11,_0x23f9ae){return _0x584d(_0x173f11- -_0x2f7e2c._0x1c76c4,_0x49faa7);}function _0x126da0(_0x484a04,_0x56341b,_0xd2f0e1,_0x18c099){return _0x584d(_0xd2f0e1- -_0x39df90._0x104b93,_0x18c099);}return{...typeof _0x3af569['id']===_0x1befd4(0x76,0xa0,0x8d,0xa1)?{'id':_0x3af569['id']}:{},'role':_0x3af569[_0x126da0(_0x567487._0x2cbcc6,0x4f,_0x567487._0x2e5767,_0x567487._0x2d4244)],'content':normalizeContent(_0x3af569[_0x1befd4(0x84,0xa8,0x90,0x94)]),..._0x3af569[_0x1befd4(0xa5,0x94,0x98,_0x567487._0x46c356)]?{'providerState':structuredClone(_0x3af569['providerState'])}:{}};}function compileRequest(_0x464715){const _0x4b51d8={_0x2c65b9:0x8b,_0x4cb73e:0x82,_0x2fd9a3:0x1d7,_0x574483:0x6c,_0x28878f:0x71,_0x15f918:0x5f,_0x463105:0x7d,_0x2420a7:0x79,_0x55bfe8:0x61,_0x1bfac4:0x4a,_0x2c2ba8:0x1cb,_0x1d0b5b:0x1f7,_0x3135c1:0x88,_0x5230d0:0x72},_0xcbb241={_0x148084:0x1c6},_0x1fdbbc={_0x47a4ad:0x32a};function _0x2ab1f4(_0x4f4ba1,_0xc557a1,_0x343a17,_0x18a726){return _0x584d(_0xc557a1- -_0x1fdbbc._0x47a4ad,_0x18a726);}function _0x5c7357(_0x2d8162,_0x216a8f,_0x12ebd5,_0x283c7e){return _0x584d(_0x216a8f- -_0xcbb241._0x148084,_0x283c7e);}return{'model':_0x464715[_0x5c7357(-_0x4b51d8._0x2c65b9,-0x7b,-_0x4b51d8._0x4cb73e,-0x65)]??_0x2ab1f4(-_0x4b51d8._0x2fd9a3,-0x1bb,-0x1ae,-0x1c3),'max_tokens':_0x464715['max_tokens']??0x400,..._0x464715[_0x2ab1f4(-0x1b3,-0x1ba,-0x1a4,-0x1aa)]?{'reasoning':structuredClone(_0x464715[_0x5c7357(-0x3c,-0x56,-_0x4b51d8._0x574483,-_0x4b51d8._0x28878f)])}:{},'system':normalizeSystem(_0x464715[_0x5c7357(-0x63,-0x64,-_0x4b51d8._0x15f918,-0x51)]),'messages':_0x464715[_0x5c7357(-0x62,-_0x4b51d8._0x463105,-_0x4b51d8._0x2420a7,-0x71)][_0x5c7357(-0x7a,-_0x4b51d8._0x55bfe8,-_0x4b51d8._0x1bfac4,-0x45)](normalizeMessage),'tools':structuredClone(_0x464715[_0x2ab1f4(-_0x4b51d8._0x2c2ba8,-0x1e5,-0x200,-_0x4b51d8._0x1d0b5b)]??[]),'metadata':{'session_id':_0x464715[_0x5c7357(-_0x4b51d8._0x574483,-0x6e,-_0x4b51d8._0x3135c1,-_0x4b51d8._0x5230d0)],'turn_id':_0x464715[_0x2ab1f4(-0x1e0,-0x1d1,-0x1e1,-0x1c3)]}};}function toChatRequest(_0x48a86c){const _0x2fc74a={_0x3612e4:0x2be,_0x4c79f2:0x2b5,_0x510516:0x2a5,_0x169bee:0x2a0,_0x1320f2:0x2d0,_0xfb44f1:0x12d,_0xcf8da7:0x2a2,_0x5cf790:0x2a3,_0x250a61:0x29f,_0xa7fec2:0x2ac,_0x3261a1:0x13b},_0x13d9e2={_0x507764:0x28f};function _0x200b2c(_0x3f0515,_0x16a4c4,_0x1ec174,_0x1660a0){return _0x584d(_0x1660a0- -_0x13d9e2._0x507764,_0x1ec174);}function _0x5c82e2(_0x4dfe53,_0xb6786b,_0x5d6f80,_0x344f65){return _0x584d(_0x5d6f80-0x15a,_0xb6786b);}return{'model':_0x48a86c[_0x5c82e2(_0x2fc74a._0x3612e4,_0x2fc74a._0x4c79f2,_0x2fc74a._0x510516,0x2bc)],'maxTokens':_0x48a86c[_0x5c82e2(0x2a7,0x289,_0x2fc74a._0x169bee,0x287)],..._0x48a86c[_0x5c82e2(_0x2fc74a._0x1320f2,0x2ce,0x2ca,0x2ba)]?{'reasoning':structuredClone(_0x48a86c['reasoning'])}:{},'system':structuredClone(_0x48a86c[_0x200b2c(-0x134,-0x129,-0x138,-_0x2fc74a._0xfb44f1)]),'messages':structuredClone(_0x48a86c[_0x5c82e2(0x28d,_0x2fc74a._0xcf8da7,_0x2fc74a._0x5cf790,0x2b1)]),'tools':structuredClone(_0x48a86c['tools']),'metadata':{'sessionId':_0x48a86c[_0x5c82e2(0x2bd,_0x2fc74a._0x250a61,_0x2fc74a._0xa7fec2,0x2c7)]['session_id'],'turnId':_0x48a86c[_0x5c82e2(0x291,0x2b4,0x2ac,0x2b2)][_0x200b2c(-0x141,-0x11d,-_0x2fc74a._0x3261a1,-0x138)]}};}function toModelRequest(_0x27a80f){const _0x1da2a1={_0x171664:0x461,_0xc056d7:0x477,_0x469e7c:0x45e,_0x170afb:0x146,_0x2c02cc:0x149,_0x49b27a:0x466,_0x36f18b:0x475,_0x426185:0x468,_0x44fa43:0x467,_0x318818:0x491,_0x502691:0x474,_0x382977:0x44a,_0x2d7339:0x45c,_0x3663de:0x44c,_0x4206de:0x46f,_0x32b842:0x13e,_0x125280:0x151,_0xd2646e:0x13e,_0x40531d:0x137,_0x341900:0x163},_0x2db9cd={_0x28a6ee:0x313};function _0x2f3e2e(_0x529290,_0x387fe4,_0x142de3,_0x25a1c2){return _0x584d(_0x25a1c2-_0x2db9cd._0x28a6ee,_0x142de3);}function _0x57692a(_0x26da86,_0x41f760,_0x204a2b,_0x31916c){return _0x584d(_0x31916c- -0x11,_0x41f760);}return{'model':_0x27a80f[_0x2f3e2e(_0x1da2a1._0x171664,_0x1da2a1._0xc056d7,0x453,_0x1da2a1._0x469e7c)],'max_tokens':_0x27a80f['maxTokens'],..._0x27a80f[_0x57692a(_0x1da2a1._0x170afb,_0x1da2a1._0x2c02cc,0x14a,0x15f)]?{'reasoning':structuredClone(_0x27a80f[_0x2f3e2e(_0x1da2a1._0x49b27a,_0x1da2a1._0x36f18b,_0x1da2a1._0x426185,0x483)])}:{},'system':structuredClone(_0x27a80f[_0x2f3e2e(_0x1da2a1._0x44fa43,_0x1da2a1._0x318818,0x479,0x475)]),'messages':structuredClone(_0x27a80f[_0x2f3e2e(0x442,_0x1da2a1._0x502691,_0x1da2a1._0x382977,_0x1da2a1._0x2d7339)]),'tools':structuredClone(_0x27a80f[_0x2f3e2e(0x457,_0x1da2a1._0x3663de,_0x1da2a1._0x4206de,0x458)]),'metadata':{'session_id':_0x27a80f['metadata']['sessionId'],'turn_id':_0x27a80f[_0x57692a(_0x1da2a1._0x32b842,_0x1da2a1._0x125280,0x12b,0x141)][_0x57692a(_0x1da2a1._0xd2646e,_0x1da2a1._0x40531d,_0x1da2a1._0x341900,0x148)]}};}function toProviderModelRequest(_0x36a04c){const _0x2d6ec0={_0x6041cc:0x8a,_0x30a84a:0x76,_0x3561e5:0x92,_0x5ed121:0x4d3,_0x27defe:0x4dd,_0x366156:0x4bc,_0x434e5c:0x4d7,_0x2b5fc:0x4d2,_0x12d48b:0x4a3,_0x4babd9:0x49f},_0x2e3f28={_0x57479f:0xb9},_0x257fdf={_0x6559ac:0x35a};function _0x2319d2(_0x2bf5ca,_0x3b85af,_0x592edb,_0x2e6acc){return _0x584d(_0x2bf5ca-_0x257fdf._0x6559ac,_0x3b85af);}function _0xd3bb04(_0x88cbb8,_0x3f9dd5,_0x1c5a04,_0x548b7e){return _0x584d(_0x1c5a04- -_0x2e3f28._0x57479f,_0x88cbb8);}return{'model':_0x36a04c[_0xd3bb04(_0x2d6ec0._0x6041cc,_0x2d6ec0._0x30a84a,0x92,_0x2d6ec0._0x3561e5)],'max_tokens':_0x36a04c[_0x2319d2(0x4d5,0x4bf,_0x2d6ec0._0x5ed121,_0x2d6ec0._0x27defe)],'system':structuredClone(_0x36a04c[_0x2319d2(_0x2d6ec0._0x366156,_0x2d6ec0._0x434e5c,0x4ce,_0x2d6ec0._0x2b5fc)]),'messages':structuredClone(_0x36a04c[_0x2319d2(_0x2d6ec0._0x12d48b,_0x2d6ec0._0x4babd9,0x4bf,0x4b1)]),'tools':structuredClone(_0x36a04c['tools'])};}function _0x584d(_0x2b6cec,_0x56553b){_0x2b6cec=_0x2b6cec-0x145;const _0xb23cd6=_0xb23c();let _0x584d52=_0xb23cd6[_0x2b6cec];if(_0x584d['mITLGV']===undefined){var _0x20277a=function(_0x2c8344){const _0x2a2935='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x277879='',_0x4f83eb='';for(let _0x4aa6d1=0x0,_0x30f8fe,_0x9a9d23,_0x3cdeda=0x0;_0x9a9d23=_0x2c8344['charAt'](_0x3cdeda++);~_0x9a9d23&&(_0x30f8fe=_0x4aa6d1%0x4?_0x30f8fe*0x40+_0x9a9d23:_0x9a9d23,_0x4aa6d1++%0x4)?_0x277879+=String['fromCharCode'](0xff&_0x30f8fe>>(-0x2*_0x4aa6d1&0x6)):0x0){_0x9a9d23=_0x2a2935['indexOf'](_0x9a9d23);}for(let _0x3af569=0x0,_0x464715=_0x277879['length'];_0x3af569<_0x464715;_0x3af569++){_0x4f83eb+='%'+('00'+_0x277879['charCodeAt'](_0x3af569)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4f83eb);};_0x584d['zlWWdQ']=_0x20277a,_0x584d['knQPZC']={},_0x584d['mITLGV']=!![];}const _0x721de9=_0xb23cd6[0x0],_0x2bc0d6=_0x2b6cec+_0x721de9,_0x383dc0=_0x584d['knQPZC'][_0x2bc0d6];return!_0x383dc0?(_0x584d52=_0x584d['zlWWdQ'](_0x584d52),_0x584d['knQPZC'][_0x2bc0d6]=_0x584d52):_0x584d52=_0x383dc0,_0x584d52;}function toChatResponse(_0x27d2b4){const _0x1208ad={_0x8cbaa9:0x92,_0x2ea807:0x98,_0x244ce3:0x198,_0x5b5fd4:0x184,_0x43ec21:0x18a,_0x5bcc4e:0x1c2,_0x4b8022:0x1b2,_0x4d6d86:0x71,_0x44a35d:0xa2,_0x5c99de:0x89,_0x15576d:0x1c9,_0x3a3c0f:0x78,_0x3ad87d:0x6f,_0x55ae75:0x1a9,_0x4b5d1d:0x1bf,_0x1e791d:0x1b1,_0xbdc0ac:0x8c,_0x4fdf4a:0xa5,_0x4adff6:0xbf,_0x977581:0x1c8,_0x3dfb72:0x1b4,_0x1e6d09:0x1a8,_0x4c8ab1:0x1ab,_0x3a0492:0x196},_0x36d1e0={_0x1c95f0:0x1ec},_0x53e1f4={_0x362bba:0x3a};function _0x9b1e33(_0x439eea,_0x28aa51,_0x52d761,_0x5602e3){return _0x584d(_0x5602e3-_0x53e1f4._0x362bba,_0x52d761);}function _0x32507b(_0x47bc34,_0x57ff13,_0x697ee7,_0x129e6a){return _0x584d(_0x129e6a- -_0x36d1e0._0x1c95f0,_0x47bc34);}return{'id':_0x27d2b4['id'],'content':structuredClone(_0x27d2b4[_0x32507b(-0x7f,-_0x1208ad._0x8cbaa9,-0xac,-_0x1208ad._0x2ea807)]),'stopReason':_0x27d2b4[_0x9b1e33(0x18d,_0x1208ad._0x244ce3,_0x1208ad._0x5b5fd4,_0x1208ad._0x43ec21)],'usage':{'inputTokens':_0x27d2b4[_0x9b1e33(_0x1208ad._0x5bcc4e,0x19c,_0x1208ad._0x4b8022,0x1b1)][_0x32507b(-0x7c,-_0x1208ad._0x4d6d86,-_0x1208ad._0x44a35d,-_0x1208ad._0x5c99de)],'outputTokens':_0x27d2b4[_0x9b1e33(0x1ab,_0x1208ad._0x15576d,0x1ad,0x1b1)][_0x32507b(-0x5f,-_0x1208ad._0x3a3c0f,-0x6f,-_0x1208ad._0x3ad87d)],..._0x27d2b4[_0x9b1e33(0x1c9,_0x1208ad._0x55ae75,_0x1208ad._0x4b5d1d,_0x1208ad._0x1e791d)][_0x32507b(-_0x1208ad._0xbdc0ac,-_0x1208ad._0x4fdf4a,-_0x1208ad._0x4adff6,-0xa4)]!==void 0x0?{'reasoningTokens':_0x27d2b4[_0x9b1e33(_0x1208ad._0x977581,_0x1208ad._0x3dfb72,_0x1208ad._0x1e6d09,0x1b1)]['reasoning_tokens']}:{}},..._0x27d2b4['providerState']?{'providerState':structuredClone(_0x27d2b4[_0x9b1e33(_0x1208ad._0x4c8ab1,0x18f,0x183,_0x1208ad._0x3a0492)])}:{}};}function toModelResponse(_0xed8b65){const _0x37691d={_0x4ffa48:0x199,_0x18a0b2:0x193,_0x27f920:0x16f,_0x2433b7:0x186,_0x54a16c:0x191,_0x1fd5c6:0x1f0,_0x220e3d:0x1f4,_0x3e1fcd:0x176,_0x279722:0x18f,_0x3220fa:0x174,_0x1c8c98:0x17a,_0x16c8e9:0x169,_0x12a2a7:0x15f,_0x5988a6:0x1a9,_0x481bd4:0x18e,_0x2fef63:0x1de,_0x183e31:0x18e,_0x199083:0x177,_0x534c59:0x182};function _0x3e44dc(_0x1ea491,_0x3a212f,_0x5aa17d,_0x54da5f){return _0x584d(_0x3a212f-0x1b,_0x54da5f);}function _0x226ded(_0x4eac7a,_0x427ade,_0xa0672e,_0x15aae8){return _0x584d(_0x4eac7a- -0x325,_0x15aae8);}return{'id':_0xed8b65['id'],'type':'message','role':_0x3e44dc(_0x37691d._0x4ffa48,0x17c,0x160,_0x37691d._0x18a0b2),'content':structuredClone(_0xed8b65[_0x3e44dc(0x17f,_0x37691d._0x27f920,_0x37691d._0x2433b7,0x189)]),'stop_reason':_0xed8b65['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0xed8b65[_0x226ded(-0x1ae,-_0x37691d._0x54a16c,-0x1a7,-0x195)][_0x226ded(-0x1d9,-_0x37691d._0x1fd5c6,-_0x37691d._0x220e3d,-_0x37691d._0x220e3d)],'output_tokens':_0xed8b65[_0x3e44dc(_0x37691d._0x3e1fcd,0x192,_0x37691d._0x279722,0x183)][_0x3e44dc(_0x37691d._0x3220fa,0x162,_0x37691d._0x1c8c98,0x149)],..._0xed8b65['usage'][_0x3e44dc(0x172,_0x37691d._0x16c8e9,_0x37691d._0x12a2a7,0x17c)]!==void 0x0?{'reasoning_tokens':_0xed8b65[_0x3e44dc(_0x37691d._0x5988a6,0x192,0x185,_0x37691d._0x481bd4)][_0x226ded(-0x1d7,-0x1de,-_0x37691d._0x2fef63,-0x1d9)]}:{}},..._0xed8b65[_0x3e44dc(0x190,0x177,_0x37691d._0x2433b7,0x18d)]?{'providerState':structuredClone(_0xed8b65[_0x3e44dc(_0x37691d._0x183e31,_0x37691d._0x199083,0x16d,_0x37691d._0x534c59)])}:{}};}function responseToAssistantMessage(_0x20345d){const _0x4b3232={_0x3466dd:0x14a,_0x3f5f6a:0x445,_0xd29464:0x439,_0x8652cc:0x433,_0x1e2c22:0x434,_0x5d1e54:0x42c,_0x2bbbe7:0x43f},_0x371cd3={_0x78fb8:0x2e0},_0x4d2722={_0x2c6f75:0x297};function _0x49f1ce(_0x18ff1f,_0x37692c,_0x1b703e,_0x11e6f9){return _0x584d(_0x11e6f9- -_0x4d2722._0x2c6f75,_0x37692c);}function _0x5b25a6(_0x458f80,_0x2adfc6,_0x4fb84e,_0x45a903){return _0x584d(_0x45a903-_0x371cd3._0x78fb8,_0x2adfc6);}return{'role':_0x49f1ce(-0x143,-_0x4b3232._0x3466dd,-0x11e,-0x136),'content':normalizeContent(_0x20345d[_0x5b25a6(_0x4b3232._0x3f5f6a,_0x4b3232._0xd29464,_0x4b3232._0x8652cc,_0x4b3232._0x1e2c22)]),..._0x20345d['providerState']?{'providerState':structuredClone(_0x20345d[_0x5b25a6(_0x4b3232._0x5d1e54,_0x4b3232._0x2bbbe7,0x429,0x43c)])}:{}};}function createReasoningMessage(_0x188a84){const _0x183896={_0x5309b4:0x2ff,_0x166fdf:0x1ba,_0x17e4e5:0x2f5,_0x7ebfb1:0x2d8},_0x35105c={_0x3b99c7:0x60},_0x8dceaf={_0x3fe04d:0xd6,_0x39fff5:0x225,_0x252e0b:0xd9,_0x36d1e4:0xdd,_0x3c20e3:0xff,_0x2a8fe5:0xde,_0x228216:0xfa,_0x137e79:0x229,_0x6caa76:0x20c},_0x14f67f={_0xda6d09:0x1cf,_0x2ec209:0x5d,_0x356da8:0xd9},_0x2e705d={_0x32790f:0xb7,_0x24373c:0xb1},_0x46900c=normalizeContent(_0x188a84?.['content'])[_0x1e2d18(0x2e4,0x2ed,_0x183896._0x5309b4,0x2ff)](_0xc557f7=>{function _0x383b81(_0x5137b3,_0x2ad8a6,_0x533363,_0x4955a3){return _0x1e2d18(_0x5137b3-_0x2e705d._0x32790f,_0x2ad8a6-_0x2e705d._0x24373c,_0x5137b3- -0x211,_0x4955a3);}function _0x15ead8(_0x141552,_0x177a7a,_0x25f621,_0x323ac5){return _0x1e2d18(_0x141552-_0x14f67f._0xda6d09,_0x177a7a-_0x14f67f._0x2ec209,_0x141552- -_0x14f67f._0x356da8,_0x25f621);}return _0xc557f7[_0x383b81(_0x8dceaf._0x3fe04d,0xc6,0xed,0xba)]===_0x15ead8(_0x8dceaf._0x39fff5,0x232,0x22a,0x213)||_0xc557f7[_0x383b81(0xd6,_0x8dceaf._0x252e0b,0xbf,_0x8dceaf._0x36d1e4)]===_0x383b81(0xf9,_0x8dceaf._0x3c20e3,_0x8dceaf._0x2a8fe5,_0x8dceaf._0x228216)||_0xc557f7['type']===_0x15ead8(0x21e,0x224,_0x8dceaf._0x137e79,_0x8dceaf._0x6caa76);});if(_0x46900c[_0x406f08(0x1d6,0x1cd,_0x183896._0x166fdf,0x1d3)]===0x0)return void 0x0;function _0x406f08(_0x46a283,_0xd2a659,_0x36900b,_0x24d024){return _0x584d(_0x36900b-_0x35105c._0x3b99c7,_0xd2a659);}function _0x1e2d18(_0x5f4062,_0x23013c,_0x275da2,_0x317e9f){return _0x584d(_0x275da2-0x191,_0x317e9f);}return{'role':_0x1e2d18(_0x183896._0x17e4e5,_0x183896._0x7ebfb1,0x2f2,0x2e9),'content':_0x46900c};}function createAssistantTextMessage(_0xeb046d){const _0x312fa5={_0x49d963:0x71,_0x3911c8:0x85,_0x4d8d62:0x58,_0x193ac5:0x6b,_0x413f5d:0x70},_0x1491bd={_0x448c5a:0x3d3,_0x1b1a0b:0x3d3,_0x507288:0x3d5,_0x29ee4b:0x3d6};function _0x5232c6(_0x417640,_0x5717a9,_0x3d7005,_0x43230e){return _0x584d(_0x417640- -0x1c5,_0x3d7005);}const _0x1f900a=normalizeContent(_0xeb046d?.[_0x5232c6(-_0x312fa5._0x49d963,-_0x312fa5._0x3911c8,-0x69,-_0x312fa5._0x4d8d62)])['filter'](_0x2cadb9=>{const _0x251bd8={_0x43eb8d:0x2f1,_0x262415:0x4};function _0x594917(_0x3c77eb,_0x3866c3,_0x184a1b,_0x169fa1){return _0x5232c6(_0x3c77eb-0x449,_0x3866c3-0x60,_0x3866c3,_0x169fa1-0x1eb);}function _0x174963(_0x540389,_0x395961,_0x365604,_0x339cb7){return _0x5232c6(_0x365604-_0x251bd8._0x43eb8d,_0x395961-0x110,_0x339cb7,_0x339cb7-_0x251bd8._0x262415);}return _0x2cadb9[_0x594917(0x3da,_0x1491bd._0x448c5a,0x3f1,0x3c2)]===_0x594917(_0x1491bd._0x1b1a0b,0x3ba,_0x1491bd._0x507288,_0x1491bd._0x29ee4b);});if(_0x1f900a[_0x5232c6(-_0x312fa5._0x193ac5,-0x7e,-0x51,-_0x312fa5._0x413f5d)]===0x0)return void 0x0;function _0x3cd8f0(_0x33ede7,_0x37e6e3,_0x11c123,_0x420a39){return _0x584d(_0x33ede7-0x1d8,_0x37e6e3);}return{'role':'assistant','content':_0x1f900a};}function createToolUseMessage(_0x4cf754){const _0x44f6ba={_0x36f438:0x324,_0x52a01e:0x31d,_0x1375e0:0x319},_0x1ee9c1={_0x55a9d8:0x18f,_0x5f3ac8:0x1a7,_0x53be50:0x19c,_0x2d2f1d:0x195};function _0x4f1581(_0x35b07f,_0x407e1b,_0x28e8d5,_0x3d65ba){return _0x584d(_0x407e1b-0x1bf,_0x35b07f);}function _0x307678(_0xd06853,_0x1f5246,_0x312e2a,_0x48f1b6){return _0x584d(_0xd06853- -0x7,_0x48f1b6);}const _0x440836=normalizeContent(_0x4cf754?.[_0x4f1581(0x30d,0x313,0x32d,_0x44f6ba._0x36f438)])[_0x4f1581(0x32e,0x32d,0x325,0x327)](_0x529696=>{const _0x47c195={_0x14f902:0x2d};function _0x41bc7b(_0x97008c,_0x3173dc,_0x1db6d2,_0x4afee0){return _0x307678(_0x97008c-_0x47c195._0x14f902,_0x3173dc-0x2c,_0x1db6d2-0x14e,_0x1db6d2);}return _0x529696['type']===_0x41bc7b(_0x1ee9c1._0x55a9d8,_0x1ee9c1._0x5f3ac8,_0x1ee9c1._0x53be50,_0x1ee9c1._0x2d2f1d);});if(_0x440836[_0x4f1581(_0x44f6ba._0x52a01e,_0x44f6ba._0x1375e0,0x331,0x314)]===0x0)return void 0x0;return{'role':'assistant','content':_0x440836};}function getTextFromMessage(_0x2dd5cf){const _0x262b1a={_0x13ef60:0x1ee,_0x7a5a4:0x161,_0x3cb99f:0x1fd,_0x165be1:0x21a,_0x11205a:0x21a,_0x37cfa0:0x206,_0x346610:0x20c,_0x4eb95f:0x20d},_0x357aa6={_0x4705f3:0x2de};function _0x20afd4(_0x1d420b,_0x907e15,_0x304a6c,_0x55ae21){return _0x584d(_0x1d420b- -_0x357aa6._0x4705f3,_0x907e15);}function _0x4c0f33(_0x550afd,_0x461fa9,_0x5ce302,_0x478eea){return _0x584d(_0x550afd-0xa8,_0x461fa9);}return normalizeContent(_0x2dd5cf?.[_0x4c0f33(0x1fc,0x1f3,_0x262b1a._0x13ef60,0x1f7)])[_0x20afd4(-0x170,-0x18b,-_0x262b1a._0x7a5a4,-0x178)](_0x486564=>_0x486564['type']==='text')[_0x4c0f33(0x20d,_0x262b1a._0x3cb99f,0x1f2,_0x262b1a._0x165be1)](_0x5097f1=>_0x5097f1['text'])[_0x4c0f33(_0x262b1a._0x11205a,_0x262b1a._0x37cfa0,_0x262b1a._0x346610,_0x262b1a._0x4eb95f)]('\x0a');}function getReasoningTextFromMessage(_0x3158c6){const _0x2ab697={_0x4d03c0:0x16c,_0x1fcb7f:0x182,_0x436ae9:0x188,_0x564845:0x192,_0x22c6b1:0x158,_0x22a0c5:0x164},_0x2b52c8={_0xdb7e11:0x2c2,_0x4f1c15:0x2d0,_0x1c7975:0x14c,_0x4520fb:0x13b,_0x3f1ee0:0x132,_0x2f47de:0x2b8,_0x45c51b:0x2d4,_0x3502b0:0x14c,_0x42b5ba:0x141,_0x4ed8d8:0x162,_0x33b7d4:0x155,_0x27fa2a:0x15b,_0x15624c:0x14f,_0xe8e623:0x171,_0x62d597:0x141,_0x469722:0x15c,_0x270f27:0x130,_0x2637d1:0x150,_0x202a65:0x2fc,_0xe07e46:0x2e8,_0x2145b8:0x15a,_0x593dbb:0x170,_0x5c1cc6:0x168,_0x26cbe8:0x2c9,_0x971b27:0x2bb,_0x221c7a:0x137,_0x2e894f:0x13d,_0x4aa764:0x154,_0x5b08a5:0x14e,_0x4b4dbe:0x163,_0x3c4ad8:0x171,_0x1720c7:0x2b7,_0x2b4109:0x2c5,_0x4e2b9f:0x2c1,_0x301121:0x2bc,_0x4c535c:0x13d,_0x14b6ad:0x146,_0x4be76b:0x125,_0x818bad:0x12c,_0xe1c39e:0x168},_0xd15b0a={_0x28875a:0x12b};function _0x747d4b(_0x1998b4,_0xac73bd,_0x10746c,_0x57537f){return _0x584d(_0x57537f- -0x2d6,_0xac73bd);}function _0x5367b2(_0x32b3d2,_0x514e27,_0x2f7350,_0x120340){return _0x584d(_0x120340- -0x222,_0x32b3d2);}return normalizeContent(_0x3158c6?.[_0x747d4b(-0x185,-0x17a,-_0x2ab697._0x4d03c0,-_0x2ab697._0x1fcb7f)])[_0x747d4b(-_0x2ab697._0x436ae9,-_0x2ab697._0x564845,-0x190,-0x179)](_0x26c3e1=>{const _0x50455d={_0x2ac0e8:0x57};if(_0x26c3e1[_0x434549(0x2c9,_0x2b52c8._0xdb7e11,_0x2b52c8._0x4f1c15,0x2ea)]==='anthropic_thinking')return _0x26c3e1[_0x271b7e(_0x2b52c8._0x1c7975,0x130,_0x2b52c8._0x4520fb,_0x2b52c8._0x3f1ee0)]['trim']()[_0x434549(0x2d6,_0x2b52c8._0x2f47de,_0x2b52c8._0x45c51b,0x2ee)]>0x0?[_0x26c3e1[_0x271b7e(_0x2b52c8._0x3502b0,_0x2b52c8._0x42b5ba,0x135,_0x2b52c8._0x4ed8d8)]]:[];function _0x434549(_0x2a3dad,_0x4cd665,_0x173b1a,_0x32aedc){return _0x747d4b(_0x2a3dad-0x1ad,_0x32aedc,_0x173b1a-_0xd15b0a._0x28875a,_0x173b1a-0x450);}if(_0x26c3e1['type']===_0x271b7e(_0x2b52c8._0x33b7d4,0x152,0x139,0x159))return['(redacted\x20reasoning)'];function _0x271b7e(_0x3f9dd4,_0x22b942,_0xc5a57c,_0x4fbda2){return _0x5367b2(_0x22b942,_0x22b942-_0x50455d._0x2ac0e8,_0xc5a57c-0xae,_0x3f9dd4-0x20a);}if(_0x26c3e1['type']!=='openai_reasoning')return[];const _0x2d0590=_0x26c3e1[_0x271b7e(_0x2b52c8._0x27fa2a,_0x2b52c8._0x15624c,_0x2b52c8._0xe8e623,_0x2b52c8._0x62d597)][_0x271b7e(0x14d,_0x2b52c8._0x469722,_0x2b52c8._0x270f27,_0x2b52c8._0x2637d1)](_0x2c32ba=>_0x2c32ba[_0x271b7e(0x137,0x150,0x125,0x120)])[_0x434549(0x2e9,_0x2b52c8._0x202a65,_0x2b52c8._0xe07e46,0x2dc)](_0x53e2ad=>_0x53e2ad[_0x434549(0x2cd,0x2df,0x2e6,0x2ca)]()[_0x434549(0x2cb,0x2e3,0x2d4,0x2ba)]>0x0)[_0x271b7e(_0x2b52c8._0x2145b8,_0x2b52c8._0x593dbb,_0x2b52c8._0x5c1cc6,0x172)]('\x0a\x0a');if(_0x2d0590['length']>0x0)return[_0x2d0590];if(_0x26c3e1[_0x434549(0x2db,0x2d8,_0x2b52c8._0x26cbe8,_0x2b52c8._0x971b27)]&&_0x26c3e1[_0x271b7e(_0x2b52c8._0x221c7a,0x14d,_0x2b52c8._0x62d597,_0x2b52c8._0x2e894f)][_0x271b7e(_0x2b52c8._0x4aa764,_0x2b52c8._0x5b08a5,_0x2b52c8._0x4b4dbe,_0x2b52c8._0x3c4ad8)]()[_0x434549(_0x2b52c8._0x1720c7,0x2bc,0x2d4,_0x2b52c8._0x2b4109)]>0x0)return[_0x26c3e1[_0x434549(_0x2b52c8._0x4e2b9f,0x2c7,_0x2b52c8._0x26cbe8,_0x2b52c8._0x301121)]];return _0x26c3e1[_0x271b7e(_0x2b52c8._0x4c535c,_0x2b52c8._0x14b6ad,_0x2b52c8._0x4be76b,_0x2b52c8._0x818bad)]?[_0x271b7e(_0x2b52c8._0x4ed8d8,0x16b,_0x2b52c8._0xe1c39e,0x160)]:[];})[_0x747d4b(-0x162,-0x177,-_0x2ab697._0x22c6b1,-_0x2ab697._0x22a0c5)]('\x0a\x0a');}function getToolUseBlocks(_0x3fd58e){const _0x38aeb0={_0x3d08a4:0xc,_0x4be692:0x11,_0x510c67:0x0};function _0x27ead1(_0x5a28f7,_0x5b5423,_0x471954,_0x4c9262){return _0x584d(_0x471954- -0x155,_0x5b5423);}function _0x243bf6(_0x4febf3,_0x19ffd3,_0x47112f,_0x1c69ac){return _0x584d(_0x47112f-0x57,_0x1c69ac);}return normalizeContent(_0x3fd58e?.[_0x27ead1(_0x38aeb0._0x3d08a4,-_0x38aeb0._0x4be692,-0x1,_0x38aeb0._0x510c67)])['filter'](_0x43a8b0=>_0x43a8b0[_0x243bf6(0x199,0x19c,0x1ad,0x19a)]===_0x27ead1(0x24,0xa,0x14,0x1c));}function getToolResultBlocks(_0x122d59){const _0x545047={_0x2413dd:0x496};function _0x2bb74d(_0x3e85f6,_0x294894,_0x19c72e,_0x3609e2){return _0x584d(_0x19c72e-0x157,_0x294894);}function _0x3bcf58(_0xff21c,_0x23bc20,_0x47e9ff,_0x5af808){return _0x584d(_0x23bc20-0x32e,_0x47e9ff);}return normalizeContent(_0x122d59?.['content'])[_0x3bcf58(0x485,0x49c,_0x545047._0x2413dd,0x4a1)](_0x3b105c=>_0x3b105c[_0x3bcf58(0x479,0x484,0x495,0x48b)]===_0x3bcf58(0x49b,0x4aa,0x4a8,0x490));}function createToolResultUserMessage(_0x341942){const _0x35e07b={_0x1cab50:0x297,_0x57c5b0:0x286,_0x5ef652:0x106},_0x87fd3={_0x1ac722:0x17b,_0x3eb076:0x1ab,_0x42099a:0x193,_0x478a7f:0x1bf,_0x3cd472:0x1d6,_0x466555:0x1bb,_0x16381d:0x1ec,_0x18a3a2:0x1e1,_0x2ebb6b:0x1d2},_0x146c98={_0x12cd70:0xdf,_0x58ca01:0x102};function _0x56edc6(_0x15e482,_0x1f0081,_0x200ffe,_0x3f1a68){return _0x584d(_0x15e482- -0x77,_0x1f0081);}function _0x424cc9(_0x342c6e,_0x3f70d4,_0x2a6c66,_0x46f851){return _0x584d(_0x342c6e-0x114,_0x2a6c66);}return{'role':_0x424cc9(0x27f,_0x35e07b._0x1cab50,0x28e,_0x35e07b._0x57c5b0),'content':_0x341942[_0x56edc6(0xee,0xeb,_0x35e07b._0x5ef652,0xfe)](_0x38df49=>{const _0x1c915f={_0xade38b:0x423,_0x4b9f7f:0x30};function _0x373832(_0x3f5c99,_0x32802f,_0x262fd9,_0x3f8824){return _0x56edc6(_0x262fd9-_0x146c98._0x12cd70,_0x32802f,_0x262fd9-0x108,_0x3f8824-_0x146c98._0x58ca01);}function _0x355cec(_0x367b12,_0x5d3eba,_0x49985c,_0x1d18ac){return _0x424cc9(_0x1d18ac- -_0x1c915f._0xade38b,_0x5d3eba-_0x1c915f._0x4b9f7f,_0x49985c,_0x1d18ac-0x171);}return{'type':_0x355cec(-_0x87fd3._0x1ac722,-_0x87fd3._0x3eb076,-0x17c,-_0x87fd3._0x42099a),'tool_use_id':_0x38df49['callId'],'content':_0x38df49[_0x355cec(-0x1af,-_0x87fd3._0x478a7f,-_0x87fd3._0x3cd472,-_0x87fd3._0x466555)]??_0x38df49[_0x373832(_0x87fd3._0x16381d,_0x87fd3._0x18a3a2,0x1de,_0x87fd3._0x2ebb6b)],'is_error':_0x38df49['status']==='error'};})};}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x15dece,_0x426fb8){const _0x454855={_0x23ff2c:0x1e9,_0x1d1b47:0x250,_0x31beb7:0x1e3,_0x1b2723:0x199,_0xa18f7e:0x527,_0x1cce08:0x566,_0x2017e1:0x5b4,_0x25ccd1:0x5c3,_0x36ecdb:0x1fb,_0x46a93a:0x207,_0x4bfe55:0x60d,_0x1f1d15:0x5c4,_0x76bad9:0x5d9,_0x5bdce4:0x1d9,_0x51fe3a:0x1d9,_0x1897a4:0x565,_0x572a87:0x541,_0x381846:0x563,_0x4d7406:0x538,_0x2fc7f5:0x20e,_0x1c8ea8:0x243},_0x36823f={_0xd13a94:0x3bc};function _0x4dc36c(_0x2ee685,_0x1579bf,_0xa7351f,_0x1d37ed){return _0x53d6(_0x1d37ed- -_0x36823f._0xd13a94,_0xa7351f);}function _0x37d0d7(_0x1043f8,_0x24a26e,_0x4667c4,_0x33e2f8){return _0x53d6(_0x4667c4-0x3b6,_0x24a26e);}const _0x56e662=_0x15dece();while(!![]){try{const _0x177548=parseInt(_0x4dc36c(-0x20f,-0x1cb,-0x19b,-_0x454855._0x23ff2c))/0x1*(-parseInt(_0x4dc36c(-0x1c3,-_0x454855._0x1d1b47,-0x1e7,-0x1ff))/0x2)+parseInt(_0x4dc36c(-_0x454855._0x31beb7,-0x1e8,-_0x454855._0x1b2723,-0x1b4))/0x3+-parseInt(_0x37d0d7(0x53b,_0x454855._0xa18f7e,_0x454855._0x1cce08,0x538))/0x4+-parseInt(_0x37d0d7(_0x454855._0x2017e1,0x5bf,0x584,_0x454855._0x25ccd1))/0x5*(-parseInt(_0x4dc36c(-_0x454855._0x36ecdb,-0x231,-0x1cc,-_0x454855._0x46a93a))/0x6)+parseInt(_0x37d0d7(_0x454855._0x4bfe55,0x5a3,_0x454855._0x1f1d15,_0x454855._0x76bad9))/0x7+parseInt(_0x4dc36c(-_0x454855._0x5bdce4,-0x1cc,-0x1a5,-_0x454855._0x51fe3a))/0x8+parseInt(_0x37d0d7(_0x454855._0x1897a4,_0x454855._0x572a87,_0x454855._0x381846,_0x454855._0x4d7406))/0x9*(parseInt(_0x4dc36c(-_0x454855._0x2fc7f5,-0x251,-_0x454855._0x1c8ea8,-0x214))/0xa);if(_0x177548===_0x426fb8)break;else _0x56e662['push'](_0x56e662['shift']());}catch(_0x36be5b){_0x56e662['push'](_0x56e662['shift']());}}}(_0x2fd8,0x5e79c));import{createAssistantTextMessage,createReasoningMessage,createToolResultUserMessage,createToolUseMessage,getToolUseBlocks,normalizeMessage,normalizeSystem,responseToAssistantMessage}from'./chunk-G2FR4UGO.js';import{addAbortListener,isAbortError,throwIfAborted,toAbortError}from'./chunk-X7VAACWY.js';function isJsonObject(_0x1e44a6){const _0x1aad28={_0x3d3c8b:0x33b,_0x7bbd70:0x34c,_0x350c7c:0x30c,_0x3fe52e:0x2cb},_0x36a696={_0x111026:0x1e3};function _0x24d41d(_0x453b91,_0x390b3e,_0x5cb2ae,_0x5c0fc3){return _0x53d6(_0x390b3e-0x12a,_0x453b91);}function _0x4834e6(_0x3e6ab1,_0x445ef9,_0x6c7551,_0x360a58){return _0x53d6(_0x445ef9-_0x36a696._0x111026,_0x3e6ab1);}return typeof _0x1e44a6===_0x24d41d(_0x1aad28._0x3d3c8b,_0x1aad28._0x7bbd70,0x335,_0x1aad28._0x350c7c)&&_0x1e44a6!==null&&!Array[_0x24d41d(0x292,0x2cf,0x2fc,_0x1aad28._0x3fe52e)](_0x1e44a6);}function isToolOutputEnvelope(_0x439f51){const _0x317058={_0x481b7e:0x3c7,_0x3f907e:0x412,_0x43380c:0x42a,_0x10b1d3:0x3cf,_0x28bb93:0x3da,_0x23844d:0x3cd,_0x525a2b:0x3e5,_0x5ec185:0x411,_0x575d50:0x3ad,_0x50c1be:0x3f5,_0x55d68f:0x442,_0x84542:0x3fc,_0x33e1ed:0x427},_0x59a380={_0xc989b1:0x1f0};if(typeof _0x439f51!==_0x3fa36a(_0x317058._0x481b7e,0x3fd,_0x317058._0x3f907e,_0x317058._0x43380c)||_0x439f51===null||Array['isArray'](_0x439f51))return![];if(typeof _0x439f51[_0x3fa36a(_0x317058._0x10b1d3,_0x317058._0x28bb93,_0x317058._0x23844d,0x3d6)]!==_0x3fa36a(_0x317058._0x525a2b,_0x317058._0x5ec185,0x3c1,_0x317058._0x575d50))return![];function _0x3fa36a(_0x3b670e,_0x3f51d5,_0x5158cc,_0x219315){return _0x53d6(_0x5158cc-_0x59a380._0xc989b1,_0x219315);}function _0xfce146(_0x29f2e6,_0x431fe5,_0x62d016,_0x15f179){return _0x53d6(_0x431fe5- -0x185,_0x29f2e6);}const _0x420752=_0x439f51[_0x3fa36a(_0x317058._0x50c1be,_0x317058._0x55d68f,_0x317058._0x84542,_0x317058._0x33e1ed)];return _0x420752===void 0x0||isJsonObject(_0x420752);}function validateAgainstSchema(_0x2b6cae,_0xbc0f50,_0x2f676b){const _0x1ed441={_0x413985:0x43c,_0x3eeace:0x48b,_0x5e4958:0x2aa,_0x4c02fc:0x2ee,_0x175441:0x31e,_0x3daac8:0x348,_0x268bc1:0x329,_0x18a577:0x331,_0x36387b:0x311,_0x42027c:0x2b6,_0x4ae252:0x2d5,_0x14e743:0x2d2,_0x4c96e7:0x482,_0x383b09:0x4c5,_0x216c02:0x378,_0x5c3881:0x33e,_0x3b5953:0x33b,_0xe56bf3:0x49b,_0x110530:0x487,_0x12bc89:0x46c,_0x102a9c:0x43a,_0x4c993e:0x33f,_0x2e51d1:0x4da,_0x1af1fb:0x4ad,_0x246151:0x461,_0x37ac0a:0x49d,_0x181847:0x3f3,_0x5bf206:0x430,_0x1dc05b:0x42a,_0x467920:0x435,_0x358f06:0x44b,_0x4e4871:0x480,_0xad19c5:0x4aa,_0x55d3d3:0x4de,_0x4135a8:0x4b2,_0x272e11:0x4f0,_0x62387f:0x31b,_0x7fd317:0x47c,_0x3289ec:0x44a,_0x5b0e75:0x2de,_0x66bbae:0x30d,_0x1f2252:0x35f,_0x3be3e5:0x2d8,_0x4638d:0x2da,_0x5317d8:0x2a2,_0x54ef64:0x2ff,_0xc96e3b:0x2e7},_0x52e6ea={_0x2c48f4:0x231,_0x4cc61f:0x209,_0x26adb2:0x1e5};function _0x13b4ee(_0x19d23f,_0x5975cb,_0x57efa5,_0xe56b59){return _0x53d6(_0x57efa5-0x290,_0xe56b59);}function _0x2e6746(_0x29c3c0,_0xef1cd,_0x228315,_0xc32e2d){return _0x53d6(_0x228315-0x11d,_0xc32e2d);}switch(_0x2f676b[_0x13b4ee(0x42c,0x488,_0x1ed441._0x413985,_0x1ed441._0x3eeace)]){case'string':if(typeof _0xbc0f50!==_0x2e6746(0x2ec,_0x1ed441._0x5e4958,_0x1ed441._0x4c02fc,_0x1ed441._0x175441))throw new Error(_0x2e6746(_0x1ed441._0x3daac8,0x2d5,0x324,_0x1ed441._0x268bc1)+_0x2b6cae+_0x2e6746(_0x1ed441._0x18a577,_0x1ed441._0x36387b,0x306,_0x1ed441._0x42027c));return;case'number':if(typeof _0xbc0f50!==_0x2e6746(_0x1ed441._0x4ae252,0x31a,0x2f7,_0x1ed441._0x14e743))throw new Error(_0x13b4ee(_0x1ed441._0x4c96e7,0x449,0x497,_0x1ed441._0x383b09)+_0x2b6cae+_0x2e6746(_0x1ed441._0x216c02,_0x1ed441._0x5c3881,_0x1ed441._0x3b5953,0x2fc));return;case _0x13b4ee(_0x1ed441._0xe56bf3,_0x1ed441._0x110530,_0x1ed441._0x12bc89,_0x1ed441._0x102a9c):if(typeof _0xbc0f50!==_0x2e6746(_0x1ed441._0x4c993e,0x334,0x2f9,0x2be))throw new Error(_0x13b4ee(0x497,0x46d,0x497,_0x1ed441._0x2e51d1)+_0x2b6cae+_0x13b4ee(_0x1ed441._0x1af1fb,_0x1ed441._0x246151,0x47d,_0x1ed441._0x37ac0a));return;case _0x13b4ee(_0x1ed441._0x181847,0x430,0x42b,_0x1ed441._0x5bf206):if(!Array[_0x13b4ee(_0x1ed441._0x1dc05b,0x41e,_0x1ed441._0x467920,0x459)](_0xbc0f50))throw new Error('Invalid\x20tool\x20input\x20at\x20'+_0x2b6cae+_0x13b4ee(0x4d2,_0x1ed441._0x358f06,0x480,_0x1ed441._0x4e4871));_0xbc0f50['forEach']((_0x2752b3,_0x36eb63)=>{const _0x425f9b={_0x3950f9:0xaf};function _0xad6481(_0x482bb7,_0x285f8e,_0x294e87,_0x24fc0e){return _0x2e6746(_0x482bb7-_0x425f9b._0x3950f9,_0x285f8e-0x3f,_0x294e87- -0x9e,_0x482bb7);}validateAgainstSchema(_0x2b6cae+'['+_0x36eb63+']',_0x2752b3,_0x2f676b[_0xad6481(_0x52e6ea._0x2c48f4,0x221,_0x52e6ea._0x4cc61f,_0x52e6ea._0x26adb2)]);});return;case _0x13b4ee(_0x1ed441._0xad19c5,_0x1ed441._0x55d3d3,_0x1ed441._0x4135a8,_0x1ed441._0x272e11):if(!isJsonObject(_0xbc0f50))throw new Error(_0x2e6746(0x301,0x30a,0x324,_0x1ed441._0x62387f)+_0x2b6cae+_0x13b4ee(0x486,_0x1ed441._0x7fd317,_0x1ed441._0x3289ec,0x476));for(const _0x18768e of _0x2f676b['required']??[]){if(!(_0x18768e in _0xbc0f50))throw new Error(_0x2e6746(_0x1ed441._0x5b0e75,_0x1ed441._0x66bbae,0x324,_0x1ed441._0x1f2252)+_0x2b6cae+_0x2e6746(_0x1ed441._0x3be3e5,0x310,0x31a,_0x1ed441._0x4638d)+_0x18768e+'\x22');}for(const [_0x3e4357,_0x188061]of Object[_0x2e6746(_0x1ed441._0x5317d8,_0x1ed441._0x54ef64,_0x1ed441._0xc96e3b,_0x1ed441._0x14e743)](_0x2f676b['properties'])){_0x3e4357 in _0xbc0f50&&validateAgainstSchema(_0x2b6cae+'.'+_0x3e4357,_0xbc0f50[_0x3e4357],_0x188061);}}}function normalizeToolOutputValue(_0x2c7a91){const _0x1b5614={_0xac89a2:0x471,_0x26b3e1:0x4a0,_0x59b6c6:0x5f3,_0x13aecc:0x5e3,_0x5b5dee:0x5d2,_0x39f807:0x5d3,_0x1efc9f:0x5df,_0x45751f:0x5ba,_0xeaa176:0x495},_0x33d576={_0x15d05d:0x3bd};if(isToolOutputEnvelope(_0x2c7a91))return{'output':_0x2c7a91[_0x620e3c(_0x1b5614._0xac89a2,_0x1b5614._0x26b3e1,0x499,0x4df)],'structured':_0x2c7a91[_0x1ed1f8(0x5c9,_0x1b5614._0x59b6c6,0x5ad,_0x1b5614._0x13aecc)]??{'value':_0x2c7a91['output']},..._0x2c7a91['content']!==void 0x0?{'content':_0x2c7a91[_0x1ed1f8(_0x1b5614._0x5b5dee,0x5ea,0x591,_0x1b5614._0x39f807)]}:{}};if(typeof _0x2c7a91===_0x1ed1f8(0x58e,0x5de,0x569,0x573))return{'output':_0x2c7a91,'structured':{'value':_0x2c7a91}};function _0x1ed1f8(_0x592bb3,_0x4e5d44,_0x318802,_0x48f183){return _0x53d6(_0x592bb3-_0x33d576._0x15d05d,_0x4e5d44);}function _0x620e3c(_0x579a15,_0xa13381,_0x374b35,_0x31c83a){return _0x53d6(_0xa13381-0x2c3,_0x374b35);}if(typeof _0x2c7a91===_0x1ed1f8(_0x1b5614._0x1efc9f,0x5dc,_0x1b5614._0x45751f,0x5f8)&&_0x2c7a91!==null&&!Array['isArray'](_0x2c7a91))return{'output':JSON[_0x620e3c(_0x1b5614._0xeaa176,0x4e3,0x4a2,0x4cd)](_0x2c7a91,null,0x2),'structured':_0x2c7a91};return{'output':JSON['stringify'](_0x2c7a91,null,0x2),'structured':{'value':_0x2c7a91}};}function _0x2fd8(){const _0x205fc2=['AxrLBxm','BgLZDa','DgHLBG','zMLUywXFBwvZC2fNzq','Bwv0CMLJCW','zMLUywXnzxnZywDL','Dg9VBhncEu5HBwu','CNvUvhjHBNnMB3jTzxjZ','Dg9VBf9ZDgfYDgvK','z2v0q29UDgv4DfDPBMrVD0XPBwL0','Bw9KzwXFCMvXDwvZDa','Aw5WDxq','yxnZAxn0yw50x2nODw5R','B25fDMvUDa','Dg9VBf91C2u','z2v0','C3rYzwfTAw5N','yxjYyxK','Dg90ywXuB2TLBNm','yMvMB3jLvg9VBfjLC3vSDefWCgvUza','BwvZC2fNzq','Dg9VBhm','A2LUza','Bw9KzwXFCMvZCg9UC2u','y2HHDe1VzgvS','CMfJzq','Dg9VBfj1BNrPBwu','AxnbCNjHEq','yw50AhjVCgLJx3rOAw5RAw5Nx2rLBhrH','C29Tzq','mtbXsxbct1K','B3v0Chv0sw5KzxG','Dg9VBf9VDxrWDxrFy2H1BMS','x3n5C3rLBvbYB21WDa','DhLWzq','ndaWmJmWovPVCvzrqq','C2XPy2u','CMvZzxrnzxnZywDLCW','mJK2mJCXnNviCKfTuG','DgHPBMTPBMC','zxH0zw5ZAw9UCW','CMvXDwvZDenVDw50','Dg9VBf91C2vFzgvSDge','mJaXntuXnhnmy01hua','DxnLCL9TzxnZywDL','zxHLy3v0zunHBgXZ','C2v0u3LZDgvTuhjVBxb0','Dg9VBf9JywXS','oIbLEhbLy3rLzcbVyMPLy3q','B25vC2vYtwvZC2fNzq','CMv0DxjU','mZi3ngzPseHQyG','yMvMB3jLtw9KzwXszxf1zxn0','CMvZCg9UC2u','ywrK','ChjVDMLKzxjFCMv0CNK','Aw5KzxG','Dg9VBf9JB21WBgv0zwq','zg9Uzq','BwvZC2fNzxm','y29TCgXLDgvK','C29YDa','y29UDgvUDf9KzwX0yq','CMvQzwn0','zw50CMLLCW','y29UDgv4DfDPBMrVD0XPBwL0','zgvWCW','ywjVCNq','mtbgswvIyuy','DMfSDwu','yxnZAxn0yw50twvZC2fNzuLK','C3rYAw5N','Bw9KzwW','mJyYCvLRCg5s','tw9KzwWGC3rYzwfTigvUzgvKihDPDgHVDxqGysbMAw5HBcbYzxnWB25Zzq','zxHLy3v0zq','CMvHC29U','C3LZDgvT','ywjVCNrLza','y29UDgvUDeLUzgv4','BNvTyMvY','Dg9VBf9Yzxn1BhrFBwvZC2fNzq','yM9VBgvHBG','B3v0Chv0','CMvTB3zLrxzLBNrmAxn0zw5LCG','Aw5WDxrezwX0yq','CMvNAxn0CNK','C2LNBMfS','C3LZDgvTuhjVBxb0','mZCWndHpvwHIBNq','Dgv4Da','BMfTzq','C2v0vg9VBhm','Dw5RBM93BL90B29S','B3bLBMfPx3jLyxnVBMLUz19ZDw1Tyxj5x2rLBhrH','oIbLEhbLy3rLzcbZDhjPBMC','DhvYBI0','oNjLyxnVBMLUzW','zgvMyxvSDe1LC3nHz2u','oIbLEhbLy3rLzcbIB29SzwfU','DhjHBNnMB3jTzxi','oMfZC2LZDgfUDdO','oIbLEhbLy3rLzcbHCNjHEq','DMfSDwvZ','zw5HyMXLza','vg9VBcbLEgvJDxrPB24GCMvQzwn0zwqGzM9Yia','BgfZDfjLC3bVBNnL','Dg9VBf9YzwPLy3rLza','C2vZC2LVBKLK','zgvSzxrL','DhvYBKLK','DxnHz2u','Aw5WDxruB2TLBNm','Aw5WDxrty2HLBwe','y29TCgXLDgu','oIbTAxnZAw5NihjLCxvPCMvKigzPzwXKici','CNvUt2jZzxj2zxjZ','BgLZDfrVB2Xty2HLBwfZ','C3rHz2u','C2v0q2HHDe1VzgvS','zxjYB3i','zMLSDgvY','ywXS','DhjPBq','ChvZAa','sw52ywXPzcb0B29SigLUChv0igf0ia','otu3mJe5BKfXDKLr','CMvHC29UAw5Nx2nODw5R','C2v0','Dg9VBf9Yzxn1Bhq','C3rYDwn0DxjLza','y2f0y2G','ode0mte0r3bzswXq','qwDLBNqUC2vUzcbYzxf1AxjLCYbHig1LC3nHz2uGD2HLBIbUBYbKzwzHDwX0ig1LC3nHz2uGAxmGy29UzMLNDxjLza','C3rHDhvZ','ywrKrxzLBNrmAxn0zw5LCG','BgvUz3rO','vg9VBev4zwn1DgLVBKvYCM9Y','zgvZy3jPChrPB24','y29UDgvUDa','ywn0Aw9U','BMv4Da','B2jZzxj2zxi','yMvMB3jLvg9VBev4zwn1DgLVBG','zgvSDge','ywz0zxjuB29SuMvZDwX0','BwfW','C3vTBwfYEuLUzgv4','oIbLEhbLy3rLzcbUDw1Izxi','B3jKzxi','C3rYAw5NAwz5','yxnRvxnLCG','B2jQzwn0','DhvYBL9JB21WBgv0zq','Dg90ywXpDxrWDxruB2TLBNm','B25uB29Sq2fSBa','DhvYBKLUzgv4','BM93','C3rYzwfT','CMvZB2X2zq','yMvMB3jLrMLUywXpDxrWDxq','CMfUzg9T','Dg9VBenHBgXdB3vUDa'];_0x2fd8=function(){return _0x205fc2;};return _0x2fd8();}function createToolOutput(_0x1514d3,_0x1d8ff3={'value':_0x1514d3},_0x279c4d){return{'output':_0x1514d3,'structured':_0x1d8ff3,..._0x279c4d!==void 0x0?{'content':_0x279c4d}:{}};}var ToolExecutionError=class extends Error{['structured'];constructor(_0x1a2959,_0x3a90bd={}){const _0x2297c3={_0x24c077:0x365,_0x1c3895:0x3e0,_0x243b56:0x3c5,_0x31f76e:0x3f5};function _0x37c475(_0x471597,_0x1866cb,_0x54851b,_0xe6d3a4){return _0x53d6(_0x54851b- -0x1cb,_0x1866cb);}super(_0x1a2959);function _0x2682bd(_0x123e54,_0x2da836,_0x4c2bf0,_0x503b65){return _0x53d6(_0x123e54-0x1b2,_0x503b65);}this[_0x2682bd(0x397,0x3e1,_0x2297c3._0x24c077,_0x2297c3._0x1c3895)]=_0x2682bd(_0x2297c3._0x243b56,_0x2297c3._0x31f76e,0x390,0x375),this['structured']=_0x3a90bd;}};function defineTool(_0x1a5f9e){return _0x1a5f9e;}var ToolRegistry=class{[_0x1a8375(-0x45,-0x32,-0x6c,-0x6)]=new Map();constructor(_0x37cd0b=[]){for(const _0x3f773d of _0x37cd0b){this['register'](_0x3f773d);}}['register'](_0x1bfd0c){const _0x61c057={_0x191755:0x3e3,_0x4f5ae7:0x39d,_0x1d1ec1:0x3a6,_0x9d6355:0x3c2,_0x437c78:0x1f,_0x3d1cbf:0x60},_0x25be08={_0x1a927b:0x40},_0x1fc4e6={_0x2567a2:0x16,_0x4d2bae:0x9b,_0x282dfe:0x1a5};function _0x449de5(_0xe752a9,_0xa8bbad,_0x33e0c7,_0x542ecb){return _0x1a8375(_0xa8bbad- -_0x1fc4e6._0x2567a2,_0xa8bbad-_0x1fc4e6._0x4d2bae,_0x33e0c7-_0x1fc4e6._0x282dfe,_0xe752a9);}function _0x23d6e2(_0x18262a,_0x44a707,_0x47c24a,_0x55f292){return _0x1a8375(_0x47c24a-0x3eb,_0x44a707-0x1cd,_0x47c24a-_0x25be08._0x1a927b,_0x18262a);}this[_0x23d6e2(_0x61c057._0x191755,_0x61c057._0x4f5ae7,_0x61c057._0x1d1ec1,_0x61c057._0x9d6355)][_0x449de5(_0x61c057._0x437c78,0x1f,_0x61c057._0x3d1cbf,-0x1f)](_0x1bfd0c['name'],_0x1bfd0c);}['get'](_0x38298e){return this['toolsByName']['get'](_0x38298e);}[_0x1a8375(-0x4a,-0x50,-0x8,-0x40)](){const _0x188bf0={_0x3a4202:0x21a,_0x4f7697:0x1d5,_0x536040:0x1f0,_0x39b57e:0x1e3,_0x2e010d:0x1fa},_0x2d2b18={_0x3d7a76:0xfb},_0x19a461={_0x53c459:0xf5,_0x57d977:0xd0};function _0x4f1743(_0xba2bda,_0x50aaac,_0x45d48e,_0x59b421){return _0x1a8375(_0x50aaac-0x21a,_0x50aaac-_0x19a461._0x53c459,_0x45d48e-_0x19a461._0x57d977,_0x45d48e);}function _0x2ec1d0(_0x58a56b,_0x3deb0a,_0x1da9b0,_0x1853cd){return _0x10e4b8(_0x58a56b-_0x2d2b18._0x3d7a76,_0x1da9b0,_0x1853cd- -0x431,_0x1853cd-0xd9);}return[...this[_0x4f1743(_0x188bf0._0x3a4202,_0x188bf0._0x4f7697,_0x188bf0._0x536040,_0x188bf0._0x39b57e)][_0x4f1743(_0x188bf0._0x2e010d,0x236,0x226,0x1ed)]()];}[_0x1a8375(0x2a,-0x10,-0x4,0x6e)](){const _0x236fd4={_0x3f9edc:0x128,_0x58a0c0:0x11c,_0x328744:0xbe,_0x2f561b:0x62},_0x328c99={_0x2d2abf:0x58e,_0x2c0803:0x5e4},_0x1ab7a5={_0x1db4cb:0xc1,_0x13138f:0x432},_0x3879c9={_0x72f5dc:0x13e},_0x57abeb={_0xafc21e:0xa5,_0x4fdb1f:0x39};function _0x205c3d(_0x21a099,_0x2ee10c,_0x10c3d4,_0x17ed66){return _0x1a8375(_0x10c3d4- -_0x57abeb._0xafc21e,_0x2ee10c-0x1d6,_0x10c3d4-_0x57abeb._0x4fdb1f,_0x21a099);}function _0x4523fa(_0x1fe6f4,_0x39a64b,_0x312774,_0x9c5839){return _0x10e4b8(_0x1fe6f4-0x1ab,_0x312774,_0x1fe6f4- -0x2e2,_0x9c5839-_0x3879c9._0x72f5dc);}return this[_0x205c3d(-_0x236fd4._0x3f9edc,-_0x236fd4._0x58a0c0,-0xef,-_0x236fd4._0x328744)]()[_0x4523fa(0x73,0x53,0xc4,_0x236fd4._0x2f561b)](_0x2efbed=>{const _0x20bb21={_0x20530b:0x4f};function _0x52361b(_0x46f4f8,_0x50e6b1,_0x10292f,_0x147a7c){return _0x4523fa(_0x50e6b1-0x564,_0x50e6b1-0x1df,_0x147a7c,_0x147a7c-_0x20bb21._0x20530b);}function _0x313ec0(_0x128c79,_0x590f71,_0x82383f,_0x1c4ae5){return _0x205c3d(_0x82383f,_0x590f71-_0x1ab7a5._0x1db4cb,_0x128c79-_0x1ab7a5._0x13138f,_0x1c4ae5-0xbe);}return{'name':_0x2efbed['name'],'description':_0x2efbed[_0x52361b(0x5b1,0x5cf,_0x328c99._0x2d2abf,0x60f)],'input_schema':_0x2efbed[_0x52361b(_0x328c99._0x2c0803,0x5b6,0x583,0x567)]};});}};function validateToolInput(_0x2da258,_0x2c1c3a){const _0x1d1793={_0x301102:0x459,_0x2e47bf:0x49c,_0x1d1846:0x439},_0x4bc016={_0x1466d6:0x18b};validateAgainstSchema(_0x22a5ea(0x490,_0x1d1793._0x301102,_0x1d1793._0x2e47bf,_0x1d1793._0x1d1846),_0x2da258,_0x2c1c3a);function _0x22a5ea(_0x496142,_0x5c96ca,_0x24b77f,_0x1f048d){return _0x10e4b8(_0x496142-0x65,_0x496142,_0x5c96ca-_0x4bc016._0x1466d6,_0x1f048d-0x10f);}return _0x2da258;}function deriveFinalToolOutput(_0x25f970){const _0x1000a6={_0x423fab:0x3c0,_0x391259:0x3a8,_0x1e90f5:0x3fb,_0x55f3e1:0x3c8,_0x250cf7:0x407,_0x380693:0x3d4,_0x505a1f:0x42c,_0xa13a61:0x396,_0x54ca2b:0x394,_0x2aed6c:0x39b,_0x473cbb:0x368,_0x3012a9:0x3b1,_0x20e873:0x3ca,_0x4de39d:0x3de,_0x4e92a1:0x39b,_0x4c7d21:0x3e1,_0xef1f45:0x422},_0x40e3a7={_0x187ec5:0x383,_0x27eb2d:0x52},_0x969bc7={_0x1f3759:0xd2};if(_0x25f970['length']===0x0)return{'output':'','structured':{}};if(_0x25f970[_0xd3362f(0x397,0x381,0x3c9,_0x1000a6._0x423fab)]===0x1)return{'output':_0x25f970[0x0][_0x7c54c1(0x3a9,0x3c2,_0x1000a6._0x391259,_0x1000a6._0x1e90f5)],'structured':_0x25f970[0x0][_0x7c54c1(0x3d8,0x409,_0x1000a6._0x55f3e1,_0x1000a6._0x250cf7)],..._0x25f970[0x0][_0x7c54c1(0x3e1,_0x1000a6._0x380693,_0x1000a6._0x505a1f,0x40a)]!==void 0x0?{'content':_0x25f970[0x0][_0xd3362f(_0x1000a6._0xa13a61,_0x1000a6._0x54ca2b,_0x1000a6._0x2aed6c,0x3c3)]}:{}};function _0x7c54c1(_0x13307d,_0x378efa,_0x37b552,_0x488147){return _0x10e4b8(_0x13307d-_0x969bc7._0x1f3759,_0x488147,_0x13307d-0x93,_0x488147-0xbe);}const _0xd44d4b=_0x25f970[_0xd3362f(_0x1000a6._0x473cbb,_0x1000a6._0x1e90f5,_0x1000a6._0x3012a9,0x3b1)](_0x12fb03=>_0x12fb03['content']!==void 0x0);function _0xd3362f(_0x2c6bcb,_0x2a69ad,_0x9d2b8,_0x4f5290){return _0x1a8375(_0x4f5290-_0x40e3a7._0x187ec5,_0x2a69ad-_0x40e3a7._0x27eb2d,_0x9d2b8-0x1ac,_0x2a69ad);}return{'output':_0x25f970[_0xd3362f(0x3d0,0x393,0x383,_0x1000a6._0x20e873)](_0xa8c5e2=>_0xa8c5e2[_0x7c54c1(0x3a9,0x393,0x3d6,0x3ba)])['join'](''),'structured':{'chunks':_0x25f970['map'](_0x113e18=>_0x113e18[_0x7c54c1(0x3d8,0x389,0x3b9,0x3cb)])},..._0xd44d4b[_0x7c54c1(_0x1000a6._0x4de39d,0x391,0x3bd,_0x1000a6._0x4e92a1)]===0x1?{'content':_0xd44d4b[0x0][_0x7c54c1(_0x1000a6._0x4c7d21,_0x1000a6._0xef1f45,0x3ed,0x41d)]}:{}};}function createToolMeta(){return{'transforms':[]};}function createErrorToolResult(_0xdc37d8,_0x5f2c75,_0x322bfd,_0x5d4d7b=[]){const _0x8c506={_0x5a6142:0xa9,_0x43f3f9:0xaa,_0xd4cb1:0x7c,_0x42f1d1:0x217},_0x5a042a={_0x55378c:0x155,_0x1a901a:0x1b},_0x51969={_0x576cab:0x8c,_0x5aa558:0xf2,_0x35a709:0x4d};function _0x40670f(_0x203f5d,_0x28ffd2,_0x4a9655,_0xe3f688){return _0x1a8375(_0xe3f688- -_0x51969._0x576cab,_0x28ffd2-_0x51969._0x5aa558,_0x4a9655-_0x51969._0x35a709,_0x203f5d);}function _0x4f3ad6(_0x41d736,_0x5acd01,_0x3c5225,_0x410b8a){return _0x10e4b8(_0x41d736-0xc0,_0x41d736,_0x410b8a- -_0x5a042a._0x55378c,_0x410b8a-_0x5a042a._0x1a901a);}return{'callId':_0xdc37d8['id'],'toolName':_0xdc37d8[_0x40670f(-_0x8c506._0x5a6142,-0x57,-_0x8c506._0x43f3f9,-_0x8c506._0xd4cb1)],'status':_0x4f3ad6(0x1f4,0x220,_0x8c506._0x42f1d1,0x1e6),'output':_0x5f2c75,'structured':_0x322bfd,'chunks':_0x5d4d7b,'meta':createToolMeta()};}function createRejectedToolResult(_0x101561,_0x2bb7e1){const _0x46af06={_0x473827:0xc1,_0x33d6e2:0x89,_0x5794be:0x86,_0x358a65:0x8b,_0x45b794:0x79},_0x4c0e71={_0x4486a9:0xc,_0x590daf:0x2ca,_0x1effe3:0x111},_0x279ad5={_0x43063d:0x59,_0x27d08f:0x3b7,_0x9fe9a:0x7b};function _0x4db913(_0x2f62d2,_0x3e8a7f,_0xf6e1e6,_0x5638c8){return _0x10e4b8(_0x2f62d2-_0x279ad5._0x43063d,_0x2f62d2,_0x5638c8- -_0x279ad5._0x27d08f,_0x5638c8-_0x279ad5._0x9fe9a);}function _0x1e5aad(_0x566bdd,_0x4ad57b,_0xa3f242,_0x1531ec){return _0x10e4b8(_0x566bdd-_0x4c0e71._0x4486a9,_0x1531ec,_0x4ad57b- -_0x4c0e71._0x590daf,_0x1531ec-_0x4c0e71._0x1effe3);}const _0x322428=_0x2bb7e1?.[_0x4db913(-0x40,-0x89,-_0x46af06._0x473827,-0x79)]()[_0x4db913(-0xba,-0x68,-0x40,-0x6c)]?_0x2bb7e1:_0x4db913(-_0x46af06._0x33d6e2,-0x57,-_0x46af06._0x5794be,-_0x46af06._0x358a65)+_0x101561['name'];return createErrorToolResult(_0x101561,_0x322428,{'error':'tool_rejected',..._0x2bb7e1?.[_0x4db913(-0xae,-0x49,-0x7c,-_0x46af06._0x45b794)]()[_0x4db913(-0x97,-0x32,-0x3f,-0x6c)]?{'reason':_0x2bb7e1}:{}});}function createAbortedToolResult(_0x231006,_0x2e400b,_0x45f99b=[]){const _0x4f6433={_0x3a4b74:0x3e0,_0x40bc31:0x418,_0x399f71:0x45e,_0x5121a9:0x1e,_0x2db589:0xe,_0xe709fe:0xa5},_0x3df6a6={_0x539175:0x69,_0x7e83de:0x330,_0x469210:0x119},_0x321255={_0x1f8ecb:0x44f,_0x25daeb:0x6d},_0x3ef89b=toAbortError(_0x2e400b);function _0x9ea535(_0x48afb8,_0x5bef96,_0x323cfe,_0x1de5a3){return _0x1a8375(_0x323cfe-_0x321255._0x1f8ecb,_0x5bef96-0xbf,_0x323cfe-_0x321255._0x25daeb,_0x1de5a3);}function _0x38b479(_0x2f24ec,_0x327b7b,_0x15a73f,_0x2446d2){return _0x10e4b8(_0x2f24ec-_0x3df6a6._0x539175,_0x15a73f,_0x327b7b- -_0x3df6a6._0x7e83de,_0x2446d2-_0x3df6a6._0x469210);}return createErrorToolResult(_0x231006,_0x3ef89b[_0x9ea535(0x423,_0x4f6433._0x3a4b74,_0x4f6433._0x40bc31,_0x4f6433._0x399f71)],{'error':_0x3ef89b[_0x38b479(-_0x4f6433._0x5121a9,-0x59,-_0x4f6433._0x2db589,-_0x4f6433._0xe709fe)],'aborted':!![]},_0x45f99b);}function createSuccessToolResult(_0x361d3c,_0x1fe7fa,_0x518571){const _0x4b0cf5={_0x439d50:0x4fc,_0x3b9189:0x528,_0x445657:0x570,_0x5ca6fc:0x54f,_0xfcc8ff:0x58f,_0x51bbc8:0x56e,_0x42739a:0x54f,_0x39555a:0x18c,_0x229ac1:0x1d7,_0x2a7480:0x1a0,_0x246d0d:0x1d1,_0x5ade72:0x18c},_0x415b8f={_0x17451a:0xa7},_0x25c8fb={_0x16e661:0x1bc,_0x22bed0:0x1d1};function _0x3ced59(_0x3915b5,_0xc6acfa,_0x4b0dd0,_0x2bda97){return _0x10e4b8(_0x3915b5-_0x25c8fb._0x16e661,_0xc6acfa,_0x2bda97- -0x1c2,_0x2bda97-_0x25c8fb._0x22bed0);}function _0x47e19d(_0x2c0bfd,_0x5c4692,_0x1e35f3,_0x6e7af0){return _0x1a8375(_0x6e7af0-0x518,_0x5c4692-_0x415b8f._0x17451a,_0x1e35f3-0x3d,_0x1e35f3);}return{'callId':_0x361d3c['id'],'toolName':_0x361d3c[_0x47e19d(_0x4b0cf5._0x439d50,0x4e2,0x4f7,_0x4b0cf5._0x3b9189)],'status':'ok','output':_0x1fe7fa[_0x47e19d(0x507,_0x4b0cf5._0x445657,_0x4b0cf5._0x5ca6fc,0x520)],'structured':_0x1fe7fa[_0x47e19d(_0x4b0cf5._0xfcc8ff,_0x4b0cf5._0x51bbc8,0x55f,_0x4b0cf5._0x42739a)],..._0x1fe7fa[_0x3ced59(0x16f,0x148,0x193,_0x4b0cf5._0x39555a)]!==void 0x0?{'content':_0x1fe7fa[_0x3ced59(_0x4b0cf5._0x229ac1,_0x4b0cf5._0x2a7480,_0x4b0cf5._0x246d0d,_0x4b0cf5._0x5ade72)]}:{},'chunks':_0x518571,'meta':createToolMeta()};}function createUnknownToolResult(_0xeebb29){const _0x57b589={_0x55a32e:0x108,_0x2ee0cc:0x82,_0x47502a:0xba,_0x283054:0x90,_0x26aeb4:0x9d},_0x3ba253={_0x226eb6:0xaa,_0x3004a9:0xa1,_0xc6e337:0xdf};function _0x12441d(_0x4105e4,_0x27ffc5,_0x48f151,_0x557679){return _0x1a8375(_0x48f151-0xab,_0x27ffc5-0x10a,_0x48f151-0xec,_0x557679);}function _0x4e3462(_0x15ae86,_0xfa38c9,_0x2175be,_0x856bc1){return _0x1a8375(_0x2175be-_0x3ba253._0x226eb6,_0xfa38c9-_0x3ba253._0x3004a9,_0x2175be-_0x3ba253._0xc6e337,_0x856bc1);}return createErrorToolResult(_0xeebb29,'Unknown\x20tool:\x20'+_0xeebb29[_0x4e3462(_0x57b589._0x55a32e,_0x57b589._0x2ee0cc,_0x57b589._0x47502a,0x9e)],{'error':_0x4e3462(_0x57b589._0x283054,0xfd,0xbc,_0x57b589._0x26aeb4)});}function isDispatchDecision(_0x5ebea4){const _0x806f9e={_0x541797:0x2bf,_0x64d9dd:0x30a,_0xa28de9:0x2ce,_0x109f08:0x49},_0x172841={_0x15281a:0x1d1,_0xdee6ba:0x43,_0x489e85:0x15b},_0x50c136={_0x184cf6:0x124};if(typeof _0x5ebea4!=='object'||_0x5ebea4===null)return![];function _0x58f067(_0x3d207a,_0x2e6846,_0x2a1753,_0x4edb14){return _0x1a8375(_0x2a1753-0x4f,_0x2e6846-_0x50c136._0x184cf6,_0x2a1753-0x14c,_0x4edb14);}function _0x242586(_0x2425e3,_0x23e4e4,_0xffc23d,_0x238257){return _0x10e4b8(_0x2425e3-_0x172841._0x15281a,_0x2425e3,_0x23e4e4- -_0x172841._0xdee6ba,_0x238257-_0x172841._0x489e85);}return _0x5ebea4['action']===_0x242586(0x2a5,_0x806f9e._0x541797,_0x806f9e._0x64d9dd,_0x806f9e._0xa28de9)||_0x5ebea4[_0x58f067(0x84,_0x806f9e._0x109f08,0x90,0x4a)]==='run';}function _0x10e4b8(_0x217e48,_0x37f945,_0x31a6aa,_0x5ce899){const _0x5ba7fc={_0x20573e:0x139};return _0x53d6(_0x31a6aa-_0x5ba7fc._0x20573e,_0x37f945);}function normalizeExecutionError(_0x36ac02){const _0x32f22d={_0x1a7813:0x1d7,_0x4fd323:0x225,_0x2a461f:0x223,_0x34421e:0x293,_0x131a81:0x2e3,_0x24aca0:0x275},_0x1658a8={_0x4d9118:0x7b},_0x3f87a9={_0x543070:0x15f,_0xd2fc4c:0x154};if(_0x36ac02 instanceof ToolExecutionError)return{'errorMessage':_0x36ac02[_0x5e036a(_0x32f22d._0x1a7813,0x240,_0x32f22d._0x4fd323,0x1dc)],'structured':{'error':_0x36ac02[_0x9fe414(-0x21c,-0x23b,-0x1e2,-_0x32f22d._0x2a461f)],..._0x36ac02[_0x5e036a(0x29c,0x28b,_0x32f22d._0x34421e,_0x32f22d._0x131a81)]}};if(_0x36ac02 instanceof Error)return{'errorMessage':_0x36ac02['message'],'structured':{'error':_0x36ac02[_0x5e036a(_0x32f22d._0x24aca0,0x26f,0x225,0x227)]}};function _0x9fe414(_0x16edeb,_0x4c9026,_0x15363e,_0x5a165c){return _0x1a8375(_0x16edeb- -0x1e5,_0x4c9026-_0x3f87a9._0x543070,_0x15363e-_0x3f87a9._0xd2fc4c,_0x4c9026);}const _0x1b9102=String(_0x36ac02);function _0x5e036a(_0x44b18e,_0x195942,_0x1a1494,_0x453221){return _0x10e4b8(_0x44b18e-0x1e7,_0x44b18e,_0x1a1494- -0xb2,_0x453221-_0x1658a8._0x4d9118);}return{'errorMessage':_0x1b9102,'structured':{'error':_0x1b9102}};}async function emitEvent(_0x421f6c,_0x30cb02,_0x1345ea){await _0x421f6c?.(_0x30cb02,_0x1345ea);}async function resolveDispatchDecision(_0x562ad4,_0x4c485f,_0x485dff){const _0x5635f0={_0x566064:0xbd,_0x32eb30:0xda,_0x4b57de:0xa9,_0xe8f085:0x9e,_0x201c7b:0x9d},_0x57c263={_0x3fe63c:0x10c,_0x473a48:0x39},_0x232401={_0x49af7a:0x2d4,_0x3638e2:0x2dd,_0x53aac6:0x3bf,_0x35422d:0x432,_0x1f667e:0x3fa,_0x3263f7:0x3e4,_0x1e28cd:0x29e,_0x17a7ed:0x2ea,_0x4981a2:0x2de,_0x241082:0x3a0},_0x58206b={_0x1c261c:0x196,_0x4bbf1f:0x140},_0x29bfc9={_0x42b8fe:0x23c,_0x335f51:0x40,_0x430dde:0x20,_0x5571f0:0x1fd,_0x43b685:0x26f,_0x1f354c:0x246,_0x40bb4b:0x22c,_0x3d449c:0x24e};if(!_0x562ad4)return{'action':'run'};function _0x5a94b1(_0x400eb5,_0x5ea610,_0x4354fe,_0x2cd85d){return _0x10e4b8(_0x400eb5-0x90,_0x4354fe,_0x400eb5-0x151,_0x2cd85d-0x1ad);}const _0xd2d2cb=Promise[_0x565152(_0x5635f0._0x566064,0xc9,0x6c,0xad)]()[_0x5a94b1(0x416,0x423,0x41e,0x43a)](()=>_0x562ad4(_0x4c485f,_0x485dff));if(!_0x485dff['signal']){const _0x4ab216=await _0xd2d2cb;return isDispatchDecision(_0x4ab216)?_0x4ab216:{'action':'run'};}const _0x7adc6c=new Promise((_0x251f40,_0x3976ba)=>{const _0xc2bf9f={_0x525fad:0x2e2,_0x45eb22:0x1e5},_0x5d21a3=()=>{function _0x340d25(_0x203d2f,_0x1ab929,_0x582eb2,_0x5d233b){return _0x53d6(_0x1ab929- -0x1fb,_0x203d2f);}function _0x3cd380(_0x4468ce,_0x2a4a60,_0x52e411,_0x23caeb){return _0x53d6(_0x52e411-0x56,_0x23caeb);}_0x485dff[_0x3cd380(_0x29bfc9._0x42b8fe,0x285,0x237,0x20f)]?.[_0x340d25(-0x21,-0x1d,-_0x29bfc9._0x335f51,-_0x29bfc9._0x430dde)](_0x3cd380(_0x29bfc9._0x5571f0,0x1f4,0x223,0x225),_0x5d21a3),_0x3976ba(toAbortError(_0x485dff['signal']?.[_0x3cd380(_0x29bfc9._0x43b685,_0x29bfc9._0x1f354c,_0x29bfc9._0x40bb4b,_0x29bfc9._0x3d449c)]));};function _0x7c688(_0x2ab749,_0x20da85,_0x4667bc,_0x3621f4){return _0x565152(_0x3621f4-_0x58206b._0x1c261c,_0x4667bc,_0x4667bc-_0x58206b._0x4bbf1f,_0x3621f4-0x5a);}function _0x51597c(_0x63c7cb,_0x5a72fb,_0x3efe16,_0x2a202f){return _0x565152(_0x3efe16-_0xc2bf9f._0x525fad,_0x5a72fb,_0x3efe16-_0xc2bf9f._0x45eb22,_0x2a202f-0x12f);}if(_0x485dff[_0x7c688(_0x232401._0x49af7a,_0x232401._0x3638e2,0x2cc,0x2ae)]?.['aborted']){_0x3976ba(toAbortError(_0x485dff[_0x51597c(_0x232401._0x53aac6,_0x232401._0x35422d,_0x232401._0x1f667e,0x3e6)]['reason']));return;}_0x485dff[_0x51597c(0x428,_0x232401._0x3263f7,_0x232401._0x1f667e,0x443)]?.[_0x7c688(_0x232401._0x1e28cd,0x2b6,_0x232401._0x17a7ed,_0x232401._0x4981a2)](_0x51597c(0x436,_0x232401._0x241082,0x3e6,0x41e),_0x5d21a3,{'once':!![]});});function _0x565152(_0x373a3b,_0x2cad15,_0x2ddf24,_0x4bc5ed){return _0x1a8375(_0x373a3b-_0x57c263._0x3fe63c,_0x2cad15-_0x57c263._0x473a48,_0x2ddf24-0x8c,_0x2cad15);}const _0x45b917=await Promise[_0x565152(_0x5635f0._0x32eb30,_0x5635f0._0x4b57de,_0x5635f0._0xe8f085,_0x5635f0._0x201c7b)]([_0xd2d2cb,_0x7adc6c]);return isDispatchDecision(_0x45b917)?_0x45b917:{'action':'run'};}async function executeToolCall(_0x1ba6a1,_0x4dca8c,_0x15b42f,_0x493aa7,_0x1f348f){const _0x5a9d99={_0x42f8ff:0x257,_0x10ae4f:0x3b3,_0x22b413:0x3e9,_0x5f09b1:0x28c,_0x1524e4:0x23f,_0x5447b9:0x255,_0x14bff9:0x1ff,_0x796715:0x23f,_0x4a428b:0x20f,_0x1ef7d4:0x220,_0x420569:0x3b8,_0x207d2a:0x39a,_0x2301e6:0x399,_0x1d4ddc:0x3b7,_0x13aa1a:0x403,_0x227b05:0x1ea,_0x5d4e8e:0x3fd,_0x431b35:0x3d6,_0x3a3274:0x3c8,_0x10341e:0x3a8,_0x9f2fac:0x2a6,_0xce58c0:0x26e,_0x579f1e:0x240,_0x3e5365:0x28d,_0x4d6ece:0x271,_0x1890d2:0x236,_0x385703:0x277,_0x1ba287:0x21b,_0x40b7f4:0x403,_0x1cbb66:0x3bd,_0x101c95:0x28b,_0x2365ba:0x215,_0x3fea1d:0x262,_0x224e01:0x39f,_0x3f4026:0x3c6,_0x2341d6:0x3d6,_0x154b65:0x387,_0x4c798a:0x39b,_0x3584fd:0x239,_0x3235c1:0x3a9,_0x158743:0x381,_0x1473b9:0x3bc,_0xfdcbd6:0x3fa,_0x483047:0x3ef},_0x58bb68={_0x2eadf8:0xb2,_0x11f838:0x80,_0x5dd408:0x2db},_0x46b02d={_0x205de7:0x15a,_0x5dc111:0x1d3},_0x289ace={_0x239349:0x166,_0x6bbc8b:0x40},_0x2cd8e5={_0x451339:0xbc},_0x1b385b={_0xd3286:0x0},_0x11c952={..._0x15b42f,'toolCallId':_0x4dca8c['id']};throwIfAborted(_0x11c952[_0x16945c(0x289,_0x5a9d99._0x42f8ff,0x251,0x291)]);const _0x2db8a0=await resolveDispatchDecision(_0x493aa7,_0x4dca8c,_0x11c952);throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x10ae4f,0x3d6,0x40b,_0x5a9d99._0x22b413)]);function _0x16945c(_0x4be6f8,_0x158377,_0x286e10,_0x16d87e){return _0x1a8375(_0x158377-0x24b,_0x158377-_0x1b385b._0xd3286,_0x286e10-0x1e6,_0x16d87e);}if(_0x2db8a0[_0x16945c(0x2ca,_0x5a9d99._0x5f09b1,_0x5a9d99._0x1524e4,_0x5a9d99._0x5447b9)]===_0x16945c(_0x5a9d99._0x14bff9,_0x5a9d99._0x796715,0x28b,0x1f7)){const _0xd96372=createRejectedToolResult(_0x4dca8c,_0x2db8a0['reason']);return await emitEvent(_0x1f348f,{'type':_0x16945c(0x296,0x26b,0x29b,0x245),'toolCall':_0x4dca8c,'result':_0xd96372},_0x11c952),_0xd96372;}const _0x613822=_0x1ba6a1[_0x16945c(0x234,_0x5a9d99._0x4a428b,0x1dc,_0x5a9d99._0x1ef7d4)](_0x4dca8c['name']);if(!_0x613822){const _0x174f5b=createUnknownToolResult(_0x4dca8c);return await emitEvent(_0x1f348f,{'type':_0x4515f9(0x396,_0x5a9d99._0x420569,_0x5a9d99._0x207d2a,0x3fd),'toolCall':_0x4dca8c,'result':_0x174f5b},_0x11c952),_0x174f5b;}throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x2301e6,0x3d6,_0x5a9d99._0x1d4ddc,_0x5a9d99._0x13aa1a)]);function _0x4515f9(_0x54ce07,_0x3db152,_0x16c8f8,_0x2023a6){return _0x10e4b8(_0x54ce07-0x18d,_0x16c8f8,_0x3db152-_0x2cd8e5._0x451339,_0x2023a6-0x1a8);}await emitEvent(_0x1f348f,{'type':_0x16945c(0x24d,0x208,_0x5a9d99._0x227b05,0x1bc),'toolCall':_0x4dca8c},_0x11c952);try{throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x5d4e8e,_0x5a9d99._0x431b35,0x41c,0x3a4)]);const _0x146816=validateToolInput(_0x4dca8c[_0x4515f9(0x359,0x38a,_0x5a9d99._0x3a3274,_0x5a9d99._0x10341e)],_0x613822[_0x16945c(_0x5a9d99._0x9f2fac,0x271,_0x5a9d99._0xce58c0,_0x5a9d99._0x579f1e)]),_0x187af1=await _0x613822[_0x16945c(0x223,0x24b,0x225,0x27d)](_0x146816,_0x11c952),_0x2a6d68=[],_0x43976e=addAbortListener(_0x11c952[_0x16945c(0x27d,0x257,_0x5a9d99._0x3e5365,0x256)],()=>{function _0x17a6d6(_0x1aa3a8,_0x4d4ac4,_0x1315e7,_0x2d7e25){return _0x16945c(_0x1aa3a8-0xa2,_0x4d4ac4- -_0x289ace._0x239349,_0x1315e7-_0x289ace._0x6bbc8b,_0x1315e7);}function _0x140a66(_0x278546,_0x3cdcd6,_0x39091c,_0x2cc05d){return _0x4515f9(_0x278546-0x151,_0x278546- -_0x46b02d._0x205de7,_0x3cdcd6,_0x2cc05d-_0x46b02d._0x5dc111);}void _0x187af1[_0x17a6d6(_0x58bb68._0x2eadf8,0xcc,_0x58bb68._0x11f838,0xd5)](void 0x0)[_0x140a66(0x2a8,_0x58bb68._0x5dd408,0x26c,0x275)](()=>{});});try{throwIfAborted(_0x11c952[_0x16945c(0x24a,_0x5a9d99._0x42f8ff,0x261,0x28b)]);let _0x553a46=await _0x187af1[_0x16945c(_0x5a9d99._0x4d6ece,_0x5a9d99._0x3e5365,0x270,0x29e)]();while(!_0x553a46[_0x16945c(_0x5a9d99._0x1890d2,0x23a,_0x5a9d99._0x385703,_0x5a9d99._0x1ba287)]){throwIfAborted(_0x11c952[_0x4515f9(_0x5a9d99._0x40b7f4,0x3d6,0x3ba,_0x5a9d99._0x1cbb66)]);const _0x577b9e=normalizeToolOutputValue(_0x553a46[_0x16945c(_0x5a9d99._0x101c95,0x245,_0x5a9d99._0x2365ba,0x1f9)]);_0x2a6d68[_0x16945c(0x258,0x27c,0x279,_0x5a9d99._0x3fea1d)](_0x577b9e),await emitEvent(_0x1f348f,{'type':_0x4515f9(0x3cf,_0x5a9d99._0x224e01,_0x5a9d99._0x2301e6,_0x5a9d99._0x3f4026),'toolCall':_0x4dca8c,'chunk':_0x577b9e},_0x11c952),throwIfAborted(_0x11c952[_0x4515f9(0x3cc,_0x5a9d99._0x2341d6,_0x5a9d99._0x154b65,_0x5a9d99._0x4c798a)]),_0x553a46=await _0x187af1['next']();}throwIfAborted(_0x11c952[_0x16945c(0x219,0x257,0x245,0x235)]);const _0xea8945=_0x553a46['value']===void 0x0?deriveFinalToolOutput(_0x2a6d68):normalizeToolOutputValue(_0x553a46['value']),_0x39e373=createSuccessToolResult(_0x4dca8c,_0xea8945,_0x2a6d68);return await emitEvent(_0x1f348f,{'type':_0x16945c(0x226,_0x5a9d99._0x3584fd,0x1f6,0x1e8),'toolCall':_0x4dca8c,'result':_0x39e373},_0x11c952),_0x39e373;}catch(_0x122e6d){if(isAbortError(_0x122e6d)){const _0x3741bd=createAbortedToolResult(_0x4dca8c,_0x122e6d,_0x2a6d68);return await emitEvent(_0x1f348f,{'type':_0x4515f9(0x373,0x3b8,_0x5a9d99._0x3235c1,0x379),'toolCall':_0x4dca8c,'result':_0x3741bd},_0x11c952),_0x3741bd;}const {errorMessage:_0x1c104f,structured:_0x43ccf9}=normalizeExecutionError(_0x122e6d),_0xc9b61d=createErrorToolResult(_0x4dca8c,_0x1c104f,_0x43ccf9,_0x2a6d68);return await emitEvent(_0x1f348f,{'type':'tool_completed','toolCall':_0x4dca8c,'result':_0xc9b61d},_0x11c952),_0xc9b61d;}finally{_0x43976e();}}catch(_0x2f9ab8){if(isAbortError(_0x2f9ab8)){const _0x30947a=createAbortedToolResult(_0x4dca8c,_0x2f9ab8);return await emitEvent(_0x1f348f,{'type':_0x4515f9(_0x5a9d99._0x158743,0x3b8,0x3b1,_0x5a9d99._0x1473b9),'toolCall':_0x4dca8c,'result':_0x30947a},_0x11c952),_0x30947a;}const {errorMessage:_0xed3927,structured:_0xc7df77}=normalizeExecutionError(_0x2f9ab8),_0x3a36d4=createErrorToolResult(_0x4dca8c,_0xed3927,_0xc7df77);return await emitEvent(_0x1f348f,{'type':_0x4515f9(_0x5a9d99._0xfdcbd6,_0x5a9d99._0x420569,_0x5a9d99._0x483047,0x3d4),'toolCall':_0x4dca8c,'result':_0x3a36d4},_0x11c952),_0x3a36d4;}}function createInternalToolRuntime(_0x4d06a2=[],_0x225507={}){const _0x2c1ccb={_0x377464:0xfb,_0x22daa1:0xd6,_0x177728:0x88},_0x49d3a8={_0x466f83:0x44a,_0x27b3e5:0x454},_0x1bb5d1={_0x2fc484:0x246};let _0x5e45ee=new ToolRegistry(_0x4d06a2);return{'listToolSchemas'(){function _0x1966ca(_0x48b752,_0x18a4c3,_0x526467,_0x2253f1){return _0x53d6(_0x526467- -0xaf,_0x2253f1);}return _0x5e45ee[_0x1966ca(0x161,0x103,0x150,0x103)]();},'setTools'(_0x1b2ac5){_0x5e45ee=new ToolRegistry(_0x1b2ac5);},async 'executeCalls'(_0x124e48,_0x1d963a){const _0x6b0a61={_0x15ec43:0x208,_0x100956:0x1d8},_0x494463={_0x2d465e:0x198};function _0x1274e0(_0x28c2a5,_0x426308,_0x2c5ed9,_0x3e0494){return _0x53d6(_0x28c2a5- -_0x494463._0x2d465e,_0x426308);}function _0x1b60fc(_0x204f38,_0x1976b5,_0x58ac97,_0x54ecb9){return _0x53d6(_0x1976b5-_0x1bb5d1._0x2fc484,_0x204f38);}return await Promise[_0x1b60fc(0x440,_0x49d3a8._0x466f83,0x485,_0x49d3a8._0x27b3e5)](_0x124e48[_0x1274e0(0x84,0x46,0x79,0x52)](async _0x3ff5c6=>{const _0x5405f5={_0x5d0784:0x17b,_0x5477ee:0x1e9};function _0x55ced8(_0x21a87b,_0x4c6f86,_0x1cddb8,_0x280181){return _0x1274e0(_0x280181-0x1c9,_0x4c6f86,_0x1cddb8-0x1c0,_0x280181-0x17);}function _0x1ef6af(_0x3a3281,_0x54d568,_0x4310aa,_0x426a86){return _0x1274e0(_0x4310aa-_0x5405f5._0x5d0784,_0x3a3281,_0x4310aa-_0x5405f5._0x5477ee,_0x426a86-0x113);}return await executeToolCall(_0x5e45ee,_0x3ff5c6,_0x1d963a,_0x225507[_0x55ced8(0x2a5,_0x6b0a61._0x15ec43,0x26a,0x256)],_0x225507[_0x55ced8(_0x6b0a61._0x100956,0x216,0x1d0,0x1c8)]);}));},async 'execute'(_0x4e0e4c,_0x4290e0){const [_0x542a1e]=await this[_0x169078(_0x2c1ccb._0x377464,_0x2c1ccb._0x22daa1,0xc8,_0x2c1ccb._0x177728)]([_0x4e0e4c],_0x4290e0);function _0x169078(_0x470eb8,_0x2a7e57,_0x1e2cfe,_0x480501){return _0x53d6(_0x1e2cfe- -0xef,_0x470eb8);}return _0x542a1e;}};}function getOrderedObserverExtensions(_0x504006,_0x47b466){const _0x43286b={_0x267b8f:0x10d,_0x486a8b:0x115,_0x11ad42:0xcc,_0x113fd5:0x151,_0x44fb72:0x111},_0xa615e2={_0x244888:0x48d,_0x4b8989:0x45a,_0x9971ab:0x472,_0x1b91b9:0x48b,_0x11460a:0x468,_0x826a83:0x437,_0x481a44:0x4ad,_0x203e43:0x94,_0x4094c9:0x5e,_0x4b38e6:0xe4,_0x3d31fb:0x1c,_0x442e9b:0xa,_0x13b872:0x35},_0x2c900a={_0x58f153:0x1aa},_0x131863={_0x448638:0xe7},_0x2827c5={_0x5f0ad3:0x9a},_0xce647e={_0x89ee6b:0x502,_0x15a98c:0xce,_0x4c5296:0x40};function _0x86b10e(_0x48b7c5,_0x18fd46,_0xacee14,_0x4c6381){return _0x1a8375(_0x4c6381-_0xce647e._0x89ee6b,_0x18fd46-_0xce647e._0x15a98c,_0xacee14-_0xce647e._0x4c5296,_0xacee14);}function _0x5697e6(_0x1085ea,_0x274164,_0x4c1f42,_0x49e268){return _0x1a8375(_0x4c1f42- -0x143,_0x274164-0x14,_0x4c1f42-_0x2827c5._0x5f0ad3,_0x1085ea);}return _0x504006[_0x5697e6(-_0x43286b._0x267b8f,-0x102,-_0x43286b._0x486a8b,-_0x43286b._0x11ad42)](_0x198780=>{function _0x1e1393(_0x57216d,_0x31fbc2,_0x54de3f,_0x11c3a3){return _0x5697e6(_0x11c3a3,_0x31fbc2-_0x131863._0x448638,_0x57216d-0xe4,_0x11c3a3-0x1e1);}function _0x337983(_0x1244b3,_0x236bcb,_0x33c915,_0x35ba7d){return _0x5697e6(_0x33c915,_0x236bcb-0x17e,_0x236bcb-0x580,_0x35ba7d-_0x2c900a._0x58f153);}return _0x198780[_0x337983(_0xa615e2._0x244888,_0xa615e2._0x4b8989,_0xa615e2._0x9971ab,_0xa615e2._0x1b91b9)]!==![]&&_0x198780[_0x337983(0x48d,_0xa615e2._0x11460a,_0xa615e2._0x826a83,_0xa615e2._0x481a44)]===_0x47b466&&_0x198780[_0x1e1393(-_0xa615e2._0x203e43,-_0xa615e2._0x4094c9,-0xcb,-_0xa615e2._0x4b38e6)]===_0x1e1393(-_0xa615e2._0x3d31fb,0x26,_0xa615e2._0x442e9b,_0xa615e2._0x13b872);})[_0x5697e6(-0x195,-0x147,-_0x43286b._0x113fd5,-_0x43286b._0x44fb72)]((_0x55d102,_0x29c6fd)=>_0x55d102[_0x5697e6(-0x135,-0x10e,-0xf9,-0xe0)]-_0x29c6fd[_0x86b10e(0x4fd,0x54f,0x510,0x54c)]);}function getOrderedTransformerExtensions(_0x32bf86,_0x10a8d1){const _0x34cb8f={_0x3ca337:0x6f,_0x247e55:0x32,_0x348def:0x5b7,_0x154020:0x569,_0x2aa450:0x549,_0x410d52:0x569},_0x27d5b4={_0x5f7531:0x1d5,_0x132c28:0x1ff,_0x1ed1b0:0x4cf,_0xd5ca2e:0x483,_0x4f87f1:0x41e,_0x4c538a:0x4bf},_0x55b0ba={_0x594e4b:0x1e0};function _0x511cdc(_0xf0e82c,_0x69ed97,_0x2b77ee,_0x567a50){return _0x1a8375(_0x567a50-0x577,_0x69ed97-0x155,_0x2b77ee-0xcd,_0x69ed97);}function _0xeac127(_0x49fdab,_0x129cca,_0x542187,_0x1edccc){return _0x1a8375(_0x129cca- -0x9d,_0x129cca-_0x55b0ba._0x594e4b,_0x542187-0x2e,_0x542187);}return _0x32bf86[_0xeac127(-0xaf,-_0x34cb8f._0x3ca337,-0xc0,-_0x34cb8f._0x247e55)](_0x409861=>{const _0x13228d={_0x4484d3:0x24},_0x5b2e0d={_0x3a95f1:0x4f5};function _0x538ed9(_0x27889c,_0x21c300,_0xc80d44,_0x177273){return _0xeac127(_0x27889c-0x28,_0x177273-_0x5b2e0d._0x3a95f1,_0x27889c,_0x177273-0x16f);}function _0x4077a5(_0x644d39,_0x33ee7e,_0x4392bd,_0x51e4a2){return _0xeac127(_0x644d39-_0x13228d._0x4484d3,_0x4392bd-0x296,_0x644d39,_0x51e4a2-0x1a1);}return _0x409861[_0x4077a5(_0x27d5b4._0x5f7531,_0x27d5b4._0x132c28,0x216,0x1eb)]!==![]&&_0x409861[_0x538ed9(_0x27d5b4._0x1ed1b0,0x454,0x4c8,_0x27d5b4._0xd5ca2e)]===_0x10a8d1&&_0x409861[_0x538ed9(0x42a,0x3f2,_0x27d5b4._0x4f87f1,0x423)]===_0x538ed9(0x45d,0x42f,_0x27d5b4._0x4c538a,0x471);})[_0x511cdc(_0x34cb8f._0x348def,_0x34cb8f._0x154020,_0x34cb8f._0x2aa450,_0x34cb8f._0x410d52)]((_0x2ac4e1,_0x24d172)=>_0x2ac4e1[_0x511cdc(0x5b5,0x5e2,0x5f9,0x5c1)]-_0x24d172[_0xeac127(-0x96,-0x53,-0x1e,-0x9)]);}function createExtensionRegistry(){const _0x188192={_0x3cc641:0x34,_0x1d74bb:0x8b},_0x293c04=[];return{'register'(_0x3abb38){function _0x56e674(_0x383ad5,_0x487b56,_0x456079,_0x514fe2){return _0x53d6(_0x456079- -0x240,_0x487b56);}_0x293c04[_0x56e674(-0x80,-_0x188192._0x3cc641,-0x3a,-_0x188192._0x1d74bb)](_0x3abb38);},async 'runTransformers'(_0x13220e,_0x1c55c6,_0x2540dd){let _0x445d4c=_0x1c55c6;for(const _0x389028 of getOrderedTransformerExtensions(_0x293c04,_0x13220e)){_0x445d4c=await _0x389028['run'](_0x445d4c,_0x2540dd);}return _0x445d4c;},async 'runObservers'(_0x1646ef,_0x4abd43,_0x177aa6){for(const _0xe2aa0 of getOrderedObserverExtensions(_0x293c04,_0x1646ef)){await _0xe2aa0['run'](_0x4abd43,_0x177aa6);}}};}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(_0x2f7d3f={}){const _0x507dc8={_0x4dae59:0xfb,_0x36e552:0x128,_0x430417:0x119},_0x201c3b={_0x39f604:0x2eb,_0x552ad6:0x355,_0x198d64:0x30a,_0x3eb41e:0x2dc,_0x33becc:0x28b,_0x4c8ae2:0x281,_0x21bb2d:0x2cd,_0x20d201:0x28f,_0x2f46a6:0x2e1,_0x456d40:0x2ce,_0x287d9c:0x2e7,_0x53887d:0x2e4,_0x16cfc6:0x2e8,_0x55789b:0x2db,_0x2af122:0x2cf,_0x539d27:0x2df,_0x604d3c:0x36f,_0x46338e:0x326,_0x170bbc:0x275,_0x198777:0x29e,_0x54e1a2:0x2b1,_0x124c76:0x2e6,_0x45dc70:0x354,_0x10d89d:0x396,_0x3ddbcb:0x312,_0xc521ef:0x353,_0x5e7f72:0x312,_0x19edc1:0x362,_0x49cb37:0x2c7,_0x50cf75:0x2f7,_0x1e402c:0x341,_0x17ddef:0x374,_0x49b83a:0x32f,_0x325c14:0x36b,_0x2ea910:0x336,_0x35c8a3:0x312,_0x34f804:0x25f,_0x4fa6e2:0x293,_0x1f894:0x2b4,_0x34bc37:0x310,_0x55f12f:0x308,_0x5ed6a7:0x361,_0x5e7b70:0x2a1,_0x163f70:0x28a,_0x519007:0x266};let _0x50d000=createEmptySnapshot();const _0x235015=new Set();let _0x40f8aa;const _0x1676df=()=>{const _0x5f5532={..._0x50d000};for(const _0x4382de of _0x235015)_0x4382de(_0x5f5532);};return{'getSnapshot'(){return{..._0x50d000};},'recordEvent'(_0x2886c7){if(_0x2886c7[_0x3d8898(0x322,_0x201c3b._0x39f604,0x2df,_0x201c3b._0x552ad6)]===_0x3d8898(_0x201c3b._0x198d64,_0x201c3b._0x3eb41e,0x2b9,0x2f8)){_0x40f8aa=Date['now']();const _0x2e751e=_0x2f7d3f[_0x26b08a(0x281,_0x201c3b._0x33becc,_0x201c3b._0x4c8ae2,0x283)]?.(_0x2886c7['request']);_0x2e751e!==void 0x0&&(_0x50d000={..._0x50d000,'contextWindowLimit':_0x2e751e},_0x1676df());return;}function _0x26b08a(_0x2b4205,_0x462689,_0x547ee9,_0x3857c7){return _0x53d6(_0x2b4205-0xee,_0x462689);}function _0x3d8898(_0x431bce,_0x4722d1,_0x26b835,_0x3ee7a8){return _0x53d6(_0x431bce-0x176,_0x4722d1);}if(_0x2886c7[_0x26b08a(0x29a,_0x201c3b._0x21bb2d,0x2b6,0x2b3)]===_0x26b08a(_0x201c3b._0x20d201,_0x201c3b._0x2f46a6,_0x201c3b._0x456d40,0x277)){const _0x5394e=_0x2886c7['response'][_0x26b08a(_0x201c3b._0x287d9c,_0x201c3b._0x53887d,0x2b9,0x308)][_0x26b08a(_0x201c3b._0x16cfc6,0x311,_0x201c3b._0x55789b,_0x201c3b._0x2af122)],_0x1998a8=_0x2886c7[_0x26b08a(0x2ad,0x2cb,0x2ee,_0x201c3b._0x539d27)][_0x3d8898(_0x201c3b._0x604d3c,_0x201c3b._0x46338e,0x3bf,0x3a1)]['outputTokens'],_0x79861d=_0x2886c7[_0x26b08a(0x2ad,0x2cc,_0x201c3b._0x170bbc,_0x201c3b._0x198777)][_0x26b08a(_0x201c3b._0x287d9c,_0x201c3b._0x54e1a2,0x2fd,_0x201c3b._0x124c76)]['reasoningTokens']??0x0,_0x41aeb4=_0x5394e+_0x1998a8,_0x299d4f=_0x40f8aa===void 0x0?0x0:Date[_0x3d8898(0x39d,0x3d7,_0x201c3b._0x45dc70,_0x201c3b._0x10d89d)]()-_0x40f8aa;_0x40f8aa=void 0x0,_0x50d000={..._0x50d000,'totalTokens':_0x50d000[_0x3d8898(_0x201c3b._0x3ddbcb,_0x201c3b._0xc521ef,0x33d,0x2f9)]+_0x41aeb4,'totalInputTokens':_0x50d000['totalInputTokens']+_0x5394e,'totalOutputTokens':_0x50d000[_0x26b08a(_0x201c3b._0x5e7f72,0x358,_0x201c3b._0x19edc1,_0x201c3b._0x49cb37)]+_0x1998a8,'totalReasoningTokens':_0x50d000['totalReasoningTokens']+_0x79861d,'modelCallCount':_0x50d000['modelCallCount']+0x1,'totalModelTimeMs':_0x50d000['totalModelTimeMs']+_0x299d4f,'currentTokens':_0x41aeb4,'currentInputTokens':_0x5394e,'currentOutputTokens':_0x1998a8,'currentReasoningTokens':_0x79861d,'currentModelTimeMs':_0x299d4f,..._0x50d000[_0x26b08a(0x2b9,0x304,_0x201c3b._0x50cf75,0x26e)]&&_0x41aeb4>0x0?{'contextWindowUsage':_0x41aeb4/_0x50d000[_0x3d8898(_0x201c3b._0x1e402c,_0x201c3b._0x17ddef,0x33f,_0x201c3b._0x49b83a)]}:{}},_0x1676df();return;}if(_0x2886c7['type']===_0x3d8898(_0x201c3b._0x49b83a,_0x201c3b._0x325c14,_0x201c3b._0x2ea910,_0x201c3b._0x35c8a3)){_0x50d000={..._0x50d000,'toolCallCount':_0x50d000[_0x26b08a(0x277,_0x201c3b._0x34f804,_0x201c3b._0x4fa6e2,_0x201c3b._0x1f894)]+0x1},_0x1676df();return;}_0x2886c7[_0x26b08a(0x29a,0x296,0x2e9,0x289)]===_0x26b08a(0x311,_0x201c3b._0x34bc37,_0x201c3b._0x55f12f,_0x201c3b._0x5ed6a7)&&(_0x50d000={..._0x50d000,'requestCount':_0x50d000[_0x26b08a(_0x201c3b._0x5e7b70,_0x201c3b._0x163f70,_0x201c3b._0x519007,0x275)]+0x1},_0x1676df());},'reset'(){_0x50d000=createEmptySnapshot(),_0x40f8aa=void 0x0,_0x1676df();},'subscribe'(_0x487c06){const _0x243d5a={_0x4f9166:0x198,_0x10cbd4:0x1ce};_0x235015[_0x427f8a(-0x15e,-_0x507dc8._0x4dae59,-_0x507dc8._0x36e552,-_0x507dc8._0x430417)](_0x487c06);function _0x427f8a(_0x56374c,_0x5b3e33,_0x22bd9c,_0x1f541d){return _0x53d6(_0x1f541d- -0x2d9,_0x5b3e33);}return()=>{const _0x447a9f={_0x71544d:0xec,_0x3c6276:0xb6};function _0x3a4570(_0x22b567,_0xc38460,_0x43fea3,_0x59d264){return _0x427f8a(_0x22b567-0xab,_0x59d264,_0x43fea3-_0x447a9f._0x71544d,_0x22b567- -_0x447a9f._0x3c6276);}_0x235015[_0x3a4570(-_0x243d5a._0x4f9166,-0x193,-0x19a,-_0x243d5a._0x10cbd4)](_0x487c06);};}};}function makeExtensionContext(_0x25052f){return{'state':_0x25052f};}function _0x53d6(_0x41f676,_0x55e587){_0x41f676=_0x41f676-0x186;const _0x2fd88e=_0x2fd8();let _0x53d60c=_0x2fd88e[_0x41f676];if(_0x53d6['fiRgPt']===undefined){var _0x57e178=function(_0x197f1a){const _0x486e88='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e44a6='',_0x439f51='';for(let _0x420752=0x0,_0x2b6cae,_0xbc0f50,_0x2f676b=0x0;_0xbc0f50=_0x197f1a['charAt'](_0x2f676b++);~_0xbc0f50&&(_0x2b6cae=_0x420752%0x4?_0x2b6cae*0x40+_0xbc0f50:_0xbc0f50,_0x420752++%0x4)?_0x1e44a6+=String['fromCharCode'](0xff&_0x2b6cae>>(-0x2*_0x420752&0x6)):0x0){_0xbc0f50=_0x486e88['indexOf'](_0xbc0f50);}for(let _0x2752b3=0x0,_0x36eb63=_0x1e44a6['length'];_0x2752b3<_0x36eb63;_0x2752b3++){_0x439f51+='%'+('00'+_0x1e44a6['charCodeAt'](_0x2752b3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x439f51);};_0x53d6['yAYXkX']=_0x57e178,_0x53d6['swMEaS']={},_0x53d6['fiRgPt']=!![];}const _0x5da483=_0x2fd88e[0x0],_0x2b1943=_0x41f676+_0x5da483,_0x111194=_0x53d6['swMEaS'][_0x2b1943];return!_0x111194?(_0x53d60c=_0x53d6['yAYXkX'](_0x53d60c),_0x53d6['swMEaS'][_0x2b1943]=_0x53d60c):_0x53d60c=_0x111194,_0x53d60c;}async function runStage(_0x30897d,_0x3516c6,_0x5db53d,_0x1f5a1b){const _0x24abdb={_0x756349:0x2e9,_0x864d76:0x2c5,_0x4bf577:0x327,_0xd96203:0x35c},_0x3e44b9={_0x168a77:0x185,_0x3dea19:0x251},_0x3cf8af={_0x1600e0:0x25},_0x36bc31=await _0x30897d[_0x3da27e(_0x24abdb._0x756349,_0x24abdb._0x864d76,0x315,0x2ef)](_0x3516c6,_0x5db53d,_0x1f5a1b);function _0x3da27e(_0x459262,_0x3a53c1,_0x563ff7,_0x1e9cbb){return _0x10e4b8(_0x459262-0x4a,_0x563ff7,_0x1e9cbb-_0x3cf8af._0x1600e0,_0x1e9cbb-0x113);}await _0x30897d[_0x3da27e(0x3a3,0x37b,_0x24abdb._0x4bf577,_0x24abdb._0xd96203)](_0x3516c6,_0x36bc31,_0x1f5a1b);function _0x15a1da(_0x469b33,_0x1a4680,_0x3c29d3,_0x451c4f){return _0x10e4b8(_0x469b33-_0x3e44b9._0x168a77,_0x469b33,_0x451c4f- -_0x3e44b9._0x3dea19,_0x451c4f-0x144);}return _0x36bc31;}async function emitEvent2(_0x1c00a2,_0x1e755b,_0x1fcfeb){await _0x1c00a2?.(_0x1e755b,_0x1fcfeb);}function replaceToolUseBlocks(_0x29565d,_0x3e71b4){const _0x14d11c={_0x253ea0:0x2d0,_0x4a6c1f:0x29d,_0x159b01:0x27d},_0x164e6b={_0x19378a:0xfd},_0x1ee836={_0x3597d2:0x2a,_0x51ca86:0x23},_0x5df9e5={_0x3e53de:0x6,_0x3496a2:0x10a},_0x1b5f69={_0x354a87:0x1c0,_0x592075:0x1cd},_0x4e72ca={_0x577f10:0x256,_0x4636c6:0x5d,_0x1b2396:0xcd};let _0x18edd0=0x0;function _0x20ed9e(_0x275efb,_0x180fbb,_0x5e1c35,_0x5be2f1){return _0x1a8375(_0x180fbb-_0x4e72ca._0x577f10,_0x180fbb-_0x4e72ca._0x4636c6,_0x5e1c35-_0x4e72ca._0x1b2396,_0x5be2f1);}function _0x21625a(_0x4367fd,_0x4628a4,_0x53b0a8,_0x518b9c){return _0x10e4b8(_0x4367fd-_0x1b5f69._0x354a87,_0x4628a4,_0x518b9c- -_0x1b5f69._0x592075,_0x518b9c-0x1a3);}return{..._0x29565d,'content':_0x29565d[_0x21625a(0x17a,0x177,0x19a,0x181)][_0x20ed9e(_0x14d11c._0x253ea0,_0x14d11c._0x4a6c1f,0x2d7,_0x14d11c._0x159b01)](_0x1d2a4b=>{function _0x2c0578(_0x4f9980,_0x211e30,_0x42404e,_0x24bd5f){return _0x20ed9e(_0x4f9980-_0x5df9e5._0x3e53de,_0x42404e-_0x5df9e5._0x3496a2,_0x42404e-0x101,_0x211e30);}if(_0x1d2a4b[_0x5777af(0xf5,0xf2,0xe2,0x122)]!==_0x5777af(0xe1,0x10e,_0x164e6b._0x19378a,0xa5))return _0x1d2a4b;function _0x5777af(_0x22db10,_0x54270d,_0x5a7bb7,_0x19b8e5){return _0x21625a(_0x22db10-0x10,_0x5a7bb7,_0x5a7bb7-_0x1ee836._0x3597d2,_0x22db10- -_0x1ee836._0x51ca86);}const _0x5de514=_0x3e71b4[_0x18edd0];return _0x18edd0+=0x1,structuredClone(_0x5de514);})};}function createAssistantMessageId(_0x3b3c6a,_0x476445){const _0x44001d={_0x2b896c:0xb9,_0x4e9139:0xd5},_0x23ee01={_0x206c87:0xef};function _0x2bb875(_0x28f08d,_0x14b2a1,_0x255d23,_0x1145e3){return _0x1a8375(_0x14b2a1- -_0x23ee01._0x206c87,_0x14b2a1-0x4e,_0x255d23-0xa6,_0x255d23);}return _0x3b3c6a+_0x2bb875(-_0x44001d._0x2b896c,-_0x44001d._0x4e9139,-0xdf,-0xdf)+_0x476445;}function createReasoningMessageId(_0x5ace7d){const _0x5ad67a={_0x368d5f:0xba,_0x299ef4:0x7a};function _0xb7abef(_0x20ab80,_0x2148bf,_0x5b4ea4,_0x5dedef){return _0x10e4b8(_0x20ab80-0x17c,_0x5b4ea4,_0x20ab80- -0x3de,_0x5dedef-0x134);}return _0x5ace7d+_0xb7abef(-_0x5ad67a._0x368d5f,-0xbb,-0x80,-_0x5ad67a._0x299ef4);}function withMessageId(_0x11d399,_0x5c3a7d){if(_0x11d399['id']===_0x5c3a7d)return _0x11d399;return{..._0x11d399,'id':_0x5c3a7d};}function createAssistantChunkEvent(_0x133aaf,_0x17bdcf){const _0xec3afa={_0x48fce0:0x3b3,_0x55fe14:0x3cf,_0x52ae32:0x3b4,_0x5141a3:0x64,_0x5c83f0:0x89,_0x168a94:0x3d7,_0x2ced9e:0x5,_0x4b64c3:0x3eb,_0x3f672c:0x42a,_0x25920f:0x3c4},_0x5a9dce={_0x28606f:0xce};if(_0x133aaf[_0x4347cd(0x3a7,_0xec3afa._0x48fce0,0x3c1,0x3ab)]!==_0x4347cd(0x3ae,_0xec3afa._0x55fe14,0x410,_0xec3afa._0x52ae32))return void 0x0;function _0x423f0a(_0x404049,_0x50a7a5,_0x310a20,_0x57c3b5){return _0x10e4b8(_0x404049-0x86,_0x57c3b5,_0x404049- -0x2b9,_0x57c3b5-0x15c);}function _0x4347cd(_0x3c39af,_0x1a5c9e,_0x21ea6e,_0x59f281){return _0x10e4b8(_0x3c39af-0x37,_0x21ea6e,_0x1a5c9e-_0x5a9dce._0x28606f,_0x59f281-0x12a);}if(_0x133aaf[_0x423f0a(_0xec3afa._0x5141a3,0xa9,0x70,_0xec3afa._0x5c83f0)]===void 0x0)return void 0x0;return{'type':_0x4347cd(0x39c,0x39d,_0xec3afa._0x168a94,0x3b5),'index':_0x133aaf[_0x423f0a(0x42,0x54,0x11,_0xec3afa._0x2ced9e)]??0x0,'messageId':_0x17bdcf,'chunk':{'type':'content_delta','index':_0x133aaf['index']??0x0,'text':_0x133aaf[_0x4347cd(0x3fd,_0xec3afa._0x4b64c3,_0xec3afa._0x3f672c,_0xec3afa._0x25920f)]}};}function createToolUseChunkEvent(_0xb56219,_0x78c24d){const _0x546c48={_0x5c8174:0x2b8,_0x5d1aa4:0x2a2,_0x3faa16:0x218,_0x517f03:0x2dc,_0x46c38a:0x319,_0x15334d:0x205,_0x490f97:0x1ff,_0x4e61cc:0x1e0,_0x4b50f0:0x1d5,_0xc2667:0x1d3,_0x443d38:0x307,_0x197f74:0x2fc},_0xc2c72e={_0x43dc90:0x1a8,_0x2d2df3:0x11},_0x2fbdd6={_0x1c830e:0xfc};if(_0xb56219[_0x360643(_0x546c48._0x5c8174,0x2d4,_0x546c48._0x5d1aa4,0x2c9)]!==_0x12fa7a(0x23a,0x1f1,0x1f6,0x20c))return void 0x0;function _0x12fa7a(_0x8c8dcf,_0x21c221,_0x49b2fe,_0xcf8dbb){return _0x10e4b8(_0x8c8dcf-0x14f,_0x49b2fe,_0x21c221- -_0x2fbdd6._0x1c830e,_0xcf8dbb-0x87);}function _0x360643(_0x396229,_0x2d6a81,_0x45e39b,_0x2a4824){return _0x10e4b8(_0x396229-_0xc2c72e._0x43dc90,_0x396229,_0x2d6a81- -_0xc2c72e._0x2d2df3,_0x2a4824-0xdf);}return{'type':'tool_use_chunk','index':_0xb56219[_0x12fa7a(0x223,0x1ff,0x1fb,_0x546c48._0x3faa16)]??0x0,'messageId':_0x78c24d,'chunk':{'type':_0x360643(0x294,_0x546c48._0x517f03,_0x546c48._0x46c38a,0x31c),'id':_0xb56219['id']??'','index':_0xb56219[_0x12fa7a(_0x546c48._0x15334d,_0x546c48._0x490f97,_0x546c48._0x4e61cc,0x235)]??0x0,..._0xb56219['name']!==void 0x0?{'name':_0xb56219[_0x12fa7a(0x213,0x222,_0x546c48._0x4b50f0,0x265)]}:{},..._0xb56219[_0x12fa7a(_0x546c48._0xc2667,0x21c,0x213,0x1e2)]!==void 0x0?{'inputDelta':_0xb56219[_0x360643(0x324,_0x546c48._0x443d38,_0x546c48._0x197f74,0x2d1)]}:{}}};}function _0x1a8375(_0x39421d,_0x530b98,_0x38b2cf,_0x24e52d){const _0x19675c={_0x25bd40:0x1d5};return _0x53d6(_0x39421d- -_0x19675c._0x25bd40,_0x24e52d);}function createReasoningChunkEvent(_0x572433,_0x31e74f){const _0x51d107={_0x2e4aaf:0x135,_0x24e9a0:0x12b,_0x183474:0x16b,_0x3e3b20:0x218,_0x9227ae:0x215,_0x271f45:0x2cc,_0x2d1c2a:0x2b6,_0x5e4e35:0x27b,_0x4cd440:0x19d,_0x2a8b9a:0x171,_0x17c3dc:0x183,_0x269351:0x269,_0x2801bc:0x14f,_0x545b2d:0x2b2,_0x4c8512:0x2e5,_0x26b7c1:0x137,_0x164727:0x16e,_0x1a7d15:0x294,_0x50d100:0x2ca,_0x1099ef:0x26d,_0x10eea4:0x262,_0x40676d:0x244,_0x54f29f:0x12c,_0x4d2d12:0x10e,_0x38fd3c:0x130,_0x4b872c:0xfa,_0x385eef:0xea,_0x2e89b1:0x121,_0x1cc46a:0x292,_0x3fdc95:0x27e,_0x4719a8:0xc2},_0x17762e={_0x26a1bc:0xbf,_0x6e9c42:0xc3},_0x1e00e3={_0x59373b:0x142,_0x55aa8d:0x137};function _0x49c902(_0x5c0030,_0x444e39,_0x24945a,_0x464b80){return _0x1a8375(_0x464b80- -_0x1e00e3._0x59373b,_0x444e39-_0x1e00e3._0x55aa8d,_0x24945a-0x17a,_0x444e39);}function _0x2215ff(_0x23495a,_0x1f8fee,_0x3e3d37,_0x54b25c){return _0x10e4b8(_0x23495a-0x139,_0x54b25c,_0x1f8fee- -_0x17762e._0x26a1bc,_0x54b25c-_0x17762e._0x6e9c42);}switch(_0x572433[_0x49c902(-_0x51d107._0x2e4aaf,-0x137,-_0x51d107._0x24e9a0,-_0x51d107._0x183474)]){case _0x2215ff(_0x51d107._0x3e3b20,0x220,_0x51d107._0x9227ae,0x20d):return{'type':_0x2215ff(_0x51d107._0x271f45,0x283,_0x51d107._0x2d1c2a,_0x51d107._0x5e4e35),'index':_0x572433['index'],'messageId':_0x31e74f,'chunk':{'type':_0x49c902(-0x195,-0x178,-_0x51d107._0x4cd440,-_0x51d107._0x2a8b9a),'index':_0x572433[_0x49c902(-0x12d,-_0x51d107._0x17c3dc,-0x182,-0x155)]??0x0,'thinking':_0x572433[_0x2215ff(0x267,0x22b,0x246,_0x51d107._0x269351)]??''},'text':_0x572433[_0x49c902(-0x1a3,-0x13b,-0x1b4,-0x166)]??''};case'openai_reasoning_delta':return{'type':_0x2215ff(0x253,0x283,0x271,0x29f),'index':_0x572433[_0x49c902(-0xf4,-_0x51d107._0x2801bc,-0x114,-0x13e)],'messageId':_0x31e74f,'chunk':{'type':'openai_reasoning_delta','contentIndex':_0x572433['contentIndex']??0x0,'delta':_0x572433[_0x2215ff(_0x51d107._0x545b2d,0x294,_0x51d107._0x4c8512,0x2d4)]??'','itemId':_0x572433['itemId']??'','outputIndex':_0x572433[_0x49c902(-0x12f,-_0x51d107._0x26b7c1,-0x126,-_0x51d107._0x164727)]??0x0},'text':_0x572433[_0x2215ff(0x2a7,_0x51d107._0x1a7d15,_0x51d107._0x50d100,0x2c6)]??''};case _0x2215ff(_0x51d107._0x1099ef,_0x51d107._0x10eea4,0x275,_0x51d107._0x40676d):return{'type':_0x49c902(-0xf1,-_0x51d107._0x54f29f,-0x12e,-_0x51d107._0x4d2d12),'index':_0x572433[_0x49c902(-0x11d,-0x10f,-_0x51d107._0x38fd3c,-_0x51d107._0x4b872c)],'messageId':_0x31e74f,'chunk':{'type':_0x49c902(-_0x51d107._0x385eef,-_0x51d107._0x2e89b1,-0x164,-0x12f),'delta':_0x572433[_0x2215ff(_0x51d107._0x1cc46a,_0x51d107._0x1a7d15,0x29a,_0x51d107._0x3fdc95)]??'','itemId':_0x572433['itemId']??'','outputIndex':_0x572433['outputIndex']??0x0,'summaryIndex':_0x572433[_0x49c902(-_0x51d107._0x4719a8,-0xca,-0xc7,-0xfa)]??0x0},'text':_0x572433['delta']??''};default:return void 0x0;}}function isAbortedToolResult(_0x927dbf){const _0x76b253={_0x3606c2:0x3c,_0x3cc4aa:0x18,_0x25ab64:0x6e,_0xb3faf4:0x4b,_0x6cfc9d:0x6e,_0x1af5e5:0x47,_0x44718a:0x13},_0x3839ca={_0x33fc85:0x2fe},_0x2e31e8={_0x2e74db:0x3de,_0x4ba977:0x153};function _0x28b5c6(_0x57fda7,_0x4f4735,_0x32be0b,_0x4bcfe9){return _0x10e4b8(_0x57fda7-0xae,_0x57fda7,_0x32be0b- -_0x2e31e8._0x2e74db,_0x4bcfe9-_0x2e31e8._0x4ba977);}function _0x262258(_0x18078c,_0x11f66f,_0x4b9ceb,_0x316e4b){return _0x10e4b8(_0x18078c-0x16e,_0x4b9ceb,_0x316e4b- -_0x3839ca._0x33fc85,_0x316e4b-0x91);}return _0x927dbf[_0x262258(_0x76b253._0x3606c2,_0x76b253._0x3cc4aa,_0x76b253._0x25ab64,_0x76b253._0xb3faf4)]===_0x262258(0x69,0x6e,0x2b,0x3d)&&_0x927dbf[_0x262258(_0x76b253._0x6cfc9d,0x11,0x5d,_0x76b253._0x1af5e5)][_0x262258(0x4f,0x56,0x18,_0x76b253._0x44718a)]===!![];}async function executeModelRequest(_0x4f50ab,_0x39d055,_0x8d9c0d,_0x51add7,_0x3ddf73){const _0x27b96b={_0x134fd1:0x23e,_0x132635:0x21c,_0x38a1d1:0x207,_0x8f02cf:0x154,_0x164957:0x1c4,_0x425725:0x1ef,_0x98b5f1:0x18b,_0xe35c22:0x1a5,_0x17778a:0x1d5,_0x27f6fb:0x202,_0x2f8d09:0x1a7,_0x4d44f9:0x1a5,_0x11633e:0x1ba,_0x146b8e:0x179,_0x344397:0x120,_0x3f90ee:0x12a,_0x17189c:0x1ae,_0x232137:0x17a,_0x186d13:0x1ff,_0x47243c:0x1f5,_0x3c895d:0x21d,_0x46d571:0x1aa,_0x3bdfb8:0x1d1,_0x3665c4:0x1dd,_0x3d2f76:0x164,_0x10f081:0x187,_0x282003:0x198,_0x5ab7de:0x1a4,_0x258f4a:0x23d,_0x4a757d:0x1c7,_0x228b6a:0x20b,_0x1089cd:0x14d,_0x4035bd:0x172,_0xb46763:0x134,_0x5f2806:0x1d0,_0x17f29c:0x1de,_0x1a6e6b:0x1f2,_0x30413e:0x17d,_0x10c55f:0x1e2,_0x5aac99:0x18d,_0x476884:0x176,_0x1bee41:0x1ce,_0x38f2b5:0x171,_0x90d675:0x190,_0x531c2d:0x172},_0x5dd446={_0x3086f8:0xa3},_0x494b46={_0x4088ec:0x171,_0x561c71:0xa1},_0x508c42={_0x10be3f:0x32b,_0x561ac4:0x352,_0x28913f:0x22};throwIfAborted(_0x39d055['signal']);const _0x562416=async _0x5484b6=>{if(_0x5484b6[_0x325d22(0x30d,_0x508c42._0x10be3f,_0x508c42._0x561ac4,0x2fc)]!==_0x3a5c84(-0x3f,-0x1,-_0x508c42._0x28913f,-0x46))return;function _0x3a5c84(_0x1ded28,_0x229a1d,_0x5ab00a,_0x10187e){return _0x53d6(_0x10187e- -0x207,_0x229a1d);}function _0x325d22(_0x18258c,_0x1f7164,_0x56d792,_0x398406){return _0x53d6(_0x1f7164-0x17f,_0x18258c);}await emitEvent2(_0x8d9c0d['onEvent'],_0x5484b6,_0x51add7);};if(!_0x39d055[_0x44753e(-_0x27b96b._0x134fd1,-_0x27b96b._0x132635,-0x255,-_0x27b96b._0x38a1d1)]||!_0x8d9c0d[_0x48cb19(-0x1d4,-0x1e6,-_0x27b96b._0x8f02cf,-0x1a4)][_0x48cb19(-0xfd,-0x111,-0x103,-0x11e)])return await _0x8d9c0d[_0x44753e(-0x22a,-0x1e9,-0x215,-0x1ff)][_0x44753e(-_0x27b96b._0x164957,-_0x27b96b._0x425725,-_0x27b96b._0x98b5f1,-_0x27b96b._0xe35c22)](_0x4f50ab,{'onProviderRetry':_0x562416,'signal':_0x39d055['signal']});function _0x48cb19(_0x173f2e,_0x1bb719,_0x471bc5,_0x787679){return _0x1a8375(_0x787679- -_0x494b46._0x4088ec,_0x1bb719-0x148,_0x471bc5-_0x494b46._0x561c71,_0x1bb719);}let _0x3ca98a;for await(const _0x49b509 of _0x8d9c0d[_0x44753e(-_0x27b96b._0x17778a,-0x224,-_0x27b96b._0x27f6fb,-0x1ff)][_0x44753e(-_0x27b96b._0x2f8d09,-_0x27b96b._0x4d44f9,-_0x27b96b._0x11633e,-_0x27b96b._0x146b8e)](_0x4f50ab,{'onProviderRetry':_0x562416,'signal':_0x39d055[_0x48cb19(-_0x27b96b._0x344397,-_0x27b96b._0x3f90ee,-_0x27b96b._0x17189c,-0x165)]})){throwIfAborted(_0x39d055[_0x48cb19(-0x1aa,-_0x27b96b._0x232137,-0x16a,-0x165)]);if(_0x49b509[_0x44753e(-0x23a,-0x1ec,-_0x27b96b._0x186d13,-_0x27b96b._0x47243c)]===_0x44753e(-_0x27b96b._0x3c895d,-_0x27b96b._0x46d571,-_0x27b96b._0x3bdfb8,-_0x27b96b._0x3665c4)){_0x3ca98a=_0x49b509[_0x48cb19(-_0x27b96b._0x3d2f76,-0x144,-0x179,-_0x27b96b._0x10f081)];continue;}if(_0x49b509[_0x48cb19(-_0x27b96b._0x282003,-0x180,-0x16f,-0x19a)]===_0x44753e(-0x1b8,-0x201,-_0x27b96b._0x5ab7de,-0x1e0)){await emitEvent2(_0x8d9c0d[_0x44753e(-0x238,-0x1d1,-_0x27b96b._0x258f4a,-0x20a)],_0x49b509,_0x51add7);continue;}const _0x10f16f=createReasoningChunkEvent(_0x49b509,_0x3ddf73['reasoningMessageId']);if(_0x10f16f&&_0x10f16f[_0x48cb19(-_0x27b96b._0x4a757d,-0x1a6,-0x1e7,-0x19a)]==='reasoning_chunk'&&_0x10f16f[_0x44753e(-_0x27b96b._0x228b6a,-0x19e,-0x1d9,-0x1bd)][_0x48cb19(-_0x27b96b._0x1089cd,-_0x27b96b._0x4035bd,-0xf8,-_0x27b96b._0xb46763)]>0x0){await emitEvent2(_0x8d9c0d['onEvent'],_0x10f16f,_0x51add7);continue;}const _0x4c7d8e=createAssistantChunkEvent(_0x49b509,_0x3ddf73[_0x44753e(-_0x27b96b._0x5f2806,-_0x27b96b._0x17f29c,-0x1f2,-_0x27b96b._0x3bdfb8)]);if(_0x4c7d8e){await emitEvent2(_0x8d9c0d[_0x48cb19(-_0x27b96b._0x1a6e6b,-_0x27b96b._0x30413e,-_0x27b96b._0x10c55f,-0x1af)],_0x4c7d8e,_0x51add7);continue;}const _0x235f06=createToolUseChunkEvent(_0x49b509,_0x3ddf73[_0x48cb19(-_0x27b96b._0x5aac99,-0x161,-0x142,-_0x27b96b._0x476884)]);_0x235f06&&await emitEvent2(_0x8d9c0d[_0x48cb19(-0x171,-_0x27b96b._0x1bee41,-_0x27b96b._0x38f2b5,-0x1af)],_0x235f06,_0x51add7);}function _0x44753e(_0x28f86f,_0x2449b1,_0x627e94,_0x58cdf4){return _0x10e4b8(_0x28f86f-_0x5dd446._0x3086f8,_0x28f86f,_0x58cdf4- -0x4da,_0x58cdf4-0x91);}if(!_0x3ca98a)throw new Error(_0x48cb19(-0x164,-_0x27b96b._0x90d675,-0x154,-_0x27b96b._0x531c2d));return _0x3ca98a;}function makeTurnGuards(_0x441da9,_0x238a30,_0x4c1c4d,_0x370121,_0x3726a7){return{async 'stage'(_0x1825b0,_0x39aa22){return throwIfAborted(_0x441da9),await runStage(_0x238a30,_0x1825b0,_0x39aa22,_0x370121);},async 'emit'(_0x3160e1){throwIfAborted(_0x441da9),await emitEvent2(_0x4c1c4d,_0x3160e1,_0x3726a7);},async 'stageUnchecked'(_0x4a9385,_0x15083f){return await runStage(_0x238a30,_0x4a9385,_0x15083f,_0x370121);},async 'emitUnchecked'(_0x21bd3a){await emitEvent2(_0x4c1c4d,_0x21bd3a,_0x3726a7);}};}async function runTurn(_0x2a6d51,_0x36a70e){const _0xf3b28={_0x28ec6c:0x1e2,_0x135acf:0x1aa,_0x376a39:0x1ad,_0x124092:0x198,_0x31f1db:0x1a5,_0x39daa3:0x193,_0x338b99:0x1a,_0x47fd34:0x84,_0x170c0b:0x53,_0x4c7713:0x60,_0x3612ae:0x14,_0x5346e1:0x9d,_0x52bfcb:0x191,_0x588892:0x157,_0x169019:0x149,_0x41a36c:0x183,_0x24f0b7:0x1d4,_0x1ae209:0x124,_0x38b9d3:0x16a,_0x34befa:0x1b9,_0x554865:0x4f,_0x43a159:0x24,_0x669b4c:0x1d1,_0xaad489:0x1cb,_0x23ee72:0x137,_0xcb8817:0x15a,_0x26d165:0x7a,_0x214d05:0x193,_0x12840a:0x1e3,_0x254007:0x45,_0x2441c8:0x38,_0x398f96:0x19f,_0x3d495f:0x1e2,_0x338505:0x1b4,_0x1d5abc:0x1c1,_0x1b287d:0x1ab,_0x10550c:0x1a4,_0x562f05:0xc,_0x151005:0x26,_0x4608be:0x3b,_0x20e02b:0x72,_0x39ec46:0x1a3,_0x3b7c07:0x1a1,_0x67b254:0x21c,_0x27f9fe:0x206,_0x551409:0x1f7,_0x159e3d:0x21a,_0x18c8ba:0x66,_0x12b541:0x22,_0x467c1b:0x1d,_0x512e74:0x88,_0x5a0b4d:0x9e,_0x560b5f:0xa6,_0x13c625:0x80,_0x5c495d:0x98,_0x4bfdf3:0x6c,_0x1c68e8:0x1c6,_0x4a5f83:0x1a7,_0x446507:0x204,_0xa82423:0x1f6,_0x220a1d:0x4,_0x165f15:0x41,_0x17ff7c:0x172,_0x36005a:0x1c5,_0x9cecb2:0x1f4,_0x51240b:0x1bc,_0x143edb:0x1cf,_0x4b014c:0x200,_0x3c3798:0x1e7,_0x31e6cb:0x1e4,_0xe5f6e8:0x1a8,_0x4554ab:0x187,_0x33aee5:0x62,_0x186aa:0x94,_0x5a8703:0xc3,_0x554122:0x180,_0x5d8173:0x1ee,_0x472eb4:0x5d,_0xf1841e:0x86,_0x1743f7:0x57,_0x50f4c7:0x4c,_0xa82336:0x62,_0x314187:0x54,_0xc95e4d:0x1bd,_0x22e523:0x1d6,_0x394bb0:0x1b3,_0x1ac201:0x17c},_0x5de620={_0x39ff4c:0x51},_0x44f097={_0x300024:0x1b6,_0x1c851f:0x193,_0x2f4d67:0x16a},_0x173627=_0x2a6d51['signal']??new AbortController()[_0x4856a5(-0x1c3,-_0xf3b28._0x28ec6c,-_0xf3b28._0x135acf,-0x1fc)],_0x59e8aa={'sessionId':_0x2a6d51[_0x4856a5(-_0xf3b28._0x376a39,-_0xf3b28._0x124092,-0x195,-0x1c7)],'turnId':_0x2a6d51[_0x4856a5(-0x146,-_0xf3b28._0x31f1db,-_0xf3b28._0x39daa3,-0x1c7)],'system':normalizeSystem(_0x2a6d51[_0xd03b9e(_0xf3b28._0x338b99,_0xf3b28._0x47fd34,_0xf3b28._0x338b99,_0xf3b28._0x170c0b)]),'messages':(_0x2a6d51[_0xd03b9e(0x14,_0xf3b28._0x4c7713,_0xf3b28._0x3612ae,0x41)]??[])[_0xd03b9e(0x6a,0x8a,_0xf3b28._0x5346e1,0x98)](normalizeMessage),'lastResponse':void 0x0,'toolResults':[],'finalMessage':void 0x0},_0x354019=makeExtensionContext(_0x59e8aa),_0x5e7613={'sessionId':_0x59e8aa[_0x4856a5(-_0xf3b28._0x52bfcb,-0x1ab,-0x195,-_0xf3b28._0x588892)],'turnId':_0x59e8aa[_0x4856a5(-_0xf3b28._0x169019,-_0xf3b28._0x41a36c,-0x193,-_0xf3b28._0x24f0b7)],'state':_0x59e8aa,'signal':_0x173627,..._0x36a70e['askUser']?{'askUser':_0x36a70e[_0x4856a5(-_0xf3b28._0x1ae209,-0x1b6,-_0xf3b28._0x38b9d3,-_0xf3b28._0x34befa)]}:{}},{stage:_0x52252f,emit:_0x23ed3b,stageUnchecked:_0x4a95f1,emitUnchecked:_0x54504f}=makeTurnGuards(_0x173627,_0x36a70e['registry'],_0x36a70e['onEvent'],_0x354019,_0x5e7613);function _0x4856a5(_0x3226aa,_0x9cdb6a,_0x4dc926,_0x3e841c){return _0x1a8375(_0x4dc926- -_0x44f097._0x300024,_0x9cdb6a-_0x44f097._0x1c851f,_0x4dc926-_0x44f097._0x2f4d67,_0x3e841c);}function _0xd03b9e(_0x1b126f,_0x4a5de8,_0x1efdf7,_0x29b156){return _0x1a8375(_0x29b156-_0x5de620._0x39ff4c,_0x4a5de8-0x1d6,_0x1efdf7-0x8d,_0x1b126f);}let _0x19f1af=0x0;try{const _0xf7af81=await _0x52252f(_0xd03b9e(_0xf3b28._0x554865,0x17,_0xf3b28._0x43a159,0x37),normalizeMessage(_0x2a6d51['message']));_0x59e8aa[_0x4856a5(-_0xf3b28._0x669b4c,-0x1f6,-0x1c6,-_0xf3b28._0xaad489)][_0x4856a5(-0x1ca,-_0xf3b28._0x23ee72,-0x185,-_0xf3b28._0xcb8817)](_0xf7af81),await _0x23ed3b({'type':_0xd03b9e(_0xf3b28._0x3612ae,_0xf3b28._0x26d165,0x61,0x32),'message':_0xf7af81});while(!![]){throwIfAborted(_0x173627),_0x19f1af+=0x1;const _0x4f1b76=createAssistantMessageId(_0x59e8aa[_0x4856a5(-0x19c,-0x168,-_0xf3b28._0x214d05,-_0xf3b28._0x12840a)],_0x19f1af),_0xa59d92=createReasoningMessageId(_0x4f1b76);let _0x5bf303={'model':_0x36a70e[_0xd03b9e(-0x2b,_0xf3b28._0x254007,_0xf3b28._0x2441c8,0x1e)][_0x4856a5(-0x179,-0x1d1,-0x1b9,-_0xf3b28._0x398f96)],'maxTokens':_0x36a70e[_0x4856a5(-0x232,-_0xf3b28._0x3d495f,-0x1e9,-0x1e2)]['maxTokens']??0x4000,'system':structuredClone(_0x59e8aa[_0x4856a5(-0x16c,-0x1aa,-_0xf3b28._0x338505,-_0xf3b28._0x1d5abc)]),'messages':structuredClone(_0x59e8aa[_0x4856a5(-0x17d,-_0xf3b28._0x1b287d,-0x1c6,-_0xf3b28._0x10550c)]),'tools':_0x36a70e[_0xd03b9e(_0xf3b28._0x562f05,_0xf3b28._0x151005,0x5a,0x20)]['listToolSchemas'](),'metadata':{'sessionId':_0x59e8aa[_0xd03b9e(_0xf3b28._0x4608be,0x81,0x3d,_0xf3b28._0x20e02b)],'turnId':_0x59e8aa[_0x4856a5(-0x1c2,-0x18a,-0x193,-0x146)]}};_0x5bf303=await _0x52252f(_0x4856a5(-_0xf3b28._0x39ec46,-_0xf3b28._0x3b7c07,-0x1cd,-_0xf3b28._0x67b254),_0x5bf303),await _0x23ed3b({'type':_0x4856a5(-_0xf3b28._0x27f9fe,-0x219,-_0xf3b28._0x551409,-_0xf3b28._0x159e3d),'request':_0x5bf303});let _0x1125cc=await executeModelRequest(_0x5bf303,_0x2a6d51,_0x36a70e,_0x5e7613,{'assistantMessageId':_0x4f1b76,'reasoningMessageId':_0xa59d92});_0x1125cc=await _0x52252f('afterModelResponse',_0x1125cc),await _0x23ed3b({'type':_0xd03b9e(-0x29,_0xf3b28._0x18c8ba,-_0xf3b28._0x12b541,_0xf3b28._0x467c1b),'response':_0x1125cc}),_0x59e8aa[_0xd03b9e(_0xf3b28._0x512e74,_0xf3b28._0x5a0b4d,0x6e,0x70)]=_0x1125cc;let _0x185e4a=await _0x52252f('beforeAssistantAppend',withMessageId(responseToAssistantMessage(_0x1125cc),_0x4f1b76));_0x185e4a=withMessageId(_0x185e4a,_0x4f1b76);const _0x434ebc=getToolUseBlocks(_0x185e4a),_0x597d8f=await Promise[_0xd03b9e(0x41,0xb3,_0xf3b28._0x560b5f,_0xf3b28._0x13c625)](_0x434ebc[_0xd03b9e(0xdf,0x81,0xbc,_0xf3b28._0x5c495d)](_0x29d472=>_0x52252f(_0xd03b9e(0x78,0x68,0xc2,0x95),_0x29d472)));_0x597d8f[_0xd03b9e(0xd0,0x65,_0xf3b28._0x4bfdf3,0x8e)]>0x0&&(_0x185e4a=replaceToolUseBlocks(_0x185e4a,_0x597d8f));const _0x4e7934=withMessageId(_0x185e4a,_0x4f1b76);_0x185e4a=_0x4e7934;const _0x37670b=createReasoningMessage(_0x185e4a),_0x2693bb=createAssistantTextMessage(_0x185e4a),_0x167c3a=createToolUseMessage(_0x185e4a);_0x37670b&&await _0x23ed3b({'type':'reasoning_message','message':withMessageId(_0x37670b,_0xa59d92)});_0x2693bb&&await _0x23ed3b({'type':'assistant_message','message':withMessageId(_0x2693bb,_0x4f1b76)});_0x167c3a&&await _0x23ed3b({'type':'tool_use_message','message':withMessageId(_0x167c3a,_0x4f1b76)});_0x59e8aa[_0x4856a5(-0x183,-0x17a,-_0xf3b28._0x1c68e8,-_0xf3b28._0x4a5f83)]['push'](_0x4e7934);for(const _0x1dfc75 of _0x597d8f){await _0x23ed3b({'type':_0x4856a5(-0x193,-0x20d,-0x1d2,-0x1a0),'toolCall':_0x1dfc75});}if(_0x597d8f['length']===0x0){const _0x31e4a2=await _0x52252f(_0x4856a5(-0x213,-0x1f1,-_0xf3b28._0x446507,-_0xf3b28._0xa82423),_0x185e4a),_0x896de7=withMessageId(_0x31e4a2,_0x4f1b76);return _0x59e8aa[_0xd03b9e(0x52,_0xf3b28._0x220a1d,0x1e,0xb)]=_0x896de7,_0x59e8aa[_0x4856a5(-0x207,-0x190,-0x1c6,-0x19e)][_0x59e8aa[_0xd03b9e(0x93,0x75,0x5c,_0xf3b28._0x165f15)][_0x4856a5(-0x1b2,-_0xf3b28._0x17ff7c,-0x179,-0x1a9)]-0x1]=_0x896de7,await _0x23ed3b({'type':_0x4856a5(-_0xf3b28._0x36005a,-_0xf3b28._0x9cecb2,-0x1fe,-_0xf3b28._0x51240b),'message':_0x896de7}),throwIfAborted(_0x173627),await _0x36a70e[_0xd03b9e(0x4c,0x35,_0xf3b28._0x170c0b,0x5c)]['runObservers']('afterTurnComplete',_0x59e8aa,_0x354019),await _0x23ed3b({'type':'turn_complete','state':_0x59e8aa}),{'status':_0x4856a5(-0x1b0,-0x1dc,-_0xf3b28._0x36005a,-_0xf3b28._0x143edb),'finalMessage':_0x896de7,'state':_0x59e8aa};}let _0xda4fd9=await _0x36a70e[_0x4856a5(-_0xf3b28._0x4b014c,-_0xf3b28._0x1c68e8,-_0xf3b28._0x3c3798,-0x199)]['executeCalls'](_0x597d8f,_0x5e7613);const _0x58dce5=_0xda4fd9[_0x4856a5(-0x222,-_0xf3b28._0x28ec6c,-_0xf3b28._0x31e6cb,-_0xf3b28._0xe5f6e8)](isAbortedToolResult),_0xac27c6=_0x58dce5?_0x4a95f1:_0x52252f,_0x46f887=_0x58dce5?_0x54504f:_0x23ed3b;_0xda4fd9=await Promise[_0x4856a5(-0x15b,-0x1d0,-_0xf3b28._0x4554ab,-0x145)](_0xda4fd9[_0xd03b9e(0x62,_0xf3b28._0x33aee5,_0xf3b28._0x186aa,0x98)](_0x4e53ba=>_0xac27c6(_0xd03b9e(0x70,0x5a,0xdf,0x97),_0x4e53ba))),_0x59e8aa['toolResults'][_0xd03b9e(0x93,_0xf3b28._0x5a8703,0x7d,0x82)](..._0xda4fd9);for(const _0x268c4f of _0xda4fd9){await _0x46f887({'type':_0x4856a5(-0x137,-0x195,-_0xf3b28._0x554122,-0x1c3),'result':_0x268c4f});}const _0x52fd46=await _0xac27c6(_0x4856a5(-0x1ef,-0x222,-_0xf3b28._0x5d8173,-0x20f),createToolResultUserMessage(_0xda4fd9));await _0x46f887({'type':_0xd03b9e(0x2f,_0xf3b28._0x472eb4,_0xf3b28._0xf1841e,_0xf3b28._0x1743f7),'message':_0x52fd46}),_0x59e8aa[_0xd03b9e(_0xf3b28._0x50f4c7,0x45,-0xd,0x41)][_0xd03b9e(_0xf3b28._0xa82336,0x84,_0xf3b28._0x4608be,0x82)](_0x52fd46);if(_0x58dce5)return{'status':_0xd03b9e(0x7a,0xa,0x3b,_0xf3b28._0x314187),'state':_0x59e8aa};}}catch(_0x518d7d){if(!_0x173627['aborted'])throw _0x518d7d;return{'status':_0x4856a5(-_0xf3b28._0xc95e4d,-_0xf3b28._0x22e523,-_0xf3b28._0x394bb0,-_0xf3b28._0x1ac201),'state':_0x59e8aa};}}function createSessionId(){const _0x3e871a={_0x4a1b7c:0x2c,_0x4f87a5:0x59,_0x3f4bcf:0x20,_0x27efc7:0x177,_0x4d512f:0x146,_0x1d9437:0x145,_0x92b3db:0x7c},_0x54a5c9={_0xbd47f2:0x10e,_0x8e9734:0x380,_0x3d5201:0xa4},_0x2e3ef1={_0x3cc0b6:0xba,_0x568b64:0x1d};function _0x36e82f(_0x327106,_0x54e7be,_0xf517e6,_0x407db1){return _0x10e4b8(_0x327106-_0x2e3ef1._0x3cc0b6,_0xf517e6,_0x54e7be- -0x14a,_0x407db1-_0x2e3ef1._0x568b64);}function _0x5509f9(_0x255c13,_0x6c4e2c,_0x53923b,_0x4e1e6c){return _0x10e4b8(_0x255c13-_0x54a5c9._0xbd47f2,_0x255c13,_0x4e1e6c- -_0x54a5c9._0x8e9734,_0x4e1e6c-_0x54a5c9._0x3d5201);}return'session-'+Date[_0x5509f9(-_0x3e871a._0x4a1b7c,0x20,-_0x3e871a._0x4f87a5,-_0x3e871a._0x3f4bcf)]()+'-'+Math[_0x36e82f(0x18b,_0x3e871a._0x27efc7,_0x3e871a._0x4d512f,_0x3e871a._0x1d9437)]()['toString'](0x10)[_0x5509f9(-_0x3e871a._0x92b3db,-0xbb,-0xa3,-0x99)](0x2,0xa);}function createTurnId(_0x1d328a){const _0x6a7439={_0x539441:0x3bf,_0x17ce3c:0x38d},_0x42c79d={_0x2ca2ed:0x9c};function _0x3e95b2(_0x27d16b,_0x4cc98a,_0x4d11d4,_0x2ace0){return _0x10e4b8(_0x27d16b-0x195,_0x4cc98a,_0x4d11d4-_0x42c79d._0x2ca2ed,_0x2ace0-0x13a);}return _0x3e95b2(0x402,0x3d7,_0x6a7439._0x539441,_0x6a7439._0x17ce3c)+_0x1d328a;}function createDefaultMessage(_0x59db39){if(_0x59db39===void 0x0)return void 0x0;return normalizeUserInput(_0x59db39);}function normalizeUserInput(_0x18b1e2){const _0x1a3976={_0x3f09aa:0x3d4,_0x213409:0x398,_0x431abb:0x2c7},_0xe98cd={_0x4eedaf:0x3c5,_0xdcbad0:0x199,_0x508d53:0x16c},_0x1a42d4={_0x132c83:0x2b8,_0x270667:0xda};function _0x4f2841(_0x12b506,_0x2baa46,_0x5aac7a,_0x300bed){return _0x1a8375(_0x5aac7a-_0x1a42d4._0x132c83,_0x2baa46-_0x1a42d4._0x270667,_0x5aac7a-0x125,_0x12b506);}function _0x195e62(_0x1cf72b,_0x1afdf2,_0x1be0e1,_0x7d798a){return _0x1a8375(_0x1cf72b-_0xe98cd._0x4eedaf,_0x1afdf2-_0xe98cd._0xdcbad0,_0x1be0e1-_0xe98cd._0x508d53,_0x7d798a);}if(typeof _0x18b1e2===_0x195e62(0x3c1,_0x1a3976._0x3f09aa,_0x1a3976._0x213409,0x40b))return{'role':'user','content':[{'type':_0x4f2841(0x311,0x304,_0x1a3976._0x431abb,0x284),'text':_0x18b1e2}]};return normalizeMessage(_0x18b1e2);}function resolveChatModel(_0x2f18a6){if(!_0x2f18a6['chatModel'])throw new Error('Agent\x20requires\x20a\x20chatModel');return _0x2f18a6['chatModel'];}function createRegistry(_0x59b0ad){const _0x5e6e21={_0x3d60bc:0x170,_0x43a601:0x191,_0x477a59:0x15a,_0x1b40ad:0x1ac,_0x14eec7:0x1bf,_0x58b819:0x1f4},_0xbfd8e2={_0x2f6dc3:0x10a},_0x575319={_0x2625d4:0x19c,_0x2d4346:0xa};if(_0x59b0ad[_0x2ac612(-0x191,-0x159,-_0x5e6e21._0x3d60bc,-0x144)])return _0x59b0ad[_0x2ac612(-_0x5e6e21._0x43a601,-0x1d3,-_0x5e6e21._0x477a59,-_0x5e6e21._0x1b40ad)];const _0x1dd962=createExtensionRegistry(),_0x9de21c=_0x59b0ad[_0x2ac612(-_0x5e6e21._0x14eec7,-0x1c9,-0x19c,-_0x5e6e21._0x58b819)]??[];function _0x2ac612(_0x2f5e00,_0x1e325f,_0x24907b,_0x3e9b78){return _0x1a8375(_0x2f5e00- -_0x575319._0x2625d4,_0x1e325f-0x3b,_0x24907b-_0x575319._0x2d4346,_0x1e325f);}function _0x26cf34(_0x133d1c,_0x4cd284,_0x5485bf,_0x446084){return _0x1a8375(_0x133d1c-0x502,_0x4cd284-0x133,_0x5485bf-_0xbfd8e2._0x2f6dc3,_0x4cd284);}for(const _0x5c021b of _0x9de21c){_0x1dd962['register'](_0x5c021b);}return _0x1dd962;}var Agent=class{['_systemPrompt'];[_0x10e4b8(0x304,0x329,0x305,0x2bf)];[_0x10e4b8(0x319,0x293,0x2c7,0x27b)];[_0x1a8375(0x21,0x4,0x58,0x43)];[_0x10e4b8(0x341,0x333,0x2fe,0x2d9)];[_0x1a8375(0x17,0x1a,0x2d,0x2a)];[_0x1a8375(0x51,0x5d,0x16,0x9)];constructor(_0x36d097={}){const _0x91afa1={_0x320873:0x38e,_0x118195:0x335,_0x4b320f:0x390,_0x5eff25:0x3dc,_0x320064:0x3b8,_0x2c84e7:0x373,_0x1e8e3a:0x3aa,_0x292b93:0x3f5,_0x505c63:0x389,_0x392813:0x36c,_0x5012ba:0x33f,_0x8ae9d8:0x31e,_0x462fff:0x310,_0x413592:0x321,_0x2ae5d3:0x365,_0x2ddd20:0x32a,_0x14f998:0x304,_0x1bb07b:0x371,_0x39a20b:0x3b3,_0x2c51ae:0x3e7,_0x1b2c08:0x36d,_0x1f56f1:0x35a,_0x41351d:0x351},_0x3ec924={_0x113c7b:0x1bb,_0x2df0d6:0x1a5,_0x24c40a:0x1c3},_0x3074a4={_0x5f0d2a:0x112,_0x59d597:0x159,_0x3edd09:0xad},_0x485a4d={_0x1ec237:0x47,_0x564380:0xf1},_0x13f1b2={_0xf67869:0x186,_0x4b3392:0xf1};this[_0x217fb3(0x3c1,0x376,_0x91afa1._0x320873,_0x91afa1._0x118195)]=_0x36d097['sessionId']??createSessionId(),this[_0x217fb3(_0x91afa1._0x4b320f,0x3a6,_0x91afa1._0x5eff25,_0x91afa1._0x320064)]=0x0;function _0x175586(_0xde6019,_0x184dd0,_0x1db3dc,_0x51e39b){return _0x10e4b8(_0xde6019-_0x13f1b2._0xf67869,_0x1db3dc,_0x184dd0-0x55,_0x51e39b-_0x13f1b2._0x4b3392);}this['_systemPrompt']=_0x36d097[_0x217fb3(_0x91afa1._0x2c84e7,0x362,0x39d,0x316)]??'',this['messages']=(_0x36d097['messages']??[])[_0x175586(0x38c,_0x91afa1._0x1e8e3a,_0x91afa1._0x292b93,_0x91afa1._0x505c63)](normalizeMessage),this[_0x217fb3(0x351,_0x91afa1._0x392813,0x3ae,_0x91afa1._0x5012ba)]=createDefaultMessage(_0x36d097[_0x217fb3(0x344,_0x91afa1._0x8ae9d8,0x2df,_0x91afa1._0x462fff)]);function _0x217fb3(_0x5690ff,_0x5e8d4d,_0x5609a9,_0xb4d847){return _0x10e4b8(_0x5690ff-0x14a,_0xb4d847,_0x5e8d4d-_0x485a4d._0x1ec237,_0xb4d847-_0x485a4d._0x564380);}this[_0x217fb3(0x324,0x30e,0x31c,0x343)]=createAgentMetrics({'getContextWindowLimit':_0x36d097[_0x175586(0x36a,_0x91afa1._0x413592,_0x91afa1._0x2ae5d3,0x349)]});const _0x52f266=_0x36d097['onEvent'],_0x52b8b1=async(_0x51660c,_0x47a35e)=>{this[_0x339685(_0x3ec924._0x113c7b,_0x3ec924._0x2df0d6,_0x3ec924._0x24c40a,0x1ab)]['recordEvent'](_0x51660c);function _0x339685(_0x4fa4b0,_0x4c7c03,_0x4c8c2a,_0x511df6){return _0x175586(_0x4fa4b0-_0x3074a4._0x5f0d2a,_0x4c8c2a- -_0x3074a4._0x59d597,_0x511df6,_0x511df6-_0x3074a4._0x3edd09);}await _0x52f266?.(_0x51660c,_0x47a35e);},_0x16be1c=createInternalToolRuntime(_0x36d097[_0x217fb3(0x349,0x31f,_0x91afa1._0x2ddd20,_0x91afa1._0x14f998)]??[],{'onEvent':_0x52b8b1,'onToolCall':_0x36d097[_0x175586(_0x91afa1._0x1bb07b,_0x91afa1._0x39a20b,_0x91afa1._0x2c51ae,_0x91afa1._0x1b2c08)]});this[_0x175586(0x366,_0x91afa1._0x1f56f1,0x363,_0x91afa1._0x41351d)]={'registry':createRegistry(_0x36d097),'chatModel':resolveChatModel(_0x36d097),'toolRuntime':_0x16be1c,'askUser':_0x36d097[_0x217fb3(0x3d2,0x3a1,0x3a7,0x39c)],'onEvent':_0x52b8b1};}get[_0x1a8375(0xd,0x22,-0x14,0x3b)](){const _0x1a0779={_0x3f281a:0x33f,_0x1104f5:0x328},_0x45f1d3={_0x8f76de:0x123};function _0x145ee6(_0x512919,_0x1b53e5,_0x1629b0,_0x5dcd65){return _0x1a8375(_0x1629b0-0x352,_0x1b53e5-0x1cc,_0x1629b0-_0x45f1d3._0x8f76de,_0x512919);}return this[_0x145ee6(_0x1a0779._0x3f281a,0x31a,_0x1a0779._0x1104f5,0x368)];}[_0x10e4b8(0x30c,0x368,0x31f,0x2cd)](_0x2e5157=[]){const _0x4bdb19={_0x4d0084:0x218,_0x3a742e:0x1fe,_0x4dc9a3:0x246},_0x2fe4ae={_0x253b32:0x22d};function _0x3ee852(_0x196c88,_0x5d6841,_0x38ca7d,_0x932809){return _0x1a8375(_0x5d6841-_0x2fe4ae._0x253b32,_0x5d6841-0x1b3,_0x38ca7d-0x20,_0x196c88);}function _0x29365a(_0x1f1597,_0x4a654a,_0x56fff6,_0x43297e){return _0x1a8375(_0x43297e-0x407,_0x4a654a-0xfb,_0x56fff6-0xca,_0x1f1597);}this[_0x3ee852(0x238,0x224,_0x4bdb19._0x4d0084,0x24a)][_0x3ee852(0x231,0x1fc,0x1c7,_0x4bdb19._0x3a742e)][_0x3ee852(0x27b,0x23e,_0x4bdb19._0x4dc9a3,0x1ff)](_0x2e5157);}[_0x1a8375(-0x1d,0x1c,-0xf,-0x18)](_0xbe637,_0x5ca392={}){const _0x54c25d={_0x513fee:0x2b9,_0x3bb5c5:0x2d0,_0x3de8d9:0x316,_0x3cafee:0x334,_0x12897c:0x303,_0x85bc05:0x2e6,_0x2d5d0b:0x366,_0x395890:0x325,_0x127e20:0x350},_0x3b75ba={_0x118f06:0x2f6,_0x471f12:0x89},_0x2a0d93={_0x5a7c9b:0xf5};this[_0x303ee3(0x290,0x298,_0x54c25d._0x513fee,0x2cc)]=_0xbe637;function _0x23c05d(_0x5ef987,_0x534c9f,_0x21e6aa,_0x3eea5f){return _0x1a8375(_0x3eea5f- -_0x2a0d93._0x5a7c9b,_0x534c9f-0xd4,_0x21e6aa-0xa6,_0x21e6aa);}function _0x303ee3(_0x1d5c43,_0x508a5a,_0x193d30,_0x46809e){return _0x1a8375(_0x46809e-_0x3b75ba._0x118f06,_0x508a5a-0xa3,_0x193d30-_0x3b75ba._0x471f12,_0x1d5c43);}_0x5ca392[_0x303ee3(0x2f5,0x2a0,0x2ab,_0x54c25d._0x3bb5c5)]===!![]&&(this[_0x303ee3(_0x54c25d._0x3de8d9,_0x54c25d._0x3cafee,_0x54c25d._0x12897c,_0x54c25d._0x85bc05)]=[],this[_0x303ee3(_0x54c25d._0x2d5d0b,_0x54c25d._0x395890,_0x54c25d._0x127e20,0x347)]=0x0);}['setSessionId'](_0x4cd97d){const _0x1ac43c={_0x427de3:0x67,_0x2730f3:0xc5,_0x2eb951:0x8e},_0x2f2ceb={_0x32729c:0x3bd};function _0x4192a8(_0x369502,_0x47c640,_0xb9509a,_0x49eba0){return _0x10e4b8(_0x369502-0x1c5,_0xb9509a,_0x49eba0- -_0x2f2ceb._0x32729c,_0x49eba0-0xcd);}this[_0x4192a8(-_0x1ac43c._0x427de3,-_0x1ac43c._0x2730f3,-0xbc,-_0x1ac43c._0x2eb951)]=_0x4cd97d;}[_0x1a8375(0x2c,0x9,0x47,0x61)](_0xb6b242){const _0x1643eb={_0x48d9f4:0x17},_0x1a6f65={_0x49bec2:0x20,_0x637902:0x1e5};function _0x46cff1(_0x517ce0,_0x4f30c2,_0x33e90d,_0x1c7b94){return _0x1a8375(_0x517ce0-_0x1a6f65._0x49bec2,_0x4f30c2-_0x1a6f65._0x637902,_0x33e90d-0xd5,_0x4f30c2);}this[_0x46cff1(0x17,-0x23,_0x1643eb._0x48d9f4,0x69)]['chatModel']=_0xb6b242;}async['send'](_0x351ff0=this['defaultMessage'],_0x476f28={}){const _0xb3a558={_0x17be57:0x251,_0x4d8f8d:0x2e8,_0x25f123:0x486,_0x350c86:0x47a,_0x53ba3a:0x498,_0x2c4295:0x26b,_0x27b9a0:0x478,_0x2cc20f:0x4d4,_0x160a39:0x4f9,_0xc21b81:0x4ac,_0x925907:0x480,_0xc5f6e8:0x46f},_0x5c3466={_0x492e49:0x184};function _0x3c5cb3(_0x1f4e97,_0x4d5c92,_0x1836b0,_0x310e2e){return _0x10e4b8(_0x1f4e97-0x1d4,_0x1836b0,_0x4d5c92-0x1a7,_0x310e2e-0x13e);}if(!_0x351ff0)throw new Error(_0x2b92ea(_0xb3a558._0x17be57,0x25a,0x299,0x27c));function _0x2b92ea(_0xff234e,_0x15fea6,_0x282ece,_0x524d50){return _0x10e4b8(_0xff234e-_0x5c3466._0x492e49,_0x15fea6,_0x282ece- -0xaf,_0x524d50-0x85);}this[_0x2b92ea(_0xb3a558._0x4d8f8d,0x2a8,0x2b0,0x2e6)]+=0x1;const _0x1e58f1=await runTurn({'sessionId':this['sessionId'],'turnId':createTurnId(this['turnIndex']),'streaming':_0x476f28[_0x3c5cb3(_0xb3a558._0x25f123,_0xb3a558._0x350c86,_0xb3a558._0x53ba3a,0x459)],'signal':_0x476f28[_0x2b92ea(0x24b,0x2a2,_0xb3a558._0x2c4295,0x233)],'system':this[_0x3c5cb3(_0xb3a558._0x27b9a0,0x4c2,_0xb3a558._0x2cc20f,0x4b5)],'messages':this['messages'],'message':normalizeUserInput(_0x351ff0)},this[_0x3c5cb3(_0xb3a558._0x160a39,_0xb3a558._0xc21b81,_0xb3a558._0x925907,_0xb3a558._0xc5f6e8)]);return this['messages']=_0x1e58f1['state']['messages']['map'](normalizeMessage),_0x1e58f1;}};export{normalizeToolOutputValue,createToolOutput,ToolExecutionError,defineTool,ToolRegistry,validateToolInput,deriveFinalToolOutput,createInternalToolRuntime,createExtensionRegistry,createAgentMetrics,runTurn,Agent};
|
package/dist/chunk-NYZR4XKO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function _0x3103(_0x336c66,_0x277dd3){_0x336c66=_0x336c66-0x142;var _0x5dc566=_0x5dc5();var _0x310379=_0x5dc566[_0x336c66];if(_0x3103['etMlfM']===undefined){var _0x431f9b=function(_0x2c5c39){var _0x565d78='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x20e74a='',_0x2bcebc='';for(var _0x56376d=0x0,_0x59bff8,_0x2f06e1,_0x4392dd=0x0;_0x2f06e1=_0x2c5c39['charAt'](_0x4392dd++);~_0x2f06e1&&(_0x59bff8=_0x56376d%0x4?_0x59bff8*0x40+_0x2f06e1:_0x2f06e1,_0x56376d++%0x4)?_0x20e74a+=String['fromCharCode'](0xff&_0x59bff8>>(-0x2*_0x56376d&0x6)):0x0){_0x2f06e1=_0x565d78['indexOf'](_0x2f06e1);}for(var _0x27c6e6=0x0,_0x284975=_0x20e74a['length'];_0x27c6e6<_0x284975;_0x27c6e6++){_0x2bcebc+='%'+('00'+_0x20e74a['charCodeAt'](_0x27c6e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2bcebc);};_0x3103['MmPOhZ']=_0x431f9b,_0x3103['EEGAHl']={},_0x3103['etMlfM']=!![];}var _0x45e12c=_0x5dc566[0x0],_0x12acd6=_0x336c66+_0x45e12c,_0x4c3e22=_0x3103['EEGAHl'][_0x12acd6];return!_0x4c3e22?(_0x310379=_0x3103['MmPOhZ'](_0x310379),_0x3103['EEGAHl'][_0x12acd6]=_0x310379):_0x310379=_0x4c3e22,_0x310379;}(function(_0x32d673,_0x573a4b){var _0x451708={_0x63aeb6:0x2ec,_0xc38aac:0x2e7,_0x469287:0x417,_0x4977e6:0x414,_0x4eb097:0x418,_0x4c4d4e:0x40a,_0x5cceff:0x415,_0x3fec56:0x409,_0x54ea2a:0x416,_0x7c1d15:0x413,_0x5c4cd7:0x416,_0x1c9ec2:0x2ec,_0x561bff:0x2f3,_0x3399bc:0x40e,_0x359bf3:0x418,_0x2507eb:0x41b,_0x40accf:0x416,_0x382c79:0x413,_0x205f31:0x2f5,_0x5499:0x2ed,_0xbdb4da:0x2e8},_0x4b6ff9={_0x571425:0x2cb},_0x3cfecf={_0x3e5a63:0x1a5};function _0x572397(_0x58bd61,_0x30063f,_0x1307db,_0x49488f){return _0x3103(_0x1307db-_0x3cfecf._0x3e5a63,_0x49488f);}function _0x518a47(_0x5af187,_0xd972a,_0x17e904,_0x15934c){return _0x3103(_0x5af187-_0x4b6ff9._0x571425,_0x17e904);}var _0x201260=_0x32d673();while(!![]){try{var _0x523fdc=-parseInt(_0x572397(_0x451708._0x63aeb6,0x2e5,_0x451708._0xc38aac,0x2e0))/0x1+-parseInt(_0x518a47(0x415,0x416,0x412,0x41a))/0x2+-parseInt(_0x518a47(_0x451708._0x469287,0x41b,_0x451708._0x4977e6,_0x451708._0x4eb097))/0x3+parseInt(_0x518a47(0x410,_0x451708._0x4c4d4e,_0x451708._0x5cceff,_0x451708._0x3fec56))/0x4*(-parseInt(_0x518a47(_0x451708._0x54ea2a,_0x451708._0x7c1d15,0x413,_0x451708._0x5c4cd7))/0x5)+parseInt(_0x572397(_0x451708._0x1c9ec2,0x2f5,_0x451708._0x561bff,0x2f2))/0x6*(-parseInt(_0x518a47(0x413,0x40b,0x41a,_0x451708._0x3399bc))/0x7)+parseInt(_0x518a47(_0x451708._0x359bf3,0x419,_0x451708._0x2507eb,_0x451708._0x40accf))/0x8*(parseInt(_0x518a47(0x412,_0x451708._0x382c79,0x40f,0x418))/0x9)+parseInt(_0x572397(0x2f3,0x2fb,_0x451708._0x205f31,0x2ef))/0xa*(parseInt(_0x572397(0x2e7,_0x451708._0x5499,_0x451708._0xbdb4da,0x2f0))/0xb);if(_0x523fdc===_0x573a4b)break;else _0x201260['push'](_0x201260['shift']());}catch(_0x2b43ed){_0x201260['push'](_0x201260['shift']());}}}(_0x5dc5,0x84c0c));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x20e74a){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x20e74a];}function _0x5dc5(){var _0x6172f7=['oxP0v1zrrW','n3jTqMnmyG','yw50AhjVCgLJ','mZyWoteWEMn5vwfi','nZa3otq1Defjte9j','nta2ndy2uuzvCLbs','ndG3mZuYDhz6yKrR','mZiYnJqWneLpvgD5DW','B3bLBMfP','ndaZotaWALr2ywr3','otKXmZK5rKzerLn1','oteZvKjfBuDI','yxv0BW','mJHQsKTOqvq','zwzMB3j0'];_0x5dc5=function(){return _0x6172f7;};return _0x5dc5();}function resolveAnthropicThinkingConfig(_0x2bcebc){var _0x5f2a60={_0x1c9410:0x59,_0xc013a9:0x58,_0x303359:0xb4,_0x12681b:0xb5,_0x479146:0xb2,_0x1b115e:0x60,_0x74fca4:0x64,_0x8493de:0x59,_0xe16a03:0x62},_0x4326cf={_0x53977f:0x1a4};function _0x2ebcdc(_0x147dee,_0x57168a,_0x2b42c3,_0x3fe2fc){return _0x3103(_0x147dee- -_0x4326cf._0x53977f,_0x3fe2fc);}function _0x1a9be4(_0x4165d8,_0x136f09,_0x136012,_0x47caa9){return _0x3103(_0x47caa9- -0x97,_0x136f09);}if(!_0x2bcebc)return void 0x0;if(_0x2bcebc[_0x2ebcdc(-0x5b,-_0x5f2a60._0x1c9410,-_0x5f2a60._0xc013a9,-0x5e)])return structuredClone(_0x2bcebc[_0x1a9be4(_0x5f2a60._0x303359,0xb6,_0x5f2a60._0x12681b,_0x5f2a60._0x479146)]);if(!_0x2bcebc[_0x1a9be4(0xae,0xaf,0xb0,0xad)])return void 0x0;return{'type':'enabled','budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x2bcebc[_0x2ebcdc(-_0x5f2a60._0x1b115e,-0x5a,-_0x5f2a60._0x74fca4,-0x68)][_0x2ebcdc(-0x5e,-_0x5f2a60._0x8493de,-0x57,-_0x5f2a60._0xe16a03)])};}function resolveOpenAiReasoningConfig(_0x56376d){var _0x5bb056={_0x515151:0x31,_0x12feca:0x3c,_0x437d1a:0x357,_0x5325ce:0x35f,_0x3af46:0x48,_0x3c5792:0x363},_0x3c8065={_0x3b479f:0x218};function _0x5b3a38(_0xf5be59,_0xd65c30,_0x3c5fd8,_0x73162e){return _0x3103(_0x3c5fd8- -0x10c,_0x73162e);}function _0x52030e(_0x5e4c50,_0x4e096c,_0x49aad9,_0x406423){return _0x3103(_0x49aad9-_0x3c8065._0x3b479f,_0x406423);}if(!_0x56376d)return void 0x0;const _0x59bff8=_0x56376d[_0x5b3a38(0x3f,_0x5bb056._0x515151,0x38,_0x5bb056._0x12feca)]?{'effort':_0x56376d[_0x52030e(_0x5bb056._0x437d1a,_0x5bb056._0x5325ce,0x35c,0x360)]['effort']}:void 0x0;if(!_0x56376d[_0x5b3a38(_0x5bb056._0x3af46,0x3d,0x43,0x46)])return _0x59bff8;return{..._0x59bff8??{},...structuredClone(_0x56376d[_0x52030e(_0x5bb056._0x3c5792,0x363,0x367,0x361)])};}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
|