langgraph-ui-components 0.0.1 → 0.0.2

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 (532) hide show
  1. package/dist/index.es.js +9 -27085
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.es10.js +21 -0
  4. package/dist/index.es10.js.map +1 -0
  5. package/dist/index.es100.js +43 -0
  6. package/dist/index.es100.js.map +1 -0
  7. package/dist/index.es101.js +94 -0
  8. package/dist/index.es101.js.map +1 -0
  9. package/dist/index.es102.js +5 -0
  10. package/dist/index.es102.js.map +1 -0
  11. package/dist/index.es103.js +5 -0
  12. package/dist/index.es103.js.map +1 -0
  13. package/dist/index.es104.js +25 -0
  14. package/dist/index.es104.js.map +1 -0
  15. package/dist/index.es105.js +5 -0
  16. package/dist/index.es105.js.map +1 -0
  17. package/dist/index.es106.js +28 -0
  18. package/dist/index.es106.js.map +1 -0
  19. package/dist/index.es107.js +8 -0
  20. package/dist/index.es107.js.map +1 -0
  21. package/dist/index.es108.js +3 -0
  22. package/dist/index.es108.js.map +1 -0
  23. package/dist/index.es109.js +14 -0
  24. package/dist/index.es109.js.map +1 -0
  25. package/dist/index.es11.js +125 -0
  26. package/dist/index.es11.js.map +1 -0
  27. package/dist/index.es110.js +504 -0
  28. package/dist/index.es110.js.map +1 -0
  29. package/dist/index.es111.js +3 -0
  30. package/dist/index.es111.js.map +1 -0
  31. package/dist/index.es112.js +149 -0
  32. package/dist/index.es112.js.map +1 -0
  33. package/dist/index.es113.js +889 -0
  34. package/dist/index.es113.js.map +1 -0
  35. package/dist/index.es114.js +283 -0
  36. package/dist/index.es114.js.map +1 -0
  37. package/dist/index.es115.js +5 -0
  38. package/dist/index.es115.js.map +1 -0
  39. package/dist/index.es116.js +447 -0
  40. package/dist/index.es116.js.map +1 -0
  41. package/dist/index.es117.js +49 -0
  42. package/dist/index.es117.js.map +1 -0
  43. package/dist/index.es118.js +25 -0
  44. package/dist/index.es118.js.map +1 -0
  45. package/dist/index.es119.js +82 -0
  46. package/dist/index.es119.js.map +1 -0
  47. package/dist/index.es12.js +104 -0
  48. package/dist/index.es12.js.map +1 -0
  49. package/dist/index.es120.js +132 -0
  50. package/dist/index.es120.js.map +1 -0
  51. package/dist/index.es121.js +52 -0
  52. package/dist/index.es121.js.map +1 -0
  53. package/dist/index.es122.js +13 -0
  54. package/dist/index.es122.js.map +1 -0
  55. package/dist/index.es123.js +48 -0
  56. package/dist/index.es123.js.map +1 -0
  57. package/dist/index.es124.js +102 -0
  58. package/dist/index.es124.js.map +1 -0
  59. package/dist/index.es125.js +56 -0
  60. package/dist/index.es125.js.map +1 -0
  61. package/dist/index.es126.js +5 -0
  62. package/dist/index.es126.js.map +1 -0
  63. package/dist/index.es127.js +140 -0
  64. package/dist/index.es127.js.map +1 -0
  65. package/dist/index.es128.js +5 -0
  66. package/dist/index.es128.js.map +1 -0
  67. package/dist/index.es129.js +18 -0
  68. package/dist/index.es129.js.map +1 -0
  69. package/dist/index.es13.js +37 -0
  70. package/dist/index.es13.js.map +1 -0
  71. package/dist/index.es130.js +92 -0
  72. package/dist/index.es130.js.map +1 -0
  73. package/dist/index.es131.js +5 -0
  74. package/dist/index.es131.js.map +1 -0
  75. package/dist/index.es132.js +59 -0
  76. package/dist/index.es132.js.map +1 -0
  77. package/dist/index.es133.js +103 -0
  78. package/dist/index.es133.js.map +1 -0
  79. package/dist/index.es134.js +194 -0
  80. package/dist/index.es134.js.map +1 -0
  81. package/dist/index.es135.js +113 -0
  82. package/dist/index.es135.js.map +1 -0
  83. package/dist/index.es136.js +38 -0
  84. package/dist/index.es136.js.map +1 -0
  85. package/dist/index.es137.js +13 -0
  86. package/dist/index.es137.js.map +1 -0
  87. package/dist/index.es138.js +14 -0
  88. package/dist/index.es138.js.map +1 -0
  89. package/dist/index.es139.js +15 -0
  90. package/dist/index.es139.js.map +1 -0
  91. package/dist/index.es14.js +148 -0
  92. package/dist/index.es14.js.map +1 -0
  93. package/dist/index.es140.js +94 -0
  94. package/dist/index.es140.js.map +1 -0
  95. package/dist/index.es141.js +38 -0
  96. package/dist/index.es141.js.map +1 -0
  97. package/dist/index.es142.js +43 -0
  98. package/dist/index.es142.js.map +1 -0
  99. package/dist/index.es143.js +27 -0
  100. package/dist/index.es143.js.map +1 -0
  101. package/dist/index.es144.js +594 -0
  102. package/dist/index.es144.js.map +1 -0
  103. package/dist/index.es145.js +128 -0
  104. package/dist/index.es145.js.map +1 -0
  105. package/dist/index.es146.js +7 -0
  106. package/dist/index.es146.js.map +1 -0
  107. package/dist/index.es147.js +8 -0
  108. package/dist/index.es147.js.map +1 -0
  109. package/dist/index.es148.js +16 -0
  110. package/dist/index.es148.js.map +1 -0
  111. package/dist/index.es149.js +9 -0
  112. package/dist/index.es149.js.map +1 -0
  113. package/dist/index.es15.js +15 -0
  114. package/dist/index.es15.js.map +1 -0
  115. package/dist/index.es150.js +11 -0
  116. package/dist/index.es150.js.map +1 -0
  117. package/dist/index.es151.js +28 -0
  118. package/dist/index.es151.js.map +1 -0
  119. package/dist/index.es152.js +15 -0
  120. package/dist/index.es152.js.map +1 -0
  121. package/dist/index.es153.js +57 -0
  122. package/dist/index.es153.js.map +1 -0
  123. package/dist/index.es154.js +67 -0
  124. package/dist/index.es154.js.map +1 -0
  125. package/dist/index.es155.js +25 -0
  126. package/dist/index.es155.js.map +1 -0
  127. package/dist/index.es156.js +9 -0
  128. package/dist/index.es156.js.map +1 -0
  129. package/dist/index.es157.js +352 -0
  130. package/dist/index.es157.js.map +1 -0
  131. package/dist/index.es158.js +10 -0
  132. package/dist/index.es158.js.map +1 -0
  133. package/dist/index.es159.js +106 -0
  134. package/dist/index.es159.js.map +1 -0
  135. package/dist/index.es16.js +8 -0
  136. package/dist/index.es16.js.map +1 -0
  137. package/dist/index.es160.js +122 -0
  138. package/dist/index.es160.js.map +1 -0
  139. package/dist/index.es161.js +139 -0
  140. package/dist/index.es161.js.map +1 -0
  141. package/dist/index.es162.js +118 -0
  142. package/dist/index.es162.js.map +1 -0
  143. package/dist/index.es163.js +9 -0
  144. package/dist/index.es163.js.map +1 -0
  145. package/dist/index.es164.js +145 -0
  146. package/dist/index.es164.js.map +1 -0
  147. package/dist/index.es165.js +5 -0
  148. package/dist/index.es165.js.map +1 -0
  149. package/dist/index.es166.js +3685 -0
  150. package/dist/index.es166.js.map +1 -0
  151. package/dist/index.es167.js +345 -0
  152. package/dist/index.es167.js.map +1 -0
  153. package/dist/index.es168.js +112 -0
  154. package/dist/index.es168.js.map +1 -0
  155. package/dist/index.es169.js +136 -0
  156. package/dist/index.es169.js.map +1 -0
  157. package/dist/index.es17.js +36 -0
  158. package/dist/index.es17.js.map +1 -0
  159. package/dist/index.es170.js +18 -0
  160. package/dist/index.es170.js.map +1 -0
  161. package/dist/index.es171.js +155 -0
  162. package/dist/index.es171.js.map +1 -0
  163. package/dist/index.es172.js +18 -0
  164. package/dist/index.es172.js.map +1 -0
  165. package/dist/index.es173.js +11 -0
  166. package/dist/index.es173.js.map +1 -0
  167. package/dist/index.es174.js +24 -0
  168. package/dist/index.es174.js.map +1 -0
  169. package/dist/index.es175.js +93 -0
  170. package/dist/index.es175.js.map +1 -0
  171. package/dist/index.es176.js +27 -0
  172. package/dist/index.es176.js.map +1 -0
  173. package/dist/index.es177.js +9 -0
  174. package/dist/index.es177.js.map +1 -0
  175. package/dist/index.es178.js +7 -0
  176. package/dist/index.es178.js.map +1 -0
  177. package/dist/index.es179.js +21 -0
  178. package/dist/index.es179.js.map +1 -0
  179. package/dist/index.es18.js +126 -0
  180. package/dist/index.es18.js.map +1 -0
  181. package/dist/index.es180.js +35 -0
  182. package/dist/index.es180.js.map +1 -0
  183. package/dist/index.es181.js +9 -0
  184. package/dist/index.es181.js.map +1 -0
  185. package/dist/index.es182.js +109 -0
  186. package/dist/index.es182.js.map +1 -0
  187. package/dist/index.es183.js +16 -0
  188. package/dist/index.es183.js.map +1 -0
  189. package/dist/index.es184.js +21 -0
  190. package/dist/index.es184.js.map +1 -0
  191. package/dist/index.es185.js +34 -0
  192. package/dist/index.es185.js.map +1 -0
  193. package/dist/index.es186.js +7 -0
  194. package/dist/index.es186.js.map +1 -0
  195. package/dist/index.es187.js +8 -0
  196. package/dist/index.es187.js.map +1 -0
  197. package/dist/index.es188.js +8 -0
  198. package/dist/index.es188.js.map +1 -0
  199. package/dist/index.es189.js +40 -0
  200. package/dist/index.es189.js.map +1 -0
  201. package/dist/index.es19.js +41 -0
  202. package/dist/index.es19.js.map +1 -0
  203. package/dist/index.es190.js +11 -0
  204. package/dist/index.es190.js.map +1 -0
  205. package/dist/index.es191.js +9 -0
  206. package/dist/index.es191.js.map +1 -0
  207. package/dist/index.es192.js +10 -0
  208. package/dist/index.es192.js.map +1 -0
  209. package/dist/index.es193.js +45 -0
  210. package/dist/index.es193.js.map +1 -0
  211. package/dist/index.es194.js +16 -0
  212. package/dist/index.es194.js.map +1 -0
  213. package/dist/index.es195.js +245 -0
  214. package/dist/index.es195.js.map +1 -0
  215. package/dist/index.es196.js +54 -0
  216. package/dist/index.es196.js.map +1 -0
  217. package/dist/index.es197.js +38 -0
  218. package/dist/index.es197.js.map +1 -0
  219. package/dist/index.es198.js +16 -0
  220. package/dist/index.es198.js.map +1 -0
  221. package/dist/index.es199.js +11 -0
  222. package/dist/index.es199.js.map +1 -0
  223. package/dist/index.es2.js +142 -0
  224. package/dist/index.es2.js.map +1 -0
  225. package/dist/index.es20.js +46 -0
  226. package/dist/index.es20.js.map +1 -0
  227. package/dist/index.es200.js +10 -0
  228. package/dist/index.es200.js.map +1 -0
  229. package/dist/index.es201.js +68 -0
  230. package/dist/index.es201.js.map +1 -0
  231. package/dist/index.es202.js +44 -0
  232. package/dist/index.es202.js.map +1 -0
  233. package/dist/index.es203.js +35 -0
  234. package/dist/index.es203.js.map +1 -0
  235. package/dist/index.es204.js +65 -0
  236. package/dist/index.es204.js.map +1 -0
  237. package/dist/index.es205.js +18 -0
  238. package/dist/index.es205.js.map +1 -0
  239. package/dist/index.es206.js +26 -0
  240. package/dist/index.es206.js.map +1 -0
  241. package/dist/index.es207.js +8 -0
  242. package/dist/index.es207.js.map +1 -0
  243. package/dist/index.es208.js +20 -0
  244. package/dist/index.es208.js.map +1 -0
  245. package/dist/index.es209.js +36 -0
  246. package/dist/index.es209.js.map +1 -0
  247. package/dist/index.es21.js +21 -0
  248. package/dist/index.es21.js.map +1 -0
  249. package/dist/index.es210.js +8 -0
  250. package/dist/index.es210.js.map +1 -0
  251. package/dist/index.es211.js +8 -0
  252. package/dist/index.es211.js.map +1 -0
  253. package/dist/index.es212.js +8 -0
  254. package/dist/index.es212.js.map +1 -0
  255. package/dist/index.es213.js +11 -0
  256. package/dist/index.es213.js.map +1 -0
  257. package/dist/index.es214.js +95 -0
  258. package/dist/index.es214.js.map +1 -0
  259. package/dist/index.es215.js +21 -0
  260. package/dist/index.es215.js.map +1 -0
  261. package/dist/index.es216.js +765 -0
  262. package/dist/index.es216.js.map +1 -0
  263. package/dist/index.es217.js +69 -0
  264. package/dist/index.es217.js.map +1 -0
  265. package/dist/index.es218.js +177 -0
  266. package/dist/index.es218.js.map +1 -0
  267. package/dist/index.es219.js +41 -0
  268. package/dist/index.es219.js.map +1 -0
  269. package/dist/index.es22.js +76 -0
  270. package/dist/index.es22.js.map +1 -0
  271. package/dist/index.es220.js +140 -0
  272. package/dist/index.es220.js.map +1 -0
  273. package/dist/index.es221.js +96 -0
  274. package/dist/index.es221.js.map +1 -0
  275. package/dist/index.es222.js +36 -0
  276. package/dist/index.es222.js.map +1 -0
  277. package/dist/index.es223.js +288 -0
  278. package/dist/index.es223.js.map +1 -0
  279. package/dist/index.es224.js +29 -0
  280. package/dist/index.es224.js.map +1 -0
  281. package/dist/index.es225.js +27 -0
  282. package/dist/index.es225.js.map +1 -0
  283. package/dist/index.es226.js +18 -0
  284. package/dist/index.es226.js.map +1 -0
  285. package/dist/index.es227.js +18 -0
  286. package/dist/index.es227.js.map +1 -0
  287. package/dist/index.es228.js +29 -0
  288. package/dist/index.es228.js.map +1 -0
  289. package/dist/index.es229.js +49 -0
  290. package/dist/index.es229.js.map +1 -0
  291. package/dist/index.es23.js +34 -0
  292. package/dist/index.es23.js.map +1 -0
  293. package/dist/index.es230.js +15 -0
  294. package/dist/index.es230.js.map +1 -0
  295. package/dist/index.es231.js +15 -0
  296. package/dist/index.es231.js.map +1 -0
  297. package/dist/index.es232.js +15 -0
  298. package/dist/index.es232.js.map +1 -0
  299. package/dist/index.es233.js +18 -0
  300. package/dist/index.es233.js.map +1 -0
  301. package/dist/index.es234.js +15 -0
  302. package/dist/index.es234.js.map +1 -0
  303. package/dist/index.es235.js +15 -0
  304. package/dist/index.es235.js.map +1 -0
  305. package/dist/index.es236.js +15 -0
  306. package/dist/index.es236.js.map +1 -0
  307. package/dist/index.es237.js +19 -0
  308. package/dist/index.es237.js.map +1 -0
  309. package/dist/index.es238.js +15 -0
  310. package/dist/index.es238.js.map +1 -0
  311. package/dist/index.es239.js +15 -0
  312. package/dist/index.es239.js.map +1 -0
  313. package/dist/index.es24.js +97 -0
  314. package/dist/index.es24.js.map +1 -0
  315. package/dist/index.es240.js +15 -0
  316. package/dist/index.es240.js.map +1 -0
  317. package/dist/index.es241.js +15 -0
  318. package/dist/index.es241.js.map +1 -0
  319. package/dist/index.es242.js +15 -0
  320. package/dist/index.es242.js.map +1 -0
  321. package/dist/index.es243.js +15 -0
  322. package/dist/index.es243.js.map +1 -0
  323. package/dist/index.es244.js +15 -0
  324. package/dist/index.es244.js.map +1 -0
  325. package/dist/index.es245.js +15 -0
  326. package/dist/index.es245.js.map +1 -0
  327. package/dist/index.es246.js +60 -0
  328. package/dist/index.es246.js.map +1 -0
  329. package/dist/index.es247.js +53 -0
  330. package/dist/index.es247.js.map +1 -0
  331. package/dist/index.es248.js +123 -0
  332. package/dist/index.es248.js.map +1 -0
  333. package/dist/index.es249.js +388 -0
  334. package/dist/index.es249.js.map +1 -0
  335. package/dist/index.es25.js +74 -0
  336. package/dist/index.es25.js.map +1 -0
  337. package/dist/index.es250.js +22 -0
  338. package/dist/index.es250.js.map +1 -0
  339. package/dist/index.es251.js +15 -0
  340. package/dist/index.es251.js.map +1 -0
  341. package/dist/index.es252.js +35 -0
  342. package/dist/index.es252.js.map +1 -0
  343. package/dist/index.es253.js +35 -0
  344. package/dist/index.es253.js.map +1 -0
  345. package/dist/index.es254.js +66 -0
  346. package/dist/index.es254.js.map +1 -0
  347. package/dist/index.es255.js +21 -0
  348. package/dist/index.es255.js.map +1 -0
  349. package/dist/index.es256.js +81 -0
  350. package/dist/index.es256.js.map +1 -0
  351. package/dist/index.es257.js +15 -0
  352. package/dist/index.es257.js.map +1 -0
  353. package/dist/index.es258.js +15 -0
  354. package/dist/index.es258.js.map +1 -0
  355. package/dist/index.es259.js +19 -0
  356. package/dist/index.es259.js.map +1 -0
  357. package/dist/index.es26.js +180 -0
  358. package/dist/index.es26.js.map +1 -0
  359. package/dist/index.es260.js +56 -0
  360. package/dist/index.es260.js.map +1 -0
  361. package/dist/index.es261.js +170 -0
  362. package/dist/index.es261.js.map +1 -0
  363. package/dist/index.es262.js +5 -0
  364. package/dist/index.es262.js.map +1 -0
  365. package/dist/index.es263.js +14 -0
  366. package/dist/index.es263.js.map +1 -0
  367. package/dist/index.es264.js +23 -0
  368. package/dist/index.es264.js.map +1 -0
  369. package/dist/index.es265.js +42 -0
  370. package/dist/index.es265.js.map +1 -0
  371. package/dist/index.es27.js +16 -0
  372. package/dist/index.es27.js.map +1 -0
  373. package/dist/index.es28.js +441 -0
  374. package/dist/index.es28.js.map +1 -0
  375. package/dist/index.es29.js +122 -0
  376. package/dist/index.es29.js.map +1 -0
  377. package/dist/index.es3.js +30 -0
  378. package/dist/index.es3.js.map +1 -0
  379. package/dist/index.es30.js +77 -0
  380. package/dist/index.es30.js.map +1 -0
  381. package/dist/index.es31.js +15 -0
  382. package/dist/index.es31.js.map +1 -0
  383. package/dist/index.es32.js +262 -0
  384. package/dist/index.es32.js.map +1 -0
  385. package/dist/index.es33.js +47 -0
  386. package/dist/index.es33.js.map +1 -0
  387. package/dist/index.es34.js +215 -0
  388. package/dist/index.es34.js.map +1 -0
  389. package/dist/index.es35.js +71 -0
  390. package/dist/index.es35.js.map +1 -0
  391. package/dist/index.es36.js +146 -0
  392. package/dist/index.es36.js.map +1 -0
  393. package/dist/index.es37.js +28 -0
  394. package/dist/index.es37.js.map +1 -0
  395. package/dist/index.es38.js +228 -0
  396. package/dist/index.es38.js.map +1 -0
  397. package/dist/index.es39.js +13 -0
  398. package/dist/index.es39.js.map +1 -0
  399. package/dist/index.es4.js +30 -0
  400. package/dist/index.es4.js.map +1 -0
  401. package/dist/index.es40.js +1203 -0
  402. package/dist/index.es40.js.map +1 -0
  403. package/dist/index.es41.js +12 -0
  404. package/dist/index.es41.js.map +1 -0
  405. package/dist/index.es42.js +151 -0
  406. package/dist/index.es42.js.map +1 -0
  407. package/dist/index.es43.js +18 -0
  408. package/dist/index.es43.js.map +1 -0
  409. package/dist/index.es44.js +11 -0
  410. package/dist/index.es44.js.map +1 -0
  411. package/dist/index.es45.js +97 -0
  412. package/dist/index.es45.js.map +1 -0
  413. package/dist/index.es46.js +7 -0
  414. package/dist/index.es46.js.map +1 -0
  415. package/dist/index.es47.js +39 -0
  416. package/dist/index.es47.js.map +1 -0
  417. package/dist/index.es48.js +75 -0
  418. package/dist/index.es48.js.map +1 -0
  419. package/dist/index.es49.js +41 -0
  420. package/dist/index.es49.js.map +1 -0
  421. package/dist/index.es5.js +26 -0
  422. package/dist/index.es5.js.map +1 -0
  423. package/dist/index.es50.js +309 -0
  424. package/dist/index.es50.js.map +1 -0
  425. package/dist/index.es51.js +12 -0
  426. package/dist/index.es51.js.map +1 -0
  427. package/dist/index.es52.js +88 -0
  428. package/dist/index.es52.js.map +1 -0
  429. package/dist/index.es53.js +11 -0
  430. package/dist/index.es53.js.map +1 -0
  431. package/dist/index.es54.js +18 -0
  432. package/dist/index.es54.js.map +1 -0
  433. package/dist/index.es55.js +144 -0
  434. package/dist/index.es55.js.map +1 -0
  435. package/dist/index.es56.js +303 -0
  436. package/dist/index.es56.js.map +1 -0
  437. package/dist/index.es57.js +69 -0
  438. package/dist/index.es57.js.map +1 -0
  439. package/dist/index.es58.js +216 -0
  440. package/dist/index.es58.js.map +1 -0
  441. package/dist/index.es59.js +37 -0
  442. package/dist/index.es59.js.map +1 -0
  443. package/dist/index.es6.js +122 -0
  444. package/dist/index.es6.js.map +1 -0
  445. package/dist/index.es60.js +12 -0
  446. package/dist/index.es60.js.map +1 -0
  447. package/dist/index.es61.js +15 -0
  448. package/dist/index.es61.js.map +1 -0
  449. package/dist/index.es62.js +190 -0
  450. package/dist/index.es62.js.map +1 -0
  451. package/dist/index.es63.js +19 -0
  452. package/dist/index.es63.js.map +1 -0
  453. package/dist/index.es64.js +1403 -0
  454. package/dist/index.es64.js.map +1 -0
  455. package/dist/index.es65.js +12 -0
  456. package/dist/index.es65.js.map +1 -0
  457. package/dist/index.es66.js +11 -0
  458. package/dist/index.es66.js.map +1 -0
  459. package/dist/index.es67.js +9 -0
  460. package/dist/index.es67.js.map +1 -0
  461. package/dist/index.es68.js +8 -0
  462. package/dist/index.es68.js.map +1 -0
  463. package/dist/index.es69.js +8 -0
  464. package/dist/index.es69.js.map +1 -0
  465. package/dist/index.es7.js +19 -0
  466. package/dist/index.es7.js.map +1 -0
  467. package/dist/index.es70.js +15 -0
  468. package/dist/index.es70.js.map +1 -0
  469. package/dist/index.es71.js +26 -0
  470. package/dist/index.es71.js.map +1 -0
  471. package/dist/index.es72.js +37 -0
  472. package/dist/index.es72.js.map +1 -0
  473. package/dist/index.es73.js +235 -0
  474. package/dist/index.es73.js.map +1 -0
  475. package/dist/index.es74.js +71 -0
  476. package/dist/index.es74.js.map +1 -0
  477. package/dist/index.es75.js +72 -0
  478. package/dist/index.es75.js.map +1 -0
  479. package/dist/index.es76.js +60 -0
  480. package/dist/index.es76.js.map +1 -0
  481. package/dist/index.es77.js +16 -0
  482. package/dist/index.es77.js.map +1 -0
  483. package/dist/index.es78.js +140 -0
  484. package/dist/index.es78.js.map +1 -0
  485. package/dist/index.es79.js +24 -0
  486. package/dist/index.es79.js.map +1 -0
  487. package/dist/index.es8.js +61 -0
  488. package/dist/index.es8.js.map +1 -0
  489. package/dist/index.es80.js +185 -0
  490. package/dist/index.es80.js.map +1 -0
  491. package/dist/index.es81.js +244 -0
  492. package/dist/index.es81.js.map +1 -0
  493. package/dist/index.es82.js +358 -0
  494. package/dist/index.es82.js.map +1 -0
  495. package/dist/index.es83.js +140 -0
  496. package/dist/index.es83.js.map +1 -0
  497. package/dist/index.es84.js +73 -0
  498. package/dist/index.es84.js.map +1 -0
  499. package/dist/index.es85.js +40 -0
  500. package/dist/index.es85.js.map +1 -0
  501. package/dist/index.es86.js +40 -0
  502. package/dist/index.es86.js.map +1 -0
  503. package/dist/index.es87.js +169 -0
  504. package/dist/index.es87.js.map +1 -0
  505. package/dist/index.es88.js +206 -0
  506. package/dist/index.es88.js.map +1 -0
  507. package/dist/index.es89.js +17 -0
  508. package/dist/index.es89.js.map +1 -0
  509. package/dist/index.es9.js +109 -0
  510. package/dist/index.es9.js.map +1 -0
  511. package/dist/index.es90.js +33 -0
  512. package/dist/index.es90.js.map +1 -0
  513. package/dist/index.es91.js +37 -0
  514. package/dist/index.es91.js.map +1 -0
  515. package/dist/index.es92.js +3160 -0
  516. package/dist/index.es92.js.map +1 -0
  517. package/dist/index.es93.js +84 -0
  518. package/dist/index.es93.js.map +1 -0
  519. package/dist/index.es94.js +5 -0
  520. package/dist/index.es94.js.map +1 -0
  521. package/dist/index.es95.js +13 -0
  522. package/dist/index.es95.js.map +1 -0
  523. package/dist/index.es96.js +278 -0
  524. package/dist/index.es96.js.map +1 -0
  525. package/dist/index.es97.js +5 -0
  526. package/dist/index.es97.js.map +1 -0
  527. package/dist/index.es98.js +167 -0
  528. package/dist/index.es98.js.map +1 -0
  529. package/dist/index.es99.js +54 -0
  530. package/dist/index.es99.js.map +1 -0
  531. package/dist/styles.css +1 -1
  532. package/package.json +12 -10
@@ -0,0 +1,144 @@
1
+ import { __export } from "./index.es44.js";
2
+ import { mapKeys, keyToJson } from "./index.es70.js";
3
+ import { escapeIfNeeded } from "./index.es71.js";
4
+ var serializable_exports = {};
5
+ __export(serializable_exports, {
6
+ Serializable: () => Serializable,
7
+ get_lc_unique_name: () => get_lc_unique_name
8
+ });
9
+ function shallowCopy(obj) {
10
+ return Array.isArray(obj) ? [...obj] : { ...obj };
11
+ }
12
+ function replaceSecrets(root, secretsMap) {
13
+ const result = shallowCopy(root);
14
+ for (const [path, secretId] of Object.entries(secretsMap)) {
15
+ const [last, ...partsReverse] = path.split(".").reverse();
16
+ let current = result;
17
+ for (const part of partsReverse.reverse()) {
18
+ if (current[part] === void 0) break;
19
+ current[part] = shallowCopy(current[part]);
20
+ current = current[part];
21
+ }
22
+ if (current[last] !== void 0) current[last] = {
23
+ lc: 1,
24
+ type: "secret",
25
+ id: [secretId]
26
+ };
27
+ }
28
+ return result;
29
+ }
30
+ function get_lc_unique_name(serializableClass) {
31
+ const parentClass = Object.getPrototypeOf(serializableClass);
32
+ const lcNameIsSubclassed = typeof serializableClass.lc_name === "function" && (typeof parentClass.lc_name !== "function" || serializableClass.lc_name() !== parentClass.lc_name());
33
+ if (lcNameIsSubclassed) return serializableClass.lc_name();
34
+ else return serializableClass.name;
35
+ }
36
+ var Serializable = class Serializable2 {
37
+ lc_serializable = false;
38
+ lc_kwargs;
39
+ /**
40
+ * The name of the serializable. Override to provide an alias or
41
+ * to preserve the serialized module name in minified environments.
42
+ *
43
+ * Implemented as a static method to support loading logic.
44
+ */
45
+ static lc_name() {
46
+ return this.name;
47
+ }
48
+ /**
49
+ * The final serialized identifier for the module.
50
+ */
51
+ get lc_id() {
52
+ return [...this.lc_namespace, get_lc_unique_name(this.constructor)];
53
+ }
54
+ /**
55
+ * A map of secrets, which will be omitted from serialization.
56
+ * Keys are paths to the secret in constructor args, e.g. "foo.bar.baz".
57
+ * Values are the secret ids, which will be used when deserializing.
58
+ */
59
+ get lc_secrets() {
60
+ return void 0;
61
+ }
62
+ /**
63
+ * A map of additional attributes to merge with constructor args.
64
+ * Keys are the attribute names, e.g. "foo".
65
+ * Values are the attribute values, which will be serialized.
66
+ * These attributes need to be accepted by the constructor as arguments.
67
+ */
68
+ get lc_attributes() {
69
+ return void 0;
70
+ }
71
+ /**
72
+ * A map of aliases for constructor args.
73
+ * Keys are the attribute names, e.g. "foo".
74
+ * Values are the alias that will replace the key in serialization.
75
+ * This is used to eg. make argument names match Python.
76
+ */
77
+ get lc_aliases() {
78
+ return void 0;
79
+ }
80
+ /**
81
+ * A manual list of keys that should be serialized.
82
+ * If not overridden, all fields passed into the constructor will be serialized.
83
+ */
84
+ get lc_serializable_keys() {
85
+ return void 0;
86
+ }
87
+ constructor(kwargs, ..._args) {
88
+ if (this.lc_serializable_keys !== void 0) this.lc_kwargs = Object.fromEntries(Object.entries(kwargs || {}).filter(([key]) => this.lc_serializable_keys?.includes(key)));
89
+ else this.lc_kwargs = kwargs ?? {};
90
+ }
91
+ toJSON() {
92
+ if (!this.lc_serializable) return this.toJSONNotImplemented();
93
+ if (this.lc_kwargs instanceof Serializable2 || typeof this.lc_kwargs !== "object" || Array.isArray(this.lc_kwargs)) return this.toJSONNotImplemented();
94
+ const aliases = {};
95
+ const secrets = {};
96
+ const kwargs = Object.keys(this.lc_kwargs).reduce((acc, key) => {
97
+ acc[key] = key in this ? this[key] : this.lc_kwargs[key];
98
+ return acc;
99
+ }, {});
100
+ for (let current = Object.getPrototypeOf(this); current; current = Object.getPrototypeOf(current)) {
101
+ Object.assign(aliases, Reflect.get(current, "lc_aliases", this));
102
+ Object.assign(secrets, Reflect.get(current, "lc_secrets", this));
103
+ Object.assign(kwargs, Reflect.get(current, "lc_attributes", this));
104
+ }
105
+ Object.keys(secrets).forEach((keyPath) => {
106
+ let read = this;
107
+ let write = kwargs;
108
+ const [last, ...partsReverse] = keyPath.split(".").reverse();
109
+ for (const key of partsReverse.reverse()) {
110
+ if (!(key in read) || read[key] === void 0) return;
111
+ if (!(key in write) || write[key] === void 0) {
112
+ if (typeof read[key] === "object" && read[key] != null) write[key] = {};
113
+ else if (Array.isArray(read[key])) write[key] = [];
114
+ }
115
+ read = read[key];
116
+ write = write[key];
117
+ }
118
+ if (last in read && read[last] !== void 0) write[last] = write[last] || read[last];
119
+ });
120
+ const escapedKwargs = {};
121
+ for (const [key, value] of Object.entries(kwargs)) escapedKwargs[key] = escapeIfNeeded(value);
122
+ const kwargsWithSecrets = Object.keys(secrets).length ? replaceSecrets(escapedKwargs, secrets) : escapedKwargs;
123
+ const processedKwargs = mapKeys(kwargsWithSecrets, keyToJson, aliases);
124
+ return {
125
+ lc: 1,
126
+ type: "constructor",
127
+ id: this.lc_id,
128
+ kwargs: processedKwargs
129
+ };
130
+ }
131
+ toJSONNotImplemented() {
132
+ return {
133
+ lc: 1,
134
+ type: "not_implemented",
135
+ id: this.lc_id
136
+ };
137
+ }
138
+ };
139
+ export {
140
+ Serializable,
141
+ get_lc_unique_name,
142
+ serializable_exports
143
+ };
144
+ //# sourceMappingURL=index.es55.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es55.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/load/serializable.js"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.js\";\nimport { keyToJson, mapKeys } from \"./map_keys.js\";\nimport { escapeIfNeeded } from \"./validation.js\";\n\n//#region src/load/serializable.ts\nvar serializable_exports = {};\n__export(serializable_exports, {\n\tSerializable: () => Serializable,\n\tget_lc_unique_name: () => get_lc_unique_name\n});\nfunction shallowCopy(obj) {\n\treturn Array.isArray(obj) ? [...obj] : { ...obj };\n}\nfunction replaceSecrets(root, secretsMap) {\n\tconst result = shallowCopy(root);\n\tfor (const [path, secretId] of Object.entries(secretsMap)) {\n\t\tconst [last, ...partsReverse] = path.split(\".\").reverse();\n\t\tlet current = result;\n\t\tfor (const part of partsReverse.reverse()) {\n\t\t\tif (current[part] === void 0) break;\n\t\t\tcurrent[part] = shallowCopy(current[part]);\n\t\t\tcurrent = current[part];\n\t\t}\n\t\tif (current[last] !== void 0) current[last] = {\n\t\t\tlc: 1,\n\t\t\ttype: \"secret\",\n\t\t\tid: [secretId]\n\t\t};\n\t}\n\treturn result;\n}\n/**\n* Get a unique name for the module, rather than parent class implementations.\n* Should not be subclassed, subclass lc_name above instead.\n*/\nfunction get_lc_unique_name(serializableClass) {\n\tconst parentClass = Object.getPrototypeOf(serializableClass);\n\tconst lcNameIsSubclassed = typeof serializableClass.lc_name === \"function\" && (typeof parentClass.lc_name !== \"function\" || serializableClass.lc_name() !== parentClass.lc_name());\n\tif (lcNameIsSubclassed) return serializableClass.lc_name();\n\telse return serializableClass.name;\n}\nvar Serializable = class Serializable {\n\tlc_serializable = false;\n\tlc_kwargs;\n\t/**\n\t* The name of the serializable. Override to provide an alias or\n\t* to preserve the serialized module name in minified environments.\n\t*\n\t* Implemented as a static method to support loading logic.\n\t*/\n\tstatic lc_name() {\n\t\treturn this.name;\n\t}\n\t/**\n\t* The final serialized identifier for the module.\n\t*/\n\tget lc_id() {\n\t\treturn [...this.lc_namespace, get_lc_unique_name(this.constructor)];\n\t}\n\t/**\n\t* A map of secrets, which will be omitted from serialization.\n\t* Keys are paths to the secret in constructor args, e.g. \"foo.bar.baz\".\n\t* Values are the secret ids, which will be used when deserializing.\n\t*/\n\tget lc_secrets() {\n\t\treturn void 0;\n\t}\n\t/**\n\t* A map of additional attributes to merge with constructor args.\n\t* Keys are the attribute names, e.g. \"foo\".\n\t* Values are the attribute values, which will be serialized.\n\t* These attributes need to be accepted by the constructor as arguments.\n\t*/\n\tget lc_attributes() {\n\t\treturn void 0;\n\t}\n\t/**\n\t* A map of aliases for constructor args.\n\t* Keys are the attribute names, e.g. \"foo\".\n\t* Values are the alias that will replace the key in serialization.\n\t* This is used to eg. make argument names match Python.\n\t*/\n\tget lc_aliases() {\n\t\treturn void 0;\n\t}\n\t/**\n\t* A manual list of keys that should be serialized.\n\t* If not overridden, all fields passed into the constructor will be serialized.\n\t*/\n\tget lc_serializable_keys() {\n\t\treturn void 0;\n\t}\n\tconstructor(kwargs, ..._args) {\n\t\tif (this.lc_serializable_keys !== void 0) this.lc_kwargs = Object.fromEntries(Object.entries(kwargs || {}).filter(([key]) => this.lc_serializable_keys?.includes(key)));\n\t\telse this.lc_kwargs = kwargs ?? {};\n\t}\n\ttoJSON() {\n\t\tif (!this.lc_serializable) return this.toJSONNotImplemented();\n\t\tif (this.lc_kwargs instanceof Serializable || typeof this.lc_kwargs !== \"object\" || Array.isArray(this.lc_kwargs)) return this.toJSONNotImplemented();\n\t\tconst aliases = {};\n\t\tconst secrets = {};\n\t\tconst kwargs = Object.keys(this.lc_kwargs).reduce((acc, key) => {\n\t\t\tacc[key] = key in this ? this[key] : this.lc_kwargs[key];\n\t\t\treturn acc;\n\t\t}, {});\n\t\tfor (let current = Object.getPrototypeOf(this); current; current = Object.getPrototypeOf(current)) {\n\t\t\tObject.assign(aliases, Reflect.get(current, \"lc_aliases\", this));\n\t\t\tObject.assign(secrets, Reflect.get(current, \"lc_secrets\", this));\n\t\t\tObject.assign(kwargs, Reflect.get(current, \"lc_attributes\", this));\n\t\t}\n\t\tObject.keys(secrets).forEach((keyPath) => {\n\t\t\tlet read = this;\n\t\t\tlet write = kwargs;\n\t\t\tconst [last, ...partsReverse] = keyPath.split(\".\").reverse();\n\t\t\tfor (const key of partsReverse.reverse()) {\n\t\t\t\tif (!(key in read) || read[key] === void 0) return;\n\t\t\t\tif (!(key in write) || write[key] === void 0) {\n\t\t\t\t\tif (typeof read[key] === \"object\" && read[key] != null) write[key] = {};\n\t\t\t\t\telse if (Array.isArray(read[key])) write[key] = [];\n\t\t\t\t}\n\t\t\t\tread = read[key];\n\t\t\t\twrite = write[key];\n\t\t\t}\n\t\t\tif (last in read && read[last] !== void 0) write[last] = write[last] || read[last];\n\t\t});\n\t\tconst escapedKwargs = {};\n\t\tfor (const [key, value] of Object.entries(kwargs)) escapedKwargs[key] = escapeIfNeeded(value);\n\t\tconst kwargsWithSecrets = Object.keys(secrets).length ? replaceSecrets(escapedKwargs, secrets) : escapedKwargs;\n\t\tconst processedKwargs = mapKeys(kwargsWithSecrets, keyToJson, aliases);\n\t\treturn {\n\t\t\tlc: 1,\n\t\t\ttype: \"constructor\",\n\t\t\tid: this.lc_id,\n\t\t\tkwargs: processedKwargs\n\t\t};\n\t}\n\ttoJSONNotImplemented() {\n\t\treturn {\n\t\t\tlc: 1,\n\t\t\ttype: \"not_implemented\",\n\t\t\tid: this.lc_id\n\t\t};\n\t}\n};\n\n//#endregion\nexport { Serializable, get_lc_unique_name, serializable_exports };\n//# sourceMappingURL=serializable.js.map"],"names":["Serializable"],"mappings":";;;AAKG,IAAC,uBAAuB,CAAA;AAC3B,SAAS,sBAAsB;AAAA,EAC9B,cAAc,MAAM;AAAA,EACpB,oBAAoB,MAAM;AAC3B,CAAC;AACD,SAAS,YAAY,KAAK;AACzB,SAAO,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,EAAE,GAAG,IAAG;AAChD;AACA,SAAS,eAAe,MAAM,YAAY;AACzC,QAAM,SAAS,YAAY,IAAI;AAC/B,aAAW,CAAC,MAAM,QAAQ,KAAK,OAAO,QAAQ,UAAU,GAAG;AAC1D,UAAM,CAAC,MAAM,GAAG,YAAY,IAAI,KAAK,MAAM,GAAG,EAAE,QAAO;AACvD,QAAI,UAAU;AACd,eAAW,QAAQ,aAAa,WAAW;AAC1C,UAAI,QAAQ,IAAI,MAAM,OAAQ;AAC9B,cAAQ,IAAI,IAAI,YAAY,QAAQ,IAAI,CAAC;AACzC,gBAAU,QAAQ,IAAI;AAAA,IACvB;AACA,QAAI,QAAQ,IAAI,MAAM,OAAQ,SAAQ,IAAI,IAAI;AAAA,MAC7C,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI,CAAC,QAAQ;AAAA,IAChB;AAAA,EACC;AACA,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,CAAA;AACtB,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,MAAM,EAAG,eAAc,GAAG,IAAI,eAAe,KAAK;AAC5F,UAAM,oBAAoB,OAAO,KAAK,OAAO,EAAE,SAAS,eAAe,eAAe,OAAO,IAAI;AACjG,UAAM,kBAAkB,QAAQ,mBAAmB,WAAW,OAAO;AACrE,WAAO;AAAA,MACN,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,MACT,QAAQ;AAAA,IACX;AAAA,EACC;AAAA,EACA,uBAAuB;AACtB,WAAO;AAAA,MACN,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IACZ;AAAA,EACC;AACD;","x_google_ignoreList":[0]}
@@ -0,0 +1,303 @@
1
+ import { _isContentBlock, _isObject, _isString, _isArray, iife, safeParseJson, _isNumber } from "./index.es72.js";
2
+ function convertAnthropicAnnotation(citation) {
3
+ if (citation.type === "char_location" && _isString(citation.document_title) && _isNumber(citation.start_char_index) && _isNumber(citation.end_char_index) && _isString(citation.cited_text)) {
4
+ const { document_title, start_char_index, end_char_index, cited_text, ...rest } = citation;
5
+ return {
6
+ ...rest,
7
+ type: "citation",
8
+ source: "char",
9
+ title: document_title ?? void 0,
10
+ startIndex: start_char_index,
11
+ endIndex: end_char_index,
12
+ citedText: cited_text
13
+ };
14
+ }
15
+ if (citation.type === "page_location" && _isString(citation.document_title) && _isNumber(citation.start_page_number) && _isNumber(citation.end_page_number) && _isString(citation.cited_text)) {
16
+ const { document_title, start_page_number, end_page_number, cited_text, ...rest } = citation;
17
+ return {
18
+ ...rest,
19
+ type: "citation",
20
+ source: "page",
21
+ title: document_title ?? void 0,
22
+ startIndex: start_page_number,
23
+ endIndex: end_page_number,
24
+ citedText: cited_text
25
+ };
26
+ }
27
+ if (citation.type === "content_block_location" && _isString(citation.document_title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {
28
+ const { document_title, start_block_index, end_block_index, cited_text, ...rest } = citation;
29
+ return {
30
+ ...rest,
31
+ type: "citation",
32
+ source: "block",
33
+ title: document_title ?? void 0,
34
+ startIndex: start_block_index,
35
+ endIndex: end_block_index,
36
+ citedText: cited_text
37
+ };
38
+ }
39
+ if (citation.type === "web_search_result_location" && _isString(citation.url) && _isString(citation.title) && _isString(citation.encrypted_index) && _isString(citation.cited_text)) {
40
+ const { url, title, encrypted_index, cited_text, ...rest } = citation;
41
+ return {
42
+ ...rest,
43
+ type: "citation",
44
+ source: "url",
45
+ url,
46
+ title,
47
+ startIndex: Number(encrypted_index),
48
+ endIndex: Number(encrypted_index),
49
+ citedText: cited_text
50
+ };
51
+ }
52
+ if (citation.type === "search_result_location" && _isString(citation.source) && _isString(citation.title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {
53
+ const { source, title, start_block_index, end_block_index, cited_text, ...rest } = citation;
54
+ return {
55
+ ...rest,
56
+ type: "citation",
57
+ source: "search",
58
+ url: source,
59
+ title: title ?? void 0,
60
+ startIndex: start_block_index,
61
+ endIndex: end_block_index,
62
+ citedText: cited_text
63
+ };
64
+ }
65
+ return void 0;
66
+ }
67
+ function convertToV1FromAnthropicContentBlock(block) {
68
+ if (_isContentBlock(block, "document") && _isObject(block.source) && "type" in block.source) {
69
+ if (block.source.type === "base64" && _isString(block.source.media_type) && _isString(block.source.data)) return {
70
+ type: "file",
71
+ mimeType: block.source.media_type,
72
+ data: block.source.data
73
+ };
74
+ else if (block.source.type === "url" && _isString(block.source.url)) return {
75
+ type: "file",
76
+ url: block.source.url
77
+ };
78
+ else if (block.source.type === "file" && _isString(block.source.file_id)) return {
79
+ type: "file",
80
+ fileId: block.source.file_id
81
+ };
82
+ else if (block.source.type === "text" && _isString(block.source.data)) return {
83
+ type: "file",
84
+ mimeType: String(block.source.media_type ?? "text/plain"),
85
+ data: block.source.data
86
+ };
87
+ } else if (_isContentBlock(block, "image") && _isObject(block.source) && "type" in block.source) {
88
+ if (block.source.type === "base64" && _isString(block.source.media_type) && _isString(block.source.data)) return {
89
+ type: "image",
90
+ mimeType: block.source.media_type,
91
+ data: block.source.data
92
+ };
93
+ else if (block.source.type === "url" && _isString(block.source.url)) return {
94
+ type: "image",
95
+ url: block.source.url
96
+ };
97
+ else if (block.source.type === "file" && _isString(block.source.file_id)) return {
98
+ type: "image",
99
+ fileId: block.source.file_id
100
+ };
101
+ }
102
+ return void 0;
103
+ }
104
+ function convertToV1FromAnthropicInput(content) {
105
+ function* iterateContent() {
106
+ for (const block of content) {
107
+ const stdBlock = convertToV1FromAnthropicContentBlock(block);
108
+ if (stdBlock) yield stdBlock;
109
+ else yield block;
110
+ }
111
+ }
112
+ return Array.from(iterateContent());
113
+ }
114
+ function convertToV1FromAnthropicMessage(message) {
115
+ function* iterateContent() {
116
+ const content = typeof message.content === "string" ? [{
117
+ type: "text",
118
+ text: message.content
119
+ }] : message.content;
120
+ for (const block of content) {
121
+ if (_isContentBlock(block, "text") && _isString(block.text)) {
122
+ const { text, citations, ...rest } = block;
123
+ if (_isArray(citations) && citations.length) {
124
+ const _citations = citations.reduce((acc, item) => {
125
+ const citation = convertAnthropicAnnotation(item);
126
+ if (citation) return [...acc, citation];
127
+ return acc;
128
+ }, []);
129
+ yield {
130
+ ...rest,
131
+ type: "text",
132
+ text,
133
+ annotations: _citations
134
+ };
135
+ continue;
136
+ } else {
137
+ yield {
138
+ ...rest,
139
+ type: "text",
140
+ text
141
+ };
142
+ continue;
143
+ }
144
+ } else if (_isContentBlock(block, "thinking") && _isString(block.thinking)) {
145
+ const { thinking, signature, ...rest } = block;
146
+ yield {
147
+ ...rest,
148
+ type: "reasoning",
149
+ reasoning: thinking,
150
+ signature
151
+ };
152
+ continue;
153
+ } else if (_isContentBlock(block, "redacted_thinking")) {
154
+ yield {
155
+ type: "non_standard",
156
+ value: block
157
+ };
158
+ continue;
159
+ } else if (_isContentBlock(block, "tool_use") && _isString(block.name) && _isString(block.id)) {
160
+ yield {
161
+ type: "tool_call",
162
+ id: block.id,
163
+ name: block.name,
164
+ args: block.input
165
+ };
166
+ continue;
167
+ } else if (_isContentBlock(block, "input_json_delta")) {
168
+ if (_isAIMessageChunk(message) && message.tool_call_chunks?.length) {
169
+ const tool_call_chunk = message.tool_call_chunks[0];
170
+ yield {
171
+ type: "tool_call_chunk",
172
+ id: tool_call_chunk.id,
173
+ name: tool_call_chunk.name,
174
+ args: tool_call_chunk.args,
175
+ index: tool_call_chunk.index
176
+ };
177
+ continue;
178
+ }
179
+ } else if (_isContentBlock(block, "server_tool_use") && _isString(block.name) && _isString(block.id)) {
180
+ const { name, id } = block;
181
+ if (name === "web_search") {
182
+ const query = iife(() => {
183
+ if (typeof block.input === "string") return block.input;
184
+ else if (_isObject(block.input) && _isString(block.input.query)) return block.input.query;
185
+ else if (_isString(block.partial_json)) {
186
+ const json = safeParseJson(block.partial_json);
187
+ if (json?.query) return json.query;
188
+ }
189
+ return "";
190
+ });
191
+ yield {
192
+ id,
193
+ type: "server_tool_call",
194
+ name: "web_search",
195
+ args: { query }
196
+ };
197
+ continue;
198
+ } else if (block.name === "code_execution") {
199
+ const code = iife(() => {
200
+ if (typeof block.input === "string") return block.input;
201
+ else if (_isObject(block.input) && _isString(block.input.code)) return block.input.code;
202
+ else if (_isString(block.partial_json)) {
203
+ const json = safeParseJson(block.partial_json);
204
+ if (json?.code) return json.code;
205
+ }
206
+ return "";
207
+ });
208
+ yield {
209
+ id,
210
+ type: "server_tool_call",
211
+ name: "code_execution",
212
+ args: { code }
213
+ };
214
+ continue;
215
+ }
216
+ } else if (_isContentBlock(block, "web_search_tool_result") && _isString(block.tool_use_id) && _isArray(block.content)) {
217
+ const { content: content$1, tool_use_id } = block;
218
+ const urls = content$1.reduce((acc, content$2) => {
219
+ if (_isContentBlock(content$2, "web_search_result")) return [...acc, content$2.url];
220
+ return acc;
221
+ }, []);
222
+ yield {
223
+ type: "server_tool_call_result",
224
+ name: "web_search",
225
+ toolCallId: tool_use_id,
226
+ status: "success",
227
+ output: { urls }
228
+ };
229
+ continue;
230
+ } else if (_isContentBlock(block, "code_execution_tool_result") && _isString(block.tool_use_id) && _isObject(block.content)) {
231
+ yield {
232
+ type: "server_tool_call_result",
233
+ name: "code_execution",
234
+ toolCallId: block.tool_use_id,
235
+ status: "success",
236
+ output: block.content
237
+ };
238
+ continue;
239
+ } else if (_isContentBlock(block, "mcp_tool_use")) {
240
+ yield {
241
+ id: block.id,
242
+ type: "server_tool_call",
243
+ name: "mcp_tool_use",
244
+ args: block.input
245
+ };
246
+ continue;
247
+ } else if (_isContentBlock(block, "mcp_tool_result") && _isString(block.tool_use_id) && _isObject(block.content)) {
248
+ yield {
249
+ type: "server_tool_call_result",
250
+ name: "mcp_tool_use",
251
+ toolCallId: block.tool_use_id,
252
+ status: "success",
253
+ output: block.content
254
+ };
255
+ continue;
256
+ } else if (_isContentBlock(block, "container_upload")) {
257
+ yield {
258
+ type: "server_tool_call",
259
+ name: "container_upload",
260
+ args: block.input
261
+ };
262
+ continue;
263
+ } else if (_isContentBlock(block, "search_result")) {
264
+ yield {
265
+ id: block.id,
266
+ type: "non_standard",
267
+ value: block
268
+ };
269
+ continue;
270
+ } else if (_isContentBlock(block, "tool_result")) {
271
+ yield {
272
+ id: block.id,
273
+ type: "non_standard",
274
+ value: block
275
+ };
276
+ continue;
277
+ } else {
278
+ const stdBlock = convertToV1FromAnthropicContentBlock(block);
279
+ if (stdBlock) {
280
+ yield stdBlock;
281
+ continue;
282
+ }
283
+ }
284
+ yield {
285
+ type: "non_standard",
286
+ value: block
287
+ };
288
+ }
289
+ }
290
+ return Array.from(iterateContent());
291
+ }
292
+ const ChatAnthropicTranslator = {
293
+ translateContent: convertToV1FromAnthropicMessage,
294
+ translateContentChunk: convertToV1FromAnthropicMessage
295
+ };
296
+ function _isAIMessageChunk(message) {
297
+ return typeof message?._getType === "function" && typeof message.concat === "function" && message._getType() === "ai";
298
+ }
299
+ export {
300
+ ChatAnthropicTranslator,
301
+ convertToV1FromAnthropicInput
302
+ };
303
+ //# sourceMappingURL=index.es56.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es56.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/anthropic.js"],"sourcesContent":["import { _isArray, _isContentBlock, _isNumber, _isObject, _isString, iife, safeParseJson } from \"./utils.js\";\n\n//#region src/messages/block_translators/anthropic.ts\nfunction convertAnthropicAnnotation(citation) {\n\tif (citation.type === \"char_location\" && _isString(citation.document_title) && _isNumber(citation.start_char_index) && _isNumber(citation.end_char_index) && _isString(citation.cited_text)) {\n\t\tconst { document_title, start_char_index, end_char_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"char\",\n\t\t\ttitle: document_title ?? void 0,\n\t\t\tstartIndex: start_char_index,\n\t\t\tendIndex: end_char_index,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"page_location\" && _isString(citation.document_title) && _isNumber(citation.start_page_number) && _isNumber(citation.end_page_number) && _isString(citation.cited_text)) {\n\t\tconst { document_title, start_page_number, end_page_number, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"page\",\n\t\t\ttitle: document_title ?? void 0,\n\t\t\tstartIndex: start_page_number,\n\t\t\tendIndex: end_page_number,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"content_block_location\" && _isString(citation.document_title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {\n\t\tconst { document_title, start_block_index, end_block_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"block\",\n\t\t\ttitle: document_title ?? void 0,\n\t\t\tstartIndex: start_block_index,\n\t\t\tendIndex: end_block_index,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"web_search_result_location\" && _isString(citation.url) && _isString(citation.title) && _isString(citation.encrypted_index) && _isString(citation.cited_text)) {\n\t\tconst { url, title, encrypted_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"url\",\n\t\t\turl,\n\t\t\ttitle,\n\t\t\tstartIndex: Number(encrypted_index),\n\t\t\tendIndex: Number(encrypted_index),\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\tif (citation.type === \"search_result_location\" && _isString(citation.source) && _isString(citation.title) && _isNumber(citation.start_block_index) && _isNumber(citation.end_block_index) && _isString(citation.cited_text)) {\n\t\tconst { source, title, start_block_index, end_block_index, cited_text,...rest } = citation;\n\t\treturn {\n\t\t\t...rest,\n\t\t\ttype: \"citation\",\n\t\t\tsource: \"search\",\n\t\t\turl: source,\n\t\t\ttitle: title ?? void 0,\n\t\t\tstartIndex: start_block_index,\n\t\t\tendIndex: end_block_index,\n\t\t\tcitedText: cited_text\n\t\t};\n\t}\n\treturn void 0;\n}\n/**\n* Converts an Anthropic content block to a standard V1 content block.\n*\n* This function handles the conversion of Anthropic-specific content blocks\n* (document and image blocks) to the standardized V1 format. It supports\n* various source types including base64 data, URLs, file IDs, and text data.\n*\n* @param block - The Anthropic content block to convert\n* @returns A standard V1 content block if conversion is successful, undefined otherwise\n*\n* @example\n* ```typescript\n* const anthropicBlock = {\n* type: \"image\",\n* source: {\n* type: \"base64\",\n* media_type: \"image/png\",\n* data: \"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==\"\n* }\n* };\n*\n* const standardBlock = convertToV1FromAnthropicContentBlock(anthropicBlock);\n* // Returns: { type: \"image\", mimeType: \"image/png\", data: \"...\" }\n* ```\n*/\nfunction convertToV1FromAnthropicContentBlock(block) {\n\tif (_isContentBlock(block, \"document\") && _isObject(block.source) && \"type\" in block.source) {\n\t\tif (block.source.type === \"base64\" && _isString(block.source.media_type) && _isString(block.source.data)) return {\n\t\t\ttype: \"file\",\n\t\t\tmimeType: block.source.media_type,\n\t\t\tdata: block.source.data\n\t\t};\n\t\telse if (block.source.type === \"url\" && _isString(block.source.url)) return {\n\t\t\ttype: \"file\",\n\t\t\turl: block.source.url\n\t\t};\n\t\telse if (block.source.type === \"file\" && _isString(block.source.file_id)) return {\n\t\t\ttype: \"file\",\n\t\t\tfileId: block.source.file_id\n\t\t};\n\t\telse if (block.source.type === \"text\" && _isString(block.source.data)) return {\n\t\t\ttype: \"file\",\n\t\t\tmimeType: String(block.source.media_type ?? \"text/plain\"),\n\t\t\tdata: block.source.data\n\t\t};\n\t} else if (_isContentBlock(block, \"image\") && _isObject(block.source) && \"type\" in block.source) {\n\t\tif (block.source.type === \"base64\" && _isString(block.source.media_type) && _isString(block.source.data)) return {\n\t\t\ttype: \"image\",\n\t\t\tmimeType: block.source.media_type,\n\t\t\tdata: block.source.data\n\t\t};\n\t\telse if (block.source.type === \"url\" && _isString(block.source.url)) return {\n\t\t\ttype: \"image\",\n\t\t\turl: block.source.url\n\t\t};\n\t\telse if (block.source.type === \"file\" && _isString(block.source.file_id)) return {\n\t\t\ttype: \"image\",\n\t\t\tfileId: block.source.file_id\n\t\t};\n\t}\n\treturn void 0;\n}\n/**\n* Converts an array of content blocks from Anthropic format to v1 standard format.\n*\n* This function processes each content block in the input array, attempting to convert\n* Anthropic-specific block formats (like image blocks with source objects, document blocks, etc.)\n* to the standardized v1 content block format. If a block cannot be converted, it is\n* passed through as-is with a type assertion to ContentBlock.Standard.\n*\n* @param content - Array of content blocks in Anthropic format to be converted\n* @returns Array of content blocks in v1 standard format\n*/\nfunction convertToV1FromAnthropicInput(content) {\n\tfunction* iterateContent() {\n\t\tfor (const block of content) {\n\t\t\tconst stdBlock = convertToV1FromAnthropicContentBlock(block);\n\t\t\tif (stdBlock) yield stdBlock;\n\t\t\telse yield block;\n\t\t}\n\t}\n\treturn Array.from(iterateContent());\n}\n/**\n* Converts an Anthropic AI message to an array of v1 standard content blocks.\n*\n* This function processes an AI message containing Anthropic-specific content blocks\n* and converts them to the standardized v1 content block format.\n*\n* @param message - The AI message containing Anthropic-formatted content blocks\n* @returns Array of content blocks in v1 standard format\n*\n* @example\n* ```typescript\n* const message = new AIMessage([\n* { type: \"text\", text: \"Hello world\" },\n* { type: \"thinking\", text: \"Let me think about this...\" },\n* { type: \"tool_use\", id: \"123\", name: \"calculator\", input: { a: 1, b: 2 } }\n* ]);\n*\n* const standardBlocks = convertToV1FromAnthropicMessage(message);\n* // Returns:\n* // [\n* // { type: \"text\", text: \"Hello world\" },\n* // { type: \"reasoning\", reasoning: \"Let me think about this...\" },\n* // { type: \"tool_call\", id: \"123\", name: \"calculator\", args: { a: 1, b: 2 } }\n* // ]\n* ```\n*/\nfunction convertToV1FromAnthropicMessage(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\tconst { text, citations,...rest } = block;\n\t\t\t\tif (_isArray(citations) && citations.length) {\n\t\t\t\t\tconst _citations = citations.reduce((acc, item) => {\n\t\t\t\t\t\tconst citation = convertAnthropicAnnotation(item);\n\t\t\t\t\t\tif (citation) return [...acc, citation];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, []);\n\t\t\t\t\tyield {\n\t\t\t\t\t\t...rest,\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext,\n\t\t\t\t\t\tannotations: _citations\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tyield {\n\t\t\t\t\t\t...rest,\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (_isContentBlock(block, \"thinking\") && _isString(block.thinking)) {\n\t\t\t\tconst { thinking, signature,...rest } = block;\n\t\t\t\tyield {\n\t\t\t\t\t...rest,\n\t\t\t\t\ttype: \"reasoning\",\n\t\t\t\t\treasoning: thinking,\n\t\t\t\t\tsignature\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"redacted_thinking\")) {\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_use\") && _isString(block.name) && _isString(block.id)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"tool_call\",\n\t\t\t\t\tid: block.id,\n\t\t\t\t\tname: block.name,\n\t\t\t\t\targs: block.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"input_json_delta\")) {\n\t\t\t\tif (_isAIMessageChunk(message) && message.tool_call_chunks?.length) {\n\t\t\t\t\tconst tool_call_chunk = message.tool_call_chunks[0];\n\t\t\t\t\tyield {\n\t\t\t\t\t\ttype: \"tool_call_chunk\",\n\t\t\t\t\t\tid: tool_call_chunk.id,\n\t\t\t\t\t\tname: tool_call_chunk.name,\n\t\t\t\t\t\targs: tool_call_chunk.args,\n\t\t\t\t\t\tindex: tool_call_chunk.index\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (_isContentBlock(block, \"server_tool_use\") && _isString(block.name) && _isString(block.id)) {\n\t\t\t\tconst { name, id } = block;\n\t\t\t\tif (name === \"web_search\") {\n\t\t\t\t\tconst query = iife(() => {\n\t\t\t\t\t\tif (typeof block.input === \"string\") return block.input;\n\t\t\t\t\t\telse if (_isObject(block.input) && _isString(block.input.query)) return block.input.query;\n\t\t\t\t\t\telse if (_isString(block.partial_json)) {\n\t\t\t\t\t\t\tconst json = safeParseJson(block.partial_json);\n\t\t\t\t\t\t\tif (json?.query) return json.query;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t});\n\t\t\t\t\tyield {\n\t\t\t\t\t\tid,\n\t\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\t\tname: \"web_search\",\n\t\t\t\t\t\targs: { query }\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (block.name === \"code_execution\") {\n\t\t\t\t\tconst code = iife(() => {\n\t\t\t\t\t\tif (typeof block.input === \"string\") return block.input;\n\t\t\t\t\t\telse if (_isObject(block.input) && _isString(block.input.code)) return block.input.code;\n\t\t\t\t\t\telse if (_isString(block.partial_json)) {\n\t\t\t\t\t\t\tconst json = safeParseJson(block.partial_json);\n\t\t\t\t\t\t\tif (json?.code) return json.code;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t});\n\t\t\t\t\tyield {\n\t\t\t\t\t\tid,\n\t\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\t\tname: \"code_execution\",\n\t\t\t\t\t\targs: { code }\n\t\t\t\t\t};\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (_isContentBlock(block, \"web_search_tool_result\") && _isString(block.tool_use_id) && _isArray(block.content)) {\n\t\t\t\tconst { content: content$1, tool_use_id } = block;\n\t\t\t\tconst urls = content$1.reduce((acc, content$2) => {\n\t\t\t\t\tif (_isContentBlock(content$2, \"web_search_result\")) return [...acc, content$2.url];\n\t\t\t\t\treturn acc;\n\t\t\t\t}, []);\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\tname: \"web_search\",\n\t\t\t\t\ttoolCallId: tool_use_id,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\toutput: { urls }\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"code_execution_tool_result\") && _isString(block.tool_use_id) && _isObject(block.content)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\tname: \"code_execution\",\n\t\t\t\t\ttoolCallId: block.tool_use_id,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\toutput: block.content\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"mcp_tool_use\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: block.id,\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"mcp_tool_use\",\n\t\t\t\t\targs: block.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"mcp_tool_result\") && _isString(block.tool_use_id) && _isObject(block.content)) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call_result\",\n\t\t\t\t\tname: \"mcp_tool_use\",\n\t\t\t\t\ttoolCallId: block.tool_use_id,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\toutput: block.content\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"container_upload\")) {\n\t\t\t\tyield {\n\t\t\t\t\ttype: \"server_tool_call\",\n\t\t\t\t\tname: \"container_upload\",\n\t\t\t\t\targs: block.input\n\t\t\t\t};\n\t\t\t\tcontinue;\n\t\t\t} else if (_isContentBlock(block, \"search_result\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: block.id,\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_result\")) {\n\t\t\t\tyield {\n\t\t\t\t\tid: block.id,\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 {\n\t\t\t\tconst stdBlock = convertToV1FromAnthropicContentBlock(block);\n\t\t\t\tif (stdBlock) {\n\t\t\t\t\tyield stdBlock;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\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 ChatAnthropicTranslator = {\n\ttranslateContent: convertToV1FromAnthropicMessage,\n\ttranslateContentChunk: convertToV1FromAnthropicMessage\n};\nfunction _isAIMessageChunk(message) {\n\treturn typeof message?._getType === \"function\" && typeof message.concat === \"function\" && message._getType() === \"ai\";\n}\n\n//#endregion\nexport { ChatAnthropicTranslator, convertToV1FromAnthropicInput };\n//# sourceMappingURL=anthropic.js.map"],"names":[],"mappings":";AAGA,SAAS,2BAA2B,UAAU;AAC7C,MAAI,SAAS,SAAS,mBAAmB,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,gBAAgB,KAAK,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,UAAU,GAAG;AAC5L,UAAM,EAAE,gBAAgB,kBAAkB,gBAAgB,YAAW,GAAG,KAAI,IAAK;AACjF,WAAO;AAAA,MACN,GAAG;AAAA,MACH,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO,kBAAkB;AAAA,MACzB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,WAAW;AAAA,IACd;AAAA,EACC;AACA,MAAI,SAAS,SAAS,mBAAmB,UAAU,SAAS,cAAc,KAAK,UAAU,SAAS,iBAAiB,KAAK,UAAU,SAAS,eAAe,KAAK,UAAU,SAAS,UAAU,GAAG;AAC9L,UAAM,EAAE,gBAAgB,mBAAmB,iBAAiB,YAAW,GAAG,KAAI,IAAK;AACnF,WAAO;AAAA,MACN,GAAG;AAAA,MACH,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,OAAO,kBAAkB;AAAA,MACzB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,WAAW;AAAA,IACd;AAAA,EACC;AACA,MAAI,SAAS,SAAS,4BAA4B,UAAU,SAAS,cA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MAAM;AAAA,UACN,MAAM;AAAA,UACN,YAAY,MAAM;AAAA,UAClB,QAAQ;AAAA,UACR,QAAQ,MAAM;AAAA,QACnB;AACI;AAAA,MACD,WAAW,gBAAgB,OAAO,kBAAkB,GAAG;AACtD,cAAM;AAAA,UACL,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM,MAAM;AAAA,QACjB;AACI;AAAA,MACD,WAAW,gBAAgB,OAAO,eAAe,GAAG;AACnD,cAAM;AAAA,UACL,IAAI,MAAM;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,QACZ;AACI;AAAA,MACD,WAAW,gBAAgB,OAAO,aAAa,GAAG;AACjD,cAAM;AAAA,UACL,IAAI,MAAM;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,QACZ;AACI;AAAA,MACD,OAAO;AACN,cAAM,WAAW,qCAAqC,KAAK;AAC3D,YAAI,UAAU;AACb,gBAAM;AACN;AAAA,QACD;AAAA,MACD;AACA,YAAM;AAAA,QACL,MAAM;AAAA,QACN,OAAO;AAAA,MACX;AAAA,IACE;AAAA,EACD;AACA,SAAO,MAAM,KAAK,gBAAgB;AACnC;AACK,MAAC,0BAA0B;AAAA,EAC/B,kBAAkB;AAAA,EAClB,uBAAuB;AACxB;AACA,SAAS,kBAAkB,SAAS;AACnC,SAAO,OAAO,SAAS,aAAa,cAAc,OAAO,QAAQ,WAAW,cAAc,QAAQ,SAAQ,MAAO;AAClH;","x_google_ignoreList":[0]}
@@ -0,0 +1,69 @@
1
+ import { isURLContentBlock, isBase64ContentBlock, isIDContentBlock, parseBase64DataUrl } from "./index.es45.js";
2
+ import { _isContentBlock, _isObject, _isString } from "./index.es72.js";
3
+ function convertToV1FromDataContentBlock(block) {
4
+ if (isURLContentBlock(block)) return {
5
+ type: block.type,
6
+ mimeType: block.mime_type,
7
+ url: block.url,
8
+ metadata: block.metadata
9
+ };
10
+ if (isBase64ContentBlock(block)) return {
11
+ type: block.type,
12
+ mimeType: block.mime_type ?? "application/octet-stream",
13
+ data: block.data,
14
+ metadata: block.metadata
15
+ };
16
+ if (isIDContentBlock(block)) return {
17
+ type: block.type,
18
+ mimeType: block.mime_type,
19
+ fileId: block.id,
20
+ metadata: block.metadata
21
+ };
22
+ return block;
23
+ }
24
+ function convertToV1FromDataContent(content) {
25
+ return content.map(convertToV1FromDataContentBlock);
26
+ }
27
+ function isOpenAIDataBlock(block) {
28
+ if (_isContentBlock(block, "image_url") && _isObject(block.image_url)) return true;
29
+ if (_isContentBlock(block, "input_audio") && _isObject(block.input_audio)) return true;
30
+ if (_isContentBlock(block, "file") && _isObject(block.file)) return true;
31
+ return false;
32
+ }
33
+ function convertToV1FromOpenAIDataBlock(block) {
34
+ if (_isContentBlock(block, "image_url") && _isObject(block.image_url) && _isString(block.image_url.url)) {
35
+ const parsed = parseBase64DataUrl({ dataUrl: block.image_url.url });
36
+ if (parsed) return {
37
+ type: "image",
38
+ mimeType: parsed.mime_type,
39
+ data: parsed.data
40
+ };
41
+ else return {
42
+ type: "image",
43
+ url: block.image_url.url
44
+ };
45
+ } else if (_isContentBlock(block, "input_audio") && _isObject(block.input_audio) && _isString(block.input_audio.data) && _isString(block.input_audio.format)) return {
46
+ type: "audio",
47
+ data: block.input_audio.data,
48
+ mimeType: `audio/${block.input_audio.format}`
49
+ };
50
+ else if (_isContentBlock(block, "file") && _isObject(block.file) && _isString(block.file.data)) {
51
+ const parsed = parseBase64DataUrl({ dataUrl: block.file.data });
52
+ if (parsed) return {
53
+ type: "file",
54
+ data: parsed.data,
55
+ mimeType: parsed.mime_type
56
+ };
57
+ else if (_isString(block.file.file_id)) return {
58
+ type: "file",
59
+ fileId: block.file.file_id
60
+ };
61
+ }
62
+ return block;
63
+ }
64
+ export {
65
+ convertToV1FromDataContent,
66
+ convertToV1FromOpenAIDataBlock,
67
+ isOpenAIDataBlock
68
+ };
69
+ //# sourceMappingURL=index.es57.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es57.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.8_openai@6.15.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/data.js"],"sourcesContent":["import { isBase64ContentBlock, isIDContentBlock, isURLContentBlock, parseBase64DataUrl } from \"../content/data.js\";\nimport { _isContentBlock, _isObject, _isString } from \"./utils.js\";\n\n//#region src/messages/block_translators/data.ts\nfunction convertToV1FromDataContentBlock(block) {\n\tif (isURLContentBlock(block)) return {\n\t\ttype: block.type,\n\t\tmimeType: block.mime_type,\n\t\turl: block.url,\n\t\tmetadata: block.metadata\n\t};\n\tif (isBase64ContentBlock(block)) return {\n\t\ttype: block.type,\n\t\tmimeType: block.mime_type ?? \"application/octet-stream\",\n\t\tdata: block.data,\n\t\tmetadata: block.metadata\n\t};\n\tif (isIDContentBlock(block)) return {\n\t\ttype: block.type,\n\t\tmimeType: block.mime_type,\n\t\tfileId: block.id,\n\t\tmetadata: block.metadata\n\t};\n\treturn block;\n}\nfunction convertToV1FromDataContent(content) {\n\treturn content.map(convertToV1FromDataContentBlock);\n}\nfunction isOpenAIDataBlock(block) {\n\tif (_isContentBlock(block, \"image_url\") && _isObject(block.image_url)) return true;\n\tif (_isContentBlock(block, \"input_audio\") && _isObject(block.input_audio)) return true;\n\tif (_isContentBlock(block, \"file\") && _isObject(block.file)) return true;\n\treturn false;\n}\nfunction convertToV1FromOpenAIDataBlock(block) {\n\tif (_isContentBlock(block, \"image_url\") && _isObject(block.image_url) && _isString(block.image_url.url)) {\n\t\tconst parsed = parseBase64DataUrl({ dataUrl: block.image_url.url });\n\t\tif (parsed) return {\n\t\t\ttype: \"image\",\n\t\t\tmimeType: parsed.mime_type,\n\t\t\tdata: parsed.data\n\t\t};\n\t\telse return {\n\t\t\ttype: \"image\",\n\t\t\turl: block.image_url.url\n\t\t};\n\t} else if (_isContentBlock(block, \"input_audio\") && _isObject(block.input_audio) && _isString(block.input_audio.data) && _isString(block.input_audio.format)) return {\n\t\ttype: \"audio\",\n\t\tdata: block.input_audio.data,\n\t\tmimeType: `audio/${block.input_audio.format}`\n\t};\n\telse if (_isContentBlock(block, \"file\") && _isObject(block.file) && _isString(block.file.data)) {\n\t\tconst parsed = parseBase64DataUrl({ dataUrl: block.file.data });\n\t\tif (parsed) return {\n\t\t\ttype: \"file\",\n\t\t\tdata: parsed.data,\n\t\t\tmimeType: parsed.mime_type\n\t\t};\n\t\telse if (_isString(block.file.file_id)) return {\n\t\t\ttype: \"file\",\n\t\t\tfileId: block.file.file_id\n\t\t};\n\t}\n\treturn block;\n}\n\n//#endregion\nexport { convertToV1FromDataContent, convertToV1FromOpenAIDataBlock, isOpenAIDataBlock };\n//# sourceMappingURL=data.js.map"],"names":[],"mappings":";;AAIA,SAAS,gCAAgC,OAAO;AAC/C,MAAI,kBAAkB,KAAK,EAAG,QAAO;AAAA,IACpC,MAAM,MAAM;AAAA,IACZ,UAAU,MAAM;AAAA,IAChB,KAAK,MAAM;AAAA,IACX,UAAU,MAAM;AAAA,EAClB;AACC,MAAI,qBAAqB,KAAK,EAAG,QAAO;AAAA,IACvC,MAAM,MAAM;AAAA,IACZ,UAAU,MAAM,aAAa;AAAA,IAC7B,MAAM,MAAM;AAAA,IACZ,UAAU,MAAM;AAAA,EAClB;AACC,MAAI,iBAAiB,KAAK,EAAG,QAAO;AAAA,IACnC,MAAM,MAAM;AAAA,IACZ,UAAU,MAAM;AAAA,IAChB,QAAQ,MAAM;AAAA,IACd,UAAU,MAAM;AAAA,EAClB;AACC,SAAO;AACR;AACA,SAAS,2BAA2B,SAAS;AAC5C,SAAO,QAAQ,IAAI,+BAA+B;AACnD;AACA,SAAS,kBAAkB,OAAO;AACjC,MAAI,gBAAgB,OAAO,WAAW,KAAK,UAAU,MAAM,SAAS,EAAG,QAAO;AAC9E,MAAI,gBAAgB,OAAO,aAAa,KAAK,UAAU,MAAM,WAAW,EAAG,QAAO;AAClF,MAAI,gBAAgB,OAAO,MAAM,KAAK,UAAU,MAAM,IAAI,EAAG,QAAO;AACpE,SAAO;AACR;AACA,S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