langgraph-ui-components 0.0.3 → 0.0.6

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 (536) hide show
  1. package/README.md +32 -0
  2. package/dist/index.es10.js +31 -16
  3. package/dist/index.es10.js.map +1 -1
  4. package/dist/index.es100.js +37 -5
  5. package/dist/index.es100.js.map +1 -1
  6. package/dist/index.es101.js +160 -67
  7. package/dist/index.es101.js.map +1 -1
  8. package/dist/index.es102.js +196 -30
  9. package/dist/index.es102.js.map +1 -1
  10. package/dist/index.es103.js +14 -5
  11. package/dist/index.es103.js.map +1 -1
  12. package/dist/index.es104.js +32 -2
  13. package/dist/index.es104.js.map +1 -1
  14. package/dist/index.es105.js +33 -10
  15. package/dist/index.es105.js.map +1 -1
  16. package/dist/index.es106.js +3110 -454
  17. package/dist/index.es106.js.map +1 -1
  18. package/dist/index.es107.js +5 -5
  19. package/dist/index.es108.js +2 -2
  20. package/dist/index.es109.js +12 -142
  21. package/dist/index.es109.js.map +1 -1
  22. package/dist/index.es11.js +146 -120
  23. package/dist/index.es11.js.map +1 -1
  24. package/dist/index.es110.js +11 -906
  25. package/dist/index.es110.js.map +1 -1
  26. package/dist/index.es111.js +483 -262
  27. package/dist/index.es111.js.map +1 -1
  28. package/dist/index.es112.js +7 -4
  29. package/dist/index.es112.js.map +1 -1
  30. package/dist/index.es113.js +2 -446
  31. package/dist/index.es113.js.map +1 -1
  32. package/dist/index.es114.js +141 -41
  33. package/dist/index.es114.js.map +1 -1
  34. package/dist/index.es115.js +904 -20
  35. package/dist/index.es115.js.map +1 -1
  36. package/dist/index.es116.js +267 -66
  37. package/dist/index.es116.js.map +1 -1
  38. package/dist/index.es117.js +3 -130
  39. package/dist/index.es117.js.map +1 -1
  40. package/dist/index.es118.js +437 -42
  41. package/dist/index.es118.js.map +1 -1
  42. package/dist/index.es119.js +46 -10
  43. package/dist/index.es119.js.map +1 -1
  44. package/dist/index.es12.js +13 -103
  45. package/dist/index.es12.js.map +1 -1
  46. package/dist/index.es120.js +22 -45
  47. package/dist/index.es120.js.map +1 -1
  48. package/dist/index.es121.js +72 -92
  49. package/dist/index.es121.js.map +1 -1
  50. package/dist/index.es122.js +126 -50
  51. package/dist/index.es122.js.map +1 -1
  52. package/dist/index.es123.js +46 -13
  53. package/dist/index.es123.js.map +1 -1
  54. package/dist/index.es124.js +9 -14
  55. package/dist/index.es124.js.map +1 -1
  56. package/dist/index.es125.js +45 -89
  57. package/dist/index.es125.js.map +1 -1
  58. package/dist/index.es126.js +99 -2
  59. package/dist/index.es126.js.map +1 -1
  60. package/dist/index.es127.js +48 -51
  61. package/dist/index.es127.js.map +1 -1
  62. package/dist/index.es128.js +14 -99
  63. package/dist/index.es128.js.map +1 -1
  64. package/dist/index.es129.js +88 -190
  65. package/dist/index.es129.js.map +1 -1
  66. package/dist/index.es13.js +126 -33
  67. package/dist/index.es13.js.map +1 -1
  68. package/dist/index.es130.js +2 -110
  69. package/dist/index.es130.js.map +1 -1
  70. package/dist/index.es131.js +163 -34
  71. package/dist/index.es131.js.map +1 -1
  72. package/dist/index.es132.js +2 -10
  73. package/dist/index.es132.js.map +1 -1
  74. package/dist/index.es133.js +55 -10
  75. package/dist/index.es133.js.map +1 -1
  76. package/dist/index.es134.js +99 -11
  77. package/dist/index.es134.js.map +1 -1
  78. package/dist/index.es135.js +181 -81
  79. package/dist/index.es135.js.map +1 -1
  80. package/dist/index.es136.js +105 -270
  81. package/dist/index.es136.js.map +1 -1
  82. package/dist/index.es137.js +35 -2
  83. package/dist/index.es137.js.map +1 -1
  84. package/dist/index.es138.js +10 -164
  85. package/dist/index.es138.js.map +1 -1
  86. package/dist/index.es139.js +11 -51
  87. package/dist/index.es139.js.map +1 -1
  88. package/dist/index.es140.js +11 -39
  89. package/dist/index.es140.js.map +1 -1
  90. package/dist/index.es141.js +89 -33
  91. package/dist/index.es141.js.map +1 -1
  92. package/dist/index.es142.js +264 -29
  93. package/dist/index.es142.js.map +1 -1
  94. package/dist/index.es143.js +2 -24
  95. package/dist/index.es143.js.map +1 -1
  96. package/dist/index.es144.js +158 -585
  97. package/dist/index.es144.js.map +1 -1
  98. package/dist/index.es145.js +44 -118
  99. package/dist/index.es145.js.map +1 -1
  100. package/dist/index.es146.js +34 -158
  101. package/dist/index.es146.js.map +1 -1
  102. package/dist/index.es147.js +35 -2
  103. package/dist/index.es147.js.map +1 -1
  104. package/dist/index.es148.js +40 -2
  105. package/dist/index.es148.js.map +1 -1
  106. package/dist/index.es149.js +24 -2
  107. package/dist/index.es149.js.map +1 -1
  108. package/dist/index.es15.js +15 -15
  109. package/dist/index.es150.js +589 -20
  110. package/dist/index.es150.js.map +1 -1
  111. package/dist/index.es151.js +125 -2
  112. package/dist/index.es151.js.map +1 -1
  113. package/dist/index.es152.js +3 -24
  114. package/dist/index.es152.js.map +1 -1
  115. package/dist/index.es153.js +2 -4
  116. package/dist/index.es153.js.map +1 -1
  117. package/dist/index.es154.js +2 -5
  118. package/dist/index.es154.js.map +1 -1
  119. package/dist/index.es155.js +22 -13
  120. package/dist/index.es155.js.map +1 -1
  121. package/dist/index.es156.js +2 -6
  122. package/dist/index.es156.js.map +1 -1
  123. package/dist/index.es157.js +25 -8
  124. package/dist/index.es157.js.map +1 -1
  125. package/dist/index.es158.js +5 -64
  126. package/dist/index.es158.js.map +1 -1
  127. package/dist/index.es159.js +12 -21
  128. package/dist/index.es159.js.map +1 -1
  129. package/dist/index.es16.js +2 -2
  130. package/dist/index.es160.js +5 -5
  131. package/dist/index.es160.js.map +1 -1
  132. package/dist/index.es161.js +8 -349
  133. package/dist/index.es161.js.map +1 -1
  134. package/dist/index.es162.js +1 -1
  135. package/dist/index.es163.js +1 -1
  136. package/dist/index.es164.js +3 -3
  137. package/dist/index.es165.js +63 -6
  138. package/dist/index.es165.js.map +1 -1
  139. package/dist/index.es166.js +21 -102
  140. package/dist/index.es166.js.map +1 -1
  141. package/dist/index.es167.js +5 -118
  142. package/dist/index.es167.js.map +1 -1
  143. package/dist/index.es168.js +330 -117
  144. package/dist/index.es168.js.map +1 -1
  145. package/dist/index.es169.js +6 -114
  146. package/dist/index.es169.js.map +1 -1
  147. package/dist/index.es17.js +2 -2
  148. package/dist/index.es170.js +103 -6
  149. package/dist/index.es170.js.map +1 -1
  150. package/dist/index.es171.js +119 -2
  151. package/dist/index.es171.js.map +1 -1
  152. package/dist/index.es172.js +134 -140
  153. package/dist/index.es172.js.map +1 -1
  154. package/dist/index.es173.js +115 -2
  155. package/dist/index.es173.js.map +1 -1
  156. package/dist/index.es174.js +6 -3737
  157. package/dist/index.es174.js.map +1 -1
  158. package/dist/index.es175.js +2 -342
  159. package/dist/index.es175.js.map +1 -1
  160. package/dist/index.es176.js +138 -105
  161. package/dist/index.es176.js.map +1 -1
  162. package/dist/index.es177.js +2 -133
  163. package/dist/index.es177.js.map +1 -1
  164. package/dist/index.es178.js +3734 -12
  165. package/dist/index.es178.js.map +1 -1
  166. package/dist/index.es179.js +326 -136
  167. package/dist/index.es179.js.map +1 -1
  168. package/dist/index.es180.js +107 -13
  169. package/dist/index.es180.js.map +1 -1
  170. package/dist/index.es181.js +131 -6
  171. package/dist/index.es181.js.map +1 -1
  172. package/dist/index.es182.js +13 -19
  173. package/dist/index.es182.js.map +1 -1
  174. package/dist/index.es183.js +139 -77
  175. package/dist/index.es183.js.map +1 -1
  176. package/dist/index.es184.js +13 -241
  177. package/dist/index.es184.js.map +1 -1
  178. package/dist/index.es185.js +8 -24
  179. package/dist/index.es185.js.map +1 -1
  180. package/dist/index.es186.js +21 -6
  181. package/dist/index.es186.js.map +1 -1
  182. package/dist/index.es187.js +90 -4
  183. package/dist/index.es187.js.map +1 -1
  184. package/dist/index.es188.js +240 -15
  185. package/dist/index.es188.js.map +1 -1
  186. package/dist/index.es189.js +24 -8
  187. package/dist/index.es189.js.map +1 -1
  188. package/dist/index.es19.js +15 -119
  189. package/dist/index.es19.js.map +1 -1
  190. package/dist/index.es190.js +5 -31
  191. package/dist/index.es190.js.map +1 -1
  192. package/dist/index.es191.js +4 -6
  193. package/dist/index.es191.js.map +1 -1
  194. package/dist/index.es192.js +17 -105
  195. package/dist/index.es192.js.map +1 -1
  196. package/dist/index.es193.js +6 -11
  197. package/dist/index.es193.js.map +1 -1
  198. package/dist/index.es194.js +32 -18
  199. package/dist/index.es194.js.map +1 -1
  200. package/dist/index.es195.js +6 -31
  201. package/dist/index.es195.js.map +1 -1
  202. package/dist/index.es196.js +106 -4
  203. package/dist/index.es196.js.map +1 -1
  204. package/dist/index.es197.js +12 -4
  205. package/dist/index.es197.js.map +1 -1
  206. package/dist/index.es198.js +17 -4
  207. package/dist/index.es198.js.map +1 -1
  208. package/dist/index.es199.js +21 -27
  209. package/dist/index.es199.js.map +1 -1
  210. package/dist/index.es2.js +25 -16
  211. package/dist/index.es2.js.map +1 -1
  212. package/dist/index.es20.js +37 -17
  213. package/dist/index.es20.js.map +1 -1
  214. package/dist/index.es200.js +3 -7
  215. package/dist/index.es200.js.map +1 -1
  216. package/dist/index.es201.js +3 -4
  217. package/dist/index.es201.js.map +1 -1
  218. package/dist/index.es202.js +5 -7
  219. package/dist/index.es202.js.map +1 -1
  220. package/dist/index.es203.js +36 -41
  221. package/dist/index.es203.js.map +1 -1
  222. package/dist/index.es204.js +5 -10
  223. package/dist/index.es204.js.map +1 -1
  224. package/dist/index.es205.js +5 -241
  225. package/dist/index.es205.js.map +1 -1
  226. package/dist/index.es206.js +5 -49
  227. package/dist/index.es206.js.map +1 -1
  228. package/dist/index.es207.js +29 -22
  229. package/dist/index.es207.js.map +1 -1
  230. package/dist/index.es208.js +10 -10
  231. package/dist/index.es208.js.map +1 -1
  232. package/dist/index.es209.js +241 -7
  233. package/dist/index.es209.js.map +1 -1
  234. package/dist/index.es21.js +27 -67
  235. package/dist/index.es21.js.map +1 -1
  236. package/dist/index.es210.js +50 -6
  237. package/dist/index.es210.js.map +1 -1
  238. package/dist/index.es211.js +30 -60
  239. package/dist/index.es211.js.map +1 -1
  240. package/dist/index.es212.js +11 -39
  241. package/dist/index.es212.js.map +1 -1
  242. package/dist/index.es213.js +7 -31
  243. package/dist/index.es213.js.map +1 -1
  244. package/dist/index.es214.js +6 -61
  245. package/dist/index.es214.js.map +1 -1
  246. package/dist/index.es215.js +58 -8
  247. package/dist/index.es215.js.map +1 -1
  248. package/dist/index.es216.js +34 -16
  249. package/dist/index.es216.js.map +1 -1
  250. package/dist/index.es217.js +31 -4
  251. package/dist/index.es217.js.map +1 -1
  252. package/dist/index.es218.js +58 -13
  253. package/dist/index.es218.js.map +1 -1
  254. package/dist/index.es219.js +14 -32
  255. package/dist/index.es219.js.map +1 -1
  256. package/dist/index.es22.js +140 -30
  257. package/dist/index.es22.js.map +1 -1
  258. package/dist/index.es220.js +23 -5
  259. package/dist/index.es220.js.map +1 -1
  260. package/dist/index.es221.js +4 -4
  261. package/dist/index.es221.js.map +1 -1
  262. package/dist/index.es222.js +16 -4
  263. package/dist/index.es222.js.map +1 -1
  264. package/dist/index.es223.js +32 -7
  265. package/dist/index.es223.js.map +1 -1
  266. package/dist/index.es224.js +4 -91
  267. package/dist/index.es224.js.map +1 -1
  268. package/dist/index.es225.js +4 -17
  269. package/dist/index.es225.js.map +1 -1
  270. package/dist/index.es226.js +5 -762
  271. package/dist/index.es226.js.map +1 -1
  272. package/dist/index.es227.js +8 -66
  273. package/dist/index.es227.js.map +1 -1
  274. package/dist/index.es228.js +83 -165
  275. package/dist/index.es228.js.map +1 -1
  276. package/dist/index.es229.js +16 -36
  277. package/dist/index.es229.js.map +1 -1
  278. package/dist/index.es23.js +17 -32
  279. package/dist/index.es23.js.map +1 -1
  280. package/dist/index.es230.js +761 -136
  281. package/dist/index.es230.js.map +1 -1
  282. package/dist/index.es231.js +66 -93
  283. package/dist/index.es231.js.map +1 -1
  284. package/dist/index.es232.js +172 -31
  285. package/dist/index.es232.js.map +1 -1
  286. package/dist/index.es233.js +129 -277
  287. package/dist/index.es233.js.map +1 -1
  288. package/dist/index.es234.js +92 -25
  289. package/dist/index.es234.js.map +1 -1
  290. package/dist/index.es235.js +31 -22
  291. package/dist/index.es235.js.map +1 -1
  292. package/dist/index.es236.js +284 -14
  293. package/dist/index.es236.js.map +1 -1
  294. package/dist/index.es237.js +24 -13
  295. package/dist/index.es237.js.map +1 -1
  296. package/dist/index.es238.js +17 -19
  297. package/dist/index.es238.js.map +1 -1
  298. package/dist/index.es239.js +12 -43
  299. package/dist/index.es239.js.map +1 -1
  300. package/dist/index.es24.js +57 -136
  301. package/dist/index.es24.js.map +1 -1
  302. package/dist/index.es240.js +14 -11
  303. package/dist/index.es240.js.map +1 -1
  304. package/dist/index.es241.js +24 -10
  305. package/dist/index.es241.js.map +1 -1
  306. package/dist/index.es242.js +45 -11
  307. package/dist/index.es242.js.map +1 -1
  308. package/dist/index.es243.js +11 -14
  309. package/dist/index.es243.js.map +1 -1
  310. package/dist/index.es244.js +10 -10
  311. package/dist/index.es244.js.map +1 -1
  312. package/dist/index.es245.js +11 -11
  313. package/dist/index.es245.js.map +1 -1
  314. package/dist/index.es246.js +14 -11
  315. package/dist/index.es246.js.map +1 -1
  316. package/dist/index.es247.js +10 -14
  317. package/dist/index.es247.js.map +1 -1
  318. package/dist/index.es248.js +11 -11
  319. package/dist/index.es248.js.map +1 -1
  320. package/dist/index.es249.js +11 -11
  321. package/dist/index.es249.js.map +1 -1
  322. package/dist/index.es25.js +298 -94
  323. package/dist/index.es25.js.map +1 -1
  324. package/dist/index.es250.js +15 -11
  325. package/dist/index.es250.js.map +1 -1
  326. package/dist/index.es251.js +11 -11
  327. package/dist/index.es251.js.map +1 -1
  328. package/dist/index.es252.js +11 -11
  329. package/dist/index.es252.js.map +1 -1
  330. package/dist/index.es253.js +10 -10
  331. package/dist/index.es253.js.map +1 -1
  332. package/dist/index.es254.js +10 -10
  333. package/dist/index.es254.js.map +1 -1
  334. package/dist/index.es255.js +10 -10
  335. package/dist/index.es255.js.map +1 -1
  336. package/dist/index.es256.js +11 -56
  337. package/dist/index.es256.js.map +1 -1
  338. package/dist/index.es257.js +11 -49
  339. package/dist/index.es257.js.map +1 -1
  340. package/dist/index.es258.js +11 -119
  341. package/dist/index.es258.js.map +1 -1
  342. package/dist/index.es259.js +56 -384
  343. package/dist/index.es259.js.map +1 -1
  344. package/dist/index.es26.js +116 -65
  345. package/dist/index.es26.js.map +1 -1
  346. package/dist/index.es260.js +47 -16
  347. package/dist/index.es260.js.map +1 -1
  348. package/dist/index.es261.js +118 -10
  349. package/dist/index.es261.js.map +1 -1
  350. package/dist/index.es262.js +379 -26
  351. package/dist/index.es262.js.map +1 -1
  352. package/dist/index.es263.js +13 -26
  353. package/dist/index.es263.js.map +1 -1
  354. package/dist/index.es264.js +10 -61
  355. package/dist/index.es264.js.map +1 -1
  356. package/dist/index.es265.js +25 -11
  357. package/dist/index.es265.js.map +1 -1
  358. package/dist/index.es266.js +25 -71
  359. package/dist/index.es266.js.map +1 -1
  360. package/dist/index.es267.js +62 -11
  361. package/dist/index.es267.js.map +1 -1
  362. package/dist/index.es268.js +17 -11
  363. package/dist/index.es268.js.map +1 -1
  364. package/dist/index.es269.js +75 -13
  365. package/dist/index.es269.js.map +1 -1
  366. package/dist/index.es27.js +91 -168
  367. package/dist/index.es27.js.map +1 -1
  368. package/dist/index.es270.js +11 -52
  369. package/dist/index.es270.js.map +1 -1
  370. package/dist/index.es271.js +11 -166
  371. package/dist/index.es271.js.map +1 -1
  372. package/dist/index.es272.js +16 -2
  373. package/dist/index.es272.js.map +1 -1
  374. package/dist/index.es273.js +51 -9
  375. package/dist/index.es273.js.map +1 -1
  376. package/dist/index.es274.js +165 -18
  377. package/dist/index.es274.js.map +1 -1
  378. package/dist/index.es275.js +36 -37
  379. package/dist/index.es275.js.map +1 -1
  380. package/dist/index.es276.js +5 -0
  381. package/dist/index.es276.js.map +1 -0
  382. package/dist/index.es277.js +14 -0
  383. package/dist/index.es277.js.map +1 -0
  384. package/dist/index.es278.js +23 -0
  385. package/dist/index.es278.js.map +1 -0
  386. package/dist/index.es279.js +42 -0
  387. package/dist/index.es279.js.map +1 -0
  388. package/dist/index.es28.js +68 -24
  389. package/dist/index.es28.js.map +1 -1
  390. package/dist/index.es29.js +178 -12
  391. package/dist/index.es29.js.map +1 -1
  392. package/dist/index.es30.js +23 -437
  393. package/dist/index.es30.js.map +1 -1
  394. package/dist/index.es31.js +13 -15
  395. package/dist/index.es31.js.map +1 -1
  396. package/dist/index.es32.js +429 -107
  397. package/dist/index.es32.js.map +1 -1
  398. package/dist/index.es33.js +112 -65
  399. package/dist/index.es33.js.map +1 -1
  400. package/dist/index.es34.js +71 -18
  401. package/dist/index.es34.js.map +1 -1
  402. package/dist/index.es35.js +17 -260
  403. package/dist/index.es35.js.map +1 -1
  404. package/dist/index.es36.js +249 -31
  405. package/dist/index.es36.js.map +1 -1
  406. package/dist/index.es37.js +27 -199
  407. package/dist/index.es37.js.map +1 -1
  408. package/dist/index.es38.js +198 -50
  409. package/dist/index.es38.js.map +1 -1
  410. package/dist/index.es39.js +45 -120
  411. package/dist/index.es39.js.map +1 -1
  412. package/dist/index.es40.js +132 -14
  413. package/dist/index.es40.js.map +1 -1
  414. package/dist/index.es41.js +19 -225
  415. package/dist/index.es41.js.map +1 -1
  416. package/dist/index.es42.js +229 -8
  417. package/dist/index.es42.js.map +1 -1
  418. package/dist/index.es43.js +7 -1190
  419. package/dist/index.es43.js.map +1 -1
  420. package/dist/index.es44.js +1191 -6
  421. package/dist/index.es44.js.map +1 -1
  422. package/dist/index.es45.js +6 -146
  423. package/dist/index.es45.js.map +1 -1
  424. package/dist/index.es46.js +147 -7
  425. package/dist/index.es46.js.map +1 -1
  426. package/dist/index.es47.js +15 -92
  427. package/dist/index.es47.js.map +1 -1
  428. package/dist/index.es49.js +5 -35
  429. package/dist/index.es49.js.map +1 -1
  430. package/dist/index.es50.js +7 -71
  431. package/dist/index.es50.js.map +1 -1
  432. package/dist/index.es51.js +89 -33
  433. package/dist/index.es51.js.map +1 -1
  434. package/dist/index.es52.js +3 -305
  435. package/dist/index.es52.js.map +1 -1
  436. package/dist/index.es53.js +36 -9
  437. package/dist/index.es53.js.map +1 -1
  438. package/dist/index.es54.js +64 -83
  439. package/dist/index.es54.js.map +1 -1
  440. package/dist/index.es55.js +36 -6
  441. package/dist/index.es55.js.map +1 -1
  442. package/dist/index.es56.js +303 -12
  443. package/dist/index.es56.js.map +1 -1
  444. package/dist/index.es57.js +9 -143
  445. package/dist/index.es57.js.map +1 -1
  446. package/dist/index.es58.js +83 -292
  447. package/dist/index.es58.js.map +1 -1
  448. package/dist/index.es59.js +6 -64
  449. package/dist/index.es59.js.map +1 -1
  450. package/dist/index.es6.js +21 -5
  451. package/dist/index.es6.js.map +1 -1
  452. package/dist/index.es60.js +12 -210
  453. package/dist/index.es60.js.map +1 -1
  454. package/dist/index.es61.js +138 -29
  455. package/dist/index.es61.js.map +1 -1
  456. package/dist/index.es62.js +299 -8
  457. package/dist/index.es62.js.map +1 -1
  458. package/dist/index.es63.js +65 -11
  459. package/dist/index.es63.js.map +1 -1
  460. package/dist/index.es64.js +201 -175
  461. package/dist/index.es64.js.map +1 -1
  462. package/dist/index.es65.js +33 -23
  463. package/dist/index.es65.js.map +1 -1
  464. package/dist/index.es66.js +8 -1399
  465. package/dist/index.es66.js.map +1 -1
  466. package/dist/index.es67.js +12 -9
  467. package/dist/index.es67.js.map +1 -1
  468. package/dist/index.es68.js +187 -8
  469. package/dist/index.es68.js.map +1 -1
  470. package/dist/index.es69.js +24 -6
  471. package/dist/index.es69.js.map +1 -1
  472. package/dist/index.es70.js +1384 -147
  473. package/dist/index.es70.js.map +1 -1
  474. package/dist/index.es71.js +9 -672
  475. package/dist/index.es71.js.map +1 -1
  476. package/dist/index.es72.js +8 -12
  477. package/dist/index.es72.js.map +1 -1
  478. package/dist/index.es73.js +6 -40
  479. package/dist/index.es73.js.map +1 -1
  480. package/dist/index.es74.js +155 -26
  481. package/dist/index.es74.js.map +1 -1
  482. package/dist/index.es75.js +657 -217
  483. package/dist/index.es75.js.map +1 -1
  484. package/dist/index.es76.js +11 -29
  485. package/dist/index.es76.js.map +1 -1
  486. package/dist/index.es77.js +37 -72
  487. package/dist/index.es77.js.map +1 -1
  488. package/dist/index.es78.js +32 -74
  489. package/dist/index.es78.js.map +1 -1
  490. package/dist/index.es79.js +226 -46
  491. package/dist/index.es79.js.map +1 -1
  492. package/dist/index.es80.js +6 -6
  493. package/dist/index.es80.js.map +1 -1
  494. package/dist/index.es81.js +71 -39
  495. package/dist/index.es81.js.map +1 -1
  496. package/dist/index.es82.js +73 -54
  497. package/dist/index.es82.js.map +1 -1
  498. package/dist/index.es83.js +52 -13
  499. package/dist/index.es83.js.map +1 -1
  500. package/dist/index.es84.js +28 -135
  501. package/dist/index.es84.js.map +1 -1
  502. package/dist/index.es85.js +42 -20
  503. package/dist/index.es85.js.map +1 -1
  504. package/dist/index.es86.js +36 -181
  505. package/dist/index.es86.js.map +1 -1
  506. package/dist/index.es87.js +5 -241
  507. package/dist/index.es87.js.map +1 -1
  508. package/dist/index.es88.js +65 -347
  509. package/dist/index.es88.js.map +1 -1
  510. package/dist/index.es89.js +31 -131
  511. package/dist/index.es89.js.map +1 -1
  512. package/dist/index.es90.js +49 -62
  513. package/dist/index.es90.js.map +1 -1
  514. package/dist/index.es91.js +13 -37
  515. package/dist/index.es91.js.map +1 -1
  516. package/dist/index.es92.js +134 -34
  517. package/dist/index.es92.js.map +1 -1
  518. package/dist/index.es93.js +20 -165
  519. package/dist/index.es93.js.map +1 -1
  520. package/dist/index.es94.js +162 -183
  521. package/dist/index.es94.js.map +1 -1
  522. package/dist/index.es95.js +240 -13
  523. package/dist/index.es95.js.map +1 -1
  524. package/dist/index.es96.js +352 -27
  525. package/dist/index.es96.js.map +1 -1
  526. package/dist/index.es97.js +130 -27
  527. package/dist/index.es97.js.map +1 -1
  528. package/dist/index.es98.js +64 -3151
  529. package/dist/index.es98.js.map +1 -1
  530. package/dist/index.es99.js +34 -34
  531. package/dist/index.es99.js.map +1 -1
  532. package/dist/langgraph-ui-components.css +107 -0
  533. package/dist/styles.css +1 -1
  534. package/package.json +8 -7
  535. package/dist/index.es48.js +0 -7
  536. package/dist/index.es48.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.es115.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/is-network-error/index.js"],"sourcesContent":["//#region src/utils/is-network-error/index.js\nconst objectToString = Object.prototype.toString;\nconst isError = (value) => objectToString.call(value) === \"[object Error]\";\nconst errorMessages = new Set([\n\t\"network error\",\n\t\"Failed to fetch\",\n\t\"NetworkError when attempting to fetch resource.\",\n\t\"The Internet connection appears to be offline.\",\n\t\"Network request failed\",\n\t\"fetch failed\",\n\t\"terminated\",\n\t\" A network error occurred.\",\n\t\"Network connection lost\"\n]);\nfunction isNetworkError(error) {\n\tconst isValid = error && isError(error) && error.name === \"TypeError\" && typeof error.message === \"string\";\n\tif (!isValid) return false;\n\tconst { message, stack } = error;\n\tif (message === \"Load failed\") return stack === void 0 || \"__sentry_captured__\" in error;\n\tif (message.startsWith(\"error sending request for url\")) return true;\n\treturn errorMessages.has(message);\n}\n\n//#endregion\nexport { isNetworkError };\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":"AACA,MAAM,iBAAiB,OAAO,UAAU;AACxC,MAAM,UAAU,CAAC,UAAU,eAAe,KAAK,KAAK,MAAM;AAC1D,MAAM,gBAAgB,oBAAI,IAAI;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AACD,SAAS,eAAe,OAAO;AAC9B,QAAM,UAAU,SAAS,QAAQ,KAAK,KAAK,MAAM,SAAS,eAAe,OAAO,MAAM,YAAY;AAClG,MAAI,CAAC,QAAS,QAAO;AACrB,QAAM,EAAE,SAAS,MAAK,IAAK;AAC3B,MAAI,YAAY,cAAe,QAAO,UAAU,UAAU,yBAAyB;AACnF,MAAI,QAAQ,WAAW,+BAA+B,EAAG,QAAO;AAChE,SAAO,cAAc,IAAI,OAAO;AACjC;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es115.js","sources":["../node_modules/.pnpm/langsmith@0.4.6_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/run_trees.js"],"sourcesContent":["import { Client } from \"./client.js\";\nimport { isTracingEnabled } from \"./env.js\";\nimport { isConflictingEndpointsError, ConflictingEndpointsError, } from \"./utils/error.js\";\nimport { _LC_CONTEXT_VARIABLES_KEY, _REPLICA_TRACE_ROOTS_KEY, } from \"./singletons/constants.js\";\nimport { getContextVar, setContextVar } from \"./utils/context_vars.js\";\nimport { getEnvironmentVariable, getRuntimeEnvironment, } from \"./utils/env.js\";\nimport { getDefaultProjectName } from \"./utils/project.js\";\nimport { getLangSmithEnvironmentVariable } from \"./utils/env.js\";\nimport { warnOnce } from \"./utils/warn.js\";\nimport { uuid7FromTime } from \"./utils/_uuid.js\";\nimport { v5 as uuidv5 } from \"uuid\";\nconst TIMESTAMP_LENGTH = 36;\n// DNS namespace for UUID v5 (same as Python's uuid.NAMESPACE_DNS)\nconst UUID_NAMESPACE_DNS = \"6ba7b810-9dad-11d1-80b4-00c04fd430c8\";\nfunction getReplicaKey(replica) {\n // Generate a unique key by hashing the replica's identifying properties\n // This ensures each unique replica (combination of projectName, apiUrl, workspaceId, apiKey) gets a unique key\n // Sort keys to ensure consistent hashing\n const sortedKeys = Object.keys(replica).sort();\n const keyData = sortedKeys\n .map((key) => `${key}:${replica[key] ?? \"\"}`)\n .join(\"|\");\n return uuidv5(keyData, UUID_NAMESPACE_DNS);\n}\nfunction stripNonAlphanumeric(input) {\n return input.replace(/[-:.]/g, \"\");\n}\nfunction getMicrosecondPrecisionDatestring(epoch, executionOrder = 1) {\n // Date only has millisecond precision, so we use the microseconds to break\n // possible ties, avoiding incorrect run order\n const paddedOrder = executionOrder.toFixed(0).slice(0, 3).padStart(3, \"0\");\n return `${new Date(epoch).toISOString().slice(0, -1)}${paddedOrder}Z`;\n}\nexport function convertToDottedOrderFormat(epoch, runId, executionOrder = 1) {\n const microsecondPrecisionDatestring = getMicrosecondPrecisionDatestring(epoch, executionOrder);\n return {\n dottedOrder: stripNonAlphanumeric(microsecondPrecisionDatestring) + runId,\n microsecondPrecisionDatestring,\n };\n}\nconst HEADER_SAFE_REPLICA_FIELDS = new Set([\n \"projectName\",\n \"updates\",\n \"reroot\",\n]);\nfunction filterReplicaForHeaders(replica) {\n const filtered = {};\n for (const key of Object.keys(replica)) {\n if (HEADER_SAFE_REPLICA_FIELDS.has(key)) {\n filtered[key] = replica[key];\n }\n }\n return filtered;\n}\n/**\n * Baggage header information\n */\nclass Baggage {\n constructor(metadata, tags, project_name, replicas) {\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"tags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"project_name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"replicas\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.metadata = metadata;\n this.tags = tags;\n this.project_name = project_name;\n this.replicas = replicas;\n }\n static fromHeader(value) {\n const items = value.split(\",\");\n let metadata = {};\n let tags = [];\n let project_name;\n let replicas;\n for (const item of items) {\n const [key, uriValue] = item.split(\"=\");\n const value = decodeURIComponent(uriValue);\n if (key === \"langsmith-metadata\") {\n metadata = JSON.parse(value);\n }\n else if (key === \"langsmith-tags\") {\n tags = value.split(\",\");\n }\n else if (key === \"langsmith-project\") {\n project_name = value;\n }\n else if (key === \"langsmith-replicas\") {\n const parsed = JSON.parse(value);\n replicas = parsed.map((replica) => {\n if (Array.isArray(replica)) {\n return replica;\n }\n return filterReplicaForHeaders(replica);\n });\n }\n }\n return new Baggage(metadata, tags, project_name, replicas);\n }\n toHeader() {\n const items = [];\n if (this.metadata && Object.keys(this.metadata).length > 0) {\n items.push(`langsmith-metadata=${encodeURIComponent(JSON.stringify(this.metadata))}`);\n }\n if (this.tags && this.tags.length > 0) {\n items.push(`langsmith-tags=${encodeURIComponent(this.tags.join(\",\"))}`);\n }\n if (this.project_name) {\n items.push(`langsmith-project=${encodeURIComponent(this.project_name)}`);\n }\n return items.join(\",\");\n }\n}\nexport class RunTree {\n constructor(originalConfig) {\n Object.defineProperty(this, \"id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"run_type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"project_name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"parent_run\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"parent_run_id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"child_runs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"start_time\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"end_time\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"extra\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"tags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"error\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"serialized\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"inputs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"outputs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reference_example_id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"client\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"events\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"trace_id\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"dotted_order\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"tracingEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"execution_order\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"child_execution_order\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Attachments associated with the run.\n * Each entry is a tuple of [mime_type, bytes]\n */\n Object.defineProperty(this, \"attachments\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Projects to replicate this run to with optional updates.\n */\n Object.defineProperty(this, \"replicas\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"distributedParentId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @interface\n */\n Object.defineProperty(this, \"_serialized_start_time\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * @internal\n */\n Object.defineProperty(this, \"_awaitInputsOnPost\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // If you pass in a run tree directly, return a shallow clone\n if (isRunTree(originalConfig)) {\n Object.assign(this, { ...originalConfig });\n return;\n }\n const defaultConfig = RunTree.getDefaultConfig();\n const { metadata, ...config } = originalConfig;\n const client = config.client ?? RunTree.getSharedClient();\n const dedupedMetadata = {\n ...metadata,\n ...config?.extra?.metadata,\n };\n config.extra = { ...config.extra, metadata: dedupedMetadata };\n if (\"id\" in config && config.id == null) {\n delete config.id;\n }\n Object.assign(this, { ...defaultConfig, ...config, client });\n this.execution_order ??= 1;\n this.child_execution_order ??= 1;\n // Generate serialized start time for ID generation\n if (!this.dotted_order) {\n this._serialized_start_time = getMicrosecondPrecisionDatestring(this.start_time, this.execution_order);\n }\n // Generate id from serialized start_time if not provided\n if (!this.id) {\n this.id = uuid7FromTime(this._serialized_start_time ?? this.start_time);\n }\n if (!this.trace_id) {\n if (this.parent_run) {\n this.trace_id = this.parent_run.trace_id ?? this.id;\n }\n else {\n this.trace_id = this.id;\n }\n }\n this.replicas = _ensureWriteReplicas(this.replicas);\n // Now set the dotted order with the actual ID\n if (!this.dotted_order) {\n const { dottedOrder } = convertToDottedOrderFormat(this.start_time, this.id, this.execution_order);\n if (this.parent_run) {\n this.dotted_order = this.parent_run.dotted_order + \".\" + dottedOrder;\n }\n else {\n this.dotted_order = dottedOrder;\n }\n }\n }\n set metadata(metadata) {\n this.extra = {\n ...this.extra,\n metadata: {\n ...this.extra?.metadata,\n ...metadata,\n },\n };\n }\n get metadata() {\n return this.extra?.metadata;\n }\n static getDefaultConfig() {\n const start_time = Date.now();\n return {\n run_type: \"chain\",\n project_name: getDefaultProjectName(),\n child_runs: [],\n api_url: getEnvironmentVariable(\"LANGCHAIN_ENDPOINT\") ?? \"http://localhost:1984\",\n api_key: getEnvironmentVariable(\"LANGCHAIN_API_KEY\"),\n caller_options: {},\n start_time,\n serialized: {},\n inputs: {},\n extra: {},\n };\n }\n static getSharedClient() {\n if (!RunTree.sharedClient) {\n RunTree.sharedClient = new Client();\n }\n return RunTree.sharedClient;\n }\n createChild(config) {\n const child_execution_order = this.child_execution_order + 1;\n // Handle replicas: if child has its own replicas, use those; otherwise inherit parent's (with reroot stripped)\n // Reroot should only apply to the run where it's explicitly configured, not propagate down\n const inheritedReplicas = this.replicas?.map((replica) => {\n const { reroot, ...rest } = replica;\n return rest;\n });\n const childReplicas = config.replicas ?? inheritedReplicas;\n const child = new RunTree({\n ...config,\n parent_run: this,\n project_name: this.project_name,\n replicas: childReplicas,\n client: this.client,\n tracingEnabled: this.tracingEnabled,\n execution_order: child_execution_order,\n child_execution_order: child_execution_order,\n });\n // Copy context vars over into the new run tree.\n if (_LC_CONTEXT_VARIABLES_KEY in this) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n child[_LC_CONTEXT_VARIABLES_KEY] =\n this[_LC_CONTEXT_VARIABLES_KEY];\n }\n const LC_CHILD = Symbol.for(\"lc:child_config\");\n const presentConfig = config.extra?.[LC_CHILD] ??\n this.extra[LC_CHILD];\n // tracing for LangChain is defined by the _parentRunId and runMap of the tracer\n if (isRunnableConfigLike(presentConfig)) {\n const newConfig = { ...presentConfig };\n const callbacks = isCallbackManagerLike(newConfig.callbacks)\n ? newConfig.callbacks.copy?.()\n : undefined;\n if (callbacks) {\n // update the parent run id\n Object.assign(callbacks, { _parentRunId: child.id });\n // only populate if we're in a newer LC.JS version\n callbacks.handlers\n ?.find(isLangChainTracerLike)\n ?.updateFromRunTree?.(child);\n newConfig.callbacks = callbacks;\n }\n child.extra[LC_CHILD] = newConfig;\n }\n // propagate child_execution_order upwards\n const visited = new Set();\n let current = this;\n while (current != null && !visited.has(current.id)) {\n visited.add(current.id);\n current.child_execution_order = Math.max(current.child_execution_order, child_execution_order);\n current = current.parent_run;\n }\n this.child_runs.push(child);\n return child;\n }\n async end(outputs, error, endTime = Date.now(), metadata) {\n this.outputs = this.outputs ?? outputs;\n this.error = this.error ?? error;\n this.end_time = this.end_time ?? endTime;\n if (metadata && Object.keys(metadata).length > 0) {\n this.extra = this.extra\n ? { ...this.extra, metadata: { ...this.extra.metadata, ...metadata } }\n : { metadata };\n }\n }\n _convertToCreate(run, runtimeEnv, excludeChildRuns = true) {\n const runExtra = run.extra ?? {};\n // Avoid overwriting the runtime environment if it's already set\n if (runExtra?.runtime?.library === undefined) {\n if (!runExtra.runtime) {\n runExtra.runtime = {};\n }\n if (runtimeEnv) {\n for (const [k, v] of Object.entries(runtimeEnv)) {\n if (!runExtra.runtime[k]) {\n runExtra.runtime[k] = v;\n }\n }\n }\n }\n let child_runs;\n let parent_run_id;\n if (!excludeChildRuns) {\n child_runs = run.child_runs.map((child_run) => this._convertToCreate(child_run, runtimeEnv, excludeChildRuns));\n parent_run_id = undefined;\n }\n else {\n parent_run_id = run.parent_run?.id ?? run.parent_run_id;\n child_runs = [];\n }\n return {\n id: run.id,\n name: run.name,\n start_time: run._serialized_start_time ?? run.start_time,\n end_time: run.end_time,\n run_type: run.run_type,\n reference_example_id: run.reference_example_id,\n extra: runExtra,\n serialized: run.serialized,\n error: run.error,\n inputs: run.inputs,\n outputs: run.outputs,\n session_name: run.project_name,\n child_runs: child_runs,\n parent_run_id: parent_run_id,\n trace_id: run.trace_id,\n dotted_order: run.dotted_order,\n tags: run.tags,\n attachments: run.attachments,\n events: run.events,\n };\n }\n _sliceParentId(parentId, run) {\n /**\n * Slice the parent id from dotted order.\n * Additionally check if the current run is a child of the parent. If so, update\n * the parent_run_id to undefined, and set the trace id to the new root id after\n * parent_id.\n */\n if (run.dotted_order) {\n const segs = run.dotted_order.split(\".\");\n let startIdx = null;\n // Find the index of the parent ID in the dotted order\n for (let idx = 0; idx < segs.length; idx++) {\n const segId = segs[idx].slice(-TIMESTAMP_LENGTH);\n if (segId === parentId) {\n startIdx = idx;\n break;\n }\n }\n if (startIdx !== null) {\n // Trim segments to start after parent_id (exclusive)\n const trimmedSegs = segs.slice(startIdx + 1);\n // Rebuild dotted_order\n run.dotted_order = trimmedSegs.join(\".\");\n if (trimmedSegs.length > 0) {\n run.trace_id = trimmedSegs[0].slice(-TIMESTAMP_LENGTH);\n }\n else {\n run.trace_id = run.id;\n }\n }\n }\n if (run.parent_run_id === parentId) {\n // We've found the new root node.\n run.parent_run_id = undefined;\n }\n }\n _setReplicaTraceRoot(replicaKey, traceRootId) {\n // Set the replica trace root in context vars on this run and all descendants\n const replicaTraceRoots = getContextVar(this, _REPLICA_TRACE_ROOTS_KEY) ?? {};\n replicaTraceRoots[replicaKey] = traceRootId;\n setContextVar(this, _REPLICA_TRACE_ROOTS_KEY, replicaTraceRoots);\n // Recursively update all descendants to avoid race conditions\n // around run tree creation vs processing time\n for (const child of this.child_runs) {\n child._setReplicaTraceRoot(replicaKey, traceRootId);\n }\n }\n _remapForProject(params) {\n const { projectName, runtimeEnv, excludeChildRuns = true, reroot = false, distributedParentId, apiUrl, apiKey, workspaceId, } = params;\n const baseRun = this._convertToCreate(this, runtimeEnv, excludeChildRuns);\n // Skip remapping if project name is the same\n if (projectName === this.project_name) {\n return {\n ...baseRun,\n session_name: projectName,\n };\n }\n // Apply reroot logic before ID remapping\n if (reroot) {\n if (distributedParentId) {\n // If we have a distributed parent ID, slice at that point\n this._sliceParentId(distributedParentId, baseRun);\n }\n else {\n // If no distributed parent ID, simply make this run a root run\n // by removing parent_run_id and resetting trace info\n baseRun.parent_run_id = undefined;\n // Keep the current run as the trace root\n if (baseRun.dotted_order) {\n // Reset dotted order to just this run\n const segs = baseRun.dotted_order.split(\".\");\n if (segs.length > 0) {\n baseRun.dotted_order = segs[segs.length - 1];\n baseRun.trace_id = baseRun.id;\n }\n }\n }\n // Store this run's original ID in context vars so descendants know the new trace root\n // We store the original ID (before remapping) so it can be found in dotted_order\n const replicaKey = getReplicaKey({\n projectName,\n apiUrl,\n apiKey,\n workspaceId,\n });\n this._setReplicaTraceRoot(replicaKey, baseRun.id);\n }\n // If an ancestor was rerooted for this replica, update trace_id and dotted_order\n // to reflect the new trace hierarchy. This is tracked via context variables.\n let ancestorRerootedTraceId;\n if (!reroot) {\n const replicaTraceRoots = getContextVar(this, _REPLICA_TRACE_ROOTS_KEY) ?? {};\n const replicaKey = getReplicaKey({\n projectName,\n apiUrl,\n apiKey,\n workspaceId,\n });\n ancestorRerootedTraceId = replicaTraceRoots[replicaKey];\n if (ancestorRerootedTraceId) {\n // An ancestor was rerooted for this replica, so set our trace_id\n // to the ancestor's original (unmapped) ID. It will be remapped along with other IDs.\n baseRun.trace_id = ancestorRerootedTraceId;\n // Also slice the dotted_order to start from the new trace root\n // This ensures descendants of a rerooted ancestor have correct hierarchy\n if (baseRun.dotted_order) {\n const segs = baseRun.dotted_order.split(\".\");\n let rootIdx = null;\n // Find the new trace root's segment in dotted_order\n for (let idx = 0; idx < segs.length; idx++) {\n const segId = segs[idx].slice(-TIMESTAMP_LENGTH);\n if (segId === ancestorRerootedTraceId) {\n rootIdx = idx;\n break;\n }\n }\n if (rootIdx !== null) {\n // Keep segments from new trace root onwards\n const trimmedSegs = segs.slice(rootIdx);\n baseRun.dotted_order = trimmedSegs.join(\".\");\n }\n }\n }\n }\n // Remap IDs for the replica using uuid5 (deterministic)\n // This ensures consistency across runs in the same replica\n const oldId = baseRun.id;\n const newId = uuidv5(`${oldId}:${projectName}`, UUID_NAMESPACE_DNS);\n // Remap trace_id\n let newTraceId;\n if (baseRun.trace_id) {\n newTraceId = uuidv5(`${baseRun.trace_id}:${projectName}`, UUID_NAMESPACE_DNS);\n }\n else {\n newTraceId = newId;\n }\n // Remap parent_run_id\n let newParentId;\n if (baseRun.parent_run_id) {\n newParentId = uuidv5(`${baseRun.parent_run_id}:${projectName}`, UUID_NAMESPACE_DNS);\n }\n // Remap dotted_order segments\n let newDottedOrder;\n if (baseRun.dotted_order) {\n const segs = baseRun.dotted_order.split(\".\");\n const remappedSegs = segs.map((seg) => {\n // Extract the UUID from the segment (last TIMESTAMP_LENGTH characters)\n const segId = seg.slice(-TIMESTAMP_LENGTH);\n const remappedId = uuidv5(`${segId}:${projectName}`, UUID_NAMESPACE_DNS);\n // Replace the UUID part while keeping the timestamp prefix\n return seg.slice(0, -TIMESTAMP_LENGTH) + remappedId;\n });\n newDottedOrder = remappedSegs.join(\".\");\n }\n return {\n ...baseRun,\n id: newId,\n trace_id: newTraceId,\n parent_run_id: newParentId,\n dotted_order: newDottedOrder,\n session_name: projectName,\n };\n }\n async postRun(excludeChildRuns = true) {\n // Applies when `processInputs` is an async function\n if (this._awaitInputsOnPost) {\n this.inputs = await this.inputs;\n }\n try {\n const runtimeEnv = getRuntimeEnvironment();\n if (this.replicas && this.replicas.length > 0) {\n for (const { projectName, apiKey, apiUrl, workspaceId, reroot } of this\n .replicas) {\n const runCreate = this._remapForProject({\n projectName: projectName ?? this.project_name,\n runtimeEnv,\n excludeChildRuns: true,\n reroot,\n distributedParentId: this.distributedParentId,\n apiUrl,\n apiKey,\n workspaceId,\n });\n await this.client.createRun(runCreate, {\n apiKey,\n apiUrl,\n workspaceId,\n });\n }\n }\n else {\n const runCreate = this._convertToCreate(this, runtimeEnv, excludeChildRuns);\n await this.client.createRun(runCreate);\n }\n if (!excludeChildRuns) {\n warnOnce(\"Posting with excludeChildRuns=false is deprecated and will be removed in a future version.\");\n for (const childRun of this.child_runs) {\n await childRun.postRun(false);\n }\n }\n this.child_runs = [];\n }\n catch (error) {\n console.error(`Error in postRun for run ${this.id}:`, error);\n }\n }\n async patchRun(options) {\n if (this.replicas && this.replicas.length > 0) {\n for (const { projectName, apiKey, apiUrl, workspaceId, updates, reroot, } of this.replicas) {\n const runData = this._remapForProject({\n projectName: projectName ?? this.project_name,\n runtimeEnv: undefined,\n excludeChildRuns: true,\n reroot,\n distributedParentId: this.distributedParentId,\n apiUrl,\n apiKey,\n workspaceId,\n });\n const updatePayload = {\n id: runData.id,\n name: runData.name,\n run_type: runData.run_type,\n start_time: runData.start_time,\n outputs: runData.outputs,\n error: runData.error,\n parent_run_id: runData.parent_run_id,\n session_name: runData.session_name,\n reference_example_id: runData.reference_example_id,\n end_time: runData.end_time,\n dotted_order: runData.dotted_order,\n trace_id: runData.trace_id,\n events: runData.events,\n tags: runData.tags,\n extra: runData.extra,\n attachments: this.attachments,\n ...updates,\n };\n // Important that inputs is not a key in the run update\n // if excluded because it will overwrite the run create if the\n // two operations are merged during batching\n if (!options?.excludeInputs) {\n updatePayload.inputs = runData.inputs;\n }\n await this.client.updateRun(runData.id, updatePayload, {\n apiKey,\n apiUrl,\n workspaceId,\n });\n }\n }\n else {\n try {\n const runUpdate = {\n name: this.name,\n run_type: this.run_type,\n start_time: this._serialized_start_time ?? this.start_time,\n end_time: this.end_time,\n error: this.error,\n outputs: this.outputs,\n parent_run_id: this.parent_run?.id ?? this.parent_run_id,\n reference_example_id: this.reference_example_id,\n extra: this.extra,\n events: this.events,\n dotted_order: this.dotted_order,\n trace_id: this.trace_id,\n tags: this.tags,\n attachments: this.attachments,\n session_name: this.project_name,\n };\n // Important that inputs is not a key in the run update\n // if excluded because it will overwrite the run create if the\n // two operations are merged during batching\n if (!options?.excludeInputs) {\n runUpdate.inputs = this.inputs;\n }\n await this.client.updateRun(this.id, runUpdate);\n }\n catch (error) {\n console.error(`Error in patchRun for run ${this.id}`, error);\n }\n }\n this.child_runs = [];\n }\n toJSON() {\n return this._convertToCreate(this, undefined, false);\n }\n /**\n * Add an event to the run tree.\n * @param event - A single event or string to add\n */\n addEvent(event) {\n if (!this.events) {\n this.events = [];\n }\n if (typeof event === \"string\") {\n this.events.push({\n name: \"event\",\n time: new Date().toISOString(),\n message: event,\n });\n }\n else {\n this.events.push({\n ...event,\n time: event.time ?? new Date().toISOString(),\n });\n }\n }\n static fromRunnableConfig(parentConfig, props) {\n // We only handle the callback manager case for now\n const callbackManager = parentConfig?.callbacks;\n let parentRun;\n let projectName;\n let client;\n let tracingEnabled = isTracingEnabled();\n if (callbackManager) {\n const parentRunId = callbackManager?.getParentRunId?.() ?? \"\";\n const langChainTracer = callbackManager?.handlers?.find((handler) => handler?.name == \"langchain_tracer\");\n parentRun = langChainTracer?.getRun?.(parentRunId);\n projectName = langChainTracer?.projectName;\n client = langChainTracer?.client;\n tracingEnabled = tracingEnabled || !!langChainTracer;\n }\n if (!parentRun) {\n return new RunTree({\n ...props,\n client,\n tracingEnabled,\n project_name: projectName,\n });\n }\n const parentRunTree = new RunTree({\n name: parentRun.name,\n id: parentRun.id,\n trace_id: parentRun.trace_id,\n dotted_order: parentRun.dotted_order,\n client,\n tracingEnabled,\n project_name: projectName,\n tags: [\n ...new Set((parentRun?.tags ?? []).concat(parentConfig?.tags ?? [])),\n ],\n extra: {\n metadata: {\n ...parentRun?.extra?.metadata,\n ...parentConfig?.metadata,\n },\n },\n });\n return parentRunTree.createChild(props);\n }\n static fromDottedOrder(dottedOrder) {\n return this.fromHeaders({ \"langsmith-trace\": dottedOrder });\n }\n static fromHeaders(headers, inheritArgs) {\n const rawHeaders = \"get\" in headers && typeof headers.get === \"function\"\n ? {\n \"langsmith-trace\": headers.get(\"langsmith-trace\"),\n baggage: headers.get(\"baggage\"),\n }\n : headers;\n const headerTrace = rawHeaders[\"langsmith-trace\"];\n if (!headerTrace || typeof headerTrace !== \"string\")\n return undefined;\n const parentDottedOrder = headerTrace.trim();\n const parsedDottedOrder = parentDottedOrder.split(\".\").map((part) => {\n const [strTime, uuid] = part.split(\"Z\");\n return { strTime, time: Date.parse(strTime + \"Z\"), uuid };\n });\n const traceId = parsedDottedOrder[0].uuid;\n const config = {\n ...inheritArgs,\n name: inheritArgs?.[\"name\"] ?? \"parent\",\n run_type: inheritArgs?.[\"run_type\"] ?? \"chain\",\n start_time: inheritArgs?.[\"start_time\"] ?? Date.now(),\n id: parsedDottedOrder.at(-1)?.uuid,\n trace_id: traceId,\n dotted_order: parentDottedOrder,\n };\n if (rawHeaders[\"baggage\"] && typeof rawHeaders[\"baggage\"] === \"string\") {\n const baggage = Baggage.fromHeader(rawHeaders[\"baggage\"]);\n config.metadata = baggage.metadata;\n config.tags = baggage.tags;\n config.project_name = baggage.project_name;\n config.replicas = baggage.replicas;\n }\n const runTree = new RunTree(config);\n // Set the distributed parent ID to this run's ID for rerooting\n runTree.distributedParentId = runTree.id;\n return runTree;\n }\n toHeaders(headers) {\n const result = {\n \"langsmith-trace\": this.dotted_order,\n baggage: new Baggage(this.extra?.metadata, this.tags, this.project_name, this.replicas).toHeader(),\n };\n if (headers) {\n for (const [key, value] of Object.entries(result)) {\n headers.set(key, value);\n }\n }\n return result;\n }\n}\nObject.defineProperty(RunTree, \"sharedClient\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: null\n});\nexport function isRunTree(x) {\n return (x != null &&\n typeof x.createChild === \"function\" &&\n typeof x.postRun === \"function\");\n}\nfunction isLangChainTracerLike(x) {\n return (typeof x === \"object\" &&\n x != null &&\n typeof x.name === \"string\" &&\n x.name === \"langchain_tracer\");\n}\nfunction containsLangChainTracerLike(x) {\n return (Array.isArray(x) && x.some((callback) => isLangChainTracerLike(callback)));\n}\nfunction isCallbackManagerLike(x) {\n return (typeof x === \"object\" &&\n x != null &&\n Array.isArray(x.handlers));\n}\nexport function isRunnableConfigLike(x) {\n // Check that it's an object with a callbacks arg\n // that has either a CallbackManagerLike object with a langchain tracer within it\n // or an array with a LangChainTracerLike object within it\n const callbacks = x?.callbacks;\n return (x != null &&\n typeof callbacks === \"object\" &&\n // Callback manager with a langchain tracer\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (containsLangChainTracerLike(callbacks?.handlers) ||\n // Or it's an array with a LangChainTracerLike object within it\n containsLangChainTracerLike(callbacks)));\n}\nfunction _getWriteReplicasFromEnv() {\n const envVar = getEnvironmentVariable(\"LANGSMITH_RUNS_ENDPOINTS\");\n if (!envVar)\n return [];\n try {\n const parsed = JSON.parse(envVar);\n if (Array.isArray(parsed)) {\n const replicas = [];\n for (const item of parsed) {\n if (typeof item !== \"object\" || item === null) {\n console.warn(`Invalid item type in LANGSMITH_RUNS_ENDPOINTS: ` +\n `expected object, got ${typeof item}`);\n continue;\n }\n if (typeof item.api_url !== \"string\") {\n console.warn(`Invalid api_url type in LANGSMITH_RUNS_ENDPOINTS: ` +\n `expected string, got ${typeof item.api_url}`);\n continue;\n }\n if (typeof item.api_key !== \"string\") {\n console.warn(`Invalid api_key type in LANGSMITH_RUNS_ENDPOINTS: ` +\n `expected string, got ${typeof item.api_key}`);\n continue;\n }\n replicas.push({\n apiUrl: item.api_url.replace(/\\/$/, \"\"),\n apiKey: item.api_key,\n });\n }\n return replicas;\n }\n else if (typeof parsed === \"object\" && parsed !== null) {\n _checkEndpointEnvUnset(parsed);\n const replicas = [];\n for (const [url, key] of Object.entries(parsed)) {\n const cleanUrl = url.replace(/\\/$/, \"\");\n if (typeof key === \"string\") {\n replicas.push({\n apiUrl: cleanUrl,\n apiKey: key,\n });\n }\n else {\n console.warn(`Invalid value type in LANGSMITH_RUNS_ENDPOINTS for URL ${url}: ` +\n `expected string, got ${typeof key}`);\n continue;\n }\n }\n return replicas;\n }\n else {\n console.warn(\"Invalid LANGSMITH_RUNS_ENDPOINTS – must be valid JSON array of \" +\n `objects with api_url and api_key properties, or object mapping url->apiKey, got ${typeof parsed}`);\n return [];\n }\n }\n catch (e) {\n if (isConflictingEndpointsError(e)) {\n throw e;\n }\n console.warn(\"Invalid LANGSMITH_RUNS_ENDPOINTS – must be valid JSON array of \" +\n \"objects with api_url and api_key properties, or object mapping url->apiKey\");\n return [];\n }\n}\nfunction _ensureWriteReplicas(replicas) {\n // If null -> fetch from env\n if (replicas) {\n return replicas.map((replica) => {\n if (Array.isArray(replica)) {\n return {\n projectName: replica[0],\n updates: replica[1],\n };\n }\n return replica;\n });\n }\n return _getWriteReplicasFromEnv();\n}\nfunction _checkEndpointEnvUnset(parsed) {\n if (Object.keys(parsed).length > 0 &&\n getLangSmithEnvironmentVariable(\"ENDPOINT\")) {\n throw new ConflictingEndpointsError();\n }\n}\n"],"names":["uuidv5","value"],"mappings":";;;;;;;;;;AAaA,MAAM,qBAAqB;AAC3B,SAAS,cAAc,SAAS;AAI5B,QAAM,aAAa,OAAO,KAAK,OAAO,EAAE,KAAI;AAC5C,QAAM,UAAU,WACX,IAAI,CAAC,QAAQ,GAAG,GAAG,IAAI,QAAQ,GAAG,KAAK,EAAE,EAAE,EAC3C,KAAK,GAAG;AACb,SAAOA,GAAO,SAAS,kBAAkB;AAC7C;AACA,SAAS,qBAAqB,OAAO;AACjC,SAAO,MAAM,QAAQ,UAAU,EAAE;AACrC;AAC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AACtG,aAAO,CAAA;AAAA,IACX;AAAA,EACJ,SACO,GAAG;AACN,QAAI,4BAA4B,CAAC,GAAG;AAChC,YAAM;AAAA,IACV;AACA,YAAQ,KAAK,2IACmE;AAChF,WAAO,CAAA;AAAA,EACX;AACJ;AACA,SAAS,qBAAqB,UAAU;AAEpC,MAAI,UAAU;AACV,WAAO,SAAS,IAAI,CAAC,YAAY;AAC7B,UAAI,MAAM,QAAQ,OAAO,GAAG;AACxB,eAAO;AAAA,UACH,aAAa,QAAQ,CAAC;AAAA,UACtB,SAAS,QAAQ,CAAC;AAAA,QACtC;AAAA,MACY;AACA,aAAO;AAAA,IACX,CAAC;AAAA,EACL;AACA,SAAO,yBAAwB;AACnC;AACA,SAAS,uBAAuB,QAAQ;AACpC,MAAI,OAAO,KAAK,MAAM,EAAE,SAAS,KAC7B,gCAAgC,UAAU,GAAG;AAC7C,UAAM,IAAI,0BAAyB;AAAA,EACvC;AACJ;","x_google_ignoreList":[0]}
@@ -1,82 +1,283 @@
1
- function getEnumValues(entries) {
2
- const numericValues = Object.values(entries).filter((v) => typeof v === "number");
3
- const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
4
- return values;
1
+ import { __export } from "./index.es50.js";
2
+ import { _deepClone, PatchError, unescapePathComponent, isInteger, hasUndefined } from "./index.es141.js";
3
+ var core_exports = {};
4
+ __export(core_exports, {
5
+ JsonPatchError: () => JsonPatchError,
6
+ _areEquals: () => _areEquals,
7
+ applyOperation: () => applyOperation,
8
+ applyPatch: () => applyPatch,
9
+ applyReducer: () => applyReducer,
10
+ deepClone: () => deepClone,
11
+ getValueByPointer: () => getValueByPointer,
12
+ validate: () => validate,
13
+ validator: () => validator
14
+ });
15
+ const JsonPatchError = PatchError;
16
+ const deepClone = _deepClone;
17
+ function isDangerousKey(key) {
18
+ return Object.getOwnPropertyNames(Object.prototype).includes(key);
5
19
  }
6
- function jsonStringifyReplacer(_, value) {
7
- if (typeof value === "bigint")
8
- return value.toString();
9
- return value;
20
+ const objOps = {
21
+ add: function(obj, key, document) {
22
+ if (isDangerousKey(key)) throw new TypeError("JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons");
23
+ obj[key] = this.value;
24
+ return { newDocument: document };
25
+ },
26
+ remove: function(obj, key, document) {
27
+ if (isDangerousKey(key)) throw new TypeError("JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons");
28
+ var removed = obj[key];
29
+ delete obj[key];
30
+ return {
31
+ newDocument: document,
32
+ removed
33
+ };
34
+ },
35
+ replace: function(obj, key, document) {
36
+ if (isDangerousKey(key)) throw new TypeError("JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons");
37
+ var removed = obj[key];
38
+ obj[key] = this.value;
39
+ return {
40
+ newDocument: document,
41
+ removed
42
+ };
43
+ },
44
+ move: function(obj, key, document) {
45
+ let removed = getValueByPointer(document, this.path);
46
+ if (removed) removed = _deepClone(removed);
47
+ const originalValue = applyOperation(document, {
48
+ op: "remove",
49
+ path: this.from
50
+ }).removed;
51
+ applyOperation(document, {
52
+ op: "add",
53
+ path: this.path,
54
+ value: originalValue
55
+ });
56
+ return {
57
+ newDocument: document,
58
+ removed
59
+ };
60
+ },
61
+ copy: function(obj, key, document) {
62
+ const valueToCopy = getValueByPointer(document, this.from);
63
+ applyOperation(document, {
64
+ op: "add",
65
+ path: this.path,
66
+ value: _deepClone(valueToCopy)
67
+ });
68
+ return { newDocument: document };
69
+ },
70
+ test: function(obj, key, document) {
71
+ return {
72
+ newDocument: document,
73
+ test: _areEquals(obj[key], this.value)
74
+ };
75
+ },
76
+ _get: function(obj, key, document) {
77
+ this.value = obj[key];
78
+ return { newDocument: document };
79
+ }
80
+ };
81
+ var arrOps = {
82
+ add: function(arr, i, document) {
83
+ if (isInteger(i)) arr.splice(i, 0, this.value);
84
+ else arr[i] = this.value;
85
+ return {
86
+ newDocument: document,
87
+ index: i
88
+ };
89
+ },
90
+ remove: function(arr, i, document) {
91
+ var removedList = arr.splice(i, 1);
92
+ return {
93
+ newDocument: document,
94
+ removed: removedList[0]
95
+ };
96
+ },
97
+ replace: function(arr, i, document) {
98
+ var removed = arr[i];
99
+ arr[i] = this.value;
100
+ return {
101
+ newDocument: document,
102
+ removed
103
+ };
104
+ },
105
+ move: objOps.move,
106
+ copy: objOps.copy,
107
+ test: objOps.test,
108
+ _get: objOps._get
109
+ };
110
+ function getValueByPointer(document, pointer) {
111
+ if (pointer == "") return document;
112
+ var getOriginalDestination = {
113
+ op: "_get",
114
+ path: pointer
115
+ };
116
+ applyOperation(document, getOriginalDestination);
117
+ return getOriginalDestination.value;
10
118
  }
11
- const EVALUATING = /* @__PURE__ */ Symbol("evaluating");
12
- function defineLazy(object, key, getter) {
13
- let value = void 0;
14
- Object.defineProperty(object, key, {
15
- get() {
16
- if (value === EVALUATING) {
17
- return void 0;
119
+ function applyOperation(document, operation, validateOperation = false, mutateDocument = true, banPrototypeModifications = true, index = 0) {
120
+ if (validateOperation) if (typeof validateOperation == "function") validateOperation(operation, 0, document, operation.path);
121
+ else validator(operation, 0);
122
+ if (operation.path === "") {
123
+ let returnValue = { newDocument: document };
124
+ if (operation.op === "add") {
125
+ returnValue.newDocument = operation.value;
126
+ return returnValue;
127
+ } else if (operation.op === "replace") {
128
+ returnValue.newDocument = operation.value;
129
+ returnValue.removed = document;
130
+ return returnValue;
131
+ } else if (operation.op === "move" || operation.op === "copy") {
132
+ returnValue.newDocument = getValueByPointer(document, operation.from);
133
+ if (operation.op === "move") returnValue.removed = document;
134
+ return returnValue;
135
+ } else if (operation.op === "test") {
136
+ returnValue.test = _areEquals(document, operation.value);
137
+ if (returnValue.test === false) throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document);
138
+ returnValue.newDocument = document;
139
+ return returnValue;
140
+ } else if (operation.op === "remove") {
141
+ returnValue.removed = document;
142
+ returnValue.newDocument = null;
143
+ return returnValue;
144
+ } else if (operation.op === "_get") {
145
+ operation.value = document;
146
+ return returnValue;
147
+ } else if (validateOperation) throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index, operation, document);
148
+ else return returnValue;
149
+ } else {
150
+ if (!mutateDocument) document = _deepClone(document);
151
+ const path = operation.path || "";
152
+ const keys = path.split("/");
153
+ let obj = document;
154
+ let t = 1;
155
+ let len = keys.length;
156
+ let existingPathFragment = void 0;
157
+ let key;
158
+ let validateFunction;
159
+ if (typeof validateOperation == "function") validateFunction = validateOperation;
160
+ else validateFunction = validator;
161
+ while (true) {
162
+ key = keys[t];
163
+ if (key && key.indexOf("~") != -1) key = unescapePathComponent(key);
164
+ if (banPrototypeModifications && (key == "__proto__" || key == "prototype" && t > 0 && keys[t - 1] == "constructor")) throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");
165
+ if (validateOperation) {
166
+ if (existingPathFragment === void 0) {
167
+ if (obj[key] === void 0) existingPathFragment = keys.slice(0, t).join("/");
168
+ else if (t == len - 1) existingPathFragment = operation.path;
169
+ if (existingPathFragment !== void 0) validateFunction(operation, 0, document, existingPathFragment);
170
+ }
18
171
  }
19
- if (value === void 0) {
20
- value = EVALUATING;
21
- value = getter();
172
+ t++;
173
+ if (Array.isArray(obj)) {
174
+ if (key === "-") key = obj.length;
175
+ else if (validateOperation && !isInteger(key)) throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index, operation, document);
176
+ else if (isInteger(key)) key = ~~key;
177
+ if (t >= len) {
178
+ if (validateOperation && operation.op === "add" && key > obj.length) throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index, operation, document);
179
+ const returnValue = arrOps[operation.op].call(operation, obj, key, document);
180
+ if (returnValue.test === false) throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document);
181
+ return returnValue;
182
+ }
183
+ } else if (t >= len) {
184
+ const returnValue = objOps[operation.op].call(operation, obj, key, document);
185
+ if (returnValue.test === false) throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document);
186
+ return returnValue;
22
187
  }
23
- return value;
24
- },
25
- set(v) {
26
- Object.defineProperty(object, key, {
27
- value: v
28
- // configurable: true,
29
- });
30
- },
31
- configurable: true
32
- });
188
+ obj = obj[key];
189
+ if (validateOperation && t < len && (!obj || typeof obj !== "object")) throw new JsonPatchError("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", index, operation, document);
190
+ }
191
+ }
33
192
  }
34
- const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
35
- };
36
- function clone(inst, def, params) {
37
- const cl = new inst._zod.constr(def ?? inst._zod.def);
38
- if (!def || params?.parent)
39
- cl._zod.parent = inst;
40
- return cl;
193
+ function applyPatch(document, patch, validateOperation, mutateDocument = true, banPrototypeModifications = true) {
194
+ if (validateOperation) {
195
+ if (!Array.isArray(patch)) throw new JsonPatchError("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
196
+ }
197
+ if (!mutateDocument) document = _deepClone(document);
198
+ const results = new Array(patch.length);
199
+ for (let i = 0, length = patch.length; i < length; i++) {
200
+ results[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i);
201
+ document = results[i].newDocument;
202
+ }
203
+ results.newDocument = document;
204
+ return results;
41
205
  }
42
- function normalizeParams(_params) {
43
- return {};
206
+ function applyReducer(document, operation, index) {
207
+ const operationResult = applyOperation(document, operation);
208
+ if (operationResult.test === false) throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document);
209
+ return operationResult.newDocument;
44
210
  }
45
- function aborted(x, startIndex = 0) {
46
- if (x.aborted === true)
47
- return true;
48
- for (let i = startIndex; i < x.issues.length; i++) {
49
- if (x.issues[i]?.continue !== true) {
50
- return true;
211
+ function validator(operation, index, document, existingPathFragment) {
212
+ if (typeof operation !== "object" || operation === null || Array.isArray(operation)) throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT", index, operation, document);
213
+ else if (!objOps[operation.op]) throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index, operation, document);
214
+ else if (typeof operation.path !== "string") throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID", index, operation, document);
215
+ else if (operation.path.indexOf("/") !== 0 && operation.path.length > 0) throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", index, operation, document);
216
+ else if ((operation.op === "move" || operation.op === "copy") && typeof operation.from !== "string") throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", index, operation, document);
217
+ else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && operation.value === void 0) throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", index, operation, document);
218
+ else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && hasUndefined(operation.value)) throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", index, operation, document);
219
+ else if (document) {
220
+ if (operation.op == "add") {
221
+ var pathLen = operation.path.split("/").length;
222
+ var existingPathLen = existingPathFragment.split("/").length;
223
+ if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", index, operation, document);
224
+ } else if (operation.op === "replace" || operation.op === "remove" || operation.op === "_get") {
225
+ if (operation.path !== existingPathFragment) throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", index, operation, document);
226
+ } else if (operation.op === "move" || operation.op === "copy") {
227
+ var existingValue = {
228
+ op: "_get",
229
+ path: operation.from,
230
+ value: void 0
231
+ };
232
+ var error = validate([existingValue], document);
233
+ if (error && error.name === "OPERATION_PATH_UNRESOLVABLE") throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", index, operation, document);
51
234
  }
52
235
  }
53
- return false;
54
- }
55
- function unwrapMessage(message) {
56
- return typeof message === "string" ? message : message?.message;
57
236
  }
58
- function finalizeIssue(iss, ctx, config) {
59
- const full = { ...iss, path: iss.path ?? [] };
60
- if (!iss.message) {
61
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
62
- full.message = message;
237
+ function validate(sequence, document, externalValidator) {
238
+ try {
239
+ if (!Array.isArray(sequence)) throw new JsonPatchError("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
240
+ if (document) applyPatch(_deepClone(document), _deepClone(sequence), externalValidator || true);
241
+ else {
242
+ externalValidator = externalValidator || validator;
243
+ for (var i = 0; i < sequence.length; i++) externalValidator(sequence[i], i, document, void 0);
244
+ }
245
+ } catch (e) {
246
+ if (e instanceof JsonPatchError) return e;
247
+ else throw e;
63
248
  }
64
- delete full.inst;
65
- delete full.continue;
66
- if (!ctx?.reportInput) {
67
- delete full.input;
249
+ }
250
+ function _areEquals(a, b) {
251
+ if (a === b) return true;
252
+ if (a && b && typeof a == "object" && typeof b == "object") {
253
+ var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;
254
+ if (arrA && arrB) {
255
+ length = a.length;
256
+ if (length != b.length) return false;
257
+ for (i = length; i-- !== 0; ) if (!_areEquals(a[i], b[i])) return false;
258
+ return true;
259
+ }
260
+ if (arrA != arrB) return false;
261
+ var keys = Object.keys(a);
262
+ length = keys.length;
263
+ if (length !== Object.keys(b).length) return false;
264
+ for (i = length; i-- !== 0; ) if (!b.hasOwnProperty(keys[i])) return false;
265
+ for (i = length; i-- !== 0; ) {
266
+ key = keys[i];
267
+ if (!_areEquals(a[key], b[key])) return false;
268
+ }
269
+ return true;
68
270
  }
69
- return full;
271
+ return a !== a && b !== b;
70
272
  }
71
273
  export {
72
- aborted,
73
- captureStackTrace,
74
- clone,
75
- defineLazy,
76
- finalizeIssue,
77
- getEnumValues,
78
- jsonStringifyReplacer,
79
- normalizeParams,
80
- unwrapMessage
274
+ _areEquals,
275
+ applyOperation,
276
+ applyPatch,
277
+ applyReducer,
278
+ core_exports,
279
+ getValueByPointer,
280
+ validate,
281
+ validator
81
282
  };
82
283
  //# sourceMappingURL=index.es116.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es116.js","sources":["../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js"],"sourcesContent":["// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n"],"names":[],"mappings":"AAYO,SAAS,cAAc,SAAS;AACnC,QAAM,gBAAgB,OAAO,OAAO,OAAO,EAAE,OAAO,CAAC,MAAM,OAAO,MAAM,QAAQ;AAChF,QAAM,SAAS,OAAO,QAAQ,OAAO,EAChC,OAAO,CAAC,CAAC,GAAG,CAAC,MAAM,cAAc,QAAQ,CAAC,CAAC,MAAM,EAAE,EACnD,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;AACtB,SAAO;AACX;AAIO,SAAS,sBAAsB,GAAG,OAAO;AAC5C,MAAI,OAAO,UAAU;AACjB,WAAO,MAAM,SAAQ;AACzB,SAAO;AACX;AAqCA,MAAM,aAAa,uBAAO,YAAY;AAC/B,SAAS,WAAW,QAAQ,KAAK,QAAQ;AAC5C,MAAI,QAAQ;AACZ,SAAO,eAAe,QAAQ,KAAK;AAAA,IAC/B,MAAM;AACF,UAAI,UAAU,YAAY;AAEtB,eAAO;AAAA,MACX;AACA,UAAI,UAAU,QAAW;AACrB,gBAAQ;AACR,gBAAQ,OAAM;AAAA,MAClB;AACA,aAAO;AAAA,IACX;AAAA,I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index.es116.js","sources":["../node_modules/.pnpm/@langchain+core@1.1.13_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.js"],"sourcesContent":["import { __export } from \"../../../_virtual/rolldown_runtime.js\";\nimport { PatchError, _deepClone, hasUndefined, isInteger, unescapePathComponent } from \"./helpers.js\";\n\n//#region src/utils/fast-json-patch/src/core.ts\nvar core_exports = {};\n__export(core_exports, {\n\tJsonPatchError: () => JsonPatchError,\n\t_areEquals: () => _areEquals,\n\tapplyOperation: () => applyOperation,\n\tapplyPatch: () => applyPatch,\n\tapplyReducer: () => applyReducer,\n\tdeepClone: () => deepClone,\n\tgetValueByPointer: () => getValueByPointer,\n\tvalidate: () => validate,\n\tvalidator: () => validator\n});\nconst JsonPatchError = PatchError;\nconst deepClone = _deepClone;\n/**\n* Check if a key is a dangerous prototype property that could lead to prototype pollution.\n* This provides defense-in-depth alongside the check in applyOperation.\n*/\nfunction isDangerousKey(key) {\n\treturn Object.getOwnPropertyNames(Object.prototype).includes(key);\n}\nconst objOps = {\n\tadd: function(obj, key, document) {\n\t\tif (isDangerousKey(key)) throw new TypeError(\"JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons\");\n\t\tobj[key] = this.value;\n\t\treturn { newDocument: document };\n\t},\n\tremove: function(obj, key, document) {\n\t\tif (isDangerousKey(key)) throw new TypeError(\"JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons\");\n\t\tvar removed = obj[key];\n\t\tdelete obj[key];\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\tremoved\n\t\t};\n\t},\n\treplace: function(obj, key, document) {\n\t\tif (isDangerousKey(key)) throw new TypeError(\"JSON-Patch: modifying `__proto__`, `constructor`, or `prototype` prop is banned for security reasons\");\n\t\tvar removed = obj[key];\n\t\tobj[key] = this.value;\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\tremoved\n\t\t};\n\t},\n\tmove: function(obj, key, document) {\n\t\tlet removed = getValueByPointer(document, this.path);\n\t\tif (removed) removed = _deepClone(removed);\n\t\tconst originalValue = applyOperation(document, {\n\t\t\top: \"remove\",\n\t\t\tpath: this.from\n\t\t}).removed;\n\t\tapplyOperation(document, {\n\t\t\top: \"add\",\n\t\t\tpath: this.path,\n\t\t\tvalue: originalValue\n\t\t});\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\tremoved\n\t\t};\n\t},\n\tcopy: function(obj, key, document) {\n\t\tconst valueToCopy = getValueByPointer(document, this.from);\n\t\tapplyOperation(document, {\n\t\t\top: \"add\",\n\t\t\tpath: this.path,\n\t\t\tvalue: _deepClone(valueToCopy)\n\t\t});\n\t\treturn { newDocument: document };\n\t},\n\ttest: function(obj, key, document) {\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\ttest: _areEquals(obj[key], this.value)\n\t\t};\n\t},\n\t_get: function(obj, key, document) {\n\t\tthis.value = obj[key];\n\t\treturn { newDocument: document };\n\t}\n};\nvar arrOps = {\n\tadd: function(arr, i, document) {\n\t\tif (isInteger(i)) arr.splice(i, 0, this.value);\n\t\telse arr[i] = this.value;\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\tindex: i\n\t\t};\n\t},\n\tremove: function(arr, i, document) {\n\t\tvar removedList = arr.splice(i, 1);\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\tremoved: removedList[0]\n\t\t};\n\t},\n\treplace: function(arr, i, document) {\n\t\tvar removed = arr[i];\n\t\tarr[i] = this.value;\n\t\treturn {\n\t\t\tnewDocument: document,\n\t\t\tremoved\n\t\t};\n\t},\n\tmove: objOps.move,\n\tcopy: objOps.copy,\n\ttest: objOps.test,\n\t_get: objOps._get\n};\n/**\n* Retrieves a value from a JSON document by a JSON pointer.\n* Returns the value.\n*\n* @param document The document to get the value from\n* @param pointer an escaped JSON pointer\n* @return The retrieved value\n*/\nfunction getValueByPointer(document, pointer) {\n\tif (pointer == \"\") return document;\n\tvar getOriginalDestination = {\n\t\top: \"_get\",\n\t\tpath: pointer\n\t};\n\tapplyOperation(document, getOriginalDestination);\n\treturn getOriginalDestination.value;\n}\n/**\n* Apply a single JSON Patch Operation on a JSON document.\n* Returns the {newDocument, result} of the operation.\n* It modifies the `document` and `operation` objects - it gets the values by reference.\n* If you would like to avoid touching your values, clone them:\n* `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.\n*\n* @param document The document to patch\n* @param operation The operation to apply\n* @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n* @param mutateDocument Whether to mutate the original document or clone it before applying\n* @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n* @return `{newDocument, result}` after the operation\n*/\nfunction applyOperation(document, operation, validateOperation = false, mutateDocument = true, banPrototypeModifications = true, index = 0) {\n\tif (validateOperation) if (typeof validateOperation == \"function\") validateOperation(operation, 0, document, operation.path);\n\telse validator(operation, 0);\n\tif (operation.path === \"\") {\n\t\tlet returnValue = { newDocument: document };\n\t\tif (operation.op === \"add\") {\n\t\t\treturnValue.newDocument = operation.value;\n\t\t\treturn returnValue;\n\t\t} else if (operation.op === \"replace\") {\n\t\t\treturnValue.newDocument = operation.value;\n\t\t\treturnValue.removed = document;\n\t\t\treturn returnValue;\n\t\t} else if (operation.op === \"move\" || operation.op === \"copy\") {\n\t\t\treturnValue.newDocument = getValueByPointer(document, operation.from);\n\t\t\tif (operation.op === \"move\") returnValue.removed = document;\n\t\t\treturn returnValue;\n\t\t} else if (operation.op === \"test\") {\n\t\t\treturnValue.test = _areEquals(document, operation.value);\n\t\t\tif (returnValue.test === false) throw new JsonPatchError(\"Test operation failed\", \"TEST_OPERATION_FAILED\", index, operation, document);\n\t\t\treturnValue.newDocument = document;\n\t\t\treturn returnValue;\n\t\t} else if (operation.op === \"remove\") {\n\t\t\treturnValue.removed = document;\n\t\t\treturnValue.newDocument = null;\n\t\t\treturn returnValue;\n\t\t} else if (operation.op === \"_get\") {\n\t\t\toperation.value = document;\n\t\t\treturn returnValue;\n\t\t} else if (validateOperation) throw new JsonPatchError(\"Operation `op` property is not one of operations defined in RFC-6902\", \"OPERATION_OP_INVALID\", index, operation, document);\n\t\telse return returnValue;\n\t} else {\n\t\tif (!mutateDocument) document = _deepClone(document);\n\t\tconst path = operation.path || \"\";\n\t\tconst keys = path.split(\"/\");\n\t\tlet obj = document;\n\t\tlet t = 1;\n\t\tlet len = keys.length;\n\t\tlet existingPathFragment = void 0;\n\t\tlet key;\n\t\tlet validateFunction;\n\t\tif (typeof validateOperation == \"function\") validateFunction = validateOperation;\n\t\telse validateFunction = validator;\n\t\twhile (true) {\n\t\t\tkey = keys[t];\n\t\t\tif (key && key.indexOf(\"~\") != -1) key = unescapePathComponent(key);\n\t\t\tif (banPrototypeModifications && (key == \"__proto__\" || key == \"prototype\" && t > 0 && keys[t - 1] == \"constructor\")) throw new TypeError(\"JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README\");\n\t\t\tif (validateOperation) {\n\t\t\t\tif (existingPathFragment === void 0) {\n\t\t\t\t\tif (obj[key] === void 0) existingPathFragment = keys.slice(0, t).join(\"/\");\n\t\t\t\t\telse if (t == len - 1) existingPathFragment = operation.path;\n\t\t\t\t\tif (existingPathFragment !== void 0) validateFunction(operation, 0, document, existingPathFragment);\n\t\t\t\t}\n\t\t\t}\n\t\t\tt++;\n\t\t\tif (Array.isArray(obj)) {\n\t\t\t\tif (key === \"-\") key = obj.length;\n\t\t\t\telse if (validateOperation && !isInteger(key)) throw new JsonPatchError(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\", \"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\", index, operation, document);\n\t\t\t\telse if (isInteger(key)) key = ~~key;\n\t\t\t\tif (t >= len) {\n\t\t\t\t\tif (validateOperation && operation.op === \"add\" && key > obj.length) throw new JsonPatchError(\"The specified index MUST NOT be greater than the number of elements in the array\", \"OPERATION_VALUE_OUT_OF_BOUNDS\", index, operation, document);\n\t\t\t\t\tconst returnValue = arrOps[operation.op].call(operation, obj, key, document);\n\t\t\t\t\tif (returnValue.test === false) throw new JsonPatchError(\"Test operation failed\", \"TEST_OPERATION_FAILED\", index, operation, document);\n\t\t\t\t\treturn returnValue;\n\t\t\t\t}\n\t\t\t} else if (t >= len) {\n\t\t\t\tconst returnValue = objOps[operation.op].call(operation, obj, key, document);\n\t\t\t\tif (returnValue.test === false) throw new JsonPatchError(\"Test operation failed\", \"TEST_OPERATION_FAILED\", index, operation, document);\n\t\t\t\treturn returnValue;\n\t\t\t}\n\t\t\tobj = obj[key];\n\t\t\tif (validateOperation && t < len && (!obj || typeof obj !== \"object\")) throw new JsonPatchError(\"Cannot perform operation at the desired path\", \"OPERATION_PATH_UNRESOLVABLE\", index, operation, document);\n\t\t}\n\t}\n}\n/**\n* Apply a full JSON Patch array on a JSON document.\n* Returns the {newDocument, result} of the patch.\n* It modifies the `document` object and `patch` - it gets the values by reference.\n* If you would like to avoid touching your values, clone them:\n* `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.\n*\n* @param document The document to patch\n* @param patch The patch to apply\n* @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n* @param mutateDocument Whether to mutate the original document or clone it before applying\n* @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n* @return An array of `{newDocument, result}` after the patch\n*/\nfunction applyPatch(document, patch, validateOperation, mutateDocument = true, banPrototypeModifications = true) {\n\tif (validateOperation) {\n\t\tif (!Array.isArray(patch)) throw new JsonPatchError(\"Patch sequence must be an array\", \"SEQUENCE_NOT_AN_ARRAY\");\n\t}\n\tif (!mutateDocument) document = _deepClone(document);\n\tconst results = new Array(patch.length);\n\tfor (let i = 0, length = patch.length; i < length; i++) {\n\t\tresults[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i);\n\t\tdocument = results[i].newDocument;\n\t}\n\tresults.newDocument = document;\n\treturn results;\n}\n/**\n* Apply a single JSON Patch Operation on a JSON document.\n* Returns the updated document.\n* Suitable as a reducer.\n*\n* @param document The document to patch\n* @param operation The operation to apply\n* @return The updated document\n*/\nfunction applyReducer(document, operation, index) {\n\tconst operationResult = applyOperation(document, operation);\n\tif (operationResult.test === false) throw new JsonPatchError(\"Test operation failed\", \"TEST_OPERATION_FAILED\", index, operation, document);\n\treturn operationResult.newDocument;\n}\n/**\n* Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n* @param {object} operation - operation object (patch)\n* @param {number} index - index of operation in the sequence\n* @param {object} [document] - object where the operation is supposed to be applied\n* @param {string} [existingPathFragment] - comes along with `document`\n*/\nfunction validator(operation, index, document, existingPathFragment) {\n\tif (typeof operation !== \"object\" || operation === null || Array.isArray(operation)) throw new JsonPatchError(\"Operation is not an object\", \"OPERATION_NOT_AN_OBJECT\", index, operation, document);\n\telse if (!objOps[operation.op]) throw new JsonPatchError(\"Operation `op` property is not one of operations defined in RFC-6902\", \"OPERATION_OP_INVALID\", index, operation, document);\n\telse if (typeof operation.path !== \"string\") throw new JsonPatchError(\"Operation `path` property is not a string\", \"OPERATION_PATH_INVALID\", index, operation, document);\n\telse if (operation.path.indexOf(\"/\") !== 0 && operation.path.length > 0) throw new JsonPatchError(\"Operation `path` property must start with \\\"/\\\"\", \"OPERATION_PATH_INVALID\", index, operation, document);\n\telse if ((operation.op === \"move\" || operation.op === \"copy\") && typeof operation.from !== \"string\") throw new JsonPatchError(\"Operation `from` property is not present (applicable in `move` and `copy` operations)\", \"OPERATION_FROM_REQUIRED\", index, operation, document);\n\telse if ((operation.op === \"add\" || operation.op === \"replace\" || operation.op === \"test\") && operation.value === void 0) throw new JsonPatchError(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\", \"OPERATION_VALUE_REQUIRED\", index, operation, document);\n\telse if ((operation.op === \"add\" || operation.op === \"replace\" || operation.op === \"test\") && hasUndefined(operation.value)) throw new JsonPatchError(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\", \"OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED\", index, operation, document);\n\telse if (document) {\n\t\tif (operation.op == \"add\") {\n\t\t\tvar pathLen = operation.path.split(\"/\").length;\n\t\t\tvar existingPathLen = existingPathFragment.split(\"/\").length;\n\t\t\tif (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) throw new JsonPatchError(\"Cannot perform an `add` operation at the desired path\", \"OPERATION_PATH_CANNOT_ADD\", index, operation, document);\n\t\t} else if (operation.op === \"replace\" || operation.op === \"remove\" || operation.op === \"_get\") {\n\t\t\tif (operation.path !== existingPathFragment) throw new JsonPatchError(\"Cannot perform the operation at a path that does not exist\", \"OPERATION_PATH_UNRESOLVABLE\", index, operation, document);\n\t\t} else if (operation.op === \"move\" || operation.op === \"copy\") {\n\t\t\tvar existingValue = {\n\t\t\t\top: \"_get\",\n\t\t\t\tpath: operation.from,\n\t\t\t\tvalue: void 0\n\t\t\t};\n\t\t\tvar error = validate([existingValue], document);\n\t\t\tif (error && error.name === \"OPERATION_PATH_UNRESOLVABLE\") throw new JsonPatchError(\"Cannot perform the operation from a path that does not exist\", \"OPERATION_FROM_UNRESOLVABLE\", index, operation, document);\n\t\t}\n\t}\n}\n/**\n* Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.\n* If error is encountered, returns a JsonPatchError object\n* @param sequence\n* @param document\n* @returns {JsonPatchError|undefined}\n*/\nfunction validate(sequence, document, externalValidator) {\n\ttry {\n\t\tif (!Array.isArray(sequence)) throw new JsonPatchError(\"Patch sequence must be an array\", \"SEQUENCE_NOT_AN_ARRAY\");\n\t\tif (document) applyPatch(_deepClone(document), _deepClone(sequence), externalValidator || true);\n\t\telse {\n\t\t\texternalValidator = externalValidator || validator;\n\t\t\tfor (var i = 0; i < sequence.length; i++) externalValidator(sequence[i], i, document, void 0);\n\t\t}\n\t} catch (e) {\n\t\tif (e instanceof JsonPatchError) return e;\n\t\telse throw e;\n\t}\n}\nfunction _areEquals(a, b) {\n\tif (a === b) return true;\n\tif (a && b && typeof a == \"object\" && typeof b == \"object\") {\n\t\tvar arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n\t\tif (arrA && arrB) {\n\t\t\tlength = a.length;\n\t\t\tif (length != b.length) return false;\n\t\t\tfor (i = length; i-- !== 0;) if (!_areEquals(a[i], b[i])) return false;\n\t\t\treturn true;\n\t\t}\n\t\tif (arrA != arrB) return false;\n\t\tvar keys = Object.keys(a);\n\t\tlength = keys.length;\n\t\tif (length !== Object.keys(b).length) return false;\n\t\tfor (i = length; i-- !== 0;) if (!b.hasOwnProperty(keys[i])) return false;\n\t\tfor (i = length; i-- !== 0;) {\n\t\t\tkey = keys[i];\n\t\t\tif (!_areEquals(a[key], b[key])) return false;\n\t\t}\n\t\treturn true;\n\t}\n\treturn a !== a && b !== b;\n}\n\n//#endregion\nexport { _areEquals, applyOperation, applyPatch, applyReducer, core_exports, getValueByPointer, validate, validator };\n//# sourceMappingURL=core.js.map"],"names":[],"mappings":";;AAIG,IAAC,eAAe,CAAA;AACnB,SAAS,cAAc;AAAA,EACtB,gBAAgB,MAAM;AAAA,EACtB,YAAY,MAAM;AAAA,EAClB,gBAAgB,MAAM;AAAA,EACtB,YAAY,MAAM;AAAA,EAClB,cAAc,MAAM;AAAA,EACpB,WAAW,MAAM;AAAA,EACjB,mBAAmB,MAAM;AAAA,EACzB,UAAU,MAAM;AAAA,EAChB,WAAW,MAAM;AAClB,CAAC;AACD,MAAM,iBAAiB;AACvB,MAAM,YAAY;AAKlB,SAAS,eAAe,KAAK;AAC5B,SAAO,OAAO,oBAAoB,OAAO,SAAS,EAAE,SAAS,GAAG;AACjE;AACA,MAAM,SAAS;AAAA,EACd,KAAK,SAAS,KAAK,KAAK,UAAU;AACjC,QAAI,eAAe,GAAG,EAAG,OAAM,IAAI,UAAU,sGAAsG;AACnJ,QAAI,GAAG,IAAI,KAAK;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