langgraph-ui-components 0.0.4 → 0.0.7

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.
Files changed (520) hide show
  1. package/dist/index.es10.js +31 -16
  2. package/dist/index.es10.js.map +1 -1
  3. package/dist/index.es100.js +143 -3134
  4. package/dist/index.es100.js.map +1 -1
  5. package/dist/index.es101.js +202 -36
  6. package/dist/index.es101.js.map +1 -1
  7. package/dist/index.es102.js +14 -5
  8. package/dist/index.es102.js.map +1 -1
  9. package/dist/index.es103.js +27 -70
  10. package/dist/index.es103.js.map +1 -1
  11. package/dist/index.es104.js +28 -31
  12. package/dist/index.es104.js.map +1 -1
  13. package/dist/index.es105.js +3157 -5
  14. package/dist/index.es105.js.map +1 -1
  15. package/dist/index.es106.js +18 -2
  16. package/dist/index.es106.js.map +1 -1
  17. package/dist/index.es107.js +5 -11
  18. package/dist/index.es107.js.map +1 -1
  19. package/dist/index.es108.js +2 -503
  20. package/dist/index.es108.js.map +1 -1
  21. package/dist/index.es109.js +11 -5
  22. package/dist/index.es109.js.map +1 -1
  23. package/dist/index.es11.js +166 -123
  24. package/dist/index.es11.js.map +1 -1
  25. package/dist/index.es110.js +503 -2
  26. package/dist/index.es110.js.map +1 -1
  27. package/dist/index.es111.js +5 -146
  28. package/dist/index.es111.js.map +1 -1
  29. package/dist/index.es112.js +2 -908
  30. package/dist/index.es112.js.map +1 -1
  31. package/dist/index.es113.js +128 -262
  32. package/dist/index.es113.js.map +1 -1
  33. package/dist/index.es114.js +907 -3
  34. package/dist/index.es114.js.map +1 -1
  35. package/dist/index.es115.js +262 -426
  36. package/dist/index.es115.js.map +1 -1
  37. package/dist/index.es116.js +3 -47
  38. package/dist/index.es116.js.map +1 -1
  39. package/dist/index.es117.js +443 -21
  40. package/dist/index.es117.js.map +1 -1
  41. package/dist/index.es118.js +42 -75
  42. package/dist/index.es118.js.map +1 -1
  43. package/dist/index.es119.js +22 -129
  44. package/dist/index.es119.js.map +1 -1
  45. package/dist/index.es12.js +13 -103
  46. package/dist/index.es12.js.map +1 -1
  47. package/dist/index.es120.js +74 -44
  48. package/dist/index.es120.js.map +1 -1
  49. package/dist/index.es121.js +129 -10
  50. package/dist/index.es121.js.map +1 -1
  51. package/dist/index.es122.js +47 -43
  52. package/dist/index.es122.js.map +1 -1
  53. package/dist/index.es123.js +9 -98
  54. package/dist/index.es123.js.map +1 -1
  55. package/dist/index.es124.js +43 -51
  56. package/dist/index.es124.js.map +1 -1
  57. package/dist/index.es125.js +96 -13
  58. package/dist/index.es125.js.map +1 -1
  59. package/dist/index.es126.js +52 -14
  60. package/dist/index.es126.js.map +1 -1
  61. package/dist/index.es127.js +156 -81
  62. package/dist/index.es127.js.map +1 -1
  63. package/dist/index.es128.js +2 -2
  64. package/dist/index.es129.js +14 -55
  65. package/dist/index.es129.js.map +1 -1
  66. package/dist/index.es13.js +126 -32
  67. package/dist/index.es13.js.map +1 -1
  68. package/dist/index.es130.js +87 -98
  69. package/dist/index.es130.js.map +1 -1
  70. package/dist/index.es131.js +2 -191
  71. package/dist/index.es131.js.map +1 -1
  72. package/dist/index.es132.js +54 -108
  73. package/dist/index.es132.js.map +1 -1
  74. package/dist/index.es133.js +98 -33
  75. package/dist/index.es133.js.map +1 -1
  76. package/dist/index.es134.js +191 -10
  77. package/dist/index.es134.js.map +1 -1
  78. package/dist/index.es135.js +109 -10
  79. package/dist/index.es135.js.map +1 -1
  80. package/dist/index.es136.js +35 -12
  81. package/dist/index.es136.js.map +1 -1
  82. package/dist/index.es137.js +10 -91
  83. package/dist/index.es137.js.map +1 -1
  84. package/dist/index.es138.js +11 -275
  85. package/dist/index.es138.js.map +1 -1
  86. package/dist/index.es139.js +12 -2
  87. package/dist/index.es139.js.map +1 -1
  88. package/dist/index.es140.js +88 -161
  89. package/dist/index.es140.js.map +1 -1
  90. package/dist/index.es141.js +270 -46
  91. package/dist/index.es141.js.map +1 -1
  92. package/dist/index.es142.js +2 -40
  93. package/dist/index.es142.js.map +1 -1
  94. package/dist/index.es143.js +164 -35
  95. package/dist/index.es143.js.map +1 -1
  96. package/dist/index.es144.js +45 -34
  97. package/dist/index.es144.js.map +1 -1
  98. package/dist/index.es145.js +37 -21
  99. package/dist/index.es145.js.map +1 -1
  100. package/dist/index.es146.js +32 -588
  101. package/dist/index.es146.js.map +1 -1
  102. package/dist/index.es147.js +32 -117
  103. package/dist/index.es147.js.map +1 -1
  104. package/dist/index.es148.js +22 -162
  105. package/dist/index.es148.js.map +1 -1
  106. package/dist/index.es149.js +591 -2
  107. package/dist/index.es149.js.map +1 -1
  108. package/dist/index.es15.js +15 -15
  109. package/dist/index.es150.js +125 -2
  110. package/dist/index.es150.js.map +1 -1
  111. package/dist/index.es151.js +2 -2
  112. package/dist/index.es152.js +2 -22
  113. package/dist/index.es152.js.map +1 -1
  114. package/dist/index.es153.js +22 -2
  115. package/dist/index.es153.js.map +1 -1
  116. package/dist/index.es154.js +2 -25
  117. package/dist/index.es154.js.map +1 -1
  118. package/dist/index.es155.js +25 -8
  119. package/dist/index.es155.js.map +1 -1
  120. package/dist/index.es156.js +4 -5
  121. package/dist/index.es156.js.map +1 -1
  122. package/dist/index.es157.js +7 -12
  123. package/dist/index.es157.js.map +1 -1
  124. package/dist/index.es158.js +5 -6
  125. package/dist/index.es158.js.map +1 -1
  126. package/dist/index.es159.js +12 -63
  127. package/dist/index.es159.js.map +1 -1
  128. package/dist/index.es160.js +5 -21
  129. package/dist/index.es160.js.map +1 -1
  130. package/dist/index.es161.js +24 -5
  131. package/dist/index.es161.js.map +1 -1
  132. package/dist/index.es162.js +11 -348
  133. package/dist/index.es162.js.map +1 -1
  134. package/dist/index.es163.js +52 -23
  135. package/dist/index.es163.js.map +1 -1
  136. package/dist/index.es164.js +63 -11
  137. package/dist/index.es164.js.map +1 -1
  138. package/dist/index.es165.js +21 -53
  139. package/dist/index.es165.js.map +1 -1
  140. package/dist/index.es166.js +6 -7
  141. package/dist/index.es166.js.map +1 -1
  142. package/dist/index.es167.js +342 -96
  143. package/dist/index.es167.js.map +1 -1
  144. package/dist/index.es168.js +6 -118
  145. package/dist/index.es168.js.map +1 -1
  146. package/dist/index.es169.js +98 -131
  147. package/dist/index.es169.js.map +1 -1
  148. package/dist/index.es17.js +2 -2
  149. package/dist/index.es170.js +108 -104
  150. package/dist/index.es170.js.map +1 -1
  151. package/dist/index.es171.js +136 -6
  152. package/dist/index.es171.js.map +1 -1
  153. package/dist/index.es172.js +114 -3
  154. package/dist/index.es172.js.map +1 -1
  155. package/dist/index.es173.js +6 -2
  156. package/dist/index.es173.js.map +1 -1
  157. package/dist/index.es174.js +2 -3737
  158. package/dist/index.es174.js.map +1 -1
  159. package/dist/index.es175.js +3682 -287
  160. package/dist/index.es175.js.map +1 -1
  161. package/dist/index.es176.js +321 -88
  162. package/dist/index.es176.js.map +1 -1
  163. package/dist/index.es177.js +95 -119
  164. package/dist/index.es177.js.map +1 -1
  165. package/dist/index.es178.js +131 -13
  166. package/dist/index.es178.js.map +1 -1
  167. package/dist/index.es179.js +13 -150
  168. package/dist/index.es179.js.map +1 -1
  169. package/dist/index.es180.js +150 -13
  170. package/dist/index.es180.js.map +1 -1
  171. package/dist/index.es181.js +13 -6
  172. package/dist/index.es181.js.map +1 -1
  173. package/dist/index.es182.js +6 -19
  174. package/dist/index.es182.js.map +1 -1
  175. package/dist/index.es183.js +17 -86
  176. package/dist/index.es183.js.map +1 -1
  177. package/dist/index.es184.js +69 -222
  178. package/dist/index.es184.js.map +1 -1
  179. package/dist/index.es185.js +242 -23
  180. package/dist/index.es185.js.map +1 -1
  181. package/dist/index.es186.js +23 -5
  182. package/dist/index.es186.js.map +1 -1
  183. package/dist/index.es187.js +6 -4
  184. package/dist/index.es187.js.map +1 -1
  185. package/dist/index.es188.js +4 -18
  186. package/dist/index.es188.js.map +1 -1
  187. package/dist/index.es189.js +16 -6
  188. package/dist/index.es189.js.map +1 -1
  189. package/dist/index.es19.js +119 -15
  190. package/dist/index.es19.js.map +1 -1
  191. package/dist/index.es190.js +7 -141
  192. package/dist/index.es190.js.map +1 -1
  193. package/dist/index.es191.js +142 -2
  194. package/dist/index.es191.js.map +1 -1
  195. package/dist/index.es192.js +2 -32
  196. package/dist/index.es192.js.map +1 -1
  197. package/dist/index.es193.js +31 -5
  198. package/dist/index.es193.js.map +1 -1
  199. package/dist/index.es194.js +5 -105
  200. package/dist/index.es194.js.map +1 -1
  201. package/dist/index.es195.js +106 -13
  202. package/dist/index.es195.js.map +1 -1
  203. package/dist/index.es196.js +12 -17
  204. package/dist/index.es196.js.map +1 -1
  205. package/dist/index.es197.js +15 -28
  206. package/dist/index.es197.js.map +1 -1
  207. package/dist/index.es198.js +30 -3
  208. package/dist/index.es198.js.map +1 -1
  209. package/dist/index.es199.js +3 -4
  210. package/dist/index.es199.js.map +1 -1
  211. package/dist/index.es2.js +24 -16
  212. package/dist/index.es2.js.map +1 -1
  213. package/dist/index.es20.js +17 -68
  214. package/dist/index.es20.js.map +1 -1
  215. package/dist/index.es200.js +5 -5
  216. package/dist/index.es200.js.map +1 -1
  217. package/dist/index.es201.js +4 -36
  218. package/dist/index.es201.js.map +1 -1
  219. package/dist/index.es202.js +36 -7
  220. package/dist/index.es202.js.map +1 -1
  221. package/dist/index.es203.js +7 -5
  222. package/dist/index.es203.js.map +1 -1
  223. package/dist/index.es204.js +5 -6
  224. package/dist/index.es204.js.map +1 -1
  225. package/dist/index.es205.js +6 -41
  226. package/dist/index.es205.js.map +1 -1
  227. package/dist/index.es206.js +41 -12
  228. package/dist/index.es206.js.map +1 -1
  229. package/dist/index.es207.js +11 -240
  230. package/dist/index.es207.js.map +1 -1
  231. package/dist/index.es208.js +239 -48
  232. package/dist/index.es208.js.map +1 -1
  233. package/dist/index.es209.js +49 -33
  234. package/dist/index.es209.js.map +1 -1
  235. package/dist/index.es21.js +3 -3
  236. package/dist/index.es21.js.map +1 -1
  237. package/dist/index.es210.js +32 -10
  238. package/dist/index.es210.js.map +1 -1
  239. package/dist/index.es211.js +12 -7
  240. package/dist/index.es211.js.map +1 -1
  241. package/dist/index.es212.js +7 -6
  242. package/dist/index.es212.js.map +1 -1
  243. package/dist/index.es213.js +6 -64
  244. package/dist/index.es213.js.map +1 -1
  245. package/dist/index.es214.js +60 -36
  246. package/dist/index.es214.js.map +1 -1
  247. package/dist/index.es215.js +39 -30
  248. package/dist/index.es215.js.map +1 -1
  249. package/dist/index.es216.js +30 -60
  250. package/dist/index.es216.js.map +1 -1
  251. package/dist/index.es217.js +60 -13
  252. package/dist/index.es217.js.map +1 -1
  253. package/dist/index.es218.js +9 -17
  254. package/dist/index.es218.js.map +1 -1
  255. package/dist/index.es219.js +23 -5
  256. package/dist/index.es219.js.map +1 -1
  257. package/dist/index.es22.js +1 -1
  258. package/dist/index.es220.js +4 -16
  259. package/dist/index.es220.js.map +1 -1
  260. package/dist/index.es221.js +14 -30
  261. package/dist/index.es221.js.map +1 -1
  262. package/dist/index.es222.js +32 -4
  263. package/dist/index.es222.js.map +1 -1
  264. package/dist/index.es223.js +4 -4
  265. package/dist/index.es223.js.map +1 -1
  266. package/dist/index.es224.js +5 -5
  267. package/dist/index.es224.js.map +1 -1
  268. package/dist/index.es225.js +5 -8
  269. package/dist/index.es225.js.map +1 -1
  270. package/dist/index.es226.js +6 -90
  271. package/dist/index.es226.js.map +1 -1
  272. package/dist/index.es227.js +90 -16
  273. package/dist/index.es227.js.map +1 -1
  274. package/dist/index.es228.js +17 -761
  275. package/dist/index.es228.js.map +1 -1
  276. package/dist/index.es229.js +762 -66
  277. package/dist/index.es229.js.map +1 -1
  278. package/dist/index.es230.js +66 -174
  279. package/dist/index.es230.js.map +1 -1
  280. package/dist/index.es231.js +169 -33
  281. package/dist/index.es231.js.map +1 -1
  282. package/dist/index.es232.js +37 -136
  283. package/dist/index.es232.js.map +1 -1
  284. package/dist/index.es233.js +136 -92
  285. package/dist/index.es233.js.map +1 -1
  286. package/dist/index.es234.js +92 -32
  287. package/dist/index.es234.js.map +1 -1
  288. package/dist/index.es235.js +32 -284
  289. package/dist/index.es235.js.map +1 -1
  290. package/dist/index.es236.js +284 -25
  291. package/dist/index.es236.js.map +1 -1
  292. package/dist/index.es237.js +22 -20
  293. package/dist/index.es237.js.map +1 -1
  294. package/dist/index.es238.js +22 -13
  295. package/dist/index.es238.js.map +1 -1
  296. package/dist/index.es239.js +12 -12
  297. package/dist/index.es239.js.map +1 -1
  298. package/dist/index.es24.js +103 -305
  299. package/dist/index.es24.js.map +1 -1
  300. package/dist/index.es240.js +13 -24
  301. package/dist/index.es240.js.map +1 -1
  302. package/dist/index.es241.js +22 -42
  303. package/dist/index.es241.js.map +1 -1
  304. package/dist/index.es242.js +45 -11
  305. package/dist/index.es242.js.map +1 -1
  306. package/dist/index.es243.js +10 -10
  307. package/dist/index.es243.js.map +1 -1
  308. package/dist/index.es244.js +10 -10
  309. package/dist/index.es244.js.map +1 -1
  310. package/dist/index.es245.js +11 -14
  311. package/dist/index.es245.js.map +1 -1
  312. package/dist/index.es246.js +14 -11
  313. package/dist/index.es246.js.map +1 -1
  314. package/dist/index.es247.js +11 -11
  315. package/dist/index.es247.js.map +1 -1
  316. package/dist/index.es248.js +10 -10
  317. package/dist/index.es248.js.map +1 -1
  318. package/dist/index.es249.js +11 -15
  319. package/dist/index.es249.js.map +1 -1
  320. package/dist/index.es25.js +68 -121
  321. package/dist/index.es25.js.map +1 -1
  322. package/dist/index.es250.js +15 -11
  323. package/dist/index.es250.js.map +1 -1
  324. package/dist/index.es251.js +10 -10
  325. package/dist/index.es251.js.map +1 -1
  326. package/dist/index.es252.js +11 -11
  327. package/dist/index.es252.js.map +1 -1
  328. package/dist/index.es253.js +10 -10
  329. package/dist/index.es253.js.map +1 -1
  330. package/dist/index.es254.js +10 -10
  331. package/dist/index.es254.js.map +1 -1
  332. package/dist/index.es255.js +10 -10
  333. package/dist/index.es255.js.map +1 -1
  334. package/dist/index.es256.js +10 -10
  335. package/dist/index.es256.js.map +1 -1
  336. package/dist/index.es257.js +10 -10
  337. package/dist/index.es257.js.map +1 -1
  338. package/dist/index.es258.js +11 -56
  339. package/dist/index.es258.js.map +1 -1
  340. package/dist/index.es259.js +53 -46
  341. package/dist/index.es259.js.map +1 -1
  342. package/dist/index.es26.js +305 -5
  343. package/dist/index.es26.js.map +1 -1
  344. package/dist/index.es260.js +42 -112
  345. package/dist/index.es260.js.map +1 -1
  346. package/dist/index.es261.js +87 -352
  347. package/dist/index.es261.js.map +1 -1
  348. package/dist/index.es262.js +381 -15
  349. package/dist/index.es262.js.map +1 -1
  350. package/dist/index.es263.js +17 -10
  351. package/dist/index.es263.js.map +1 -1
  352. package/dist/index.es264.js +10 -30
  353. package/dist/index.es264.js.map +1 -1
  354. package/dist/index.es265.js +17 -17
  355. package/dist/index.es265.js.map +1 -1
  356. package/dist/index.es266.js +25 -56
  357. package/dist/index.es266.js.map +1 -1
  358. package/dist/index.es267.js +59 -14
  359. package/dist/index.es267.js.map +1 -1
  360. package/dist/index.es268.js +14 -74
  361. package/dist/index.es268.js.map +1 -1
  362. package/dist/index.es269.js +77 -11
  363. package/dist/index.es269.js.map +1 -1
  364. package/dist/index.es270.js +10 -10
  365. package/dist/index.es270.js.map +1 -1
  366. package/dist/index.es271.js +11 -15
  367. package/dist/index.es271.js.map +1 -1
  368. package/dist/index.es272.js +14 -51
  369. package/dist/index.es272.js.map +1 -1
  370. package/dist/index.es273.js +44 -158
  371. package/dist/index.es273.js.map +1 -1
  372. package/dist/index.es274.js +167 -2
  373. package/dist/index.es274.js.map +1 -1
  374. package/dist/index.es275.js +2 -11
  375. package/dist/index.es275.js.map +1 -1
  376. package/dist/index.es276.js +9 -18
  377. package/dist/index.es276.js.map +1 -1
  378. package/dist/index.es277.js +17 -36
  379. package/dist/index.es277.js.map +1 -1
  380. package/dist/index.es278.js +42 -0
  381. package/dist/index.es278.js.map +1 -0
  382. package/dist/index.es28.js +7 -7
  383. package/dist/index.es29.js +1 -1
  384. package/dist/index.es32.js +4 -4
  385. package/dist/index.es33.js +1191 -13
  386. package/dist/index.es33.js.map +1 -1
  387. package/dist/index.es34.js +6 -117
  388. package/dist/index.es34.js.map +1 -1
  389. package/dist/index.es35.js +8 -70
  390. package/dist/index.es35.js.map +1 -1
  391. package/dist/index.es36.js +148 -19
  392. package/dist/index.es36.js.map +1 -1
  393. package/dist/index.es37.js +112 -255
  394. package/dist/index.es37.js.map +1 -1
  395. package/dist/index.es38.js +68 -40
  396. package/dist/index.es38.js.map +1 -1
  397. package/dist/index.es39.js +17 -214
  398. package/dist/index.es39.js.map +1 -1
  399. package/dist/index.es40.js +247 -53
  400. package/dist/index.es40.js.map +1 -1
  401. package/dist/index.es41.js +24 -123
  402. package/dist/index.es41.js.map +1 -1
  403. package/dist/index.es42.js +205 -14
  404. package/dist/index.es42.js.map +1 -1
  405. package/dist/index.es43.js +58 -221
  406. package/dist/index.es43.js.map +1 -1
  407. package/dist/index.es44.js +140 -7
  408. package/dist/index.es44.js.map +1 -1
  409. package/dist/index.es45.js +17 -1185
  410. package/dist/index.es45.js.map +1 -1
  411. package/dist/index.es46.js +229 -6
  412. package/dist/index.es46.js.map +1 -1
  413. package/dist/index.es47.js +15 -146
  414. package/dist/index.es47.js.map +1 -1
  415. package/dist/index.es48.js +6 -8
  416. package/dist/index.es48.js.map +1 -1
  417. package/dist/index.es49.js +84 -87
  418. package/dist/index.es49.js.map +1 -1
  419. package/dist/index.es50.js +7 -3
  420. package/dist/index.es50.js.map +1 -1
  421. package/dist/index.es51.js +14 -35
  422. package/dist/index.es51.js.map +1 -1
  423. package/dist/index.es52.js +7 -71
  424. package/dist/index.es52.js.map +1 -1
  425. package/dist/index.es53.js +89 -33
  426. package/dist/index.es53.js.map +1 -1
  427. package/dist/index.es54.js +3 -305
  428. package/dist/index.es54.js.map +1 -1
  429. package/dist/index.es55.js +36 -9
  430. package/dist/index.es55.js.map +1 -1
  431. package/dist/index.es56.js +64 -83
  432. package/dist/index.es56.js.map +1 -1
  433. package/dist/index.es57.js +36 -6
  434. package/dist/index.es57.js.map +1 -1
  435. package/dist/index.es58.js +303 -12
  436. package/dist/index.es58.js.map +1 -1
  437. package/dist/index.es59.js +9 -143
  438. package/dist/index.es59.js.map +1 -1
  439. package/dist/index.es60.js +5 -299
  440. package/dist/index.es60.js.map +1 -1
  441. package/dist/index.es61.js +158 -61
  442. package/dist/index.es61.js.map +1 -1
  443. package/dist/index.es62.js +658 -199
  444. package/dist/index.es62.js.map +1 -1
  445. package/dist/index.es63.js +138 -29
  446. package/dist/index.es63.js.map +1 -1
  447. package/dist/index.es64.js +299 -8
  448. package/dist/index.es64.js.map +1 -1
  449. package/dist/index.es65.js +65 -11
  450. package/dist/index.es65.js.map +1 -1
  451. package/dist/index.es66.js +201 -175
  452. package/dist/index.es66.js.map +1 -1
  453. package/dist/index.es67.js +33 -23
  454. package/dist/index.es67.js.map +1 -1
  455. package/dist/index.es68.js +8 -1399
  456. package/dist/index.es68.js.map +1 -1
  457. package/dist/index.es69.js +12 -9
  458. package/dist/index.es69.js.map +1 -1
  459. package/dist/index.es70.js +187 -8
  460. package/dist/index.es70.js.map +1 -1
  461. package/dist/index.es71.js +24 -6
  462. package/dist/index.es71.js.map +1 -1
  463. package/dist/index.es72.js +1384 -147
  464. package/dist/index.es72.js.map +1 -1
  465. package/dist/index.es73.js +9 -672
  466. package/dist/index.es73.js.map +1 -1
  467. package/dist/index.es74.js +8 -12
  468. package/dist/index.es74.js.map +1 -1
  469. package/dist/index.es75.js +35 -38
  470. package/dist/index.es75.js.map +1 -1
  471. package/dist/index.es76.js +5 -34
  472. package/dist/index.es76.js.map +1 -1
  473. package/dist/index.es77.js +64 -223
  474. package/dist/index.es77.js.map +1 -1
  475. package/dist/index.es78.js +36 -29
  476. package/dist/index.es78.js.map +1 -1
  477. package/dist/index.es79.js +11 -74
  478. package/dist/index.es79.js.map +1 -1
  479. package/dist/index.es80.js +37 -73
  480. package/dist/index.es80.js.map +1 -1
  481. package/dist/index.es81.js +32 -50
  482. package/dist/index.es81.js.map +1 -1
  483. package/dist/index.es82.js +228 -26
  484. package/dist/index.es82.js.map +1 -1
  485. package/dist/index.es83.js +6 -19
  486. package/dist/index.es83.js.map +1 -1
  487. package/dist/index.es84.js +72 -54
  488. package/dist/index.es84.js.map +1 -1
  489. package/dist/index.es85.js +76 -13
  490. package/dist/index.es85.js.map +1 -1
  491. package/dist/index.es86.js +47 -132
  492. package/dist/index.es86.js.map +1 -1
  493. package/dist/index.es87.js +29 -20
  494. package/dist/index.es87.js.map +1 -1
  495. package/dist/index.es88.js +37 -176
  496. package/dist/index.es88.js.map +1 -1
  497. package/dist/index.es89.js +49 -233
  498. package/dist/index.es89.js.map +1 -1
  499. package/dist/index.es90.js +13 -355
  500. package/dist/index.es90.js.map +1 -1
  501. package/dist/index.es91.js +128 -128
  502. package/dist/index.es91.js.map +1 -1
  503. package/dist/index.es92.js +21 -70
  504. package/dist/index.es92.js.map +1 -1
  505. package/dist/index.es93.js +179 -34
  506. package/dist/index.es93.js.map +1 -1
  507. package/dist/index.es94.js +230 -26
  508. package/dist/index.es94.js.map +1 -1
  509. package/dist/index.es95.js +346 -157
  510. package/dist/index.es95.js.map +1 -1
  511. package/dist/index.es96.js +129 -195
  512. package/dist/index.es96.js.map +1 -1
  513. package/dist/index.es97.js +70 -14
  514. package/dist/index.es97.js.map +1 -1
  515. package/dist/index.es98.js +35 -28
  516. package/dist/index.es98.js.map +1 -1
  517. package/dist/index.es99.js +34 -31
  518. package/dist/index.es99.js.map +1 -1
  519. package/dist/styles.css +1 -1
  520. package/package.json +8 -11
@@ -1 +1 @@
1
- {"version":3,"file":"index.es77.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/bedrock_converse.js"],"sourcesContent":["import { _isArray, _isBytesArray, _isContentBlock, _isNumber, _isObject, _isString, iife } from \"./utils.js\";\n\n//#region src/messages/block_translators/bedrock_converse.ts\nfunction convertFileFormatToMimeType(format) {\n\tswitch (format) {\n\t\tcase \"csv\": return \"text/csv\";\n\t\tcase \"doc\": return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n\t\tcase \"docx\": return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n\t\tcase \"html\": return \"text/html\";\n\t\tcase \"md\": return \"text/markdown\";\n\t\tcase \"pdf\": return \"application/pdf\";\n\t\tcase \"txt\": return \"text/plain\";\n\t\tcase \"xls\": return \"application/vnd.ms-excel\";\n\t\tcase \"xlsx\": return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n\t\tcase \"gif\": return \"image/gif\";\n\t\tcase \"jpeg\": return \"image/jpeg\";\n\t\tcase \"jpg\": return \"image/jpeg\";\n\t\tcase \"png\": return \"image/png\";\n\t\tcase \"webp\": return \"image/webp\";\n\t\tcase \"flv\": return \"video/flv\";\n\t\tcase \"mkv\": return \"video/mkv\";\n\t\tcase \"mov\": return \"video/mov\";\n\t\tcase \"mp4\": return \"video/mp4\";\n\t\tcase \"mpeg\": return \"video/mpeg\";\n\t\tcase \"mpg\": return \"video/mpg\";\n\t\tcase \"three_gp\": return \"video/three_gp\";\n\t\tcase \"webm\": return \"video/webm\";\n\t\tcase \"wmv\": return \"video/wmv\";\n\t\tdefault: return \"application/octet-stream\";\n\t}\n}\nfunction convertConverseDocumentBlock(block) {\n\tif (_isObject(block.document) && _isObject(block.document.source)) {\n\t\tconst format = _isObject(block.document) && _isString(block.document.format) ? block.document.format : \"\";\n\t\tconst mimeType = convertFileFormatToMimeType(format);\n\t\tif (_isObject(block.document.source)) {\n\t\t\tif (_isObject(block.document.source.s3Location) && _isString(block.document.source.s3Location.uri)) return {\n\t\t\t\ttype: \"file\",\n\t\t\t\tmimeType,\n\t\t\t\tfileId: block.document.source.s3Location.uri\n\t\t\t};\n\t\t\tif (_isBytesArray(block.document.source.bytes)) return {\n\t\t\t\ttype: \"file\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: block.document.source.bytes\n\t\t\t};\n\t\t\tif (_isString(block.document.source.text)) return {\n\t\t\t\ttype: \"file\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: Buffer.from(block.document.source.text).toString(\"base64\")\n\t\t\t};\n\t\t\tif (_isArray(block.document.source.content)) {\n\t\t\t\tconst data = block.document.source.content.reduce((acc, item) => {\n\t\t\t\t\tif (_isObject(item) && _isString(item.text)) return acc + item.text;\n\t\t\t\t\treturn acc;\n\t\t\t\t}, \"\");\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"file\",\n\t\t\t\t\tmimeType,\n\t\t\t\t\tdata\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"non_standard\",\n\t\tvalue: block\n\t};\n}\nfunction convertConverseImageBlock(block) {\n\tif (_isContentBlock(block, \"image\") && _isObject(block.image)) {\n\t\tconst format = _isObject(block.image) && _isString(block.image.format) ? block.image.format : \"\";\n\t\tconst mimeType = convertFileFormatToMimeType(format);\n\t\tif (_isObject(block.image.source)) {\n\t\t\tif (_isObject(block.image.source.s3Location) && _isString(block.image.source.s3Location.uri)) return {\n\t\t\t\ttype: \"image\",\n\t\t\t\tmimeType,\n\t\t\t\tfileId: block.image.source.s3Location.uri\n\t\t\t};\n\t\t\tif (_isBytesArray(block.image.source.bytes)) return {\n\t\t\t\ttype: \"image\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: block.image.source.bytes\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"non_standard\",\n\t\tvalue: block\n\t};\n}\nfunction convertConverseVideoBlock(block) {\n\tif (_isContentBlock(block, \"video\") && _isObject(block.video)) {\n\t\tconst format = _isObject(block.video) && _isString(block.video.format) ? block.video.format : \"\";\n\t\tconst mimeType = convertFileFormatToMimeType(format);\n\t\tif (_isObject(block.video.source)) {\n\t\t\tif (_isObject(block.video.source.s3Location) && _isString(block.video.source.s3Location.uri)) return {\n\t\t\t\ttype: \"video\",\n\t\t\t\tmimeType,\n\t\t\t\tfileId: block.video.source.s3Location.uri\n\t\t\t};\n\t\t\tif (_isBytesArray(block.video.source.bytes)) return {\n\t\t\t\ttype: \"video\",\n\t\t\t\tmimeType,\n\t\t\t\tdata: block.video.source.bytes\n\t\t\t};\n\t\t}\n\t}\n\treturn {\n\t\ttype: \"non_standard\",\n\t\tvalue: block\n\t};\n}\nfunction convertToV1FromChatBedrockConverseMessage(message) {\n\tfunction* iterateContent() {\n\t\tconst content = typeof message.content === \"string\" ? [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t}] : message.content;\n\t\tfor (const block of content) {\n\t\t\tif (_isContentBlock(block, \"cache_point\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"citations_content\") && _isObject(block.citationsContent)) {\n\t\t\t\tconst text = _isArray(block.citationsContent.content) ? block.citationsContent.content.reduce((acc, item) => {\n\t\t\t\t\tif (_isObject(item) && _isString(item.text)) return acc + item.text;\n\t\t\t\t\treturn acc;\n\t\t\t\t}, \"\") : \"\";\n\t\t\t\tconst annotations = _isArray(block.citationsContent.citations) ? block.citationsContent.citations.reduce((acc, item) => {\n\t\t\t\t\tif (_isObject(item)) {\n\t\t\t\t\t\tconst citedText = _isArray(item.sourceContent) ? item.sourceContent.reduce((acc$1, item$1) => {\n\t\t\t\t\t\t\tif (_isObject(item$1) && _isString(item$1.text)) return acc$1 + item$1.text;\n\t\t\t\t\t\t\treturn acc$1;\n\t\t\t\t\t\t}, \"\") : \"\";\n\t\t\t\t\t\tconst properties = iife(() => {\n\t\t\t\t\t\t\tif (_isObject(item.location)) {\n\t\t\t\t\t\t\t\tconst location = item.location.documentChar || item.location.documentPage || item.location.documentChunk;\n\t\t\t\t\t\t\t\tif (_isObject(location)) return {\n\t\t\t\t\t\t\t\t\tsource: _isNumber(location.documentIndex) ? location.documentIndex.toString() : void 0,\n\t\t\t\t\t\t\t\t\tstartIndex: _isNumber(location.start) ? location.start : void 0,\n\t\t\t\t\t\t\t\t\tendIndex: _isNumber(location.end) ? location.end : void 0\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn {};\n\t\t\t\t\t\t});\n\t\t\t\t\t\tacc.push({\n\t\t\t\t\t\t\ttype: \"citation\",\n\t\t\t\t\t\t\tcitedText,\n\t\t\t\t\t\t\t...properties\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, []) : [];\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext,\n\t\t\t\t\tannotations\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"document\") && _isObject(block.document)) {\n\t\t\t\tyield convertConverseDocumentBlock(block);\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"guard_content\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"image\") && _isObject(block.image)) {\n\t\t\t\tyield convertConverseImageBlock(block);\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"reasoning_content\") && _isString(block.reasoningText)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: block.reasoningText\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"text\") && _isString(block.text)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: block.text\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"tool_result\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"tool_call\")) continue;\n\t\t\telse if (_isContentBlock(block, \"video\") && _isObject(block.video)) {\n\t\t\t\tyield convertConverseVideoBlock(block);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tyield {\n\t\t\t\ttype: \"non_standard\",\n\t\t\t\tvalue: block\n\t\t\t};\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\nconst ChatBedrockConverseTranslator = {\n\ttranslateContent: convertToV1FromChatBedrockConverseMessage,\n\ttranslateContentChunk: convertToV1FromChatBedrockConverseMessage\n};\n\n//#endregion\nexport { ChatBedrockConverseTranslator };\n//# sourceMappingURL=bedrock_converse.js.map"],"names":[],"mappings":";AAGA,SAAS,4BAA4B,QAAQ;AAC5C,UAAQ,QAAM;AAAA,IACb,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAM,aAAO;AAAA,IAClB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAO,aAAO;AAAA,IACnB,KAAK;AAAY,aAAO;AAAA,IACxB,KAAK;AAAQ,aAAO;AAAA,IACpB,KAAK;AAAO,aAAO;AAAA,IACnB;AAAS,aAAO;AAAA,EAClB;AACA;AACA,SAAS,6BAA6B,OAAO;AAC5C,MAAI,UAAU,MAAM,QAAQ,KA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 {"version":3,"file":"index.es77.js","sources":["../node_modules/.pnpm/p-timeout@7.0.1/node_modules/p-timeout/index.js"],"sourcesContent":["export class TimeoutError extends Error {\n\tname = 'TimeoutError';\n\n\tconstructor(message, options) {\n\t\tsuper(message, options);\n\t\tError.captureStackTrace?.(this, TimeoutError);\n\t}\n}\n\nconst getAbortedReason = signal => signal.reason ?? new DOMException('This operation was aborted.', 'AbortError');\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t\tsignal,\n\t} = options;\n\n\tlet timer;\n\tlet abortHandler;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (signal?.aborted) {\n\t\t\treject(getAbortedReason(signal));\n\t\t\treturn;\n\t\t}\n\n\t\tif (signal) {\n\t\t\tabortHandler = () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t};\n\n\t\t\tsignal.addEventListener('abort', abortHandler, {once: true});\n\t\t}\n\n\t\t// Use .then() instead of async IIFE to preserve stack traces\n\t\t// eslint-disable-next-line promise/prefer-await-to-then, promise/prefer-catch\n\t\tpromise.then(resolve, reject);\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\t// `.call(undefined, ...)` is needed for custom timers to avoid context issues\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\t});\n\n\t// eslint-disable-next-line promise/prefer-await-to-then\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t\tif (abortHandler && signal) {\n\t\t\tsignal.removeEventListener('abort', abortHandler);\n\t\t}\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\t// `.call(undefined, ...)` is needed for custom timers to avoid context issues\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n"],"names":[],"mappings":"AAAO,MAAM,qBAAqB,MAAM;AAAA,EACvC,OAAO;AAAA,EAEP,YAAY,SAAS,SAAS;AAC7B,UAAM,SAAS,OAAO;AACtB,UAAM,oBAAoB,MAAM,YAAY;AAAA,EAC7C;AACD;AAEA,MAAM,mBAAmB,YAAU,OAAO,UAAU,IAAI,aAAa,+BAA+B,YAAY;AAEjG,SAAS,SAAS,SAAS,SAAS;AAClD,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe,EAAC,YAAY,aAAY;AAAA,IACxC;AAAA,EACF,IAAK;AAEJ,MAAI;AACJ,MAAI;AAEJ,QAAM,iBAAiB,IAAI,QAAQ,CAAC,SAAS,WAAW;AACvD,QAAI,OAAO,iBAAiB,YAAY,KAAK,KAAK,YAAY,MAAM,GAAG;AACtE,YAAM,IAAI,UAAU,4DAA4D,YAAY,IAAI;AAAA,IACjG;AAEA,QAAI,QAAQ,SAAS;AACpB,aAAO,iBAAiB,MAAM,CAAC;AAC/B;AAAA,IACD;AAEA,QAAI,QAAQ;AACX,qBAAe,MAAM;AACpB,eAAO,iBAAiB,MAAM,CAAC;AAAA,MAChC;AAEA,aAAO,iBAAiB,SAAS,cAAc,EAAC,MAAM,KAAI,CAAC;AAAA,IAC5D;AAIA,YAAQ,KAAK,SAAS,MAAM;AAE5B,QAAI,iBAAiB,OAAO,mBAAmB;AAC9C;AAAA,IACD;AAGA,UAAM,eAAe,IAAI,aAAY;AAGrC,YAAQ,aAAa,WAAW,KAAK,QAAW,MAAM;AACrD,UAAI,UAAU;AACb,YAAI;AACH,kBAAQ,SAAQ,CAAE;AAAA,QACnB,SAAS,OAAO;AACf,iBAAO,KAAK;AAAA,QACb;AAEA;AAAA,MACD;AAEA,UAAI,OAAO,QAAQ,WAAW,YAAY;AACzC,gBAAQ,OAAM;AAAA,MACf;AAEA,UAAI,YAAY,OAAO;AACtB,gBAAO;AAAA,MACR,WAAW,mBAAmB,OAAO;AACpC,eAAO,OAAO;AAAA,MACf,OAAO;AACN,qBAAa,UAAU,WAAW,2BAA2B,YAAY;AACzE,eAAO,YAAY;AAAA,MACpB;AAAA,IACD,GAAG,YAAY;AAAA,EAChB,CAAC;AAGD,QAAM,oBAAoB,eAAe,QAAQ,MAAM;AACtD,sBAAkB,MAAK;AACvB,QAAI,gBAAgB,QAAQ;AAC3B,aAAO,oBAAoB,SAAS,YAAY;AAAA,IACjD;AAAA,EACD,CAAC;AAED,oBAAkB,QAAQ,MAAM;AAE/B,iBAAa,aAAa,KAAK,QAAW,KAAK;AAC/C,YAAQ;AAAA,EACT;AAEA,SAAO;AACR;","x_google_ignoreList":[0]}
@@ -1,33 +1,40 @@
1
- import { _isString } from "./index.es76.js";
2
- function convertToV1FromDeepSeekMessage(message) {
3
- const blocks = [];
4
- const reasoningContent = message.additional_kwargs?.reasoning_content;
5
- if (_isString(reasoningContent) && reasoningContent.length > 0) blocks.push({
6
- type: "reasoning",
7
- reasoning: reasoningContent
8
- });
9
- if (typeof message.content === "string") {
10
- if (message.content.length > 0) blocks.push({
11
- type: "text",
12
- text: message.content
13
- });
14
- } else for (const block of message.content) if (typeof block === "object" && "type" in block && block.type === "text" && "text" in block && _isString(block.text)) blocks.push({
15
- type: "text",
16
- text: block.text
17
- });
18
- for (const toolCall of message.tool_calls ?? []) blocks.push({
19
- type: "tool_call",
20
- id: toolCall.id,
21
- name: toolCall.name,
22
- args: toolCall.args
23
- });
24
- return blocks;
1
+ import lowerBound from "./index.es106.js";
2
+ class PriorityQueue {
3
+ #queue = [];
4
+ enqueue(run, options) {
5
+ const { priority = 0, id } = options ?? {};
6
+ const element = {
7
+ priority,
8
+ id,
9
+ run
10
+ };
11
+ if (this.size === 0 || this.#queue[this.size - 1].priority >= priority) {
12
+ this.#queue.push(element);
13
+ return;
14
+ }
15
+ const index = lowerBound(this.#queue, element, (a, b) => b.priority - a.priority);
16
+ this.#queue.splice(index, 0, element);
17
+ }
18
+ setPriority(id, priority) {
19
+ const index = this.#queue.findIndex((element) => element.id === id);
20
+ if (index === -1) {
21
+ throw new ReferenceError(`No promise function with the id "${id}" exists in the queue.`);
22
+ }
23
+ const [item] = this.#queue.splice(index, 1);
24
+ this.enqueue(item.run, { priority, id });
25
+ }
26
+ dequeue() {
27
+ const item = this.#queue.shift();
28
+ return item?.run;
29
+ }
30
+ filter(options) {
31
+ return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);
32
+ }
33
+ get size() {
34
+ return this.#queue.length;
35
+ }
25
36
  }
26
- const ChatDeepSeekTranslator = {
27
- translateContent: convertToV1FromDeepSeekMessage,
28
- translateContentChunk: convertToV1FromDeepSeekMessage
29
- };
30
37
  export {
31
- ChatDeepSeekTranslator
38
+ PriorityQueue as default
32
39
  };
33
40
  //# sourceMappingURL=index.es78.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es78.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/deepseek.js"],"sourcesContent":["import { _isString } from \"./utils.js\";\n\n//#region src/messages/block_translators/deepseek.ts\n/**\n* Converts a DeepSeek AI message to an array of v1 standard content blocks.\n*\n* This function processes an AI message from DeepSeek's API format\n* and converts it to the standardized v1 content block format. It handles\n* both string content and the reasoning_content in additional_kwargs.\n*\n* @param message - The AI message containing DeepSeek-formatted content\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const message = new AIMessage({\n* content: \"The answer is 42\",\n* additional_kwargs: { reasoning_content: \"Let me think about this...\" }\n* });\n* const standardBlocks = convertToV1FromDeepSeekMessage(message);\n* // Returns:\n* // [\n* // { type: \"reasoning\", reasoning: \"Let me think about this...\" },\n* // { type: \"text\", text: \"The answer is 42\" }\n* // ]\n* ```\n*/\nfunction convertToV1FromDeepSeekMessage(message) {\n\tconst blocks = [];\n\tconst reasoningContent = message.additional_kwargs?.reasoning_content;\n\tif (_isString(reasoningContent) && reasoningContent.length > 0) blocks.push({\n\t\ttype: \"reasoning\",\n\t\treasoning: reasoningContent\n\t});\n\tif (typeof message.content === \"string\") {\n\t\tif (message.content.length > 0) blocks.push({\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t});\n\t} else for (const block of message.content) if (typeof block === \"object\" && \"type\" in block && block.type === \"text\" && \"text\" in block && _isString(block.text)) blocks.push({\n\t\ttype: \"text\",\n\t\ttext: block.text\n\t});\n\tfor (const toolCall of message.tool_calls ?? []) blocks.push({\n\t\ttype: \"tool_call\",\n\t\tid: toolCall.id,\n\t\tname: toolCall.name,\n\t\targs: toolCall.args\n\t});\n\treturn blocks;\n}\nconst ChatDeepSeekTranslator = {\n\ttranslateContent: convertToV1FromDeepSeekMessage,\n\ttranslateContentChunk: convertToV1FromDeepSeekMessage\n};\n\n//#endregion\nexport { ChatDeepSeekTranslator };\n//# sourceMappingURL=deepseek.js.map"],"names":[],"mappings":";AA2BA,SAAS,+BAA+B,SAAS;AAChD,QAAM,SAAS,CAAA;AACf,QAAM,mBAAmB,QAAQ,mBAAmB;AACpD,MAAI,UAAU,gBAAgB,KAAK,iBAAiB,SAAS,EAAG,QAAO,KAAK;AAAA,IAC3E,MAAM;AAAA,IACN,WAAW;AAAA,EACb,CAAE;AACD,MAAI,OAAO,QAAQ,YAAY,UAAU;AACxC,QAAI,QAAQ,QAAQ,SAAS,EAAG,QAAO,KAAK;AAAA,MAC3C,MAAM;AAAA,MACN,MAAM,QAAQ;AAAA,IACjB,CAAG;AAAA,EACF,MAAO,YAAW,SAAS,QAAQ,QAAS,KAAI,OAAO,UAAU,YAAY,UAAU,SAAS,MAAM,SAAS,UAAU,UAAU,SAAS,UAAU,MAAM,IAAI,EAAG,QAAO,KAAK;AAAA,IAC9K,MAAM;AAAA,IACN,MAAM,MAAM;AAAA,EACd,CAAE;AACD,aAAW,YAAY,QAAQ,cAAc,CAAA,EAAI,QAAO,KAAK;AAAA,IAC5D,MAAM;AAAA,IACN,IAAI,SAAS;AAAA,IACb,MAAM,SAAS;AAAA,IACf,MAAM,SAAS;AAAA,EACjB,CAAE;AACD,SAAO;AACR;AACK,MAAC,yBAAyB;AAAA,EAC9B,kBAAkB;AAAA,EAClB,uBAAuB;AACxB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es78.js","sources":["../node_modules/.pnpm/p-queue@9.1.0/node_modules/p-queue/dist/priority-queue.js"],"sourcesContent":["import lowerBound from './lower-bound.js';\nexport default class PriorityQueue {\n #queue = [];\n enqueue(run, options) {\n const { priority = 0, id, } = options ?? {};\n const element = {\n priority,\n id,\n run,\n };\n if (this.size === 0 || this.#queue[this.size - 1].priority >= priority) {\n this.#queue.push(element);\n return;\n }\n const index = lowerBound(this.#queue, element, (a, b) => b.priority - a.priority);\n this.#queue.splice(index, 0, element);\n }\n setPriority(id, priority) {\n const index = this.#queue.findIndex((element) => element.id === id);\n if (index === -1) {\n throw new ReferenceError(`No promise function with the id \"${id}\" exists in the queue.`);\n }\n const [item] = this.#queue.splice(index, 1);\n this.enqueue(item.run, { priority, id });\n }\n dequeue() {\n const item = this.#queue.shift();\n return item?.run;\n }\n filter(options) {\n return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run);\n }\n get size() {\n return this.#queue.length;\n }\n}\n"],"names":[],"mappings":";AACe,MAAM,cAAc;AAAA,EAC/B,SAAS,CAAA;AAAA,EACT,QAAQ,KAAK,SAAS;AAClB,UAAM,EAAE,WAAW,GAAG,GAAE,IAAM,WAAW,CAAA;AACzC,UAAM,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,IACZ;AACQ,QAAI,KAAK,SAAS,KAAK,KAAK,OAAO,KAAK,OAAO,CAAC,EAAE,YAAY,UAAU;AACpE,WAAK,OAAO,KAAK,OAAO;AACxB;AAAA,IACJ;AACA,UAAM,QAAQ,WAAW,KAAK,QAAQ,SAAS,CAAC,GAAG,MAAM,EAAE,WAAW,EAAE,QAAQ;AAChF,SAAK,OAAO,OAAO,OAAO,GAAG,OAAO;AAAA,EACxC;AAAA,EACA,YAAY,IAAI,UAAU;AACtB,UAAM,QAAQ,KAAK,OAAO,UAAU,CAAC,YAAY,QAAQ,OAAO,EAAE;AAClE,QAAI,UAAU,IAAI;AACd,YAAM,IAAI,eAAe,oCAAoC,EAAE,wBAAwB;AAAA,IAC3F;AACA,UAAM,CAAC,IAAI,IAAI,KAAK,OAAO,OAAO,OAAO,CAAC;AAC1C,SAAK,QAAQ,KAAK,KAAK,EAAE,UAAU,IAAI;AAAA,EAC3C;AAAA,EACA,UAAU;AACN,UAAM,OAAO,KAAK,OAAO,MAAK;AAC9B,WAAO,MAAM;AAAA,EACjB;AAAA,EACA,OAAO,SAAS;AACZ,WAAO,KAAK,OAAO,OAAO,CAAC,YAAY,QAAQ,aAAa,QAAQ,QAAQ,EAAE,IAAI,CAAC,YAAY,QAAQ,GAAG;AAAA,EAC9G;AAAA,EACA,IAAI,OAAO;AACP,WAAO,KAAK,OAAO;AAAA,EACvB;AACJ;","x_google_ignoreList":[0]}
@@ -1,78 +1,15 @@
1
- import { _isContentBlock, _isString, _isObject } from "./index.es76.js";
2
- function convertToV1FromChatGoogleMessage(message) {
3
- function* iterateContent() {
4
- const content = typeof message.content === "string" ? [{
5
- type: "text",
6
- text: message.content
7
- }] : message.content;
8
- for (const block of content) {
9
- if (_isContentBlock(block, "text") && _isString(block.text)) {
10
- yield {
11
- type: "text",
12
- text: block.text
13
- };
14
- continue;
15
- } else if (_isContentBlock(block, "thinking") && _isString(block.thinking)) {
16
- yield {
17
- type: "reasoning",
18
- reasoning: block.thinking,
19
- ...block.signature ? { signature: block.signature } : {}
20
- };
21
- continue;
22
- } else if (_isContentBlock(block, "inlineData") && _isObject(block.inlineData) && _isString(block.inlineData.mimeType) && _isString(block.inlineData.data)) {
23
- yield {
24
- type: "file",
25
- mimeType: block.inlineData.mimeType,
26
- data: block.inlineData.data
27
- };
28
- continue;
29
- } else if (_isContentBlock(block, "functionCall") && _isObject(block.functionCall) && _isString(block.functionCall.name) && _isObject(block.functionCall.args)) {
30
- yield {
31
- type: "tool_call",
32
- id: message.id,
33
- name: block.functionCall.name,
34
- args: block.functionCall.args
35
- };
36
- continue;
37
- } else if (_isContentBlock(block, "functionResponse")) {
38
- yield {
39
- type: "non_standard",
40
- value: block
41
- };
42
- continue;
43
- } else if (_isContentBlock(block, "fileData") && _isObject(block.fileData) && _isString(block.fileData.mimeType) && _isString(block.fileData.fileUri)) {
44
- yield {
45
- type: "file",
46
- mimeType: block.fileData.mimeType,
47
- fileId: block.fileData.fileUri
48
- };
49
- continue;
50
- } else if (_isContentBlock(block, "executableCode")) {
51
- yield {
52
- type: "non_standard",
53
- value: block
54
- };
55
- continue;
56
- } else if (_isContentBlock(block, "codeExecutionResult")) {
57
- yield {
58
- type: "non_standard",
59
- value: block
60
- };
61
- continue;
62
- }
63
- yield {
64
- type: "non_standard",
65
- value: block
66
- };
67
- }
68
- }
69
- return Array.from(iterateContent());
1
+ import snakeCase from "./index.es107.js";
2
+ import "./index.es108.js";
3
+ function keyToJson(key, map) {
4
+ return map?.[key] || snakeCase(key);
5
+ }
6
+ function mapKeys(fields, mapper, map) {
7
+ const mapped = {};
8
+ for (const key in fields) if (Object.hasOwn(fields, key)) mapped[mapper(key, map)] = fields[key];
9
+ return mapped;
70
10
  }
71
- const ChatGoogleGenAITranslator = {
72
- translateContent: convertToV1FromChatGoogleMessage,
73
- translateContentChunk: convertToV1FromChatGoogleMessage
74
- };
75
11
  export {
76
- ChatGoogleGenAITranslator
12
+ keyToJson,
13
+ mapKeys
77
14
  };
78
15
  //# sourceMappingURL=index.es79.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es79.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_genai.js"],"sourcesContent":["import { _isContentBlock, _isObject, _isString } from \"./utils.js\";\n\n//#region src/messages/block_translators/google_genai.ts\nfunction convertToV1FromChatGoogleMessage(message) {\n\tfunction* iterateContent() {\n\t\tconst content = typeof message.content === \"string\" ? [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t}] : message.content;\n\t\tfor (const block of content) {\n\t\t\tif (_isContentBlock(block, \"text\") && _isString(block.text)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: block.text\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"thinking\") && _isString(block.thinking)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: block.thinking,\n\t\t\t\t\t...block.signature ? { signature: block.signature } : {}\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"inlineData\") && _isObject(block.inlineData) && _isString(block.inlineData.mimeType) && _isString(block.inlineData.data)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"file\",\n\t\t\t\t\tmimeType: block.inlineData.mimeType,\n\t\t\t\t\tdata: block.inlineData.data\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"functionCall\") && _isObject(block.functionCall) && _isString(block.functionCall.name) && _isObject(block.functionCall.args)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"tool_call\",\n\t\t\t\t\tid: message.id,\n\t\t\t\t\tname: block.functionCall.name,\n\t\t\t\t\targs: block.functionCall.args\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"functionResponse\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"fileData\") && _isObject(block.fileData) && _isString(block.fileData.mimeType) && _isString(block.fileData.fileUri)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"file\",\n\t\t\t\t\tmimeType: block.fileData.mimeType,\n\t\t\t\t\tfileId: block.fileData.fileUri\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"executableCode\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"codeExecutionResult\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"non_standard\",\n\t\t\t\t\tvalue: block\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tyield {\n\t\t\t\ttype: \"non_standard\",\n\t\t\t\tvalue: block\n\t\t\t};\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\nconst ChatGoogleGenAITranslator = {\n\ttranslateContent: convertToV1FromChatGoogleMessage,\n\ttranslateContentChunk: convertToV1FromChatGoogleMessage\n};\n\n//#endregion\nexport { ChatGoogleGenAITranslator };\n//# sourceMappingURL=google_genai.js.map"],"names":[],"mappings":";AAGA,SAAS,iCAAiC,SAAS;AAClD,YAAU,iBAAiB;AAC1B,UAAM,UAAU,OAAO,QAAQ,YAAY,WAAW,CAAC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AAA,UACzB,QAAQ,MAAM,SAAS;AAAA,QAC5B;AACI;AAAA,MACD,WAAW,gBAAgB,OAAO,gBAAgB,GAAG;AACpD,cAAM;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,QACZ;AACI;AAAA,MACD,WAAW,gBAAgB,OAAO,qBAAqB,GAAG;AACzD,cAAM;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,QACZ;AACI;AAAA,MACD;AACA,YAAM;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,MACX;AAAA,IACE;AAAA,EACD;AACA,SAAO,MAAM,KAAK,gBAAgB;AACnC;AACK,MAAC,4BAA4B;AAAA,EACjC,kBAAkB;AAAA,EAClB,uBAAuB;AACxB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es79.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/load/map_keys.js"],"sourcesContent":["import snakeCase from \"decamelize\";\nimport camelCase from \"camelcase\";\n\n//#region src/load/map_keys.ts\nfunction keyToJson(key, map) {\n\treturn map?.[key] || snakeCase(key);\n}\nfunction keyFromJson(key, map) {\n\treturn map?.[key] || camelCase(key);\n}\nfunction mapKeys(fields, mapper, map) {\n\tconst mapped = {};\n\tfor (const key in fields) if (Object.hasOwn(fields, key)) mapped[mapper(key, map)] = fields[key];\n\treturn mapped;\n}\n\n//#endregion\nexport { keyFromJson, keyToJson, mapKeys };\n//# sourceMappingURL=map_keys.js.map"],"names":[],"mappings":";;AAIA,SAAS,UAAU,KAAK,KAAK;AAC5B,SAAO,MAAM,GAAG,KAAK,UAAU,GAAG;AACnC;AAIA,SAAS,QAAQ,QAAQ,QAAQ,KAAK;AACrC,QAAM,SAAS,CAAA;AACf,aAAW,OAAO,OAAQ,KAAI,OAAO,OAAO,QAAQ,GAAG,EAAG,QAAO,OAAO,KAAK,GAAG,CAAC,IAAI,OAAO,GAAG;AAC/F,SAAO;AACR;","x_google_ignoreList":[0]}
@@ -1,79 +1,43 @@
1
- import { _isContentBlock, _isString, iife, _isArray } from "./index.es76.js";
2
- function convertToV1FromChatVertexMessage(message) {
3
- function* iterateContent() {
4
- const content = typeof message.content === "string" ? [{
5
- type: "text",
6
- text: message.content
7
- }] : message.content;
8
- for (const block of content) {
9
- if (_isContentBlock(block, "reasoning") && _isString(block.reasoning)) {
10
- const signature = iife(() => {
11
- const reasoningIndex = content.indexOf(block);
12
- if (_isArray(message.additional_kwargs?.signatures) && reasoningIndex >= 0) return message.additional_kwargs.signatures.at(reasoningIndex);
13
- return void 0;
14
- });
15
- if (_isString(signature)) yield {
16
- type: "reasoning",
17
- reasoning: block.reasoning,
18
- signature
19
- };
20
- else yield {
21
- type: "reasoning",
22
- reasoning: block.reasoning
23
- };
24
- continue;
25
- } else if (_isContentBlock(block, "thinking") && _isString(block.thinking)) {
26
- yield {
27
- type: "reasoning",
28
- reasoning: block.thinking,
29
- ...block.signature ? { signature: block.signature } : {}
30
- };
31
- continue;
32
- } else if (_isContentBlock(block, "text") && _isString(block.text)) {
33
- yield {
34
- type: "text",
35
- text: block.text
36
- };
37
- continue;
38
- } else if (_isContentBlock(block, "image_url")) {
39
- if (_isString(block.image_url)) if (block.image_url.startsWith("data:")) {
40
- const dataUrlRegex = /^data:([^;]+);base64,(.+)$/;
41
- const match = block.image_url.match(dataUrlRegex);
42
- if (match) yield {
43
- type: "image",
44
- data: match[2],
45
- mimeType: match[1]
46
- };
47
- else yield {
48
- type: "image",
49
- url: block.image_url
50
- };
51
- } else yield {
52
- type: "image",
53
- url: block.image_url
54
- };
55
- continue;
56
- } else if (_isContentBlock(block, "media") && _isString(block.mimeType) && _isString(block.data)) {
57
- yield {
58
- type: "file",
59
- mimeType: block.mimeType,
60
- data: block.data
61
- };
62
- continue;
63
- }
64
- yield {
65
- type: "non_standard",
66
- value: block
67
- };
1
+ const LC_ESCAPED_KEY = "__lc_escaped__";
2
+ function needsEscaping(obj) {
3
+ return "lc" in obj || Object.keys(obj).length === 1 && LC_ESCAPED_KEY in obj;
4
+ }
5
+ function escapeObject(obj) {
6
+ return { [LC_ESCAPED_KEY]: obj };
7
+ }
8
+ function isSerializableLike(obj) {
9
+ return obj !== null && typeof obj === "object" && "lc_serializable" in obj && typeof obj.toJSON === "function";
10
+ }
11
+ function createNotImplemented(obj) {
12
+ let id;
13
+ if (obj !== null && typeof obj === "object") if ("lc_id" in obj && Array.isArray(obj.lc_id)) id = obj.lc_id;
14
+ else id = [obj.constructor?.name ?? "Object"];
15
+ else id = [typeof obj];
16
+ return {
17
+ lc: 1,
18
+ type: "not_implemented",
19
+ id
20
+ };
21
+ }
22
+ function escapeIfNeeded(value, pathSet = /* @__PURE__ */ new WeakSet()) {
23
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
24
+ if (pathSet.has(value)) return createNotImplemented(value);
25
+ if (isSerializableLike(value)) return value;
26
+ pathSet.add(value);
27
+ const record = value;
28
+ if (needsEscaping(record)) {
29
+ pathSet.delete(value);
30
+ return escapeObject(record);
68
31
  }
32
+ const result = {};
33
+ for (const [key, val] of Object.entries(record)) result[key] = escapeIfNeeded(val, pathSet);
34
+ pathSet.delete(value);
35
+ return result;
69
36
  }
70
- return Array.from(iterateContent());
37
+ if (Array.isArray(value)) return value.map((item) => escapeIfNeeded(item, pathSet));
38
+ return value;
71
39
  }
72
- const ChatVertexTranslator = {
73
- translateContent: convertToV1FromChatVertexMessage,
74
- translateContentChunk: convertToV1FromChatVertexMessage
75
- };
76
40
  export {
77
- ChatVertexTranslator
41
+ escapeIfNeeded
78
42
  };
79
43
  //# sourceMappingURL=index.es80.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es80.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_vertexai.js"],"sourcesContent":["import { _isArray, _isContentBlock, _isString, iife } from \"./utils.js\";\n\n//#region src/messages/block_translators/google_vertexai.ts\nfunction convertToV1FromChatVertexMessage(message) {\n\tfunction* iterateContent() {\n\t\tconst content = typeof message.content === \"string\" ? [{\n\t\t\ttype: \"text\",\n\t\t\ttext: message.content\n\t\t}] : message.content;\n\t\tfor (const block of content) {\n\t\t\tif (_isContentBlock(block, \"reasoning\") && _isString(block.reasoning)) {\n\t\t\t\tconst signature = iife(() => {\n\t\t\t\t\tconst reasoningIndex = content.indexOf(block);\n\t\t\t\t\tif (_isArray(message.additional_kwargs?.signatures) && reasoningIndex >= 0) return message.additional_kwargs.signatures.at(reasoningIndex);\n\t\t\t\t\treturn void 0;\n\t\t\t\t});\n\t\t\t\tif (_isString(signature)) yield {\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: block.reasoning,\n\t\t\t\t\tsignature\n\t\t\t\t};\n\t\t\t\telse yield {\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: block.reasoning\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"thinking\") && _isString(block.thinking)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: block.thinking,\n\t\t\t\t\t...block.signature ? { signature: block.signature } : {}\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"text\") && _isString(block.text)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: block.text\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"image_url\")) {\n\t\t\t\tif (_isString(block.image_url)) if (block.image_url.startsWith(\"data:\")) {\n\t\t\t\t\tconst dataUrlRegex = /^data:([^;]+);base64,(.+)$/;\n\t\t\t\t\tconst match = block.image_url.match(dataUrlRegex);\n\t\t\t\t\tif (match) yield {\n\t\t\t\t\t\ttype: \"image\",\n\t\t\t\t\t\tdata: match[2],\n\t\t\t\t\t\tmimeType: match[1]\n\t\t\t\t\t};\n\t\t\t\t\telse yield {\n\t\t\t\t\t\ttype: \"image\",\n\t\t\t\t\t\turl: block.image_url\n\t\t\t\t\t};\n\t\t\t\t} else yield {\n\t\t\t\t\ttype: \"image\",\n\t\t\t\t\turl: block.image_url\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"media\") && _isString(block.mimeType) && _isString(block.data)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"file\",\n\t\t\t\t\tmimeType: block.mimeType,\n\t\t\t\t\tdata: block.data\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tyield {\n\t\t\t\ttype: \"non_standard\",\n\t\t\t\tvalue: block\n\t\t\t};\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\nconst ChatVertexTranslator = {\n\ttranslateContent: convertToV1FromChatVertexMessage,\n\ttranslateContentChunk: convertToV1FromChatVertexMessage\n};\n\n//#endregion\nexport { ChatVertexTranslator };\n//# sourceMappingURL=google_vertexai.js.map"],"names":[],"mappings":";AAGA,SAAS,iCAAiC,SAAS;AAClD,YAAU,iBAAiB;AAC1B,UAAM,UAAU,OAAO,QAAQ,YAAY,WAAW,CAAC;AAAA,MACtD,MAAM;AAAA,MACN,MAAM,QAAQ;AAAA,IACjB,CAAG,IAAI,QAAQ;AACb,eAAW,SAAS,SAAS;AAC5B,UAAI,gBAAgB,OAAO,WAAW,KAAK,UAAU,MAAM,SAAS,GAAG;AACtE,cAAM,YAAY,KAAK,MAAM;AAC5B,gBAAM,iBAAiB,QAAQ,QAAQ,KAAK;AAC5C,cAAI,SAAS,QAAQ,mBAAmB,UAAU,KAAK,kBAAkB,EAAG,QAAO,QAAQ,kBAAkB,WAAW,GAAG,cAAc;AACzI,iBAAO;AAAA,QACR,CAAC;AACD,YAAI,UAAU,SAAS,EAAG,OAAM;AAAA,UAC/B,MAAM;AAAA,UACN,WAAW,MAAM;AAAA,UACjB;AAAA,QACL;AAAA,YACS,OAAM;AAAA,UACV,MAAM;AAAA,UAC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80.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/load/validation.js"],"sourcesContent":["//#region src/load/validation.ts\n/**\n* Sentinel key used to mark escaped user objects during serialization.\n*\n* When a plain object contains 'lc' key (which could be confused with LC objects),\n* we wrap it as `{\"__lc_escaped__\": {...original...}}`.\n*/\nconst LC_ESCAPED_KEY = \"__lc_escaped__\";\n/**\n* Check if an object needs escaping to prevent confusion with LC objects.\n*\n* An object needs escaping if:\n* 1. It has an `'lc'` key (could be confused with LC serialization format)\n* 2. It has only the escape key (would be mistaken for an escaped object)\n*/\nfunction needsEscaping(obj) {\n\treturn \"lc\" in obj || Object.keys(obj).length === 1 && LC_ESCAPED_KEY in obj;\n}\n/**\n* Wrap an object in the escape marker.\n*\n* @example\n* ```typescript\n* {\"key\": \"value\"} // becomes {\"__lc_escaped__\": {\"key\": \"value\"}}\n* ```\n*/\nfunction escapeObject(obj) {\n\treturn { [LC_ESCAPED_KEY]: obj };\n}\n/**\n* Check if an object is an escaped user object.\n*\n* @example\n* ```typescript\n* {\"__lc_escaped__\": {...}} // is an escaped object\n* ```\n*/\nfunction isEscapedObject(obj) {\n\treturn Object.keys(obj).length === 1 && LC_ESCAPED_KEY in obj;\n}\n/**\n* Check if an object looks like a Serializable instance (duck typing).\n*/\nfunction isSerializableLike(obj) {\n\treturn obj !== null && typeof obj === \"object\" && \"lc_serializable\" in obj && typeof obj.toJSON === \"function\";\n}\n/**\n* Create a \"not_implemented\" serialization result for objects that cannot be serialized.\n*/\nfunction createNotImplemented(obj) {\n\tlet id;\n\tif (obj !== null && typeof obj === \"object\") if (\"lc_id\" in obj && Array.isArray(obj.lc_id)) id = obj.lc_id;\n\telse id = [obj.constructor?.name ?? \"Object\"];\n\telse id = [typeof obj];\n\treturn {\n\t\tlc: 1,\n\t\ttype: \"not_implemented\",\n\t\tid\n\t};\n}\n/**\n* Escape a value if it needs escaping (contains `lc` key).\n*\n* This is a simpler version of `serializeValue` that doesn't handle Serializable\n* objects - it's meant to be called on kwargs values that have already been\n* processed by `toJSON()`.\n*\n* @param value - The value to potentially escape.\n* @param pathSet - WeakSet to track ancestor objects in the current path to detect circular references.\n* Objects are removed after processing to allow shared references (same object in\n* multiple places) while still detecting true circular references (ancestor in descendant).\n* @returns The value with any `lc`-containing objects wrapped in escape markers.\n*/\nfunction escapeIfNeeded(value, pathSet = /* @__PURE__ */ new WeakSet()) {\n\tif (value !== null && typeof value === \"object\" && !Array.isArray(value)) {\n\t\tif (pathSet.has(value)) return createNotImplemented(value);\n\t\tif (isSerializableLike(value)) return value;\n\t\tpathSet.add(value);\n\t\tconst record = value;\n\t\tif (needsEscaping(record)) {\n\t\t\tpathSet.delete(value);\n\t\t\treturn escapeObject(record);\n\t\t}\n\t\tconst result = {};\n\t\tfor (const [key, val] of Object.entries(record)) result[key] = escapeIfNeeded(val, pathSet);\n\t\tpathSet.delete(value);\n\t\treturn result;\n\t}\n\tif (Array.isArray(value)) return value.map((item) => escapeIfNeeded(item, pathSet));\n\treturn value;\n}\n/**\n* Unescape a value, processing escape markers in object values and arrays.\n*\n* When an escaped object is encountered (`{\"__lc_escaped__\": ...}`), it's\n* unwrapped and the contents are returned AS-IS (no further processing).\n* The contents represent user data that should not be modified.\n*\n* For regular objects and arrays, we recurse to find any nested escape markers.\n*\n* @param obj - The value to unescape.\n* @returns The unescaped value.\n*/\nfunction unescapeValue(obj) {\n\tif (obj !== null && typeof obj === \"object\" && !Array.isArray(obj)) {\n\t\tconst record = obj;\n\t\tif (isEscapedObject(record)) return record[LC_ESCAPED_KEY];\n\t\tconst result = {};\n\t\tfor (const [key, value] of Object.entries(record)) result[key] = unescapeValue(value);\n\t\treturn result;\n\t}\n\tif (Array.isArray(obj)) return obj.map((item) => unescapeValue(item));\n\treturn obj;\n}\n\n//#endregion\nexport { escapeIfNeeded, isEscapedObject, unescapeValue };\n//# sourceMappingURL=validation.js.map"],"names":[],"mappings":"AAOA,MAAM,iBAAiB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_ignoreList":[0]}
@@ -1,55 +1,37 @@
1
- import { _isString } from "./index.es76.js";
2
- function convertToV1FromGroqMessage(message) {
3
- const blocks = [];
4
- const parsedReasoning = message.additional_kwargs?.reasoning;
5
- if (_isString(parsedReasoning) && parsedReasoning.length > 0) blocks.push({
6
- type: "reasoning",
7
- reasoning: parsedReasoning
8
- });
9
- if (typeof message.content === "string") {
10
- let textContent = message.content;
11
- const thinkMatch = textContent.match(/<think>([\s\S]*?)<\/think>/);
12
- if (thinkMatch) {
13
- const thinkingContent = thinkMatch[1].trim();
14
- if (thinkingContent.length > 0) blocks.push({
15
- type: "reasoning",
16
- reasoning: thinkingContent
17
- });
18
- textContent = textContent.replace(/<think>[\s\S]*?<\/think>/, "").trim();
19
- }
20
- if (textContent.length > 0) blocks.push({
21
- type: "text",
22
- text: textContent
23
- });
24
- } else for (const block of message.content) if (typeof block === "object" && "type" in block && block.type === "text" && "text" in block && _isString(block.text)) {
25
- let textContent = block.text;
26
- const thinkMatch = textContent.match(/<think>([\s\S]*?)<\/think>/);
27
- if (thinkMatch) {
28
- const thinkingContent = thinkMatch[1].trim();
29
- if (thinkingContent.length > 0) blocks.push({
30
- type: "reasoning",
31
- reasoning: thinkingContent
32
- });
33
- textContent = textContent.replace(/<think>[\s\S]*?<\/think>/, "").trim();
34
- }
35
- if (textContent.length > 0) blocks.push({
36
- type: "text",
37
- text: textContent
38
- });
1
+ function _isContentBlock(block, type) {
2
+ return _isObject(block) && block.type === type;
3
+ }
4
+ function _isObject(value) {
5
+ return typeof value === "object" && value !== null;
6
+ }
7
+ function _isArray(value) {
8
+ return Array.isArray(value);
9
+ }
10
+ function _isString(value) {
11
+ return typeof value === "string";
12
+ }
13
+ function _isNumber(value) {
14
+ return typeof value === "number";
15
+ }
16
+ function _isBytesArray(value) {
17
+ return value instanceof Uint8Array;
18
+ }
19
+ function safeParseJson(value) {
20
+ try {
21
+ return JSON.parse(value);
22
+ } catch {
23
+ return void 0;
39
24
  }
40
- for (const toolCall of message.tool_calls ?? []) blocks.push({
41
- type: "tool_call",
42
- id: toolCall.id,
43
- name: toolCall.name,
44
- args: toolCall.args
45
- });
46
- return blocks;
47
25
  }
48
- const ChatGroqTranslator = {
49
- translateContent: convertToV1FromGroqMessage,
50
- translateContentChunk: convertToV1FromGroqMessage
51
- };
26
+ const iife = (fn) => fn();
52
27
  export {
53
- ChatGroqTranslator
28
+ _isArray,
29
+ _isBytesArray,
30
+ _isContentBlock,
31
+ _isNumber,
32
+ _isObject,
33
+ _isString,
34
+ iife,
35
+ safeParseJson
54
36
  };
55
37
  //# sourceMappingURL=index.es81.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es81.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/groq.js"],"sourcesContent":["import { _isString } from \"./utils.js\";\n\n//#region src/messages/block_translators/groq.ts\n/**\n* Converts a Groq AI message to an array of v1 standard content blocks.\n*\n* This function processes an AI message from Groq's API format\n* and converts it to the standardized v1 content block format. It handles\n* both parsed reasoning (in additional_kwargs.reasoning) and raw reasoning\n* (in <think> tags within content).\n*\n* @param message - The AI message containing Groq-formatted content\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* // Parsed format (reasoning_format=\"parsed\")\n* const message = new AIMessage({\n* content: \"The answer is 42\",\n* additional_kwargs: { reasoning: \"Let me think about this...\" }\n* });\n* const standardBlocks = convertToV1FromGroqMessage(message);\n* // Returns:\n* // [\n* // { type: \"reasoning\", reasoning: \"Let me think about this...\" },\n* // { type: \"text\", text: \"The answer is 42\" }\n* // ]\n* ```\n*\n* @example\n* ```typescript\n* // Raw format (reasoning_format=\"raw\")\n* const message = new AIMessage({\n* content: \"<think>Let me think...</think>The answer is 42\"\n* });\n* const standardBlocks = convertToV1FromGroqMessage(message);\n* // Returns:\n* // [\n* // { type: \"reasoning\", reasoning: \"Let me think...\" },\n* // { type: \"text\", text: \"The answer is 42\" }\n* // ]\n* ```\n*/\nfunction convertToV1FromGroqMessage(message) {\n\tconst blocks = [];\n\tconst parsedReasoning = message.additional_kwargs?.reasoning;\n\tif (_isString(parsedReasoning) && parsedReasoning.length > 0) blocks.push({\n\t\ttype: \"reasoning\",\n\t\treasoning: parsedReasoning\n\t});\n\tif (typeof message.content === \"string\") {\n\t\tlet textContent = message.content;\n\t\tconst thinkMatch = textContent.match(/<think>([\\s\\S]*?)<\\/think>/);\n\t\tif (thinkMatch) {\n\t\t\tconst thinkingContent = thinkMatch[1].trim();\n\t\t\tif (thinkingContent.length > 0) blocks.push({\n\t\t\t\ttype: \"reasoning\",\n\t\t\t\treasoning: thinkingContent\n\t\t\t});\n\t\t\ttextContent = textContent.replace(/<think>[\\s\\S]*?<\\/think>/, \"\").trim();\n\t\t}\n\t\tif (textContent.length > 0) blocks.push({\n\t\t\ttype: \"text\",\n\t\t\ttext: textContent\n\t\t});\n\t} else for (const block of message.content) if (typeof block === \"object\" && \"type\" in block && block.type === \"text\" && \"text\" in block && _isString(block.text)) {\n\t\tlet textContent = block.text;\n\t\tconst thinkMatch = textContent.match(/<think>([\\s\\S]*?)<\\/think>/);\n\t\tif (thinkMatch) {\n\t\t\tconst thinkingContent = thinkMatch[1].trim();\n\t\t\tif (thinkingContent.length > 0) blocks.push({\n\t\t\t\ttype: \"reasoning\",\n\t\t\t\treasoning: thinkingContent\n\t\t\t});\n\t\t\ttextContent = textContent.replace(/<think>[\\s\\S]*?<\\/think>/, \"\").trim();\n\t\t}\n\t\tif (textContent.length > 0) blocks.push({\n\t\t\ttype: \"text\",\n\t\t\ttext: textContent\n\t\t});\n\t}\n\tfor (const toolCall of message.tool_calls ?? []) blocks.push({\n\t\ttype: \"tool_call\",\n\t\tid: toolCall.id,\n\t\tname: toolCall.name,\n\t\targs: toolCall.args\n\t});\n\treturn blocks;\n}\nconst ChatGroqTranslator = {\n\ttranslateContent: convertToV1FromGroqMessage,\n\ttranslateContentChunk: convertToV1FromGroqMessage\n};\n\n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Ac,CAAA,EAAI,QAAO,KAAK;AAAA,IAC5D,MAAM;AAAA,IACN,IAAI,SAAS;AAAA,IACb,MAAM,SAAS;AAAA,IACf,MAAM,SAAS;AAAA,EACjB,CAAE;AACD,SAAO;AACR;AACK,MAAC,qBAAqB;AAAA,EAC1B,kBAAkB;AAAA,EAClB,uBAAuB;AACxB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es81.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/utils.js"],"sourcesContent":["//#region src/messages/block_translators/utils.ts\nfunction _isContentBlock(block, type) {\n\treturn _isObject(block) && block.type === type;\n}\nfunction _isObject(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction _isArray(value) {\n\treturn Array.isArray(value);\n}\nfunction _isString(value) {\n\treturn typeof value === \"string\";\n}\nfunction _isNumber(value) {\n\treturn typeof value === \"number\";\n}\nfunction _isBytesArray(value) {\n\treturn value instanceof Uint8Array;\n}\nfunction safeParseJson(value) {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\treturn void 0;\n\t}\n}\nconst iife = (fn) => fn();\n\n//#endregion\nexport { _isArray, _isBytesArray, _isContentBlock, _isNumber, _isObject, _isString, iife, safeParseJson };\n//# sourceMappingURL=utils.js.map"],"names":[],"mappings":"AACA,SAAS,gBAAgB,OAAO,MAAM;AACrC,SAAO,UAAU,KAAK,KAAK,MAAM,SAAS;AAC3C;AACA,SAAS,UAAU,OAAO;AACzB,SAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;AACA,SAAS,SAAS,OAAO;AACxB,SAAO,MAAM,QAAQ,KAAK;AAC3B;AACA,SAAS,UAAU,OAAO;AACzB,SAAO,OAAO,UAAU;AACzB;AACA,SAAS,UAAU,OAAO;AACzB,SAAO,OAAO,UAAU;AACzB;AACA,SAAS,cAAc,OAAO;AAC7B,SAAO,iBAAiB;AACzB;AACA,SAAS,cAAc,OAAO;AAC7B,MAAI;AACH,WAAO,KAAK,MAAM,KAAK;AAAA,EACxB,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AACK,MAAC,OAAO,CAAC,OAAO,GAAE;","x_google_ignoreList":[0]}