langgraph-ui-components 0.0.4 → 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.
- package/dist/index.es10.js +31 -16
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es100.js +36 -3156
- package/dist/index.es100.js.map +1 -1
- package/dist/index.es101.js +162 -33
- package/dist/index.es101.js.map +1 -1
- package/dist/index.es102.js +203 -5
- package/dist/index.es102.js.map +1 -1
- package/dist/index.es103.js +13 -72
- package/dist/index.es103.js.map +1 -1
- package/dist/index.es104.js +27 -34
- package/dist/index.es104.js.map +1 -1
- package/dist/index.es105.js +34 -5
- package/dist/index.es105.js.map +1 -1
- package/dist/index.es106.js +3159 -2
- package/dist/index.es106.js.map +1 -1
- package/dist/index.es107.js +5 -11
- package/dist/index.es107.js.map +1 -1
- package/dist/index.es108.js +2 -503
- package/dist/index.es108.js.map +1 -1
- package/dist/index.es109.js +16 -5
- package/dist/index.es109.js.map +1 -1
- package/dist/index.es11.js +146 -120
- package/dist/index.es11.js.map +1 -1
- package/dist/index.es110.js +13 -2
- package/dist/index.es110.js.map +1 -1
- package/dist/index.es111.js +484 -129
- package/dist/index.es111.js.map +1 -1
- package/dist/index.es112.js +5 -906
- package/dist/index.es112.js.map +1 -1
- package/dist/index.es113.js +2 -282
- package/dist/index.es113.js.map +1 -1
- package/dist/index.es114.js +148 -4
- package/dist/index.es114.js.map +1 -1
- package/dist/index.es115.js +869 -407
- package/dist/index.es115.js.map +1 -1
- package/dist/index.es116.js +274 -40
- package/dist/index.es116.js.map +1 -1
- package/dist/index.es117.js +4 -24
- package/dist/index.es117.js.map +1 -1
- package/dist/index.es118.js +437 -72
- package/dist/index.es118.js.map +1 -1
- package/dist/index.es119.js +42 -125
- package/dist/index.es119.js.map +1 -1
- package/dist/index.es12.js +13 -103
- package/dist/index.es12.js.map +1 -1
- package/dist/index.es120.js +21 -48
- package/dist/index.es120.js.map +1 -1
- package/dist/index.es121.js +77 -8
- package/dist/index.es121.js.map +1 -1
- package/dist/index.es122.js +127 -43
- package/dist/index.es122.js.map +1 -1
- package/dist/index.es123.js +41 -91
- package/dist/index.es123.js.map +1 -1
- package/dist/index.es124.js +9 -52
- package/dist/index.es124.js.map +1 -1
- package/dist/index.es125.js +44 -15
- package/dist/index.es125.js.map +1 -1
- package/dist/index.es126.js +97 -13
- package/dist/index.es126.js.map +1 -1
- package/dist/index.es127.js +52 -88
- package/dist/index.es127.js.map +1 -1
- package/dist/index.es128.js +15 -2
- package/dist/index.es128.js.map +1 -1
- package/dist/index.es129.js +87 -54
- package/dist/index.es129.js.map +1 -1
- package/dist/index.es13.js +126 -32
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es130.js +2 -100
- package/dist/index.es130.js.map +1 -1
- package/dist/index.es131.js +163 -190
- package/dist/index.es131.js.map +1 -1
- package/dist/index.es132.js +2 -110
- package/dist/index.es132.js.map +1 -1
- package/dist/index.es133.js +53 -32
- package/dist/index.es133.js.map +1 -1
- package/dist/index.es134.js +99 -9
- package/dist/index.es134.js.map +1 -1
- package/dist/index.es135.js +190 -10
- package/dist/index.es135.js.map +1 -1
- package/dist/index.es136.js +108 -10
- package/dist/index.es136.js.map +1 -1
- package/dist/index.es137.js +30 -86
- package/dist/index.es137.js.map +1 -1
- package/dist/index.es138.js +10 -275
- package/dist/index.es138.js.map +1 -1
- package/dist/index.es139.js +11 -2
- package/dist/index.es139.js.map +1 -1
- package/dist/index.es140.js +11 -163
- package/dist/index.es140.js.map +1 -1
- package/dist/index.es141.js +87 -47
- package/dist/index.es141.js.map +1 -1
- package/dist/index.es142.js +266 -31
- package/dist/index.es142.js.map +1 -1
- package/dist/index.es143.js +2 -35
- package/dist/index.es143.js.map +1 -1
- package/dist/index.es144.js +155 -31
- package/dist/index.es144.js.map +1 -1
- package/dist/index.es145.js +48 -21
- package/dist/index.es145.js.map +1 -1
- package/dist/index.es146.js +33 -584
- package/dist/index.es146.js.map +1 -1
- package/dist/index.es147.js +34 -124
- package/dist/index.es147.js.map +1 -1
- package/dist/index.es148.js +31 -155
- package/dist/index.es148.js.map +1 -1
- package/dist/index.es149.js +24 -2
- package/dist/index.es149.js.map +1 -1
- package/dist/index.es15.js +15 -15
- package/dist/index.es150.js +591 -2
- package/dist/index.es150.js.map +1 -1
- package/dist/index.es151.js +125 -2
- package/dist/index.es151.js.map +1 -1
- package/dist/index.es152.js +3 -21
- package/dist/index.es152.js.map +1 -1
- package/dist/index.es153.js +2 -2
- package/dist/index.es154.js +2 -25
- package/dist/index.es154.js.map +1 -1
- package/dist/index.es155.js +22 -8
- package/dist/index.es155.js.map +1 -1
- package/dist/index.es156.js +2 -5
- package/dist/index.es156.js.map +1 -1
- package/dist/index.es157.js +24 -12
- package/dist/index.es157.js.map +1 -1
- package/dist/index.es158.js +5 -6
- package/dist/index.es158.js.map +1 -1
- package/dist/index.es159.js +12 -63
- package/dist/index.es159.js.map +1 -1
- package/dist/index.es160.js +5 -21
- package/dist/index.es160.js.map +1 -1
- package/dist/index.es161.js +8 -6
- package/dist/index.es161.js.map +1 -1
- package/dist/index.es162.js +22 -346
- package/dist/index.es162.js.map +1 -1
- package/dist/index.es163.js +12 -25
- package/dist/index.es163.js.map +1 -1
- package/dist/index.es164.js +53 -11
- package/dist/index.es164.js.map +1 -1
- package/dist/index.es165.js +59 -49
- package/dist/index.es165.js.map +1 -1
- package/dist/index.es166.js +22 -7
- package/dist/index.es166.js.map +1 -1
- package/dist/index.es167.js +5 -102
- package/dist/index.es167.js.map +1 -1
- package/dist/index.es168.js +339 -109
- package/dist/index.es168.js.map +1 -1
- package/dist/index.es169.js +7 -136
- package/dist/index.es169.js.map +1 -1
- package/dist/index.es17.js +2 -2
- package/dist/index.es170.js +97 -109
- package/dist/index.es170.js.map +1 -1
- package/dist/index.es171.js +119 -6
- package/dist/index.es171.js.map +1 -1
- package/dist/index.es172.js +136 -4
- package/dist/index.es172.js.map +1 -1
- package/dist/index.es173.js +115 -2
- package/dist/index.es173.js.map +1 -1
- package/dist/index.es174.js +6 -3737
- package/dist/index.es174.js.map +1 -1
- package/dist/index.es175.js +2 -342
- package/dist/index.es175.js.map +1 -1
- package/dist/index.es176.js +138 -105
- package/dist/index.es176.js.map +1 -1
- package/dist/index.es177.js +2 -133
- package/dist/index.es177.js.map +1 -1
- package/dist/index.es178.js +3734 -12
- package/dist/index.es178.js.map +1 -1
- package/dist/index.es179.js +326 -136
- package/dist/index.es179.js.map +1 -1
- package/dist/index.es180.js +107 -13
- package/dist/index.es180.js.map +1 -1
- package/dist/index.es181.js +131 -6
- package/dist/index.es181.js.map +1 -1
- package/dist/index.es182.js +13 -19
- package/dist/index.es182.js.map +1 -1
- package/dist/index.es183.js +139 -77
- package/dist/index.es183.js.map +1 -1
- package/dist/index.es184.js +13 -241
- package/dist/index.es184.js.map +1 -1
- package/dist/index.es185.js +8 -24
- package/dist/index.es185.js.map +1 -1
- package/dist/index.es186.js +21 -6
- package/dist/index.es186.js.map +1 -1
- package/dist/index.es187.js +90 -4
- package/dist/index.es187.js.map +1 -1
- package/dist/index.es188.js +240 -15
- package/dist/index.es188.js.map +1 -1
- package/dist/index.es189.js +24 -8
- package/dist/index.es189.js.map +1 -1
- package/dist/index.es190.js +6 -142
- package/dist/index.es190.js.map +1 -1
- package/dist/index.es191.js +4 -2
- package/dist/index.es191.js.map +1 -1
- package/dist/index.es192.js +18 -32
- package/dist/index.es192.js.map +1 -1
- package/dist/index.es193.js +8 -6
- package/dist/index.es193.js.map +1 -1
- package/dist/index.es194.js +31 -105
- package/dist/index.es194.js.map +1 -1
- package/dist/index.es195.js +6 -13
- package/dist/index.es195.js.map +1 -1
- package/dist/index.es196.js +105 -17
- package/dist/index.es196.js.map +1 -1
- package/dist/index.es197.js +11 -29
- package/dist/index.es197.js.map +1 -1
- package/dist/index.es198.js +17 -3
- package/dist/index.es198.js.map +1 -1
- package/dist/index.es199.js +30 -4
- package/dist/index.es199.js.map +1 -1
- package/dist/index.es2.js +24 -15
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es20.js +35 -66
- package/dist/index.es20.js.map +1 -1
- package/dist/index.es200.js +4 -5
- package/dist/index.es200.js.map +1 -1
- package/dist/index.es201.js +4 -36
- package/dist/index.es201.js.map +1 -1
- package/dist/index.es202.js +5 -8
- package/dist/index.es202.js.map +1 -1
- package/dist/index.es203.js +36 -5
- package/dist/index.es203.js.map +1 -1
- package/dist/index.es204.js +5 -4
- package/dist/index.es204.js.map +1 -1
- package/dist/index.es205.js +5 -41
- package/dist/index.es205.js.map +1 -1
- package/dist/index.es206.js +4 -10
- package/dist/index.es206.js.map +1 -1
- package/dist/index.es207.js +39 -239
- package/dist/index.es207.js.map +1 -1
- package/dist/index.es208.js +10 -48
- package/dist/index.es208.js.map +1 -1
- package/dist/index.es209.js +239 -32
- package/dist/index.es209.js.map +1 -1
- package/dist/index.es21.js +25 -34
- package/dist/index.es21.js.map +1 -1
- package/dist/index.es210.js +49 -11
- package/dist/index.es210.js.map +1 -1
- package/dist/index.es211.js +33 -6
- package/dist/index.es211.js.map +1 -1
- package/dist/index.es212.js +12 -6
- package/dist/index.es212.js.map +1 -1
- package/dist/index.es213.js +7 -64
- package/dist/index.es213.js.map +1 -1
- package/dist/index.es214.js +6 -40
- package/dist/index.es214.js.map +1 -1
- package/dist/index.es215.js +63 -30
- package/dist/index.es215.js.map +1 -1
- package/dist/index.es216.js +35 -56
- package/dist/index.es216.js.map +1 -1
- package/dist/index.es217.js +32 -15
- package/dist/index.es217.js.map +1 -1
- package/dist/index.es218.js +60 -21
- package/dist/index.es218.js.map +1 -1
- package/dist/index.es219.js +15 -5
- package/dist/index.es219.js.map +1 -1
- package/dist/index.es22.js +146 -27
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es220.js +21 -15
- package/dist/index.es220.js.map +1 -1
- package/dist/index.es221.js +4 -32
- package/dist/index.es221.js.map +1 -1
- package/dist/index.es222.js +16 -4
- package/dist/index.es222.js.map +1 -1
- package/dist/index.es223.js +32 -4
- package/dist/index.es223.js.map +1 -1
- package/dist/index.es224.js +5 -5
- package/dist/index.es224.js.map +1 -1
- package/dist/index.es225.js +4 -7
- package/dist/index.es225.js.map +1 -1
- package/dist/index.es226.js +4 -91
- package/dist/index.es226.js.map +1 -1
- package/dist/index.es227.js +7 -17
- package/dist/index.es227.js.map +1 -1
- package/dist/index.es228.js +90 -760
- package/dist/index.es228.js.map +1 -1
- package/dist/index.es229.js +18 -66
- package/dist/index.es229.js.map +1 -1
- package/dist/index.es23.js +16 -146
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es230.js +749 -161
- package/dist/index.es230.js.map +1 -1
- package/dist/index.es231.js +66 -38
- package/dist/index.es231.js.map +1 -1
- package/dist/index.es232.js +172 -135
- package/dist/index.es232.js.map +1 -1
- package/dist/index.es233.js +136 -92
- package/dist/index.es233.js.map +1 -1
- package/dist/index.es234.js +92 -32
- package/dist/index.es234.js.map +1 -1
- package/dist/index.es235.js +32 -284
- package/dist/index.es235.js.map +1 -1
- package/dist/index.es236.js +284 -25
- package/dist/index.es236.js.map +1 -1
- package/dist/index.es237.js +22 -20
- package/dist/index.es237.js.map +1 -1
- package/dist/index.es238.js +22 -13
- package/dist/index.es238.js.map +1 -1
- package/dist/index.es239.js +12 -12
- package/dist/index.es239.js.map +1 -1
- package/dist/index.es24.js +58 -295
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es240.js +13 -24
- package/dist/index.es240.js.map +1 -1
- package/dist/index.es241.js +22 -42
- package/dist/index.es241.js.map +1 -1
- package/dist/index.es242.js +45 -11
- package/dist/index.es242.js.map +1 -1
- package/dist/index.es243.js +10 -10
- package/dist/index.es243.js.map +1 -1
- package/dist/index.es244.js +10 -10
- package/dist/index.es244.js.map +1 -1
- package/dist/index.es245.js +11 -14
- package/dist/index.es245.js.map +1 -1
- package/dist/index.es246.js +14 -11
- package/dist/index.es246.js.map +1 -1
- package/dist/index.es247.js +11 -11
- package/dist/index.es247.js.map +1 -1
- package/dist/index.es248.js +10 -10
- package/dist/index.es248.js.map +1 -1
- package/dist/index.es249.js +11 -15
- package/dist/index.es249.js.map +1 -1
- package/dist/index.es25.js +298 -114
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es250.js +15 -11
- package/dist/index.es250.js.map +1 -1
- package/dist/index.es251.js +10 -10
- package/dist/index.es251.js.map +1 -1
- package/dist/index.es252.js +11 -11
- package/dist/index.es252.js.map +1 -1
- package/dist/index.es253.js +10 -10
- package/dist/index.es253.js.map +1 -1
- package/dist/index.es254.js +10 -10
- package/dist/index.es254.js.map +1 -1
- package/dist/index.es255.js +10 -10
- package/dist/index.es255.js.map +1 -1
- package/dist/index.es256.js +10 -10
- package/dist/index.es256.js.map +1 -1
- package/dist/index.es257.js +10 -10
- package/dist/index.es257.js.map +1 -1
- package/dist/index.es258.js +11 -56
- package/dist/index.es258.js.map +1 -1
- package/dist/index.es259.js +53 -46
- package/dist/index.es259.js.map +1 -1
- package/dist/index.es26.js +121 -5
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es260.js +42 -112
- package/dist/index.es260.js.map +1 -1
- package/dist/index.es261.js +87 -352
- package/dist/index.es261.js.map +1 -1
- package/dist/index.es262.js +381 -15
- package/dist/index.es262.js.map +1 -1
- package/dist/index.es263.js +17 -10
- package/dist/index.es263.js.map +1 -1
- package/dist/index.es264.js +10 -30
- package/dist/index.es264.js.map +1 -1
- package/dist/index.es265.js +17 -17
- package/dist/index.es265.js.map +1 -1
- package/dist/index.es266.js +25 -56
- package/dist/index.es266.js.map +1 -1
- package/dist/index.es267.js +59 -14
- package/dist/index.es267.js.map +1 -1
- package/dist/index.es268.js +14 -74
- package/dist/index.es268.js.map +1 -1
- package/dist/index.es269.js +77 -11
- package/dist/index.es269.js.map +1 -1
- package/dist/index.es270.js +10 -10
- package/dist/index.es270.js.map +1 -1
- package/dist/index.es271.js +11 -15
- package/dist/index.es271.js.map +1 -1
- package/dist/index.es272.js +14 -51
- package/dist/index.es272.js.map +1 -1
- package/dist/index.es273.js +44 -158
- package/dist/index.es273.js.map +1 -1
- package/dist/index.es274.js +167 -2
- package/dist/index.es274.js.map +1 -1
- package/dist/index.es275.js +37 -10
- package/dist/index.es275.js.map +1 -1
- package/dist/index.es276.js +2 -20
- package/dist/index.es276.js.map +1 -1
- package/dist/index.es277.js +10 -38
- package/dist/index.es277.js.map +1 -1
- package/dist/index.es278.js +23 -0
- package/dist/index.es278.js.map +1 -0
- package/dist/index.es279.js +42 -0
- package/dist/index.es279.js.map +1 -0
- package/dist/index.es28.js +7 -7
- package/dist/index.es29.js +1 -1
- package/dist/index.es32.js +4 -4
- package/dist/index.es33.js +117 -13
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +65 -112
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +18 -71
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es36.js +260 -17
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es37.js +31 -249
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +199 -27
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +50 -198
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es40.js +120 -45
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +14 -132
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +225 -19
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +8 -229
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +1190 -7
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +6 -1191
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +146 -6
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +15 -146
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es49.js +5 -93
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es50.js +8 -4
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +91 -33
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +3 -71
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +34 -36
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +61 -295
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +38 -9
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js +296 -81
- package/dist/index.es56.js.map +1 -1
- package/dist/index.es57.js +9 -8
- package/dist/index.es57.js.map +1 -1
- package/dist/index.es58.js +89 -13
- package/dist/index.es58.js.map +1 -1
- package/dist/index.es59.js +6 -141
- package/dist/index.es59.js.map +1 -1
- package/dist/index.es60.js +12 -297
- package/dist/index.es60.js.map +1 -1
- package/dist/index.es61.js +137 -60
- package/dist/index.es61.js.map +1 -1
- package/dist/index.es62.js +247 -160
- package/dist/index.es62.js.map +1 -1
- package/dist/index.es63.js +63 -31
- package/dist/index.es63.js.map +1 -1
- package/dist/index.es64.js +212 -8
- package/dist/index.es64.js.map +1 -1
- package/dist/index.es65.js +32 -10
- package/dist/index.es65.js.map +1 -1
- package/dist/index.es66.js +8 -186
- package/dist/index.es66.js.map +1 -1
- package/dist/index.es67.js +11 -23
- package/dist/index.es67.js.map +1 -1
- package/dist/index.es68.js +183 -1396
- package/dist/index.es68.js.map +1 -1
- package/dist/index.es69.js +24 -9
- package/dist/index.es69.js.map +1 -1
- package/dist/index.es70.js +1400 -8
- package/dist/index.es70.js.map +1 -1
- package/dist/index.es71.js +9 -6
- package/dist/index.es71.js.map +1 -1
- package/dist/index.es72.js +8 -163
- package/dist/index.es72.js.map +1 -1
- package/dist/index.es73.js +6 -672
- package/dist/index.es73.js.map +1 -1
- package/dist/index.es74.js +161 -10
- package/dist/index.es74.js.map +1 -1
- package/dist/index.es75.js +671 -39
- package/dist/index.es75.js.map +1 -1
- package/dist/index.es76.js +10 -32
- package/dist/index.es76.js.map +1 -1
- package/dist/index.es77.js +31 -223
- package/dist/index.es77.js.map +1 -1
- package/dist/index.es78.js +33 -29
- package/dist/index.es78.js.map +1 -1
- package/dist/index.es79.js +193 -36
- package/dist/index.es79.js.map +1 -1
- package/dist/index.es80.js +26 -72
- package/dist/index.es80.js.map +1 -1
- package/dist/index.es81.js +70 -47
- package/dist/index.es81.js.map +1 -1
- package/dist/index.es82.js +72 -26
- package/dist/index.es82.js.map +1 -1
- package/dist/index.es83.js +37 -28
- package/dist/index.es83.js.map +1 -1
- package/dist/index.es84.js +28 -55
- package/dist/index.es84.js.map +1 -1
- package/dist/index.es85.js +43 -13
- package/dist/index.es85.js.map +1 -1
- package/dist/index.es86.js +32 -132
- package/dist/index.es86.js.map +1 -1
- package/dist/index.es87.js +5 -21
- package/dist/index.es87.js.map +1 -1
- package/dist/index.es88.js +61 -170
- package/dist/index.es88.js.map +1 -1
- package/dist/index.es89.js +31 -235
- package/dist/index.es89.js.map +1 -1
- package/dist/index.es90.js +50 -348
- package/dist/index.es90.js.map +1 -1
- package/dist/index.es91.js +13 -137
- package/dist/index.es91.js.map +1 -1
- package/dist/index.es92.js +132 -65
- package/dist/index.es92.js.map +1 -1
- package/dist/index.es93.js +21 -37
- package/dist/index.es93.js.map +1 -1
- package/dist/index.es94.js +179 -34
- package/dist/index.es94.js.map +1 -1
- package/dist/index.es95.js +230 -155
- package/dist/index.es95.js.map +1 -1
- package/dist/index.es96.js +341 -189
- package/dist/index.es96.js.map +1 -1
- package/dist/index.es97.js +136 -13
- package/dist/index.es97.js.map +1 -1
- package/dist/index.es98.js +68 -28
- package/dist/index.es98.js.map +1 -1
- package/dist/index.es99.js +33 -30
- package/dist/index.es99.js.map +1 -1
- package/dist/langgraph-ui-components.css +107 -0
- package/dist/styles.css +1 -1
- package/package.json +8 -11
- package/dist/index.es48.js +0 -11
- package/dist/index.es48.js.map +0 -1
package/dist/index.es115.js.map
CHANGED
|
@@ -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/tracers/base.js"],"sourcesContent":["import { __export } from \"../_virtual/rolldown_runtime.js\";\nimport { getRuntimeEnvironment } from \"../utils/env.js\";\nimport { BaseCallbackHandler } from \"../callbacks/base.js\";\nimport { RunTree, convertToDottedOrderFormat } from \"langsmith/run_trees\";\n\n//#region src/tracers/base.ts\nvar base_exports = {};\n__export(base_exports, {\n\tBaseTracer: () => BaseTracer,\n\tisBaseTracer: () => isBaseTracer\n});\nconst convertRunTreeToRun = (runTree) => {\n\tif (!runTree) return void 0;\n\trunTree.events = runTree.events ?? [];\n\trunTree.child_runs = runTree.child_runs ?? [];\n\treturn runTree;\n};\nfunction convertRunToRunTree(run, parentRun) {\n\tif (!run) return void 0;\n\treturn new RunTree({\n\t\t...run,\n\t\tstart_time: run._serialized_start_time ?? run.start_time,\n\t\tparent_run: convertRunToRunTree(parentRun),\n\t\tchild_runs: run.child_runs.map((r) => convertRunToRunTree(r)).filter((r) => r !== void 0),\n\t\textra: {\n\t\t\t...run.extra,\n\t\t\truntime: getRuntimeEnvironment()\n\t\t},\n\t\ttracingEnabled: false\n\t});\n}\nfunction _coerceToDict(value, defaultKey) {\n\treturn value && !Array.isArray(value) && typeof value === \"object\" ? value : { [defaultKey]: value };\n}\nfunction isBaseTracer(x) {\n\treturn typeof x._addRunToRunMap === \"function\";\n}\nvar BaseTracer = class extends BaseCallbackHandler {\n\t/** @deprecated Use `runTreeMap` instead. */\n\trunMap = /* @__PURE__ */ new Map();\n\trunTreeMap = /* @__PURE__ */ new Map();\n\tusesRunTreeMap = false;\n\tconstructor(_fields) {\n\t\tsuper(...arguments);\n\t}\n\tcopy() {\n\t\treturn this;\n\t}\n\tgetRunById(runId) {\n\t\tif (runId === void 0) return void 0;\n\t\treturn this.usesRunTreeMap ? convertRunTreeToRun(this.runTreeMap.get(runId)) : this.runMap.get(runId);\n\t}\n\tstringifyError(error) {\n\t\tif (error instanceof Error) return error.message + (error?.stack ? `\\n\\n${error.stack}` : \"\");\n\t\tif (typeof error === \"string\") return error;\n\t\treturn `${error}`;\n\t}\n\t_addChildRun(parentRun, childRun) {\n\t\tparentRun.child_runs.push(childRun);\n\t}\n\t_addRunToRunMap(run) {\n\t\tconst { dottedOrder: currentDottedOrder, microsecondPrecisionDatestring } = convertToDottedOrderFormat(new Date(run.start_time).getTime(), run.id, run.execution_order);\n\t\tconst storedRun = { ...run };\n\t\tconst parentRun = this.getRunById(storedRun.parent_run_id);\n\t\tif (storedRun.parent_run_id !== void 0) if (parentRun) {\n\t\t\tthis._addChildRun(parentRun, storedRun);\n\t\t\tparentRun.child_execution_order = Math.max(parentRun.child_execution_order, storedRun.child_execution_order);\n\t\t\tstoredRun.trace_id = parentRun.trace_id;\n\t\t\tif (parentRun.dotted_order !== void 0) {\n\t\t\t\tstoredRun.dotted_order = [parentRun.dotted_order, currentDottedOrder].join(\".\");\n\t\t\t\tstoredRun._serialized_start_time = microsecondPrecisionDatestring;\n\t\t\t}\n\t\t} else storedRun.parent_run_id = void 0;\n\t\telse {\n\t\t\tstoredRun.trace_id = storedRun.id;\n\t\t\tstoredRun.dotted_order = currentDottedOrder;\n\t\t\tstoredRun._serialized_start_time = microsecondPrecisionDatestring;\n\t\t}\n\t\tif (this.usesRunTreeMap) {\n\t\t\tconst runTree = convertRunToRunTree(storedRun, parentRun);\n\t\t\tif (runTree !== void 0) this.runTreeMap.set(storedRun.id, runTree);\n\t\t} else this.runMap.set(storedRun.id, storedRun);\n\t\treturn storedRun;\n\t}\n\tasync _endTrace(run) {\n\t\tconst parentRun = run.parent_run_id !== void 0 && this.getRunById(run.parent_run_id);\n\t\tif (parentRun) parentRun.child_execution_order = Math.max(parentRun.child_execution_order, run.child_execution_order);\n\t\telse await this.persistRun(run);\n\t\tawait this.onRunUpdate?.(run);\n\t\tif (this.usesRunTreeMap) this.runTreeMap.delete(run.id);\n\t\telse this.runMap.delete(run.id);\n\t}\n\t_getExecutionOrder(parentRunId) {\n\t\tconst parentRun = parentRunId !== void 0 && this.getRunById(parentRunId);\n\t\tif (!parentRun) return 1;\n\t\treturn parentRun.child_execution_order + 1;\n\t}\n\t/**\n\t* Create and add a run to the run map for LLM start events.\n\t* This must sometimes be done synchronously to avoid race conditions\n\t* when callbacks are backgrounded, so we expose it as a separate method here.\n\t*/\n\t_createRunForLLMStart(llm, prompts, runId, parentRunId, extraParams, tags, metadata, name) {\n\t\tconst execution_order = this._getExecutionOrder(parentRunId);\n\t\tconst start_time = Date.now();\n\t\tconst finalExtraParams = metadata ? {\n\t\t\t...extraParams,\n\t\t\tmetadata\n\t\t} : extraParams;\n\t\tconst run = {\n\t\t\tid: runId,\n\t\t\tname: name ?? llm.id[llm.id.length - 1],\n\t\t\tparent_run_id: parentRunId,\n\t\t\tstart_time,\n\t\t\tserialized: llm,\n\t\t\tevents: [{\n\t\t\t\tname: \"start\",\n\t\t\t\ttime: new Date(start_time).toISOString()\n\t\t\t}],\n\t\t\tinputs: { prompts },\n\t\t\texecution_order,\n\t\t\tchild_runs: [],\n\t\t\tchild_execution_order: execution_order,\n\t\t\trun_type: \"llm\",\n\t\t\textra: finalExtraParams ?? {},\n\t\t\ttags: tags || []\n\t\t};\n\t\treturn this._addRunToRunMap(run);\n\t}\n\tasync handleLLMStart(llm, prompts, runId, parentRunId, extraParams, tags, metadata, name) {\n\t\tconst run = this.getRunById(runId) ?? this._createRunForLLMStart(llm, prompts, runId, parentRunId, extraParams, tags, metadata, name);\n\t\tawait this.onRunCreate?.(run);\n\t\tawait this.onLLMStart?.(run);\n\t\treturn run;\n\t}\n\t/**\n\t* Create and add a run to the run map for chat model start events.\n\t* This must sometimes be done synchronously to avoid race conditions\n\t* when callbacks are backgrounded, so we expose it as a separate method here.\n\t*/\n\t_createRunForChatModelStart(llm, messages, runId, parentRunId, extraParams, tags, metadata, name) {\n\t\tconst execution_order = this._getExecutionOrder(parentRunId);\n\t\tconst start_time = Date.now();\n\t\tconst finalExtraParams = metadata ? {\n\t\t\t...extraParams,\n\t\t\tmetadata\n\t\t} : extraParams;\n\t\tconst run = {\n\t\t\tid: runId,\n\t\t\tname: name ?? llm.id[llm.id.length - 1],\n\t\t\tparent_run_id: parentRunId,\n\t\t\tstart_time,\n\t\t\tserialized: llm,\n\t\t\tevents: [{\n\t\t\t\tname: \"start\",\n\t\t\t\ttime: new Date(start_time).toISOString()\n\t\t\t}],\n\t\t\tinputs: { messages },\n\t\t\texecution_order,\n\t\t\tchild_runs: [],\n\t\t\tchild_execution_order: execution_order,\n\t\t\trun_type: \"llm\",\n\t\t\textra: finalExtraParams ?? {},\n\t\t\ttags: tags || []\n\t\t};\n\t\treturn this._addRunToRunMap(run);\n\t}\n\tasync handleChatModelStart(llm, messages, runId, parentRunId, extraParams, tags, metadata, name) {\n\t\tconst run = this.getRunById(runId) ?? this._createRunForChatModelStart(llm, messages, runId, parentRunId, extraParams, tags, metadata, name);\n\t\tawait this.onRunCreate?.(run);\n\t\tawait this.onLLMStart?.(run);\n\t\treturn run;\n\t}\n\tasync handleLLMEnd(output, runId, _parentRunId, _tags, extraParams) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"llm\") throw new Error(\"No LLM run to end.\");\n\t\trun.end_time = Date.now();\n\t\trun.outputs = output;\n\t\trun.events.push({\n\t\t\tname: \"end\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\trun.extra = {\n\t\t\t...run.extra,\n\t\t\t...extraParams\n\t\t};\n\t\tawait this.onLLMEnd?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\tasync handleLLMError(error, runId, _parentRunId, _tags, extraParams) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"llm\") throw new Error(\"No LLM run to end.\");\n\t\trun.end_time = Date.now();\n\t\trun.error = this.stringifyError(error);\n\t\trun.events.push({\n\t\t\tname: \"error\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\trun.extra = {\n\t\t\t...run.extra,\n\t\t\t...extraParams\n\t\t};\n\t\tawait this.onLLMError?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\t/**\n\t* Create and add a run to the run map for chain start events.\n\t* This must sometimes be done synchronously to avoid race conditions\n\t* when callbacks are backgrounded, so we expose it as a separate method here.\n\t*/\n\t_createRunForChainStart(chain, inputs, runId, parentRunId, tags, metadata, runType, name, extra) {\n\t\tconst execution_order = this._getExecutionOrder(parentRunId);\n\t\tconst start_time = Date.now();\n\t\tconst run = {\n\t\t\tid: runId,\n\t\t\tname: name ?? chain.id[chain.id.length - 1],\n\t\t\tparent_run_id: parentRunId,\n\t\t\tstart_time,\n\t\t\tserialized: chain,\n\t\t\tevents: [{\n\t\t\t\tname: \"start\",\n\t\t\t\ttime: new Date(start_time).toISOString()\n\t\t\t}],\n\t\t\tinputs,\n\t\t\texecution_order,\n\t\t\tchild_execution_order: execution_order,\n\t\t\trun_type: runType ?? \"chain\",\n\t\t\tchild_runs: [],\n\t\t\textra: metadata ? {\n\t\t\t\t...extra,\n\t\t\t\tmetadata\n\t\t\t} : { ...extra },\n\t\t\ttags: tags || []\n\t\t};\n\t\treturn this._addRunToRunMap(run);\n\t}\n\tasync handleChainStart(chain, inputs, runId, parentRunId, tags, metadata, runType, name) {\n\t\tconst run = this.getRunById(runId) ?? this._createRunForChainStart(chain, inputs, runId, parentRunId, tags, metadata, runType, name);\n\t\tawait this.onRunCreate?.(run);\n\t\tawait this.onChainStart?.(run);\n\t\treturn run;\n\t}\n\tasync handleChainEnd(outputs, runId, _parentRunId, _tags, kwargs) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run) throw new Error(\"No chain run to end.\");\n\t\trun.end_time = Date.now();\n\t\trun.outputs = _coerceToDict(outputs, \"output\");\n\t\trun.events.push({\n\t\t\tname: \"end\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\tif (kwargs?.inputs !== void 0) run.inputs = _coerceToDict(kwargs.inputs, \"input\");\n\t\tawait this.onChainEnd?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\tasync handleChainError(error, runId, _parentRunId, _tags, kwargs) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run) throw new Error(\"No chain run to end.\");\n\t\trun.end_time = Date.now();\n\t\trun.error = this.stringifyError(error);\n\t\trun.events.push({\n\t\t\tname: \"error\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\tif (kwargs?.inputs !== void 0) run.inputs = _coerceToDict(kwargs.inputs, \"input\");\n\t\tawait this.onChainError?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\t/**\n\t* Create and add a run to the run map for tool start events.\n\t* This must sometimes be done synchronously to avoid race conditions\n\t* when callbacks are backgrounded, so we expose it as a separate method here.\n\t*/\n\t_createRunForToolStart(tool, input, runId, parentRunId, tags, metadata, name) {\n\t\tconst execution_order = this._getExecutionOrder(parentRunId);\n\t\tconst start_time = Date.now();\n\t\tconst run = {\n\t\t\tid: runId,\n\t\t\tname: name ?? tool.id[tool.id.length - 1],\n\t\t\tparent_run_id: parentRunId,\n\t\t\tstart_time,\n\t\t\tserialized: tool,\n\t\t\tevents: [{\n\t\t\t\tname: \"start\",\n\t\t\t\ttime: new Date(start_time).toISOString()\n\t\t\t}],\n\t\t\tinputs: { input },\n\t\t\texecution_order,\n\t\t\tchild_execution_order: execution_order,\n\t\t\trun_type: \"tool\",\n\t\t\tchild_runs: [],\n\t\t\textra: metadata ? { metadata } : {},\n\t\t\ttags: tags || []\n\t\t};\n\t\treturn this._addRunToRunMap(run);\n\t}\n\tasync handleToolStart(tool, input, runId, parentRunId, tags, metadata, name) {\n\t\tconst run = this.getRunById(runId) ?? this._createRunForToolStart(tool, input, runId, parentRunId, tags, metadata, name);\n\t\tawait this.onRunCreate?.(run);\n\t\tawait this.onToolStart?.(run);\n\t\treturn run;\n\t}\n\tasync handleToolEnd(output, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"tool\") throw new Error(\"No tool run to end\");\n\t\trun.end_time = Date.now();\n\t\trun.outputs = { output };\n\t\trun.events.push({\n\t\t\tname: \"end\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\tawait this.onToolEnd?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\tasync handleToolError(error, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"tool\") throw new Error(\"No tool run to end\");\n\t\trun.end_time = Date.now();\n\t\trun.error = this.stringifyError(error);\n\t\trun.events.push({\n\t\t\tname: \"error\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\tawait this.onToolError?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\tasync handleAgentAction(action, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"chain\") return;\n\t\tconst agentRun = run;\n\t\tagentRun.actions = agentRun.actions || [];\n\t\tagentRun.actions.push(action);\n\t\tagentRun.events.push({\n\t\t\tname: \"agent_action\",\n\t\t\ttime: (/* @__PURE__ */ new Date()).toISOString(),\n\t\t\tkwargs: { action }\n\t\t});\n\t\tawait this.onAgentAction?.(run);\n\t}\n\tasync handleAgentEnd(action, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"chain\") return;\n\t\trun.events.push({\n\t\t\tname: \"agent_end\",\n\t\t\ttime: (/* @__PURE__ */ new Date()).toISOString(),\n\t\t\tkwargs: { action }\n\t\t});\n\t\tawait this.onAgentEnd?.(run);\n\t}\n\t/**\n\t* Create and add a run to the run map for retriever start events.\n\t* This must sometimes be done synchronously to avoid race conditions\n\t* when callbacks are backgrounded, so we expose it as a separate method here.\n\t*/\n\t_createRunForRetrieverStart(retriever, query, runId, parentRunId, tags, metadata, name) {\n\t\tconst execution_order = this._getExecutionOrder(parentRunId);\n\t\tconst start_time = Date.now();\n\t\tconst run = {\n\t\t\tid: runId,\n\t\t\tname: name ?? retriever.id[retriever.id.length - 1],\n\t\t\tparent_run_id: parentRunId,\n\t\t\tstart_time,\n\t\t\tserialized: retriever,\n\t\t\tevents: [{\n\t\t\t\tname: \"start\",\n\t\t\t\ttime: new Date(start_time).toISOString()\n\t\t\t}],\n\t\t\tinputs: { query },\n\t\t\texecution_order,\n\t\t\tchild_execution_order: execution_order,\n\t\t\trun_type: \"retriever\",\n\t\t\tchild_runs: [],\n\t\t\textra: metadata ? { metadata } : {},\n\t\t\ttags: tags || []\n\t\t};\n\t\treturn this._addRunToRunMap(run);\n\t}\n\tasync handleRetrieverStart(retriever, query, runId, parentRunId, tags, metadata, name) {\n\t\tconst run = this.getRunById(runId) ?? this._createRunForRetrieverStart(retriever, query, runId, parentRunId, tags, metadata, name);\n\t\tawait this.onRunCreate?.(run);\n\t\tawait this.onRetrieverStart?.(run);\n\t\treturn run;\n\t}\n\tasync handleRetrieverEnd(documents, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"retriever\") throw new Error(\"No retriever run to end\");\n\t\trun.end_time = Date.now();\n\t\trun.outputs = { documents };\n\t\trun.events.push({\n\t\t\tname: \"end\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\tawait this.onRetrieverEnd?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\tasync handleRetrieverError(error, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"retriever\") throw new Error(\"No retriever run to end\");\n\t\trun.end_time = Date.now();\n\t\trun.error = this.stringifyError(error);\n\t\trun.events.push({\n\t\t\tname: \"error\",\n\t\t\ttime: new Date(run.end_time).toISOString()\n\t\t});\n\t\tawait this.onRetrieverError?.(run);\n\t\tawait this._endTrace(run);\n\t\treturn run;\n\t}\n\tasync handleText(text, runId) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"chain\") return;\n\t\trun.events.push({\n\t\t\tname: \"text\",\n\t\t\ttime: (/* @__PURE__ */ new Date()).toISOString(),\n\t\t\tkwargs: { text }\n\t\t});\n\t\tawait this.onText?.(run);\n\t}\n\tasync handleLLMNewToken(token, idx, runId, _parentRunId, _tags, fields) {\n\t\tconst run = this.getRunById(runId);\n\t\tif (!run || run?.run_type !== \"llm\") throw new Error(`Invalid \"runId\" provided to \"handleLLMNewToken\" callback.`);\n\t\trun.events.push({\n\t\t\tname: \"new_token\",\n\t\t\ttime: (/* @__PURE__ */ new Date()).toISOString(),\n\t\t\tkwargs: {\n\t\t\t\ttoken,\n\t\t\t\tidx,\n\t\t\t\tchunk: fields?.chunk\n\t\t\t}\n\t\t});\n\t\tawait this.onLLMNewToken?.(run, token, { chunk: fields?.chunk });\n\t\treturn run;\n\t}\n};\n\n//#endregion\nexport { BaseTracer, base_exports, isBaseTracer };\n//# sourceMappingURL=base.js.map"],"names":[],"mappings":";;;;AAMG,IAAC,eAAe,CAAA;AACnB,SAAS,cAAc;AAAA,EACtB,YAAY,MAAM;AAAA,EAClB,cAAc,MAAM;AACrB,CAAC;AACD,MAAM,sBAAsB,CAAC,YAAY;AACxC,MAAI,CAAC,QAAS,QAAO;AACrB,UAAQ,SAAS,QAAQ,UAAU,CAAA;AACnC,UAAQ,aAAa,QAAQ,cAAc,CAAA;AAC3C,SAAO;AACR;AACA,SAAS,oBAAoB,KAAK,WAAW;AAC5C,MAAI,CAAC,IAAK,QAAO;AACjB,SAAO,IAAI,QAAQ;AAAA,IAClB,GAAG;AAAA,IACH,YAAY,IAAI,0BAA0B,IAAI;AAAA,IAC9C,YAAY,oBAAoB,SAAS;AAAA,IACzC,YAAY,IAAI,WAAW,IAAI,CAAC,MAAM,oBAAoB,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,MAAM,MAAM;AAAA,IACxF,OAAO;AAAA,MACN,GAAG,IAAI;AAAA,MACP,SAAS,sBAAqB;AAAA,IACjC;AAAA,IACE,gBAAgB;AAAA,EAClB,CAAE;AACF;AACA,SAAS,cAAc,OAAO,YAAY;AACzC,SAAO,SAAS,CAAC,MAAM,QAAQ,KAAK,KAAK,OAAO,UAAU,WAAW,QAAQ,EAAE,CAAC,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KAAK;AACjC,QAAI,CAAC,OAAO,KAAK,aAAa,QAAS;AACvC,QAAI,OAAO,KAAK;AAAA,MACf,MAAM;AAAA,MACN,OAAuB,oBAAI,KAAI,GAAI,YAAW;AAAA,MAC9C,QAAQ,EAAE,KAAI;AAAA,IACjB,CAAG;AACD,UAAM,KAAK,SAAS,GAAG;AAAA,EACxB;AAAA,EACA,MAAM,kBAAkB,OAAO,KAAK,OAAO,cAAc,OAAO,QAAQ;AACvE,UAAM,MAAM,KAAK,WAAW,KAAK;AACjC,QAAI,CAAC,OAAO,KAAK,aAAa,MAAO,OAAM,IAAI,MAAM,2DAA2D;AAChH,QAAI,OAAO,KAAK;AAAA,MACf,MAAM;AAAA,MACN,OAAuB,oBAAI,KAAI,GAAI,YAAW;AAAA,MAC9C,QAAQ;AAAA,QACP;AAAA,QACA;AAAA,QACA,OAAO,QAAQ;AAAA,MACnB;AAAA,IACA,CAAG;AACD,UAAM,KAAK,gBAAgB,KAAK,OAAO,EAAE,OAAO,QAAQ,OAAO;AAC/D,WAAO;AAAA,EACR;AACD;","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;AACA,SAAS,kCAAkC,OAAO,iBAAiB,GAAG;AAGlE,QAAM,cAAc,eAAe,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,SAAS,GAAG,GAAG;AACzE,SAAO,GAAG,IAAI,KAAK,KAAK,EAAE,YAAW,EAAG,MAAM,GAAG,EAAE,CAAC,GAAG,WAAW;AACtE;AACO,SAAS,2BAA2B,OAAO,OAAO,iBAAiB,GAAG;AACzE,QAAM,iCAAiC,kCAAkC,OAAO,cAAc;AAC9F,SAAO;AAAA,IACH,aAAa,qBAAqB,8BAA8B,IAAI;AAAA,IACpE;AAAA,EACR;AACA;AACA,MAAM,6BAA6B,oBAAI,IAAI;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AACD,SAAS,wBAAwB,SAAS;AACtC,QAAM,WAAW,CAAA;AACjB,aAAW,OAAO,OAAO,KAAK,OAAO,GAAG;AACpC,QAAI,2BAA2B,IAAI,GAAG,GAAG;AACrC,eAAS,GAAG,IAAI,QAAQ,GAAG;AAAA,IAC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1,283 @@
|
|
|
1
|
-
import { __export } from "./index.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
7
14
|
});
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
const JsonPatchError = PatchError;
|
|
16
|
+
const deepClone = _deepClone;
|
|
17
|
+
function isDangerousKey(key) {
|
|
18
|
+
return Object.getOwnPropertyNames(Object.prototype).includes(key);
|
|
19
|
+
}
|
|
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)
|
|
23
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 };
|
|
24
79
|
}
|
|
25
80
|
};
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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;
|
|
118
|
+
}
|
|
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
|
+
}
|
|
171
|
+
}
|
|
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;
|
|
187
|
+
}
|
|
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
|
+
}
|
|
31
191
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
...this.generationInfo,
|
|
37
|
-
...chunk.generationInfo
|
|
38
|
-
},
|
|
39
|
-
message: this.message.concat(chunk.message)
|
|
40
|
-
});
|
|
192
|
+
}
|
|
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");
|
|
41
196
|
}
|
|
42
|
-
|
|
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;
|
|
205
|
+
}
|
|
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;
|
|
210
|
+
}
|
|
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);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
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;
|
|
248
|
+
}
|
|
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;
|
|
270
|
+
}
|
|
271
|
+
return a !== a && b !== b;
|
|
272
|
+
}
|
|
43
273
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
274
|
+
_areEquals,
|
|
275
|
+
applyOperation,
|
|
276
|
+
applyPatch,
|
|
277
|
+
applyReducer,
|
|
278
|
+
core_exports,
|
|
279
|
+
getValueByPointer,
|
|
280
|
+
validate,
|
|
281
|
+
validator
|
|
48
282
|
};
|
|
49
283
|
//# sourceMappingURL=index.es116.js.map
|
package/dist/index.es116.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"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/outputs.js"],"sourcesContent":["import { __export } from \"./_virtual/rolldown_runtime.js\";\n\n//#region src/outputs.ts\nvar outputs_exports = {};\n__export(outputs_exports, {\n\tChatGenerationChunk: () => ChatGenerationChunk,\n\tGenerationChunk: () => GenerationChunk,\n\tRUN_KEY: () => RUN_KEY\n});\nconst RUN_KEY = \"__run\";\n/**\n* Chunk of a single generation. Used for streaming.\n*/\nvar GenerationChunk = class GenerationChunk {\n\ttext;\n\tgenerationInfo;\n\tconstructor(fields) {\n\t\tthis.text = fields.text;\n\t\tthis.generationInfo = fields.generationInfo;\n\t}\n\tconcat(chunk) {\n\t\treturn new GenerationChunk({\n\t\t\ttext: this.text + chunk.text,\n\t\t\tgenerationInfo: {\n\t\t\t\t...this.generationInfo,\n\t\t\t\t...chunk.generationInfo\n\t\t\t}\n\t\t});\n\t}\n};\nvar ChatGenerationChunk = class ChatGenerationChunk extends GenerationChunk {\n\tmessage;\n\tconstructor(fields) {\n\t\tsuper(fields);\n\t\tthis.message = fields.message;\n\t}\n\tconcat(chunk) {\n\t\treturn new ChatGenerationChunk({\n\t\t\ttext: this.text + chunk.text,\n\t\t\tgenerationInfo: {\n\t\t\t\t...this.generationInfo,\n\t\t\t\t...chunk.generationInfo\n\t\t\t},\n\t\t\tmessage: this.message.concat(chunk.message)\n\t\t});\n\t}\n};\n\n//#endregion\nexport { ChatGenerationChunk, GenerationChunk, RUN_KEY, outputs_exports };\n//# sourceMappingURL=outputs.js.map"],"names":["GenerationChunk","ChatGenerationChunk"],"mappings":";AAGG,IAAC,kBAAkB,CAAA;AACtB,SAAS,iBAAiB;AAAA,EACzB,qBAAqB,MAAM;AAAA,EAC3B,iBAAiB,MAAM;AAAA,EACvB,SAAS,MAAM;AAChB,CAAC;AACI,MAAC,UAAU;AAIb,IAAC,kBAAkB,MAAMA,iBAAgB;AAAA,EAC3C;AAAA,EACA;AAAA,EACA,YAAY,QAAQ;AACnB,SAAK,OAAO,OAAO;AACnB,SAAK,iBAAiB,OAAO;AAAA,EAC9B;AAAA,EACA,OAAO,OAAO;AACb,WAAO,IAAIA,iBAAgB;AAAA,MAC1B,MAAM,KAAK,OAAO,MAAM;AAAA,MACxB,gBAAgB;AAAA,QACf,GAAG,KAAK;AAAA,QACR,GAAG,MAAM;AAAA,MACb;AAAA,IACA,CAAG;AAAA,EACF;AACD;AACG,IAAC,sBAAsB,MAAMC,6BAA4B,gBAAgB;AAAA,EAC3E;AAAA,EACA,YAAY,QAAQ;AACnB,UAAM,MAAM;AACZ,SAAK,UAAU,OAAO;AAAA,EACvB;AAAA,EACA,OAAO,OAAO;AACb,WAAO,IAAIA,qBAAoB;AAAA,MAC9B,MAAM,KAAK,OAAO,MAAM;AAAA,MACxB,gBAAgB;AAAA,QACf,GAAG,KAAK;AAAA,QACR,GAAG,MAAM;AAAA,MACb;AAAA,MACG,SAAS,KAAK,QAAQ,OAAO,MAAM,OAAO;AAAA,IAC7C,CAAG;AAAA,EACF;AACD;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"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;AAChB,WAAO,EAAE,aAAa,SAAQ;AAAA,EAC/B;AAAA,EACA,QAAQ,SAAS,KAAK,KAAK,UAAU;AACpC,QAAI,eAAe,GAAG,EAAG,OAAM,IAAI,UAAU,sGAAsG;AACnJ,QAAI,UAAU,IAAI,GAAG;AACrB,WAAO,IAAI,GAAG;AACd,WAAO;AAAA,MACN,aAAa;AAAA,MACb;AAAA,IACH;AAAA,EACC;AAAA,EACA,SAAS,SAAS,KAAK,KAAK,UAAU;AACrC,QAAI,eAAe,GAAG,EAAG,OAAM,IAAI,UAAU,sGAAsG;AACnJ,QAAI,UAAU,IAAI,GAAG;AACrB,QAAI,GAAG,IAAI,KAAK;AAChB,WAAO;AAAA,MACN,aAAa;AAAA,MACb;AAAA,IACH;AAAA,EACC;AAAA,EACA,MAAM,SAAS,KAAK,KAAK,UAAU;AAClC,QAAI,UAAU,kBAAkB,UAAU,KAA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,UAAI,UAAU,EAAE,OAAQ,QAAO;AAC/B,WAAK,IAAI,QAAQ,QAAQ,IAAI,KAAI,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAG,QAAO;AACjE,aAAO;AAAA,IACR;AACA,QAAI,QAAQ,KAAM,QAAO;AACzB,QAAI,OAAO,OAAO,KAAK,CAAC;AACxB,aAAS,KAAK;AACd,QAAI,WAAW,OAAO,KAAK,CAAC,EAAE,OAAQ,QAAO;AAC7C,SAAK,IAAI,QAAQ,QAAQ,IAAI,KAAI,CAAC,EAAE,eAAe,KAAK,CAAC,CAAC,EAAG,QAAO;AACpE,SAAK,IAAI,QAAQ,QAAQ,KAAI;AAC5B,YAAM,KAAK,CAAC;AACZ,UAAI,CAAC,WAAW,EAAE,GAAG,GAAG,EAAE,GAAG,CAAC,EAAG,QAAO;AAAA,IACzC;AACA,WAAO;AAAA,EACR;AACA,SAAO,MAAM,KAAK,MAAM;AACzB;","x_google_ignoreList":[0]}
|
package/dist/index.es117.js
CHANGED
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"Failed to fetch",
|
|
6
|
-
"NetworkError when attempting to fetch resource.",
|
|
7
|
-
"The Internet connection appears to be offline.",
|
|
8
|
-
"Network request failed",
|
|
9
|
-
"fetch failed",
|
|
10
|
-
"terminated",
|
|
11
|
-
" A network error occurred.",
|
|
12
|
-
"Network connection lost"
|
|
13
|
-
]);
|
|
14
|
-
function isNetworkError(error) {
|
|
15
|
-
const isValid = error && isError(error) && error.name === "TypeError" && typeof error.message === "string";
|
|
16
|
-
if (!isValid) return false;
|
|
17
|
-
const { message, stack } = error;
|
|
18
|
-
if (message === "Load failed") return stack === void 0 || "__sentry_captured__" in error;
|
|
19
|
-
if (message.startsWith("error sending request for url")) return true;
|
|
20
|
-
return errorMessages.has(message);
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
isNetworkError
|
|
24
|
-
};
|
|
1
|
+
import { core_exports } from "./index.es116.js";
|
|
2
|
+
({
|
|
3
|
+
...core_exports
|
|
4
|
+
});
|
|
25
5
|
//# sourceMappingURL=index.es117.js.map
|