@nuvin/agent-core 0.1.0-rc.3 → 0.1.0-rc.5
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.js +1 -1
- package/dist/agent/topic-reminder-extension.d.ts +2 -2
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-FKZ3QQWZ.js +1 -1
- package/dist/chunk-NHBKADBW.js +1 -1
- package/dist/chunk-NYZR4XKO.js +1 -1
- package/dist/chunk-QDOE7NWO.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/models/index.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/types.d.ts +9 -0
- package/dist/tools/index.js +1 -1
- package/package.json +1 -1
package/dist/chunk-NHBKADBW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x211c7d,_0x50e35c){const _0x3eb03c={_0x3ad1b0:0x8c,_0x53436d:0xd3,_0x231e89:0xdb,_0x5e48e3:0xf4,_0x4479f7:0xe1,_0x110979:0xc4,_0x13831a:0xd7,_0x525e0b:0xfa,_0x2fec5e:0xa9,_0x6b4a59:0x8e,_0xa888ed:0xa0,_0x1a6427:0x70,_0x3cce50:0x74,_0x362204:0x6a,_0x49df83:0x56,_0x15ceb8:0x88},_0x180b25={_0x5c006e:0x15f},_0x1b15c1={_0x4b5942:0xb};function _0x1d3cad(_0x116e89,_0x47a4de,_0x4aed03,_0x2c9f56){return _0x1ee8(_0x4aed03- -_0x1b15c1._0x4b5942,_0x47a4de);}const _0x342a22=_0x211c7d();function _0x24357f(_0x28c105,_0xc81dbb,_0x479bbb,_0x53845d){return _0x1ee8(_0x28c105- -_0x180b25._0x5c006e,_0x479bbb);}while(!![]){try{const _0x53ab55=parseInt(_0x1d3cad(0x77,0x7f,_0x3eb03c._0x3ad1b0,0x93))/0x1+parseInt(_0x24357f(-_0x3eb03c._0x53436d,-0xb8,-0xe6,-0xb2))/0x2+parseInt(_0x24357f(-0xd5,-_0x3eb03c._0x231e89,-_0x3eb03c._0x5e48e3,-0xed))/0x3*(-parseInt(_0x24357f(-_0x3eb03c._0x4479f7,-0xca,-0xd1,-_0x3eb03c._0x110979))/0x4)+-parseInt(_0x24357f(-0xe4,-0xc5,-_0x3eb03c._0x13831a,-_0x3eb03c._0x525e0b))/0x5+-parseInt(_0x1d3cad(_0x3eb03c._0x2fec5e,0x87,_0x3eb03c._0x6b4a59,_0x3eb03c._0xa888ed))/0x6+-parseInt(_0x1d3cad(_0x3eb03c._0x6b4a59,_0x3eb03c._0x1a6427,0x89,_0x3eb03c._0x3cce50))/0x7*(parseInt(_0x1d3cad(0x76,0x5d,0x71,_0x3eb03c._0x362204))/0x8)+-parseInt(_0x1d3cad(0x46,0x49,0x66,_0x3eb03c._0x49df83))/0x9*(-parseInt(_0x1d3cad(_0x3eb03c._0x15ceb8,0x85,0x69,0x68))/0xa);if(_0x53ab55===_0x50e35c)break;else _0x342a22['push'](_0x342a22['shift']());}catch(_0x88c629){_0x342a22['push'](_0x342a22['shift']());}}}(_0x4e56,0x44174));function _0x4e56(){const _0x76a8a9=['BwvKAwfFDhLWzq','Dg9VBhm','C3vTBwfYEq','BwfW','yxv0BW','AM9PBG','mti1mtq3meXPBKjTtq','mta1mZK0neDovK5wCq','zgf0ytO','mJq4nZztu1jnqwO','zwzMB3j0','C3rYAw5N','BwvZC2fNzq','Bwf4vg9Rzw5Z','DxnLCI12AxnPyMXL','DhjPBq','zMLSDgvY','C3bSAwnL','ChjVDMLKzxjtDgf0zq','C3rYAw5NAwz5','Aw5WDxrFC2nOzw1H','mZzlt1PlyLi','B2jQzwn0','nZyYmZy0A3nWtMHk','Dg9VBf91C2vFAwq','DhLWzq','zgf0yq','o2jHC2u2ncW','zgvZy3jPChrPB24','C3LZDgvT','zNvUy3rPB25Fy2fSBa','mJfAuejMuxy','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','yxnZAxn0yw50','mJmWmJKWyKzAq25x','C291CMnL','mJu4nJu0nLLxDwTLAG','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','B3v0Chv0rM9YBwf0','AxnbCNjHEq','ChvZAa','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50','CMvHC29UAw5N','Aw5WDxrFAw1Hz2u','CM9Szq','BgvUz3rO','y29UDgvUDa','Bw9KzwW','BwvZC2fNzxm','DMLZAwjPBgL0Eq','C3rYDwn0DxjLzf9VDxrWDxq','DxnLCG','Aw5WDxrFDgv4Da','BMfTzq','B3v0Chv0x3rLEhq','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','zNvUy3rPB24','Dg9VBf91C2u','Dgv4Da','C3rYAwn0','C2nOzw1H','mti3mdm1u0rjsMXR','Aw1Hz2u','Aw5JBhvKzuvUy3j5ChrLzenVBNrLBNq','ntGWAMTbrLf3'];_0x4e56=function(){return _0x76a8a9;};return _0x4e56();}import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-QDOE7NWO.js';function _0x1ee8(_0x3083f5,_0x55b9e5){_0x3083f5=_0x3083f5-0x6c;const _0x4e566b=_0x4e56();let _0x1ee854=_0x4e566b[_0x3083f5];if(_0x1ee8['UuDTsW']===undefined){var _0x2f1173=function(_0xf04505){const _0x2454f5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c26e9='',_0x1dbb33='';for(let _0x270e30=0x0,_0x43b532,_0x13fd37,_0x34ef90=0x0;_0x13fd37=_0xf04505['charAt'](_0x34ef90++);~_0x13fd37&&(_0x43b532=_0x270e30%0x4?_0x43b532*0x40+_0x13fd37:_0x13fd37,_0x270e30++%0x4)?_0x1c26e9+=String['fromCharCode'](0xff&_0x43b532>>(-0x2*_0x270e30&0x6)):0x0){_0x13fd37=_0x2454f5['indexOf'](_0x13fd37);}for(let _0x53250e=0x0,_0x1ba206=_0x1c26e9['length'];_0x53250e<_0x1ba206;_0x53250e++){_0x1dbb33+='%'+('00'+_0x1c26e9['charCodeAt'](_0x53250e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1dbb33);};_0x1ee8['EZcBcR']=_0x2f1173,_0x1ee8['NiQelF']={},_0x1ee8['UuDTsW']=!![];}const _0x12b3c8=_0x4e566b[0x0],_0x29170f=_0x3083f5+_0x12b3c8,_0x36b997=_0x1ee8['NiQelF'][_0x29170f];return!_0x36b997?(_0x1ee854=_0x1ee8['EZcBcR'](_0x1ee854),_0x1ee8['NiQelF'][_0x29170f]=_0x1ee854):_0x1ee854=_0x36b997,_0x1ee854;}function systemToInstructions(_0x1c26e9){const _0x52dad1={_0x1e8058:0x219,_0x59914b:0x236,_0x11b131:0x1f2,_0x4213e0:0x1f4,_0x17df9e:0x20e,_0x4ee1b5:0xd4,_0x1a92aa:0xd6,_0x1c5e1c:0xe5},_0x5dffe6={_0x44472d:0x196},_0x8a1f11={_0x45903b:0x14e};function _0x585e2d(_0x1a53a2,_0x33273e,_0x2c1bf3,_0x326337){return _0x1ee8(_0x33273e- -_0x8a1f11._0x45903b,_0x326337);}function _0x28fb3a(_0x3b99b3,_0x298fe5,_0x478c41,_0xd4c38d){return _0x1ee8(_0x478c41-_0x5dffe6._0x44472d,_0x298fe5);}return normalizeContent(_0x1c26e9)[_0x28fb3a(_0x52dad1._0x1e8058,0x233,0x21b,_0x52dad1._0x59914b)](_0x1dbb33=>_0x1dbb33[_0x585e2d(-0xc7,-0xc0,-0xce,-0xa0)]===_0x585e2d(-0xf9,-0xe0,-0xd8,-0xc2))[_0x28fb3a(_0x52dad1._0x11b131,_0x52dad1._0x4213e0,_0x52dad1._0x17df9e,0x227)](_0x270e30=>_0x270e30[_0x28fb3a(0x1e6,0x1fd,0x204,0x1f0)])[_0x585e2d(-0xd3,-_0x52dad1._0x4ee1b5,-_0x52dad1._0x1a92aa,-_0x52dad1._0x1c5e1c)]('\x0a\x0a');}function pushUserContentMessage(_0x43b532,_0x13fd37,_0x34ef90){const _0x5818e6={_0x4c950f:0x7b,_0x4fae2f:0x75,_0x4f0847:0x275,_0x139531:0x27d},_0x3d83b9={_0x5bdf1f:0x301};function _0x30e501(_0x3e3680,_0x45ff0d,_0x2e7ef7,_0x216a84){return _0x1ee8(_0x45ff0d- -0x3d,_0x216a84);}if(_0x34ef90[_0x29558b(-0x25f,-0x275,-0x265,-0x253)]===0x0)return;function _0x29558b(_0x513d70,_0x1471c7,_0x3bfe0f,_0x5ef7d0){return _0x1ee8(_0x513d70- -_0x3d83b9._0x5bdf1f,_0x5ef7d0);}_0x43b532[_0x30e501(_0x5818e6._0x4c950f,0x60,0x78,_0x5818e6._0x4fae2f)]({'type':_0x29558b(-0x280,-0x28c,-_0x5818e6._0x4f0847,-_0x5818e6._0x139531),'role':_0x13fd37,'content':_0x34ef90});}function hasSerializableToolUse(_0x53250e){const _0x7a7b89={_0x22b7c1:0x4f,_0x1064e4:0x5d,_0x4c6f10:0x33,_0x193d30:0x162,_0x2259ee:0x14f},_0x313443={_0x367307:0xad},_0x2786b9={_0x4609c3:0x42};function _0x22c3bc(_0x3f7266,_0x4fc2d2,_0xfcdc58,_0x3f3037){return _0x1ee8(_0x4fc2d2- -_0x2786b9._0x4609c3,_0xfcdc58);}function _0x1fd8d6(_0x259704,_0x1b53ac,_0x51d0da,_0x2c7004){return _0x1ee8(_0x51d0da-_0x313443._0x367307,_0x259704);}return _0x53250e['id'][_0x22c3bc(_0x7a7b89._0x22b7c1,0x42,0x45,0x2d)]()['length']>0x0&&_0x53250e[_0x22c3bc(0x7b,0x68,0x53,_0x7a7b89._0x1064e4)][_0x22c3bc(0x5e,0x42,0x5c,_0x7a7b89._0x4c6f10)]()[_0x1fd8d6(0x12e,_0x7a7b89._0x193d30,_0x7a7b89._0x2259ee,0x13e)]>0x0;}function hasSerializableToolResult(_0x1ba206){const _0x5e98e0={_0x572ef9:0xb,_0x380cd4:0x11,_0x3c6b00:0x31e,_0x37c052:0x346,_0x3acadb:0x315},_0x230fd3={_0x5f90fa:0x7c};function _0x180b5d(_0x53848d,_0x37d16b,_0x5724fc,_0x50b426){return _0x1ee8(_0x37d16b-0x293,_0x5724fc);}function _0x44ff35(_0x34e82d,_0x3b4d5b,_0x4df6bd,_0x21cbe7){return _0x1ee8(_0x4df6bd- -_0x230fd3._0x5f90fa,_0x34e82d);}return _0x1ba206[_0x44ff35(0xb,-_0x5e98e0._0x572ef9,_0x5e98e0._0x380cd4,0x1f)]['trim']()[_0x180b5d(_0x5e98e0._0x3c6b00,0x335,_0x5e98e0._0x37c052,_0x5e98e0._0x3acadb)]>0x0;}function isResponseInputObject(_0x23422e){const _0x79e352={_0x23bc18:0x30},_0x42055b={_0x5d87b3:0xb7};function _0xdba564(_0x470c08,_0x15ddf3,_0x34c7bc,_0x3436fa){return _0x1ee8(_0x34c7bc-0x106,_0x3436fa);}function _0xb9cee0(_0x1e1ac3,_0x492eab,_0x5ba7a3,_0x15d04f){return _0x1ee8(_0x1e1ac3- -_0x42055b._0x5d87b3,_0x492eab);}if(typeof _0x23422e!==_0xb9cee0(-0x2c,-0x39,-0xf,-_0x79e352._0x23bc18)||_0x23422e===null||Array[_0xb9cee0(-0x1b,-0x10,-0x19,-0xa)](_0x23422e))return![];const _0x2f5c7d=_0x23422e;return typeof _0x2f5c7d['type']==='string';}function isImageToolResultBlock(_0x50275b){const _0x2fdf13={_0x1da6f0:0xbf,_0x461abf:0xad,_0x20a3a2:0xbc,_0x2e9810:0xb7,_0x142a46:0xb4,_0x4195ff:0x37,_0x5712a6:0x1c,_0x59aa8d:0x3c,_0x5f2ece:0x24,_0x30d9bc:0x23,_0x21394e:0x2e,_0x31fb15:0x4e,_0x2ec36b:0x26,_0x2cae21:0x46,_0x392cda:0x94,_0x3c4fdc:0xae,_0x502189:0x33},_0x5ac027={_0x15d509:0x52};function _0x42a60c(_0x6efe11,_0x352490,_0x2cc691,_0x1e17d7){return _0x1ee8(_0x2cc691-0x1f,_0x352490);}function _0x4dd281(_0x452798,_0x3998b4,_0x5a3b52,_0x332249){return _0x1ee8(_0x5a3b52- -_0x5ac027._0x15d509,_0x452798);}if(typeof _0x50275b!=='object'||_0x50275b===null||Array['isArray'](_0x50275b))return![];const _0x194442=_0x50275b;return _0x194442[_0x42a60c(_0x2fdf13._0x1da6f0,0xa0,_0x2fdf13._0x461abf,0xae)]==='image'&&_0x194442[_0x42a60c(0x97,_0x2fdf13._0x20a3a2,_0x2fdf13._0x2e9810,_0x2fdf13._0x142a46)]?.[_0x4dd281(_0x2fdf13._0x4195ff,_0x2fdf13._0x5712a6,_0x2fdf13._0x59aa8d,0x37)]==='base64'&&typeof _0x194442['source'][_0x4dd281(0x7,_0x2fdf13._0x5f2ece,_0x2fdf13._0x30d9bc,0x17)]===_0x4dd281(0x43,0x10,_0x2fdf13._0x21394e,_0x2fdf13._0x31fb15)&&typeof _0x194442[_0x4dd281(_0x2fdf13._0x2ec36b,0x44,_0x2fdf13._0x2cae21,0x2d)][_0x42a60c(0xaa,_0x2fdf13._0x392cda,_0x2fdf13._0x3c4fdc,0xc7)]===_0x4dd281(0x1d,0x1b,0x2e,_0x2fdf13._0x502189);}function getToolResultText(_0x278990){const _0x3e1949={_0x372581:0x262,_0x17d5dd:0x265,_0xfdd11e:0x242,_0x41d5cb:0x254,_0x403264:0x192,_0x29ee5a:0x199,_0x172e3e:0x1b9,_0x1d69b9:0x259,_0x5e3b10:0x247,_0x524a83:0x24b},_0x577608={_0xfe403a:0x27,_0x403de5:0x9,_0x1876f9:0xad,_0x1da0b5:0x99,_0x3483af:0x8e,_0x598b2b:0xa,_0x5a2396:0x7,_0x2a3a84:0x3},_0x1d0eeb={_0x621b7d:0x27e,_0x2ed336:0x82},_0x2e6f4a={_0x60456c:0x2ed};function _0x50e617(_0x150f6b,_0xbb7019,_0x57332e,_0x543b89){return _0x1ee8(_0x150f6b- -0x2e2,_0x57332e);}function _0x4e2592(_0xb61055,_0x3bf892,_0x3a6d86,_0x2e62da){return _0x1ee8(_0xb61055- -0x22b,_0x2e62da);}if(typeof _0x278990===_0x50e617(-_0x3e1949._0x372581,-_0x3e1949._0x17d5dd,-_0x3e1949._0xfdd11e,-_0x3e1949._0x41d5cb))return _0x278990;const _0x15bb63=_0x278990['filter'](_0x1c88a2=>{function _0xd1e770(_0x583504,_0x174c6a,_0x1702bc,_0x1a692e){return _0x50e617(_0x174c6a-_0x2e6f4a._0x60456c,_0x174c6a-0x9c,_0x1a692e,_0x1a692e-0x3b);}function _0x5015ee(_0x156042,_0x20ca1a,_0x1258c1,_0x266d99){return _0x50e617(_0x20ca1a-_0x1d0eeb._0x621b7d,_0x20ca1a-0x1b0,_0x1258c1,_0x266d99-_0x1d0eeb._0x2ed336);}return typeof _0x1c88a2===_0x5015ee(0x29,_0x577608._0xfe403a,_0x577608._0x403de5,0x9)&&_0x1c88a2!==null&&_0x1c88a2[_0xd1e770(_0x577608._0x1876f9,_0x577608._0x1da0b5,0xa2,_0x577608._0x3483af)]===_0x5015ee(-0x10,_0x577608._0x598b2b,_0x577608._0x5a2396,-_0x577608._0x2a3a84);})[_0x4e2592(-0x1b3,-0x1d2,-_0x3e1949._0x403264,-_0x3e1949._0x29ee5a)](_0x45e535=>_0x45e535[_0x50e617(-0x274,-0x26f,-0x27e,-0x26f)])[_0x4e2592(-0x1b1,-0x197,-0x19b,-_0x3e1949._0x172e3e)]('\x0a\x0a')['trim']();return _0x15bb63['length']>0x0?_0x15bb63:_0x50e617(-0x248,-_0x3e1949._0x1d69b9,-_0x3e1949._0x5e3b10,-_0x3e1949._0x524a83);}function getToolResultImages(_0x1cbf15){const _0x1e7ca9={_0x17bde3:0x6a,_0x25cf18:0x72,_0x36711d:0x76,_0x58f2a6:0x61},_0x342c66={_0x5a63ba:0x247};function _0xee9562(_0x11b3fe,_0x7493c6,_0x44d8d6,_0x17cd30){return _0x1ee8(_0x17cd30-_0x342c66._0x5a63ba,_0x11b3fe);}function _0x439c2e(_0x135aff,_0x523a99,_0x14c445,_0x281ebe){return _0x1ee8(_0x135aff- -0x1b,_0x14c445);}return Array[_0x439c2e(0x81,0x7a,0x9b,0x8f)](_0x1cbf15)?_0x1cbf15[_0x439c2e(_0x1e7ca9._0x17bde3,_0x1e7ca9._0x25cf18,_0x1e7ca9._0x36711d,_0x1e7ca9._0x58f2a6)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x113d2c){const _0x3e25cc={_0x15b910:0x61,_0x2ff6fb:0x5d,_0x44ae02:0x33d,_0x594d70:0x359},_0x29bf7e={_0x5a0eb1:0xea},_0x56e388={_0x20e7da:0x2b3};function _0x4adbb6(_0x19898a,_0x5a1d69,_0x132bfb,_0x23d7ca){return _0x1ee8(_0x23d7ca-_0x56e388._0x20e7da,_0x132bfb);}function _0x46fccd(_0x2ce50e,_0x282376,_0x4c6551,_0xdd737){return _0x1ee8(_0x4c6551- -_0x29bf7e._0x5a0eb1,_0xdd737);}return _0x113d2c[_0x46fccd(-_0x3e25cc._0x15b910,-_0x3e25cc._0x2ff6fb,-0x4b,-_0x3e25cc._0x2ff6fb)]?.[_0x4adbb6(0x36b,_0x3e25cc._0x44ae02,0x373,_0x3e25cc._0x594d70)]??'user-visible';}function createOpenAiResponsesReasoning(_0xa21856){const _0x575f72={_0x53f808:0x1ed,_0x184c1c:0x204,_0x5ad061:0x210,_0x3dca3f:0x205,_0x1df445:0x227,_0x647d2f:0x20a,_0x3a4a6a:0x20c,_0xd8344:0x209,_0x2f4c5b:0x28a,_0x10ab13:0x268,_0x2fcad3:0x254,_0x3b768f:0x23c},_0x436f04={_0x520314:0x2f2},_0x4e919a={_0x44570f:0x18d},_0x10ca1f=resolveOpenAiReasoningConfig(_0xa21856['reasoning']);if(!_0x10ca1f)return{};const _0x386a65={},_0xf6f55b=_0x10ca1f[_0x154081(_0x575f72._0x53f808,0x210,_0x575f72._0x184c1c,0x20a)]??(resolveReasoningVisibility(_0xa21856)===_0x154081(_0x575f72._0x5ad061,0x230,0x210,0x228)?_0x154081(0x219,0x221,0x206,_0x575f72._0x3dca3f):void 0x0);function _0x154081(_0x2ef43d,_0x3b949c,_0x2f3ef5,_0x2ddaa2){return _0x1ee8(_0x2f3ef5-_0x4e919a._0x44570f,_0x2ddaa2);}_0x10ca1f[_0x154081(_0x575f72._0x1df445,_0x575f72._0x647d2f,_0x575f72._0x3a4a6a,_0x575f72._0xd8344)]&&(_0x386a65[_0x58dce5(-0x26c,-0x28b,-0x273,-_0x575f72._0x2f4c5b)]=_0x10ca1f['effort']);_0xf6f55b&&(_0x386a65[_0x154081(0x217,0x1ee,0x204,0x223)]=_0xf6f55b);function _0x58dce5(_0x39c9b7,_0x1b1447,_0x4786be,_0x478310){return _0x1ee8(_0x4786be- -_0x436f04._0x520314,_0x39c9b7);}return{..._0x10ca1f[_0x154081(0x21c,0x20c,0x200,0x1df)]===![]?{}:{'include':[_0x58dce5(-0x23c,-_0x575f72._0x10ab13,-_0x575f72._0x2fcad3,-0x238)]},...Object['keys'](_0x386a65)[_0x154081(_0x575f72._0x3b768f,0x243,0x22f,0x216)]>0x0?{'reasoning':_0x386a65}:{}};}function pushAssistantProviderState(_0x3ca11f,_0x345bbd){const _0xad5d3d={_0x5c3218:0x21c,_0x5197ed:0x224,_0x2288d0:0x218,_0x5c8dad:0x76,_0x5d446e:0x85,_0x3dd099:0x256,_0x298123:0x22d,_0x5d1b9f:0x23e,_0x194775:0x222,_0x33d355:0x8c,_0x4ff432:0x8c,_0x40c61b:0x79,_0x2a826b:0x99,_0x46716b:0x5d,_0x155d26:0x6a},_0xf6a367={_0x199947:0x20};function _0x376889(_0x3aaf88,_0x5cd4eb,_0x2d340d,_0x7c60fb){return _0x1ee8(_0x5cd4eb- -_0xf6a367._0x199947,_0x7c60fb);}if(_0x345bbd[_0x358c7b(-_0xad5d3d._0x5c3218,-0x224,-_0xad5d3d._0x5197ed,-_0xad5d3d._0x2288d0)]!==_0x376889(0x84,_0xad5d3d._0x5c8dad,_0xad5d3d._0x5d446e,0x69))return![];const _0x55e8a4=_0x345bbd[_0x358c7b(-_0xad5d3d._0x3dd099,-_0xad5d3d._0x298123,-_0xad5d3d._0x5d1b9f,-_0xad5d3d._0x194775)]?.[_0x376889(0xa4,_0xad5d3d._0x33d355,_0xad5d3d._0x4ff432,0xa5)]??[];function _0x358c7b(_0x58529b,_0x517cda,_0x463db2,_0xff6111){return _0x1ee8(_0x463db2- -0x2c5,_0x517cda);}if(_0x55e8a4[_0x376889(_0xad5d3d._0x40c61b,0x82,0x92,_0xad5d3d._0x2a826b)]===0x0)return![];for(const _0x528dde of _0x55e8a4){isResponseInputObject(_0x528dde)&&_0x3ca11f[_0x376889(_0xad5d3d._0x46716b,0x7d,_0xad5d3d._0x155d26,0x94)](structuredClone(_0x528dde));}return!![];}function toOpenAiResponsesRequest(_0x2dc027){const _0x495f7a={_0xc20182:0x12,_0x30c129:0x7,_0x33f822:0x12,_0x440b31:0x17f,_0xe2337:0x175,_0x2dfcc8:0x139,_0x3bd9c3:0x14d,_0xfe0e49:0x148,_0x17be18:0x158,_0x4674d1:0x1b,_0x11c036:0x36,_0x365212:0x5,_0x53ae4f:0x16,_0x353c73:0x176,_0x54c1d0:0x171,_0x34af3d:0x13f,_0x191f68:0x150,_0x41e572:0x146,_0x39bce0:0x138,_0x5c330c:0x14b,_0x3fa950:0x143,_0x29036d:0x2e,_0x45e2e2:0x47,_0xcce9b3:0x32,_0x3499f1:0x10,_0xe60b17:0x4c,_0x351e9a:0xe,_0x11438e:0x14,_0x527791:0x1d,_0x10f739:0xf,_0x230182:0x15,_0x365fc9:0x8,_0x7a6a7f:0x2c,_0x324300:0x3,_0x2de2da:0x1a,_0x401878:0x2b,_0x4662b8:0x15f,_0x16c1ba:0x155,_0x4768fa:0x194,_0x3bd0ff:0x12b,_0x449c4e:0x154,_0x320f0b:0x6,_0x5e849f:0x12,_0x1aafe2:0x14a,_0x93ac4a:0x15b,_0x175c34:0x23,_0x428b11:0x122,_0x1d0e9a:0x15e,_0x20a7ec:0x138,_0x525873:0x13f,_0xb93180:0x13a,_0x5e3244:0xc,_0x4f7339:0x9,_0x184b08:0x1c,_0x223cfa:0x7,_0x2a641c:0x16d,_0x4e5aa3:0x159,_0x46016c:0x162,_0x1d5a68:0xe,_0x3946d9:0xc,_0x580e08:0xf,_0x242aad:0x26,_0x534fea:0x36,_0x3db935:0x17,_0x5b6942:0x20,_0x34ab27:0x17e,_0x52f741:0x18b,_0x50087a:0x16b,_0x42d41f:0x5,_0x8975f:0x134,_0x401465:0x13f,_0xb3aee7:0x158,_0x2283b6:0x166,_0x4e8292:0x151,_0x3d8fee:0x16c,_0xa76c17:0x168,_0x39905f:0x161,_0x236fd1:0x2e,_0x3e833f:0x18,_0x2ece0f:0x19,_0x510dff:0x10,_0x493b0a:0x1d,_0x58c28a:0x41,_0x5839df:0x129,_0xc4451d:0x166,_0x28e53c:0x137,_0x21de89:0x13c,_0x4f37dc:0x55,_0x34d630:0x49,_0x34aba2:0x3f,_0x4bc804:0x3,_0xc3edc4:0x17,_0x33deb2:0x19},_0x25e20a={_0x21df0a:0xb4,_0x15396c:0xbf,_0x3e0e02:0xb1,_0x4f3948:0x4d,_0x2a4412:0xf0,_0x487aeb:0xc3,_0x8e35a7:0xd6,_0x34b2f1:0x46,_0x13fce1:0x38,_0x6d815e:0x56},_0x5bb484={_0xadc78f:0x61,_0x42220b:0x14c},_0x492928=[];function _0x3666ce(_0x1d4b07,_0x1d7b5f,_0x111ede,_0x1aaba0){return _0x1ee8(_0x1aaba0- -0x1e3,_0x1d4b07);}for(const _0x2564f of _0x2dc027[_0x123fc8(-0x16,0x1,-0x11,_0x495f7a._0xc20182)]){if(pushAssistantProviderState(_0x492928,_0x2564f))continue;const _0xf25ce3=[];for(const _0xf768d7 of normalizeContent(_0x2564f[_0x123fc8(-_0x495f7a._0x30c129,-0x1,0x1e,0xf)])){if(_0xf768d7[_0x123fc8(-_0x495f7a._0x33f822,-0x16,-0x28,-0x8)]===_0x3666ce(-_0x495f7a._0x440b31,-0x160,-0x174,-_0x495f7a._0xe2337)){_0xf25ce3['push'](_0x2564f['role']===_0x3666ce(-0x133,-0x12e,-_0x495f7a._0x2dfcc8,-_0x495f7a._0x3bd9c3)?{'type':_0x3666ce(-_0x495f7a._0xfe0e49,-0x139,-_0x495f7a._0x17be18,-0x138),'text':_0xf768d7[_0x123fc8(-_0x495f7a._0x4674d1,-_0x495f7a._0x11c036,-0x36,-0x33)]}:{'type':_0x123fc8(0x1a,_0x495f7a._0x365212,_0x495f7a._0x53ae4f,-0x8),'text':_0xf768d7['text']});continue;}if(_0xf768d7[_0x3666ce(-0x16f,-0x15e,-0x172,-0x155)]===_0x3666ce(-_0x495f7a._0x353c73,-0x16f,-0x175,-_0x495f7a._0x54c1d0)){_0xf25ce3[_0x3666ce(-_0x495f7a._0x34af3d,-_0x495f7a._0x191f68,-0x131,-_0x495f7a._0x41e572)]({'type':_0x3666ce(-_0x495f7a._0x39bce0,-_0x495f7a._0x5c330c,-0x12a,-_0x495f7a._0x3fa950),'image_url':_0x123fc8(-_0x495f7a._0x29036d,-0x27,-_0x495f7a._0x45e2e2,-_0x495f7a._0xcce9b3)+_0xf768d7[_0x123fc8(-0x1f,-0xc,-0x1,_0x495f7a._0x3499f1)][_0x123fc8(-_0x495f7a._0xe60b17,-0x2f,-0x3e,-_0x495f7a._0x351e9a)]+_0x123fc8(-0x29,-_0x495f7a._0x11438e,-_0x495f7a._0x527791,-_0x495f7a._0x10f739)+_0xf768d7['source'][_0x123fc8(-0x1c,-_0x495f7a._0x230182,_0x495f7a._0x365fc9,-_0x495f7a._0x7a6a7f)]});continue;}pushUserContentMessage(_0x492928,_0x2564f[_0x123fc8(-0x15,-_0x495f7a._0x324300,-_0x495f7a._0x2de2da,0xe)],_0xf25ce3[_0x123fc8(-0x19,-0x1e,-_0x495f7a._0x401878,-0x1c)](0x0));if(_0xf768d7[_0x3666ce(-0x146,-0x157,-_0x495f7a._0x4662b8,-_0x495f7a._0x16c1ba)]===_0x3666ce(-0x165,-_0x495f7a._0x4768fa,-0x195,-0x176)){if(!hasSerializableToolUse(_0xf768d7))continue;_0x492928[_0x3666ce(-_0x495f7a._0x3bd0ff,-_0x495f7a._0x449c4e,-0x135,-0x146)]({'type':_0x3666ce(-0x137,-0x14a,-0x13f,-0x150),'call_id':_0xf768d7['id'],'name':_0xf768d7[_0x123fc8(0x24,_0x495f7a._0x320f0b,-_0x495f7a._0x5e849f,-0xb)],'arguments':JSON[_0x3666ce(-0x162,-0x145,-_0x495f7a._0x1aafe2,-_0x495f7a._0x93ac4a)](_0xf768d7['input']??{})});continue;}if(_0xf768d7[_0x123fc8(-_0x495f7a._0x175c34,-_0x495f7a._0x53ae4f,0xa,-_0x495f7a._0x29036d)]==='tool_result'){if(!hasSerializableToolResult(_0xf768d7))continue;const _0x22117a=getToolResultText(_0xf768d7[_0x3666ce(-_0x495f7a._0x428b11,-_0x495f7a._0x1d0e9a,-_0x495f7a._0x20a7ec,-0x140)]);_0x492928[_0x3666ce(-_0x495f7a._0x525873,-0x157,-_0x495f7a._0xb93180,-0x146)]({'type':'function_call_output','call_id':_0xf768d7[_0x123fc8(0x1,-0x17,-_0x495f7a._0x5e3244,_0x495f7a._0x4f7339)],'output':_0x22117a});const _0xc010f1=getToolResultImages(_0xf768d7[_0x123fc8(_0x495f7a._0x184b08,-0x1,-_0x495f7a._0x2de2da,0x1b)]);_0xc010f1[_0x3666ce(-_0x495f7a._0x428b11,-0x162,-0x151,-0x141)]>0x0&&_0x492928[_0x123fc8(0x6,-_0x495f7a._0x30c129,-0xf,_0x495f7a._0x223cfa)]({'type':_0x3666ce(-_0x495f7a._0x2a641c,-_0x495f7a._0x4e5aa3,-0x174,-_0x495f7a._0x46016c),'role':_0x123fc8(-0x16,0x4,_0x495f7a._0x1d5a68,0x17),'content':[{'type':_0x123fc8(0x4,0x5,-0x8,_0x495f7a._0x3946d9),'text':_0x123fc8(-0x29,-_0x495f7a._0x580e08,-_0x495f7a._0x242aad,_0x495f7a._0x5e3244)+_0xf768d7[_0x123fc8(-_0x495f7a._0x534fea,-_0x495f7a._0x3db935,-_0x495f7a._0x5b6942,-0x2c)]+'.'},..._0xc010f1[_0x3666ce(-_0x495f7a._0x34ab27,-0x167,-_0x495f7a._0x52f741,-_0x495f7a._0x50087a)](_0x21f96a=>({'type':'input_image','image_url':'data:'+_0x21f96a[_0x3666ce(-0x167,-0x15a,-0x130,-0x14b)][_0x123fc8(-0x32,-0x2f,-0x13,-0x28)]+_0x123fc8(-0x2a,-0x14,-0x30,-0x2f)+_0x21f96a[_0x123fc8(-0xc,-0xc,-0xe,-0x21)][_0x123fc8(-0x16,-0x15,-0x1,0x2)]}))]});}}pushUserContentMessage(_0x492928,_0x2564f[_0x123fc8(-0x22,-_0x495f7a._0x324300,-0x8,-_0x495f7a._0x42d41f)],_0xf25ce3);}function _0x123fc8(_0x3bc612,_0x57cbbb,_0x2b47f3,_0xd71dbe){return _0x1ee8(_0x57cbbb- -0xa4,_0xd71dbe);}return{...createOpenAiResponsesReasoning(_0x2dc027),'model':_0x2dc027[_0x3666ce(-0x11f,-_0x495f7a._0x8975f,-_0x495f7a._0x401465,-_0x495f7a._0x401465)],'instructions':systemToInstructions(_0x2dc027[_0x3666ce(-0x138,-_0x495f7a._0xb3aee7,-_0x495f7a._0x2283b6,-_0x495f7a._0x4e8292)]),'input':_0x492928,'max_output_tokens':_0x2dc027[_0x3666ce(-_0x495f7a._0x3d8fee,-_0x495f7a._0xa76c17,-0x164,-_0x495f7a._0x39905f)],'tools':_0x2dc027[_0x123fc8(-0x20,-_0x495f7a._0x236fd1,-_0x495f7a._0x3e833f,-_0x495f7a._0x2ece0f)][_0x123fc8(-_0x495f7a._0x510dff,-0x2c,-_0x495f7a._0x493b0a,-_0x495f7a._0x58c28a)](_0x3212de=>{const _0x57b5b3={_0x11f54e:0x174,_0x4c301a:0x228};function _0x4816ef(_0x3cfeb6,_0x311726,_0x245310,_0x4b7358){return _0x123fc8(_0x3cfeb6-0x39,_0x3cfeb6-_0x5bb484._0xadc78f,_0x245310-_0x5bb484._0x42220b,_0x4b7358);}function _0x5d0295(_0x38ae1f,_0x1b8661,_0x22a3c0,_0x870a94){return _0x3666ce(_0x22a3c0,_0x1b8661-0x51,_0x22a3c0-_0x57b5b3._0x11f54e,_0x870a94-_0x57b5b3._0x4c301a);}return{'type':_0x5d0295(_0x25e20a._0x21df0a,0xa4,_0x25e20a._0x15396c,_0x25e20a._0x3e0e02),'name':_0x3212de[_0x4816ef(0x67,_0x25e20a._0x4f3948,0x73,0x60)],'description':_0x3212de[_0x5d0295(_0x25e20a._0x2a4412,_0x25e20a._0x487aeb,0xba,_0x25e20a._0x8e35a7)],'parameters':_0x3212de[_0x4816ef(_0x25e20a._0x34b2f1,_0x25e20a._0x13fce1,0x4a,_0x25e20a._0x6d815e)]};}),..._0x2dc027[_0x3666ce(-_0x495f7a._0x4662b8,-_0x495f7a._0x5839df,-_0x495f7a._0xc4451d,-_0x495f7a._0xfe0e49)]?{'text':{'format':{'type':'json_schema','name':_0x2dc027['outputFormat']['name']??_0x3666ce(-0x129,-_0x495f7a._0x28e53c,-0x12d,-_0x495f7a._0x21de89),'schema':_0x2dc027['outputFormat'][_0x123fc8(-_0x495f7a._0x4f37dc,-0x34,-_0x495f7a._0x34d630,-_0x495f7a._0x34aba2)],'strict':_0x2dc027[_0x123fc8(-_0x495f7a._0x4bc804,-0x9,_0x495f7a._0xc3edc4,-0x13)][_0x123fc8(-_0x495f7a._0x33deb2,-0x35,-0x28,-_0x495f7a._0x58c28a)]??!![]}}}:{}};}export{toOpenAiResponsesRequest};
|
|
1
|
+
(function(_0x3e2c53,_0x38731c){const _0x251a1c={_0x4cd0bc:0x2c3,_0x1b92e7:0x2b4,_0x2ba6e3:0x2c4,_0x296cff:0x27e,_0x4631b4:0x280,_0x3394b0:0x286,_0x308a43:0x29d,_0x444dd8:0x29a,_0x16ce00:0x2ab,_0x40c310:0x2c0,_0x442e1a:0x2b9,_0x56eee9:0x2b0,_0x333ca5:0x297,_0x583235:0x290,_0x2f7b82:0x293,_0x107156:0x2ad,_0xfb0340:0x2aa,_0x5458ba:0x290,_0x5eb3ae:0x2d8,_0x5877f4:0x2ef},_0x339db4={_0x5be6e9:0x398},_0x2b7179=_0x3e2c53();function _0x55b388(_0x16edde,_0x39eb25,_0x300c27,_0x5630fc){return _0xecda(_0x16edde- -_0x339db4._0x5be6e9,_0x39eb25);}function _0x934560(_0x38f9d5,_0x4b91c1,_0x1376f8,_0x2c4ecf){return _0xecda(_0x4b91c1- -0x368,_0x2c4ecf);}while(!![]){try{const _0x49f363=-parseInt(_0x934560(-0x272,-0x28b,-0x2ab,-0x282))/0x1+parseInt(_0x55b388(-_0x251a1c._0x4cd0bc,-_0x251a1c._0x1b92e7,-_0x251a1c._0x2ba6e3,-0x2af))/0x2*(-parseInt(_0x934560(-_0x251a1c._0x296cff,-_0x251a1c._0x4631b4,-_0x251a1c._0x3394b0,-_0x251a1c._0x308a43))/0x3)+parseInt(_0x934560(-0x2a4,-0x29f,-0x27f,-_0x251a1c._0x444dd8))/0x4+-parseInt(_0x55b388(-0x2a7,-_0x251a1c._0x16ce00,-_0x251a1c._0x40c310,-0x2a2))/0x5*(parseInt(_0x934560(-_0x251a1c._0x442e1a,-_0x251a1c._0x56eee9,-_0x251a1c._0x333ca5,-0x2aa))/0x6)+parseInt(_0x934560(-_0x251a1c._0x583235,-0x279,-_0x251a1c._0x2f7b82,-0x25a))/0x7+-parseInt(_0x934560(-0x2c2,-_0x251a1c._0x107156,-0x2ab,-_0x251a1c._0x40c310))/0x8*(-parseInt(_0x934560(-_0x251a1c._0xfb0340,-_0x251a1c._0x5458ba,-0x2aa,-0x27b))/0x9)+-parseInt(_0x55b388(-0x2e5,-0x2fc,-0x2cb,-0x2c6))/0xa*(-parseInt(_0x55b388(-_0x251a1c._0x5eb3ae,-0x2d4,-0x2c1,-_0x251a1c._0x5877f4))/0xb);if(_0x49f363===_0x38731c)break;else _0x2b7179['push'](_0x2b7179['shift']());}catch(_0x18b387){_0x2b7179['push'](_0x2b7179['shift']());}}}(_0x2f95,0x69555));import{resolveOpenAiReasoningConfig}from'./chunk-NYZR4XKO.js';import{normalizeContent}from'./chunk-QDOE7NWO.js';function systemToInstructions(_0x210b6b){const _0x39e37e={_0x3b4767:0x441,_0x88abe8:0x7a,_0x38f7b7:0x6f},_0x39d79a={_0x3bed55:0x387},_0x595820={_0x463555:0x148};function _0x43f893(_0x21c548,_0x3b1a75,_0x2462a6,_0x1d80d7){return _0xecda(_0x2462a6- -_0x595820._0x463555,_0x1d80d7);}function _0x5b760a(_0xd0a676,_0x40e45b,_0x2a2a1e,_0x39ab41){return _0xecda(_0x39ab41-_0x39d79a._0x3bed55,_0x40e45b);}return normalizeContent(_0x210b6b)['filter'](_0x35a499=>_0x35a499[_0x5b760a(0x43e,0x469,0x452,0x44c)]==='text')[_0x5b760a(0x44f,0x466,_0x39e37e._0x3b4767,0x44a)](_0x9ed8cf=>_0x9ed8cf['text'])[_0x43f893(-_0x39e37e._0x88abe8,-0x76,-_0x39e37e._0x38f7b7,-0x63)]('\x0a\x0a');}function pushUserContentMessage(_0x39bc54,_0x3a6a42,_0x1106da){const _0x3ae6c4={_0x501404:0x260,_0x42d710:0x28c,_0x43b42f:0x262,_0x3c38ce:0x26e,_0x3d24c6:0x275},_0x53fea7={_0x3434a6:0x191},_0x1fc3b7={_0x3ba439:0x135};function _0x1d0e85(_0x5735c0,_0x40e1ff,_0x2d53b6,_0x5f4531){return _0xecda(_0x5f4531- -_0x1fc3b7._0x3ba439,_0x40e1ff);}if(_0x1106da[_0x57554a(0x258,_0x3ae6c4._0x501404,0x297,0x277)]===0x0)return;function _0x57554a(_0x5b5ea3,_0x378b60,_0x2eae62,_0x2422e6){return _0xecda(_0x2422e6-_0x53fea7._0x3434a6,_0x5b5ea3);}_0x39bc54[_0x57554a(_0x3ae6c4._0x42d710,_0x3ae6c4._0x43b42f,_0x3ae6c4._0x3c38ce,_0x3ae6c4._0x3d24c6)]({'type':'message','role':_0x3a6a42,'content':_0x1106da});}function hasSerializableToolUse(_0xc377ce){const _0x10f3e2={_0x46c7e1:0x33b,_0x4b9aee:0x1c0,_0x5b36b0:0x1a0,_0x4325c0:0x1ac,_0x52172d:0x1a5,_0x5a4940:0x342,_0x4678aa:0x349},_0x66405={_0x99c930:0xba};function _0x1383ef(_0x12190c,_0x2c04f7,_0x123062,_0x2d5237){return _0xecda(_0x2c04f7-_0x66405._0x99c930,_0x123062);}function _0x21c5d7(_0x50b75e,_0x227d0e,_0xa6a6bc,_0x1b7a0f){return _0xecda(_0xa6a6bc-0x26a,_0x227d0e);}return _0xc377ce['id'][_0x21c5d7(_0x10f3e2._0x46c7e1,0x342,0x355,0x352)]()[_0x1383ef(_0x10f3e2._0x4b9aee,_0x10f3e2._0x5b36b0,0x1b7,0x19c)]>0x0&&_0xc377ce[_0x1383ef(0x18d,_0x10f3e2._0x4325c0,_0x10f3e2._0x52172d,0x1a4)][_0x21c5d7(0x36c,0x348,0x355,_0x10f3e2._0x5a4940)]()[_0x21c5d7(_0x10f3e2._0x4678aa,0x36b,0x350,0x36c)]>0x0;}function hasSerializableToolResult(_0x58e36d){const _0x1ce41b={_0x84e6f4:0x3d0,_0xa414c1:0x3f3,_0x164b65:0x3d3},_0xd0efdd={_0x545063:0x2fc};function _0x2596ec(_0x2eb656,_0x2f8c29,_0x21c63a,_0x596f03){return _0xecda(_0x21c63a-_0xd0efdd._0x545063,_0x596f03);}function _0x5aeb59(_0x578f73,_0x1f19c2,_0x2f36ef,_0x1e2270){return _0xecda(_0x578f73- -0x14e,_0x1f19c2);}return _0x58e36d[_0x2596ec(_0x1ce41b._0x84e6f4,_0x1ce41b._0xa414c1,0x3e9,_0x1ce41b._0x164b65)][_0x5aeb59(-0x63,-0x59,-0x80,-0x6b)]()['length']>0x0;}function isResponseInputObject(_0xadfd51){const _0x44ed93={_0x4e8e16:0x8b,_0x40705d:0x91,_0x59d9a4:0x8f,_0x190c70:0xa2,_0x8b508a:0x99,_0x12a3ba:0x90},_0x5b7e3f={_0x3ffa62:0x3b};function _0xadd93b(_0x5d859f,_0x32f418,_0x187361,_0x106ce5){return _0xecda(_0x106ce5- -0x172,_0x5d859f);}if(typeof _0xadfd51!==_0x5d0453(0x87,0x8e,0x9f,_0x44ed93._0x4e8e16)||_0xadfd51===null||Array[_0xadd93b(-0x8e,-_0x44ed93._0x40705d,-_0x44ed93._0x59d9a4,-_0x44ed93._0x190c70)](_0xadfd51))return![];const _0x8c30e9=_0xadfd51;function _0x5d0453(_0x248ece,_0x1371de,_0x16e430,_0x3d31f2){return _0xecda(_0x248ece- -_0x5b7e3f._0x3ffa62,_0x16e430);}return typeof _0x8c30e9['type']===_0x5d0453(_0x44ed93._0x8b508a,0xa6,_0x44ed93._0x12a3ba,0x8f);}function _0xecda(_0x26a807,_0x1d15e1){_0x26a807=_0x26a807-0xb3;const _0x2f955b=_0x2f95();let _0xecda1f=_0x2f955b[_0x26a807];if(_0xecda['egDJCP']===undefined){var _0x3f1b23=function(_0x4ec44d){const _0x3fa981='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x210b6b='',_0x35a499='';for(let _0x9ed8cf=0x0,_0x39bc54,_0x3a6a42,_0x1106da=0x0;_0x3a6a42=_0x4ec44d['charAt'](_0x1106da++);~_0x3a6a42&&(_0x39bc54=_0x9ed8cf%0x4?_0x39bc54*0x40+_0x3a6a42:_0x3a6a42,_0x9ed8cf++%0x4)?_0x210b6b+=String['fromCharCode'](0xff&_0x39bc54>>(-0x2*_0x9ed8cf&0x6)):0x0){_0x3a6a42=_0x3fa981['indexOf'](_0x3a6a42);}for(let _0xc377ce=0x0,_0x58e36d=_0x210b6b['length'];_0xc377ce<_0x58e36d;_0xc377ce++){_0x35a499+='%'+('00'+_0x210b6b['charCodeAt'](_0xc377ce)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x35a499);};_0xecda['AeyCqa']=_0x3f1b23,_0xecda['GfdqHO']={},_0xecda['egDJCP']=!![];}const _0x4c6c13=_0x2f955b[0x0],_0x63d4c1=_0x26a807+_0x4c6c13,_0x48d1e0=_0xecda['GfdqHO'][_0x63d4c1];return!_0x48d1e0?(_0xecda1f=_0xecda['AeyCqa'](_0xecda1f),_0xecda['GfdqHO'][_0x63d4c1]=_0xecda1f):_0xecda1f=_0x48d1e0,_0xecda1f;}function isImageToolResultBlock(_0x4958b9){const _0x346ae4={_0x5c5542:0x28a,_0x2f7b9b:0x281,_0x48e2e3:0x291,_0x34cbbf:0x273,_0x51d26a:0x28c,_0x2891cf:0x28b,_0xbc4d62:0x2ee,_0xc9984e:0x2da,_0x445bf0:0x2b7,_0x430909:0x2e8,_0x5caf69:0x2a3,_0x54dcf1:0x2c1,_0x594fd7:0x26b,_0x39f033:0x276,_0x2e9732:0x2ea,_0x51a9ad:0x2b0,_0xe0226c:0x2b2,_0x172518:0x2da,_0x5ddac1:0x2eb,_0x543f8d:0x2d7,_0x533205:0x295,_0x34624d:0x2a5,_0x26f37c:0x28f,_0x1f1e17:0x27f,_0x33ed78:0x2a6,_0xf9516b:0x29f,_0x50bdff:0x29e},_0x14004f={_0x29e921:0x39f};function _0x37d116(_0x12da82,_0x9fea80,_0x13c3c0,_0xd7dc80){return _0xecda(_0xd7dc80- -_0x14004f._0x29e921,_0x13c3c0);}function _0x50324a(_0x45fd76,_0x568a32,_0x119450,_0x3a4f98){return _0xecda(_0x3a4f98-0x1b1,_0x119450);}if(typeof _0x4958b9!==_0x50324a(_0x346ae4._0x5c5542,_0x346ae4._0x2f7b9b,_0x346ae4._0x48e2e3,_0x346ae4._0x34cbbf)||_0x4958b9===null||Array[_0x50324a(_0x346ae4._0x51d26a,0x297,_0x346ae4._0x2891cf,0x281)](_0x4958b9))return![];const _0x5ae369=_0x4958b9;return _0x5ae369[_0x37d116(-0x2bd,-_0x346ae4._0xbc4d62,-0x2c5,-_0x346ae4._0xc9984e)]===_0x37d116(-_0x346ae4._0x445bf0,-0x2df,-_0x346ae4._0x430909,-0x2c8)&&_0x5ae369[_0x37d116(-0x2b7,-0x2b1,-_0x346ae4._0x5caf69,-_0x346ae4._0x54dcf1)]?.[_0x50324a(0x27f,_0x346ae4._0x594fd7,0x257,_0x346ae4._0x39f033)]===_0x37d116(-0x307,-0x2f2,-0x2d2,-_0x346ae4._0x2e9732)&&typeof _0x5ae369[_0x37d116(-_0x346ae4._0x51a9ad,-_0x346ae4._0xe0226c,-0x2ca,-0x2c1)][_0x37d116(-0x2db,-_0x346ae4._0x172518,-0x30b,-_0x346ae4._0x5ddac1)]===_0x37d116(-0x2e0,-_0x346ae4._0x543f8d,-0x2b0,-0x2cb)&&typeof _0x5ae369[_0x50324a(_0x346ae4._0x533205,_0x346ae4._0x2f7b9b,_0x346ae4._0x34624d,_0x346ae4._0x26f37c)][_0x50324a(_0x346ae4._0x26f37c,_0x346ae4._0x1f1e17,_0x346ae4._0x33ed78,_0x346ae4._0xf9516b)]===_0x50324a(_0x346ae4._0x50bdff,_0x346ae4._0x533205,0x28f,0x285);}function getToolResultText(_0x5cc965){const _0xf4fd71={_0xe6ef31:0x181,_0x30aa02:0x198,_0x481f4a:0x18f,_0x17473d:0x197,_0x2a6739:0x18c,_0x34ae73:0x1a4,_0x55236c:0x186,_0x475e90:0x195},_0x28be32={_0x2ed130:0x224,_0x2b1754:0x24f};if(typeof _0x5cc965==='string')return _0x5cc965;function _0x574169(_0x1cf0a8,_0x23d5fc,_0x5604fa,_0xffcba3){return _0xecda(_0x5604fa-0xbe,_0x23d5fc);}function _0x3e6b65(_0x77a409,_0x5e7b54,_0x382b5b,_0xb8672c){return _0xecda(_0x382b5b-0x331,_0x77a409);}const _0x179739=_0x5cc965[_0x574169(_0xf4fd71._0xe6ef31,0x1ad,0x1a0,_0xf4fd71._0x30aa02)](_0xc4128=>{const _0x588705={_0x2c67e0:0x9f};function _0x2a8e29(_0x340db2,_0x5a67e7,_0x47dfb8,_0x477fc4){return _0x574169(_0x340db2-_0x588705._0x2c67e0,_0x477fc4,_0x340db2- -0x224,_0x477fc4-0x170);}function _0x58a5f1(_0x4a2d46,_0x3c8945,_0x3cdb80,_0x59fe7d){return _0x574169(_0x4a2d46-0x17c,_0x59fe7d,_0x3c8945-0xa8,_0x59fe7d-0x2);}return typeof _0xc4128===_0x58a5f1(0x21d,0x228,_0x28be32._0x2ed130,0x20c)&&_0xc4128!==null&&_0xc4128['type']===_0x58a5f1(0x223,0x241,0x25f,_0x28be32._0x2b1754);})[_0x574169(_0xf4fd71._0x481f4a,_0xf4fd71._0x17473d,0x181,_0xf4fd71._0x2a6739)](_0x1d1792=>_0x1d1792[_0x3e6b65(0x42b,0x413,0x40c,0x428)])[_0x574169(_0xf4fd71._0x34ae73,0x178,0x197,_0xf4fd71._0x55236c)]('\x0a\x0a')['trim']();return _0x179739['length']>0x0?_0x179739:_0x574169(_0xf4fd71._0x475e90,0x19c,0x17d,0x15f);}function getToolResultImages(_0x1f8bb4){const _0x41d722={_0x53d74d:0x207};function _0x328b7d(_0x57b84a,_0x97b147,_0x58f611,_0xaf7e1){return _0xecda(_0x58f611-0x138,_0x97b147);}return Array['isArray'](_0x1f8bb4)?_0x1f8bb4[_0x328b7d(0x20d,0x208,0x21a,_0x41d722._0x53d74d)](isImageToolResultBlock):[];}function resolveReasoningVisibility(_0x13f417){const _0x573d0e={_0x2ebc6a:0x29e,_0x26f54d:0x2a7,_0x5445f9:0x28c,_0x42a314:0x3f,_0x404c7d:0x9,_0x28301a:0x22,_0x317461:0x2d0},_0x5f48fb={_0x32d6be:0xc5};function _0x63b77f(_0x16f3a3,_0xf5da2f,_0x5c121d,_0x4e7231){return _0xecda(_0x5c121d- -0x38a,_0xf5da2f);}function _0x3ec956(_0x23a02c,_0x2a0d9a,_0x97b3b5,_0x28f170){return _0xecda(_0x28f170- -_0x5f48fb._0x32d6be,_0x97b3b5);}return _0x13f417[_0x63b77f(-_0x573d0e._0x2ebc6a,-0x293,-_0x573d0e._0x26f54d,-_0x573d0e._0x5445f9)]?.[_0x3ec956(0x27,_0x573d0e._0x42a314,_0x573d0e._0x404c7d,_0x573d0e._0x28301a)]??_0x63b77f(-0x2b8,-0x2c9,-0x2bf,-_0x573d0e._0x317461);}function _0x2f95(){const _0x2bfa42=['BwvZC2fNzxm','zMLSDgvY','CMvHC29UAw5N','ChvZAa','C3LZDgvT','BgvUz3rO','DMLZAwjPBgL0Eq','oda5n21HuKTxuq','Aw5WDxrFC2nOzw1H','C3vTBwfYEq','DhjPBq','DxnLCG','Dg9VBf91C2vFAwq','zgf0yq','mti4nZuZogX6EMrgEq','Aw5WDxrFDgv4Da','ntm0mgfirMztDW','BMfTzq','odaZme9IBvv6Da','BwvKAwfFDhLWzq','yMfZzty0','ChjVDMLKzxjtDgf0zq','BwvZC2fNzq','mtqXnMrpqLvvua','Aw5WDxrFAw1Hz2u','C3rYAwn0','mty4ywTiBLLz','sw1Hz2uGCMv0DxjUzwqGyNKGvMLLD0zPBguGzM9YihrVB2WGCMvZDwX0ia','yxv0BW','zgf0ytO','vg9VBcbYzxr1CM5LzcbPBwfNzsbJB250zw50lG','mJm4n3Phrhr1wa','Bw9KzwW','B2jQzwn0','BwfW','Dg9VBhm','DhLWzq','B3v0Chv0x3rLEhq','zNvUy3rPB25Fy2fSBa','CM9Szq','mtm4ntyWu2z1wM9J','Bwf4vg9Rzw5Z','DxnLCI12AxnPyMXL','B3v0Chv0rM9YBwf0','Aw5WDxq','A2v5CW','zwzMB3j0','AxnbCNjHEq','zNvUy3rPB25Fy2fSBf9VDxrWDxq','y29UDgvUDa','yxnZAxn0yw50','C3rYAw5N','nJHeA0P4D2q','Dg9VBf9Yzxn1Bhq','Aw1Hz2u','mZq0nJaXBxDAuuft','AM9PBG','B3bLBMfPuMvZCg9UC2vZt3v0Chv0','Dgv4Da','o2jHC2u2ncW','ndiXnJm1v1ftEefe','C291CMnL','zgvZy3jPChrPB24','CMvHC29UAw5NlMvUy3j5ChrLzf9JB250zw50'];_0x2f95=function(){return _0x2bfa42;};return _0x2f95();}function createOpenAiResponsesReasoning(_0x445cb8){const _0x2bd204={_0xd741d4:0x15d,_0x3f7ba7:0x156,_0xf8cf42:0x13a,_0x78fc88:0x146,_0x421194:0x17c,_0x4afd3f:0x18a,_0x1a8787:0x14f,_0x121e30:0x179,_0x1ed6c9:0x15a,_0x167f4a:0x48e,_0x17a96d:0x491,_0x1fb44a:0x159,_0x5c2c4f:0x495,_0x4d26db:0x48e,_0x2e74b9:0x153,_0xe24180:0x147,_0x1ab377:0x16b},_0x42fc0d={_0x46bdfc:0x239},_0x4f1a86=resolveOpenAiReasoningConfig(_0x445cb8[_0x5a8608(-_0x2bd204._0xd741d4,-_0x2bd204._0x3f7ba7,-_0x2bd204._0xf8cf42,-_0x2bd204._0x78fc88)]);if(!_0x4f1a86)return{};const _0x59c302={};function _0x5a8608(_0x56da0b,_0x4bd9b9,_0x4cdca6,_0x47a9ca){return _0xecda(_0x4bd9b9- -_0x42fc0d._0x46bdfc,_0x56da0b);}const _0x5557aa=_0x4f1a86['summary']??(resolveReasoningVisibility(_0x445cb8)===_0x5a8608(-0x152,-0x16e,-0x16e,-0x15d)?_0x5a8608(-0x193,-_0x2bd204._0x421194,-0x19c,-0x183):void 0x0);_0x4f1a86[_0x5a8608(-0x14c,-0x16a,-_0x2bd204._0x4afd3f,-_0x2bd204._0x1a8787)]&&(_0x59c302['effort']=_0x4f1a86[_0x5a8608(-_0x2bd204._0x121e30,-0x16a,-_0x2bd204._0x1ed6c9,-0x151)]);_0x5557aa&&(_0x59c302[_0x5e7a4d(_0x2bd204._0x167f4a,_0x2bd204._0x17a96d,0x49c,0x49d)]=_0x5557aa);function _0x5e7a4d(_0x2ec41f,_0x24ab7a,_0x589dfa,_0x199de2){return _0xecda(_0x199de2-0x3b3,_0x589dfa);}return{..._0x4f1a86['includeEncryptedContent']===![]?{}:{'include':[_0x5a8608(-0x144,-_0x2bd204._0x1fb44a,-0x162,-0x174)]},...Object[_0x5e7a4d(_0x2bd204._0x5c2c4f,0x48d,_0x2bd204._0x4d26db,0x481)](_0x59c302)[_0x5a8608(-0x155,-_0x2bd204._0x2e74b9,-_0x2bd204._0xe24180,-_0x2bd204._0x1ab377)]>0x0?{'reasoning':_0x59c302}:{}};}function pushAssistantProviderState(_0x17a7da,_0x8f2e9){const _0x15dbad={_0x10d516:0x2ba,_0x135ee8:0x2c8,_0x4bb42f:0x2d9,_0x3427ea:0x2aa,_0x2f5b2a:0x1b6,_0xf7ea04:0x1a6,_0x1b5e99:0x1b9,_0x2d7f9d:0x1c2,_0x16d18c:0x1c0,_0x5a8f92:0x1c3,_0x5749a7:0x1a1};if(_0x8f2e9['role']!==_0x5f4fd8(0x1af,0x1c8,0x1a4,0x1ae))return![];const _0x2ba94b=_0x8f2e9[_0x5d95f5(-_0x15dbad._0x10d516,-_0x15dbad._0x135ee8,-_0x15dbad._0x4bb42f,-_0x15dbad._0x3427ea)]?.[_0x5f4fd8(_0x15dbad._0x2f5b2a,0x1c4,_0x15dbad._0xf7ea04,_0x15dbad._0x1b5e99)]??[];if(_0x2ba94b[_0x5f4fd8(_0x15dbad._0x2d7f9d,0x1d4,0x1b3,0x1ae)]===0x0)return![];for(const _0xc6480f of _0x2ba94b){isResponseInputObject(_0xc6480f)&&_0x17a7da[_0x5f4fd8(_0x15dbad._0x16d18c,_0x15dbad._0x5a8f92,_0x15dbad._0x5749a7,0x1c0)](structuredClone(_0xc6480f));}function _0x5f4fd8(_0x28dcca,_0x409129,_0x2073fb,_0x1eb010){return _0xecda(_0x28dcca-0xdc,_0x1eb010);}function _0x5d95f5(_0x2df20a,_0x4fd37b,_0x578823,_0x4005ab){return _0xecda(_0x2df20a- -0x370,_0x4fd37b);}return!![];}function toOpenAiResponsesRequest(_0x295eda){const _0x48c1c2={_0x473217:0xcc,_0x31406b:0xb2,_0x137f27:0x67,_0x32f07c:0x5f,_0x1f724b:0x7b,_0x384978:0x7e,_0x2270ca:0x9b,_0x20ee6:0x83,_0x4c1d26:0x63,_0x3c5d55:0xc6,_0x592e15:0xad,_0xacffd3:0xaf,_0x3df5d2:0x61,_0x4ad9ff:0xa8,_0x7a8558:0x5a,_0x21b4af:0x4f,_0x2dc532:0x5f,_0x3412c3:0x6c,_0x1d4883:0xcb,_0x398b71:0x37,_0x29610a:0x53,_0x238297:0x38,_0x1fc014:0xbf,_0x3163b4:0x54,_0x214901:0x2f,_0x527dcf:0xc1,_0x5694de:0xc3,_0x3d3282:0x66,_0x2691fa:0x62,_0x3ccdf4:0x42,_0xf27705:0x45,_0x154e40:0x92,_0x4e5f1e:0xae,_0x164848:0xa1,_0x241fd8:0x65,_0x3ffef1:0x70,_0x10236d:0x67,_0x4af021:0x75,_0x7dd418:0x9a,_0x54e795:0xb8,_0x5b6116:0x8c,_0xfb408a:0xb3,_0x44367e:0xcd,_0x1573b0:0xeb,_0x496d94:0x9e,_0x1e32c0:0xbd,_0x2558c6:0xbc,_0x3f7579:0x7b,_0x22a9ed:0x43,_0x2a72e6:0x5c,_0x394c21:0x56,_0x1fb711:0x4c,_0x4d1c47:0x5d,_0x1fd447:0x5c,_0x27ec67:0x5b,_0xa45e7a:0xcc,_0x4be8b4:0xbe,_0x1a0fb3:0x52,_0x1ca4bf:0x71,_0x480489:0xab,_0x274af5:0xaa,_0x4edec9:0x9f,_0xea832f:0x84,_0x325ac4:0x66,_0x1f7978:0x94,_0x5999ec:0xd4,_0x3253e3:0xd9,_0x220750:0xb3,_0x13ce53:0x57,_0x360130:0x34,_0x4738f8:0x54},_0x4d5daf={_0x19faba:0x414,_0x5b311f:0x406,_0x3e1ca9:0x88,_0x5ddfca:0xa3},_0x4d0dbc={_0x1fbc16:0x66},_0x49ee19={_0x4d5110:0x19},_0x4aa7bd=[];function _0x4fd43a(_0x2b5df4,_0x1dbf99,_0x107a24,_0x35942a){return _0xecda(_0x1dbf99- -_0x49ee19._0x4d5110,_0x2b5df4);}function _0x3b29b5(_0x2adc0c,_0x4cc896,_0x151257,_0x162625){return _0xecda(_0x151257- -_0x4d0dbc._0x1fbc16,_0x2adc0c);}for(const _0xbe52ff of _0x295eda[_0x4fd43a(_0x48c1c2._0x473217,0xc8,_0x48c1c2._0x31406b,0xd1)]){if(pushAssistantProviderState(_0x4aa7bd,_0xbe52ff))continue;const _0x2acc2c=[];for(const _0x1e7464 of normalizeContent(_0xbe52ff['content'])){if(_0x1e7464[_0x3b29b5(0x6f,_0x48c1c2._0x137f27,_0x48c1c2._0x32f07c,_0x48c1c2._0x1f724b)]==='text'){_0x2acc2c[_0x3b29b5(0x75,0x87,_0x48c1c2._0x384978,_0x48c1c2._0x2270ca)](_0xbe52ff[_0x3b29b5(0x66,0x62,0x62,0x69)]===_0x3b29b5(0x8a,_0x48c1c2._0x20ee6,0x6d,_0x48c1c2._0x4c1d26)?{'type':_0x4fd43a(_0x48c1c2._0x3c5d55,_0x48c1c2._0x592e15,0xaf,_0x48c1c2._0xacffd3),'text':_0x1e7464[_0x3b29b5(_0x48c1c2._0x3df5d2,0x79,0x75,0x6d)]}:{'type':_0x3b29b5(_0x48c1c2._0x4ad9ff,0x9f,0x8a,0x7f),'text':_0x1e7464[_0x3b29b5(_0x48c1c2._0x7a8558,0x65,0x75,0x7e)]});continue;}if(_0x1e7464[_0x3b29b5(_0x48c1c2._0x21b4af,0x70,_0x48c1c2._0x2dc532,_0x48c1c2._0x3412c3)]==='image'){_0x2acc2c[_0x4fd43a(0xc5,_0x48c1c2._0x1d4883,0xc1,0xea)]({'type':_0x3b29b5(0x6f,_0x48c1c2._0x398b71,_0x48c1c2._0x29610a,_0x48c1c2._0x238297),'image_url':_0x4fd43a(0xaf,0xa5,_0x48c1c2._0x1fc014,0x95)+_0x1e7464[_0x3b29b5(0x95,0x6b,0x78,0x8e)][_0x3b29b5(_0x48c1c2._0x3163b4,_0x48c1c2._0x214901,0x4e,0x4b)]+_0x4fd43a(_0x48c1c2._0x527dcf,_0x48c1c2._0x5694de,0xb4,0xc6)+_0x1e7464['source']['data']});continue;}pushUserContentMessage(_0x4aa7bd,_0xbe52ff[_0x3b29b5(_0x48c1c2._0x3d3282,0x48,_0x48c1c2._0x2691fa,0x50)],_0x2acc2c['splice'](0x0));if(_0x1e7464[_0x3b29b5(0x67,_0x48c1c2._0x3ccdf4,0x5f,_0x48c1c2._0xf27705)]==='tool_use'){if(!hasSerializableToolUse(_0x1e7464))continue;_0x4aa7bd[_0x3b29b5(0x74,0x6c,0x7e,_0x48c1c2._0x384978)]({'type':_0x4fd43a(_0x48c1c2._0x154e40,_0x48c1c2._0x4e5f1e,0x93,_0x48c1c2._0x164848),'call_id':_0x1e7464['id'],'name':_0x1e7464['name'],'arguments':JSON['stringify'](_0x1e7464[_0x3b29b5(_0x48c1c2._0x241fd8,_0x48c1c2._0x3ffef1,_0x48c1c2._0x10236d,0x49)]??{})});continue;}if(_0x1e7464['type']===_0x4fd43a(0xa0,0xbd,0xac,0xb3)){if(!hasSerializableToolResult(_0x1e7464))continue;const _0x161240=getToolResultText(_0x1e7464[_0x3b29b5(0x65,0x87,0x6c,_0x48c1c2._0x4af021)]);_0x4aa7bd[_0x3b29b5(0x94,0x9c,0x7e,0x86)]({'type':_0x4fd43a(_0x48c1c2._0x7dd418,_0x48c1c2._0x54e795,0xc0,0xab),'call_id':_0x1e7464['tool_use_id'],'output':_0x161240});const _0x4b81ee=getToolResultImages(_0x1e7464[_0x3b29b5(_0x48c1c2._0x5b6116,0x72,0x6c,0x65)]);_0x4b81ee[_0x4fd43a(_0x48c1c2._0xfb408a,_0x48c1c2._0x44367e,0xb6,0xc3)]>0x0&&_0x4aa7bd[_0x4fd43a(_0x48c1c2._0x1573b0,_0x48c1c2._0x1d4883,0xc3,0xd3)]({'type':_0x4fd43a(0xab,_0x48c1c2._0x496d94,0x9d,_0x48c1c2._0x1e32c0),'role':_0x4fd43a(0xda,0xd3,_0x48c1c2._0x2558c6,0xcf),'content':[{'type':_0x3b29b5(0x9c,0xa5,0x8a,_0x48c1c2._0x3f7579),'text':_0x3b29b5(_0x48c1c2._0x22a9ed,_0x48c1c2._0x2a72e6,_0x48c1c2._0x394c21,0x56)+_0x1e7464['tool_use_id']+'.'},..._0x4b81ee[_0x3b29b5(_0x48c1c2._0x1fb711,_0x48c1c2._0x32f07c,_0x48c1c2._0x4d1c47,0x5f)](_0x5b3577=>({'type':'input_image','image_url':'data:'+_0x5b3577['source'][_0x3b29b5(0x60,0x30,0x4e,0x51)]+_0x4fd43a(0xba,0xc3,0xcb,0xcd)+_0x5b3577[_0x4fd43a(0xe5,0xc5,0xc2,0xd8)][_0x4fd43a(0xec,0xd5,0xb9,0xb5)]}))]});}}pushUserContentMessage(_0x4aa7bd,_0xbe52ff['role'],_0x2acc2c);}return{...createOpenAiResponsesReasoning(_0x295eda),'model':_0x295eda[_0x3b29b5(0x3c,_0x48c1c2._0x1fd447,_0x48c1c2._0x27ec67,0x50)],'instructions':systemToInstructions(_0x295eda[_0x4fd43a(_0x48c1c2._0x1d4883,_0x48c1c2._0xa45e7a,0xbb,_0x48c1c2._0x4be8b4)]),'input':_0x4aa7bd,'max_output_tokens':_0x295eda[_0x3b29b5(_0x48c1c2._0x1a0fb3,0x7e,0x64,_0x48c1c2._0x1ca4bf)],'tools':_0x295eda[_0x4fd43a(0xbf,_0x48c1c2._0x480489,_0x48c1c2._0x274af5,_0x48c1c2._0x4edec9)]['map'](_0x34357a=>{const _0x362df4={_0x56c8a8:0x1},_0x4e5ee1={_0x335b19:0x4e,_0xbb0e0e:0x38d,_0x30a26e:0x89};function _0x203f99(_0x347664,_0x49b67b,_0x492536,_0x258244){return _0x3b29b5(_0x49b67b,_0x49b67b-_0x4e5ee1._0x335b19,_0x258244-_0x4e5ee1._0xbb0e0e,_0x258244-_0x4e5ee1._0x30a26e);}function _0x2f3b28(_0x2e44dc,_0x40932b,_0x22a4bb,_0x5282bd){return _0x3b29b5(_0x40932b,_0x40932b-0xcd,_0x5282bd-0x20,_0x5282bd-_0x362df4._0x56c8a8);}return{'type':'function','name':_0x34357a['name'],'description':_0x34357a[_0x203f99(0x413,_0x4d5daf._0x19faba,0x410,_0x4d5daf._0x5b311f)],'parameters':_0x34357a[_0x2f3b28(0xa4,0xb4,_0x4d5daf._0x3e1ca9,_0x4d5daf._0x5ddfca)]};}),..._0x295eda[_0x3b29b5(_0x48c1c2._0xea832f,_0x48c1c2._0x1a0fb3,_0x48c1c2._0x325ac4,0x6c)]?{'text':{'format':{'type':'json_schema','name':_0x295eda[_0x4fd43a(_0x48c1c2._0x527dcf,0xb3,_0x48c1c2._0x1f7978,0xab)][_0x4fd43a(_0x48c1c2._0x5999ec,_0x48c1c2._0x3253e3,0xcc,0xc7)]??'structured_output','schema':_0x295eda[_0x4fd43a(0xb1,_0x48c1c2._0x220750,0xa9,0xa7)]['schema'],'strict':_0x295eda[_0x3b29b5(_0x48c1c2._0x13ce53,0x4c,0x66,0x60)][_0x3b29b5(0x50,_0x48c1c2._0x360130,_0x48c1c2._0x4738f8,0x39)]??!![]}}}:{}};}export{toOpenAiResponsesRequest};
|
package/dist/chunk-NYZR4XKO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5dc2fb,_0x1c12ce){var _0x4afb9a={_0x747dca:0x5e,_0x105f50:0x66,_0x2713d0:0x65,_0x3ea8f3:0x5f,_0x1b4e8c:0x481,_0x5e167b:0x478,_0x327593:0x47a,_0x349d74:0x56,_0x2d198b:0x46b,_0x2fbe0f:0x473,_0x568faa:0x473,_0x1f65c6:0x5f,_0x3cdf21:0x62,_0x46e23c:0x5f,_0x35d229:0x5d,_0x49c204:0x64,_0x42fc5a:0x64,_0x14a673:0x47f,_0x6ce31b:0x487,_0x35d938:0x47a,_0x3a2cf2:0x481,_0x57ee06:0x47b,_0x226f96:0x477,_0x38ca1c:0x47d},_0x266eb5={_0x4febf4:0x1fc},_0x483568={_0x3fa80b:0x2dd},_0x27700d=_0x5dc2fb();function _0x55cfb8(_0x3d2d96,_0x1fc4fe,_0x33826d,_0x4ef9f3){return _0x5da9(_0x4ef9f3-_0x483568._0x3fa80b,_0x3d2d96);}function _0x79468e(_0x368529,_0x46cfa3,_0x470fb2,_0xb98670){return _0x5da9(_0x470fb2- -_0x266eb5._0x4febf4,_0x368529);}while(!![]){try{var _0x1a1008=-parseInt(_0x79468e(-0x57,-0x63,-0x5e,-_0x4afb9a._0x747dca))/0x1+-parseInt(_0x79468e(-0x6f,-0x62,-0x67,-0x6c))/0x2+-parseInt(_0x79468e(-_0x4afb9a._0x105f50,-0x64,-_0x4afb9a._0x2713d0,-_0x4afb9a._0x3ea8f3))/0x3*(parseInt(_0x55cfb8(0x47d,_0x4afb9a._0x1b4e8c,_0x4afb9a._0x1b4e8c,0x479))/0x4)+parseInt(_0x55cfb8(0x475,_0x4afb9a._0x5e167b,0x47b,_0x4afb9a._0x327593))/0x5+parseInt(_0x79468e(-_0x4afb9a._0x349d74,-0x5b,-0x5d,-0x57))/0x6*(-parseInt(_0x55cfb8(0x474,_0x4afb9a._0x2d198b,_0x4afb9a._0x2fbe0f,_0x4afb9a._0x568faa))/0x7)+-parseInt(_0x79468e(-_0x4afb9a._0x1f65c6,-_0x4afb9a._0x3cdf21,-0x5b,-_0x4afb9a._0x46e23c))/0x8*(-parseInt(_0x79468e(-_0x4afb9a._0x35d229,-_0x4afb9a._0x49c204,-_0x4afb9a._0x42fc5a,-0x69))/0x9)+-parseInt(_0x55cfb8(_0x4afb9a._0x14a673,_0x4afb9a._0x6ce31b,_0x4afb9a._0x35d938,_0x4afb9a._0x3a2cf2))/0xa*(-parseInt(_0x55cfb8(_0x4afb9a._0x57ee06,0x483,_0x4afb9a._0x226f96,_0x4afb9a._0x38ca1c))/0xb);if(_0x1a1008===_0x1c12ce)break;else _0x27700d['push'](_0x27700d['shift']());}catch(_0x5a715e){_0x27700d['push'](_0x27700d['shift']());}}}(_0x1b6c,0x688b5));var ANTHROPIC_AUTO_BUDGET_TOKENS={'low':0x400,'medium':0x800,'high':0x1000};function mapAutoReasoningEffortToBudgetTokens(_0x2215cb){return ANTHROPIC_AUTO_BUDGET_TOKENS[_0x2215cb];}function resolveAnthropicThinkingConfig(_0x4e8e28){var _0x56b1d1={_0x22ad71:0x4b1,_0x2f47dc:0x4ad,_0x253c45:0x4a6,_0x3fe7c3:0x4b5,_0x4c2be0:0x4b4,_0x15bd10:0x4ae,_0x30d558:0x3ac,_0x331dd6:0x3a5,_0x26543e:0x39d,_0x4a76e2:0x39f,_0x1854b2:0x395};if(!_0x4e8e28)return void 0x0;if(_0x4e8e28[_0x5659d1(_0x56b1d1._0x22ad71,0x4b2,0x4ad,0x4a9)])return structuredClone(_0x4e8e28[_0x5659d1(0x4b5,0x4a9,_0x56b1d1._0x2f47dc,_0x56b1d1._0x253c45)]);function _0x5659d1(_0xc74be6,_0x3bc321,_0x263532,_0x9b987f){return _0x5da9(_0x263532-0x312,_0xc74be6);}if(!_0x4e8e28[_0x5659d1(0x4bb,0x4bd,0x4b5,0x4b0)])return void 0x0;function _0x25f3a6(_0x10f2fe,_0x3c6811,_0x2f44ee,_0x33b9a9){return _0x5da9(_0x10f2fe-0x204,_0x3c6811);}return{'type':_0x5659d1(_0x56b1d1._0x3fe7c3,_0x56b1d1._0x4c2be0,0x4b4,_0x56b1d1._0x15bd10),'budgetTokens':mapAutoReasoningEffortToBudgetTokens(_0x4e8e28[_0x25f3a6(0x3a7,0x3ad,_0x56b1d1._0x30d558,_0x56b1d1._0x331dd6)][_0x25f3a6(_0x56b1d1._0x26543e,_0x56b1d1._0x4a76e2,_0x56b1d1._0x1854b2,0x3a0)])};}function resolveOpenAiReasoningConfig(_0x48fa80){var _0x532604={_0x1fe167:0x535,_0x4b67b3:0x275,_0x504f5f:0x52b,_0x43db8c:0x271};if(!_0x48fa80)return void 0x0;const _0x11df40=_0x48fa80[_0x31958b(0x531,0x532,0x539,_0x532604._0x1fe167)]?{'effort':_0x48fa80[_0x24a056(0x271,_0x532604._0x4b67b3,0x276,0x270)][_0x31958b(0x523,0x531,0x52f,_0x532604._0x504f5f)]}:void 0x0;if(!_0x48fa80['openai'])return _0x11df40;function _0x24a056(_0x1c5b94,_0x5a2b08,_0x277925,_0xc676bc){return _0x5da9(_0x5a2b08-0xd2,_0x277925);}function _0x31958b(_0xeffeba,_0x29c6e4,_0x563f69,_0x137bca){return _0x5da9(_0x137bca-0x392,_0x29c6e4);}return{..._0x11df40??{},...structuredClone(_0x48fa80[_0x24a056(0x269,0x26c,_0x532604._0x43db8c,0x26d)])};}function _0x5da9(_0x5b411e,_0x62bc54){_0x5b411e=_0x5b411e-0x195;var _0x1b6c89=_0x1b6c();var _0x5da999=_0x1b6c89[_0x5b411e];if(_0x5da9['RYoIQV']===undefined){var _0x321e42=function(_0x37668a){var _0x5c9dfc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x2215cb='',_0x4e8e28='';for(var _0x48fa80=0x0,_0x11df40,_0x22c8ea,_0x268118=0x0;_0x22c8ea=_0x37668a['charAt'](_0x268118++);~_0x22c8ea&&(_0x11df40=_0x48fa80%0x4?_0x11df40*0x40+_0x22c8ea:_0x22c8ea,_0x48fa80++%0x4)?_0x2215cb+=String['fromCharCode'](0xff&_0x11df40>>(-0x2*_0x48fa80&0x6)):0x0){_0x22c8ea=_0x5c9dfc['indexOf'](_0x22c8ea);}for(var _0x18517e=0x0,_0x297aad=_0x2215cb['length'];_0x18517e<_0x297aad;_0x18517e++){_0x4e8e28+='%'+('00'+_0x2215cb['charCodeAt'](_0x18517e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4e8e28);};_0x5da9['lQFWxM']=_0x321e42,_0x5da9['eQlvvb']={},_0x5da9['RYoIQV']=!![];}var _0x393a6a=_0x1b6c89[0x0],_0x140ae3=_0x5b411e+_0x393a6a,_0x9ca7c2=_0x5da9['eQlvvb'][_0x140ae3];return!_0x9ca7c2?(_0x5da999=_0x5da9['lQFWxM'](_0x5da999),_0x5da9['eQlvvb'][_0x140ae3]=_0x5da999):_0x5da999=_0x9ca7c2,_0x5da999;}function _0x1b6c(){var _0x19dd8c=['mtjPsuruq0i','mtf3wvHjs3a','oeHNAwjftq','zw5HyMXLza','yxv0BW','mtmYmda0mZbcENjQyLG','odm5nty2vNzdve9I','mtiYmJyXm1zvwwjota','mZm0ntK5swfzEgfA','mZeWnJu4nefNswncBq','zwzMB3j0','B3bLBMfP','yw50AhjVCgLJ','nfHSvNDOwa','mJi4ndK5nwzqAhHYAW','odeZmZCXtNfdtevl'];_0x1b6c=function(){return _0x19dd8c;};return _0x1b6c();}export{mapAutoReasoningEffortToBudgetTokens,resolveAnthropicThinkingConfig,resolveOpenAiReasoningConfig};
|
package/dist/chunk-QDOE7NWO.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x116a59,_0x2baea8){const _0x3c7562={_0x1252dd:0x86,_0x4ce8d6:0x77,_0x57db83:0x2d,_0x4e77cf:0x273,_0xed4bf9:0x264,_0x4459a9:0x240,_0x49d9f1:0x23b,_0x20da48:0x23c,_0x30da39:0x257,_0x1b26c2:0x8f,_0x5b594d:0x83,_0x3c660e:0x6e,_0x23b373:0x78,_0x5d92aa:0x5b,_0x19f12b:0x4b,_0x36b2e7:0x251,_0x116703:0x236,_0x486d82:0x25c},_0x59c1c0={_0x2c6a3e:0x44};function _0x1adcb2(_0x4d466a,_0xebc98b,_0x350f9f,_0x533f16){return _0x3a4e(_0x350f9f-_0x59c1c0._0x2c6a3e,_0x4d466a);}const _0x350678=_0x116a59();function _0x52c264(_0x1ffa26,_0x113522,_0x56722e,_0x239469){return _0x3a4e(_0x239469- -0x25d,_0x1ffa26);}while(!![]){try{const _0x2605e2=parseInt(_0x52c264(-0x74,-_0x3c7562._0x1252dd,-0x61,-_0x3c7562._0x4ce8d6))/0x1*(parseInt(_0x52c264(-0x38,-0x3a,-_0x3c7562._0x57db83,-0x49))/0x2)+parseInt(_0x1adcb2(_0x3c7562._0x4e77cf,0x26d,0x261,_0x3c7562._0xed4bf9))/0x3+-parseInt(_0x1adcb2(0x235,_0x3c7562._0x4459a9,0x23d,0x243))/0x4*(parseInt(_0x1adcb2(_0x3c7562._0x49d9f1,0x22f,0x23a,0x220))/0x5)+parseInt(_0x1adcb2(_0x3c7562._0x20da48,0x23b,_0x3c7562._0x30da39,0x272))/0x6+parseInt(_0x52c264(-_0x3c7562._0x1b26c2,-_0x3c7562._0x5b594d,-_0x3c7562._0x3c660e,-_0x3c7562._0x23b373))/0x7+-parseInt(_0x52c264(-_0x3c7562._0x5d92aa,-0x49,-0x3e,-_0x3c7562._0x19f12b))/0x8+parseInt(_0x1adcb2(_0x3c7562._0x36b2e7,_0x3c7562._0x116703,0x251,_0x3c7562._0x486d82))/0x9;if(_0x2605e2===_0x2baea8)break;else _0x350678['push'](_0x350678['shift']());}catch(_0x17a223){_0x350678['push'](_0x350678['shift']());}}}(_0x4570,0x4a060));function _0x5c18a3(_0x548e7f,_0x4c23d3,_0x5a4806,_0xbb7d50){return _0x3a4e(_0x5a4806-0x330,_0xbb7d50);}function createTextBlock(_0x2fa9a8){const _0xe31308={_0x5715b7:0x51f},_0x1f6331={_0x550941:0x338};function _0x4867b3(_0x33e155,_0x36688c,_0x268a6d,_0x124a36){return _0x3a4e(_0x268a6d-_0x1f6331._0x550941,_0x33e155);}return{'type':_0x4867b3(_0xe31308._0x5715b7,0x558,0x53c,0x521),'text':_0x2fa9a8};}function normalizeTextBlock(_0x27098c){const _0x40121a={_0x51361a:0xef},_0x3b77be={_0x521036:0x10e};function _0x32abe3(_0x57c991,_0x48e893,_0x6a59ff,_0x350b64){return _0x3a4e(_0x350b64- -_0x3b77be._0x521036,_0x57c991);}return createTextBlock(_0x27098c[_0x32abe3(0xf4,_0x40121a._0x51361a,0xf2,0xf6)]??'');}function _0x4570(){const _0x6ebb81=['AgfZ','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','vg9VBcbLEgvJDxrPB24GD2fZigLUDgvYCNvWDgvKigjLzM9YzsbJB21WBgv0Aw9UigfUzcbWCM9KDwnLzcbUBYbYzxn1BhqU','B3bLBMfPx3jLyxnVBMLUzW','AM9PBG','zMLSDgvY','DhvYBL9Pza','mJC5mZK2mg5dCKz0Ba','yxnZAxn0yw50','khjLzgfJDgvKihjLyxnVBMLUzYK','DhvYBKLK','Dg9VBf91C2u','mZi3nJiYnfPWsMDRsG','mtaXmdGYz2TgAwzs','nMLRzgPQta','BgvUz3rO','B3v0Chv0x3rVA2vUCW','Bwf4vg9Rzw5Z','DxnHz2u','BwvZC2fNzxm','BwfW','AxnbCNjHEq','zMXHDe1HCa','nJa1nZi0teX4vwDj','DhjPBq','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','mty4mdK3m3DoDeXAtq','mtuWntKZDNneuNvc','Aw5WDxrFDg9Rzw5Z','B3v0Chv0','DxnLCG','C3rVCf9YzwfZB24','B3v0Chv0vg9Rzw5Z','B3v0Chv0rM9YBwf0','Bwv0ywrHDge','C3LZDgvT','Bw9KzwW','CMvHC29UAw5Nx3rVA2vUCW','C3rVCfjLyxnVBG','CM9Szq','Dg9VBf9Yzxn1Bhq','ChjVDMLKzxjtDgf0zq','zw5JCNLWDgvKq29UDgvUDa','nta4mZG1DNDPwwDL','Dg9VBhm','y29UDgvUDa','mJbpBM9nqui','CMvHC29UAw5N','yw50AhjVCgLJx3rOAw5RAw5N','DgHPBMTPBMC','ywrK','ChvZAa','Bwf4x3rVA2vUCW','C3rHDhvZ','C2vZC2LVBKLK','y2fSBeLK','C3rYAw5N','Dgv4Da','DhLWzq'];_0x4570=function(){return _0x6ebb81;};return _0x4570();}function normalizeContent(_0x20a715){const _0x311b78={_0x4631e2:0xaf,_0x37f366:0x9c,_0x76e0d1:0xa2,_0x1a9f2c:0x60,_0x3824d9:0x8c,_0x2a0f2c:0x68,_0x190e0d:0x6e,_0x4cbe9d:0x50},_0x117ebc={_0x530de7:0xcc,_0x5d3fdf:0xbc,_0x145411:0xac,_0x10b6da:0xbd,_0x3976e4:0xc9},_0x1bc066={_0x52810f:0x196},_0x2fd6ce={_0x59902f:0x1d,_0x407e70:0x18b,_0x31ef32:0x115},_0x537d7c={_0x36e76a:0x161};if(typeof _0x20a715===_0x3b5a6d(0xb4,_0x311b78._0x4631e2,_0x311b78._0x37f366,_0x311b78._0x76e0d1))return[createTextBlock(_0x20a715)];if(!Array[_0x2647aa(_0x311b78._0x1a9f2c,_0x311b78._0x3824d9,0x6f,0x6d)](_0x20a715))return[];function _0x2647aa(_0x40c9a2,_0x18a781,_0x2608a9,_0x28ab9a){return _0x3a4e(_0x2608a9- -0x1ac,_0x28ab9a);}function _0x3b5a6d(_0x5865fc,_0x2a105d,_0x6c1136,_0xa17088){return _0x3a4e(_0xa17088- -_0x537d7c._0x36e76a,_0x2a105d);}return _0x20a715[_0x2647aa(_0x311b78._0x1a9f2c,_0x311b78._0x2a0f2c,_0x311b78._0x190e0d,_0x311b78._0x4cbe9d)](_0x20669c=>{function _0x35f75(_0x17e0a,_0x2f927a,_0x123539,_0x410927){return _0x2647aa(_0x17e0a-_0x2fd6ce._0x59902f,_0x2f927a-_0x2fd6ce._0x407e70,_0x2f927a- -_0x2fd6ce._0x31ef32,_0x123539);}if(_0x20669c[_0x35f75(-_0x117ebc._0x530de7,-_0x117ebc._0x5d3fdf,-0xaf,-0xb9)]===_0x35f75(-_0x117ebc._0x145411,-_0x117ebc._0x10b6da,-_0x117ebc._0x3976e4,-0xbc))return normalizeTextBlock(_0x20669c);function _0x4fc791(_0x58c106,_0x449045,_0x168cf2,_0x8f4c7a){return _0x3b5a6d(_0x58c106-0x45,_0x449045,_0x168cf2-0x184,_0x8f4c7a- -_0x1bc066._0x52810f);}return structuredClone(_0x20669c);});}function normalizeSystem(_0x4916f4=[]){const _0x15db0f={_0x53b8ef:0x3a7,_0x1cb05d:0x395},_0x20e941={_0x53f99c:0x19c};function _0x41d85f(_0x59b414,_0x55e421,_0x42d4a5,_0x57c714){return _0x3a4e(_0x55e421-_0x20e941._0x53f99c,_0x59b414);}function _0x34d7b2(_0x5ae5b3,_0x3746d7,_0x5a3781,_0x494117){return _0x3a4e(_0x494117- -0x1a7,_0x5a3781);}return normalizeContent(_0x4916f4)[_0x41d85f(0x3bb,_0x15db0f._0x53b8ef,0x3ab,_0x15db0f._0x1cb05d)](_0x1ee3fa=>_0x1ee3fa[_0x34d7b2(0x54,0x7a,0x6f,0x5e)]===_0x34d7b2(0x76,0x64,0x5a,0x5d));}function normalizeMessage(_0x3ac5b9){const _0x5f4ec6={_0x5f4b28:0x273,_0x5a63f2:0x265,_0x3e582d:0x346};function _0x4df136(_0x2fbacb,_0x647e88,_0x3aa95a,_0x3db7c8){return _0x3a4e(_0x647e88-0x73,_0x3db7c8);}function _0x2bb215(_0x118cec,_0x377707,_0x3bb24a,_0x468db6){return _0x3a4e(_0x118cec-0x13d,_0x468db6);}return{...typeof _0x3ac5b9['id']==='string'?{'id':_0x3ac5b9['id']}:{},'role':_0x3ac5b9[_0x4df136(_0x5f4ec6._0x5f4b28,_0x5f4ec6._0x5a63f2,0x27a,0x24e)],'content':normalizeContent(_0x3ac5b9['content']),..._0x3ac5b9[_0x2bb215(0x331,0x319,_0x5f4ec6._0x3e582d,_0x5f4ec6._0x3e582d)]?{'providerState':structuredClone(_0x3ac5b9['providerState'])}:{}};}function compileRequest(_0x4708e9){const _0x5279d6={_0x581b16:0x4f0,_0xf2ef4e:0x4e7,_0x58aec9:0x23,_0x100f32:0x4fb,_0x132190:0x4de,_0x1ecdef:0x50c,_0x5e42f4:0xd,_0x1c6de1:0xf,_0x45f0f7:0x52d,_0x37efa0:0x503,_0x33ba1c:0x18,_0x4e151e:0xd,_0x593c23:0x25},_0x14ffcc={_0x53418a:0x301},_0x347cd6={_0xb7134:0x1f7};function _0x165713(_0x538974,_0x5d4e32,_0x2690af,_0x7b4100){return _0x3a4e(_0x2690af- -_0x347cd6._0xb7134,_0x7b4100);}function _0x1422b5(_0x67990c,_0x48688f,_0x24fd9c,_0x308e1a){return _0x3a4e(_0x48688f-_0x14ffcc._0x53418a,_0x24fd9c);}return{'model':_0x4708e9[_0x1422b5(0x4dc,_0x5279d6._0x581b16,0x4e8,_0x5279d6._0xf2ef4e)]??_0x165713(0x2c,0x21,0x28,0xc),'max_tokens':_0x4708e9[_0x165713(_0x5279d6._0x58aec9,0x6,0x8,0x0)]??0x400,..._0x4708e9[_0x1422b5(0x4f2,_0x5279d6._0x100f32,_0x5279d6._0x132190,0x506)]?{'reasoning':structuredClone(_0x4708e9[_0x1422b5(0x4f4,0x4fb,_0x5279d6._0x132190,_0x5279d6._0x1ecdef)])}:{},'system':normalizeSystem(_0x4708e9[_0x165713(-_0x5279d6._0x5e42f4,0xc,-0x9,_0x5279d6._0x1c6de1)]),'messages':_0x4708e9[_0x1422b5(_0x5279d6._0x45f0f7,0x51a,_0x5279d6._0x37efa0,0x50a)]['map'](normalizeMessage),'tools':structuredClone(_0x4708e9[_0x165713(-_0x5279d6._0x33ba1c,0x5,0x0,-0xf)]??[]),'metadata':{'session_id':_0x4708e9[_0x165713(-_0x5279d6._0x4e151e,_0x5279d6._0x593c23,0xa,0xd)],'turn_id':_0x4708e9['turnId']}};}function toChatRequest(_0xf7542d){const _0x3fdaae={_0x358d1a:0x3da,_0x183e23:0x3e1,_0xaf6a8a:0x3df,_0x2aff0a:0x44a,_0x3c0e03:0x448,_0x5b1f63:0x3f3,_0x31d966:0x3cb,_0x185dc3:0x3e1,_0x318eff:0x3e5,_0x55aadf:0x3d5,_0x2b667a:0x3ec,_0xcf20e8:0x3ea,_0x494687:0x3ee,_0x2c9993:0x45c,_0x537003:0x46c,_0x14d986:0x462,_0x200be4:0x44d,_0x2c9c99:0x43b,_0x47f154:0x42e,_0x47358d:0x431,_0x55b39:0x436,_0x19096b:0x438,_0x292235:0x455,_0x5ef3da:0x427,_0x2d25d6:0x41e},_0x247fdd={_0x165895:0x249},_0x1ccde4={_0x1bff5d:0x1eb};function _0x195e71(_0x5b4ea1,_0xa8131b,_0x17aa3a,_0x3831a1){return _0x3a4e(_0x5b4ea1-_0x1ccde4._0x1bff5d,_0x3831a1);}function _0x35fefa(_0x320307,_0x5f1581,_0x9e9c95,_0x7b8a4e){return _0x3a4e(_0x7b8a4e-_0x247fdd._0x165895,_0x9e9c95);}return{'model':_0xf7542d[_0x195e71(_0x3fdaae._0x358d1a,_0x3fdaae._0x183e23,0x3d0,_0x3fdaae._0xaf6a8a)],'maxTokens':_0xf7542d[_0x35fefa(0x44f,0x461,_0x3fdaae._0x2aff0a,_0x3fdaae._0x3c0e03)],..._0xf7542d[_0x195e71(0x3e5,_0x3fdaae._0x5b1f63,_0x3fdaae._0x31d966,_0x3fdaae._0x185dc3)]?{'reasoning':structuredClone(_0xf7542d[_0x195e71(_0x3fdaae._0x318eff,_0x3fdaae._0x55aadf,_0x3fdaae._0x2b667a,_0x3fdaae._0xcf20e8)])}:{},'system':structuredClone(_0xf7542d[_0x195e71(0x3d9,_0x3fdaae._0x494687,0x3ec,0x3e9)]),'messages':structuredClone(_0xf7542d[_0x35fefa(_0x3fdaae._0x2c9993,_0x3fdaae._0x537003,0x452,_0x3fdaae._0x14d986)]),'tools':structuredClone(_0xf7542d[_0x35fefa(_0x3fdaae._0x200be4,_0x3fdaae._0x2c9c99,_0x3fdaae._0x47f154,0x440)]),'metadata':{'sessionId':_0xf7542d[_0x35fefa(_0x3fdaae._0x47358d,_0x3fdaae._0x55b39,_0x3fdaae._0x19096b,_0x3fdaae._0x55b39)]['session_id'],'turnId':_0xf7542d['metadata'][_0x35fefa(0x43b,0x453,0x446,_0x3fdaae._0x292235)]},..._0xf7542d[_0x35fefa(0x43a,0x443,0x41b,0x435)]?{'outputFormat':structuredClone(_0xf7542d[_0x35fefa(0x41f,_0x3fdaae._0x5ef3da,_0x3fdaae._0x2d25d6,0x435)])}:{}};}function toModelRequest(_0x58f599){const _0x262003={_0x15385e:0x327,_0x386385:0x308,_0x16cef6:0x319,_0x188fa9:0x2f8,_0x543958:0x2e5,_0x29a8d3:0x321,_0x515d95:0x337,_0xb120cb:0x2f2,_0x605ff9:0x30e,_0x3a67d0:0x2ef,_0xf0334f:0x309,_0x1059ec:0x2e7,_0x29962b:0x2e3},_0x42008d={_0x3298be:0xf7},_0x11d2ea={_0x21e731:0x108};function _0x418d69(_0x12acc1,_0x544240,_0x220e3c,_0x4d5e62){return _0x3a4e(_0x544240-_0x11d2ea._0x21e731,_0x220e3c);}function _0x147db9(_0x2bc054,_0x33ee09,_0x2cab5e,_0x45fb74){return _0x3a4e(_0x33ee09-_0x42008d._0x3298be,_0x45fb74);}return{'model':_0x58f599['model'],'max_tokens':_0x58f599[_0x418d69(_0x262003._0x15385e,0x31f,_0x262003._0x386385,_0x262003._0x16cef6)],..._0x58f599['reasoning']?{'reasoning':structuredClone(_0x58f599[_0x147db9(_0x262003._0x188fa9,0x2f1,0x2e6,_0x262003._0x543958)])}:{},'system':structuredClone(_0x58f599[_0x147db9(0x2cc,0x2e5,0x2e1,0x2e5)]),'messages':structuredClone(_0x58f599[_0x418d69(0x32f,_0x262003._0x29a8d3,0x30f,_0x262003._0x515d95)]),'tools':structuredClone(_0x58f599['tools']),'metadata':{'session_id':_0x58f599[_0x418d69(0x303,0x2f5,_0x262003._0xb120cb,0x30c)][_0x418d69(_0x262003._0x605ff9,0x309,_0x262003._0x3a67d0,0x310)],'turn_id':_0x58f599['metadata'][_0x147db9(_0x262003._0x29a8d3,0x307,_0x262003._0xf0334f,0x302)]},..._0x58f599[_0x147db9(_0x262003._0x1059ec,0x2e3,0x2e1,0x2d0)]?{'outputFormat':structuredClone(_0x58f599[_0x147db9(0x2f9,_0x262003._0x29962b,0x2ef,0x2f4)])}:{}};}function toProviderModelRequest(_0x255639){const _0x18a917={_0x40af6f:0x5aa,_0x2adc18:0x595,_0x47fa10:0x5ba,_0x5ea889:0x23e,_0x4d382d:0x234,_0x3931ca:0x59e,_0xe3d0b0:0x5b2,_0x2e2179:0x5a8};function _0x5db4e6(_0x491d1d,_0x1f46fc,_0x37005e,_0x3dd02c){return _0x3a4e(_0x1f46fc-0x3bb,_0x491d1d);}function _0x2b6bd3(_0x4e188f,_0x14ede9,_0x4c0873,_0x38ea96){return _0x3a4e(_0x38ea96-0x5a,_0x14ede9);}return{'model':_0x255639[_0x5db4e6(0x5a0,_0x18a917._0x40af6f,_0x18a917._0x2adc18,_0x18a917._0x47fa10)],'max_tokens':_0x255639['maxTokens'],'system':structuredClone(_0x255639[_0x2b6bd3(_0x18a917._0x5ea889,_0x18a917._0x4d382d,0x260,0x248)]),'messages':structuredClone(_0x255639['messages']),'tools':structuredClone(_0x255639[_0x5db4e6(_0x18a917._0x3931ca,_0x18a917._0xe3d0b0,0x599,_0x18a917._0x2e2179)])};}function toChatResponse(_0xeaa9e5){const _0x518ce6={_0x271f76:0x27e,_0x16f48a:0x27c,_0x4e2027:0x28b,_0x32dd75:0x26f,_0x381f94:0x31a,_0x34885d:0x285,_0x55c16d:0x29e,_0x3c0329:0x323,_0x160afd:0x317,_0x1ec9e5:0x349,_0x3d113c:0x331,_0x580143:0x348,_0x15c0a1:0x34d,_0x8e09ea:0x328,_0xa9c3d4:0x310,_0x56ca9e:0x33c,_0xd8af41:0x356,_0x292cb1:0x35f,_0x475ff5:0x30e,_0x1d0ac1:0x30b};function _0x46d3dc(_0x512a25,_0x26c530,_0x4565c9,_0x6a77f0){return _0x3a4e(_0x26c530-0x84,_0x512a25);}function _0x358dc1(_0x240b17,_0x31e8c8,_0x55da42,_0x5cd904){return _0x3a4e(_0x31e8c8-0x130,_0x5cd904);}return{'id':_0xeaa9e5['id'],'content':structuredClone(_0xeaa9e5[_0x46d3dc(_0x518ce6._0x271f76,_0x518ce6._0x16f48a,_0x518ce6._0x4e2027,_0x518ce6._0x32dd75)]),'stopReason':_0xeaa9e5[_0x358dc1(0x31b,_0x518ce6._0x381f94,0x308,0x330)],'usage':{'inputTokens':_0xeaa9e5[_0x46d3dc(_0x518ce6._0x34885d,0x29c,0x2a5,_0x518ce6._0x55c16d)][_0x358dc1(_0x518ce6._0x3c0329,_0x518ce6._0x160afd,0x317,0x306)],'outputTokens':_0xeaa9e5['usage'][_0x358dc1(_0x518ce6._0x1ec9e5,0x346,_0x518ce6._0x3d113c,0x330)],..._0xeaa9e5[_0x358dc1(0x355,_0x518ce6._0x580143,_0x518ce6._0x15c0a1,0x340)][_0x358dc1(_0x518ce6._0x8e09ea,0x320,_0x518ce6._0xa9c3d4,0x329)]!==void 0x0?{'reasoningTokens':_0xeaa9e5[_0x358dc1(_0x518ce6._0x56ca9e,0x348,_0x518ce6._0xd8af41,_0x518ce6._0x292cb1)][_0x358dc1(0x321,0x320,_0x518ce6._0x475ff5,_0x518ce6._0x1d0ac1)]}:{}},..._0xeaa9e5['providerState']?{'providerState':structuredClone(_0xeaa9e5['providerState'])}:{}};}function toModelResponse(_0x5ba56f){const _0x332a8e={_0x412e8a:0x154,_0x2b6de1:0x15b,_0x51b8ee:0x13e,_0x4f6672:0x13d,_0x37bffd:0x156,_0x3fd5ec:0x17c,_0x1ec759:0x598,_0x5ac6bf:0x584,_0x5ad12a:0x5b2,_0x52f784:0x13c,_0x4ad449:0x596,_0x1d5bc6:0x58e},_0x323ca6={_0x160a07:0x39a};function _0x4b49ba(_0xeb61f3,_0x574837,_0x14eed7,_0x344131){return _0x3a4e(_0x14eed7-_0x323ca6._0x160a07,_0xeb61f3);}function _0x397e89(_0xb07091,_0xafb352,_0x3622ae,_0x4a69d8){return _0x3a4e(_0xafb352- -0xba,_0x4a69d8);}return{'id':_0x5ba56f['id'],'type':'message','role':_0x397e89(0x144,_0x332a8e._0x412e8a,0x144,0x152),'content':structuredClone(_0x5ba56f[_0x397e89(_0x332a8e._0x2b6de1,_0x332a8e._0x51b8ee,_0x332a8e._0x4f6672,_0x332a8e._0x37bffd)]),'stop_reason':_0x5ba56f[_0x397e89(0x14c,0x137,0x13a,0x13c)],'stop_sequence':null,'usage':{'input_tokens':_0x5ba56f['usage']['inputTokens'],'output_tokens':_0x5ba56f[_0x397e89(_0x332a8e._0x3fd5ec,0x15e,0x179,0x165)][_0x4b49ba(_0x332a8e._0x1ec759,_0x332a8e._0x5ac6bf,0x585,0x5a2)],..._0x5ba56f['usage']['reasoningTokens']!==void 0x0?{'reasoning_tokens':_0x5ba56f[_0x4b49ba(0x5b9,0x5c9,_0x332a8e._0x5ad12a,0x5a9)]['reasoningTokens']}:{}},..._0x5ba56f[_0x397e89(0x120,0x13a,0x142,_0x332a8e._0x52f784)]?{'providerState':structuredClone(_0x5ba56f[_0x4b49ba(0x59f,_0x332a8e._0x4ad449,_0x332a8e._0x1d5bc6,0x575)])}:{}};}function responseToAssistantMessage(_0x295e80){const _0x169726={_0x363a92:0x145,_0x3d657a:0x136,_0x49a212:0x1fa,_0x4824ce:0x201,_0x7a5b5a:0x1f5,_0x3bcf4b:0x20b,_0x5e3069:0x1f2},_0x708586={_0x3f3679:0xc9};function _0xa7b1a6(_0xc311e2,_0x13a353,_0x95e706,_0x554c2c){return _0x3a4e(_0x95e706- -_0x708586._0x3f3679,_0xc311e2);}function _0x2a9254(_0x2f244c,_0xe562e3,_0x3de95c,_0x3597b7){return _0x3a4e(_0xe562e3-0xd,_0x3de95c);}return{'role':_0xa7b1a6(0x154,0x12e,_0x169726._0x363a92,_0x169726._0x3d657a),'content':normalizeContent(_0x295e80[_0x2a9254(_0x169726._0x49a212,0x205,0x1f7,0x21a)]),..._0x295e80[_0x2a9254(_0x169726._0x4824ce,0x201,0x1f2,_0x169726._0x7a5b5a)]?{'providerState':structuredClone(_0x295e80[_0x2a9254(0x1fc,0x201,_0x169726._0x3bcf4b,_0x169726._0x5e3069)])}:{}};}function createReasoningMessage(_0xf3a8e4){const _0x256f0f={_0x574c39:0x1bd,_0x16e483:0x1c0,_0x3651c9:0x19b,_0x3166cb:0x1b7,_0x97d277:0x19f,_0x2697a4:0x1a1,_0x4966d0:0x1a1,_0x4a885b:0x1a3,_0x4e2320:0x1ab},_0x4cff31={_0x17a923:0x3b},_0xa54e5f={_0x89fc90:0x478,_0x23f8c7:0x466,_0x45eb52:0x469,_0x1a8187:0x48e,_0xab1eeb:0x495},_0x171ddc={_0x4a3c9e:0xa4,_0x2f063b:0x84,_0x27237e:0x2dd},_0x4faa48=normalizeContent(_0xf3a8e4?.[_0x54ad48(0x1ad,0x1c9,_0x256f0f._0x574c39,_0x256f0f._0x16e483)])[_0x52f5a4(_0x256f0f._0x3651c9,_0x256f0f._0x3166cb,_0x256f0f._0x97d277,_0x256f0f._0x2697a4)](_0x265827=>{const _0x4eb087={_0x193c58:0x376,_0x4ef7c6:0x14f};function _0x56c7e5(_0x180f9d,_0x494ca7,_0x5f2cec,_0x2afcda){return _0x54ad48(_0x5f2cec,_0x494ca7-0xd7,_0x2afcda- -_0x4eb087._0x193c58,_0x2afcda-_0x4eb087._0x4ef7c6);}function _0x545719(_0x4214c6,_0x7e8283,_0x388d89,_0x56b35f){return _0x52f5a4(_0x4214c6-_0x171ddc._0x4a3c9e,_0x4214c6,_0x388d89-_0x171ddc._0x2f063b,_0x56b35f-_0x171ddc._0x27237e);}return _0x265827['type']==='anthropic_redacted_thinking'||_0x265827[_0x545719(_0xa54e5f._0x89fc90,0x475,0x473,0x478)]==='anthropic_thinking'||_0x265827[_0x545719(_0xa54e5f._0x23f8c7,_0xa54e5f._0x45eb52,0x477,0x478)]===_0x545719(0x466,_0xa54e5f._0x1a8187,_0xa54e5f._0xab1eeb,0x47c);});function _0x54ad48(_0x5cd5bd,_0x21f2ee,_0x47b02c,_0x33f1be){return _0x3a4e(_0x47b02c- -_0x4cff31._0x17a923,_0x5cd5bd);}if(_0x4faa48[_0x52f5a4(_0x256f0f._0x4966d0,_0x256f0f._0x4a885b,0x1bf,_0x256f0f._0x4e2320)]===0x0)return void 0x0;function _0x52f5a4(_0x203071,_0x2ff5fe,_0x377929,_0x5777ab){return _0x3a4e(_0x5777ab- -0x6a,_0x2ff5fe);}return{'role':'assistant','content':_0x4faa48};}function createAssistantTextMessage(_0x33adcf){const _0x453938={_0x2839ee:0x360,_0x3b9065:0x555,_0x1efec4:0x538},_0x5c153c={_0x47814d:0x32a},_0x359cdf=normalizeContent(_0x33adcf?.[_0x198806(0x348,_0x453938._0x2839ee,0x37b,0x360)])['filter'](_0x1b2904=>{const _0x105585={_0xf6e17b:0x200,_0x5b1403:0xb4,_0x1b7e53:0x12e};function _0x24063d(_0x478c52,_0x24831c,_0x5722ff,_0x2f3498){return _0x198806(_0x24831c,_0x478c52- -_0x105585._0xf6e17b,_0x5722ff-_0x105585._0x5b1403,_0x2f3498-_0x105585._0x1b7e53);}return _0x1b2904['type']===_0x24063d(0x16c,0x16d,0x172,0x165);});if(_0x359cdf['length']===0x0)return void 0x0;function _0x198806(_0x20aeda,_0xa13589,_0x5cf0f3,_0x32dabb){return _0x3a4e(_0xa13589-0x168,_0x20aeda);}function _0x82961f(_0x32ffb3,_0x1d6ba7,_0xc3794b,_0x236cdb){return _0x3a4e(_0x236cdb-_0x5c153c._0x47814d,_0x1d6ba7);}return{'role':_0x82961f(0x537,_0x453938._0x3b9065,0x54a,_0x453938._0x1efec4),'content':_0x359cdf};}function createToolUseMessage(_0x24d104){const _0x39b1b2={_0x492235:0x408,_0x16ff18:0x413,_0x1a6b7e:0x416,_0x1ec611:0x3ef},_0x4ad7bc={_0x1c1922:0xc8},_0x4b9fc1={_0x158035:0x1fc},_0x2b60ce={_0x1adf33:0x1ab},_0x3c3fb9=normalizeContent(_0x24d104?.[_0x45c015(0x139,0x121,0x130,0x133)])[_0x487d82(_0x39b1b2._0x492235,0x400,0x424,0x407)](_0x593347=>{const _0x493bbb={_0x3de020:0x5a};function _0x8b0382(_0x3f1405,_0x21ffe3,_0x1609bd,_0x3ed0fa){return _0x487d82(_0x3f1405-_0x493bbb._0x3de020,_0x21ffe3-0xa9,_0x3f1405,_0x3ed0fa- -0x5ac);}return _0x593347[_0x8b0382(-0x1a9,-0x1b2,-0x1b7,-_0x2b60ce._0x1adf33)]==='tool_use';});function _0x487d82(_0x374644,_0x269d2d,_0x378272,_0x4cd70b){return _0x3a4e(_0x4cd70b-_0x4b9fc1._0x158035,_0x378272);}function _0x45c015(_0x3fec8a,_0x551ee3,_0x5dfce4,_0x236b3b){return _0x3a4e(_0x5dfce4- -_0x4ad7bc._0x1c1922,_0x3fec8a);}if(_0x3c3fb9[_0x487d82(0x413,0x3f6,0x41d,0x411)]===0x0)return void 0x0;return{'role':_0x487d82(_0x39b1b2._0x16ff18,_0x39b1b2._0x1a6b7e,_0x39b1b2._0x1ec611,0x40a),'content':_0x3c3fb9};}function getTextFromMessage(_0x267a76){const _0x40a61e={_0x4543a9:0x259,_0x4b800a:0x274,_0x24a902:0x356,_0x55464f:0x321,_0x5dded5:0x315,_0x5e7508:0x32a},_0x2320c1={_0x4da38d:0x120};function _0x540203(_0xb99d6e,_0x4bc8f1,_0x3bf0ca,_0x1ad944){return _0x3a4e(_0x3bf0ca-_0x2320c1._0x4da38d,_0x1ad944);}function _0x3e296b(_0x2a118f,_0x4fe23c,_0x4dbd5a,_0x36ec4b){return _0x3a4e(_0x4fe23c-0x61,_0x4dbd5a);}return normalizeContent(_0x267a76?.[_0x3e296b(0x23d,_0x40a61e._0x4543a9,0x267,_0x40a61e._0x4b800a)])['filter'](_0x25277a=>_0x25277a[_0x540203(0x30d,0x335,0x325,0x308)]===_0x540203(0x30e,0x32c,0x324,0x327))[_0x540203(0x32f,_0x40a61e._0x24a902,0x33a,0x31f)](_0x5a7295=>_0x5a7295[_0x540203(0x336,0x30d,0x324,0x323)])[_0x540203(_0x40a61e._0x55464f,_0x40a61e._0x5dded5,_0x40a61e._0x5e7508,0x342)]('\x0a');}function getReasoningTextFromMessage(_0x3f5772){const _0x4781b4={_0x19cd00:0x193,_0x48e09a:0x1b0,_0x1cdbb6:0x1a1},_0x10e0a1={_0x518bd2:0x4fc,_0x3e342f:0x50e,_0x4b911a:0x25a,_0x8a7b44:0x23d,_0x38da66:0x526,_0x511a12:0x519,_0x1a8514:0x531,_0x5ef89f:0x25d,_0x4c2c69:0x264,_0x4d81c0:0x278,_0x30c718:0x265,_0xc281fc:0x253,_0x5a7592:0x25d,_0x45c9f0:0x259,_0x3a9721:0x26f,_0x1f14b7:0x269,_0x3baa6a:0x517,_0x25fdce:0x51b,_0x25d252:0x51d,_0x179012:0x523,_0x32e32d:0x502,_0x21aad7:0x51e,_0x392c6b:0x279,_0xdd7312:0x258,_0x10dce5:0x27c,_0x105ac4:0x272,_0x4b3628:0x280,_0x2ee345:0x288,_0x5011f9:0x26d,_0x510b53:0x509,_0x27ea54:0x4ee,_0x46ffd8:0x508},_0x56b81e={_0xb4139f:0x82};function _0x145e03(_0x19939c,_0x489b26,_0x2d0fd5,_0x37abcb){return _0x3a4e(_0x19939c- -_0x56b81e._0xb4139f,_0x2d0fd5);}function _0x5ba311(_0x147c4e,_0x3a3ae6,_0x2c707c,_0x351b6d){return _0x3a4e(_0x2c707c- -0x121,_0x3a3ae6);}return normalizeContent(_0x3f5772?.[_0x145e03(0x176,0x17a,0x17c,_0x4781b4._0x19cd00)])[_0x145e03(0x19a,0x1b2,_0x4781b4._0x48e09a,_0x4781b4._0x1cdbb6)](_0x5ebec6=>{const _0x108b69={_0x9c4dbe:0x1d6};if(_0x5ebec6['type']===_0x47ff95(_0x10e0a1._0x518bd2,_0x10e0a1._0x518bd2,0x522,_0x10e0a1._0x3e342f))return _0x5ebec6[_0x395e12(_0x10e0a1._0x4b911a,0x25b,_0x10e0a1._0x8a7b44,0x274)][_0x47ff95(_0x10e0a1._0x38da66,0x534,_0x10e0a1._0x511a12,_0x10e0a1._0x1a8514)]()[_0x395e12(0x273,_0x10e0a1._0x5ef89f,0x278,_0x10e0a1._0x4c2c69)]>0x0?[_0x5ebec6[_0x395e12(0x25a,0x271,0x265,0x255)]]:[];function _0x47ff95(_0xce4176,_0xc8bb7e,_0x358e34,_0x2ff44f){return _0x5ba311(_0xce4176-0x6d,_0xce4176,_0x2ff44f-0x434,_0x2ff44f-0x184);}function _0x395e12(_0x5e6583,_0xd0e092,_0xffd9f3,_0x26151d){return _0x5ba311(_0x5e6583-0x56,_0xffd9f3,_0x5e6583-0x17f,_0x26151d-_0x108b69._0x9c4dbe);}if(_0x5ebec6[_0x395e12(0x263,_0x10e0a1._0x4d81c0,0x24d,0x262)]===_0x395e12(_0x10e0a1._0x30c718,_0x10e0a1._0xc281fc,0x269,_0x10e0a1._0x5a7592))return[_0x395e12(0x26d,_0x10e0a1._0x45c9f0,_0x10e0a1._0x3a9721,_0x10e0a1._0x1f14b7)];if(_0x5ebec6[_0x47ff95(_0x10e0a1._0x3baa6a,0x517,0x50e,0x518)]!==_0x47ff95(0x52e,0x500,0x535,0x51c))return[];const _0x570a5f=_0x5ebec6['summary'][_0x47ff95(0x541,_0x10e0a1._0x25fdce,_0x10e0a1._0x25d252,0x52d)](_0x251a14=>_0x251a14[_0x47ff95(0x521,0x501,0x518,0x517)])[_0x47ff95(0x52e,_0x10e0a1._0x179012,_0x10e0a1._0x32e32d,_0x10e0a1._0x21aad7)](_0xcedbb4=>_0xcedbb4[_0x395e12(0x27c,0x28f,0x292,0x297)]()[_0x395e12(0x273,0x278,0x25d,0x274)]>0x0)['join']('\x0a\x0a');if(_0x570a5f[_0x395e12(0x273,0x27f,_0x10e0a1._0x392c6b,_0x10e0a1._0xdd7312)]>0x0)return[_0x570a5f];if(_0x5ebec6['text']&&_0x5ebec6[_0x395e12(0x262,0x27b,0x27b,0x270)][_0x395e12(_0x10e0a1._0x10dce5,0x287,_0x10e0a1._0x105ac4,_0x10e0a1._0x4b3628)]()[_0x395e12(0x273,_0x10e0a1._0x2ee345,_0x10e0a1._0x5011f9,0x25b)]>0x0)return[_0x5ebec6['text']];return _0x5ebec6[_0x47ff95(_0x10e0a1._0x510b53,_0x10e0a1._0x27ea54,0x4fa,_0x10e0a1._0x46ffd8)]?['(encrypted\x20reasoning)']:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x21156e){const _0x28dffd={_0x1fce7d:0x410,_0x2cbb89:0x438},_0x10ffeb={_0x73a65e:0x22d};function _0x1f4062(_0x1b4b45,_0x3b0f68,_0x585646,_0x1f5faa){return _0x3a4e(_0x1f5faa-_0x10ffeb._0x73a65e,_0x3b0f68);}function _0x118d03(_0x1fc3fe,_0x2bce7c,_0x34ac1c,_0x4b17f4){return _0x3a4e(_0x2bce7c-0x3c4,_0x4b17f4);}return normalizeContent(_0x21156e?.[_0x1f4062(0x417,_0x28dffd._0x1fce7d,_0x28dffd._0x2cbb89,0x425)])['filter'](_0x662206=>_0x662206[_0x118d03(0x5af,0x5c9,0x5cb,0x5de)]===_0x1f4062(0x442,0x425,0x43f,0x43e));}function getToolResultBlocks(_0x9608e1){const _0xac03b9={_0x2c66b4:0x429,_0x4936e9:0x414};function _0x53c624(_0x20077e,_0x3f877a,_0x331a54,_0x4064ca){return _0x3a4e(_0x3f877a-0x21c,_0x331a54);}function _0x341b4a(_0x246fe2,_0x4953a2,_0x35087d,_0x2aea4b){return _0x3a4e(_0x4953a2- -0x22b,_0x35087d);}return normalizeContent(_0x9608e1?.[_0x53c624(_0xac03b9._0x2c66b4,_0xac03b9._0x4936e9,0x420,0x416)])['filter'](_0x2fee22=>_0x2fee22[_0x53c624(0x436,0x421,0x425,0x423)]===_0x53c624(0x418,0x40f,0x413,0x420));}function _0x3a4e(_0x275d7a,_0x384c6f){_0x275d7a=_0x275d7a-0x1e5;const _0x45704b=_0x4570();let _0x3a4eb0=_0x45704b[_0x275d7a];if(_0x3a4e['XONiqK']===undefined){var _0x1cc997=function(_0x2a4569){const _0x155e6c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2fa9a8='',_0x27098c='';for(let _0x20a715=0x0,_0x20669c,_0x4916f4,_0x1ee3fa=0x0;_0x4916f4=_0x2a4569['charAt'](_0x1ee3fa++);~_0x4916f4&&(_0x20669c=_0x20a715%0x4?_0x20669c*0x40+_0x4916f4:_0x4916f4,_0x20a715++%0x4)?_0x2fa9a8+=String['fromCharCode'](0xff&_0x20669c>>(-0x2*_0x20a715&0x6)):0x0){_0x4916f4=_0x155e6c['indexOf'](_0x4916f4);}for(let _0x3ac5b9=0x0,_0x4708e9=_0x2fa9a8['length'];_0x3ac5b9<_0x4708e9;_0x3ac5b9++){_0x27098c+='%'+('00'+_0x2fa9a8['charCodeAt'](_0x3ac5b9)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x27098c);};_0x3a4e['ZqtYRF']=_0x1cc997,_0x3a4e['tzjrds']={},_0x3a4e['XONiqK']=!![];}const _0x59b8a9=_0x45704b[0x0],_0x5f44d8=_0x275d7a+_0x59b8a9,_0x33848e=_0x3a4e['tzjrds'][_0x5f44d8];return!_0x33848e?(_0x3a4eb0=_0x3a4e['ZqtYRF'](_0x3a4eb0),_0x3a4e['tzjrds'][_0x5f44d8]=_0x3a4eb0):_0x3a4eb0=_0x33848e,_0x3a4eb0;}function createToolResultUserMessage(_0xe3b818){const _0xd0a467={_0x3e4dab:0xab,_0xc42233:0xbd,_0x3dfb08:0x95,_0x1b1195:0x7a,_0x1e0577:0x92,_0x48fdfc:0x68},_0xa57d33={_0x1added:0x173,_0x50fbd9:0x17d,_0x33b78d:0x198,_0x1c0a96:0x1a2,_0x148af5:0x1af,_0xf97b43:0x194,_0x46040b:0x487,_0x8381a0:0x4b8},_0x3aadb9={_0x4dfbe9:0x56,_0x3c6821:0xd9},_0x3b7668={_0x43387d:0x294},_0x138c77={_0x3cbb47:0x37d};function _0xaf2306(_0x2fcb22,_0xae83df,_0x1cdd85,_0x1db209){return _0x3a4e(_0x1db209-_0x138c77._0x3cbb47,_0x1cdd85);}function _0x2ba05e(_0x220cac,_0x16b13a,_0x1b5cd9,_0x4158f6){return _0x3a4e(_0x220cac- -_0x3b7668._0x43387d,_0x1b5cd9);}return{'role':_0x2ba05e(-_0xd0a467._0x3e4dab,-_0xd0a467._0xc42233,-_0xd0a467._0x3dfb08,-0xa0),'content':_0xe3b818[_0x2ba05e(-_0xd0a467._0x1b1195,-_0xd0a467._0x1e0577,-0x87,-_0xd0a467._0x48fdfc)](_0xaa5a9b=>{const _0x2e421d={_0x2069d6:0x22a,_0x5852d6:0x11f,_0xcfc28b:0x161};function _0x1a8039(_0x310f43,_0x589e78,_0x18f07c,_0x2143f7){return _0xaf2306(_0x310f43-0x50,_0x589e78-_0x3aadb9._0x4dfbe9,_0x589e78,_0x18f07c- -_0x3aadb9._0x3c6821);}function _0x3f33fa(_0x3a919b,_0xc55962,_0x23450f,_0x562e6f){return _0x2ba05e(_0x3a919b-_0x2e421d._0x2069d6,_0xc55962-_0x2e421d._0x5852d6,_0x23450f,_0x562e6f-_0x2e421d._0xcfc28b);}return{'type':_0x3f33fa(0x189,_0xa57d33._0x1added,0x178,_0xa57d33._0x50fbd9),'tool_use_id':_0xaa5a9b[_0x3f33fa(_0xa57d33._0x33b78d,0x17f,_0xa57d33._0x1c0a96,_0xa57d33._0x148af5)],'content':_0xaa5a9b[_0x3f33fa(0x18e,0x193,0x179,0x184)]??_0xaa5a9b[_0x3f33fa(0x17e,0x192,_0xa57d33._0xf97b43,0x19b)],'is_error':_0xaa5a9b[_0x1a8039(_0xa57d33._0x46040b,_0xa57d33._0x8381a0,0x4a4,0x4b0)]==='error'};})};}var INTERRUPTED_TOOL_RESULT_TEXT=_0x5c18a3(0x51b,0x553,0x538,0x548);function synthesizeMissingToolResults(_0x5237d0){const _0x29a3c2={_0x3e7c1e:0x185,_0x57da04:0xb0,_0x12db80:0x172,_0x53b7b3:0x159,_0x288c9a:0x187,_0x41c3f8:0x189,_0x5a7041:0x16f,_0x409f6b:0x184,_0x15cc24:0x16d,_0x1b2025:0x169,_0x2d13c7:0xbd,_0x1c68f1:0x9d,_0x5d0002:0xb3},_0x5553c1={_0x3583b0:0xa,_0x4e3e2e:0x89};function _0x3b6306(_0x409c2f,_0x26efc0,_0x3f42a7,_0x25b1f7){return _0x5c18a3(_0x409c2f-_0x5553c1._0x3583b0,_0x26efc0-_0x5553c1._0x4e3e2e,_0x409c2f- -0x5e6,_0x25b1f7);}const _0x4e1a87=new Set();for(const _0xabe492 of _0x5237d0){for(const _0x500d79 of getToolResultBlocks(_0xabe492)){_0x4e1a87[_0x125a4c(-0x181,-0x18a,-_0x29a3c2._0x3e7c1e,-0x17b)](_0x500d79['tool_use_id']);}}const _0x47c01e=[];for(const _0xf83bef of _0x5237d0){_0x47c01e[_0x3b6306(-0xb8,-_0x29a3c2._0x57da04,-0xca,-0xa1)](_0xf83bef);const _0x2ddbbc=getToolUseBlocks(_0xf83bef)['filter'](_0x27234b=>!_0x4e1a87[_0x125a4c(-0x17f,-0x181,-0x16c,-0x177)](_0x27234b['id']));if(_0x2ddbbc[_0x125a4c(-0x184,-_0x29a3c2._0x12db80,-0x164,-_0x29a3c2._0x53b7b3)]===0x0)continue;_0x47c01e[_0x125a4c(-_0x29a3c2._0x288c9a,-_0x29a3c2._0x41c3f8,-_0x29a3c2._0x5a7041,-_0x29a3c2._0x409f6b)]({'role':'user','content':_0x2ddbbc[_0x125a4c(-_0x29a3c2._0x409f6b,-_0x29a3c2._0x15cc24,-_0x29a3c2._0x1b2025,-_0x29a3c2._0x12db80)](_0x3d9c3f=>({'type':'tool_result','tool_use_id':_0x3d9c3f['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x102ff8 of _0x2ddbbc){_0x4e1a87[_0x3b6306(-0xb9,-_0x29a3c2._0x2d13c7,-_0x29a3c2._0x1c68f1,-_0x29a3c2._0x5d0002)](_0x102ff8['id']);}}function _0x125a4c(_0x14a855,_0x42fa9f,_0x5a235b,_0x5c4941){return _0x5c18a3(_0x14a855-0xee,_0x42fa9f-0x124,_0x42fa9f- -0x6b7,_0x14a855);}return _0x47c01e;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
|
|
1
|
+
(function(_0xf0906e,_0x50f37f){const _0x7db01d={_0xce1708:0x19,_0x3e3d04:0x27,_0xc62977:0x2d,_0x4da437:0x3f,_0x47252b:0x42,_0x5afb98:0x5d,_0x382a5b:0x44,_0x3f3512:0x45,_0x5ae888:0x26,_0x14e0d1:0x3f,_0x120f48:0x5c,_0x55cd57:0x110,_0x50ca91:0xfb,_0x39180d:0xf3,_0x24760b:0xdc,_0x461cf1:0x109,_0x212450:0x2f,_0x3b3f6f:0x47,_0x422d4c:0x48,_0x25e535:0x11d,_0x1a2bb9:0x11c},_0x5d11f6={_0x12e162:0x1cb},_0x1e1866={_0x8f7fb5:0x106};function _0x116649(_0x28c86b,_0x5bd7e4,_0x305a79,_0x4d6346){return _0x427d(_0x4d6346- -_0x1e1866._0x8f7fb5,_0x28c86b);}const _0x3bc975=_0xf0906e();function _0xc6c2f3(_0x500933,_0x199670,_0x1fcbed,_0x56cce9){return _0x427d(_0x56cce9- -_0x5d11f6._0x12e162,_0x500933);}while(!![]){try{const _0x245bad=parseInt(_0x116649(-_0x7db01d._0xce1708,-0x17,-_0x7db01d._0x3e3d04,-_0x7db01d._0xc62977))/0x1+-parseInt(_0x116649(-_0x7db01d._0x4da437,-_0x7db01d._0x47252b,-0x46,-_0x7db01d._0x5afb98))/0x2+parseInt(_0x116649(-_0x7db01d._0x382a5b,-0x3a,-0x48,-0x36))/0x3*(-parseInt(_0x116649(-_0x7db01d._0x3f3512,-_0x7db01d._0x5ae888,-0x4c,-_0x7db01d._0x14e0d1))/0x4)+-parseInt(_0x116649(-0x3e,-_0x7db01d._0x120f48,-0x58,-0x4e))/0x5+-parseInt(_0xc6c2f3(-_0x7db01d._0x55cd57,-0xde,-_0x7db01d._0x50ca91,-_0x7db01d._0x39180d))/0x6+parseInt(_0xc6c2f3(-0x101,-_0x7db01d._0x24760b,-_0x7db01d._0x461cf1,-0xf8))/0x7*(-parseInt(_0x116649(-_0x7db01d._0x212450,-_0x7db01d._0x3b3f6f,-0x30,-_0x7db01d._0x422d4c))/0x8)+parseInt(_0xc6c2f3(-_0x7db01d._0x25e535,-_0x7db01d._0x1a2bb9,-0x10d,-0x110))/0x9;if(_0x245bad===_0x50f37f)break;else _0x3bc975['push'](_0x3bc975['shift']());}catch(_0x2f751f){_0x3bc975['push'](_0x3bc975['shift']());}}}(_0x37c9,0x56765));function createTextBlock(_0x2e14fd){return{'type':'text','text':_0x2e14fd};}function normalizeTextBlock(_0x3431a9){const _0x3e49a7={_0x1f2652:0x225,_0x23e99d:0x227},_0x3cbe51={_0x317d9b:0x17b};function _0x5385c9(_0x1d6e94,_0x38d714,_0x5e1d93,_0x3e46fe){return _0x427d(_0x3e46fe-_0x3cbe51._0x317d9b,_0x5e1d93);}return createTextBlock(_0x3431a9[_0x5385c9(0x22b,_0x3e49a7._0x1f2652,0x211,_0x3e49a7._0x23e99d)]??'');}function normalizeContent(_0x381ee9){const _0x4a3630={_0x4fd29f:0xd0,_0xcd591f:0xce,_0x21bafe:0xa1,_0x56aa89:0xd9,_0x139ca7:0xd9,_0x49fbfe:0xf4},_0x513821={_0x780857:0x249,_0xd92548:0x238,_0x528191:0x255,_0x3541e6:0x22d,_0xba5e18:0x244},_0x46779e={_0x51b541:0x2c,_0x3f0820:0x187},_0x469702={_0x55ba95:0x5};function _0x5aa828(_0x27a841,_0x255374,_0x2b0d85,_0x167a97){return _0x427d(_0x2b0d85-_0x469702._0x55ba95,_0x255374);}if(typeof _0x381ee9===_0x16f7f6(-_0x4a3630._0x4fd29f,-0xcc,-0xe9,-0xb4))return[createTextBlock(_0x381ee9)];function _0x16f7f6(_0x2b373b,_0x111d59,_0x4ebb19,_0x356f97){return _0x427d(_0x111d59- -0x18c,_0x2b373b);}if(!Array[_0x16f7f6(-_0x4a3630._0xcd591f,-0xbb,-_0x4a3630._0x21bafe,-0xcb)](_0x381ee9))return[];return _0x381ee9[_0x16f7f6(-_0x4a3630._0x56aa89,-_0x4a3630._0x139ca7,-_0x4a3630._0x49fbfe,-0xe2)](_0x5db7d3=>{const _0x3aa1d3={_0x4fa98c:0xf5,_0x38fa86:0xef};function _0x44437c(_0x4c1053,_0x3bc892,_0x3a8daa,_0x49e8f6){return _0x16f7f6(_0x49e8f6,_0x3a8daa-_0x3aa1d3._0x4fa98c,_0x3a8daa-_0x3aa1d3._0x38fa86,_0x49e8f6-0xcd);}function _0x261aa7(_0x294009,_0x4b9df4,_0x153754,_0x12165b){return _0x5aa828(_0x294009-_0x46779e._0x51b541,_0x153754,_0x294009-_0x46779e._0x3f0820,_0x12165b-0x165);}if(_0x5db7d3[_0x261aa7(0x237,_0x513821._0x780857,0x23a,0x21c)]===_0x261aa7(_0x513821._0xd92548,_0x513821._0x528191,_0x513821._0x3541e6,_0x513821._0xba5e18))return normalizeTextBlock(_0x5db7d3);return structuredClone(_0x5db7d3);});}function _0x37c9(){const _0x350f3c=['zxjYB3i','mZKWmZG1ohDOrMjOtq','otG2odnSsvHTvNi','B3v0Chv0vg9Rzw5Z','BwvZC2fNzxm','Dg9VBhm','Dg9VBf91C2vFAwq','yxnZAxn0yw50','CMvHC29UAw5N','CMvHC29UAw5Nx3rVA2vUCW','zw5JCNLWDgvKq29UDgvUDa','DhvYBKLK','ChvZAa','khjLzgfJDgvKihjLyxnVBMLUzYK','mZK1mtK4vLDMzgz2','C2vZC2LVBL9Pza','DhLWzq','Dgv4Da','C3vTBwfYEq','y2XHDwrLlxnVBM5LDc00ltiWmJuWnte0','Dg9VBf9Yzxn1Bhq','CM9Szq','C3LZDgvT','AM9PBG','BwfW','Bw9KzwW','yw50AhjVCgLJx3jLzgfJDgvKx3rOAw5RAw5N','y29UDgvUDa','Bwf4x3rVA2vUCW','mJmYotiZmePczhLAuq','ywrK','zMLSDgvY','mJm2mtq4ntDitxfgqu0','yw50AhjVCgLJx3rOAw5RAw5N','C3rHDhvZ','nJmYAMHpvK1J','CMvHC29UAw5Nvg9Rzw5Z','C3rYAw5N','Bwf4vg9Rzw5Z','DxnHz2u','BwvZC2fNzq','C2vZC2LVBKLK','B3bLBMfPx3jLyxnVBMLUzW','B3v0Chv0','mZK2A3v2svzy','DgHPBMTPBMC','BgvUz3rO','B3v0Chv0rM9YBwf0','Dg9VBf91C2u','Bwv0ywrHDge','DhjPBq','Aw5WDxrFDg9Rzw5Z','DxnLCG','mtqYnZDuEvfmr1C','AxnbCNjHEq','ChjVDMLKzxjtDgf0zq','nte2nZrtr0viBuu','kgvUy3j5ChrLzcbYzwfZB25PBMCP','y2fSBeLK','zMXHDe1HCa'];_0x37c9=function(){return _0x350f3c;};return _0x37c9();}function normalizeSystem(_0xda18f6=[]){const _0x1060a0={_0xe2de16:0x142,_0x290117:0x149},_0x829529={_0x52fa15:0x84},_0x3cea55={_0x560fd8:0x152};function _0x39d1e4(_0xe34d6,_0x347d91,_0x1e2226,_0x485242){return _0x427d(_0x485242- -_0x3cea55._0x560fd8,_0xe34d6);}function _0x5d25c9(_0x3b2bb1,_0x5cd8a0,_0x180290,_0x49d6be){return _0x427d(_0x3b2bb1-_0x829529._0x52fa15,_0x49d6be);}return normalizeContent(_0xda18f6)[_0x5d25c9(0x13e,_0x1060a0._0xe2de16,0x13e,_0x1060a0._0x290117)](_0x522cde=>_0x522cde[_0x5d25c9(0x12f,0x119,0x111,0x127)]===_0x5d25c9(0x130,0x12c,0x128,0x12e));}function normalizeMessage(_0x2a3b48){const _0x1099af={_0x2b8104:0x388,_0x40ca0b:0x379,_0x5edf70:0x37e,_0xba284f:0x37f,_0x4fda23:0x369,_0x17119e:0x2e7,_0x1f55aa:0x2e4,_0x1f93a4:0x306,_0x9eb73a:0x303,_0x4dc46d:0x2e6,_0x3a3102:0x31d},_0x3bebc0={_0x18af4f:0x2b9},_0x174073={_0x4cb619:0x231};function _0x39db4b(_0x416d4f,_0x47cee2,_0x82ff50,_0x33e289){return _0x427d(_0x47cee2-_0x174073._0x4cb619,_0x33e289);}function _0x12d382(_0x4d6e2e,_0x390521,_0xfa4e06,_0xac07ce){return _0x427d(_0xfa4e06-_0x3bebc0._0x18af4f,_0x390521);}return{...typeof _0x2a3b48['id']===_0x12d382(_0x1099af._0x2b8104,0x36f,_0x1099af._0x40ca0b,_0x1099af._0x5edf70)?{'id':_0x2a3b48['id']}:{},'role':_0x2a3b48[_0x12d382(_0x1099af._0xba284f,0x375,_0x1099af._0x4fda23,0x364)],'content':normalizeContent(_0x2a3b48[_0x39db4b(0x2d5,_0x1099af._0x17119e,_0x1099af._0x1f55aa,0x2d6)]),..._0x2a3b48[_0x39db4b(0x31a,0x303,0x318,_0x1099af._0x1f93a4)]?{'providerState':structuredClone(_0x2a3b48[_0x39db4b(0x2ed,_0x1099af._0x9eb73a,_0x1099af._0x4dc46d,_0x1099af._0x3a3102)])}:{}};}function compileRequest(_0x1f7288){const _0x571845={_0x4711f5:0x1a5,_0x24d290:0x198,_0x27a2f3:0x180,_0x31bc42:0x181,_0x128080:0x2f4,_0x3729c8:0x2dd,_0x1e0247:0x2e7,_0x584294:0x177,_0x1c2d37:0x2c6,_0x61687:0x2af,_0x7fc5da:0x293,_0x5bff2e:0x297},_0x131ed1={_0x129d65:0x202};function _0x441259(_0x8ea50d,_0x5c42d6,_0x52d496,_0x302bbf){return _0x427d(_0x5c42d6-_0x131ed1._0x129d65,_0x52d496);}function _0x5e56b4(_0x519df3,_0x277d18,_0x563e62,_0xff6c20){return _0x427d(_0xff6c20- -0x24c,_0x563e62);}return{'model':_0x1f7288[_0x5e56b4(-0x19f,-_0x571845._0x4711f5,-0x181,-_0x571845._0x24d290)]??_0x5e56b4(-0x180,-_0x571845._0x27a2f3,-_0x571845._0x31bc42,-0x19e),'max_tokens':_0x1f7288['max_tokens']??0x400,..._0x1f7288['reasoning']?{'reasoning':structuredClone(_0x1f7288['reasoning'])}:{},'system':normalizeSystem(_0x1f7288[_0x441259(0x2a7,0x2b3,0x2c0,0x29e)]),'messages':_0x1f7288[_0x441259(_0x571845._0x128080,_0x571845._0x3729c8,_0x571845._0x1e0247,0x2d5)]['map'](normalizeMessage),'tools':structuredClone(_0x1f7288[_0x5e56b4(-0x16e,-_0x571845._0x584294,-0x168,-0x170)]??[]),'metadata':{'session_id':_0x1f7288[_0x441259(_0x571845._0x3729c8,_0x571845._0x1c2d37,_0x571845._0x61687,0x2ba)],'turn_id':_0x1f7288[_0x441259(_0x571845._0x7fc5da,0x2a8,0x2c6,_0x571845._0x5bff2e)]}};}function toChatRequest(_0x130b5c){const _0x52bea8={_0x21b1e4:0x3fb,_0x3fd5be:0x40f,_0xeda16:0x48f,_0x1dd622:0x48d,_0x504d96:0x45d,_0x35f4ef:0x466,_0x373679:0x421,_0x3f2341:0x422,_0x4cb951:0x414,_0x4b7c70:0x406,_0x49f6c6:0x440,_0x599b5d:0x432,_0x46da3a:0x41a,_0x5d8e95:0x41a,_0x5a8ad0:0x426,_0xa6c3e4:0x410,_0x339302:0x405},_0x4a6870={_0x202f54:0x346};function _0x212bbf(_0x1d4fb3,_0x28b2d1,_0x4840d0,_0x66d16c){return _0x427d(_0x1d4fb3-_0x4a6870._0x202f54,_0x4840d0);}function _0x757fd(_0x18081f,_0x1f4d45,_0x1b8d49,_0x2953b5){return _0x427d(_0x2953b5-0x3ae,_0x18081f);}return{'model':_0x130b5c[_0x212bbf(0x3fa,_0x52bea8._0x21b1e4,0x3e0,_0x52bea8._0x3fd5be)],'maxTokens':_0x130b5c[_0x757fd(0x457,0x452,0x461,0x465)],..._0x130b5c[_0x757fd(0x475,0x4a6,_0x52bea8._0xeda16,_0x52bea8._0x1dd622)]?{'reasoning':structuredClone(_0x130b5c['reasoning'])}:{},'system':structuredClone(_0x130b5c[_0x757fd(0x442,_0x52bea8._0x504d96,_0x52bea8._0x35f4ef,0x45f)]),'messages':structuredClone(_0x130b5c[_0x212bbf(_0x52bea8._0x373679,_0x52bea8._0x3f2341,_0x52bea8._0x4cb951,_0x52bea8._0x4b7c70)]),'tools':structuredClone(_0x130b5c[_0x212bbf(_0x52bea8._0x3f2341,0x41d,_0x52bea8._0x49f6c6,_0x52bea8._0x599b5d)]),'metadata':{'sessionId':_0x130b5c[_0x212bbf(0x412,_0x52bea8._0x46da3a,0x41c,_0x52bea8._0x5d8e95)][_0x212bbf(0x3f0,0x3f5,0x3f0,0x3dc)],'turnId':_0x130b5c[_0x212bbf(0x412,0x417,0x407,_0x52bea8._0x5a8ad0)]['turn_id']},..._0x130b5c[_0x212bbf(_0x52bea8._0xa6c3e4,0x422,_0x52bea8._0x339302,0x400)]?{'outputFormat':structuredClone(_0x130b5c[_0x757fd(0x480,0x474,0x45c,0x478)])}:{}};}function toModelRequest(_0x4a4861){const _0x3fd133={_0x451fda:0x15f,_0x173c9c:0x178,_0xac86f2:0x1e7,_0x44cef0:0x1dc,_0x1d7133:0x210,_0x3711e1:0x1fb,_0x3c05f5:0x205,_0x17a1fb:0x210,_0x254477:0x1fa,_0x45a746:0x1ec,_0x455369:0x20a,_0x51111d:0x1f2,_0x521bcf:0x1f6,_0x39123a:0x208,_0x36f47e:0x1e6,_0x525295:0x1f2,_0x311aad:0x1dc,_0x39e8d7:0x1ae,_0x2a53e6:0x1db,_0x2f8da3:0x206,_0x20b6a8:0x1fc,_0x357e39:0x1f1};function _0x3f9572(_0x335121,_0x359b7c,_0x2c5d8b,_0x1eb757){return _0x427d(_0x2c5d8b-0x126,_0x359b7c);}function _0x185313(_0xbdb7e4,_0x1267b9,_0x1efb4f,_0x50ba21){return _0x427d(_0x1efb4f-0xc4,_0x50ba21);}return{'model':_0x4a4861[_0x185313(0x163,_0x3fd133._0x451fda,_0x3fd133._0x173c9c,0x15b)],'max_tokens':_0x4a4861[_0x3f9572(0x1f7,0x1f9,_0x3fd133._0xac86f2,_0x3fd133._0x44cef0)],..._0x4a4861[_0x3f9572(_0x3fd133._0x1d7133,_0x3fd133._0x3711e1,_0x3fd133._0x3c05f5,_0x3fd133._0x17a1fb)]?{'reasoning':structuredClone(_0x4a4861[_0x3f9572(_0x3fd133._0x254477,0x204,_0x3fd133._0x3c05f5,_0x3fd133._0x45a746)])}:{},'system':structuredClone(_0x4a4861['system']),'messages':structuredClone(_0x4a4861[_0x3f9572(_0x3fd133._0x455369,_0x3fd133._0x51111d,0x201,_0x3fd133._0x521bcf)]),'tools':structuredClone(_0x4a4861['tools']),'metadata':{'session_id':_0x4a4861[_0x3f9572(_0x3fd133._0x39123a,0x1d4,_0x3fd133._0x51111d,_0x3fd133._0x36f47e)]['sessionId'],'turn_id':_0x4a4861[_0x3f9572(0x20c,0x20f,_0x3fd133._0x525295,_0x3fd133._0x311aad)][_0x3f9572(0x1e4,0x1bc,0x1cc,_0x3fd133._0x39e8d7)]},..._0x4a4861[_0x3f9572(_0x3fd133._0x2a53e6,0x202,0x1f0,_0x3fd133._0x2f8da3)]?{'outputFormat':structuredClone(_0x4a4861[_0x3f9572(_0x3fd133._0x20b6a8,0x1ee,0x1f0,_0x3fd133._0x357e39)])}:{}};}function toProviderModelRequest(_0x26048c){const _0x3f7f66={_0x2b343c:0x29c,_0x26109e:0x293,_0x3cb15d:0x144,_0x40a566:0x13c,_0xef47a:0x14f},_0x35f33f={_0x207b83:0x349};function _0x274b1d(_0x5bd23c,_0x36d260,_0x312e19,_0xd934fc){return _0x427d(_0xd934fc- -0x229,_0x36d260);}function _0x4ed95e(_0x46217f,_0x3a53b7,_0x3a6210,_0x15cd0b){return _0x427d(_0x15cd0b- -_0x35f33f._0x207b83,_0x46217f);}return{'model':_0x26048c[_0x4ed95e(-_0x3f7f66._0x2b343c,-_0x3f7f66._0x26109e,-0x297,-0x295)],'max_tokens':_0x26048c['maxTokens'],'system':structuredClone(_0x26048c['system']),'messages':structuredClone(_0x26048c[_0x274b1d(-_0x3f7f66._0x3cb15d,-_0x3f7f66._0x40a566,-_0x3f7f66._0xef47a,-0x14e)]),'tools':structuredClone(_0x26048c['tools'])};}function toChatResponse(_0x2c7343){const _0x116518={_0x487834:0x161,_0x348bd9:0x173,_0x45895c:0x189,_0x5661c8:0x2c7,_0x24e255:0x2b0,_0x31de8f:0x2ce,_0x123e78:0x2bd,_0x5ef009:0x29c,_0x223656:0x2b0,_0x30f39b:0x153,_0x3470f3:0x167,_0x752654:0x177,_0x771871:0x12c,_0x55dd6b:0x149,_0x51d21e:0x12b,_0x10b375:0x2c1,_0x12236b:0x295,_0x5ba785:0x2b0,_0x2eee1a:0x297,_0x31de5b:0x2c1,_0x4c542b:0x2a5,_0x3b85f8:0x2b5},_0x54ee4a={_0x1fc30b:0x1ee};function _0x214230(_0x4e6f0c,_0x447850,_0x578896,_0x20b82f){return _0x427d(_0x447850- -0x229,_0x578896);}function _0x1c5678(_0x85006c,_0x1a02ae,_0x8e57c,_0xfb0a89){return _0x427d(_0x8e57c-_0x54ee4a._0x1fc30b,_0xfb0a89);}return{'id':_0x2c7343['id'],'content':structuredClone(_0x2c7343[_0x214230(-_0x116518._0x487834,-_0x116518._0x348bd9,-0x16b,-_0x116518._0x45895c)]),'stopReason':_0x2c7343['stop_reason'],'usage':{'inputTokens':_0x2c7343[_0x1c5678(_0x116518._0x5661c8,0x29b,_0x116518._0x24e255,0x2c9)][_0x1c5678(_0x116518._0x31de8f,0x2d0,0x2bc,_0x116518._0x123e78)],'outputTokens':_0x2c7343[_0x1c5678(0x299,_0x116518._0x5ef009,_0x116518._0x223656,0x29a)]['output_tokens'],..._0x2c7343[_0x214230(-_0x116518._0x30f39b,-_0x116518._0x3470f3,-0x177,-_0x116518._0x752654)][_0x214230(-_0x116518._0x771871,-_0x116518._0x55dd6b,-0x13d,-_0x116518._0x51d21e)]!==void 0x0?{'reasoningTokens':_0x2c7343[_0x1c5678(_0x116518._0x10b375,_0x116518._0x12236b,_0x116518._0x5ba785,_0x116518._0x2eee1a)]['reasoning_tokens']}:{}},..._0x2c7343[_0x1c5678(_0x116518._0x31de5b,_0x116518._0x4c542b,0x2c0,_0x116518._0x3b85f8)]?{'providerState':structuredClone(_0x2c7343['providerState'])}:{}};}function toModelResponse(_0x225af2){const _0x23ad20={_0x5cbb24:0x231,_0x7a574f:0x21b,_0x503304:0x212,_0x41bda5:0x217,_0xa2e90:0x20d,_0x3594e4:0x1e9,_0x45fb45:0x1cd,_0xf5e3cf:0x1c6,_0x4e92f1:0x1d6,_0x268d81:0x1e5,_0x47f220:0x1ce,_0x35c011:0x1bf,_0x2ef996:0x20c,_0x4400ce:0x208,_0x54338c:0x234,_0x3a042b:0x219,_0x59a102:0x1fa,_0x37b8a8:0x20e,_0x3f2e9a:0x216,_0x4ed51e:0x1f6},_0x78a92e={_0x42942e:0x10b};function _0xaf1bea(_0x305daf,_0xff710f,_0x152425,_0x370fee){return _0x427d(_0x370fee-0x157,_0x152425);}function _0x513ad9(_0x51ba59,_0x497216,_0x5ff366,_0x1c13eb){return _0x427d(_0x5ff366-_0x78a92e._0x42942e,_0x497216);}return{'id':_0x225af2['id'],'type':_0xaf1bea(_0x23ad20._0x5cbb24,0x237,_0x23ad20._0x7a574f,0x21a),'role':'assistant','content':structuredClone(_0x225af2[_0xaf1bea(0x226,_0x23ad20._0x503304,_0x23ad20._0x41bda5,_0x23ad20._0xa2e90)]),'stop_reason':_0x225af2['stopReason'],'stop_sequence':null,'usage':{'input_tokens':_0x225af2['usage']['inputTokens'],'output_tokens':_0x225af2[_0x513ad9(_0x23ad20._0x3594e4,0x1c3,_0x23ad20._0x45fb45,_0x23ad20._0xf5e3cf)][_0x513ad9(0x1fa,_0x23ad20._0x4e92f1,_0x23ad20._0x268d81,_0x23ad20._0x47f220)],..._0x225af2['usage'][_0x513ad9(_0x23ad20._0x35c011,0x1e8,0x1ca,0x1ad)]!==void 0x0?{'reasoning_tokens':_0x225af2[_0xaf1bea(_0x23ad20._0x2ef996,_0x23ad20._0x4400ce,_0x23ad20._0x54338c,_0x23ad20._0x3a042b)][_0xaf1bea(_0x23ad20._0x59a102,_0x23ad20._0x37b8a8,0x21e,_0x23ad20._0x3f2e9a)]}:{}},..._0x225af2[_0x513ad9(0x1eb,0x1c8,0x1dd,_0x23ad20._0x4ed51e)]?{'providerState':structuredClone(_0x225af2['providerState'])}:{}};}function responseToAssistantMessage(_0x511671){const _0x33c2a8={_0x39f8ed:0x22a,_0xc3f667:0x235},_0x7ab8ba={_0x413d4d:0x318};function _0x3ffa7d(_0x19d295,_0x638647,_0x23c05f,_0x53ad5d){return _0x427d(_0x53ad5d- -0x3b7,_0x638647);}function _0x5a18ac(_0x52fcd8,_0x2e8f0b,_0x2a54d8,_0x5f3685){return _0x427d(_0x2a54d8- -_0x7ab8ba._0x413d4d,_0x2e8f0b);}return{'role':_0x5a18ac(-_0x33c2a8._0x39f8ed,-0x233,-0x23a,-0x227),'content':normalizeContent(_0x511671['content']),..._0x511671[_0x5a18ac(-_0x33c2a8._0xc3f667,-0x22c,-0x246,-0x230)]?{'providerState':structuredClone(_0x511671['providerState'])}:{}};}function createReasoningMessage(_0x5d87c0){const _0x1bd0a2={_0x43648f:0x2b,_0x135466:0x18,_0x3c7b9a:0x242,_0x532f0b:0x235,_0x560445:0x240,_0x4e74d1:0x40,_0x348e6e:0x57,_0x4a7f46:0x42},_0x4f97a2={_0x340cce:0x55,_0x34d6ba:0x4f,_0x5e9e46:0x4f,_0xfa61ac:0x64,_0x2a6738:0xaa,_0x1e0ffd:0xae,_0x224a7d:0xb1,_0xef3887:0xa2,_0x5cccc5:0x9d},_0x321fe4={_0x530b5c:0x179},_0x209658={_0x4207a8:0x9e};function _0x40783b(_0x562e1c,_0xc700ba,_0x4a51bf,_0x24ff13){return _0x427d(_0xc700ba- -_0x209658._0x4207a8,_0x4a51bf);}const _0x2c40d3=normalizeContent(_0x5d87c0?.[_0x40783b(_0x1bd0a2._0x43648f,_0x1bd0a2._0x135466,0x29,0x29)])[_0x2b6599(-_0x1bd0a2._0x3c7b9a,-0x249,-0x226,-0x23e)](_0x44deb6=>{function _0x36f8f9(_0xe3deac,_0x3c5e55,_0x49558c,_0x33f35e){return _0x40783b(_0xe3deac-0xbf,_0x3c5e55-0x38,_0x33f35e,_0x33f35e-0x73);}function _0x29e78f(_0x5953bb,_0x2ba691,_0x391d24,_0xca9d89){return _0x40783b(_0x5953bb-0x139,_0xca9d89- -0xbb,_0x5953bb,_0xca9d89-_0x321fe4._0x530b5c);}return _0x44deb6[_0x36f8f9(0x3d,0x45,_0x4f97a2._0x340cce,0x3c)]===_0x36f8f9(_0x4f97a2._0x34d6ba,_0x4f97a2._0x5e9e46,_0x4f97a2._0xfa61ac,0x42)||_0x44deb6[_0x29e78f(-0xa7,-0xca,-_0x4f97a2._0x2a6738,-_0x4f97a2._0x1e0ffd)]===_0x29e78f(-0xaf,-_0x4f97a2._0x224a7d,-_0x4f97a2._0xef3887,-_0x4f97a2._0x5cccc5)||_0x44deb6['type']==='openai_reasoning';});if(_0x2c40d3[_0x2b6599(-_0x1bd0a2._0x532f0b,-_0x1bd0a2._0x560445,-0x226,-0x22f)]===0x0)return void 0x0;function _0x2b6599(_0x58e0d4,_0x3671ec,_0x493511,_0x4baf0c){return _0x427d(_0x4baf0c- -0x2f8,_0x493511);}return{'role':_0x40783b(0x59,_0x1bd0a2._0x4e74d1,_0x1bd0a2._0x348e6e,_0x1bd0a2._0x4a7f46),'content':_0x2c40d3};}function createAssistantTextMessage(_0x3a644f){const _0x28674f={_0x341b9f:0x161,_0x35ae12:0x160,_0x129e06:0x31},_0xd5a9c5={_0x424168:0x15,_0x36b746:0x133,_0x3ecbfd:0xb2};function _0x53508e(_0x21fb43,_0x54b87c,_0x59eb5b,_0x14cd73){return _0x427d(_0x54b87c-0xab,_0x59eb5b);}const _0x48588b=normalizeContent(_0x3a644f?.[_0x53508e(0x15b,_0x28674f._0x341b9f,0x157,_0x28674f._0x35ae12)])[_0xab299d(-_0x28674f._0x129e06,-0x22,-0x40,-0x39)](_0x5ea145=>{function _0x3fa2dd(_0x5c787d,_0x3e986d,_0x3eb631,_0xcc6937){return _0x53508e(_0x5c787d-_0xd5a9c5._0x424168,_0x3eb631- -_0xd5a9c5._0x36b746,_0x3e986d,_0xcc6937-_0xd5a9c5._0x3ecbfd);}return _0x5ea145[_0x3fa2dd(0xa,0x10,0x23,0x36)]==='text';});if(_0x48588b['length']===0x0)return void 0x0;function _0xab299d(_0x5d60eb,_0x1caa73,_0x15e130,_0x30d8a9){return _0x427d(_0x15e130- -0xfa,_0x30d8a9);}return{'role':'assistant','content':_0x48588b};}function createToolUseMessage(_0x11ca64){const _0x511384={_0x409e01:0x47,_0x244772:0x4d,_0x25e8e2:0x1b,_0x564bc0:0xb,_0x1c2dd6:0x41},_0x5ec55e={_0x353a73:0x140,_0x23d496:0x13d,_0x2c69f9:0x151},_0x5338ea={_0x4f4413:0x25},_0xd6cb6d=normalizeContent(_0x11ca64?.['content'])[_0x189ca9(-_0x511384._0x409e01,-_0x511384._0x244772,-0x57,-0x5b)](_0x57cd65=>{const _0x1fa6e2={_0x21f194:0x187,_0x21826c:0x1d7,_0x5f5039:0xa3};function _0x5f1b3d(_0x185e52,_0x1caf65,_0x5c4b09,_0x9d845a){return _0x189ca9(_0x5c4b09-_0x1fa6e2._0x21f194,_0x1caf65,_0x5c4b09-_0x1fa6e2._0x21826c,_0x9d845a-_0x1fa6e2._0x5f5039);}function _0x138539(_0x3d5f14,_0xdebc72,_0x5c6dd5,_0x5dce4a){return _0x189ca9(_0x5dce4a-0x2cf,_0x3d5f14,_0x5c6dd5-_0x5338ea._0x4f4413,_0x5dce4a-0x127);}return _0x57cd65[_0x5f1b3d(_0x5ec55e._0x353a73,0x141,0x131,_0x5ec55e._0x23d496)]===_0x5f1b3d(_0x5ec55e._0x2c69f9,0x14e,0x151,0x15c);});if(_0xd6cb6d['length']===0x0)return void 0x0;function _0x4d7842(_0x16152b,_0x46ce31,_0x3c61ae,_0x1f9c98){return _0x427d(_0x1f9c98- -0x25e,_0x46ce31);}function _0x189ca9(_0x180b57,_0x3affcf,_0x45136a,_0x1b493f){return _0x427d(_0x180b57- -0x101,_0x3affcf);}return{'role':_0x189ca9(-0x23,-_0x511384._0x25e8e2,-_0x511384._0x564bc0,-_0x511384._0x1c2dd6),'content':_0xd6cb6d};}function _0x427d(_0x572173,_0x406ee3){_0x572173=_0x572173-0xa5;const _0x37c98f=_0x37c9();let _0x427db9=_0x37c98f[_0x572173];if(_0x427d['pIdLeB']===undefined){var _0x14f8d1=function(_0x18a5dd){const _0x35ded7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e14fd='',_0x3431a9='';for(let _0x381ee9=0x0,_0x5db7d3,_0xda18f6,_0x522cde=0x0;_0xda18f6=_0x18a5dd['charAt'](_0x522cde++);~_0xda18f6&&(_0x5db7d3=_0x381ee9%0x4?_0x5db7d3*0x40+_0xda18f6:_0xda18f6,_0x381ee9++%0x4)?_0x2e14fd+=String['fromCharCode'](0xff&_0x5db7d3>>(-0x2*_0x381ee9&0x6)):0x0){_0xda18f6=_0x35ded7['indexOf'](_0xda18f6);}for(let _0x2a3b48=0x0,_0x1f7288=_0x2e14fd['length'];_0x2a3b48<_0x1f7288;_0x2a3b48++){_0x3431a9+='%'+('00'+_0x2e14fd['charCodeAt'](_0x2a3b48)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3431a9);};_0x427d['myBQzH']=_0x14f8d1,_0x427d['ZMCNxJ']={},_0x427d['pIdLeB']=!![];}const _0x5822a5=_0x37c98f[0x0],_0x1b80aa=_0x572173+_0x5822a5,_0x13bebc=_0x427d['ZMCNxJ'][_0x1b80aa];return!_0x13bebc?(_0x427db9=_0x427d['myBQzH'](_0x427db9),_0x427d['ZMCNxJ'][_0x1b80aa]=_0x427db9):_0x427db9=_0x13bebc,_0x427db9;}function getTextFromMessage(_0x2e3505){const _0x258e8d={_0x281593:0x6b,_0x439380:0x7c,_0x5b416c:0x153,_0x5dee42:0x13d,_0x49bc98:0x154,_0x15a143:0x14c,_0x456a0d:0x80,_0x54d383:0x8d},_0x2a8bab={_0x4d9e13:0x99},_0x151b13={_0x11acf9:0x129};function _0x1dbcb5(_0x4c46a1,_0x386eb2,_0x5a314f,_0x34c080){return _0x427d(_0x5a314f- -_0x151b13._0x11acf9,_0x34c080);}function _0x5882ce(_0xce9223,_0x2bfce6,_0x1ab463,_0x4d064c){return _0x427d(_0xce9223-_0x2a8bab._0x4d9e13,_0x2bfce6);}return normalizeContent(_0x2e3505?.[_0x1dbcb5(-_0x258e8d._0x281593,-_0x258e8d._0x439380,-0x73,-0x81)])[_0x5882ce(_0x258e8d._0x5b416c,0x14d,_0x258e8d._0x5dee42,_0x258e8d._0x5dee42)](_0x410aab=>_0x410aab[_0x1dbcb5(-0x86,-0x70,-0x7e,-0x6a)]===_0x5882ce(0x145,0x144,0x163,0x15b))[_0x5882ce(0x14c,_0x258e8d._0x49bc98,_0x258e8d._0x15a143,0x15b)](_0x36c4cc=>_0x36c4cc[_0x5882ce(0x145,0x143,0x160,0x149)])[_0x1dbcb5(-0x74,-_0x258e8d._0x456a0d,-0x77,-_0x258e8d._0x54d383)]('\x0a');}function getReasoningTextFromMessage(_0x19183e){const _0x1a868c={_0xa3661a:0x105,_0x3d1235:0x11f,_0x35f3c6:0x12,_0x547c47:0x3e,_0x2ec17d:0x2b},_0x251976={_0x4f3d0b:0x8b,_0x115731:0xa4,_0x1f9b69:0x95,_0x30e3c9:0x85,_0x29154a:0xab,_0x2153e2:0x7a,_0x4dfb61:0x65,_0x53020d:0x82,_0x5f1842:0x82,_0x3ae1fe:0x99,_0x9e619a:0x93,_0x54edee:0xab,_0x342526:0xc6,_0x33e3f1:0xce,_0x5c286c:0x9a,_0x542b63:0x92,_0x4621f0:0x79,_0x109e4c:0xb5,_0x19bece:0xc8,_0x857348:0x70,_0x18c146:0x8d,_0xbd5879:0x99,_0x14ac50:0xb0,_0x53a4a9:0xcd,_0x116c5d:0x94,_0xbb4d68:0xac,_0x2ce5e8:0xa3,_0x476d7c:0x85,_0x51282a:0xc9,_0xd8e722:0xb3,_0x178c04:0x94,_0xa96b43:0x8a,_0x30785b:0x73,_0x31beb0:0x6a,_0x6f7e8:0xa5,_0x44bc54:0x94,_0x138812:0x93,_0x37b767:0x90,_0x5da4f1:0xa7,_0x452f50:0xa2,_0x237644:0x8c,_0x24f277:0x8f,_0x494739:0x89,_0x2d1f99:0x6b},_0x4fa30f={_0x5dd545:0x101};function _0x4abbfe(_0x5cf01a,_0x487d65,_0x46f817,_0x3abaad){return _0x427d(_0x5cf01a- -0x1d1,_0x3abaad);}function _0x503c1d(_0x2e397e,_0x5c8368,_0x32d90a,_0x4becb6){return _0x427d(_0x4becb6- -_0x4fa30f._0x5dd545,_0x5c8368);}return normalizeContent(_0x19183e?.[_0x4abbfe(-0x11b,-_0x1a868c._0xa3661a,-0x132,-_0x1a868c._0x3d1235)])[_0x503c1d(-0x31,-_0x1a868c._0x35f3c6,-_0x1a868c._0x547c47,-_0x1a868c._0x2ec17d)](_0x3d588d=>{const _0x4b25c3={_0x3110cd:0x74};if(_0x3d588d['type']===_0x5ab784(-_0x251976._0x4f3d0b,-0xa9,-_0x251976._0x115731,-0x78))return _0x3d588d[_0x5e0e46(-0xae,-_0x251976._0x1f9b69,-_0x251976._0x30e3c9,-_0x251976._0x29154a)][_0x5ab784(-_0x251976._0x2153e2,-_0x251976._0x4dfb61,-_0x251976._0x53020d,-_0x251976._0x5f1842)]()[_0x5ab784(-0x7e,-0x7f,-_0x251976._0x1f9b69,-_0x251976._0x3ae1fe)]>0x0?[_0x3d588d[_0x5e0e46(-_0x251976._0x9e619a,-0x95,-0x83,-_0x251976._0x54edee)]]:[];if(_0x3d588d[_0x5e0e46(-_0x251976._0x342526,-0xb2,-_0x251976._0x33e3f1,-_0x251976._0x5c286c)]===_0x5ab784(-_0x251976._0x542b63,-0x9c,-_0x251976._0x4f3d0b,-_0x251976._0x4621f0))return[_0x5e0e46(-_0x251976._0x342526,-_0x251976._0x109e4c,-0xaf,-_0x251976._0x19bece)];if(_0x3d588d[_0x5ab784(-0x9c,-0xa8,-0x94,-0x83)]!==_0x5ab784(-_0x251976._0x5f1842,-_0x251976._0x857348,-_0x251976._0x18c146,-_0x251976._0xbd5879))return[];const _0x5ae807=_0x3d588d[_0x5e0e46(-0x9c,-_0x251976._0x14ac50,-_0x251976._0x53a4a9,-_0x251976._0x29154a)][_0x5ab784(-_0x251976._0x116c5d,-0x96,-_0x251976._0xbb4d68,-_0x251976._0x14ac50)](_0x59a3f1=>_0x59a3f1[_0x5ab784(-0x9b,-0xac,-0xb2,-0x86)])[_0x5e0e46(-0xae,-_0x251976._0x2ce5e8,-0xb4,-_0x251976._0x476d7c)](_0x53e343=>_0x53e343[_0x5ab784(-0x7a,-0x6c,-0x90,-0x95)]()['length']>0x0)[_0x5e0e46(-_0x251976._0x51282a,-0xab,-_0x251976._0xd8e722,-0xc8)]('\x0a\x0a');if(_0x5ae807[_0x5e0e46(-0x7d,-_0x251976._0x178c04,-0xa5,-_0x251976._0xa96b43)]>0x0)return[_0x5ae807];if(_0x3d588d['text']&&_0x3d588d['text'][_0x5ab784(-0x7a,-0x6d,-_0x251976._0x30785b,-_0x251976._0x31beb0)]()[_0x5e0e46(-_0x251976._0x6f7e8,-_0x251976._0x44bc54,-_0x251976._0x4f3d0b,-_0x251976._0x138812)]>0x0)return[_0x3d588d[_0x5ab784(-0x9b,-0x83,-_0x251976._0x37b767,-_0x251976._0x5da4f1)]];function _0x5e0e46(_0x1098f3,_0x26f22a,_0x42f1bb,_0x3e90cb){return _0x4abbfe(_0x26f22a-_0x4b25c3._0x3110cd,_0x26f22a-0x1cf,_0x42f1bb-0x82,_0x1098f3);}function _0x5ab784(_0x555020,_0x42ebf8,_0x497acf,_0x5445a6){return _0x4abbfe(_0x555020-0x8a,_0x42ebf8-0x7b,_0x497acf-0x1dc,_0x497acf);}return _0x3d588d[_0x5ab784(-_0x251976._0x452f50,-0xae,-0x9e,-_0x251976._0x237644)]?[_0x5e0e46(-_0x251976._0x24f277,-_0x251976._0x494739,-_0x251976._0x2d1f99,-0x7c)]:[];})['join']('\x0a\x0a');}function getToolUseBlocks(_0x23837b){const _0x3775d4={_0x2f1be2:0x107,_0x46af77:0xeb,_0x26d217:0x377,_0x252dcc:0x391,_0x229737:0x37c},_0x4e6433={_0x406fe2:0x1a1};function _0x2321e8(_0x3e407f,_0x31bc1e,_0x2d7b70,_0x5f94bb){return _0x427d(_0x31bc1e-0x2d7,_0x3e407f);}function _0x197e54(_0x4b0f64,_0x781c44,_0x172f18,_0xb3fb30){return _0x427d(_0xb3fb30- -_0x4e6433._0x406fe2,_0x4b0f64);}return normalizeContent(_0x23837b?.[_0x197e54(-_0x3775d4._0x2f1be2,-0xfa,-0xde,-_0x3775d4._0x46af77)])[_0x2321e8(_0x3775d4._0x26d217,_0x3775d4._0x252dcc,_0x3775d4._0x229737,0x3a2)](_0x7b5797=>_0x7b5797['type']==='tool_use');}function getToolResultBlocks(_0x145504){const _0x3e9185={_0x117605:0x156,_0x79cf75:0x15f,_0x4434ca:0x14c,_0x5aa7e4:0x145},_0x401b1f={_0x488d22:0x215};function _0x3ead95(_0x51ea23,_0x14152f,_0x56c69a,_0x4247ac){return _0x427d(_0x56c69a-0x7c,_0x14152f);}function _0x2e2905(_0x24b771,_0x4668bd,_0x561474,_0xd9630d){return _0x427d(_0x4668bd- -_0x401b1f._0x488d22,_0x561474);}return normalizeContent(_0x145504?.[_0x2e2905(-_0x3e9185._0x117605,-_0x3e9185._0x79cf75,-0x165,-_0x3e9185._0x4434ca)])[_0x2e2905(-0x13e,-0x15b,-_0x3e9185._0x5aa7e4,-0x16f)](_0x2ea0ff=>_0x2ea0ff[_0x2e2905(-0x170,-0x16a,-0x16e,-0x175)]==='tool_result');}function createToolResultUserMessage(_0x33b40a){const _0x480b81={_0x573f36:0xd7,_0x29ba45:0xb4,_0x576d92:0xcf},_0x5ef32f={_0x2ff836:0x5b,_0x4094e4:0x27d,_0x1d082d:0x26d,_0x530068:0x251,_0x389616:0x276,_0x345486:0x28a,_0x18cec1:0x31,_0x460c12:0x1a},_0x4af80b={_0x211654:0x5f},_0x2b370a={_0x2e4dcb:0x19e};function _0x15bd72(_0x5a4296,_0x400a9d,_0xb7b61b,_0x380033){return _0x427d(_0xb7b61b- -_0x2b370a._0x2e4dcb,_0x5a4296);}return{'role':_0x15bd72(-_0x480b81._0x573f36,-_0x480b81._0x29ba45,-_0x480b81._0x576d92,-0xca),'content':_0x33b40a['map'](_0x5b8b09=>{const _0x2eec7d={_0x299cd4:0x18e,_0x962bb0:0x96,_0x403ae3:0xe5};function _0x1bf5ed(_0x2a8078,_0x2658d1,_0x3d1269,_0x12e5bd){return _0x15bd72(_0x3d1269,_0x2658d1-_0x2eec7d._0x299cd4,_0x2a8078-_0x2eec7d._0x962bb0,_0x12e5bd-_0x2eec7d._0x403ae3);}function _0x45ccfa(_0x110e0c,_0x5cc510,_0x3b13eb,_0x378aa1){return _0x15bd72(_0x3b13eb,_0x5cc510-0x79,_0x110e0c- -0x195,_0x378aa1-_0x4af80b._0x211654);}return{'type':_0x1bf5ed(-0x59,-0x6c,-0x74,-_0x5ef32f._0x2ff836),'tool_use_id':_0x5b8b09[_0x1bf5ed(-0x33,-0x43,-0x26,-0x16)],'content':_0x5b8b09[_0x45ccfa(-_0x5ef32f._0x4094e4,-0x291,-0x288,-0x265)]??_0x5b8b09[_0x45ccfa(-_0x5ef32f._0x1d082d,-0x271,-0x287,-_0x5ef32f._0x530068)],'is_error':_0x5b8b09[_0x45ccfa(-_0x5ef32f._0x389616,-0x28b,-0x292,-_0x5ef32f._0x345486)]===_0x1bf5ed(-_0x5ef32f._0x18cec1,-0x24,-0x4e,-_0x5ef32f._0x460c12)};})};}var INTERRUPTED_TOOL_RESULT_TEXT='Tool\x20execution\x20was\x20interrupted\x20before\x20completion\x20and\x20produced\x20no\x20result.';function synthesizeMissingToolResults(_0x334bd){const _0x53e8f5={_0x3aa694:0x469,_0x4f9d1f:0x14f,_0x71a3f7:0x15b,_0x3e0c7c:0x14e,_0x534fd5:0x140,_0x2e3f74:0x151,_0x2cb207:0x15a,_0xf5d8a8:0x450,_0x3d1cc9:0x461,_0x465548:0x46a,_0x241861:0x446,_0x2d93be:0x464,_0x5ec555:0x431,_0x56e0de:0x448},_0x5ca549={_0xf07351:0x38d},_0x4d63e2=new Set();for(const _0x2b9f37 of _0x334bd){for(const _0x5fee1a of getToolResultBlocks(_0x2b9f37)){_0x4d63e2['add'](_0x5fee1a[_0x331577(0x46a,0x45a,_0x53e8f5._0x3aa694,0x457)]);}}function _0x2f9d46(_0x43d0c6,_0x2d86a9,_0xc42414,_0x4057e8){return _0x427d(_0x2d86a9- -0x20b,_0x4057e8);}function _0x331577(_0x55254d,_0x52d370,_0x4ca2dd,_0x1666fa){return _0x427d(_0x55254d-_0x5ca549._0xf07351,_0x4ca2dd);}const _0x355874=[];for(const _0x216a4d of _0x334bd){_0x355874[_0x2f9d46(-_0x53e8f5._0x4f9d1f,-0x164,-_0x53e8f5._0x71a3f7,-_0x53e8f5._0x3e0c7c)](_0x216a4d);const _0x2af8ea=getToolUseBlocks(_0x216a4d)[_0x2f9d46(-_0x53e8f5._0x534fd5,-_0x53e8f5._0x2e3f74,-_0x53e8f5._0x2cb207,-0x138)](_0x3ce4d7=>!_0x4d63e2['has'](_0x3ce4d7['id']));if(_0x2af8ea['length']===0x0)continue;_0x355874['push']({'role':_0x331577(0x45c,_0x53e8f5._0xf5d8a8,_0x53e8f5._0x3d1cc9,_0x53e8f5._0x465548),'content':_0x2af8ea['map'](_0xbafbc3=>({'type':_0x2f9d46(-0x177,-0x15c,-0x160,-0x150),'tool_use_id':_0xbafbc3['id'],'content':INTERRUPTED_TOOL_RESULT_TEXT,'is_error':!![]}))});for(const _0x407ff4 of _0x2af8ea){_0x4d63e2[_0x331577(_0x53e8f5._0x241861,_0x53e8f5._0x2d93be,_0x53e8f5._0x5ec555,_0x53e8f5._0x56e0de)](_0x407ff4['id']);}}return _0x355874;}export{createTextBlock,normalizeTextBlock,normalizeContent,normalizeSystem,normalizeMessage,compileRequest,toChatRequest,toModelRequest,toProviderModelRequest,toChatResponse,toModelResponse,responseToAssistantMessage,createReasoningMessage,createAssistantTextMessage,createToolUseMessage,getTextFromMessage,getReasoningTextFromMessage,getToolUseBlocks,getToolResultBlocks,createToolResultUserMessage,INTERRUPTED_TOOL_RESULT_TEXT,synthesizeMissingToolResults};
|
package/dist/chunk-X7VAACWY.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c6596,_0x29fe64){var _0xcc2b98={_0x2aff23:0x88,_0x44a923:0xe6,_0x48a128:0xe9,_0x375016:0xe0,_0x114a95:0xd8,_0x23d2d5:0xe5,_0x282567:0xe7,_0x4567b6:0xef},_0x567ee1={_0x4ab9cb:0x6},_0x58c8f3={_0x179c48:0x67},_0x4d443c=_0x5c6596();function _0x35ae95(_0x54e05c,_0x1e8f19,_0x55af6d,_0x41779e){return _0x2f72(_0x41779e- -_0x58c8f3._0x179c48,_0x55af6d);}function _0x399001(_0xf258f4,_0x22d447,_0x56c6f1,_0x18663d){return _0x2f72(_0x56c6f1- -_0x567ee1._0x4ab9cb,_0xf258f4);}while(!![]){try{var _0x4f7c4a=-parseInt(_0x35ae95(0x7e,_0xcc2b98._0x2aff23,0x8c,0x82))/0x1*(-parseInt(_0x399001(0xee,_0xcc2b98._0x44a923,0xea,0xec))/0x2)+-parseInt(_0x399001(0xea,0xe5,_0xcc2b98._0x48a128,0xea))/0x3*(-parseInt(_0x399001(0xe1,0xe1,_0xcc2b98._0x375016,_0xcc2b98._0x114a95))/0x4)+parseInt(_0x399001(0xde,0xe8,_0xcc2b98._0x23d2d5,0xe0))/0x5+parseInt(_0x399001(_0xcc2b98._0x44a923,0xdf,_0xcc2b98._0x282567,_0xcc2b98._0x4567b6))/0x6+-parseInt(_0x399001(0xd8,0xe6,0xdf,0xe5))/0x7*(parseInt(_0x399001(0xd5,0xd6,0xdc,0xd2))/0x8)+-parseInt(_0x399001(0xd1,0xdd,0xd8,0xd7))/0x9+parseInt(_0x399001(0xe3,0xe6,0xe6,0xe9))/0xa;if(_0x4f7c4a===_0x29fe64)break;else _0x4d443c['push'](_0x4d443c['shift']());}catch(_0x30a8ec){_0x4d443c['push'](_0x4d443c['shift']());}}}(_0x17ed,0x246c5));function _0x2f72(_0x2df293,_0x134c77){_0x2df293=_0x2df293-0xde;var _0x17edee=_0x17ed();var _0x2f728d=_0x17edee[_0x2df293];if(_0x2f72['JghZuE']===undefined){var _0x1bfdbc=function(_0x1ec458){var _0x33a563='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x517216='',_0x8639fc='';for(var _0x19527c=0x0,_0x15629c,_0x4f4256,_0x228f8a=0x0;_0x4f4256=_0x1ec458['charAt'](_0x228f8a++);~_0x4f4256&&(_0x15629c=_0x19527c%0x4?_0x15629c*0x40+_0x4f4256:_0x4f4256,_0x19527c++%0x4)?_0x517216+=String['fromCharCode'](0xff&_0x15629c>>(-0x2*_0x19527c&0x6)):0x0){_0x4f4256=_0x33a563['indexOf'](_0x4f4256);}for(var _0x3a2c4c=0x0,_0x538ab8=_0x517216['length'];_0x3a2c4c<_0x538ab8;_0x3a2c4c++){_0x8639fc+='%'+('00'+_0x517216['charCodeAt'](_0x3a2c4c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x8639fc);};_0x2f72['apBofu']=_0x1bfdbc,_0x2f72['MXngfV']={},_0x2f72['JghZuE']=!![];}var _0x189324=_0x17edee[0x0],_0x1e998f=_0x2df293+_0x189324,_0x3fab76=_0x2f72['MXngfV'][_0x1e998f];return!_0x3fab76?(_0x2f728d=_0x2f72['apBofu'](_0x2f728d),_0x2f72['MXngfV'][_0x1e998f]=_0x2f728d):_0x2f728d=_0x3fab76,_0x2f728d;}function _0x3f799e(_0x4d6e50,_0x4adc43,_0x8a600b,_0x25e437){return _0x2f72(_0x4d6e50- -0x277,_0x4adc43);}var OperationAbortedError=class extends Error{[_0x3f799e(-0x193,-0x197,-0x19a,-0x19c)]=_0x3f799e(-0x186,-0x17e,-0x184,-0x18e);constructor(_0x517216='Operation\x20aborted'){var _0x70d82e={_0x17f067:0x4a9,_0x1332a5:0x4a2,_0x5cea7a:0x4ac,_0x39f4ee:0x4b2},_0x2515cb={_0x306c75:0x98},_0x5c3237={_0x4a6b60:0xb,_0x30fd29:0x7f};function _0x197adf(_0x156578,_0x2773a3,_0x5de432,_0x3c9652){return _0x3f799e(_0x2773a3-0xba,_0x3c9652,_0x5de432-_0x5c3237._0x4a6b60,_0x3c9652-_0x5c3237._0x30fd29);}function _0x4ec261(_0x414420,_0x364be4,_0x369851,_0x1caf9f){return _0x4cf950(_0x414420-0x35,_0x1caf9f,_0x369851-_0x2515cb._0x306c75,_0x364be4-0x6d8);}super(_0x517216),this[_0x4ec261(0x49f,_0x70d82e._0x17f067,0x4a9,0x4aa)]=_0x4ec261(_0x70d82e._0x1332a5,_0x70d82e._0x5cea7a,_0x70d82e._0x39f4ee,0x4a7);}};function toAbortError(_0x8639fc){var _0x398056={_0x1c7bae:0x3a0,_0x73ab8f:0x335,_0x2aedb9:0x32e},_0x20aa1f={_0x20cde9:0x556},_0xa935c1={_0x258320:0x91,_0x462d10:0x1d2,_0x354c13:0x5bd};if(isAbortError(_0x8639fc))return _0x8639fc;if(_0x8639fc instanceof Error)return new OperationAbortedError(_0x8639fc['message']);if(typeof _0x8639fc===_0x31cec0(_0x398056._0x1c7bae,0x38f,0x397,0x398)&&_0x8639fc[_0x265a04(_0x398056._0x73ab8f,0x328,0x327,_0x398056._0x2aedb9)]>0x0)return new OperationAbortedError(_0x8639fc);function _0x31cec0(_0x4dea44,_0x2994b2,_0x367b54,_0x2b44a4){return _0x4cf950(_0x4dea44-_0xa935c1._0x258320,_0x2994b2,_0x367b54-_0xa935c1._0x462d10,_0x2b44a4-_0xa935c1._0x354c13);}function _0x265a04(_0x1fbf3b,_0x4493de,_0x511504,_0x1e4e7d){return _0x4cf950(_0x1fbf3b-0x1a3,_0x511504,_0x511504-0x187,_0x1e4e7d-_0x20aa1f._0x20cde9);}return new OperationAbortedError();}function isAbortError(_0x19527c){var _0x352eaf={_0x589fe6:0x1be,_0xb1acf1:0x1cd,_0x491773:0xb6,_0x37810d:0xb1},_0x677eb4={_0x3d26ed:0xbc},_0xd0b745={_0xc8974:0x1e2};function _0x3cd56f(_0x55c7e3,_0x145f42,_0x3c352e,_0x5eed0d){return _0x3f799e(_0x5eed0d- -0x2f,_0x3c352e,_0x3c352e-_0xd0b745._0xc8974,_0x5eed0d-0x30);}function _0x211464(_0x3a9540,_0x6356c3,_0x28854e,_0x54fda6){return _0x4cf950(_0x3a9540-0x1b2,_0x54fda6,_0x28854e-_0x677eb4._0x3d26ed,_0x6356c3-0x2e1);}return _0x19527c instanceof OperationAbortedError||_0x19527c instanceof Error&&(_0x19527c['name']===_0x3cd56f(-_0x352eaf._0x589fe6,-_0x352eaf._0xb1acf1,-0x1cc,-0x1c3)||_0x211464(0xb1,_0x352eaf._0x491773,0xb6,_0x352eaf._0x37810d)in _0x19527c&&_0x19527c['code']==='ABORT_ERR');}function throwIfAborted(_0x15629c){var _0x1f0a4a={_0x4f1cf2:0x181,_0x37c1d1:0x16a,_0x13d6fe:0x168},_0x2c1e4e={_0x4788e4:0x16a},_0x451948={_0x3c2813:0x191};if(!_0x15629c?.[_0x266f1c(-0x17a,-0x17c,-_0x1f0a4a._0x4f1cf2,-0x17b)])return;function _0x266f1c(_0x440d2c,_0x4f30c7,_0x579b84,_0x1cfb11){return _0x3f799e(_0x440d2c-0x1e,_0x579b84,_0x579b84-_0x451948._0x3c2813,_0x1cfb11-0x101);}function _0x9c1b69(_0x1d9356,_0x135a42,_0x421a73,_0x1ed1b5){return _0x4cf950(_0x1d9356-0x18a,_0x421a73,_0x421a73-_0x2c1e4e._0x4788e4,_0x1ed1b5-0x24f);}throw toAbortError(_0x15629c[_0x266f1c(-0x16b,-_0x1f0a4a._0x37c1d1,-_0x1f0a4a._0x13d6fe,-0x174)]);}function _0x4cf950(_0x5069ec,_0x43eb41,_0x2c7485,_0x550fbf){var _0x192e4b={_0xe8192:0x30f};return _0x2f72(_0x550fbf- -_0x192e4b._0xe8192,_0x43eb41);}function addAbortListener(_0x4f4256,_0x228f8a){var _0x2a6f72={_0x521417:0x2a,_0x53aebc:0x31,_0x26a1ba:0x22,_0x19a776:0x27,_0x275878:0x29,_0x46beb2:0x3b},_0x30e00d={_0x3bd6ee:0x2d1,_0x3384f5:0x2db},_0x5f468d={_0x4ddda1:0x164};if(!_0x4f4256)return()=>{};if(_0x4f4256[_0x2c6d83(-0x33,-_0x2a6f72._0x521417,-0x2c,-_0x2a6f72._0x53aebc)])return _0x228f8a(),()=>{};const _0x3a2c4c=()=>{_0x228f8a();};function _0x2c6d83(_0xcfa568,_0x16105a,_0xacac03,_0x3302a1){return _0x4cf950(_0xcfa568-0x3,_0xacac03,_0xacac03-0x1dc,_0xcfa568-0x1fd);}_0x4f4256[_0x2c6d83(-_0x2a6f72._0x521417,-_0x2a6f72._0x26a1ba,-0x2a,-_0x2a6f72._0x19a776)](_0x2c6d83(-0x31,-0x3b,-_0x2a6f72._0x275878,-_0x2a6f72._0x46beb2),_0x3a2c4c,{'once':!![]});function _0x45b35b(_0x10aadc,_0x5f0fe3,_0x49a357,_0x2bbb51){return _0x4cf950(_0x10aadc-_0x5f468d._0x4ddda1,_0x2bbb51,_0x49a357-0x156,_0x10aadc-0x69a);}return()=>{var _0x51e2cd={_0x19203a:0x30b};function _0x18a5d7(_0x2fd3ef,_0x2ab927,_0x1d7825,_0x5dbf30){return _0x2c6d83(_0x2ab927-_0x51e2cd._0x19203a,_0x2ab927-0xad,_0x5dbf30,_0x5dbf30-0x75);}_0x4f4256['removeEventListener'](_0x18a5d7(0x2e1,0x2da,_0x30e00d._0x3bd6ee,_0x30e00d._0x3384f5),_0x3a2c4c);};}function _0x17ed(){var _0x39ad12=['ywjVCNq','mtzwD1HAseu','qwjVCNrfCNjVCG','y29Kzq','ntyWnZKXqKflwKLA','mtG0nhPWyLrOza','BgvUz3rO','ywrKrxzLBNrmAxn0zw5LCG','nZCWmZjbCuzNtMG','C3rYAw5N','nZa4nJqWww1IsMnP','mtaZmtm1meH2uhvztq','ndyZotaYrMzUuw9p','CMvHC29U','ntCWwvnKzKzn','neXlEKP2yW','qujpuLrFrvjs','mJi4otC3mwLvvMLMwa','ywjVCNrLza','BMfTzq'];_0x17ed=function(){return _0x39ad12;};return _0x17ed();}export{OperationAbortedError,toAbortError,isAbortError,throwIfAborted,addAbortListener};
|
package/dist/formats/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d4f59,_0x47a057){const _0x1fe069={_0x2468cc:0x24e,_0x4121d3:0x95,_0xcbd8d1:0x9c,_0x3ac6d6:0x262,_0x5de5bf:0x266,_0x411982:0x261,_0x2fdfc7:0x259,_0x16d718:0x253,_0x584945:0x257,_0x4dc09e:0x257,_0x4390a6:0x261,_0xed335c:0x264,_0x2dbfa7:0x94,_0x6f20b2:0xa3,_0x4b2166:0xa0,_0x108ae2:0x246},_0x40bf41={_0x5d660c:0x142};function _0x4ddd75(_0x27a4dc,_0x123979,_0x71c3d3,_0x411ef4){return _0x7a35(_0x71c3d3- -_0x40bf41._0x5d660c,_0x123979);}const _0x553c44=_0x1d4f59();function _0x1224d8(_0x159b59,_0x22344c,_0x4e5764,_0x3daeee){return _0x7a35(_0x3daeee-0x76,_0x22344c);}while(!![]){try{const _0x5179e6=parseInt(_0x1224d8(0x24b,0x24e,_0x1fe069._0x2468cc,0x250))/0x1*(parseInt(_0x4ddd75(_0x1fe069._0x4121d3,0xa2,_0x1fe069._0xcbd8d1,0x93))/0x2)+parseInt(_0x1224d8(0x26d,0x26d,0x258,_0x1fe069._0x3ac6d6))/0x3+parseInt(_0x1224d8(_0x1fe069._0x5de5bf,_0x1fe069._0x3ac6d6,_0x1fe069._0x411982,0x264))/0x4+-parseInt(_0x1224d8(_0x1fe069._0x2fdfc7,0x259,_0x1fe069._0x16d718,_0x1fe069._0x584945))/0x5+-parseInt(_0x1224d8(0x251,0x251,_0x1fe069._0x4dc09e,0x259))/0x6*(parseInt(_0x1224d8(_0x1fe069._0x4390a6,0x263,_0x1fe069._0xed335c,0x25e))/0x7)+parseInt(_0x4ddd75(_0x1fe069._0x2dbfa7,0x96,0x9a,_0x1fe069._0x6f20b2))/0x8+-parseInt(_0x4ddd75(_0x1fe069._0x4b2166,0xa7,0xa9,0xa3))/0x9*(parseInt(_0x1224d8(_0x1fe069._0x108ae2,0x251,0x259,0x24e))/0xa);if(_0x5179e6===_0x47a057)break;else _0x553c44['push'](_0x553c44['shift']());}catch(_0xc0dc11){_0x553c44['push'](_0x553c44['shift']());}}}(_0x489b,0x770d0));import{toOpenAiResponsesRequest}from'../chunk-NHBKADBW.js';import'../chunk-NYZR4XKO.js';import{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toProviderModelRequest}from'../chunk-QDOE7NWO.js';var DATA_URI_REGEX=/data:(image\/(?:png|jpeg|jpg|gif|webp));base64,([A-Za-z0-9+/\r\n]+={0,2})/g;function normalizeMediaType(_0x1e9528){const _0x48875c={_0x36b120:0x159,_0x5908d5:0x157},_0x24fa82={_0x4ab3ce:0x33c},_0x20510e={_0x338dc9:0x258};function _0x1ccf23(_0x56f3e5,_0x236d47,_0x26a2c5,_0x7c461e){return _0x7a35(_0x26a2c5- -_0x20510e._0x338dc9,_0x236d47);}function _0x5e5e75(_0x527c17,_0x50e2bd,_0x1a673a,_0x4eda2e){return _0x7a35(_0x4eda2e- -_0x24fa82._0x4ab3ce,_0x1a673a);}return _0x1e9528===_0x1ccf23(-0x75,-0x69,-0x74,-0x7b)?_0x5e5e75(-0x161,-_0x48875c._0x36b120,-0x15a,-_0x48875c._0x5908d5):_0x1e9528;}function isValidBase64(_0x25e093){const _0x4c9646={_0x377ca1:0x1bd,_0x5efe3f:0x1b4,_0x5eef51:0x251,_0xc4554c:0x248,_0x346089:0x24a},_0x1674b2={_0x3a1bca:0x5b};function _0x35927f(_0x4360db,_0x356038,_0x489dfb,_0x3e210b){return _0x7a35(_0x489dfb- -0x393,_0x3e210b);}if(_0x25e093['length']===0x0||_0x25e093[_0x35927f(-_0x4c9646._0x377ca1,-_0x4c9646._0x5efe3f,-0x1b3,-0x1b5)]%0x4!==0x0)return![];function _0x3b5db7(_0x2ec1ba,_0x22f287,_0x1f555a,_0x3f7272){return _0x7a35(_0x1f555a-_0x1674b2._0x3a1bca,_0x22f287);}return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/[_0x3b5db7(_0x4c9646._0x5eef51,0x242,_0x4c9646._0xc4554c,_0x4c9646._0x346089)](_0x25e093);}function collectImageMatches(_0x4d9645){const _0x1be7c6={_0x1782c8:0x10f,_0x532324:0xcb,_0x30261e:0xc2,_0x547d29:0xce,_0x2afc0d:0xd5,_0x460e28:0x112,_0x5dec8:0x117,_0x32499d:0x114,_0x175af4:0x108},_0xf08dd6={_0x5631a1:0x3db};DATA_URI_REGEX[_0x2cf842(_0x1be7c6._0x1782c8,0x115,0x11a,0x10f)]=0x0;function _0x2cf842(_0x3b6136,_0x308e80,_0x32b68b,_0x9dca22){return _0x7a35(_0x3b6136- -0xd8,_0x9dca22);}function _0x46122e(_0x1533e4,_0x303129,_0x17b8dd,_0x206222){return _0x7a35(_0x1533e4- -0x2ad,_0x206222);}return Array[_0x46122e(-_0x1be7c6._0x532324,-_0x1be7c6._0x30261e,-_0x1be7c6._0x547d29,-_0x1be7c6._0x2afc0d)](_0x4d9645['matchAll'](DATA_URI_REGEX))[_0x2cf842(_0x1be7c6._0x460e28,_0x1be7c6._0x5dec8,_0x1be7c6._0x32499d,_0x1be7c6._0x175af4)](_0x5da65e=>{const _0x975041=(_0x5da65e[0x2]??'')[_0x5a8213(0x3d7,0x3dd,0x3cf,_0xf08dd6._0x5631a1)](/[\r\n]/g,'');function _0x5a8213(_0x181a66,_0x251a40,_0x34a2f3,_0x6b9876){return _0x46122e(_0x6b9876-0x49f,_0x251a40-0x1dd,_0x34a2f3-0x1,_0x181a66);}return isValidBase64(_0x975041);});}function hasPastedImages(_0x48b997){const _0x4da5a4={_0x1e85f2:0x3cf};function _0x13b55e(_0x5bb6b7,_0x32d761,_0x364cf9,_0x1565cd){return _0x7a35(_0x364cf9-0x1e7,_0x32d761);}return collectImageMatches(_0x48b997)[_0x13b55e(0x3c0,_0x4da5a4._0x1e85f2,0x3c7,0x3cd)]>0x0;}function contentFromPastedText(_0x2df801){const _0x5b841a={_0x5f072f:0x24,_0x24011f:0x1f,_0x545e7e:0x23,_0x5d1575:0x16,_0x5bf884:0x16,_0x5c95ea:0x25,_0xab37c0:0x455,_0x396caa:0x44a,_0x59b9cb:0x458,_0x2e9b02:0x45c,_0x52b84f:0x44f,_0x357c9e:0x457,_0x17b217:0x29,_0x5e53b1:0x18,_0x22e407:0x22,_0x3ec9d3:0x24,_0x54f67e:0x1a,_0x20974e:0x458,_0x9b1de3:0x44c,_0x9eb6a9:0x457,_0x7fb299:0x12,_0x30ad7b:0x10,_0x17948a:0x1f},_0x369411={_0x3843cb:0x1fe},_0x1d3191=collectImageMatches(_0x2df801);function _0x3d39a7(_0x3a6fed,_0x23cfce,_0x2fd1c6,_0x4926b6){return _0x7a35(_0x23cfce-0x26f,_0x4926b6);}const _0x4cf8c6=[];let _0x579e1e=0x0;for(const _0x58aedf of _0x1d3191){const _0x5a3b45=_0x58aedf[_0x212bcf(-0x25,-_0x5b841a._0x5f072f,-0x24,-0x1a)]??0x0,[_0x5d5489,_0xba3bf9,_0x45352b]=_0x58aedf;_0x5a3b45>_0x579e1e&&_0x4cf8c6[_0x212bcf(-_0x5b841a._0x24011f,-_0x5b841a._0x545e7e,-0x20,-_0x5b841a._0x5d1575)]({'type':'text','text':_0x2df801['slice'](_0x579e1e,_0x5a3b45)}),_0x4cf8c6[_0x212bcf(-0x1f,-_0x5b841a._0x5bf884,-0x19,-_0x5b841a._0x5c95ea)]({'type':_0x3d39a7(_0x5b841a._0xab37c0,_0x5b841a._0x396caa,0x451,0x447),'source':{'type':'base64','media_type':normalizeMediaType(_0xba3bf9),'data':_0x45352b[_0x3d39a7(0x460,_0x5b841a._0x59b9cb,_0x5b841a._0x2e9b02,0x461)](/[\r\n]/g,'')}}),_0x579e1e=_0x5a3b45+_0x5d5489[_0x3d39a7(0x44c,_0x5b841a._0x52b84f,_0x5b841a._0x357c9e,0x445)];}function _0x212bcf(_0x1aa9c4,_0x645132,_0x3f13e7,_0xdf7864){return _0x7a35(_0x1aa9c4- -_0x369411._0x3843cb,_0x3f13e7);}return _0x579e1e<_0x2df801[_0x212bcf(-0x1e,-_0x5b841a._0x17b217,-_0x5b841a._0x5e53b1,-_0x5b841a._0x22e407)]&&_0x4cf8c6[_0x212bcf(-_0x5b841a._0x24011f,-_0x5b841a._0x3ec9d3,-0x17,-_0x5b841a._0x54f67e)]({'type':'text','text':_0x2df801[_0x3d39a7(_0x5b841a._0x20974e,_0x5b841a._0x9b1de3,_0x5b841a._0x9eb6a9,0x452)](_0x579e1e)}),_0x4cf8c6[_0x212bcf(-0x1e,-0x1e,-0x1d,-_0x5b841a._0x7fb299)]>0x0?_0x4cf8c6:[{'type':_0x212bcf(-0x18,-_0x5b841a._0x30ad7b,-0x1d,-_0x5b841a._0x17948a),'text':_0x2df801}];}function _0x7a35(_0x383c70,_0x48b155){_0x383c70=_0x383c70-0x1d8;const _0x489bb7=_0x489b();let _0x7a3538=_0x489bb7[_0x383c70];if(_0x7a35['mXlPoR']===undefined){var _0x27f761=function(_0xcb19e3){const _0x167d9a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e9528='',_0x25e093='';for(let _0x4d9645=0x0,_0x5da65e,_0x975041,_0x48b997=0x0;_0x975041=_0xcb19e3['charAt'](_0x48b997++);~_0x975041&&(_0x5da65e=_0x4d9645%0x4?_0x5da65e*0x40+_0x975041:_0x975041,_0x4d9645++%0x4)?_0x1e9528+=String['fromCharCode'](0xff&_0x5da65e>>(-0x2*_0x4d9645&0x6)):0x0){_0x975041=_0x167d9a['indexOf'](_0x975041);}for(let _0x2df801=0x0,_0x1d3191=_0x1e9528['length'];_0x2df801<_0x1d3191;_0x2df801++){_0x25e093+='%'+('00'+_0x1e9528['charCodeAt'](_0x2df801)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x25e093);};_0x7a35['ysUzkF']=_0x27f761,_0x7a35['afzSnZ']={},_0x7a35['mXlPoR']=!![];}const _0x1b2eb3=_0x489bb7[0x0],_0x1a1610=_0x383c70+_0x1b2eb3,_0x1c4807=_0x7a35['afzSnZ'][_0x1a1610];return!_0x1c4807?(_0x7a3538=_0x7a35['ysUzkF'](_0x7a3538),_0x7a35['afzSnZ'][_0x1a1610]=_0x7a3538):_0x7a3538=_0x1c4807,_0x7a3538;}export{INTERRUPTED_TOOL_RESULT_TEXT,compileRequest,contentFromPastedText,createAssistantTextMessage,createReasoningMessage,createTextBlock,createToolResultUserMessage,createToolUseMessage,getReasoningTextFromMessage,getTextFromMessage,getToolResultBlocks,getToolUseBlocks,hasPastedImages,normalizeContent,normalizeMessage,normalizeSystem,normalizeTextBlock,responseToAssistantMessage,synthesizeMissingToolResults,toChatRequest,toChatResponse,toModelRequest,toModelResponse,toOpenAiResponsesRequest,toProviderModelRequest};function _0x489b(){const _0x55b788=['zMLSDgvY','mte4ohblywvgwq','mtG3odG3m0jVvxfqvq','DgvZDa','mJC2oti3mLrcD01QsW','mJuXmfvuzKjfEG','Aw5KzxG','ntyWnZbfBgX1tfi','Aw1Hz2u','otG1mJmYq2TwtfP0','C2XPy2u','mJbvExHurKK','ChvZAa','BgvUz3rO','ndu0otCYnuHjwNveEq','zNjVBq','nNbxuvvpAa','Aw1Hz2uVANbN','Aw1Hz2uVANbLzW','Dgv4Da','BgfZDeLUzgv4','ndaWmJi3ofnsswDHtq','CMvWBgfJzq'];_0x489b=function(){return _0x55b788;};return _0x489b();}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xeb76(){const _0x56e9bd=['CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','C3rHDgu','mtq0BNntAKrp','sg9VAYb0Aw1LzcbVDxqGywz0zxiG','CgfYC2u','CgLWzq','ywz0zxjuDxjUq29TCgXLDgu','BMfTzq','C2vZC2LVBKLK','Dg9tDhjPBMC','ntG4ntGWBwD4B09M','DgvZDa','Ag9VAZPtDg9W','A2LSBa','ywXSB3C','AgfZsg9VA3m','zw5Kx3r1CM4','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','C3rKzxjY','CMvHC29U','C3rHDhvZ','z2v0sg9VA3m','mZaXmMHYsu9Oqq','mZq1m2zNs25jAG','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','nJbjs3jeCKm','Ag9VAZPqB3n0vg9VBfvZzq','Dg9VBe5HBwu','BgvUz3rO','yMXVy2S','zgvJAxnPB24','u0Lhs0Lmta','CNvU','uhjLvg9VBfvZzq','DgLTzw91Da','nZuXmJe1m0Hot1vyDG','zxjYB3i','Bwf0y2HLCG','nZiXnJmYswXKsxj3','Ag9VA1nWzwnPzMLJt3v0Chv0','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','ndi0otLwrhrXyLi','Aw5WDxq','mZuWndHHzeTNC0m','BM93','y29Kzq','y2XVC2u','xIG/oG','CMvQzwn0','ywz0zxjuB29SuMvZDwX0','CgfZCW','ug9ZDfrVB2XvC2u','BwfW','tM90AwzPy2f0Aw9U','Ag9VAZPoB3rPzMLJyxrPB24','DhjPBq','B3v0Chv0','B2jZzxj2zxi','zw5K','C3rKAw4','mZCXnJuWy2jZEMLu','Ag9VA3m','qMXVy2TLzcbIEsbqCMvuB29SvxnLigHVB2SGzM9Yia','otfdzhrmsuy','y29TBwfUza','u3rVCa','sg9VAYbIBg9JA2vKigv4zwn1DgLVBG','C3rYAw5NAwz5','ChvZAa','zgf0yq'];_0xeb76=function(){return _0x56e9bd;};return _0xeb76();}(function(_0x412af9,_0x5d7057){const _0x540d2f={_0x3a4f76:0x119,_0x5bfe0a:0x102,_0x3c284f:0xf9,_0x1e0f8d:0x149,_0x2bbb25:0x15a,_0x100a81:0x33f,_0x535854:0x317,_0x288ab9:0x329,_0x5e84a7:0x32f,_0x5d2bd7:0x302,_0x10494d:0x2f2,_0x5084cb:0x332,_0x1f507d:0x335,_0x3dbbe9:0x340,_0x1b2edf:0x2f9,_0x250abb:0x2f1,_0x5eafb4:0xfd,_0x33924f:0x11b,_0x1b7e93:0x10f,_0x3616fb:0x324,_0x545866:0x12a,_0xe576c8:0x140,_0x51f792:0x134,_0x26e46a:0x33c},_0x47d40f={_0x535bc6:0x93},_0x145a05={_0x285cd1:0x150},_0x453bf0=_0x412af9();function _0x45a49e(_0x5e7b3f,_0x2c494b,_0x2c17d1,_0xae429f){return _0x1f31(_0x2c494b-_0x145a05._0x285cd1,_0xae429f);}function _0x52bb1c(_0x19deb1,_0x16d557,_0x452354,_0x587ecb){return _0x1f31(_0x16d557- -_0x47d40f._0x535bc6,_0x19deb1);}while(!![]){try{const _0x3b9076=parseInt(_0x52bb1c(0x10c,_0x540d2f._0x3a4f76,_0x540d2f._0x5bfe0a,_0x540d2f._0x3c284f))/0x1+parseInt(_0x52bb1c(_0x540d2f._0x1e0f8d,0x15c,0x176,_0x540d2f._0x2bbb25))/0x2+-parseInt(_0x45a49e(_0x540d2f._0x100a81,0x330,0x353,_0x540d2f._0x535854))/0x3*(parseInt(_0x45a49e(_0x540d2f._0x288ab9,_0x540d2f._0x5e84a7,0x336,0x33e))/0x4)+parseInt(_0x45a49e(_0x540d2f._0x5d2bd7,0x30f,0x311,_0x540d2f._0x10494d))/0x5*(-parseInt(_0x45a49e(0x322,_0x540d2f._0x5084cb,_0x540d2f._0x1f507d,_0x540d2f._0x3dbbe9))/0x6)+-parseInt(_0x45a49e(_0x540d2f._0x1b2edf,0x312,0x324,_0x540d2f._0x250abb))/0x7*(-parseInt(_0x52bb1c(_0x540d2f._0x5eafb4,_0x540d2f._0x33924f,0xf8,_0x540d2f._0x1b7e93))/0x8)+parseInt(_0x45a49e(0x324,0x31b,0x329,_0x540d2f._0x3616fb))/0x9*(parseInt(_0x52bb1c(_0x540d2f._0x545866,_0x540d2f._0xe576c8,0x153,_0x540d2f._0x51f792))/0xa)+parseInt(_0x45a49e(0x35e,_0x540d2f._0x26e46a,0x31e,0x34b))/0xb;if(_0x3b9076===_0x5d7057)break;else _0x453bf0['push'](_0x453bf0['shift']());}catch(_0x148235){_0x453bf0['push'](_0x453bf0['shift']());}}}(_0xeb76,0x73f24));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;async function executeCommandHook(_0x3b74a0,_0x133195,_0x30de15=DEFAULT_TIMEOUT_S,_0x10c3be){const _0x1fdf58={_0x576097:0xd2,_0x40935f:0xe0,_0x58a3e5:0x149,_0x449e89:0x14c,_0x553832:0x138,_0x1e8037:0x14d,_0x408c26:0xdd,_0x12a7a3:0xdf,_0x4de621:0x16e,_0x464d8f:0x16b,_0x24bd97:0x159,_0x35d592:0x14c,_0xbde0fa:0xe4,_0x43e96d:0xca,_0x22568b:0xe2,_0x4f05e8:0x15b,_0x5b41f2:0x14b,_0x13181b:0x142,_0x1aa332:0x13b,_0x248592:0x141,_0x36d3c0:0x130,_0x49dfd9:0x142},_0x13345c={_0xb214bb:0x82},_0x5d499e={_0x3209f1:0x582},_0x346db7=Date['now']();return new Promise(_0x3f3c02=>{const _0x1a5d4c={_0x31958c:0x12f},_0xa3ea57={_0x296e24:0x399,_0x2c92aa:0x38b,_0x5ea9a8:0x3d1,_0x31981a:0x3a2,_0x42b0c3:0x3a1,_0x4f10f1:0x3d0,_0x266a54:0x3b5,_0x66c3c0:0x3ef,_0x18350f:0x3cd,_0x3a1cf3:0x291,_0x3f9ea7:0x28a,_0x1f9cb1:0x29d,_0x2c8acb:0x2b0,_0x5f46fd:0x295,_0x5487e9:0x388,_0x13fb6:0x398,_0x307c3a:0x38a,_0x15417b:0x396,_0x2358af:0x2dc,_0x97ad52:0x3aa,_0x45729e:0x373,_0xc086f9:0x391,_0x2f4296:0x2b9},_0x3b97c7={_0x68b8f5:0x25e},_0x520953={_0x3d8309:0x9c,_0x7984d3:0xe4},_0x295974={_0x50ed68:0x326,_0x9df368:0x345,_0x40f010:0x32a,_0x18c152:0x6,_0x9b1853:0x9,_0x355051:0x33,_0x131b78:0x10,_0x438b6c:0x15,_0x4d9911:0x317,_0x512ab2:0x31f,_0x549d7a:0x2fe,_0x56dda4:0x2a,_0x436188:0x44,_0x55a8e5:0x29},_0x2a8f67={_0x1286a5:0x1f3},_0x2055d6={_0x2e964f:0xfc},_0x3f75bc={_0x2934b7:0x82},_0x129160={_0x115ed8:0x199},_0x15d563={_0x1c78a2:0xdb,_0x2ba537:0x88},_0x23ef95=spawn('sh',['-c',_0x3b74a0],{'stdio':[_0x6eefd8(0xb1,_0x1fdf58._0x576097,_0x1fdf58._0x40935f,0xb4),'pipe',_0x39ebc0(0x130,_0x1fdf58._0x58a3e5,_0x1fdf58._0x449e89,_0x1fdf58._0x553832)],'env':{...process['env'],'CLAUDE_PROJECT_DIR':_0x10c3be??process['cwd']()}});let _0x3fc909='',_0x6647fd='';_0x23ef95['stdout']['on'](_0x39ebc0(_0x1fdf58._0x1e8037,0x129,0x146,0x13f),_0x112237=>{_0x3fc909+=_0x112237['toString']();}),_0x23ef95[_0x6eefd8(_0x1fdf58._0x408c26,_0x1fdf58._0x12a7a3,0xe6,0xfa)]['on']('data',_0x2c76c0=>{function _0x17759e(_0x37e7fa,_0x1f7dc1,_0x3a8c26,_0x3a5143){return _0x39ebc0(_0x1f7dc1,_0x1f7dc1-_0x15d563._0x1c78a2,_0x37e7fa-0x411,_0x3a5143-_0x15d563._0x2ba537);}_0x6647fd+=_0x2c76c0[_0x17759e(0x561,0x552,0x55e,_0x5d499e._0x3209f1)]();}),_0x23ef95['stdin']['on'](_0x39ebc0(0x17e,_0x1fdf58._0x4de621,_0x1fdf58._0x464d8f,0x163),_0xc1bbdb=>{function _0x28e218(_0x57dbdc,_0x1ba502,_0x334e3a,_0x3ee467){return _0x39ebc0(_0x57dbdc,_0x1ba502-0x24,_0x3ee467- -_0x129160._0x115ed8,_0x3ee467-0x17);}if(_0xc1bbdb[_0x28e218(-0x50,-_0x13345c._0xb214bb,-0x61,-0x6b)]!=='EPIPE')throw _0xc1bbdb;}),_0x23ef95[_0x39ebc0(0x134,_0x1fdf58._0x24bd97,0x13c,_0x1fdf58._0x35d592)]['write'](JSON[_0x6eefd8(_0x1fdf58._0xbde0fa,_0x1fdf58._0x43e96d,_0x1fdf58._0x22568b,0xce)](_0x133195));function _0x39ebc0(_0xb22b27,_0x490d52,_0x1f6a63,_0x262aae){return _0x1f31(_0x1f6a63- -_0x3f75bc._0x2934b7,_0xb22b27);}_0x23ef95[_0x39ebc0(_0x1fdf58._0x4f05e8,0x12f,0x13c,0x11a)][_0x39ebc0(_0x1fdf58._0x5b41f2,_0x1fdf58._0x13181b,_0x1fdf58._0x1aa332,0x152)]();function _0x6eefd8(_0x53e663,_0x514f83,_0xfa4b0a,_0x54c542){return _0x1f31(_0x514f83- -_0x2055d6._0x2e964f,_0x53e663);}const _0x31f9d8=setTimeout(()=>{const _0x36383a={_0x2bdcd9:0x156};function _0x20bca9(_0x227994,_0x23fcce,_0x53da3c,_0x3007ac){return _0x39ebc0(_0x227994,_0x23fcce-0x29,_0x3007ac- -_0x36383a._0x2bdcd9,_0x3007ac-0x170);}_0x23ef95[_0x140d87(_0x295974._0x50ed68,_0x295974._0x9df368,0x334,_0x295974._0x40f010)](_0x20bca9(-_0x295974._0x18c152,_0x295974._0x9b1853,_0x295974._0x355051,_0x295974._0x131b78));function _0x140d87(_0x372bf6,_0x6ffd1d,_0x2893ad,_0x4c85a8){return _0x6eefd8(_0x2893ad,_0x4c85a8-0x250,_0x2893ad-_0x2a8f67._0x1286a5,_0x4c85a8-0x87);}_0x3f3c02({'status':_0x20bca9(0x23,0x22,0x4,_0x295974._0x438b6c),'error':_0x140d87(_0x295974._0x4d9911,_0x295974._0x512ab2,_0x295974._0x549d7a,0x320)+_0x30de15+'s','duration_ms':Date[_0x20bca9(-_0x295974._0x56dda4,-_0x295974._0x436188,-0x2b,-_0x295974._0x55a8e5)]()-_0x346db7});},_0x30de15*0x3e8);_0x23ef95['on'](_0x39ebc0(_0x1fdf58._0x248592,_0x1fdf58._0x36d3c0,0x12f,_0x1fdf58._0x49dfd9),_0x586cbb=>{clearTimeout(_0x31f9d8);const _0x50c38a=Date[_0x4bebd3(_0xa3ea57._0x296e24,0x36d,0x39e,_0xa3ea57._0x2c92aa)]()-_0x346db7;if(_0x586cbb===0x2){_0x3f3c02({'status':'block','output':{'decision':_0x4bebd3(_0xa3ea57._0x5ea9a8,0x3ca,0x3a6,0x3c2),'reason':_0x6647fd['trim']()||_0x4bebd3(_0xa3ea57._0x31981a,0x39f,0x390,_0xa3ea57._0x42b0c3)},'duration_ms':_0x50c38a});return;}if(_0x586cbb!==0x0){_0x3f3c02({'status':'error','error':_0x4bebd3(_0xa3ea57._0x4f10f1,_0xa3ea57._0x266a54,_0xa3ea57._0x66c3c0,_0xa3ea57._0x18350f)+_0x586cbb+(_0x6647fd[_0x54b216(0x282,0x27e,_0xa3ea57._0x3a1cf3,_0xa3ea57._0x3f9ea7)]()?':\x20'+_0x6647fd[_0x54b216(_0xa3ea57._0x1f9cb1,_0xa3ea57._0x2c8acb,_0xa3ea57._0x3a1cf3,_0xa3ea57._0x5f46fd)]():''),'duration_ms':_0x50c38a});return;}function _0x54b216(_0x26cf43,_0x47beb0,_0x3b6926,_0x3694fb){return _0x39ebc0(_0x26cf43,_0x47beb0-_0x520953._0x3d8309,_0x3b6926-0x159,_0x3694fb-_0x520953._0x7984d3);}function _0x4bebd3(_0x36351c,_0x1e0e86,_0x232a9a,_0x231c85){return _0x39ebc0(_0x232a9a,_0x1e0e86-0xc0,_0x231c85-_0x3b97c7._0x68b8f5,_0x231c85-0x5b);}const _0x5eaa9c=_0x3fc909[_0x4bebd3(_0xa3ea57._0x5487e9,_0xa3ea57._0x13fb6,_0xa3ea57._0x307c3a,_0xa3ea57._0x15417b)]();if(_0x5eaa9c[_0x54b216(0x2df,_0xa3ea57._0x2358af,0x2bc,0x2b2)]===0x0){_0x3f3c02({'status':_0x4bebd3(_0xa3ea57._0x97ad52,0x36e,_0xa3ea57._0x45729e,_0xa3ea57._0xc086f9),'duration_ms':_0x50c38a});return;}try{const _0x698b7c=JSON[_0x54b216(_0xa3ea57._0x2f4296,_0xa3ea57._0x2c8acb,0x2a4,0x2bb)](_0x5eaa9c);_0x3f3c02({'status':'pass','output':_0x698b7c,'duration_ms':_0x50c38a});}catch{_0x3f3c02({'status':'pass','duration_ms':_0x50c38a});}}),_0x23ef95['on']('error',_0x359e33=>{const _0x3fc729={_0x3bca6d:0x102};clearTimeout(_0x31f9d8);function _0x5a01d2(_0x395b5e,_0x250d61,_0x344842,_0x1e11e4){return _0x6eefd8(_0x395b5e,_0x1e11e4- -0x218,_0x344842-0x64,_0x1e11e4-_0x3fc729._0x3bca6d);}_0x3f3c02({'status':_0x5a01d2(-0x11c,-0x132,-_0x1a5d4c._0x31958c,-0x127),'error':_0x359e33['message'],'duration_ms':Date['now']()-_0x346db7});});});}function createHookExtensions(_0x3a1c9f,_0xcaa5a3,_0x430657={}){const _0x49f838={_0x2fa999:0x9e,_0x4968a1:0x28d,_0x55239f:0xaa,_0x51dc40:0xbe,_0x8566f5:0x295,_0x3697ec:0x267,_0x515c08:0x9b,_0x3a27af:0xb7,_0x1f4d34:0xaf,_0x245f24:0x8d,_0x4eebb8:0x299,_0xbf9026:0x297,_0x408cb2:0x292,_0x143792:0xa4,_0x1a4cd4:0x94,_0x614f09:0xb2,_0x46eaee:0x27c,_0x129d9f:0x291,_0x1ff979:0xaf,_0x385e2a:0xa5,_0x554c01:0xb8,_0x64b1d:0xa2,_0x5adb4c:0xa5,_0x1f2b49:0x272},_0x14c131={_0x471862:0x38c,_0x4d55c4:0x22f,_0x388243:0x242,_0x2f761:0x233,_0x1ab1f7:0x230,_0x19904f:0x22c,_0x3dd5f7:0x220,_0x3638db:0x23a,_0xc0c083:0x231,_0x34ef48:0x21e,_0x108ef1:0x236,_0x214c29:0x3ac,_0x1bb8a8:0x376,_0x28397d:0x394},_0x3ca108={_0x53e9b1:0x124,_0x1f2700:0x69,_0x20fec2:0xbb},_0x2263fa={_0x154f29:0x1d1,_0x35d538:0x1db,_0x22211b:0x1b4,_0x155242:0x1a8,_0x86c14e:0x1c2,_0x364caf:0x1f6,_0x6576ce:0x1e0,_0x56aae6:0x1f7,_0x519f74:0x208},_0x1f40db={_0x28bfb9:0x13e},_0x3a914d={_0x5df127:0xdc,_0x1c77ce:0xf6,_0x8a71e2:0x1bf,_0x46bb82:0x1db,_0x4cfc12:0xd6,_0x37abd3:0xbb,_0x13b829:0xda,_0x1fd571:0x106,_0x3113db:0x214,_0x21e6ad:0x202,_0x2489c9:0x1cf,_0x4b794c:0x1fa,_0x232cd0:0x20f,_0x187298:0x1e1,_0x169b48:0x20d,_0x46da43:0x217,_0x5c8df4:0xf7,_0x492550:0xcf},_0x76ce40={_0x1ef40f:0x14a},_0x20f023={_0x58c80c:0xc4},_0x1a510f={_0x1daea8:0x118},_0x52cecd=[];function _0x3ead6c(_0x3fe6dc,_0xeb94af,_0x504878,_0x4aa2d7){return _0x1f31(_0x3fe6dc- -_0x1a510f._0x1daea8,_0x504878);}const {sessionId:_0x4517bd,projectDir:_0x2ae21a}=_0x430657;function _0x4087b5(_0x19f492,_0x282c87,_0x78dcc,_0x37c70f){return _0x1f31(_0x282c87-_0x20f023._0x58c80c,_0x37c70f);}const _0x3933a4=_0x405418=>_0x3a1c9f['hasHooks']?_0x3a1c9f[_0x3ead6c(0xc0,0xc7,0xdc,0xe0)](_0x405418):_0x3a1c9f[_0x3ead6c(0xc6,0xd0,0xdf,0xde)](_0x405418)[_0x3ead6c(0xcd,0xbc,0xbd,0xcf)]>0x0;return _0x3933a4(_0x3ead6c(0x9e,0xab,_0x49f838._0x2fa999,0x9f))&&_0x52cecd[_0x4087b5(0x29b,0x28b,0x2a8,_0x49f838._0x4968a1)]({'id':_0x3ead6c(0xcb,_0x49f838._0x55239f,0xbf,_0x49f838._0x51dc40),'stage':_0x4087b5(_0x49f838._0x8566f5,0x278,0x28d,_0x49f838._0x3697ec),'kind':_0x3ead6c(0xa4,_0x49f838._0x515c08,0xa0,_0x49f838._0x3a27af),'order':0x0,'enabled':!![],'run':async(_0x11b2dc,_0xc608d)=>{function _0x5844b0(_0xea2641,_0x4b63dc,_0x540237,_0x322980){return _0x4087b5(_0xea2641-0xd6,_0xea2641- -0x37e,_0x540237-0x56,_0x322980);}function _0x22b1c9(_0x2025b3,_0x1780d0,_0x322436,_0x55e17c){return _0x3ead6c(_0x322436-0x13d,_0x1780d0-_0x76ce40._0x1ef40f,_0x2025b3,_0x55e17c-0x50);}const _0x40a02c=_0x3a1c9f[_0x5844b0(-_0x3a914d._0x5df127,-0xea,-_0x3a914d._0x1c77ce,-0xef)](_0x22b1c9(0x1c3,_0x3a914d._0x8a71e2,_0x3a914d._0x46bb82,0x1c7),_0x11b2dc[_0x5844b0(-_0x3a914d._0x4cfc12,-0xbd,-0xb6,-_0x3a914d._0x37abd3)]);for(const _0x3978e9 of _0x40a02c){const _0x43b6f6={'tool_name':_0x11b2dc[_0x5844b0(-0xd6,-0xc6,-0xf9,-_0x3a914d._0x13b829)],'tool_input':void 0x0,'tool_output':_0x11b2dc[_0x5844b0(-0xff,-0x107,-_0x3a914d._0x1fd571,-0x10c)],'tool_result_status':_0x11b2dc[_0x22b1c9(0x1f9,_0x3a914d._0x3113db,_0x3a914d._0x21e6ad,0x1f4)],'session_id':_0x4517bd??_0xc608d[_0x22b1c9(_0x3a914d._0x2489c9,_0x3a914d._0x4b794c,0x1ef,_0x3a914d._0x232cd0)][_0x22b1c9(_0x3a914d._0x187298,_0x3a914d._0x169b48,0x1f6,_0x3a914d._0x46da43)]};await _0xcaa5a3(_0x3978e9[_0x5844b0(-_0x3a914d._0x5c8df4,-0xe6,-0xdd,-_0x3a914d._0x1fd571)],_0x43b6f6,_0x3978e9[_0x5844b0(-_0x3a914d._0x492550,-0xb4,-0xd4,-0xc0)],_0x2ae21a);}}}),_0x3933a4('Stop')&&_0x52cecd[_0x3ead6c(_0x49f838._0x1f4d34,_0x49f838._0x245f24,_0x49f838._0x1f4d34,0x91)]({'id':_0x4087b5(0x2a5,_0x49f838._0x4eebb8,_0x49f838._0xbf9026,_0x49f838._0x408cb2),'stage':'beforeFinalOutput','kind':_0x3ead6c(_0x49f838._0x143792,_0x49f838._0x1a4cd4,_0x49f838._0x614f09,0xba),'order':0x0,'enabled':!![],'run':async(_0x54b68e,_0x519dcd)=>{const _0x24b8f7={_0x20721c:0x260,_0x19d897:0x86,_0x55026b:0x130};function _0x25a89e(_0x2e301f,_0x33a776,_0x32e0b8,_0x3ec032){return _0x3ead6c(_0x32e0b8- -_0x24b8f7._0x20721c,_0x33a776-_0x24b8f7._0x19d897,_0x3ec032,_0x3ec032-_0x24b8f7._0x55026b);}const _0x50964a=_0x3a1c9f[_0x875987(_0x2263fa._0x154f29,0x1ea,0x200,0x1ea)](_0x875987(_0x2263fa._0x35d538,0x1d0,0x1b8,0x1c2));function _0x875987(_0x25868d,_0x286810,_0x25b6f1,_0x24f8f1){return _0x3ead6c(_0x286810-0x124,_0x286810-0x99,_0x25b6f1,_0x24f8f1-_0x1f40db._0x28bfb9);}for(const _0x413bc4 of _0x50964a){const _0x241727={'stop_reason':_0x25a89e(-_0x2263fa._0x22211b,-0x18a,-0x19f,-0x19b),'session_id':_0x4517bd??_0x519dcd[_0x25a89e(-_0x2263fa._0x155242,-0x1c9,-0x1ae,-0x1a7)][_0x875987(0x1da,0x1dd,_0x2263fa._0x86c14e,_0x2263fa._0x364caf)]};await _0xcaa5a3(_0x413bc4['command'],_0x241727,_0x413bc4[_0x875987(_0x2263fa._0x6576ce,_0x2263fa._0x56aae6,0x1d5,_0x2263fa._0x519f74)],_0x2ae21a);}}}),_0x3933a4(_0x4087b5(0x27d,_0x49f838._0x46eaee,0x26b,_0x49f838._0x129d9f))&&_0x52cecd[_0x3ead6c(_0x49f838._0x1ff979,_0x49f838._0x385e2a,_0x49f838._0x554c01,_0x49f838._0x64b1d)]({'id':_0x3ead6c(0xa1,_0x49f838._0x3a27af,_0x49f838._0x5adb4c,0x96),'stage':_0x4087b5(_0x49f838._0x1f2b49,0x293,0x2b1,0x270),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x1fd4ba,_0x2621c9)=>{function _0x56fce8(_0x2009b1,_0xf50b36,_0x376a26,_0x4cbcef){return _0x4087b5(_0x2009b1-_0x3ca108._0x53e9b1,_0x376a26- -_0x3ca108._0x1f2700,_0x376a26-_0x3ca108._0x20fec2,_0x2009b1);}function _0x591b2b(_0x20d1bb,_0x4d4d38,_0x249088,_0x16b879){return _0x4087b5(_0x20d1bb-0x14a,_0x249088-0xe5,_0x249088-0x1f1,_0x4d4d38);}const _0x3c15f5=_0x3a1c9f[_0x591b2b(0x39d,0x38e,0x387,_0x14c131._0x471862)]('Notification');for(const _0x47d4b3 of _0x3c15f5){const _0x88b690={'message':_0x56fce8(_0x14c131._0x4d55c4,_0x14c131._0x388243,0x235,0x257),'session_id':_0x4517bd??_0x1fd4ba[_0x56fce8(_0x14c131._0x2f761,_0x14c131._0x1ab1f7,_0x14c131._0x19904f,_0x14c131._0x3dd5f7)]};await _0xcaa5a3(_0x47d4b3[_0x56fce8(_0x14c131._0x3638db,_0x14c131._0xc0c083,_0x14c131._0x34ef48,_0x14c131._0x108ef1)],_0x88b690,_0x47d4b3[_0x591b2b(_0x14c131._0x214c29,_0x14c131._0x1bb8a8,_0x14c131._0x28397d,0x3b3)],_0x2ae21a);}}}),_0x52cecd;}function _0x1f31(_0x494d1e,_0xe3e021){_0x494d1e=_0x494d1e-0x1ac;const _0xeb76c6=_0xeb76();let _0x1f31b6=_0xeb76c6[_0x494d1e];if(_0x1f31['XhBKFq']===undefined){var _0x689e5e=function(_0x124cee){const _0xa5a8e9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b74a0='',_0x133195='';for(let _0x30de15=0x0,_0x10c3be,_0x346db7,_0x3f3c02=0x0;_0x346db7=_0x124cee['charAt'](_0x3f3c02++);~_0x346db7&&(_0x10c3be=_0x30de15%0x4?_0x10c3be*0x40+_0x346db7:_0x346db7,_0x30de15++%0x4)?_0x3b74a0+=String['fromCharCode'](0xff&_0x10c3be>>(-0x2*_0x30de15&0x6)):0x0){_0x346db7=_0xa5a8e9['indexOf'](_0x346db7);}for(let _0x23ef95=0x0,_0x3fc909=_0x3b74a0['length'];_0x23ef95<_0x3fc909;_0x23ef95++){_0x133195+='%'+('00'+_0x3b74a0['charCodeAt'](_0x23ef95)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x133195);};_0x1f31['ObZVLA']=_0x689e5e,_0x1f31['OCVUZA']={},_0x1f31['XhBKFq']=!![];}const _0x48b7cf=_0xeb76c6[0x0],_0x54e0d3=_0x494d1e+_0x48b7cf,_0x214c6c=_0x1f31['OCVUZA'][_0x54e0d3];return!_0x214c6c?(_0x1f31b6=_0x1f31['ObZVLA'](_0x1f31b6),_0x1f31['OCVUZA'][_0x54e0d3]=_0x1f31b6):_0x1f31b6=_0x214c6c,_0x1f31b6;}function createHookOnToolCallMiddleware(_0x4fe611,_0x1df0b9,_0x139608,_0x102ee2={}){const _0x3e4930={_0x18d376:0x1e8,_0x44e24f:0x1cd,_0x568580:0x1d3,_0x4a9c72:0x1dc,_0x86744:0x1de,_0x102741:0x123,_0x3c375a:0x139,_0x121658:0x109,_0x331696:0x1f6,_0xeb5b45:0x1f5,_0x1e9df0:0x1ff,_0x236e28:0x161,_0x919794:0x152,_0x59130c:0x1fe,_0x15715a:0x1f0,_0x169151:0x1ea,_0xf68d34:0x183,_0x74743f:0x160,_0x1c2bab:0x1e2,_0x2d1698:0x14d,_0x3a7f21:0x217,_0x556385:0x1e9,_0x3a1b64:0x1f9,_0x19d791:0x166,_0x21d7ae:0x15f,_0x451d84:0x133,_0x4c2aaa:0x157,_0x290b3c:0x16b,_0x37882b:0x146,_0x1ecb19:0x127,_0x447608:0x153,_0x3b4e7c:0x15c,_0x2e8ebf:0x1fe,_0x58721a:0x1e9,_0x309b01:0x1ee,_0x18c905:0x1f9,_0x2ceed0:0x15c,_0x2ff786:0x163,_0x5ed70b:0x13f,_0x24f392:0x21e,_0xfe690c:0x20d,_0x1786a3:0x169,_0xb3ed92:0x143,_0x4af2ba:0x13f},_0x4ce0fa={_0x318057:0x8a},{sessionId:_0x52abef,projectDir:_0x4cd9a9}=_0x102ee2;return async(_0x4d3736,_0x482441)=>{function _0x56e8d3(_0x2b0078,_0x32befb,_0x4ab153,_0x1ca45f){return _0x1f31(_0x2b0078- -_0x4ce0fa._0x318057,_0x32befb);}const _0x15eaa1=_0x4fe611[_0x6077b2(-0x1db,-0x1fc,-_0x3e4930._0x18d376,-_0x3e4930._0x44e24f)](_0x6077b2(-0x1cf,-_0x3e4930._0x568580,-0x1d5,-0x1c2),_0x4d3736['name']);for(const _0x2cdf2b of _0x15eaa1){const _0x39f851={'tool_name':_0x4d3736[_0x6077b2(-0x1e9,-_0x3e4930._0x4a9c72,-_0x3e4930._0x86744,-0x1fa)],'tool_input':_0x4d3736[_0x56e8d3(_0x3e4930._0x102741,_0x3e4930._0x3c375a,0x132,_0x3e4930._0x121658)],'session_id':_0x52abef},_0x81328b=await _0x1df0b9(_0x2cdf2b[_0x6077b2(-_0x3e4930._0x331696,-_0x3e4930._0xeb5b45,-0x1f3,-_0x3e4930._0x1e9df0)],_0x39f851,_0x2cdf2b[_0x56e8d3(_0x3e4930._0x236e28,0x165,0x184,_0x3e4930._0x919794)],_0x4cd9a9),_0x40676a=_0x81328b[_0x6077b2(-_0x3e4930._0x59130c,-_0x3e4930._0x15715a,-0x1e9,-_0x3e4930._0x169151)]?.[_0x56e8d3(0x166,_0x3e4930._0xf68d34,_0x3e4930._0x74743f,0x185)]?.['permissionDecision'];if(_0x40676a===_0x6077b2(-_0x3e4930._0x1c2bab,-0x1d4,-_0x3e4930._0x86744,-0x1cd))return{'action':_0x56e8d3(0x15f,_0x3e4930._0x2d1698,0x14c,0x146)};if(_0x40676a==='deny')return{'action':_0x6077b2(-0x206,-0x1ed,-_0x3e4930._0x3a7f21,-0x229),'reason':_0x81328b[_0x6077b2(-0x1fe,-_0x3e4930._0x556385,-_0x3e4930._0x3a1b64,-0x1f1)]?.[_0x56e8d3(_0x3e4930._0x19d791,0x151,0x15f,_0x3e4930._0x21d7ae)]?.[_0x56e8d3(0x13f,0x13d,0x157,_0x3e4930._0x451d84)]||_0x56e8d3(_0x3e4930._0x4c2aaa,0x177,_0x3e4930._0x290b3c,0x15b)+_0x4d3736[_0x56e8d3(_0x3e4930._0x37882b,0x164,0x13c,_0x3e4930._0x1ecb19)]};if(_0x81328b[_0x56e8d3(_0x3e4930._0x447608,0x166,0x16c,0x175)]===_0x56e8d3(_0x3e4930._0x3b4e7c,0x13b,0x14f,0x162)||_0x81328b[_0x6077b2(-_0x3e4930._0x2e8ebf,-_0x3e4930._0x58721a,-_0x3e4930._0x309b01,-_0x3e4930._0x18c905)]?.[_0x6077b2(-0x1d2,-0x1e8,-0x1cd,-0x1c7)]===_0x56e8d3(_0x3e4930._0x2ceed0,_0x3e4930._0x2ff786,0x17f,_0x3e4930._0x5ed70b))return{'action':_0x6077b2(-0x206,-0x210,-_0x3e4930._0x24f392,-_0x3e4930._0xfe690c),'reason':_0x81328b['output']?.[_0x56e8d3(0x152,0x14b,_0x3e4930._0x1786a3,_0x3e4930._0xb3ed92)]||_0x56e8d3(0x137,0x129,0x14f,_0x3e4930._0x4af2ba)+_0x4d3736[_0x56e8d3(0x146,0x134,0x15f,0x133)]};}function _0x6077b2(_0x25d759,_0x3c6a32,_0x335a8b,_0x2af0f5){return _0x1f31(_0x25d759- -0x3b9,_0x335a8b);}return _0x139608(_0x4d3736,_0x482441);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x34870b){const _0x331362={_0xe102cb:0x134,_0x339932:0x13a,_0x58dfb5:0x106,_0x57804f:0xf5,_0x1bfec7:0x386,_0x4f3d27:0x155,_0x37ba0f:0x12e,_0x2229bd:0x106,_0x4c8e14:0xfb,_0x2147cc:0xf4,_0x36e32c:0xfd},_0xbcb151={_0x4305d2:0x1c2};return{'hasHooks'(_0x17f3fe){return(_0x34870b[_0x17f3fe]?.['length']??0x0)>0x0;},'getHooks'(_0x4a133d,_0x59658c){const _0x384a1b={_0x41ada1:0xba},_0x5920ed=_0x34870b[_0x4a133d];if(!_0x5920ed)return[];function _0x3b5a5f(_0x17b173,_0x5309c3,_0x3d4ba5,_0x16831f){return _0x1f31(_0x17b173- -_0x384a1b._0x41ada1,_0x5309c3);}function _0x356657(_0x39fab5,_0xbe7f5c,_0x422f76,_0x2423cb){return _0x1f31(_0x39fab5-_0xbcb151._0x4305d2,_0x2423cb);}const _0x17e8af=[];for(const _0x5cb28f of _0x5920ed){if(!_0x5cb28f[_0x3b5a5f(_0x331362._0xe102cb,0x13a,_0x331362._0x339932,0x118)]||_0x5cb28f['matcher']==='*'){_0x17e8af['push'](..._0x5cb28f[_0x3b5a5f(_0x331362._0x58dfb5,0xfa,_0x331362._0x57804f,0xf1)][_0x356657(0x379,_0x331362._0x1bfec7,0x38d,0x365)](_0x490db4=>({'command':_0x490db4[_0x3b5a5f(0x109,0xed,0xfa,0xed)],'timeout':_0x490db4[_0x3b5a5f(0x131,0x14b,0x136,0x14d)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x59658c===void 0x0)continue;const _0x2726d7=new RegExp(_0x356657(0x374,0x364,0x38b,0x361)+_0x5cb28f[_0x3b5a5f(_0x331362._0xe102cb,_0x331362._0x4f3d27,0x130,0x117)]+')$');_0x2726d7[_0x3b5a5f(0x11a,_0x331362._0x37ba0f,0x116,0x10c)](_0x59658c)&&_0x17e8af['push'](..._0x5cb28f[_0x3b5a5f(_0x331362._0x2229bd,0xf5,_0x331362._0x4c8e14,_0x331362._0x2147cc)][_0x3b5a5f(_0x331362._0x36e32c,0xfe,0x11f,0x11e)](_0x59f711=>({'command':_0x59f711[_0x3b5a5f(0x109,0x11b,0x10e,0xf7)],'timeout':_0x59f711[_0x3b5a5f(0x131,0x115,0x11e,0x132)]??DEFAULT_TIMEOUT_S2})));}return _0x17e8af;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|
|
1
|
+
(function(_0x2bea84,_0x5eb6fb){const _0xed36c0={_0x1421fa:0x416,_0x508d98:0x419,_0x920beb:0x40d,_0x2f7819:0x2c,_0x3244e2:0x2d,_0x209ce5:0x38,_0x6f5b56:0x45,_0x27c478:0x44,_0x1f86e2:0x47,_0x285031:0x3e,_0x44fcdf:0x66,_0x39eb34:0x14,_0x34f6e8:0x1b,_0x170a47:0x1b,_0x5c3c04:0x41a,_0x426f6b:0xa,_0x1ccb83:0x4a},_0x5d10fa={_0x50a60c:0x28d},_0xcafc3b={_0x1b0c0e:0x16c};function _0x95c0b6(_0x58c829,_0x317f54,_0x5d448e,_0x539cea){return _0x17fc(_0x5d448e- -_0xcafc3b._0x1b0c0e,_0x58c829);}function _0x2e98e8(_0x42e459,_0x3b946b,_0x5a9ca7,_0x2e8d97){return _0x17fc(_0x42e459-_0x5d10fa._0x50a60c,_0x3b946b);}const _0x3a7cff=_0x2bea84();while(!![]){try{const _0x57ac70=parseInt(_0x2e98e8(_0xed36c0._0x1421fa,_0xed36c0._0x508d98,_0xed36c0._0x920beb,0x3f7))/0x1+parseInt(_0x95c0b6(_0xed36c0._0x2f7819,0x1b,_0xed36c0._0x3244e2,_0xed36c0._0x209ce5))/0x2+parseInt(_0x95c0b6(_0xed36c0._0x6f5b56,_0xed36c0._0x27c478,0x48,0x3c))/0x3*(-parseInt(_0x95c0b6(0x32,_0xed36c0._0x1f86e2,0x39,0x4b))/0x4)+-parseInt(_0x95c0b6(_0xed36c0._0x2f7819,0x39,0x29,0x14))/0x5*(-parseInt(_0x95c0b6(0x56,_0xed36c0._0x285031,0x50,_0xed36c0._0x44fcdf))/0x6)+parseInt(_0x95c0b6(_0xed36c0._0x39eb34,0x32,_0xed36c0._0x34f6e8,_0xed36c0._0x170a47))/0x7+parseInt(_0x2e98e8(0x438,0x43c,0x421,_0xed36c0._0x5c3c04))/0x8*(-parseInt(_0x95c0b6(0x13,0x3c,0x1c,0x1f))/0x9)+parseInt(_0x95c0b6(0x24,0xf,0x15,_0xed36c0._0x426f6b))/0xa*(-parseInt(_0x95c0b6(0x1e,_0xed36c0._0x1ccb83,_0xed36c0._0x209ce5,0x32))/0xb);if(_0x57ac70===_0x5eb6fb)break;else _0x3a7cff['push'](_0x3a7cff['shift']());}catch(_0x192d31){_0x3a7cff['push'](_0x3a7cff['shift']());}}}(_0x20f4,0x372f3));import{spawn}from'child_process';var DEFAULT_TIMEOUT_S=0x3c;function _0x20f4(){const _0x4c5fc7=['DgLTzw91Da','mtu0nwfUCNn0rW','CgvYBwLZC2LVBKrLy2LZAw9U','Bwf0y2HLCG','ywz0zxjuB29SuMvZDwX0','nda0mJaWEMH3DMHv','DhjPBq','B2jZzxj2zxi','C3rHDhvZ','zw5K','zgvUEq','DgvZDa','zw5Kx3r1CM4','Ag9VAZPoB3rPzMLJyxrPB24','u3rVCa','zgvJAxnPB24','mZm1nvjcCK9Pwa','ndbpt0rSCum','Ag9VAZPtDg9W','CNvU','BwvZC2fNzq','C3rHDgu','ugvYBwLZC2LVBIbKzw5PzwqGzM9Yia','mZjetMH0EKu','zxjYB3i','CgLWzq','CMvHC29U','CgfZCW','Ag9VA3m','D3jPDgu','CgfYC2u','y29TBwfUza','nJC1otn3C1bdse8','BgvUz3rO','A2LSBa','C2vZC2LVBKLK','zw52','BM93','CgvYBwLZC2LVBKrLy2LZAw9UuMvHC29U','BMfTzq','mte1oejmsuTcwa','tM90AwzPy2f0Aw9U','C3rYAw5NAwz5','Aw5WDxq','zgf0yq','C3rKAw4','mte5mg9eAfvOyW','qwDLBNqGzMLUAxnOzwqGCMvZCg9UzgLUzW','B3v0Chv0','yMXVy2S','u0Lhs0Lmta','sg9VAYbLEgL0zwqGD2L0AcbJB2rLia','mtiWntGZnhnTDM9dta','nJe3oteZAvfntw9z','mZi4mJy5r29sDePb','BwfW','yMvMB3jLrMLUywXpDxrWDxq','rvbjueu','z2v0sg9VA3m','AgfZsg9VA3m','CMvQzwn0','uhjLvg9VBfvZzq','Ag9VA1nWzwnPzMLJt3v0Chv0','ug9ZDfrVB2XvC2u','ChvZAa'];_0x20f4=function(){return _0x4c5fc7;};return _0x20f4();}async function executeCommandHook(_0x4653be,_0x3e6d78,_0x4f513a=DEFAULT_TIMEOUT_S,_0x10c0b6){const _0x37158a={_0x5c1e73:0x259,_0xe110ee:0x25d,_0x2f7e9d:0x23e},_0x5f804d={_0x41b994:0xd1,_0x36c09f:0xbb,_0xf4527e:0xa2,_0x5cb2d7:0xa9,_0x10f7f4:0xc2,_0x1e8a71:0xd5,_0x4b86e1:0x2c6,_0x4d0551:0x2c2,_0x22fc43:0x2cd,_0x4d572d:0x2d1,_0x5f25fb:0xd3,_0x4a3d83:0xe4,_0x3e360a:0xde,_0x73b281:0x2aa,_0x239d93:0x2b6,_0x3f1f08:0xcc,_0x39ea16:0x107,_0x3b1fb3:0xed,_0x535859:0x2c5,_0x19edc1:0x2a7,_0x4a1cfc:0x2cd,_0x1cb2e7:0x2de,_0xfbd365:0x2ab,_0x4a0f5d:0xb1,_0x31cb4c:0xcb},_0xede88a={_0x33e974:0x168,_0x24d8ab:0x17b,_0x297ea4:0x16b,_0x7aefaf:0xd7},_0x56e735={_0x1e1a27:0xe3,_0x1bab1c:0x1af},_0x498833={_0x4b1c5a:0x85},_0x333d4c=Date[_0x5aedc3(0x225,_0x37158a._0x5c1e73,_0x37158a._0xe110ee,_0x37158a._0x2f7e9d)]();function _0x5aedc3(_0x4e0437,_0x4e9608,_0x566f13,_0x5addd8){return _0x17fc(_0x5addd8-_0x498833._0x4b1c5a,_0x4e0437);}return new Promise(_0x414404=>{const _0x13bb0a={_0x1adf98:0x3a3,_0x3e7c1a:0xa7},_0x2b15aa={_0x3c3ebb:0x36d,_0x5d841f:0x35c,_0x4f971a:0x34f,_0x2c328e:0x387,_0x4f1659:0x356,_0x270636:0x344,_0x2a15b6:0x327,_0x57bb56:0x34d,_0x26c199:0x358,_0x33a5ec:0x394,_0x423b8d:0x35c,_0x255778:0x33b,_0x5c11de:0x369,_0x5775e3:0x39d,_0x274e06:0x37f,_0x3bdfdd:0x359,_0x3a03fe:0x374,_0x325a96:0x343},_0x35a863={_0x2430fd:0xf1,_0x4d6aa0:0x119,_0x4fc2a5:0x12c,_0x50188e:0x10c,_0x56ebf9:0xc3,_0x3589d8:0xdb,_0x2ced2b:0x101,_0x38e274:0x112,_0x56e679:0xef},_0x51d7d6={_0x13e371:0x6},_0x5c68d7={_0x216209:0x433,_0x533bb0:0x431,_0x6dc887:0x41e},_0xdda7ac={_0x4a59d9:0x6f,_0x266c16:0x4fa,_0x2021c6:0xb8},_0x5c6557=spawn('sh',['-c',_0x4653be],{'stdio':[_0x3a85ac(-_0x5f804d._0x41b994,-_0x5f804d._0x36c09f,-_0x5f804d._0xf4527e,-0xa3),_0x3a85ac(-_0x5f804d._0x5cb2d7,-0xbb,-_0x5f804d._0x10f7f4,-_0x5f804d._0x1e8a71),_0x284fb6(_0x5f804d._0x4b86e1,0x2b7,_0x5f804d._0x4d0551,_0x5f804d._0x22fc43)],'env':{...process[_0x284fb6(_0x5f804d._0x4d572d,0x2dc,0x2b6,0x2cd)],'CLAUDE_PROJECT_DIR':_0x10c0b6??process['cwd']()}});function _0x284fb6(_0xd680d6,_0x3e7799,_0x326c76,_0x15ab5a){return _0x5aedc3(_0x326c76,_0x3e7799-_0x56e735._0x1e1a27,_0x326c76-_0x56e735._0x1bab1c,_0xd680d6-0x94);}let _0x20c429='',_0x2a8b6c='';_0x5c6557['stdout']['on'](_0x3a85ac(-_0x5f804d._0x5f25fb,-0xe9,-_0x5f804d._0x4a3d83,-_0x5f804d._0x3e360a),_0x40dc7d=>{_0x20c429+=_0x40dc7d['toString']();}),_0x5c6557['stderr']['on'](_0x284fb6(0x298,_0x5f804d._0x73b281,_0x5f804d._0x239d93,0x2ae),_0x231ea5=>{_0x2a8b6c+=_0x231ea5['toString']();}),_0x5c6557[_0x3a85ac(-_0x5f804d._0x3f1f08,-0xe8,-_0x5f804d._0x39ea16,-_0x5f804d._0x3b1fb3)]['on'](_0x284fb6(_0x5f804d._0x535859,0x2c1,_0x5f804d._0x19edc1,_0x5f804d._0x4a1cfc),_0x10b777=>{function _0x3851af(_0x19459d,_0xc179ee,_0x5464c1,_0x53bed6){return _0x3a85ac(_0x19459d-_0xdda7ac._0x4a59d9,_0x53bed6-_0xdda7ac._0x266c16,_0x5464c1-_0xdda7ac._0x2021c6,_0x5464c1);}if(_0x10b777['code']!==_0x3851af(_0x5c68d7._0x216209,0x41c,_0x5c68d7._0x533bb0,_0x5c68d7._0x6dc887))throw _0x10b777;});function _0x3a85ac(_0x5574a8,_0x4d2fea,_0x3fcb9b,_0x5d7ac4){return _0x5aedc3(_0x5d7ac4,_0x4d2fea-_0x51d7d6._0x13e371,_0x3fcb9b-0xd2,_0x4d2fea- -0x2ed);}_0x5c6557['stdin'][_0x284fb6(0x2ca,_0x5f804d._0x1cb2e7,0x2da,_0x5f804d._0xfbd365)](JSON[_0x284fb6(0x2d7,0x2b7,0x2c7,0x2f4)](_0x3e6d78)),_0x5c6557['stdin'][_0x3a85ac(-_0x5f804d._0x4a0f5d,-_0x5f804d._0x31cb4c,-0xc0,-0xc7)]();const _0x24f3a5=setTimeout(()=>{const _0xce4426={_0x347eca:0x53c};_0x5c6557[_0x7d3099(_0x35a863._0x2430fd,_0x35a863._0x4d6aa0,_0x35a863._0x4fc2a5,_0x35a863._0x50188e)](_0x7d3099(_0x35a863._0x56ebf9,0xf2,0xec,_0x35a863._0x3589d8));function _0x7d3099(_0xccd1e8,_0x173193,_0x3e1e8f,_0x124c92){return _0x284fb6(_0x124c92- -0x1c3,_0x173193-0x13c,_0x3e1e8f,_0x124c92-0x15);}function _0xd71868(_0x34fe20,_0x153537,_0x2c3d4a,_0x39c720){return _0x3a85ac(_0x34fe20-0x17f,_0x39c720-_0xce4426._0x347eca,_0x2c3d4a-0x19b,_0x153537);}_0x414404({'status':_0x7d3099(0xe2,_0x35a863._0x2ced2b,_0x35a863._0x38e274,0x102),'error':'Hook\x20timed\x20out\x20after\x20'+_0x4f513a+'s','duration_ms':Date[_0x7d3099(0x108,_0x35a863._0x56e679,0xf8,0x10f)]()-_0x333d4c});},_0x4f513a*0x3e8);_0x5c6557['on']('close',_0x24df51=>{const _0x296253={_0x3a83f8:0xad,_0x11e7f7:0xc0},_0x33dfd4={_0x534a22:0x412,_0x1bd380:0x1d8};clearTimeout(_0x24f3a5);function _0x20ebb5(_0x5f3944,_0x12e57e,_0x1d627a,_0x546c63){return _0x3a85ac(_0x5f3944-0xcd,_0x5f3944-_0x33dfd4._0x534a22,_0x1d627a-_0x33dfd4._0x1bd380,_0x12e57e);}const _0x431e49=Date['now']()-_0x333d4c;if(_0x24df51===0x2){_0x414404({'status':_0x297f18(0x36a,_0x2b15aa._0x3c3ebb,0x33d,0x354),'output':{'decision':_0x297f18(0x34e,0x33e,_0x2b15aa._0x5d841f,0x354),'reason':_0x2a8b6c[_0x297f18(_0x2b15aa._0x4f971a,_0x2b15aa._0x2c328e,0x37b,0x36a)]()||'Hook\x20blocked\x20execution'},'duration_ms':_0x431e49});return;}if(_0x24df51!==0x0){_0x414404({'status':'error','error':_0x297f18(0x343,0x354,0x349,_0x2b15aa._0x4f1659)+_0x24df51+(_0x2a8b6c['trim']()?':\x20'+_0x2a8b6c[_0x20ebb5(_0x2b15aa._0x270636,0x360,_0x2b15aa._0x2a15b6,0x325)]():''),'duration_ms':_0x431e49});return;}function _0x297f18(_0x38505f,_0x5ad187,_0x10f1de,_0x3bf167){return _0x3a85ac(_0x38505f-_0x296253._0x3a83f8,_0x3bf167-0x438,_0x10f1de-_0x296253._0x11e7f7,_0x10f1de);}const _0x4cedce=_0x20c429[_0x20ebb5(0x344,_0x2b15aa._0x57bb56,0x360,_0x2b15aa._0x26c199)]();if(_0x4cedce[_0x297f18(_0x2b15aa._0x33a5ec,0x39a,_0x2b15aa._0x2c328e,0x385)]===0x0){_0x414404({'status':'pass','duration_ms':_0x431e49});return;}try{const _0x4d4b3a=JSON[_0x20ebb5(_0x2b15aa._0x423b8d,0x36e,_0x2b15aa._0x255778,0x34b)](_0x4cedce);_0x414404({'status':_0x297f18(0x392,_0x2b15aa._0x5c11de,_0x2b15aa._0x5775e3,_0x2b15aa._0x274e06),'output':_0x4d4b3a,'duration_ms':_0x431e49});}catch{_0x414404({'status':_0x20ebb5(_0x2b15aa._0x3bdfdd,_0x2b15aa._0x3a03fe,0x35e,_0x2b15aa._0x325a96),'duration_ms':_0x431e49});}}),_0x5c6557['on']('error',_0x4e3147=>{const _0x574ebd={_0x3772a5:0x13a,_0x84bc54:0x1b0};function _0x74a29(_0x59b0af,_0x6fccc4,_0x2a78ae,_0x68d2bd){return _0x284fb6(_0x2a78ae- -_0x13bb0a._0x1adf98,_0x6fccc4-0xf2,_0x6fccc4,_0x68d2bd-_0x13bb0a._0x3e7c1a);}function _0x259a72(_0x3e57c5,_0x7d6491,_0x1e1a2a,_0x40d653){return _0x284fb6(_0x7d6491- -_0x574ebd._0x3772a5,_0x7d6491-_0x574ebd._0x84bc54,_0x1e1a2a,_0x40d653-0x2f);}clearTimeout(_0x24f3a5),_0x414404({'status':'error','error':_0x4e3147[_0x259a72(_0xede88a._0x33e974,0x187,_0xede88a._0x24d8ab,_0xede88a._0x297ea4)],'duration_ms':Date[_0x74a29(-_0xede88a._0x7aefaf,-0xb0,-0xd1,-0xbb)]()-_0x333d4c});});});}function createHookExtensions(_0xe88c7e,_0x54bc92,_0x10aebc={}){const _0x5aa98c={_0x29959f:0x15a,_0x53e7d2:0x160,_0x175ad0:0x164,_0x326715:0x319,_0x34e88b:0x31c,_0x36b481:0x329,_0x45a330:0x31a,_0x4c446d:0x30e,_0x580094:0x14a,_0x36a2f9:0x15b,_0x171bd6:0x149,_0x40ae0c:0x16e,_0x3032bf:0x312,_0x2f1066:0x2ea,_0x455068:0x303,_0x32ac55:0x178,_0x1e7d03:0x30b,_0x17fb48:0x17c,_0x4577d5:0x14d,_0x3b986b:0x163,_0x26ab98:0x149},_0x109578={_0x168b1d:0x178},_0x283282={_0x529b5f:0x11a,_0x490909:0x14e,_0x16ce6d:0x1d7,_0x124169:0x19a,_0x13c378:0x1ae,_0x1f0e2e:0x1ec,_0x5abf49:0x1f9,_0x5afd4e:0x20a,_0x2bb994:0x1e9},_0xf5a3df={_0x37781f:0x2d,_0x132dc6:0x43,_0x4c491f:0x36,_0x8de163:0x236,_0x42cf73:0x21b,_0x1b0f15:0x206,_0x2e16d8:0x89,_0x5011be:0x69,_0x12ea1e:0x82,_0x1c17f8:0x50,_0x185145:0x227},_0x64769c={_0x428d46:0x1d9,_0x404b05:0x533,_0x151e14:0x1a1},_0x23c2f6={_0x3821b0:0x3a2,_0x58cda5:0x39b,_0x171f8f:0xf3,_0xfa0a68:0xe7,_0x4cc6a1:0x10f,_0x15d1c1:0x11d},_0xabc8cb={_0x1f36eb:0x40,_0x10af31:0x416,_0x4959a9:0x7c},_0xcca1ed={_0x15551c:0x38},_0x490a1b=[];function _0x47f35a(_0xa6a61b,_0x17c5f8,_0x2475ec,_0x24c12e){return _0x17fc(_0x17c5f8- -_0xcca1ed._0x15551c,_0xa6a61b);}const {sessionId:_0x1fd873,projectDir:_0x2e3353}=_0x10aebc,_0x28bd4e=_0x3396f0=>_0xe88c7e[_0xcd5e85(0x2e6,0x2ee,0x306,0x302)]?_0xe88c7e[_0x47f35a(0x166,0x156,0x13b,0x156)](_0x3396f0):_0xe88c7e[_0xcd5e85(0x30f,0x31a,0x305,0x305)](_0x3396f0)[_0x47f35a(0x18a,0x17d,0x18d,0x18a)]>0x0;_0x28bd4e('PostToolUse')&&_0x490a1b[_0x47f35a(_0x5aa98c._0x29959f,0x15b,_0x5aa98c._0x53e7d2,_0x5aa98c._0x175ad0)]({'id':'hook:PostToolUse','stage':_0x47f35a(0x17b,0x160,0x170,0x152),'kind':_0xcd5e85(_0x5aa98c._0x326715,_0x5aa98c._0x34e88b,0x313,0x330),'order':0x0,'enabled':!![],'run':async(_0x4cbcfa,_0x123387)=>{const _0x57cb09={_0x353c0b:0x23e},_0x51b7cb=_0xe88c7e[_0x376172(0x38d,0x393,0x3ae,0x3af)](_0x376172(0x3a4,0x398,0x380,0x37f),_0x4cbcfa['toolName']);function _0x353f69(_0x15e455,_0x1ef138,_0x4ef5c1,_0xd1addc){return _0xcd5e85(_0x4ef5c1,_0x1ef138-_0xabc8cb._0x1f36eb,_0x1ef138- -_0xabc8cb._0x10af31,_0xd1addc-_0xabc8cb._0x4959a9);}function _0x376172(_0x12599b,_0x1c0e61,_0x547205,_0x31304c){return _0x47f35a(_0x12599b,_0x1c0e61-_0x57cb09._0x353c0b,_0x547205-0x84,_0x31304c-0x1a1);}for(const _0x13d92c of _0x51b7cb){const _0x5996ec={'tool_name':_0x4cbcfa['toolName'],'tool_input':void 0x0,'tool_output':_0x4cbcfa['output'],'tool_result_status':_0x4cbcfa[_0x376172(0x3bd,_0x23c2f6._0x3821b0,0x3b8,0x3a6)],'session_id':_0x1fd873??_0x123387[_0x376172(0x39c,0x3af,_0x23c2f6._0x58cda5,0x3ba)][_0x353f69(-_0x23c2f6._0x171f8f,-_0x23c2f6._0xfa0a68,-0x102,-0xd9)]};await _0x54bc92(_0x13d92c['command'],_0x5996ec,_0x13d92c[_0x353f69(-_0x23c2f6._0x4cc6a1,-0x10a,-_0x23c2f6._0x15d1c1,-0x11a)],_0x2e3353);}}});_0x28bd4e(_0xcd5e85(0x337,_0x5aa98c._0x36b481,_0x5aa98c._0x45a330,_0x5aa98c._0x4c446d))&&_0x490a1b[_0x47f35a(_0x5aa98c._0x580094,_0x5aa98c._0x36a2f9,_0x5aa98c._0x171bd6,0x15c)]({'id':_0x47f35a(0x15b,_0x5aa98c._0x40ae0c,0x18d,0x14e),'stage':_0xcd5e85(_0x5aa98c._0x3032bf,_0x5aa98c._0x2f1066,_0x5aa98c._0x455068,0x303),'kind':'observer','order':0x0,'enabled':!![],'run':async(_0x3d1b38,_0x65ba6c)=>{const _0x2e0882={_0x56c38a:0x112,_0x37dc8d:0x26,_0x6b4edb:0x13b},_0x4e6d2d=_0xe88c7e[_0x413904(_0xf5a3df._0x37781f,_0xf5a3df._0x132dc6,_0xf5a3df._0x4c491f,0x4d)]('Stop');function _0x4a135b(_0x3e30a9,_0x4b0d05,_0x254f8f,_0x28d8e5){return _0xcd5e85(_0x3e30a9,_0x4b0d05-_0x64769c._0x428d46,_0x28d8e5- -_0x64769c._0x404b05,_0x28d8e5-_0x64769c._0x151e14);}function _0x413904(_0x5c63a6,_0x196660,_0xd648d5,_0x52f296){return _0x47f35a(_0x52f296,_0x196660- -_0x2e0882._0x56c38a,_0xd648d5-_0x2e0882._0x37dc8d,_0x52f296-_0x2e0882._0x6b4edb);}for(const _0x4adc11 of _0x4e6d2d){const _0x43ba9d={'stop_reason':_0x4a135b(-_0xf5a3df._0x8de163,-0x234,-0x214,-_0xf5a3df._0x42cf73),'session_id':_0x1fd873??_0x65ba6c['state'][_0x4a135b(-0x1f1,-_0xf5a3df._0x1b0f15,-0x20b,-0x204)]};await _0x54bc92(_0x4adc11[_0x413904(_0xf5a3df._0x2e16d8,_0xf5a3df._0x5011be,_0xf5a3df._0x12ea1e,_0xf5a3df._0x1c17f8)],_0x43ba9d,_0x4adc11[_0x4a135b(-0x20e,-0x213,-0x207,-_0xf5a3df._0x185145)],_0x2e3353);}}});_0x28bd4e(_0x47f35a(_0x5aa98c._0x32ac55,0x185,0x171,0x18a))&&_0x490a1b[_0xcd5e85(0x309,0x310,_0x5aa98c._0x1e7d03,0x2ef)]({'id':_0x47f35a(_0x5aa98c._0x17fb48,0x169,0x155,0x16e),'stage':'afterTurnComplete','kind':_0x47f35a(_0x5aa98c._0x4577d5,_0x5aa98c._0x3b986b,_0x5aa98c._0x26ab98,0x14d),'order':0x0,'enabled':!![],'run':async(_0x40dcce,_0xe3ba15)=>{const _0x2d1ba9={_0x12d20a:0xb,_0x2042f2:0x1ca,_0xa249a5:0x15f},_0x19286a={_0x527d91:0x6d,_0x1a32d7:0x14e};function _0x5de580(_0x572815,_0x2f6f6d,_0xe52731,_0x10a65d){return _0x47f35a(_0x2f6f6d,_0x572815-_0x19286a._0x527d91,_0xe52731-0x91,_0x10a65d-_0x19286a._0x1a32d7);}function _0x3ef1ce(_0x188e21,_0x1cbc2f,_0x4c1fc9,_0x205370){return _0xcd5e85(_0x1cbc2f,_0x1cbc2f-_0x2d1ba9._0x12d20a,_0x188e21- -_0x2d1ba9._0x2042f2,_0x205370-_0x2d1ba9._0xa249a5);}const _0x4be2b1=_0xe88c7e[_0x3ef1ce(0x13b,_0x283282._0x529b5f,0x148,_0x283282._0x490909)]('Notification');for(const _0x18f4da of _0x4be2b1){const _0x4f0082={'message':_0x5de580(0x1b7,_0x283282._0x16ce6d,_0x283282._0x124169,_0x283282._0x13c378),'session_id':_0x1fd873??_0x40dcce[_0x5de580(_0x283282._0x1f0e2e,0x1cf,_0x283282._0x5abf49,_0x283282._0x5afd4e)]};await _0x54bc92(_0x18f4da[_0x5de580(0x1e8,0x1e1,0x1d2,0x203)],_0x4f0082,_0x18f4da[_0x5de580(0x1c9,0x1e2,_0x283282._0x2bb994,0x1c6)],_0x2e3353);}}});function _0xcd5e85(_0x51fdc6,_0x40dfea,_0x577268,_0x1141a0){return _0x17fc(_0x577268-_0x109578._0x168b1d,_0x51fdc6);}return _0x490a1b;}function _0x17fc(_0x3555a9,_0x31c1f7){_0x3555a9=_0x3555a9-0x17f;const _0x20f400=_0x20f4();let _0x17fc23=_0x20f400[_0x3555a9];if(_0x17fc['XRtMIg']===undefined){var _0x3eeb1e=function(_0x437988){const _0x3693fe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4653be='',_0x3e6d78='';for(let _0x4f513a=0x0,_0x10c0b6,_0x333d4c,_0x414404=0x0;_0x333d4c=_0x437988['charAt'](_0x414404++);~_0x333d4c&&(_0x10c0b6=_0x4f513a%0x4?_0x10c0b6*0x40+_0x333d4c:_0x333d4c,_0x4f513a++%0x4)?_0x4653be+=String['fromCharCode'](0xff&_0x10c0b6>>(-0x2*_0x4f513a&0x6)):0x0){_0x333d4c=_0x3693fe['indexOf'](_0x333d4c);}for(let _0x5c6557=0x0,_0x20c429=_0x4653be['length'];_0x5c6557<_0x20c429;_0x5c6557++){_0x3e6d78+='%'+('00'+_0x4653be['charCodeAt'](_0x5c6557)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3e6d78);};_0x17fc['TicPBP']=_0x3eeb1e,_0x17fc['BZmbQf']={},_0x17fc['XRtMIg']=!![];}const _0x36bc8c=_0x20f400[0x0],_0x2d9817=_0x3555a9+_0x36bc8c,_0x1d8e41=_0x17fc['BZmbQf'][_0x2d9817];return!_0x1d8e41?(_0x17fc23=_0x17fc['TicPBP'](_0x17fc23),_0x17fc['BZmbQf'][_0x2d9817]=_0x17fc23):_0x17fc23=_0x1d8e41,_0x17fc23;}function createHookOnToolCallMiddleware(_0xff69dd,_0x100e93,_0x27fb98,_0x38331b={}){const _0x3e30d1={_0xf7a4fd:0xc7,_0x294589:0xde,_0x375158:0xc9,_0x19c7b0:0xce,_0x39270f:0xbf,_0x552993:0x7e,_0x3ac230:0x1cd,_0x20da22:0x18b,_0x1aa185:0x197,_0x23a3f4:0xaa,_0xed5947:0xc3,_0x220941:0x199,_0x38cb57:0x1b2,_0x3d5c71:0x192,_0x13d276:0x175,_0x522011:0xb2,_0x440fc1:0x1aa,_0x2693e4:0x1ad,_0x59135a:0xaa,_0x1e164f:0xb3,_0x1c63ad:0xc6,_0x13c3c7:0x19e,_0x5a9ba2:0x19f,_0x50fad9:0xed,_0x871d3a:0xd1,_0x291d2e:0xe4,_0x22ff0e:0xdf,_0x29bfe8:0xb1,_0x345f46:0xbc,_0x14aec2:0x9c,_0x4cfff0:0x172,_0xc1ceaf:0x1a8,_0x3ce654:0xa1,_0x189d84:0xbc,_0x55b1bf:0x1b5,_0x12251e:0x1be},_0x4072fb={_0x4dc95a:0x254},{sessionId:_0x1e74e7,projectDir:_0x4f7452}=_0x38331b;return async(_0x184534,_0x4346ae)=>{const _0xd82097=_0xff69dd[_0x2c48b1(-_0x3e30d1._0xf7a4fd,-_0x3e30d1._0x294589,-0xd3,-_0x3e30d1._0x375158)](_0x2c48b1(-0xc4,-_0x3e30d1._0x19c7b0,-_0x3e30d1._0x39270f,-0xaa),_0x184534[_0x2c48b1(-0x99,-0xba,-0x7e,-_0x3e30d1._0x552993)]);function _0x973f8e(_0x237c85,_0x250525,_0x590c01,_0xe6b69a){return _0x17fc(_0xe6b69a-0x3,_0x250525);}function _0x2c48b1(_0x50db43,_0x435b1f,_0x5ea932,_0x26975b){return _0x17fc(_0x50db43- -_0x4072fb._0x4dc95a,_0x435b1f);}for(const _0x3d5f1a of _0xd82097){const _0x32bdd9={'tool_name':_0x184534['name'],'tool_input':_0x184534[_0x973f8e(0x1b0,0x1b8,_0x3e30d1._0x3ac230,0x1c2)],'session_id':_0x1e74e7},_0x41cc50=await _0x100e93(_0x3d5f1a['command'],_0x32bdd9,_0x3d5f1a[_0x973f8e(_0x3e30d1._0x20da22,0x18f,0x1af,_0x3e30d1._0x1aa185)],_0x4f7452),_0x3bf744=_0x41cc50[_0x2c48b1(-0xd1,-0xec,-0xdf,-0xba)]?.['hookSpecificOutput']?.[_0x2c48b1(-0xbe,-_0x3e30d1._0x23a3f4,-0xde,-_0x3e30d1._0xed5947)];if(_0x3bf744==='allow')return{'action':_0x973f8e(_0x3e30d1._0x220941,0x1ad,0x1bc,0x1aa)};if(_0x3bf744===_0x973f8e(0x1a7,_0x3e30d1._0x38cb57,0x18a,0x1a1))return{'action':_0x973f8e(_0x3e30d1._0x3d5c71,_0x3e30d1._0x13d276,_0x3e30d1._0x38cb57,_0x3e30d1._0x3d5c71),'reason':_0x41cc50[_0x973f8e(0x16b,0x193,_0x3e30d1._0x3d5c71,0x186)]?.[_0x2c48b1(-0xc3,-_0x3e30d1._0x522011,-0xe3,-_0x3e30d1._0x19c7b0)]?.[_0x973f8e(0x1bf,_0x3e30d1._0x440fc1,_0x3e30d1._0x2693e4,0x1bd)]||_0x2c48b1(-_0x3e30d1._0x59135a,-0xa9,-_0x3e30d1._0x1e164f,-_0x3e30d1._0x1c63ad)+_0x184534[_0x2c48b1(-0x99,-0x84,-0xa4,-0x8b)]};if(_0x41cc50[_0x973f8e(_0x3e30d1._0x13c3c7,0x1b7,0x19d,_0x3e30d1._0x5a9ba2)]===_0x2c48b1(-0xd0,-_0x3e30d1._0x50fad9,-0xdc,-0xc0)||_0x41cc50[_0x2c48b1(-_0x3e30d1._0x871d3a,-_0x3e30d1._0x291d2e,-0xd0,-_0x3e30d1._0x22ff0e)]?.[_0x2c48b1(-_0x3e30d1._0x29bfe8,-_0x3e30d1._0x522011,-_0x3e30d1._0x345f46,-_0x3e30d1._0x14aec2)]===_0x2c48b1(-0xd0,-0xd3,-0xe9,-0xee))return{'action':_0x973f8e(_0x3e30d1._0x4cfff0,0x17a,_0x3e30d1._0xc1ceaf,0x192),'reason':_0x41cc50['output']?.[_0x2c48b1(-0xa6,-_0x3e30d1._0x3ce654,-0x98,-_0x3e30d1._0x189d84)]||'Blocked\x20by\x20PreToolUse\x20hook\x20for\x20'+_0x184534[_0x973f8e(_0x3e30d1._0x13c3c7,0x1bc,_0x3e30d1._0x55b1bf,_0x3e30d1._0x12251e)]};}return _0x27fb98(_0x184534,_0x4346ae);};}var DEFAULT_TIMEOUT_S2=0x3c;function createHookRegistry(_0x54fe64){const _0x561299={_0x35e26e:0x26f,_0x21557a:0x286,_0x4d410b:0x264,_0x341fb7:0x282,_0x48dc1b:0x477,_0x6d2cb1:0x28e,_0x3a35d7:0x47e,_0x52e7f0:0x457,_0x825980:0x29f,_0x55d901:0x2b5},_0x2c1b5e={_0x4d51fa:0x2d2};return{'hasHooks'(_0xf37028){return(_0x54fe64[_0xf37028]?.['length']??0x0)>0x0;},'getHooks'(_0x14e05e,_0x3b779c){const _0x251c58=_0x54fe64[_0x14e05e];if(!_0x251c58)return[];function _0x586f66(_0x2d1f3e,_0x4b9070,_0xc35caf,_0x3d01c8){return _0x17fc(_0xc35caf-_0x2c1b5e._0x4d51fa,_0x3d01c8);}const _0x2c23c8=[];function _0x33e9e7(_0xd8101c,_0x221df2,_0x3efdfc,_0x74155c){return _0x17fc(_0x3efdfc-0xef,_0x74155c);}for(const _0x5859e1 of _0x251c58){if(!_0x5859e1[_0x33e9e7(0x279,0x26a,0x286,_0x561299._0x35e26e)]||_0x5859e1[_0x33e9e7(0x275,0x272,_0x561299._0x21557a,0x29d)]==='*'){_0x2c23c8[_0x33e9e7(_0x561299._0x4d410b,0x283,_0x561299._0x341fb7,0x26d)](..._0x5859e1['hooks'][_0x586f66(_0x561299._0x48dc1b,0x452,0x45c,0x45e)](_0x14fd72=>({'command':_0x14fd72['command'],'timeout':_0x14fd72[_0x33e9e7(0x293,0x298,0x283,0x29a)]??DEFAULT_TIMEOUT_S2})));continue;}if(_0x3b779c===void 0x0)continue;const _0x552696=new RegExp('^(?:'+_0x5859e1['matcher']+')$');_0x552696[_0x33e9e7(0x27e,0x29d,_0x561299._0x6d2cb1,0x291)](_0x3b779c)&&_0x2c23c8[_0x586f66(_0x561299._0x3a35d7,0x449,0x465,_0x561299._0x52e7f0)](..._0x5859e1[_0x33e9e7(0x298,0x2bc,_0x561299._0x825980,_0x561299._0x55d901)]['map'](_0x3b74d9=>({'command':_0x3b74d9[_0x33e9e7(0x293,0x293,0x2a2,0x2b6)],'timeout':_0x3b74d9[_0x586f66(0x476,0x475,0x466,0x451)]??DEFAULT_TIMEOUT_S2})));}return _0x2c23c8;}};}export{createHookExtensions,createHookOnToolCallMiddleware,createHookRegistry,executeCommandHook};
|