@distri/react 0.3.0 → 0.3.1
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/globals.css +124 -126
- package/dist/index.cjs +1575 -29569
- package/dist/index.css +124 -126
- package/dist/index.d.cts +12 -56
- package/dist/index.d.ts +12 -56
- package/dist/index.js +684 -2239
- package/package.json +2 -2
- package/dist/1c-2YH7WZEI.js +0 -147
- package/dist/abap-2E6FD6UM.js +0 -6
- package/dist/abnf-DTHGNPWA.js +0 -81
- package/dist/abnf-EQ2EQNMD.js +0 -6
- package/dist/accesslog-OXVH23VB.js +0 -103
- package/dist/actionscript-ET7ZSAQE.js +0 -93
- package/dist/actionscript-HY6HF3PK.js +0 -6
- package/dist/ada-FYSJBBKX.js +0 -154
- package/dist/ada-YIAPUA6Y.js +0 -6
- package/dist/agda-2S3QKIIQ.js +0 -6
- package/dist/al-K6VQB6U5.js +0 -6
- package/dist/angelscript-BNZ3LBKN.js +0 -125
- package/dist/antlr4-BTV7OTRY.js +0 -6
- package/dist/apache-XJP2D6HB.js +0 -85
- package/dist/apacheconf-TBVJNNAT.js +0 -6
- package/dist/apex-D7OMX2EB.js +0 -7
- package/dist/apl-4EJXPJSD.js +0 -6
- package/dist/applescript-J5GCFFUG.js +0 -6
- package/dist/applescript-SKJJ2FZC.js +0 -147
- package/dist/aql-Y3KTDBGX.js +0 -6
- package/dist/arcade-CY3X3QYD.js +0 -155
- package/dist/arduino-6V5KO7YA.js +0 -431
- package/dist/arduino-R55JMQT5.js +0 -8
- package/dist/arff-SVJCCOQL.js +0 -6
- package/dist/armasm-VRMSGYIS.js +0 -102
- package/dist/asciidoc-CW3L73RM.js +0 -6
- package/dist/asciidoc-FQ5LUNNR.js +0 -284
- package/dist/asm6502-LB4P66FI.js +0 -6
- package/dist/asmatmel-6ZDKQ3X6.js +0 -6
- package/dist/aspectj-HNDTQEPY.js +0 -162
- package/dist/aspnet-XM7CZDKV.js +0 -7
- package/dist/autohotkey-4HVH3263.js +0 -6
- package/dist/autohotkey-DPG2VG4A.js +0 -85
- package/dist/autoit-MFCBG2D2.js +0 -169
- package/dist/autoit-UMF5VNJ6.js +0 -6
- package/dist/avisynth-I5RAJYMS.js +0 -6
- package/dist/avrasm-WMPLDORW.js +0 -70
- package/dist/avro-idl-RVCXS3RF.js +0 -6
- package/dist/awk-TZ2EZBJY.js +0 -75
- package/dist/axapta-JHOYS5HS.js +0 -176
- package/dist/bash-6VMOROZO.js +0 -6
- package/dist/bash-SNIULQZM.js +0 -145
- package/dist/basic-WBLGJBZS.js +0 -55
- package/dist/basic-YYCIXV77.js +0 -6
- package/dist/batch-JUP4GVAU.js +0 -6
- package/dist/bbcode-6IALBDYG.js +0 -6
- package/dist/bicep-5Q3ZMQA2.js +0 -6
- package/dist/birb-NFCG4K4R.js +0 -6
- package/dist/bison-2LI2YQF5.js +0 -7
- package/dist/bnf-6ORTMFIN.js +0 -6
- package/dist/bnf-PBYAMK7P.js +0 -41
- package/dist/brainfuck-C6ODHU3N.js +0 -6
- package/dist/brainfuck-XW3AVWEW.js +0 -49
- package/dist/brightscript-QS23GEH5.js +0 -6
- package/dist/bro-KOK3VSWG.js +0 -6
- package/dist/bsl-PJUDWPSR.js +0 -6
- package/dist/c-FP7QIOU7.js +0 -6
- package/dist/c-M26WOP35.js +0 -254
- package/dist/c-like-H6XZALCF.js +0 -431
- package/dist/cal-S4EYYQTM.js +0 -102
- package/dist/capnproto-2Q7KBI3R.js +0 -63
- package/dist/ceylon-V33GPKQJ.js +0 -74
- package/dist/cfscript-QNHYEQQ6.js +0 -6
- package/dist/chaiscript-7HH2YQUT.js +0 -8
- package/dist/chunk-24VYMNIF.js +0 -137
- package/dist/chunk-25D4C7RW.js +0 -47
- package/dist/chunk-25FROOH6.js +0 -151
- package/dist/chunk-27CW3EDR.js +0 -110
- package/dist/chunk-2IKWR5BD.js +0 -136
- package/dist/chunk-2OUDGY74.js +0 -69
- package/dist/chunk-2QPRZKG7.js +0 -35
- package/dist/chunk-33VUG2QM.js +0 -79
- package/dist/chunk-3CTY5M4I.js +0 -76
- package/dist/chunk-3F6K75JF.js +0 -60
- package/dist/chunk-3JA2W53Z.js +0 -47
- package/dist/chunk-3JNYM26W.js +0 -94
- package/dist/chunk-3M74OURW.js +0 -30
- package/dist/chunk-3NKUT7TH.js +0 -68
- package/dist/chunk-3NZA4542.js +0 -197
- package/dist/chunk-3REW723S.js +0 -49
- package/dist/chunk-3WE5FOC4.js +0 -39
- package/dist/chunk-3XA6VTHO.js +0 -40
- package/dist/chunk-3YPIA64V.js +0 -50
- package/dist/chunk-426IPYWB.js +0 -158
- package/dist/chunk-44ZZWXGU.js +0 -61
- package/dist/chunk-45XBO57H.js +0 -75
- package/dist/chunk-47VKELNA.js +0 -26
- package/dist/chunk-4BINGQXR.js +0 -64
- package/dist/chunk-4K6U3KST.js +0 -97
- package/dist/chunk-4LPMZE4K.js +0 -50
- package/dist/chunk-4LROSNN7.js +0 -239
- package/dist/chunk-4TEDW65X.js +0 -101
- package/dist/chunk-4TTFS7AE.js +0 -156
- package/dist/chunk-4WZAWVVD.js +0 -47
- package/dist/chunk-4ZSHUF27.js +0 -139
- package/dist/chunk-53MOB7QD.js +0 -111
- package/dist/chunk-53TH3G7L.js +0 -187
- package/dist/chunk-55TJCXPI.js +0 -34
- package/dist/chunk-5BE7MV5Y.js +0 -62
- package/dist/chunk-5MBEKVFI.js +0 -51
- package/dist/chunk-5ME2UIV2.js +0 -61
- package/dist/chunk-5NFJPAWG.js +0 -65
- package/dist/chunk-5OHRFMBB.js +0 -67
- package/dist/chunk-5ONN2BWW.js +0 -74
- package/dist/chunk-5SUD76JK.js +0 -67
- package/dist/chunk-5U3JUGOR.js +0 -55
- package/dist/chunk-5WGGQBDN.js +0 -30
- package/dist/chunk-65KJS5T6.js +0 -112
- package/dist/chunk-6ADGDPPW.js +0 -79
- package/dist/chunk-6F34AU46.js +0 -74
- package/dist/chunk-6GAA6YLP.js +0 -75
- package/dist/chunk-6LOQWZPI.js +0 -68
- package/dist/chunk-6YISWBMA.js +0 -942
- package/dist/chunk-75PP7PI6.js +0 -82
- package/dist/chunk-76OIATWI.js +0 -82
- package/dist/chunk-7GX444GM.js +0 -46
- package/dist/chunk-7VWJOW6P.js +0 -62
- package/dist/chunk-7WBWN6D5.js +0 -94
- package/dist/chunk-A2TJMJHB.js +0 -155
- package/dist/chunk-ADKDXJMX.js +0 -119
- package/dist/chunk-AHHMCY2J.js +0 -108
- package/dist/chunk-AKXYCA25.js +0 -82
- package/dist/chunk-AOICOBAF.js +0 -41
- package/dist/chunk-AXOTEEYA.js +0 -205
- package/dist/chunk-BA736DVE.js +0 -88
- package/dist/chunk-BAVP462O.js +0 -240
- package/dist/chunk-BB7U4H7S.js +0 -103
- package/dist/chunk-BBQV2JXP.js +0 -94
- package/dist/chunk-BFG2SVED.js +0 -71
- package/dist/chunk-BTRWHRUR.js +0 -66
- package/dist/chunk-BU4UGOKB.js +0 -60
- package/dist/chunk-BYU5NTFP.js +0 -77
- package/dist/chunk-C475R4FS.js +0 -41
- package/dist/chunk-C4VUAB44.js +0 -52
- package/dist/chunk-C7D4KPR4.js +0 -79
- package/dist/chunk-C7DN7SOA.js +0 -88
- package/dist/chunk-CGQKUOBK.js +0 -166
- package/dist/chunk-CNXZNSZ6.js +0 -73
- package/dist/chunk-CPE7WTCO.js +0 -87
- package/dist/chunk-CU76RRBI.js +0 -40
- package/dist/chunk-D2R2ZRRH.js +0 -139
- package/dist/chunk-D63D46H6.js +0 -84
- package/dist/chunk-D7CBXSDT.js +0 -168
- package/dist/chunk-DKM437DZ.js +0 -30
- package/dist/chunk-DL5KKDDX.js +0 -41
- package/dist/chunk-DMH4XPXJ.js +0 -60
- package/dist/chunk-DNPOVTXW.js +0 -57
- package/dist/chunk-DRQ7XDNB.js +0 -74
- package/dist/chunk-DSAUO3FT.js +0 -36
- package/dist/chunk-DWJTQN4Q.js +0 -39
- package/dist/chunk-DXN657MG.js +0 -54
- package/dist/chunk-DXOFOLMO.js +0 -28
- package/dist/chunk-DYCT6UGG.js +0 -118
- package/dist/chunk-E2GZUORL.js +0 -38
- package/dist/chunk-E2NMFAHM.js +0 -51
- package/dist/chunk-EAKZVVVK.js +0 -38
- package/dist/chunk-EDED7GO2.js +0 -28
- package/dist/chunk-EFDDCP6E.js +0 -61
- package/dist/chunk-EG5ENAMF.js +0 -54
- package/dist/chunk-ERCJ2723.js +0 -166
- package/dist/chunk-ETSWXID3.js +0 -108
- package/dist/chunk-EVWTNGR2.js +0 -66
- package/dist/chunk-EYSUQCKU.js +0 -58
- package/dist/chunk-EYYK5DWC.js +0 -61
- package/dist/chunk-F4GOSIEU.js +0 -48
- package/dist/chunk-FAV4X3VE.js +0 -65
- package/dist/chunk-FDJQNDUI.js +0 -82
- package/dist/chunk-FOMZNBFC.js +0 -52
- package/dist/chunk-FRTB7SKA.js +0 -59
- package/dist/chunk-FU6GDCL4.js +0 -70
- package/dist/chunk-FUNANJQD.js +0 -148
- package/dist/chunk-FYZGIFIR.js +0 -4903
- package/dist/chunk-G3RVOSQS.js +0 -47
- package/dist/chunk-GBDND3J7.js +0 -31
- package/dist/chunk-GHHVUAN4.js +0 -39
- package/dist/chunk-GKYHP5DM.js +0 -46
- package/dist/chunk-GN5JY4ON.js +0 -108
- package/dist/chunk-GSJ4ZPME.js +0 -44
- package/dist/chunk-HA25XUMO.js +0 -51
- package/dist/chunk-HB5YQXW7.js +0 -41
- package/dist/chunk-HBR63ZQM.js +0 -83
- package/dist/chunk-HENRLFPS.js +0 -130
- package/dist/chunk-HI5JB7PA.js +0 -43
- package/dist/chunk-HPUECJDJ.js +0 -77
- package/dist/chunk-HQ25WWHW.js +0 -30
- package/dist/chunk-IDCGS2LG.js +0 -67
- package/dist/chunk-IGC26U6E.js +0 -91
- package/dist/chunk-IHY66EFI.js +0 -46
- package/dist/chunk-IOV4LKPF.js +0 -132
- package/dist/chunk-IRYK7EBW.js +0 -80
- package/dist/chunk-ITUYRI56.js +0 -53
- package/dist/chunk-IYWSMRMM.js +0 -91
- package/dist/chunk-IZCOKOL4.js +0 -29
- package/dist/chunk-IZLK5PA4.js +0 -427
- package/dist/chunk-J2I2GALQ.js +0 -62
- package/dist/chunk-J5NTCYRJ.js +0 -78
- package/dist/chunk-J7PDPSEI.js +0 -95
- package/dist/chunk-JIMMMDQX.js +0 -40
- package/dist/chunk-JLIGTJAV.js +0 -40
- package/dist/chunk-JM6YFZCJ.js +0 -366
- package/dist/chunk-JXFYYAWX.js +0 -41
- package/dist/chunk-JY4VLYST.js +0 -44
- package/dist/chunk-K4XC3DN3.js +0 -46
- package/dist/chunk-KFXYXJEI.js +0 -74
- package/dist/chunk-KMVKUGEN.js +0 -32
- package/dist/chunk-KSDU7X3Q.js +0 -97
- package/dist/chunk-L2OROVEO.js +0 -59
- package/dist/chunk-L35GVMS6.js +0 -39
- package/dist/chunk-L4KT7DFF.js +0 -49
- package/dist/chunk-L4OBEVKY.js +0 -117
- package/dist/chunk-L7KTXJ5T.js +0 -42
- package/dist/chunk-LNJTL4XT.js +0 -59
- package/dist/chunk-LP6PAX6W.js +0 -162
- package/dist/chunk-LQIUIOZD.js +0 -312
- package/dist/chunk-LSJCH55S.js +0 -38
- package/dist/chunk-LSJTRURW.js +0 -153
- package/dist/chunk-LSXW7LL3.js +0 -76
- package/dist/chunk-LW7TKM5V.js +0 -35
- package/dist/chunk-M2XF7C43.js +0 -147
- package/dist/chunk-MLZ6Z4NJ.js +0 -59
- package/dist/chunk-MQ4JGNKV.js +0 -82
- package/dist/chunk-MR5GJJCD.js +0 -59
- package/dist/chunk-MSFD2P6X.js +0 -33
- package/dist/chunk-N2HL4FSP.js +0 -115
- package/dist/chunk-N4CDNUSI.js +0 -131
- package/dist/chunk-NAIFU37T.js +0 -29
- package/dist/chunk-NF3K6UKW.js +0 -71
- package/dist/chunk-NHLJH2QU.js +0 -33
- package/dist/chunk-NNKKBIBH.js +0 -57
- package/dist/chunk-NO3DNLIA.js +0 -71
- package/dist/chunk-NOH3VCUN.js +0 -47
- package/dist/chunk-NQVYKPWZ.js +0 -62
- package/dist/chunk-NSD6XBVX.js +0 -48
- package/dist/chunk-NSMEMFKE.js +0 -217
- package/dist/chunk-NY53DQIO.js +0 -93
- package/dist/chunk-NZY5EZK5.js +0 -43
- package/dist/chunk-O2OFPBPK.js +0 -42
- package/dist/chunk-O374MFIY.js +0 -238
- package/dist/chunk-OA6YIRHQ.js +0 -47
- package/dist/chunk-OBW6XSZ6.js +0 -121
- package/dist/chunk-OD2UFFIF.js +0 -56
- package/dist/chunk-OHGHYIQD.js +0 -106
- package/dist/chunk-OI7PZLYM.js +0 -101
- package/dist/chunk-ONRSXHI4.js +0 -38
- package/dist/chunk-P2R24TGR.js +0 -32
- package/dist/chunk-P4DAHZUQ.js +0 -71
- package/dist/chunk-P5HX2PL4.js +0 -33
- package/dist/chunk-P7POYAWI.js +0 -39
- package/dist/chunk-P7WAXOIZ.js +0 -122
- package/dist/chunk-PAB77QMV.js +0 -64
- package/dist/chunk-PC37JIIX.js +0 -77
- package/dist/chunk-PO4QV4WT.js +0 -68
- package/dist/chunk-Q7YUTUXA.js +0 -96
- package/dist/chunk-QCTJEID3.js +0 -60
- package/dist/chunk-QINIWGYX.js +0 -51
- package/dist/chunk-QL55MSIZ.js +0 -49
- package/dist/chunk-QLTOG4MT.js +0 -27
- package/dist/chunk-QPFIT7U6.js +0 -54
- package/dist/chunk-QQOZXGR3.js +0 -47
- package/dist/chunk-QUWJFCWK.js +0 -38
- package/dist/chunk-R4PER7NZ.js +0 -51
- package/dist/chunk-R4WHSRPM.js +0 -51
- package/dist/chunk-R7LE6OT4.js +0 -45
- package/dist/chunk-RNTTNM5P.js +0 -37
- package/dist/chunk-RQJWBEFF.js +0 -62
- package/dist/chunk-RSMTA6GK.js +0 -95
- package/dist/chunk-RWBIPKOM.js +0 -39
- package/dist/chunk-RYLEEMHX.js +0 -45
- package/dist/chunk-S22XTUNB.js +0 -72
- package/dist/chunk-SBMAYFHQ.js +0 -112
- package/dist/chunk-SJSNOISF.js +0 -83
- package/dist/chunk-SMATBXJT.js +0 -78
- package/dist/chunk-SVY64O64.js +0 -42
- package/dist/chunk-SY2RM5AY.js +0 -71
- package/dist/chunk-T27V63VN.js +0 -39
- package/dist/chunk-T2JKOELM.js +0 -50
- package/dist/chunk-T4XULMNE.js +0 -27
- package/dist/chunk-T4XZBJRX.js +0 -63
- package/dist/chunk-TEUCS7CC.js +0 -41
- package/dist/chunk-TEVPUTJN.js +0 -116
- package/dist/chunk-TMPJ5OQC.js +0 -39
- package/dist/chunk-TPASKEDY.js +0 -71
- package/dist/chunk-TUWKJH67.js +0 -141
- package/dist/chunk-TVWUYRIS.js +0 -69
- package/dist/chunk-TWAI6FLP.js +0 -46
- package/dist/chunk-TWMU5FT4.js +0 -98
- package/dist/chunk-TYBQXIHB.js +0 -132
- package/dist/chunk-U6KZOUWP.js +0 -97
- package/dist/chunk-UAYBD6YK.js +0 -53
- package/dist/chunk-UBBKEK2F.js +0 -43
- package/dist/chunk-UBOVR4MJ.js +0 -55
- package/dist/chunk-UCYAOIJX.js +0 -106
- package/dist/chunk-UDSEA732.js +0 -89
- package/dist/chunk-UICM7ISL.js +0 -97
- package/dist/chunk-UJBVRUTD.js +0 -98
- package/dist/chunk-UTCKMPAI.js +0 -289
- package/dist/chunk-UU73JDYM.js +0 -144
- package/dist/chunk-UVOTXBDD.js +0 -123
- package/dist/chunk-UZ37NXAL.js +0 -199
- package/dist/chunk-V3DTC5F2.js +0 -36
- package/dist/chunk-V3FVSCNQ.js +0 -82
- package/dist/chunk-VBFCRLKP.js +0 -39
- package/dist/chunk-VFSK564P.js +0 -44
- package/dist/chunk-VI76WLBB.js +0 -1111
- package/dist/chunk-VPWIZK3L.js +0 -38
- package/dist/chunk-VPYZQMFC.js +0 -41
- package/dist/chunk-VTG5OLQE.js +0 -23
- package/dist/chunk-VW26B25E.js +0 -27
- package/dist/chunk-VWKIXPFH.js +0 -150
- package/dist/chunk-VXO6WZ3Z.js +0 -352
- package/dist/chunk-VYRJGD3W.js +0 -44
- package/dist/chunk-W3M6SKHX.js +0 -84
- package/dist/chunk-WDVOU5L7.js +0 -75
- package/dist/chunk-WS7EBKQB.js +0 -46
- package/dist/chunk-WWAUXGX2.js +0 -196
- package/dist/chunk-X6QBUAE7.js +0 -31
- package/dist/chunk-XA3YT5Q2.js +0 -150
- package/dist/chunk-XBB3NKEU.js +0 -47
- package/dist/chunk-XG2I3QRD.js +0 -44
- package/dist/chunk-XGCRUIXG.js +0 -89
- package/dist/chunk-XHYSFKTX.js +0 -110
- package/dist/chunk-XI3JRDGR.js +0 -117
- package/dist/chunk-XUECR2ZA.js +0 -63
- package/dist/chunk-XWUA27ZN.js +0 -48
- package/dist/chunk-XY6WLMUK.js +0 -382
- package/dist/chunk-XZLPFOLS.js +0 -52
- package/dist/chunk-Y7ITLLSE.js +0 -67
- package/dist/chunk-Y7YE4V4F.js +0 -37
- package/dist/chunk-YFWG72PF.js +0 -102
- package/dist/chunk-YPI6DSCZ.js +0 -70
- package/dist/chunk-YRU55K5G.js +0 -84
- package/dist/chunk-YS7PQUUJ.js +0 -75
- package/dist/chunk-YST6AG5L.js +0 -96
- package/dist/chunk-YTXJD5GL.js +0 -115
- package/dist/chunk-YX5EOMYE.js +0 -146
- package/dist/chunk-YY7FQURC.js +0 -49
- package/dist/chunk-Z7PWFZG5.js +0 -31
- package/dist/chunk-ZCYJW4VO.js +0 -43
- package/dist/chunk-ZDJILSU6.js +0 -114
- package/dist/chunk-ZF2QXXYV.js +0 -49
- package/dist/chunk-ZRVN7ENY.js +0 -103
- package/dist/chunk-ZZ67TT2L.js +0 -65
- package/dist/chunk-ZZBLTQMV.js +0 -93
- package/dist/chunk-ZZZGVQP2.js +0 -90
- package/dist/cil-4NTRZMJQ.js +0 -6
- package/dist/clean-KUOOU53X.js +0 -37
- package/dist/clike-4A47CONC.js +0 -6
- package/dist/clojure-75KJQHOT.js +0 -128
- package/dist/clojure-GPYUML3G.js +0 -6
- package/dist/clojure-repl-27PTLHND.js +0 -27
- package/dist/cmake-43UHNPVU.js +0 -35
- package/dist/cmake-XHQVRSQ5.js +0 -6
- package/dist/cobol-64KWYBJK.js +0 -6
- package/dist/coffeescript-4JZ4I4DJ.js +0 -6
- package/dist/coffeescript-5ISB4K2B.js +0 -349
- package/dist/concurnas-DEE5DK27.js +0 -6
- package/dist/coq-GCRWPPFV.js +0 -6
- package/dist/coq-I3MU43NM.js +0 -36
- package/dist/core-M7ZJ2T57.js +0 -10
- package/dist/core-PAF7XGL2.js +0 -1812
- package/dist/cos-BDS3BNLY.js +0 -99
- package/dist/cpp-WMMTB6Z5.js +0 -7
- package/dist/cpp-X7LHXYAC.js +0 -410
- package/dist/crmsh-NPCKI4XF.js +0 -98
- package/dist/crystal-6MLOCV2T.js +0 -323
- package/dist/crystal-QZNH3LTF.js +0 -7
- package/dist/csharp-6RC5RCHA.js +0 -439
- package/dist/csharp-JZQCFZ2W.js +0 -6
- package/dist/cshtml-Q3AEUCYO.js +0 -7
- package/dist/csp-63VXOBC6.js +0 -6
- package/dist/csp-HD534BNA.js +0 -35
- package/dist/css-CXTI7TAR.js +0 -598
- package/dist/css-DKIVWFWX.js +0 -6
- package/dist/css-extras-RFAQNL3I.js +0 -6
- package/dist/csv-UJQ7UNRS.js +0 -6
- package/dist/cypher-5OQNQZNY.js +0 -6
- package/dist/d-LB4S5ATW.js +0 -122
- package/dist/d-RO2SZ76A.js +0 -6
- package/dist/dart-SVXWFLRM.js +0 -190
- package/dist/dart-TX6ZWZJK.js +0 -6
- package/dist/dataweave-C63LGLUQ.js +0 -6
- package/dist/dax-LQO6GCPQ.js +0 -6
- package/dist/delphi-RZOGMBY2.js +0 -119
- package/dist/dhall-CWFBXH7J.js +0 -6
- package/dist/diff-5MQAJQDA.js +0 -6
- package/dist/diff-CNAQOB5T.js +0 -86
- package/dist/django-DO5A2BBG.js +0 -58
- package/dist/django-LDNPHKUL.js +0 -7
- package/dist/dns-3IEXY633.js +0 -46
- package/dist/dns-zone-file-IIOR6QPC.js +0 -6
- package/dist/docker-QHQSXWWE.js +0 -6
- package/dist/dockerfile-XCAM6RBC.js +0 -34
- package/dist/dos-353XQSPF.js +0 -62
- package/dist/dot-FZFNGGN4.js +0 -6
- package/dist/dsconfig-EL4H4BHC.js +0 -67
- package/dist/dts-PRAKWBHZ.js +0 -145
- package/dist/dust-K3XHDGD4.js +0 -45
- package/dist/ebnf-2I7WUAT6.js +0 -6
- package/dist/ebnf-7QWQH7U6.js +0 -52
- package/dist/editorconfig-5HL3ZBZ5.js +0 -6
- package/dist/eiffel-BXXJYVTD.js +0 -6
- package/dist/ejs-V23EGYZI.js +0 -7
- package/dist/elixir-4BXU7IWB.js +0 -6
- package/dist/elixir-YHCVHC4M.js +0 -261
- package/dist/elm-2PBJKJ5V.js +0 -6
- package/dist/elm-OBOS27Y5.js +0 -121
- package/dist/erb-KX4TUK25.js +0 -8
- package/dist/erb-PJNWCTHM.js +0 -28
- package/dist/erlang-4KHSXFRF.js +0 -193
- package/dist/erlang-TN5LAKO6.js +0 -6
- package/dist/erlang-repl-EIHHHRXL.js +0 -71
- package/dist/etlua-NZZ6VCFT.js +0 -8
- package/dist/excel-LG5PZNRY.js +0 -70
- package/dist/excel-formula-HM7AKF6W.js +0 -6
- package/dist/factor-RKUWQZSU.js +0 -6
- package/dist/false-NJNIJSO2.js +0 -6
- package/dist/firestore-security-rules-SBDPUL3P.js +0 -6
- package/dist/fix-JYGRXV2Y.js +0 -41
- package/dist/flix-CQCLWT33.js +0 -52
- package/dist/flow-Y55VHKDC.js +0 -6
- package/dist/fortran-2IHBO5MK.js +0 -6
- package/dist/fortran-IQ2XFJHI.js +0 -103
- package/dist/fsharp-J7D6JLGZ.js +0 -80
- package/dist/fsharp-WF5FZ7LA.js +0 -6
- package/dist/ftl-LJCJN7Q4.js +0 -7
- package/dist/gams-PR2YGF7X.js +0 -178
- package/dist/gap-Y4AO2KLQ.js +0 -6
- package/dist/gauss-JMPXYK2E.js +0 -207
- package/dist/gcode-EK5CT2F5.js +0 -89
- package/dist/gcode-ZSC2QT4W.js +0 -6
- package/dist/gdscript-JGK7ULGX.js +0 -6
- package/dist/gedcom-JAF2MTGV.js +0 -6
- package/dist/gherkin-ATPBN2I6.js +0 -6
- package/dist/gherkin-BR23VY6T.js +0 -52
- package/dist/git-SV5YOCHP.js +0 -6
- package/dist/glsl-RHLZ7EKY.js +0 -7
- package/dist/glsl-U5D2UFIG.js +0 -40
- package/dist/gml-C6VBD7IK.js +0 -33
- package/dist/gml-O6EMUU2A.js +0 -6
- package/dist/gn-OHYYO5RM.js +0 -6
- package/dist/go-F4XHE42I.js +0 -70
- package/dist/go-UT2RGVDA.js +0 -6
- package/dist/go-module-QIQ5R6GQ.js +0 -6
- package/dist/golo-ZQBS6DDL.js +0 -30
- package/dist/gradle-MQQPZV6O.js +0 -29
- package/dist/graphql-NBCTEMOM.js +0 -6
- package/dist/groovy-PWRNS4BH.js +0 -6
- package/dist/groovy-YE6LYQM2.js +0 -148
- package/dist/haml-ITEJGDAC.js +0 -7
- package/dist/haml-W64OGSGS.js +0 -118
- package/dist/handlebars-LFFHW3IR.js +0 -271
- package/dist/handlebars-ZPGPITLL.js +0 -7
- package/dist/haskell-BIZ4QX3J.js +0 -164
- package/dist/haskell-C6C7ZUBH.js +0 -6
- package/dist/haxe-6UYXTAGY.js +0 -6
- package/dist/haxe-YHKPBE6F.js +0 -163
- package/dist/hcl-H4J5WPVW.js +0 -6
- package/dist/hlsl-TUCZYFXH.js +0 -7
- package/dist/hoon-C72UYEHY.js +0 -6
- package/dist/hpkp-4EW432RJ.js +0 -6
- package/dist/hsp-LXHEYCGN.js +0 -63
- package/dist/hsts-LVDH7HSP.js +0 -6
- package/dist/htmlbars-5KWEJZGR.js +0 -279
- package/dist/http-PQTBDD2Y.js +0 -6
- package/dist/http-XGZV4XNH.js +0 -107
- package/dist/hy-LNAQE6EH.js +0 -83
- package/dist/ichigojam-O6JNIK22.js +0 -6
- package/dist/icon-E47SAPYS.js +0 -6
- package/dist/icu-message-format-XVNBRCFA.js +0 -6
- package/dist/idris-N4YK67TT.js +0 -7
- package/dist/iecst-RFCI6KVG.js +0 -6
- package/dist/ignore-ZEHMIXWJ.js +0 -6
- package/dist/inform7-V4RKQGYH.js +0 -6
- package/dist/inform7-V7MLPHUF.js +0 -67
- package/dist/ini-7GVFDZIN.js +0 -149
- package/dist/ini-WBFKRGCL.js +0 -6
- package/dist/io-J4QCHPK3.js +0 -6
- package/dist/irpf90-YM777KDU.js +0 -82
- package/dist/isbl-6UAZRVKL.js +0 -269
- package/dist/j-PPJZQQBV.js +0 -6
- package/dist/java-A6STBPJJ.js +0 -178
- package/dist/java-V4HKAR6U.js +0 -6
- package/dist/javadoc-IDO5IKKL.js +0 -8
- package/dist/javadoclike-RPHCI2IN.js +0 -6
- package/dist/javascript-HTBF3FXX.js +0 -553
- package/dist/javascript-VDWQYVQH.js +0 -6
- package/dist/javastacktrace-WAF42WNS.js +0 -6
- package/dist/jboss-cli-BXTWKRQB.js +0 -63
- package/dist/jexl-BDHF6EJ2.js +0 -6
- package/dist/jolie-PBYJRXEA.js +0 -6
- package/dist/jq-DWQFRBJQ.js +0 -6
- package/dist/js-extras-ZI7JBSYM.js +0 -6
- package/dist/js-templates-FXU6EPLQ.js +0 -6
- package/dist/jsdoc-AD6H7JYV.js +0 -8
- package/dist/json-2UBYQPYJ.js +0 -6
- package/dist/json-E5CSPKYL.js +0 -66
- package/dist/json5-DZRXL5LX.js +0 -7
- package/dist/jsonp-TQ3MTXTC.js +0 -7
- package/dist/jsstacktrace-PNLNOWKR.js +0 -6
- package/dist/jsx-TISJL234.js +0 -6
- package/dist/julia-NU5U7AGU.js +0 -357
- package/dist/julia-TX6ZVBF3.js +0 -6
- package/dist/julia-repl-OIDBGXCM.js +0 -36
- package/dist/keepalived-G5XCZPI3.js +0 -6
- package/dist/keyman-HXWRQQP5.js +0 -6
- package/dist/kotlin-DJ3A72A6.js +0 -6
- package/dist/kotlin-L7ACKMAK.js +0 -265
- package/dist/kumir-U7KR2CQL.js +0 -6
- package/dist/kusto-5V3MSTPA.js +0 -6
- package/dist/lasso-YCATBJLV.js +0 -171
- package/dist/latex-AG7CLUJR.js +0 -260
- package/dist/latex-WK7V4NEZ.js +0 -6
- package/dist/latte-HSTQPFKZ.js +0 -8
- package/dist/ldif-HEYL24X3.js +0 -46
- package/dist/leaf-TY56R55I.js +0 -53
- package/dist/less-BC5SBETQ.js +0 -6
- package/dist/less-FZLTHHQV.js +0 -660
- package/dist/lilypond-CEW2QO6F.js +0 -7
- package/dist/liquid-ZNYBOERX.js +0 -7
- package/dist/lisp-L2GJEHWA.js +0 -6
- package/dist/lisp-TWECV5KM.js +0 -119
- package/dist/livecodeserver-PDTS4VIL.js +0 -120
- package/dist/livescript-77OE7WDY.js +0 -6
- package/dist/livescript-ERXBO32F.js +0 -367
- package/dist/llvm-LC55WM6D.js +0 -6
- package/dist/llvm-RIX5A76Y.js +0 -101
- package/dist/log-QBGRVCXJ.js +0 -6
- package/dist/lolcode-SKUCYA5L.js +0 -6
- package/dist/lsl-HDLVDN5M.js +0 -91
- package/dist/lua-KAU53C2Y.js +0 -6
- package/dist/lua-TMUVBFS4.js +0 -72
- package/dist/magma-Q7UJZMAX.js +0 -6
- package/dist/makefile-DVLKHDQC.js +0 -6
- package/dist/makefile-RQEUBZE6.js +0 -83
- package/dist/markdown-4AMULLQZ.js +0 -6
- package/dist/markdown-H3RECS26.js +0 -240
- package/dist/markup-EZA5IZAQ.js +0 -6
- package/dist/markup-templating-5I4OWDQZ.js +0 -6
- package/dist/mathematica-X2CV2ORJ.js +0 -6752
- package/dist/matlab-HA2ZDOW5.js +0 -6
- package/dist/matlab-JHY3GUQF.js +0 -88
- package/dist/maxima-SCZDOUUP.js +0 -64
- package/dist/maxscript-PBLHKBYN.js +0 -6
- package/dist/mel-NNBJB4RX.js +0 -6
- package/dist/mel-YPIRI2ZF.js +0 -36
- package/dist/mercury-ZBCJ5QA5.js +0 -100
- package/dist/mermaid-CB75MOVI.js +0 -6
- package/dist/mipsasm-N2MMP3H5.js +0 -86
- package/dist/mizar-BGU4QAFJ.js +0 -6
- package/dist/mizar-QFX527OZ.js +0 -21
- package/dist/mojolicious-OHNOQFOT.js +0 -38
- package/dist/mongodb-6DIGE7PI.js +0 -6
- package/dist/monkey-23XCKAV4.js +0 -85
- package/dist/monkey-6PAD36I7.js +0 -6
- package/dist/moonscript-ANM24Q5F.js +0 -6
- package/dist/moonscript-DILF2N52.js +0 -149
- package/dist/n1ql-FPKTMALR.js +0 -57
- package/dist/n1ql-HFHLNSMI.js +0 -6
- package/dist/n4js-65HWN4LE.js +0 -6
- package/dist/nand2tetris-hdl-BAYGJJU5.js +0 -6
- package/dist/naniscript-IAUL5QB4.js +0 -6
- package/dist/nasm-6DTULDRK.js +0 -6
- package/dist/neon-HJDQAIXX.js +0 -6
- package/dist/nevod-TM27OJCF.js +0 -6
- package/dist/nginx-ATN5OWPX.js +0 -6
- package/dist/nginx-UDXYH6SK.js +0 -139
- package/dist/nim-3MXH37F6.js +0 -71
- package/dist/nim-7VJFGRSS.js +0 -6
- package/dist/nix-3UP2KQJV.js +0 -64
- package/dist/nix-L46VYGL7.js +0 -6
- package/dist/node-repl-TDWJP2US.js +0 -39
- package/dist/nsis-OLCKM2OQ.js +0 -6
- package/dist/nsis-XJEGWX52.js +0 -111
- package/dist/objectivec-DWNHB664.js +0 -7
- package/dist/objectivec-XCKTZ233.js +0 -97
- package/dist/ocaml-NFAHUCBR.js +0 -6
- package/dist/ocaml-VWCLQE3R.js +0 -75
- package/dist/opencl-NFBQ67K2.js +0 -7
- package/dist/openqasm-AATACU3S.js +0 -6
- package/dist/openscad-CPQUHPMH.js +0 -83
- package/dist/oxygene-MQABTQDT.js +0 -96
- package/dist/oz-IGEG4MKG.js +0 -6
- package/dist/parigp-WD2OYHYA.js +0 -6
- package/dist/parser-EC46CL5Z.js +0 -6
- package/dist/parser3-4U7VXY4D.js +0 -59
- package/dist/pascal-ZM7N7XI6.js +0 -6
- package/dist/pascaligo-VOW2F5TM.js +0 -6
- package/dist/pcaxis-DLFOVSI2.js +0 -6
- package/dist/peoplecode-6ITX2ZCX.js +0 -6
- package/dist/perl-CGUEEATA.js +0 -6
- package/dist/perl-UBL4OJLX.js +0 -481
- package/dist/pf-76A4A5PB.js +0 -45
- package/dist/pgsql-LIK5ZS5L.js +0 -389
- package/dist/php-7EQLL4WE.js +0 -193
- package/dist/php-XSQL7GRW.js +0 -7
- package/dist/php-extras-RRKQEQEL.js +0 -8
- package/dist/php-template-57AZD2Z7.js +0 -56
- package/dist/phpdoc-QDI6M4LY.js +0 -9
- package/dist/plaintext-WYWBF6Z2.js +0 -22
- package/dist/plsql-FHUXY3OA.js +0 -7
- package/dist/pony-74VLQBEB.js +0 -66
- package/dist/powerquery-S3HCZIVJ.js +0 -6
- package/dist/powershell-ITFSVUDU.js +0 -281
- package/dist/powershell-WXHZDFBQ.js +0 -6
- package/dist/processing-2HYZ4N2E.js +0 -30
- package/dist/processing-ZUXSK7VV.js +0 -6
- package/dist/profile-II54ZAM3.js +0 -47
- package/dist/prolog-6OLSKU6J.js +0 -91
- package/dist/prolog-ZA7S6MDA.js +0 -6
- package/dist/promql-NHWND3Y3.js +0 -6
- package/dist/properties-2XQOUKOY.js +0 -83
- package/dist/properties-RDIAXEEX.js +0 -6
- package/dist/protobuf-3SZ2I6CS.js +0 -6
- package/dist/protobuf-NIGMSZSW.js +0 -52
- package/dist/psl-XWM2TMD7.js +0 -6
- package/dist/pug-WXB4BWXX.js +0 -6
- package/dist/puppet-J4C3OTZJ.js +0 -6
- package/dist/puppet-RQLT7M2K.js +0 -122
- package/dist/pure-FBTHGZOO.js +0 -6
- package/dist/purebasic-2LTLHQ64.js +0 -71
- package/dist/purebasic-WVV7DOIB.js +0 -6
- package/dist/purescript-RXOXLHTJ.js +0 -7
- package/dist/python-2OWIXTS2.js +0 -413
- package/dist/python-Q7PQQBXF.js +0 -6
- package/dist/python-repl-4363EJU6.js +0 -39
- package/dist/q-WQHQ74HI.js +0 -34
- package/dist/q-XMCEWZHZ.js +0 -6
- package/dist/qml-MB4NQ4EN.js +0 -178
- package/dist/qml-TDTX2FOX.js +0 -6
- package/dist/qore-QFFKXLHX.js +0 -6
- package/dist/qsharp-QLDDINHN.js +0 -6
- package/dist/r-DBAVHB65.js +0 -6
- package/dist/r-GLK6S5LG.js +0 -176
- package/dist/racket-UEHPRU3V.js +0 -7
- package/dist/reason-XNIFFI7W.js +0 -6
- package/dist/reasonml-A3EFSD7I.js +0 -295
- package/dist/refractor-QSDT2DOR.js +0 -284
- package/dist/regex-4CQ7USX5.js +0 -6
- package/dist/rego-PLUAE5QB.js +0 -6
- package/dist/renpy-7EMYQZZ6.js +0 -6
- package/dist/rest-225MBRYC.js +0 -6
- package/dist/rib-KFPTWPSI.js +0 -25
- package/dist/rip-AXYWLNUV.js +0 -6
- package/dist/roboconf-LKZYOFZA.js +0 -6
- package/dist/roboconf-PELBKCRB.js +0 -79
- package/dist/robotframework-ZCHW4YTZ.js +0 -6
- package/dist/routeros-SFKQCZA7.js +0 -164
- package/dist/rsl-OHPWEDAF.js +0 -43
- package/dist/ruby-HAPPD2FX.js +0 -6
- package/dist/ruby-KMU4CFZI.js +0 -347
- package/dist/ruleslanguage-JRVEML72.js +0 -41
- package/dist/rust-GWPZ6K6F.js +0 -124
- package/dist/rust-II3IKW3A.js +0 -6
- package/dist/sas-REDCJ4GG.js +0 -67
- package/dist/sas-U7J6HVZ7.js +0 -6
- package/dist/sass-TKBUIBAH.js +0 -6
- package/dist/scala-BKM3HJ5P.js +0 -132
- package/dist/scala-YXYZXYU3.js +0 -7
- package/dist/scheme-L2XII7OS.js +0 -6
- package/dist/scheme-L5GI4534.js +0 -160
- package/dist/scilab-RDGG5TEY.js +0 -70
- package/dist/scss-KSCTK36Q.js +0 -6
- package/dist/scss-L2L5VPD4.js +0 -552
- package/dist/shell-YX5ZTB5V.js +0 -31
- package/dist/shell-session-2WVSNYB5.js +0 -7
- package/dist/smali-WMNIVHFT.js +0 -6
- package/dist/smali-YFVVIBQ7.js +0 -138
- package/dist/smalltalk-EPAXI7XI.js +0 -6
- package/dist/smalltalk-XP7QOZSK.js +0 -67
- package/dist/smarty-C74U5JCX.js +0 -7
- package/dist/sml-HPHZCXQF.js +0 -82
- package/dist/sml-NT457TPS.js +0 -6
- package/dist/solidity-ACQWP5D6.js +0 -6
- package/dist/solution-file-4BXI7NIR.js +0 -6
- package/dist/soy-X6AH2CEC.js +0 -7
- package/dist/sparql-MBUGV6LB.js +0 -7
- package/dist/splunk-spl-YQIAFL2U.js +0 -6
- package/dist/sqf-I3Z5XE6D.js +0 -87
- package/dist/sqf-S43C6245.js +0 -6
- package/dist/sql-432HMRQP.js +0 -656
- package/dist/sql-SJDNUHWK.js +0 -6
- package/dist/sql_more-CR57S3OV.js +0 -61
- package/dist/squirrel-HIKXYBM5.js +0 -6
- package/dist/stan-LWH7F5QB.js +0 -6
- package/dist/stan-MGV33MGT.js +0 -548
- package/dist/stata-C5PO4VDN.js +0 -55
- package/dist/step21-6KLQSVCR.js +0 -69
- package/dist/stylus-C2OYB6XW.js +0 -6
- package/dist/stylus-TOJOIULS.js +0 -606
- package/dist/subunit-FT4R2GX5.js +0 -55
- package/dist/swift-S3BIHCLS.js +0 -800
- package/dist/swift-Y7DRPFM3.js +0 -6
- package/dist/systemd-VLODGDWH.js +0 -6
- package/dist/t4-cs-MUM3N5J2.js +0 -8
- package/dist/t4-templating-ID2TOIZK.js +0 -6
- package/dist/t4-vb-I76OANZQ.js +0 -9
- package/dist/taggerscript-NEJM45HC.js +0 -54
- package/dist/tap-I4XIHTZU.js +0 -57
- package/dist/tap-K7GU7T4S.js +0 -7
- package/dist/tcl-2QDJCLVU.js +0 -6
- package/dist/tcl-E5GCJ2NX.js +0 -84
- package/dist/textile-DFNGZE2P.js +0 -6
- package/dist/thrift-RJET6KXH.js +0 -50
- package/dist/toml-OMHCCMZV.js +0 -6
- package/dist/tp-Y6IP6BUB.js +0 -92
- package/dist/tremor-LQA3C3TX.js +0 -6
- package/dist/tsx-PJL2YKP4.js +0 -8
- package/dist/tt2-AKGJU23V.js +0 -7
- package/dist/turtle-KOSR4ZJD.js +0 -6
- package/dist/twig-6JW3X2R4.js +0 -7
- package/dist/twig-VPSU2YYX.js +0 -71
- package/dist/typescript-6RGJN4BM.js +0 -6
- package/dist/typescript-OSGZS73E.js +0 -629
- package/dist/typoscript-YMWBVMGB.js +0 -6
- package/dist/unrealscript-SFZWOE4Y.js +0 -6
- package/dist/uorazor-HPGH2F4R.js +0 -6
- package/dist/uri-5RVLM6ZT.js +0 -6
- package/dist/v-RGI67KNZ.js +0 -6
- package/dist/vala-RFHWJ2XD.js +0 -6
- package/dist/vala-VBKBPL2T.js +0 -52
- package/dist/vbnet-73BMJ32Q.js +0 -7
- package/dist/vbnet-GXDSKTB2.js +0 -165
- package/dist/vbscript-3YM27JHE.js +0 -69
- package/dist/vbscript-html-S4JWBUVY.js +0 -25
- package/dist/velocity-JGUCMDQC.js +0 -6
- package/dist/verilog-AOZBVIGG.js +0 -73
- package/dist/verilog-ECF3DTV5.js +0 -6
- package/dist/vhdl-2VMGPF4Q.js +0 -52
- package/dist/vhdl-3V57YTN6.js +0 -6
- package/dist/vim-5J7HNV6Q.js +0 -75
- package/dist/vim-RSAFGBTG.js +0 -6
- package/dist/visual-basic-QHHGT3G3.js +0 -6
- package/dist/warpscript-CTWWWESY.js +0 -6
- package/dist/wasm-BXZNTGY5.js +0 -6
- package/dist/web-idl-S56AIP2L.js +0 -6
- package/dist/wiki-IP4EB6OT.js +0 -6
- package/dist/wolfram-6FDC4H6V.js +0 -6
- package/dist/wren-CYRENO5A.js +0 -6
- package/dist/x86asm-KHJQ6Z7A.js +0 -107
- package/dist/xeora-ZL5JDTGS.js +0 -6
- package/dist/xl-GATB5PE5.js +0 -78
- package/dist/xml-Z3UJSKI2.js +0 -255
- package/dist/xml-doc-JJND6TRR.js +0 -6
- package/dist/xojo-3NN6L4QN.js +0 -6
- package/dist/xquery-65PTA4AL.js +0 -6
- package/dist/xquery-BZOAA7PO.js +0 -162
- package/dist/yaml-36VYSGA7.js +0 -174
- package/dist/yaml-AECYHYE6.js +0 -6
- package/dist/yang-UZZMQYXU.js +0 -6
- package/dist/zephir-AUYZC5ZD.js +0 -119
- package/dist/zig-VBI3G2PD.js +0 -6
package/dist/index.js
CHANGED
|
@@ -1,485 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
require_refractor
|
|
4
|
-
} from "./chunk-VI76WLBB.js";
|
|
5
|
-
import "./chunk-ETSWXID3.js";
|
|
6
|
-
import "./chunk-2IKWR5BD.js";
|
|
7
|
-
import "./chunk-QL55MSIZ.js";
|
|
8
|
-
import "./chunk-Y7YE4V4F.js";
|
|
9
|
-
import "./chunk-426IPYWB.js";
|
|
10
|
-
import "./chunk-TMPJ5OQC.js";
|
|
11
|
-
import "./chunk-SBMAYFHQ.js";
|
|
12
|
-
import "./chunk-FYZGIFIR.js";
|
|
13
|
-
import "./chunk-L7KTXJ5T.js";
|
|
14
|
-
import "./chunk-NAIFU37T.js";
|
|
15
|
-
import "./chunk-QQOZXGR3.js";
|
|
16
|
-
import "./chunk-3XA6VTHO.js";
|
|
17
|
-
import "./chunk-3YPIA64V.js";
|
|
18
|
-
import "./chunk-XHYSFKTX.js";
|
|
19
|
-
import "./chunk-KSDU7X3Q.js";
|
|
20
|
-
import "./chunk-XBB3NKEU.js";
|
|
21
|
-
import "./chunk-4K6U3KST.js";
|
|
22
|
-
import "./chunk-EYSUQCKU.js";
|
|
23
|
-
import "./chunk-5OHRFMBB.js";
|
|
24
|
-
import "./chunk-BB7U4H7S.js";
|
|
25
|
-
import "./chunk-UICM7ISL.js";
|
|
26
|
-
import "./chunk-OI7PZLYM.js";
|
|
27
|
-
import "./chunk-C7DN7SOA.js";
|
|
28
|
-
import "./chunk-RYLEEMHX.js";
|
|
29
|
-
import "./chunk-JY4VLYST.js";
|
|
30
|
-
import "./chunk-ZZ67TT2L.js";
|
|
31
|
-
import "./chunk-UTCKMPAI.js";
|
|
32
|
-
import "./chunk-CNXZNSZ6.js";
|
|
33
|
-
import "./chunk-6ADGDPPW.js";
|
|
34
|
-
import "./chunk-HB5YQXW7.js";
|
|
35
|
-
import "./chunk-S22XTUNB.js";
|
|
36
|
-
import "./chunk-XUECR2ZA.js";
|
|
37
|
-
import "./chunk-4TTFS7AE.js";
|
|
38
|
-
import "./chunk-4ZSHUF27.js";
|
|
39
|
-
import "./chunk-6GAA6YLP.js";
|
|
40
|
-
import "./chunk-3M74OURW.js";
|
|
41
|
-
import "./chunk-DKM437DZ.js";
|
|
42
|
-
import "./chunk-BTRWHRUR.js";
|
|
43
|
-
import "./chunk-7GX444GM.js";
|
|
44
|
-
import "./chunk-UCYAOIJX.js";
|
|
45
|
-
import "./chunk-Y7ITLLSE.js";
|
|
46
|
-
import "./chunk-YTXJD5GL.js";
|
|
47
|
-
import "./chunk-VBFCRLKP.js";
|
|
48
|
-
import "./chunk-YPI6DSCZ.js";
|
|
49
|
-
import "./chunk-UBBKEK2F.js";
|
|
50
|
-
import "./chunk-E2NMFAHM.js";
|
|
51
|
-
import "./chunk-5BE7MV5Y.js";
|
|
52
|
-
import "./chunk-DRQ7XDNB.js";
|
|
53
|
-
import "./chunk-TPASKEDY.js";
|
|
54
|
-
import "./chunk-YST6AG5L.js";
|
|
55
|
-
import "./chunk-MQ4JGNKV.js";
|
|
56
|
-
import "./chunk-UJBVRUTD.js";
|
|
57
|
-
import "./chunk-DNPOVTXW.js";
|
|
58
|
-
import "./chunk-VWKIXPFH.js";
|
|
59
|
-
import "./chunk-IRYK7EBW.js";
|
|
60
|
-
import "./chunk-EAKZVVVK.js";
|
|
61
|
-
import "./chunk-ONRSXHI4.js";
|
|
62
|
-
import "./chunk-NSMEMFKE.js";
|
|
63
|
-
import "./chunk-F4GOSIEU.js";
|
|
64
|
-
import "./chunk-GKYHP5DM.js";
|
|
65
|
-
import "./chunk-L4OBEVKY.js";
|
|
66
|
-
import "./chunk-TUWKJH67.js";
|
|
67
|
-
import "./chunk-JM6YFZCJ.js";
|
|
68
|
-
import "./chunk-XGCRUIXG.js";
|
|
69
|
-
import "./chunk-J7PDPSEI.js";
|
|
70
|
-
import "./chunk-GHHVUAN4.js";
|
|
71
|
-
import "./chunk-P7WAXOIZ.js";
|
|
72
|
-
import "./chunk-VPYZQMFC.js";
|
|
73
|
-
import "./chunk-CU76RRBI.js";
|
|
74
|
-
import "./chunk-SVY64O64.js";
|
|
75
|
-
import "./chunk-XI3JRDGR.js";
|
|
76
|
-
import "./chunk-VYRJGD3W.js";
|
|
77
|
-
import "./chunk-DXN657MG.js";
|
|
78
|
-
import "./chunk-AXOTEEYA.js";
|
|
79
|
-
import "./chunk-A2TJMJHB.js";
|
|
80
|
-
import "./chunk-GN5JY4ON.js";
|
|
81
|
-
import "./chunk-PC37JIIX.js";
|
|
82
|
-
import "./chunk-HA25XUMO.js";
|
|
83
|
-
import "./chunk-76OIATWI.js";
|
|
84
|
-
import "./chunk-2OUDGY74.js";
|
|
85
|
-
import "./chunk-JIMMMDQX.js";
|
|
86
|
-
import "./chunk-NF3K6UKW.js";
|
|
87
|
-
import "./chunk-YS7PQUUJ.js";
|
|
88
|
-
import "./chunk-NHLJH2QU.js";
|
|
89
|
-
import "./chunk-LSJCH55S.js";
|
|
90
|
-
import "./chunk-27CW3EDR.js";
|
|
91
|
-
import "./chunk-DXOFOLMO.js";
|
|
92
|
-
import "./chunk-L2OROVEO.js";
|
|
93
|
-
import "./chunk-BBQV2JXP.js";
|
|
94
|
-
import "./chunk-SJSNOISF.js";
|
|
95
|
-
import "./chunk-OHGHYIQD.js";
|
|
96
|
-
import "./chunk-NO3DNLIA.js";
|
|
97
|
-
import "./chunk-EFDDCP6E.js";
|
|
98
|
-
import "./chunk-25FROOH6.js";
|
|
99
|
-
import "./chunk-QUWJFCWK.js";
|
|
100
|
-
import "./chunk-5U3JUGOR.js";
|
|
101
|
-
import "./chunk-OD2UFFIF.js";
|
|
102
|
-
import "./chunk-XG2I3QRD.js";
|
|
103
|
-
import "./chunk-55TJCXPI.js";
|
|
104
|
-
import "./chunk-6F34AU46.js";
|
|
105
|
-
import "./chunk-LSXW7LL3.js";
|
|
106
|
-
import "./chunk-RNTTNM5P.js";
|
|
107
|
-
import "./chunk-NOH3VCUN.js";
|
|
108
|
-
import "./chunk-3NKUT7TH.js";
|
|
109
|
-
import "./chunk-GBDND3J7.js";
|
|
110
|
-
import "./chunk-EDED7GO2.js";
|
|
111
|
-
import "./chunk-D7CBXSDT.js";
|
|
112
|
-
import "./chunk-ZCYJW4VO.js";
|
|
113
|
-
import "./chunk-FRTB7SKA.js";
|
|
114
|
-
import "./chunk-UU73JDYM.js";
|
|
115
|
-
import "./chunk-TVWUYRIS.js";
|
|
116
|
-
import "./chunk-5ME2UIV2.js";
|
|
117
|
-
import "./chunk-YRU55K5G.js";
|
|
118
|
-
import "./chunk-EYYK5DWC.js";
|
|
119
|
-
import "./chunk-UVOTXBDD.js";
|
|
120
|
-
import "./chunk-X6QBUAE7.js";
|
|
121
|
-
import "./chunk-LQIUIOZD.js";
|
|
122
|
-
import "./chunk-4WZAWVVD.js";
|
|
123
|
-
import "./chunk-WDVOU5L7.js";
|
|
124
|
-
import "./chunk-JXFYYAWX.js";
|
|
125
|
-
import "./chunk-L35GVMS6.js";
|
|
126
|
-
import "./chunk-ADKDXJMX.js";
|
|
127
|
-
import "./chunk-IDCGS2LG.js";
|
|
128
|
-
import "./chunk-L4KT7DFF.js";
|
|
129
|
-
import "./chunk-YY7FQURC.js";
|
|
130
|
-
import "./chunk-XY6WLMUK.js";
|
|
131
|
-
import "./chunk-UZ37NXAL.js";
|
|
132
|
-
import "./chunk-KMVKUGEN.js";
|
|
133
|
-
import "./chunk-U6KZOUWP.js";
|
|
134
|
-
import "./chunk-VXO6WZ3Z.js";
|
|
135
|
-
import "./chunk-NQVYKPWZ.js";
|
|
136
|
-
import "./chunk-Q7YUTUXA.js";
|
|
137
|
-
import "./chunk-TYBQXIHB.js";
|
|
138
|
-
import "./chunk-IGC26U6E.js";
|
|
139
|
-
import "./chunk-WWAUXGX2.js";
|
|
140
|
-
import "./chunk-24VYMNIF.js";
|
|
141
|
-
import "./chunk-YX5EOMYE.js";
|
|
142
|
-
import "./chunk-EG5ENAMF.js";
|
|
143
|
-
import "./chunk-5SUD76JK.js";
|
|
144
|
-
import "./chunk-7VWJOW6P.js";
|
|
145
|
-
import "./chunk-4TEDW65X.js";
|
|
146
|
-
import "./chunk-AHHMCY2J.js";
|
|
147
|
-
import "./chunk-NNKKBIBH.js";
|
|
148
|
-
import "./chunk-FDJQNDUI.js";
|
|
149
|
-
import "./chunk-M2XF7C43.js";
|
|
150
|
-
import "./chunk-BAVP462O.js";
|
|
151
|
-
import "./chunk-65KJS5T6.js";
|
|
152
|
-
import "./chunk-P4DAHZUQ.js";
|
|
153
|
-
import "./chunk-GSJ4ZPME.js";
|
|
154
|
-
import "./chunk-5WGGQBDN.js";
|
|
155
|
-
import "./chunk-VFSK564P.js";
|
|
156
|
-
import "./chunk-DMH4XPXJ.js";
|
|
157
|
-
import "./chunk-ZDJILSU6.js";
|
|
158
|
-
import "./chunk-53MOB7QD.js";
|
|
159
|
-
import "./chunk-CPE7WTCO.js";
|
|
160
|
-
import "./chunk-XA3YT5Q2.js";
|
|
161
|
-
import "./chunk-LSJTRURW.js";
|
|
162
|
-
import "./chunk-P5HX2PL4.js";
|
|
163
|
-
import "./chunk-MR5GJJCD.js";
|
|
164
|
-
import "./chunk-ZZZGVQP2.js";
|
|
165
|
-
import "./chunk-LP6PAX6W.js";
|
|
166
|
-
import "./chunk-AOICOBAF.js";
|
|
167
|
-
import "./chunk-R4WHSRPM.js";
|
|
168
|
-
import "./chunk-C475R4FS.js";
|
|
169
|
-
import "./chunk-J5NTCYRJ.js";
|
|
170
|
-
import "./chunk-MLZ6Z4NJ.js";
|
|
171
|
-
import "./chunk-DL5KKDDX.js";
|
|
172
|
-
import "./chunk-OA6YIRHQ.js";
|
|
173
|
-
import "./chunk-33VUG2QM.js";
|
|
174
|
-
import "./chunk-NZY5EZK5.js";
|
|
175
|
-
import "./chunk-MSFD2P6X.js";
|
|
176
|
-
import "./chunk-VW26B25E.js";
|
|
177
|
-
import "./chunk-QLTOG4MT.js";
|
|
178
|
-
import "./chunk-FUNANJQD.js";
|
|
179
|
-
import "./chunk-P2R24TGR.js";
|
|
180
|
-
import "./chunk-P7POYAWI.js";
|
|
181
|
-
import "./chunk-TEUCS7CC.js";
|
|
182
|
-
import "./chunk-R7LE6OT4.js";
|
|
183
|
-
import "./chunk-CGQKUOBK.js";
|
|
184
|
-
import "./chunk-HPUECJDJ.js";
|
|
185
|
-
import "./chunk-ERCJ2723.js";
|
|
186
|
-
import "./chunk-FAV4X3VE.js";
|
|
187
|
-
import "./chunk-W3M6SKHX.js";
|
|
188
|
-
import "./chunk-7WBWN6D5.js";
|
|
189
|
-
import "./chunk-LW7TKM5V.js";
|
|
190
|
-
import "./chunk-TWAI6FLP.js";
|
|
191
|
-
import "./chunk-3JA2W53Z.js";
|
|
192
|
-
import "./chunk-YFWG72PF.js";
|
|
193
|
-
import "./chunk-V3FVSCNQ.js";
|
|
194
|
-
import "./chunk-T4XULMNE.js";
|
|
195
|
-
import "./chunk-47VKELNA.js";
|
|
196
|
-
import "./chunk-PAB77QMV.js";
|
|
197
|
-
import "./chunk-6YISWBMA.js";
|
|
198
|
-
import "./chunk-G3RVOSQS.js";
|
|
199
|
-
import "./chunk-UBOVR4MJ.js";
|
|
200
|
-
import "./chunk-FOMZNBFC.js";
|
|
201
|
-
import "./chunk-LNJTL4XT.js";
|
|
202
|
-
import "./chunk-3JNYM26W.js";
|
|
203
|
-
import "./chunk-D2R2ZRRH.js";
|
|
204
|
-
import "./chunk-5NFJPAWG.js";
|
|
205
|
-
import "./chunk-ZF2QXXYV.js";
|
|
206
|
-
import "./chunk-TEVPUTJN.js";
|
|
207
|
-
import "./chunk-4BINGQXR.js";
|
|
208
|
-
import "./chunk-QPFIT7U6.js";
|
|
209
|
-
import "./chunk-RQJWBEFF.js";
|
|
210
|
-
import "./chunk-C4VUAB44.js";
|
|
211
|
-
import "./chunk-DWJTQN4Q.js";
|
|
212
|
-
import "./chunk-75PP7PI6.js";
|
|
213
|
-
import "./chunk-5ONN2BWW.js";
|
|
214
|
-
import "./chunk-DYCT6UGG.js";
|
|
215
|
-
import "./chunk-R4PER7NZ.js";
|
|
216
|
-
import "./chunk-OBW6XSZ6.js";
|
|
217
|
-
import "./chunk-IYWSMRMM.js";
|
|
218
|
-
import "./chunk-RWBIPKOM.js";
|
|
219
|
-
import "./chunk-K4XC3DN3.js";
|
|
220
|
-
import "./chunk-ITUYRI56.js";
|
|
221
|
-
import "./chunk-VTG5OLQE.js";
|
|
222
|
-
import "./chunk-5MBEKVFI.js";
|
|
223
|
-
import "./chunk-TWMU5FT4.js";
|
|
224
|
-
import "./chunk-ZZBLTQMV.js";
|
|
225
|
-
import "./chunk-BU4UGOKB.js";
|
|
226
|
-
import "./chunk-IHY66EFI.js";
|
|
227
|
-
import "./chunk-AKXYCA25.js";
|
|
228
|
-
import "./chunk-SY2RM5AY.js";
|
|
229
|
-
import "./chunk-SMATBXJT.js";
|
|
230
|
-
import "./chunk-BFG2SVED.js";
|
|
231
|
-
import "./chunk-3CTY5M4I.js";
|
|
232
|
-
import "./chunk-3NZA4542.js";
|
|
233
|
-
import "./chunk-IOV4LKPF.js";
|
|
234
|
-
import "./chunk-BYU5NTFP.js";
|
|
235
|
-
import "./chunk-HENRLFPS.js";
|
|
236
|
-
import "./chunk-D63D46H6.js";
|
|
237
|
-
import "./chunk-3F6K75JF.js";
|
|
238
|
-
import "./chunk-C7D4KPR4.js";
|
|
239
|
-
import "./chunk-VPWIZK3L.js";
|
|
240
|
-
import "./chunk-4LPMZE4K.js";
|
|
241
|
-
import "./chunk-3REW723S.js";
|
|
242
|
-
import "./chunk-XWUA27ZN.js";
|
|
243
|
-
import "./chunk-PO4QV4WT.js";
|
|
244
|
-
import "./chunk-ZRVN7ENY.js";
|
|
245
|
-
import "./chunk-UDSEA732.js";
|
|
246
|
-
import "./chunk-JLIGTJAV.js";
|
|
247
|
-
import "./chunk-J2I2GALQ.js";
|
|
248
|
-
import "./chunk-3WE5FOC4.js";
|
|
249
|
-
import "./chunk-T27V63VN.js";
|
|
250
|
-
import "./chunk-T4XZBJRX.js";
|
|
251
|
-
import "./chunk-WS7EBKQB.js";
|
|
252
|
-
import "./chunk-BA736DVE.js";
|
|
253
|
-
import "./chunk-T2JKOELM.js";
|
|
254
|
-
import "./chunk-UAYBD6YK.js";
|
|
255
|
-
import "./chunk-53TH3G7L.js";
|
|
256
|
-
import "./chunk-44ZZWXGU.js";
|
|
257
|
-
import "./chunk-O374MFIY.js";
|
|
258
|
-
import "./chunk-DSAUO3FT.js";
|
|
259
|
-
import "./chunk-N2HL4FSP.js";
|
|
260
|
-
import "./chunk-25D4C7RW.js";
|
|
261
|
-
import "./chunk-HQ25WWHW.js";
|
|
262
|
-
import "./chunk-N4CDNUSI.js";
|
|
263
|
-
import "./chunk-IZCOKOL4.js";
|
|
264
|
-
import "./chunk-4LROSNN7.js";
|
|
265
|
-
import "./chunk-NSD6XBVX.js";
|
|
266
|
-
import "./chunk-QCTJEID3.js";
|
|
267
|
-
import "./chunk-45XBO57H.js";
|
|
268
|
-
import "./chunk-IZLK5PA4.js";
|
|
269
|
-
import "./chunk-HBR63ZQM.js";
|
|
270
|
-
import "./chunk-EVWTNGR2.js";
|
|
271
|
-
import "./chunk-NY53DQIO.js";
|
|
272
|
-
import "./chunk-XZLPFOLS.js";
|
|
273
|
-
import "./chunk-QINIWGYX.js";
|
|
274
|
-
import "./chunk-V3DTC5F2.js";
|
|
275
|
-
import "./chunk-6LOQWZPI.js";
|
|
276
|
-
import "./chunk-RSMTA6GK.js";
|
|
277
|
-
import "./chunk-FU6GDCL4.js";
|
|
278
|
-
import "./chunk-KFXYXJEI.js";
|
|
279
|
-
import "./chunk-2QPRZKG7.js";
|
|
280
|
-
import "./chunk-E2GZUORL.js";
|
|
281
|
-
import "./chunk-HI5JB7PA.js";
|
|
282
|
-
import "./chunk-O2OFPBPK.js";
|
|
283
|
-
import {
|
|
284
|
-
__commonJS,
|
|
285
|
-
__toESM
|
|
286
|
-
} from "./chunk-Z7PWFZG5.js";
|
|
287
|
-
|
|
288
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js
|
|
289
|
-
var require_objectWithoutPropertiesLoose = __commonJS({
|
|
290
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
|
|
291
|
-
"use strict";
|
|
292
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
293
|
-
if (null == r) return {};
|
|
294
|
-
var t = {};
|
|
295
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
296
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
297
|
-
t[n] = r[n];
|
|
298
|
-
}
|
|
299
|
-
return t;
|
|
300
|
-
}
|
|
301
|
-
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
306
|
-
var require_objectWithoutProperties = __commonJS({
|
|
307
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/objectWithoutProperties.js"(exports, module) {
|
|
308
|
-
"use strict";
|
|
309
|
-
var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose();
|
|
310
|
-
function _objectWithoutProperties2(e, t) {
|
|
311
|
-
if (null == e) return {};
|
|
312
|
-
var o, r, i = objectWithoutPropertiesLoose(e, t);
|
|
313
|
-
if (Object.getOwnPropertySymbols) {
|
|
314
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
315
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
316
|
-
}
|
|
317
|
-
return i;
|
|
318
|
-
}
|
|
319
|
-
module.exports = _objectWithoutProperties2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/arrayLikeToArray.js
|
|
324
|
-
var require_arrayLikeToArray = __commonJS({
|
|
325
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/arrayLikeToArray.js"(exports, module) {
|
|
326
|
-
"use strict";
|
|
327
|
-
function _arrayLikeToArray(r, a) {
|
|
328
|
-
(null == a || a > r.length) && (a = r.length);
|
|
329
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
330
|
-
return n;
|
|
331
|
-
}
|
|
332
|
-
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
|
|
337
|
-
var require_arrayWithoutHoles = __commonJS({
|
|
338
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"(exports, module) {
|
|
339
|
-
"use strict";
|
|
340
|
-
var arrayLikeToArray = require_arrayLikeToArray();
|
|
341
|
-
function _arrayWithoutHoles(r) {
|
|
342
|
-
if (Array.isArray(r)) return arrayLikeToArray(r);
|
|
343
|
-
}
|
|
344
|
-
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/iterableToArray.js
|
|
349
|
-
var require_iterableToArray = __commonJS({
|
|
350
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/iterableToArray.js"(exports, module) {
|
|
351
|
-
"use strict";
|
|
352
|
-
function _iterableToArray(r) {
|
|
353
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
354
|
-
}
|
|
355
|
-
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js
|
|
360
|
-
var require_unsupportedIterableToArray = __commonJS({
|
|
361
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"(exports, module) {
|
|
362
|
-
"use strict";
|
|
363
|
-
var arrayLikeToArray = require_arrayLikeToArray();
|
|
364
|
-
function _unsupportedIterableToArray(r, a) {
|
|
365
|
-
if (r) {
|
|
366
|
-
if ("string" == typeof r) return arrayLikeToArray(r, a);
|
|
367
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
368
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/nonIterableSpread.js
|
|
376
|
-
var require_nonIterableSpread = __commonJS({
|
|
377
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/nonIterableSpread.js"(exports, module) {
|
|
378
|
-
"use strict";
|
|
379
|
-
function _nonIterableSpread() {
|
|
380
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
381
|
-
}
|
|
382
|
-
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
387
|
-
var require_toConsumableArray = __commonJS({
|
|
388
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/toConsumableArray.js"(exports, module) {
|
|
389
|
-
"use strict";
|
|
390
|
-
var arrayWithoutHoles = require_arrayWithoutHoles();
|
|
391
|
-
var iterableToArray = require_iterableToArray();
|
|
392
|
-
var unsupportedIterableToArray = require_unsupportedIterableToArray();
|
|
393
|
-
var nonIterableSpread = require_nonIterableSpread();
|
|
394
|
-
function _toConsumableArray2(r) {
|
|
395
|
-
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
|
|
396
|
-
}
|
|
397
|
-
module.exports = _toConsumableArray2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
398
|
-
}
|
|
399
|
-
});
|
|
400
|
-
|
|
401
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/typeof.js
|
|
402
|
-
var require_typeof = __commonJS({
|
|
403
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/typeof.js"(exports, module) {
|
|
404
|
-
"use strict";
|
|
405
|
-
function _typeof(o) {
|
|
406
|
-
"@babel/helpers - typeof";
|
|
407
|
-
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
408
|
-
return typeof o2;
|
|
409
|
-
} : function(o2) {
|
|
410
|
-
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
411
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
|
|
412
|
-
}
|
|
413
|
-
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/toPrimitive.js
|
|
418
|
-
var require_toPrimitive = __commonJS({
|
|
419
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module) {
|
|
420
|
-
"use strict";
|
|
421
|
-
var _typeof = require_typeof()["default"];
|
|
422
|
-
function toPrimitive(t, r) {
|
|
423
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
424
|
-
var e = t[Symbol.toPrimitive];
|
|
425
|
-
if (void 0 !== e) {
|
|
426
|
-
var i = e.call(t, r || "default");
|
|
427
|
-
if ("object" != _typeof(i)) return i;
|
|
428
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
429
|
-
}
|
|
430
|
-
return ("string" === r ? String : Number)(t);
|
|
431
|
-
}
|
|
432
|
-
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/toPropertyKey.js
|
|
437
|
-
var require_toPropertyKey = __commonJS({
|
|
438
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module) {
|
|
439
|
-
"use strict";
|
|
440
|
-
var _typeof = require_typeof()["default"];
|
|
441
|
-
var toPrimitive = require_toPrimitive();
|
|
442
|
-
function toPropertyKey(t) {
|
|
443
|
-
var i = toPrimitive(t, "string");
|
|
444
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
445
|
-
}
|
|
446
|
-
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
|
|
450
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/defineProperty.js
|
|
451
|
-
var require_defineProperty = __commonJS({
|
|
452
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module) {
|
|
453
|
-
"use strict";
|
|
454
|
-
var toPropertyKey = require_toPropertyKey();
|
|
455
|
-
function _defineProperty3(e, r, t) {
|
|
456
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
457
|
-
value: t,
|
|
458
|
-
enumerable: true,
|
|
459
|
-
configurable: true,
|
|
460
|
-
writable: true
|
|
461
|
-
}) : e[r] = t, e;
|
|
462
|
-
}
|
|
463
|
-
module.exports = _defineProperty3, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
464
|
-
}
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
// ../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/extends.js
|
|
468
|
-
var require_extends = __commonJS({
|
|
469
|
-
"../../../node_modules/.pnpm/@babel+runtime@7.28.4/node_modules/@babel/runtime/helpers/extends.js"(exports, module) {
|
|
470
|
-
"use strict";
|
|
471
|
-
function _extends2() {
|
|
472
|
-
return module.exports = _extends2 = Object.assign ? Object.assign.bind() : function(n) {
|
|
473
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
474
|
-
var t = arguments[e];
|
|
475
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
476
|
-
}
|
|
477
|
-
return n;
|
|
478
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends2.apply(null, arguments);
|
|
479
|
-
}
|
|
480
|
-
module.exports = _extends2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
481
|
-
}
|
|
482
|
-
});
|
|
483
2
|
|
|
484
3
|
// src/useChat.ts
|
|
485
4
|
import { useCallback as useCallback2, useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
@@ -784,9 +303,9 @@ var useChatStateStore = create((set, get) => ({
|
|
|
784
303
|
streamingIndicator: void 0,
|
|
785
304
|
currentThought: void 0,
|
|
786
305
|
messages: [],
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
306
|
+
browserFrame: void 0,
|
|
307
|
+
browserFrameFormat: void 0,
|
|
308
|
+
browserFrameUpdatedAt: void 0,
|
|
790
309
|
tools: {
|
|
791
310
|
tools: [],
|
|
792
311
|
agent_tools: /* @__PURE__ */ new Map()
|
|
@@ -810,18 +329,11 @@ var useChatStateStore = create((set, get) => ({
|
|
|
810
329
|
setCurrentThought: (thought) => {
|
|
811
330
|
set({ currentThought: thought });
|
|
812
331
|
},
|
|
813
|
-
|
|
814
|
-
set({
|
|
815
|
-
browserSessionId: sessionId,
|
|
816
|
-
browserViewerUrl: viewerUrl,
|
|
817
|
-
browserStreamUrl: streamUrl
|
|
818
|
-
});
|
|
819
|
-
},
|
|
820
|
-
clearBrowserSession: () => {
|
|
332
|
+
setBrowserFrame: (frameSrc, format) => {
|
|
821
333
|
set({
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
334
|
+
browserFrame: frameSrc,
|
|
335
|
+
browserFrameFormat: format ?? "png",
|
|
336
|
+
browserFrameUpdatedAt: Date.now()
|
|
825
337
|
});
|
|
826
338
|
},
|
|
827
339
|
getToolByName: (toolName) => {
|
|
@@ -836,13 +348,18 @@ var useChatStateStore = create((set, get) => ({
|
|
|
836
348
|
set((state) => {
|
|
837
349
|
if (isDistriEvent(message)) {
|
|
838
350
|
const event = message;
|
|
839
|
-
if (event.type === "
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
351
|
+
if (event.type === "browser_screenshot") {
|
|
352
|
+
if (event.data.image) {
|
|
353
|
+
const format = event.data.format || "png";
|
|
354
|
+
const frameSrc = `data:image/${format};base64,${event.data.image}`;
|
|
355
|
+
return {
|
|
356
|
+
...state,
|
|
357
|
+
browserFrame: frameSrc,
|
|
358
|
+
browserFrameFormat: format,
|
|
359
|
+
browserFrameUpdatedAt: event.data.timestamp_ms || Date.now()
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
return state;
|
|
846
363
|
}
|
|
847
364
|
if (event.type === "text_message_start") {
|
|
848
365
|
const messageId = event.data.message_id;
|
|
@@ -1357,9 +874,9 @@ var useChatStateStore = create((set, get) => ({
|
|
|
1357
874
|
isStreaming: false,
|
|
1358
875
|
isLoading: false,
|
|
1359
876
|
error: null,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
877
|
+
browserFrame: void 0,
|
|
878
|
+
browserFrameFormat: void 0,
|
|
879
|
+
browserFrameUpdatedAt: void 0
|
|
1363
880
|
});
|
|
1364
881
|
},
|
|
1365
882
|
// Helper to complete any running steps (for cleanup)
|
|
@@ -1396,6 +913,13 @@ var useChatStateStore = create((set, get) => ({
|
|
|
1396
913
|
return newState;
|
|
1397
914
|
});
|
|
1398
915
|
},
|
|
916
|
+
clearBrowserFrame: () => {
|
|
917
|
+
set({
|
|
918
|
+
browserFrame: void 0,
|
|
919
|
+
browserFrameFormat: void 0,
|
|
920
|
+
browserFrameUpdatedAt: void 0
|
|
921
|
+
});
|
|
922
|
+
},
|
|
1399
923
|
getCurrentTask: () => {
|
|
1400
924
|
const state = get();
|
|
1401
925
|
if (!state.currentTaskId) return null;
|
|
@@ -1544,7 +1068,7 @@ function useChat({
|
|
|
1544
1068
|
setAgent(agent);
|
|
1545
1069
|
}
|
|
1546
1070
|
}, [agent, setAgent]);
|
|
1547
|
-
const cleanupRef = useRef2(
|
|
1071
|
+
const cleanupRef = useRef2();
|
|
1548
1072
|
cleanupRef.current = () => {
|
|
1549
1073
|
setStreamingIndicator(void 0);
|
|
1550
1074
|
setStreaming(false);
|
|
@@ -1837,14 +1361,14 @@ var DistriContext = createContext3({
|
|
|
1837
1361
|
error: null,
|
|
1838
1362
|
isLoading: true
|
|
1839
1363
|
});
|
|
1840
|
-
function DistriProviderInner({ config, children
|
|
1841
|
-
const { token,
|
|
1364
|
+
function DistriProviderInner({ config, children }) {
|
|
1365
|
+
const { token, error: authError, requestAuth } = useDistriAuth();
|
|
1842
1366
|
const [client, setClient] = useState4(null);
|
|
1843
1367
|
const [initError, setInitError] = useState4(null);
|
|
1368
|
+
const authReady = config.authReady !== false;
|
|
1844
1369
|
useEffect4(() => {
|
|
1845
1370
|
try {
|
|
1846
|
-
if (!client) {
|
|
1847
|
-
if (config.debug) console.log("[DistriProvider] Initializing client");
|
|
1371
|
+
if (!client && authReady) {
|
|
1848
1372
|
const currentClient = new DistriClient2({
|
|
1849
1373
|
...config,
|
|
1850
1374
|
accessToken: token || config.accessToken,
|
|
@@ -1857,15 +1381,14 @@ function DistriProviderInner({ config, children, authReady = true }) {
|
|
|
1857
1381
|
console.error("[DistriProvider] Failed to initialize client:", err);
|
|
1858
1382
|
setInitError(err instanceof Error ? err : new Error("Failed to initialize client"));
|
|
1859
1383
|
}
|
|
1860
|
-
}, [config, client, requestAuth, token]);
|
|
1861
|
-
const isAuthInProgress = status === "loading";
|
|
1862
|
-
const isLoading = !client || isAuthInProgress || !authReady;
|
|
1384
|
+
}, [config, client, requestAuth, token, authReady]);
|
|
1863
1385
|
const contextValue = useMemo2(() => ({
|
|
1864
1386
|
client,
|
|
1865
1387
|
error: initError || (authError ? new Error(authError) : null),
|
|
1866
|
-
|
|
1388
|
+
// We are loading if the client isn't ready OR authReady is false
|
|
1389
|
+
isLoading: !client || !authReady,
|
|
1867
1390
|
token
|
|
1868
|
-
}), [client, initError, authError,
|
|
1391
|
+
}), [client, initError, authError, authReady, token]);
|
|
1869
1392
|
return /* @__PURE__ */ jsx6(DistriContext.Provider, { value: contextValue, children });
|
|
1870
1393
|
}
|
|
1871
1394
|
function DistriProvider(props) {
|
|
@@ -1910,7 +1433,6 @@ function useAgent({
|
|
|
1910
1433
|
const currentAgentIdRef = useRef4(null);
|
|
1911
1434
|
const currentClientRef = useRef4(null);
|
|
1912
1435
|
const initializeAgent = useCallback4(async () => {
|
|
1913
|
-
console.log("[useAgent] initializeAgent called", { hasClient: !!client, agentIdOrDef });
|
|
1914
1436
|
if (!client || !agentIdOrDef) return;
|
|
1915
1437
|
if (currentAgentIdRef.current === agentIdOrDef && agentRef.current && currentClientRef.current === client) {
|
|
1916
1438
|
return;
|
|
@@ -1920,14 +1442,11 @@ function useAgent({
|
|
|
1920
1442
|
try {
|
|
1921
1443
|
let newAgent;
|
|
1922
1444
|
if (typeof agentIdOrDef === "string") {
|
|
1923
|
-
console.log("[useAgent] Fetching agent config for:", agentIdOrDef);
|
|
1924
1445
|
const agentConfig = await client.getAgent(agentIdOrDef);
|
|
1925
1446
|
newAgent = new Agent3(agentConfig, client);
|
|
1926
1447
|
} else {
|
|
1927
|
-
console.log("[useAgent] Using provided agent definition");
|
|
1928
1448
|
newAgent = new Agent3(agentIdOrDef, client);
|
|
1929
1449
|
}
|
|
1930
|
-
console.log("[useAgent] Agent initialized successfully");
|
|
1931
1450
|
agentRef.current = newAgent;
|
|
1932
1451
|
currentAgentIdRef.current = agentIdOrDef;
|
|
1933
1452
|
currentClientRef.current = client;
|
|
@@ -1944,8 +1463,6 @@ function useAgent({
|
|
|
1944
1463
|
React6.useEffect(() => {
|
|
1945
1464
|
if (!clientLoading && !clientError && client && enabled) {
|
|
1946
1465
|
initializeAgent();
|
|
1947
|
-
} else if (enabled) {
|
|
1948
|
-
console.log("[useAgent] Waiting for client...", { clientLoading, clientError: !!clientError, hasClient: !!client });
|
|
1949
1466
|
}
|
|
1950
1467
|
}, [clientLoading, clientError, client, agentIdOrDef, initializeAgent, enabled]);
|
|
1951
1468
|
React6.useEffect(() => {
|
|
@@ -2038,19 +1555,11 @@ function useAgentDefinitions() {
|
|
|
2038
1555
|
// src/useThreads.ts
|
|
2039
1556
|
import { useState as useState7, useEffect as useEffect6, useCallback as useCallback6 } from "react";
|
|
2040
1557
|
function useThreads(options = {}) {
|
|
2041
|
-
const { enabled = true
|
|
1558
|
+
const { enabled = true } = options;
|
|
2042
1559
|
const { client, error: clientError, isLoading: clientLoading } = useDistri();
|
|
2043
1560
|
const [threads, setThreads] = useState7([]);
|
|
2044
|
-
const [total, setTotal] = useState7(0);
|
|
2045
|
-
const [page, setPage] = useState7(1);
|
|
2046
|
-
const [pageSize, setPageSizeState] = useState7(initialParams.limit || 30);
|
|
2047
1561
|
const [loading, setLoading] = useState7(true);
|
|
2048
1562
|
const [error, setError] = useState7(null);
|
|
2049
|
-
const [params, setParams] = useState7({
|
|
2050
|
-
limit: 30,
|
|
2051
|
-
offset: 0,
|
|
2052
|
-
...initialParams
|
|
2053
|
-
});
|
|
2054
1563
|
const fetchThreads = useCallback6(async () => {
|
|
2055
1564
|
if (!client) {
|
|
2056
1565
|
console.error("[useThreads] Client not available");
|
|
@@ -2061,18 +1570,15 @@ function useThreads(options = {}) {
|
|
|
2061
1570
|
try {
|
|
2062
1571
|
setLoading(true);
|
|
2063
1572
|
setError(null);
|
|
2064
|
-
const
|
|
2065
|
-
setThreads(
|
|
2066
|
-
setTotal(response.total);
|
|
2067
|
-
setPage(response.page);
|
|
2068
|
-
setPageSizeState(response.page_size);
|
|
1573
|
+
const fetchedThreads = await client.getThreads();
|
|
1574
|
+
setThreads(fetchedThreads);
|
|
2069
1575
|
} catch (err) {
|
|
2070
1576
|
console.error("[useThreads] Failed to fetch threads:", err);
|
|
2071
1577
|
setError(err instanceof Error ? err : new Error("Failed to fetch threads"));
|
|
2072
1578
|
} finally {
|
|
2073
1579
|
setLoading(false);
|
|
2074
1580
|
}
|
|
2075
|
-
}, [client
|
|
1581
|
+
}, [client]);
|
|
2076
1582
|
const fetchThread = useCallback6(async (threadId) => {
|
|
2077
1583
|
if (!client) {
|
|
2078
1584
|
throw new Error("Client not available");
|
|
@@ -2121,27 +1627,6 @@ function useThreads(options = {}) {
|
|
|
2121
1627
|
console.warn("Failed to update thread:", err);
|
|
2122
1628
|
}
|
|
2123
1629
|
}, [client]);
|
|
2124
|
-
const nextPage = useCallback6(() => {
|
|
2125
|
-
const currentOffset = params.offset || 0;
|
|
2126
|
-
const currentLimit = params.limit || 30;
|
|
2127
|
-
const newOffset = currentOffset + currentLimit;
|
|
2128
|
-
if (newOffset < total) {
|
|
2129
|
-
setParams((p) => ({ ...p, offset: newOffset }));
|
|
2130
|
-
}
|
|
2131
|
-
}, [params, total]);
|
|
2132
|
-
const prevPage = useCallback6(() => {
|
|
2133
|
-
const currentOffset = params.offset || 0;
|
|
2134
|
-
const currentLimit = params.limit || 30;
|
|
2135
|
-
const newOffset = Math.max(0, currentOffset - currentLimit);
|
|
2136
|
-
setParams((p) => ({ ...p, offset: newOffset }));
|
|
2137
|
-
}, [params]);
|
|
2138
|
-
const goToPage = useCallback6((pageNum) => {
|
|
2139
|
-
const currentLimit = params.limit || 30;
|
|
2140
|
-
setParams((p) => ({ ...p, offset: (pageNum - 1) * currentLimit }));
|
|
2141
|
-
}, [params.limit]);
|
|
2142
|
-
const setPageSize = useCallback6((size) => {
|
|
2143
|
-
setParams((p) => ({ ...p, limit: size, offset: 0 }));
|
|
2144
|
-
}, []);
|
|
2145
1630
|
useEffect6(() => {
|
|
2146
1631
|
if (clientLoading) {
|
|
2147
1632
|
setLoading(true);
|
|
@@ -2160,67 +1645,12 @@ function useThreads(options = {}) {
|
|
|
2160
1645
|
}, [clientLoading, clientError, client, fetchThreads, enabled]);
|
|
2161
1646
|
return {
|
|
2162
1647
|
threads,
|
|
2163
|
-
total,
|
|
2164
|
-
page,
|
|
2165
|
-
pageSize,
|
|
2166
1648
|
loading: loading || clientLoading,
|
|
2167
1649
|
error: error || clientError,
|
|
2168
|
-
params,
|
|
2169
|
-
setParams,
|
|
2170
1650
|
refetch: fetchThreads,
|
|
2171
1651
|
deleteThread,
|
|
2172
1652
|
fetchThread,
|
|
2173
|
-
updateThread
|
|
2174
|
-
nextPage,
|
|
2175
|
-
prevPage,
|
|
2176
|
-
goToPage,
|
|
2177
|
-
setPageSize
|
|
2178
|
-
};
|
|
2179
|
-
}
|
|
2180
|
-
function useAgentsByUsage() {
|
|
2181
|
-
const { client, error: clientError, isLoading: clientLoading } = useDistri();
|
|
2182
|
-
const [agents, setAgents] = useState7([]);
|
|
2183
|
-
const [loading, setLoading] = useState7(true);
|
|
2184
|
-
const [error, setError] = useState7(null);
|
|
2185
|
-
const fetchAgents = useCallback6(async () => {
|
|
2186
|
-
if (!client) {
|
|
2187
|
-
setError(new Error("Client not available"));
|
|
2188
|
-
setLoading(false);
|
|
2189
|
-
return;
|
|
2190
|
-
}
|
|
2191
|
-
try {
|
|
2192
|
-
setLoading(true);
|
|
2193
|
-
setError(null);
|
|
2194
|
-
const result = await client.getAgentsByUsage();
|
|
2195
|
-
setAgents(result);
|
|
2196
|
-
} catch (err) {
|
|
2197
|
-
console.error("[useAgentsByUsage] Failed to fetch agents:", err);
|
|
2198
|
-
setError(err instanceof Error ? err : new Error("Failed to fetch agents"));
|
|
2199
|
-
} finally {
|
|
2200
|
-
setLoading(false);
|
|
2201
|
-
}
|
|
2202
|
-
}, [client]);
|
|
2203
|
-
useEffect6(() => {
|
|
2204
|
-
if (clientLoading) {
|
|
2205
|
-
setLoading(true);
|
|
2206
|
-
return;
|
|
2207
|
-
}
|
|
2208
|
-
if (clientError) {
|
|
2209
|
-
setError(clientError);
|
|
2210
|
-
setLoading(false);
|
|
2211
|
-
return;
|
|
2212
|
-
}
|
|
2213
|
-
if (client) {
|
|
2214
|
-
fetchAgents();
|
|
2215
|
-
} else {
|
|
2216
|
-
setLoading(false);
|
|
2217
|
-
}
|
|
2218
|
-
}, [clientLoading, clientError, client, fetchAgents]);
|
|
2219
|
-
return {
|
|
2220
|
-
agents,
|
|
2221
|
-
loading: loading || clientLoading,
|
|
2222
|
-
error: error || clientError,
|
|
2223
|
-
refetch: fetchAgents
|
|
1653
|
+
updateThread
|
|
2224
1654
|
};
|
|
2225
1655
|
}
|
|
2226
1656
|
|
|
@@ -2229,7 +1659,12 @@ import { useState as useState14, useCallback as useCallback12, useRef as useRef1
|
|
|
2229
1659
|
|
|
2230
1660
|
// src/components/ChatInput.tsx
|
|
2231
1661
|
import { useRef as useRef6, useEffect as useEffect8, useCallback as useCallback9, useState as useState10, useMemo as useMemo3 } from "react";
|
|
2232
|
-
import
|
|
1662
|
+
import CodeMirror from "codemirror";
|
|
1663
|
+
import "codemirror/lib/codemirror.css";
|
|
1664
|
+
import "codemirror/theme/material-darker.css";
|
|
1665
|
+
import "codemirror/theme/eclipse.css";
|
|
1666
|
+
import "codemirror/addon/display/placeholder";
|
|
1667
|
+
import { Send, Square, X, Mic as Mic2, MicOff as MicOff2, Radio, Plus, Globe } from "lucide-react";
|
|
2233
1668
|
|
|
2234
1669
|
// src/components/VoiceInput.tsx
|
|
2235
1670
|
import { useState as useState9, useCallback as useCallback8, useEffect as useEffect7 } from "react";
|
|
@@ -2553,11 +1988,8 @@ var VoiceInput = ({
|
|
|
2553
1988
|
|
|
2554
1989
|
// src/components/ChatInput.tsx
|
|
2555
1990
|
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2556
|
-
var
|
|
2557
|
-
var
|
|
2558
|
-
var CM_THEME_LIGHT = "https://cdn.jsdelivr.net/npm/codemirror@5/theme/eclipse.min.css";
|
|
2559
|
-
var CM_JS = "https://cdn.jsdelivr.net/npm/codemirror@5/lib/codemirror.min.js";
|
|
2560
|
-
var CM_PLACEHOLDER = "https://cdn.jsdelivr.net/npm/codemirror@5/addon/display/placeholder.min.js";
|
|
1991
|
+
var DARK_THEME = "material-darker";
|
|
1992
|
+
var LIGHT_THEME = "eclipse";
|
|
2561
1993
|
var ChatInput = ({
|
|
2562
1994
|
value,
|
|
2563
1995
|
onChange,
|
|
@@ -2567,8 +1999,6 @@ var ChatInput = ({
|
|
|
2567
1999
|
disabled = false,
|
|
2568
2000
|
isStreaming = false,
|
|
2569
2001
|
browserEnabled = false,
|
|
2570
|
-
browserHasSession = false,
|
|
2571
|
-
browserLoading = false,
|
|
2572
2002
|
onToggleBrowser,
|
|
2573
2003
|
className = "",
|
|
2574
2004
|
attachedImages,
|
|
@@ -2580,7 +2010,8 @@ var ChatInput = ({
|
|
|
2580
2010
|
isStreamingVoice = false,
|
|
2581
2011
|
useSpeechRecognition: useSpeechRecognition2 = false,
|
|
2582
2012
|
onSpeechTranscript,
|
|
2583
|
-
variant = "default"
|
|
2013
|
+
variant = "default",
|
|
2014
|
+
theme = "auto"
|
|
2584
2015
|
}) => {
|
|
2585
2016
|
const textareaRef = useRef6(null);
|
|
2586
2017
|
const codeMirrorRef = useRef6(null);
|
|
@@ -2592,58 +2023,17 @@ var ChatInput = ({
|
|
|
2592
2023
|
const mediaRecorderRef = useRef6(null);
|
|
2593
2024
|
const [isRecording, setIsRecording] = useState10(false);
|
|
2594
2025
|
const [recordingTime, setRecordingTime] = useState10(0);
|
|
2595
|
-
const [isCodeMirrorReady, setIsCodeMirrorReady] = useState10(false);
|
|
2596
2026
|
const [isDarkMode, setIsDarkMode] = useState10(false);
|
|
2597
2027
|
const imageAttachments = useMemo3(() => attachedImages ?? [], [attachedImages]);
|
|
2598
|
-
|
|
2599
|
-
if (
|
|
2600
|
-
|
|
2028
|
+
useEffect8(() => {
|
|
2029
|
+
if (theme === "light") {
|
|
2030
|
+
setIsDarkMode(false);
|
|
2601
2031
|
return;
|
|
2602
2032
|
}
|
|
2603
|
-
if (
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
if (document.querySelector(`link[href="${href}"]`)) {
|
|
2607
|
-
resolve();
|
|
2608
|
-
return;
|
|
2609
|
-
}
|
|
2610
|
-
const link = document.createElement("link");
|
|
2611
|
-
link.rel = "stylesheet";
|
|
2612
|
-
link.href = href;
|
|
2613
|
-
link.onload = () => resolve();
|
|
2614
|
-
link.onerror = reject;
|
|
2615
|
-
document.head.appendChild(link);
|
|
2616
|
-
});
|
|
2617
|
-
const loadScript = (src) => new Promise((resolve, reject) => {
|
|
2618
|
-
if (document.querySelector(`script[src="${src}"]`)) {
|
|
2619
|
-
resolve();
|
|
2620
|
-
return;
|
|
2621
|
-
}
|
|
2622
|
-
const script = document.createElement("script");
|
|
2623
|
-
script.src = src;
|
|
2624
|
-
script.async = true;
|
|
2625
|
-
script.onload = () => resolve();
|
|
2626
|
-
script.onerror = reject;
|
|
2627
|
-
document.body.appendChild(script);
|
|
2628
|
-
});
|
|
2629
|
-
await loadCss(CM_CSS);
|
|
2630
|
-
await loadCss(CM_THEME_DARK);
|
|
2631
|
-
await loadCss(CM_THEME_LIGHT);
|
|
2632
|
-
await loadScript(CM_JS);
|
|
2633
|
-
await loadScript(CM_PLACEHOLDER);
|
|
2634
|
-
})();
|
|
2635
|
-
}
|
|
2636
|
-
try {
|
|
2637
|
-
await window.__distriCodeMirrorLoader;
|
|
2638
|
-
} catch (error) {
|
|
2639
|
-
console.error("Failed to load CodeMirror assets", error);
|
|
2033
|
+
if (theme === "dark") {
|
|
2034
|
+
setIsDarkMode(true);
|
|
2035
|
+
return;
|
|
2640
2036
|
}
|
|
2641
|
-
setIsCodeMirrorReady(!!window.CodeMirror);
|
|
2642
|
-
}, []);
|
|
2643
|
-
useEffect8(() => {
|
|
2644
|
-
void ensureCodeMirrorAssets();
|
|
2645
|
-
}, [ensureCodeMirrorAssets]);
|
|
2646
|
-
useEffect8(() => {
|
|
2647
2037
|
if (typeof window === "undefined") return;
|
|
2648
2038
|
const root = document.documentElement;
|
|
2649
2039
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -2665,40 +2055,45 @@ var ChatInput = ({
|
|
|
2665
2055
|
media.removeEventListener("change", update);
|
|
2666
2056
|
observer.disconnect();
|
|
2667
2057
|
};
|
|
2668
|
-
}, []);
|
|
2058
|
+
}, [theme]);
|
|
2669
2059
|
useEffect8(() => {
|
|
2670
|
-
if (
|
|
2671
|
-
|
|
2672
|
-
}
|
|
2673
|
-
const CodeMirror = window.CodeMirror;
|
|
2674
|
-
if (!CodeMirror) {
|
|
2060
|
+
if (typeof window === "undefined") return;
|
|
2061
|
+
if (!textareaRef.current || codeMirrorRef.current) {
|
|
2675
2062
|
return;
|
|
2676
2063
|
}
|
|
2677
2064
|
const cm = CodeMirror.fromTextArea(textareaRef.current, {
|
|
2678
2065
|
lineWrapping: true,
|
|
2679
|
-
theme: variant === "hero" || isDarkMode ?
|
|
2066
|
+
theme: variant === "hero" || isDarkMode ? DARK_THEME : LIGHT_THEME,
|
|
2680
2067
|
placeholder,
|
|
2681
2068
|
viewportMargin: Infinity
|
|
2682
2069
|
});
|
|
2683
2070
|
const wrapper = cm.getWrapperElement();
|
|
2684
2071
|
const scroller = cm.getScrollerElement();
|
|
2685
|
-
const
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
];
|
|
2692
|
-
const
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
scroller.style.
|
|
2701
|
-
scroller.style.padding = variant === "hero" ? "
|
|
2072
|
+
const darkBg = "#1c1f23";
|
|
2073
|
+
const lightBg = "#f8f9fa";
|
|
2074
|
+
const darkText = "#e0e0e0";
|
|
2075
|
+
const lightText = "#1a1a1a";
|
|
2076
|
+
const bgColor = isDarkMode ? darkBg : lightBg;
|
|
2077
|
+
const textColor = isDarkMode ? darkText : lightText;
|
|
2078
|
+
const shadowStyle = isDarkMode ? "shadow-[0_14px_40px_rgba(0,0,0,0.35)]" : "shadow-[0_4px_16px_rgba(0,0,0,0.1)]";
|
|
2079
|
+
const borderStyle = isDarkMode ? "border-transparent" : "border-gray-200";
|
|
2080
|
+
const baseWrapperClasses = ["rounded-2xl", "border", borderStyle];
|
|
2081
|
+
const heroWrapperClasses = [...baseWrapperClasses, "text-base", "leading-7"];
|
|
2082
|
+
const defaultWrapperClasses = [...baseWrapperClasses, "text-sm", "leading-6"];
|
|
2083
|
+
wrapper.classList.add("distri-chat-editor", "px-1", "py-1", shadowStyle);
|
|
2084
|
+
wrapper.style.backgroundColor = bgColor;
|
|
2085
|
+
wrapper.style.color = textColor;
|
|
2086
|
+
scroller.style.background = bgColor;
|
|
2087
|
+
scroller.style.color = textColor;
|
|
2088
|
+
scroller.style.padding = variant === "hero" ? "1rem 1.25rem 1.25rem" : "0.35rem 0.5rem 0.75rem";
|
|
2089
|
+
const customStyles = document.createElement("style");
|
|
2090
|
+
const placeholderColor = isDarkMode ? "#888" : "#999";
|
|
2091
|
+
customStyles.textContent = `
|
|
2092
|
+
.distri-chat-editor .CodeMirror-cursor { border-left-color: ${textColor} !important; }
|
|
2093
|
+
.distri-chat-editor .CodeMirror-placeholder { color: ${placeholderColor} !important; }
|
|
2094
|
+
.distri-chat-editor .CodeMirror-line span { color: ${textColor}; }
|
|
2095
|
+
`;
|
|
2096
|
+
wrapper.appendChild(customStyles);
|
|
2702
2097
|
if (variant === "hero") {
|
|
2703
2098
|
wrapper.classList.add(...heroWrapperClasses);
|
|
2704
2099
|
} else {
|
|
@@ -2718,14 +2113,19 @@ var ChatInput = ({
|
|
|
2718
2113
|
void handleSendRef.current();
|
|
2719
2114
|
}
|
|
2720
2115
|
});
|
|
2721
|
-
const fixedHeight = variant === "hero" ? "220px" : "
|
|
2116
|
+
const fixedHeight = variant === "hero" ? "220px" : "100px";
|
|
2722
2117
|
cm.setSize("100%", fixedHeight);
|
|
2723
2118
|
codeMirrorRef.current = cm;
|
|
2724
2119
|
return () => {
|
|
2725
2120
|
cm.toTextArea();
|
|
2726
2121
|
codeMirrorRef.current = null;
|
|
2727
2122
|
};
|
|
2728
|
-
}, [isDarkMode,
|
|
2123
|
+
}, [isDarkMode, placeholder, variant]);
|
|
2124
|
+
useEffect8(() => {
|
|
2125
|
+
if (!codeMirrorRef.current) return;
|
|
2126
|
+
codeMirrorRef.current.setOption("theme", variant === "hero" || isDarkMode ? DARK_THEME : LIGHT_THEME);
|
|
2127
|
+
codeMirrorRef.current.setOption("placeholder", placeholder);
|
|
2128
|
+
}, [isDarkMode, placeholder, variant]);
|
|
2729
2129
|
useEffect8(() => {
|
|
2730
2130
|
valueRef.current = value;
|
|
2731
2131
|
}, [value]);
|
|
@@ -2857,16 +2257,15 @@ var ChatInput = ({
|
|
|
2857
2257
|
}, [handleSend]);
|
|
2858
2258
|
const hasContent = value.trim().length > 0 || imageAttachments.length > 0;
|
|
2859
2259
|
const isDisabled = disabled;
|
|
2860
|
-
const shellClass = "rounded-
|
|
2260
|
+
const shellClass = "rounded-2xl bg-transparent";
|
|
2861
2261
|
const innerShell = cn(
|
|
2862
|
-
"rounded-
|
|
2863
|
-
variant === "hero" && "
|
|
2262
|
+
"relative rounded-2xl bg-transparent px-2 py-2 flex flex-col gap-3",
|
|
2263
|
+
variant === "hero" && "p-0 min-h-[240px]"
|
|
2864
2264
|
);
|
|
2865
2265
|
const wrapperClass = "mx-0 sm:mx-1";
|
|
2866
2266
|
const previewClass = "gap-2 mb-2";
|
|
2867
|
-
const toolbarButton = "flex h-9 w-9 items-center justify-center rounded-full
|
|
2868
|
-
const toolbarButtonActive = "bg-primary/
|
|
2869
|
-
const subtleTextClass = variant === "hero" ? "text-base leading-7" : "text-sm leading-6";
|
|
2267
|
+
const toolbarButton = "flex h-9 w-9 items-center justify-center rounded-full border border-primary/20 text-muted-foreground transition hover:text-primary";
|
|
2268
|
+
const toolbarButtonActive = "bg-primary/10 text-primary border-primary/50";
|
|
2870
2269
|
return /* @__PURE__ */ jsx8("div", { className: cn("relative w-full", className), children: /* @__PURE__ */ jsxs3("div", { className: "flex flex-col w-full", children: [
|
|
2871
2270
|
imageAttachments.length > 0 && /* @__PURE__ */ jsx8("div", { className: cn("flex flex-wrap", previewClass, wrapperClass), children: imageAttachments.map((image) => /* @__PURE__ */ jsxs3("div", { className: "relative group", children: [
|
|
2872
2271
|
/* @__PURE__ */ jsx8(
|
|
@@ -2889,52 +2288,58 @@ var ChatInput = ({
|
|
|
2889
2288
|
/* @__PURE__ */ jsx8("div", { className: "absolute bottom-0 left-0 right-0 bg-black/50 text-white text-xs p-1 rounded-b-lg truncate", children: image.name })
|
|
2890
2289
|
] }, image.id)) }),
|
|
2891
2290
|
/* @__PURE__ */ jsx8("div", { className: cn(wrapperClass, shellClass), children: /* @__PURE__ */ jsxs3("div", { className: innerShell, children: [
|
|
2892
|
-
/* @__PURE__ */
|
|
2893
|
-
|
|
2894
|
-
|
|
2291
|
+
/* @__PURE__ */ jsx8("div", { className: "relative", children: /* @__PURE__ */ jsx8(
|
|
2292
|
+
"textarea",
|
|
2293
|
+
{
|
|
2294
|
+
ref: textareaRef,
|
|
2295
|
+
value,
|
|
2296
|
+
onChange: (e) => onChange(e.target.value),
|
|
2297
|
+
placeholder,
|
|
2298
|
+
rows: variant === "hero" ? 6 : 3,
|
|
2299
|
+
disabled,
|
|
2300
|
+
className: "absolute inset-0 h-full w-full resize-none bg-transparent text-transparent caret-transparent opacity-0"
|
|
2301
|
+
}
|
|
2302
|
+
) }),
|
|
2303
|
+
variant === "hero" ? /* @__PURE__ */ jsxs3("div", { className: "pointer-events-none absolute inset-0", children: [
|
|
2304
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute bottom-6 left-6", children: /* @__PURE__ */ jsx8(
|
|
2305
|
+
"button",
|
|
2895
2306
|
{
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
onChange: (e) => onChange(e.target.value),
|
|
2899
|
-
placeholder,
|
|
2900
|
-
rows: variant === "hero" ? 4 : 2,
|
|
2307
|
+
type: "button",
|
|
2308
|
+
onClick: () => fileInputRef.current?.click(),
|
|
2901
2309
|
disabled,
|
|
2902
|
-
className:
|
|
2310
|
+
className: cn(
|
|
2311
|
+
"pointer-events-auto flex h-9 w-9 items-center justify-center rounded-full border transition",
|
|
2312
|
+
isDarkMode ? "border-white/15 bg-[#1c1f23] text-muted-foreground hover:border-white/40 hover:text-foreground" : "border-gray-300 bg-white text-gray-600 hover:border-gray-400 hover:text-gray-800"
|
|
2313
|
+
),
|
|
2314
|
+
title: "Attach image",
|
|
2315
|
+
children: /* @__PURE__ */ jsx8(Plus, { className: "h-4 w-4" })
|
|
2903
2316
|
}
|
|
2904
|
-
),
|
|
2905
|
-
|
|
2906
|
-
"
|
|
2317
|
+
) }),
|
|
2318
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute bottom-6 right-6", children: /* @__PURE__ */ jsx8(
|
|
2319
|
+
"button",
|
|
2907
2320
|
{
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
void handleSend();
|
|
2918
|
-
}
|
|
2919
|
-
}
|
|
2321
|
+
type: "button",
|
|
2322
|
+
onClick: () => isStreaming ? handleStop() : void handleSend(),
|
|
2323
|
+
disabled: isStreaming ? false : !hasContent || isDisabled,
|
|
2324
|
+
className: cn(
|
|
2325
|
+
"pointer-events-auto flex h-9 w-9 items-center justify-center rounded-full shadow-lg transition",
|
|
2326
|
+
isStreaming ? "bg-amber-400 text-amber-950 hover:bg-amber-300" : hasContent ? "bg-primary text-primary-foreground hover:bg-primary/90" : "bg-muted text-muted-foreground"
|
|
2327
|
+
),
|
|
2328
|
+
title: isStreaming ? "Stop" : "Send",
|
|
2329
|
+
children: isStreaming ? /* @__PURE__ */ jsx8(Square, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx8(Send, { className: "h-4 w-4" })
|
|
2920
2330
|
}
|
|
2921
|
-
)
|
|
2922
|
-
] }),
|
|
2923
|
-
/* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between pt-4", children: [
|
|
2331
|
+
) })
|
|
2332
|
+
] }) : /* @__PURE__ */ jsxs3("div", { className: "flex flex-col-reverse gap-3 pt-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
2924
2333
|
/* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
|
|
2925
|
-
|
|
2334
|
+
/* @__PURE__ */ jsx8(
|
|
2926
2335
|
"button",
|
|
2927
2336
|
{
|
|
2928
2337
|
type: "button",
|
|
2929
2338
|
onClick: handleBrowserToggle,
|
|
2930
|
-
className: cn(
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
),
|
|
2935
|
-
disabled: disabled || browserLoading,
|
|
2936
|
-
title: browserLoading ? "Creating browser session..." : browserEnabled ? browserHasSession ? "Browser session active" : "Browser enabled (click to disable)" : "Enable browser",
|
|
2937
|
-
children: browserLoading ? /* @__PURE__ */ jsx8("div", { className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx8(Globe, { className: "h-4 w-4" })
|
|
2339
|
+
className: cn(toolbarButton, browserEnabled && toolbarButtonActive),
|
|
2340
|
+
disabled: disabled || !onToggleBrowser,
|
|
2341
|
+
title: browserEnabled ? "Browser streaming enabled" : "Enable browser streaming",
|
|
2342
|
+
children: /* @__PURE__ */ jsx8(Globe, { className: "h-4 w-4" })
|
|
2938
2343
|
}
|
|
2939
2344
|
),
|
|
2940
2345
|
/* @__PURE__ */ jsx8(
|
|
@@ -2945,7 +2350,7 @@ var ChatInput = ({
|
|
|
2945
2350
|
className: toolbarButton,
|
|
2946
2351
|
disabled,
|
|
2947
2352
|
title: "Attach image",
|
|
2948
|
-
children: /* @__PURE__ */ jsx8(
|
|
2353
|
+
children: /* @__PURE__ */ jsx8(Plus, { className: "h-4 w-4" })
|
|
2949
2354
|
}
|
|
2950
2355
|
),
|
|
2951
2356
|
voiceEnabled && !useSpeechRecognition2 ? /* @__PURE__ */ jsx8(
|
|
@@ -2982,20 +2387,20 @@ var ChatInput = ({
|
|
|
2982
2387
|
}
|
|
2983
2388
|
) : null
|
|
2984
2389
|
] }),
|
|
2985
|
-
/* @__PURE__ */ jsx8(
|
|
2390
|
+
/* @__PURE__ */ jsx8("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx8(
|
|
2986
2391
|
"button",
|
|
2987
2392
|
{
|
|
2988
2393
|
type: "button",
|
|
2989
2394
|
onClick: () => isStreaming ? handleStop() : void handleSend(),
|
|
2990
2395
|
disabled: isStreaming ? false : !hasContent || isDisabled,
|
|
2991
2396
|
className: cn(
|
|
2992
|
-
"flex h-
|
|
2993
|
-
isStreaming ? "bg-amber-
|
|
2397
|
+
"flex h-11 w-11 items-center justify-center rounded-full transition shadow-sm",
|
|
2398
|
+
isStreaming ? "bg-amber-400 text-amber-950 hover:bg-amber-300" : hasContent ? "bg-primary text-primary-foreground hover:bg-primary/90" : "bg-muted text-muted-foreground"
|
|
2994
2399
|
),
|
|
2995
2400
|
title: isStreaming ? "Stop" : "Send",
|
|
2996
|
-
children: isStreaming ? /* @__PURE__ */ jsx8(Square, { className: "h-
|
|
2401
|
+
children: isStreaming ? /* @__PURE__ */ jsx8(Square, { className: "h-5 w-5" }) : /* @__PURE__ */ jsx8(Send, { className: "h-5 w-5" })
|
|
2997
2402
|
}
|
|
2998
|
-
)
|
|
2403
|
+
) })
|
|
2999
2404
|
] })
|
|
3000
2405
|
] }) }),
|
|
3001
2406
|
/* @__PURE__ */ jsx8(
|
|
@@ -3015,1043 +2420,119 @@ var ChatInput = ({
|
|
|
3015
2420
|
// src/components/renderers/MessageRenderer.tsx
|
|
3016
2421
|
import { isDistriMessage as isDistriMessage3, isDistriEvent as isDistriEvent2 } from "@distri/core";
|
|
3017
2422
|
|
|
3018
|
-
// src/components/renderers/utils.tsx
|
|
3019
|
-
function extractContent(message) {
|
|
3020
|
-
let text = "";
|
|
3021
|
-
let hasMarkdown = false;
|
|
3022
|
-
let hasCode = false;
|
|
3023
|
-
let hasLinks = false;
|
|
3024
|
-
let hasImages = false;
|
|
3025
|
-
let imageParts = [];
|
|
3026
|
-
if ("parts" in message && Array.isArray(message.parts)) {
|
|
3027
|
-
const distriMessage = message;
|
|
3028
|
-
const textParts = distriMessage.parts?.filter((p) => p.part_type === "text" && p.data)?.map((p) => p.data)?.filter((text2) => text2 && text2.trim()) || [];
|
|
3029
|
-
text = textParts.join(" ").trim();
|
|
3030
|
-
imageParts = distriMessage.parts?.filter((p) => p.part_type === "image") || [];
|
|
3031
|
-
if (!text) {
|
|
3032
|
-
const structuredParts = distriMessage.parts?.filter(
|
|
3033
|
-
(part) => part.part_type !== "text" && part.part_type !== "image"
|
|
3034
|
-
) || [];
|
|
3035
|
-
if (structuredParts.length > 0) {
|
|
3036
|
-
text = structuredParts.map((part) => formatStructuredPart(part)).filter(Boolean).join("\n\n");
|
|
3037
|
-
if (text) {
|
|
3038
|
-
hasMarkdown = true;
|
|
3039
|
-
hasCode = true;
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
}
|
|
3043
|
-
hasMarkdown = /[*_`#[\]()>]/.test(text);
|
|
3044
|
-
hasCode = /```|`/.test(text);
|
|
3045
|
-
hasLinks = /\[.*?\]\(.*?\)|https?:\/\/[^\s]+/.test(text);
|
|
3046
|
-
hasImages = /!\[.*?\]\(.*?\)/.test(text) || imageParts.length > 0;
|
|
3047
|
-
} else {
|
|
3048
|
-
text = JSON.stringify(message, null, 2);
|
|
3049
|
-
}
|
|
3050
|
-
return {
|
|
3051
|
-
text,
|
|
3052
|
-
hasMarkdown,
|
|
3053
|
-
hasCode,
|
|
3054
|
-
hasLinks,
|
|
3055
|
-
hasImages,
|
|
3056
|
-
imageParts,
|
|
3057
|
-
rawContent: message
|
|
3058
|
-
};
|
|
3059
|
-
}
|
|
3060
|
-
function formatStructuredPart(part) {
|
|
3061
|
-
switch (part.part_type) {
|
|
3062
|
-
case "tool_call": {
|
|
3063
|
-
const payload = part.data;
|
|
3064
|
-
const toolName = payload?.tool_name || "unknown tool";
|
|
3065
|
-
return `**Tool Call: ${toolName}**
|
|
3066
|
-
|
|
3067
|
-
\`\`\`json
|
|
3068
|
-
${JSON.stringify(part.data, null, 2)}
|
|
3069
|
-
\`\`\``;
|
|
3070
|
-
}
|
|
3071
|
-
case "tool_result":
|
|
3072
|
-
return `**Tool Result**
|
|
3073
|
-
|
|
3074
|
-
\`\`\`json
|
|
3075
|
-
${JSON.stringify(part.data, null, 2)}
|
|
3076
|
-
\`\`\``;
|
|
3077
|
-
case "data":
|
|
3078
|
-
return `\`\`\`json
|
|
3079
|
-
${JSON.stringify(part.data, null, 2)}
|
|
3080
|
-
\`\`\``;
|
|
3081
|
-
default:
|
|
3082
|
-
return `\`\`\`json
|
|
3083
|
-
${JSON.stringify(part, null, 2)}
|
|
3084
|
-
\`\`\``;
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
// src/components/renderers/ImageRenderer.tsx
|
|
3089
|
-
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
3090
|
-
var ImageRenderer = ({
|
|
3091
|
-
imageParts,
|
|
3092
|
-
className = ""
|
|
3093
|
-
}) => {
|
|
3094
|
-
if (!imageParts || imageParts.length === 0) {
|
|
3095
|
-
return null;
|
|
3096
|
-
}
|
|
3097
|
-
const getImageSrc = (imageData) => {
|
|
3098
|
-
if ("data" in imageData) {
|
|
3099
|
-
return `data:${imageData.mime_type};base64,${imageData.data}`;
|
|
3100
|
-
} else {
|
|
3101
|
-
return imageData.url;
|
|
3102
|
-
}
|
|
3103
|
-
};
|
|
3104
|
-
const getImageAlt = (imageData) => {
|
|
3105
|
-
return imageData.name || "Attached image";
|
|
3106
|
-
};
|
|
3107
|
-
return /* @__PURE__ */ jsx9("div", { className: `flex flex-wrap gap-3 mt-3 ${className}`, children: imageParts.map((imagePart, index) => {
|
|
3108
|
-
const src = getImageSrc(imagePart.data);
|
|
3109
|
-
const alt = getImageAlt(imagePart.data);
|
|
3110
|
-
return /* @__PURE__ */ jsxs4("div", { className: "relative group", children: [
|
|
3111
|
-
/* @__PURE__ */ jsx9(
|
|
3112
|
-
"img",
|
|
3113
|
-
{
|
|
3114
|
-
src,
|
|
3115
|
-
alt,
|
|
3116
|
-
className: "max-w-sm max-h-64 rounded-lg border border-border object-cover shadow-sm hover:shadow-md transition-shadow cursor-pointer",
|
|
3117
|
-
onClick: () => {
|
|
3118
|
-
window.open(src, "_blank");
|
|
3119
|
-
}
|
|
3120
|
-
}
|
|
3121
|
-
),
|
|
3122
|
-
imagePart.data.name && /* @__PURE__ */ jsx9("div", { className: "absolute bottom-0 left-0 right-0 bg-black/50 text-white text-xs p-2 rounded-b-lg opacity-0 group-hover:opacity-100 transition-opacity", children: imagePart.data.name })
|
|
3123
|
-
] }, index);
|
|
3124
|
-
}) });
|
|
3125
|
-
};
|
|
3126
|
-
|
|
3127
|
-
// src/components/renderers/TextRenderer.tsx
|
|
3128
|
-
import ReactMarkdown from "react-markdown";
|
|
3129
|
-
|
|
3130
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/highlight.js
|
|
3131
|
-
var import_objectWithoutProperties = __toESM(require_objectWithoutProperties());
|
|
3132
|
-
var import_toConsumableArray = __toESM(require_toConsumableArray());
|
|
3133
|
-
var import_defineProperty2 = __toESM(require_defineProperty());
|
|
3134
|
-
import React10 from "react";
|
|
3135
|
-
|
|
3136
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/create-element.js
|
|
3137
|
-
var import_extends = __toESM(require_extends());
|
|
3138
|
-
var import_defineProperty = __toESM(require_defineProperty());
|
|
3139
|
-
import React9 from "react";
|
|
3140
|
-
function ownKeys(e, r) {
|
|
3141
|
-
var t = Object.keys(e);
|
|
3142
|
-
if (Object.getOwnPropertySymbols) {
|
|
3143
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
3144
|
-
r && (o = o.filter(function(r2) {
|
|
3145
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
3146
|
-
})), t.push.apply(t, o);
|
|
3147
|
-
}
|
|
3148
|
-
return t;
|
|
3149
|
-
}
|
|
3150
|
-
function _objectSpread(e) {
|
|
3151
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
3152
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
3153
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
3154
|
-
(0, import_defineProperty.default)(e, r2, t[r2]);
|
|
3155
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
3156
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
3157
|
-
});
|
|
3158
|
-
}
|
|
3159
|
-
return e;
|
|
3160
|
-
}
|
|
3161
|
-
function powerSetPermutations(arr) {
|
|
3162
|
-
var arrLength = arr.length;
|
|
3163
|
-
if (arrLength === 0 || arrLength === 1) return arr;
|
|
3164
|
-
if (arrLength === 2) {
|
|
3165
|
-
return [arr[0], arr[1], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0])];
|
|
3166
|
-
}
|
|
3167
|
-
if (arrLength === 3) {
|
|
3168
|
-
return [arr[0], arr[1], arr[2], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2]), "".concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])];
|
|
3169
|
-
}
|
|
3170
|
-
if (arrLength >= 4) {
|
|
3171
|
-
return [arr[0], arr[1], arr[2], arr[3], "".concat(arr[0], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[3]), "".concat(arr[3], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[0], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[0], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[1], ".").concat(arr[2], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[1], ".").concat(arr[3], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[0], ".").concat(arr[3], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[3]), "".concat(arr[2], ".").concat(arr[1], ".").concat(arr[3], ".").concat(arr[0]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[2], ".").concat(arr[3], ".").concat(arr[1], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[1], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[0], ".").concat(arr[2], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[0], ".").concat(arr[2]), "".concat(arr[3], ".").concat(arr[1], ".").concat(arr[2], ".").concat(arr[0]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[0], ".").concat(arr[1]), "".concat(arr[3], ".").concat(arr[2], ".").concat(arr[1], ".").concat(arr[0])];
|
|
3172
|
-
}
|
|
3173
|
-
}
|
|
3174
|
-
var classNameCombinations = {};
|
|
3175
|
-
function getClassNameCombinations(classNames) {
|
|
3176
|
-
if (classNames.length === 0 || classNames.length === 1) return classNames;
|
|
3177
|
-
var key = classNames.join(".");
|
|
3178
|
-
if (!classNameCombinations[key]) {
|
|
3179
|
-
classNameCombinations[key] = powerSetPermutations(classNames);
|
|
3180
|
-
}
|
|
3181
|
-
return classNameCombinations[key];
|
|
3182
|
-
}
|
|
3183
|
-
function createStyleObject(classNames) {
|
|
3184
|
-
var elementStyle = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3185
|
-
var stylesheet = arguments.length > 2 ? arguments[2] : void 0;
|
|
3186
|
-
var nonTokenClassNames = classNames.filter(function(className) {
|
|
3187
|
-
return className !== "token";
|
|
3188
|
-
});
|
|
3189
|
-
var classNamesCombinations = getClassNameCombinations(nonTokenClassNames);
|
|
3190
|
-
return classNamesCombinations.reduce(function(styleObject, className) {
|
|
3191
|
-
return _objectSpread(_objectSpread({}, styleObject), stylesheet[className]);
|
|
3192
|
-
}, elementStyle);
|
|
3193
|
-
}
|
|
3194
|
-
function createClassNameString(classNames) {
|
|
3195
|
-
return classNames.join(" ");
|
|
3196
|
-
}
|
|
3197
|
-
function createChildren(stylesheet, useInlineStyles) {
|
|
3198
|
-
var childrenCount = 0;
|
|
3199
|
-
return function(children) {
|
|
3200
|
-
childrenCount += 1;
|
|
3201
|
-
return children.map(function(child, i) {
|
|
3202
|
-
return createElement({
|
|
3203
|
-
node: child,
|
|
3204
|
-
stylesheet,
|
|
3205
|
-
useInlineStyles,
|
|
3206
|
-
key: "code-segment-".concat(childrenCount, "-").concat(i)
|
|
3207
|
-
});
|
|
3208
|
-
});
|
|
3209
|
-
};
|
|
3210
|
-
}
|
|
3211
|
-
function createElement(_ref) {
|
|
3212
|
-
var node = _ref.node, stylesheet = _ref.stylesheet, _ref$style = _ref.style, style = _ref$style === void 0 ? {} : _ref$style, useInlineStyles = _ref.useInlineStyles, key = _ref.key;
|
|
3213
|
-
var properties = node.properties, type = node.type, TagName = node.tagName, value = node.value;
|
|
3214
|
-
if (type === "text") {
|
|
3215
|
-
return value;
|
|
3216
|
-
} else if (TagName) {
|
|
3217
|
-
var childrenCreator = createChildren(stylesheet, useInlineStyles);
|
|
3218
|
-
var props;
|
|
3219
|
-
if (!useInlineStyles) {
|
|
3220
|
-
props = _objectSpread(_objectSpread({}, properties), {}, {
|
|
3221
|
-
className: createClassNameString(properties.className)
|
|
3222
|
-
});
|
|
3223
|
-
} else {
|
|
3224
|
-
var allStylesheetSelectors = Object.keys(stylesheet).reduce(function(classes, selector) {
|
|
3225
|
-
selector.split(".").forEach(function(className2) {
|
|
3226
|
-
if (!classes.includes(className2)) classes.push(className2);
|
|
3227
|
-
});
|
|
3228
|
-
return classes;
|
|
3229
|
-
}, []);
|
|
3230
|
-
var startingClassName = properties.className && properties.className.includes("token") ? ["token"] : [];
|
|
3231
|
-
var className = properties.className && startingClassName.concat(properties.className.filter(function(className2) {
|
|
3232
|
-
return !allStylesheetSelectors.includes(className2);
|
|
3233
|
-
}));
|
|
3234
|
-
props = _objectSpread(_objectSpread({}, properties), {}, {
|
|
3235
|
-
className: createClassNameString(className) || void 0,
|
|
3236
|
-
style: createStyleObject(properties.className, Object.assign({}, properties.style, style), stylesheet)
|
|
3237
|
-
});
|
|
3238
|
-
}
|
|
3239
|
-
var children = childrenCreator(node.children);
|
|
3240
|
-
return /* @__PURE__ */ React9.createElement(TagName, (0, import_extends.default)({
|
|
3241
|
-
key
|
|
3242
|
-
}, props), children);
|
|
3243
|
-
}
|
|
3244
|
-
}
|
|
3245
|
-
|
|
3246
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js
|
|
3247
|
-
var checkForListedLanguage_default = (function(astGenerator, language) {
|
|
3248
|
-
var langs = astGenerator.listLanguages();
|
|
3249
|
-
return langs.indexOf(language) !== -1;
|
|
3250
|
-
});
|
|
3251
|
-
|
|
3252
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/highlight.js
|
|
3253
|
-
var _excluded = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
|
|
3254
|
-
function ownKeys2(e, r) {
|
|
3255
|
-
var t = Object.keys(e);
|
|
3256
|
-
if (Object.getOwnPropertySymbols) {
|
|
3257
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
3258
|
-
r && (o = o.filter(function(r2) {
|
|
3259
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
3260
|
-
})), t.push.apply(t, o);
|
|
3261
|
-
}
|
|
3262
|
-
return t;
|
|
3263
|
-
}
|
|
3264
|
-
function _objectSpread2(e) {
|
|
3265
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
3266
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
3267
|
-
r % 2 ? ownKeys2(Object(t), true).forEach(function(r2) {
|
|
3268
|
-
(0, import_defineProperty2.default)(e, r2, t[r2]);
|
|
3269
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys2(Object(t)).forEach(function(r2) {
|
|
3270
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
3271
|
-
});
|
|
3272
|
-
}
|
|
3273
|
-
return e;
|
|
3274
|
-
}
|
|
3275
|
-
var newLineRegex = /\n/g;
|
|
3276
|
-
function getNewLines(str) {
|
|
3277
|
-
return str.match(newLineRegex);
|
|
3278
|
-
}
|
|
3279
|
-
function getAllLineNumbers(_ref) {
|
|
3280
|
-
var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style = _ref.style;
|
|
3281
|
-
return lines.map(function(_, i) {
|
|
3282
|
-
var number = i + startingLineNumber;
|
|
3283
|
-
return /* @__PURE__ */ React10.createElement("span", {
|
|
3284
|
-
key: "line-".concat(i),
|
|
3285
|
-
className: "react-syntax-highlighter-line-number",
|
|
3286
|
-
style: typeof style === "function" ? style(number) : style
|
|
3287
|
-
}, "".concat(number, "\n"));
|
|
3288
|
-
});
|
|
3289
|
-
}
|
|
3290
|
-
function AllLineNumbers(_ref2) {
|
|
3291
|
-
var codeString = _ref2.codeString, codeStyle = _ref2.codeStyle, _ref2$containerStyle = _ref2.containerStyle, containerStyle = _ref2$containerStyle === void 0 ? {
|
|
3292
|
-
"float": "left",
|
|
3293
|
-
paddingRight: "10px"
|
|
3294
|
-
} : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
|
|
3295
|
-
return /* @__PURE__ */ React10.createElement("code", {
|
|
3296
|
-
style: Object.assign({}, codeStyle, containerStyle)
|
|
3297
|
-
}, getAllLineNumbers({
|
|
3298
|
-
lines: codeString.replace(/\n$/, "").split("\n"),
|
|
3299
|
-
style: numberStyle,
|
|
3300
|
-
startingLineNumber
|
|
3301
|
-
}));
|
|
3302
|
-
}
|
|
3303
|
-
function getEmWidthOfNumber(num) {
|
|
3304
|
-
return "".concat(num.toString().length, ".25em");
|
|
3305
|
-
}
|
|
3306
|
-
function getInlineLineNumber(lineNumber, inlineLineNumberStyle) {
|
|
3307
|
-
return {
|
|
3308
|
-
type: "element",
|
|
3309
|
-
tagName: "span",
|
|
3310
|
-
properties: {
|
|
3311
|
-
key: "line-number--".concat(lineNumber),
|
|
3312
|
-
className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
|
|
3313
|
-
style: inlineLineNumberStyle
|
|
3314
|
-
},
|
|
3315
|
-
children: [{
|
|
3316
|
-
type: "text",
|
|
3317
|
-
value: lineNumber
|
|
3318
|
-
}]
|
|
3319
|
-
};
|
|
3320
|
-
}
|
|
3321
|
-
function assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber) {
|
|
3322
|
-
var defaultLineNumberStyle = {
|
|
3323
|
-
display: "inline-block",
|
|
3324
|
-
minWidth: getEmWidthOfNumber(largestLineNumber),
|
|
3325
|
-
paddingRight: "1em",
|
|
3326
|
-
textAlign: "right",
|
|
3327
|
-
userSelect: "none"
|
|
3328
|
-
};
|
|
3329
|
-
var customLineNumberStyle = typeof lineNumberStyle === "function" ? lineNumberStyle(lineNumber) : lineNumberStyle;
|
|
3330
|
-
var assembledStyle = _objectSpread2(_objectSpread2({}, defaultLineNumberStyle), customLineNumberStyle);
|
|
3331
|
-
return assembledStyle;
|
|
3332
|
-
}
|
|
3333
|
-
function createLineElement(_ref3) {
|
|
3334
|
-
var children = _ref3.children, lineNumber = _ref3.lineNumber, lineNumberStyle = _ref3.lineNumberStyle, largestLineNumber = _ref3.largestLineNumber, showInlineLineNumbers = _ref3.showInlineLineNumbers, _ref3$lineProps = _ref3.lineProps, lineProps = _ref3$lineProps === void 0 ? {} : _ref3$lineProps, _ref3$className = _ref3.className, className = _ref3$className === void 0 ? [] : _ref3$className, showLineNumbers = _ref3.showLineNumbers, wrapLongLines = _ref3.wrapLongLines, _ref3$wrapLines = _ref3.wrapLines, wrapLines = _ref3$wrapLines === void 0 ? false : _ref3$wrapLines;
|
|
3335
|
-
var properties = wrapLines ? _objectSpread2({}, typeof lineProps === "function" ? lineProps(lineNumber) : lineProps) : {};
|
|
3336
|
-
properties["className"] = properties["className"] ? [].concat((0, import_toConsumableArray.default)(properties["className"].trim().split(/\s+/)), (0, import_toConsumableArray.default)(className)) : className;
|
|
3337
|
-
if (lineNumber && showInlineLineNumbers) {
|
|
3338
|
-
var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber, largestLineNumber);
|
|
3339
|
-
children.unshift(getInlineLineNumber(lineNumber, inlineLineNumberStyle));
|
|
3340
|
-
}
|
|
3341
|
-
if (wrapLongLines & showLineNumbers) {
|
|
3342
|
-
properties.style = _objectSpread2({
|
|
3343
|
-
display: "flex"
|
|
3344
|
-
}, properties.style);
|
|
3345
|
-
}
|
|
3346
|
-
return {
|
|
3347
|
-
type: "element",
|
|
3348
|
-
tagName: "span",
|
|
3349
|
-
properties,
|
|
3350
|
-
children
|
|
3351
|
-
};
|
|
3352
|
-
}
|
|
3353
|
-
function flattenCodeTree(tree) {
|
|
3354
|
-
var className = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
3355
|
-
var newTree = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
3356
|
-
for (var i = 0; i < tree.length; i++) {
|
|
3357
|
-
var node = tree[i];
|
|
3358
|
-
if (node.type === "text") {
|
|
3359
|
-
newTree.push(createLineElement({
|
|
3360
|
-
children: [node],
|
|
3361
|
-
className: (0, import_toConsumableArray.default)(new Set(className))
|
|
3362
|
-
}));
|
|
3363
|
-
} else if (node.children) {
|
|
3364
|
-
var classNames = className.concat(node.properties.className);
|
|
3365
|
-
flattenCodeTree(node.children, classNames).forEach(function(i2) {
|
|
3366
|
-
return newTree.push(i2);
|
|
3367
|
-
});
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
return newTree;
|
|
3371
|
-
}
|
|
3372
|
-
function processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines) {
|
|
3373
|
-
var _ref4;
|
|
3374
|
-
var tree = flattenCodeTree(codeTree.value);
|
|
3375
|
-
var newTree = [];
|
|
3376
|
-
var lastLineBreakIndex = -1;
|
|
3377
|
-
var index = 0;
|
|
3378
|
-
function createWrappedLine(children2, lineNumber2) {
|
|
3379
|
-
var className = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
3380
|
-
return createLineElement({
|
|
3381
|
-
children: children2,
|
|
3382
|
-
lineNumber: lineNumber2,
|
|
3383
|
-
lineNumberStyle,
|
|
3384
|
-
largestLineNumber,
|
|
3385
|
-
showInlineLineNumbers,
|
|
3386
|
-
lineProps,
|
|
3387
|
-
className,
|
|
3388
|
-
showLineNumbers,
|
|
3389
|
-
wrapLongLines,
|
|
3390
|
-
wrapLines
|
|
3391
|
-
});
|
|
3392
|
-
}
|
|
3393
|
-
function createUnwrappedLine(children2, lineNumber2) {
|
|
3394
|
-
if (showLineNumbers && lineNumber2 && showInlineLineNumbers) {
|
|
3395
|
-
var inlineLineNumberStyle = assembleLineNumberStyles(lineNumberStyle, lineNumber2, largestLineNumber);
|
|
3396
|
-
children2.unshift(getInlineLineNumber(lineNumber2, inlineLineNumberStyle));
|
|
3397
|
-
}
|
|
3398
|
-
return children2;
|
|
3399
|
-
}
|
|
3400
|
-
function createLine(children2, lineNumber2) {
|
|
3401
|
-
var className = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
3402
|
-
return wrapLines || className.length > 0 ? createWrappedLine(children2, lineNumber2, className) : createUnwrappedLine(children2, lineNumber2);
|
|
3403
|
-
}
|
|
3404
|
-
var _loop = function _loop2() {
|
|
3405
|
-
var node = tree[index];
|
|
3406
|
-
var value = node.children[0].value;
|
|
3407
|
-
var newLines = getNewLines(value);
|
|
3408
|
-
if (newLines) {
|
|
3409
|
-
var splitValue = value.split("\n");
|
|
3410
|
-
splitValue.forEach(function(text, i) {
|
|
3411
|
-
var lineNumber2 = showLineNumbers && newTree.length + startingLineNumber;
|
|
3412
|
-
var newChild = {
|
|
3413
|
-
type: "text",
|
|
3414
|
-
value: "".concat(text, "\n")
|
|
3415
|
-
};
|
|
3416
|
-
if (i === 0) {
|
|
3417
|
-
var _children = tree.slice(lastLineBreakIndex + 1, index).concat(createLineElement({
|
|
3418
|
-
children: [newChild],
|
|
3419
|
-
className: node.properties.className
|
|
3420
|
-
}));
|
|
3421
|
-
var _line = createLine(_children, lineNumber2);
|
|
3422
|
-
newTree.push(_line);
|
|
3423
|
-
} else if (i === splitValue.length - 1) {
|
|
3424
|
-
var stringChild = tree[index + 1] && tree[index + 1].children && tree[index + 1].children[0];
|
|
3425
|
-
var lastLineInPreviousSpan = {
|
|
3426
|
-
type: "text",
|
|
3427
|
-
value: "".concat(text)
|
|
3428
|
-
};
|
|
3429
|
-
if (stringChild) {
|
|
3430
|
-
var newElem = createLineElement({
|
|
3431
|
-
children: [lastLineInPreviousSpan],
|
|
3432
|
-
className: node.properties.className
|
|
3433
|
-
});
|
|
3434
|
-
tree.splice(index + 1, 0, newElem);
|
|
3435
|
-
} else {
|
|
3436
|
-
var _children2 = [lastLineInPreviousSpan];
|
|
3437
|
-
var _line2 = createLine(_children2, lineNumber2, node.properties.className);
|
|
3438
|
-
newTree.push(_line2);
|
|
3439
|
-
}
|
|
3440
|
-
} else {
|
|
3441
|
-
var _children3 = [newChild];
|
|
3442
|
-
var _line3 = createLine(_children3, lineNumber2, node.properties.className);
|
|
3443
|
-
newTree.push(_line3);
|
|
3444
|
-
}
|
|
3445
|
-
});
|
|
3446
|
-
lastLineBreakIndex = index;
|
|
3447
|
-
}
|
|
3448
|
-
index++;
|
|
3449
|
-
};
|
|
3450
|
-
while (index < tree.length) {
|
|
3451
|
-
_loop();
|
|
3452
|
-
}
|
|
3453
|
-
if (lastLineBreakIndex !== tree.length - 1) {
|
|
3454
|
-
var children = tree.slice(lastLineBreakIndex + 1, tree.length);
|
|
3455
|
-
if (children && children.length) {
|
|
3456
|
-
var lineNumber = showLineNumbers && newTree.length + startingLineNumber;
|
|
3457
|
-
var line = createLine(children, lineNumber);
|
|
3458
|
-
newTree.push(line);
|
|
3459
|
-
}
|
|
3460
|
-
}
|
|
3461
|
-
return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree);
|
|
3462
|
-
}
|
|
3463
|
-
function defaultRenderer(_ref5) {
|
|
3464
|
-
var rows = _ref5.rows, stylesheet = _ref5.stylesheet, useInlineStyles = _ref5.useInlineStyles;
|
|
3465
|
-
return rows.map(function(node, i) {
|
|
3466
|
-
return createElement({
|
|
3467
|
-
node,
|
|
3468
|
-
stylesheet,
|
|
3469
|
-
useInlineStyles,
|
|
3470
|
-
key: "code-segment-".concat(i)
|
|
3471
|
-
});
|
|
3472
|
-
});
|
|
3473
|
-
}
|
|
3474
|
-
function isHighlightJs(astGenerator) {
|
|
3475
|
-
return astGenerator && typeof astGenerator.highlightAuto !== "undefined";
|
|
3476
|
-
}
|
|
3477
|
-
function getCodeTree(_ref6) {
|
|
3478
|
-
var astGenerator = _ref6.astGenerator, language = _ref6.language, code = _ref6.code, defaultCodeValue = _ref6.defaultCodeValue;
|
|
3479
|
-
if (isHighlightJs(astGenerator)) {
|
|
3480
|
-
var hasLanguage = checkForListedLanguage_default(astGenerator, language);
|
|
3481
|
-
if (language === "text") {
|
|
3482
|
-
return {
|
|
3483
|
-
value: defaultCodeValue,
|
|
3484
|
-
language: "text"
|
|
3485
|
-
};
|
|
3486
|
-
} else if (hasLanguage) {
|
|
3487
|
-
return astGenerator.highlight(language, code);
|
|
3488
|
-
} else {
|
|
3489
|
-
return astGenerator.highlightAuto(code);
|
|
3490
|
-
}
|
|
3491
|
-
}
|
|
3492
|
-
try {
|
|
3493
|
-
return language && language !== "text" ? {
|
|
3494
|
-
value: astGenerator.highlight(code, language)
|
|
3495
|
-
} : {
|
|
3496
|
-
value: defaultCodeValue
|
|
3497
|
-
};
|
|
3498
|
-
} catch (e) {
|
|
3499
|
-
return {
|
|
3500
|
-
value: defaultCodeValue
|
|
3501
|
-
};
|
|
3502
|
-
}
|
|
3503
|
-
}
|
|
3504
|
-
function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
3505
|
-
return function SyntaxHighlighter(_ref7) {
|
|
3506
|
-
var _code$match$length, _code$match;
|
|
3507
|
-
var language = _ref7.language, children = _ref7.children, _ref7$style = _ref7.style, style = _ref7$style === void 0 ? defaultStyle : _ref7$style, _ref7$customStyle = _ref7.customStyle, customStyle = _ref7$customStyle === void 0 ? {} : _ref7$customStyle, _ref7$codeTagProps = _ref7.codeTagProps, codeTagProps = _ref7$codeTagProps === void 0 ? {
|
|
3508
|
-
className: language ? "language-".concat(language) : void 0,
|
|
3509
|
-
style: _objectSpread2(_objectSpread2({}, style['code[class*="language-"]']), style['code[class*="language-'.concat(language, '"]')])
|
|
3510
|
-
} : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code = _ref7$code === void 0 ? (Array.isArray(children) ? children[0] : children) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = (0, import_objectWithoutProperties.default)(_ref7, _excluded);
|
|
3511
|
-
astGenerator = astGenerator || defaultAstGenerator;
|
|
3512
|
-
var allLineNumbers = showLineNumbers ? /* @__PURE__ */ React10.createElement(AllLineNumbers, {
|
|
3513
|
-
containerStyle: lineNumberContainerStyle,
|
|
3514
|
-
codeStyle: codeTagProps.style || {},
|
|
3515
|
-
numberStyle: lineNumberStyle,
|
|
3516
|
-
startingLineNumber,
|
|
3517
|
-
codeString: code
|
|
3518
|
-
}) : null;
|
|
3519
|
-
var defaultPreStyle = style.hljs || style['pre[class*="language-"]'] || {
|
|
3520
|
-
backgroundColor: "#fff"
|
|
3521
|
-
};
|
|
3522
|
-
var generatorClassName = isHighlightJs(astGenerator) ? "hljs" : "prismjs";
|
|
3523
|
-
var preProps = useInlineStyles ? Object.assign({}, rest, {
|
|
3524
|
-
style: Object.assign({}, defaultPreStyle, customStyle)
|
|
3525
|
-
}) : Object.assign({}, rest, {
|
|
3526
|
-
className: rest.className ? "".concat(generatorClassName, " ").concat(rest.className) : generatorClassName,
|
|
3527
|
-
style: Object.assign({}, customStyle)
|
|
3528
|
-
});
|
|
3529
|
-
if (wrapLongLines) {
|
|
3530
|
-
codeTagProps.style = _objectSpread2({
|
|
3531
|
-
whiteSpace: "pre-wrap"
|
|
3532
|
-
}, codeTagProps.style);
|
|
3533
|
-
} else {
|
|
3534
|
-
codeTagProps.style = _objectSpread2({
|
|
3535
|
-
whiteSpace: "pre"
|
|
3536
|
-
}, codeTagProps.style);
|
|
3537
|
-
}
|
|
3538
|
-
if (!astGenerator) {
|
|
3539
|
-
return /* @__PURE__ */ React10.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ React10.createElement(CodeTag, codeTagProps, code));
|
|
3540
|
-
}
|
|
3541
|
-
if (wrapLines === void 0 && renderer || wrapLongLines) wrapLines = true;
|
|
3542
|
-
renderer = renderer || defaultRenderer;
|
|
3543
|
-
var defaultCodeValue = [{
|
|
3544
|
-
type: "text",
|
|
3545
|
-
value: code
|
|
3546
|
-
}];
|
|
3547
|
-
var codeTree = getCodeTree({
|
|
3548
|
-
astGenerator,
|
|
3549
|
-
language,
|
|
3550
|
-
code,
|
|
3551
|
-
defaultCodeValue
|
|
3552
|
-
});
|
|
3553
|
-
if (codeTree.language === null) {
|
|
3554
|
-
codeTree.value = defaultCodeValue;
|
|
3555
|
-
}
|
|
3556
|
-
var lineBreakCount = (_code$match$length = (_code$match = code.match(/\n/g)) === null || _code$match === void 0 ? void 0 : _code$match.length) !== null && _code$match$length !== void 0 ? _code$match$length : 0;
|
|
3557
|
-
var largestLineNumber = startingLineNumber + lineBreakCount;
|
|
3558
|
-
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
3559
|
-
return /* @__PURE__ */ React10.createElement(PreTag, preProps, /* @__PURE__ */ React10.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
3560
|
-
rows,
|
|
3561
|
-
stylesheet: style,
|
|
3562
|
-
useInlineStyles
|
|
3563
|
-
})));
|
|
3564
|
-
};
|
|
3565
|
-
}
|
|
3566
|
-
|
|
3567
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/languages/prism/supported-languages.js
|
|
3568
|
-
var supported_languages_default = ["abap", "abnf", "actionscript", "ada", "agda", "al", "antlr4", "apacheconf", "apex", "apl", "applescript", "aql", "arduino", "arff", "asciidoc", "asm6502", "asmatmel", "aspnet", "autohotkey", "autoit", "avisynth", "avro-idl", "bash", "basic", "batch", "bbcode", "bicep", "birb", "bison", "bnf", "brainfuck", "brightscript", "bro", "bsl", "c", "cfscript", "chaiscript", "cil", "clike", "clojure", "cmake", "cobol", "coffeescript", "concurnas", "coq", "cpp", "crystal", "csharp", "cshtml", "csp", "css-extras", "css", "csv", "cypher", "d", "dart", "dataweave", "dax", "dhall", "diff", "django", "dns-zone-file", "docker", "dot", "ebnf", "editorconfig", "eiffel", "ejs", "elixir", "elm", "erb", "erlang", "etlua", "excel-formula", "factor", "false", "firestore-security-rules", "flow", "fortran", "fsharp", "ftl", "gap", "gcode", "gdscript", "gedcom", "gherkin", "git", "glsl", "gml", "gn", "go-module", "go", "graphql", "groovy", "haml", "handlebars", "haskell", "haxe", "hcl", "hlsl", "hoon", "hpkp", "hsts", "http", "ichigojam", "icon", "icu-message-format", "idris", "iecst", "ignore", "inform7", "ini", "io", "j", "java", "javadoc", "javadoclike", "javascript", "javastacktrace", "jexl", "jolie", "jq", "js-extras", "js-templates", "jsdoc", "json", "json5", "jsonp", "jsstacktrace", "jsx", "julia", "keepalived", "keyman", "kotlin", "kumir", "kusto", "latex", "latte", "less", "lilypond", "liquid", "lisp", "livescript", "llvm", "log", "lolcode", "lua", "magma", "makefile", "markdown", "markup-templating", "markup", "matlab", "maxscript", "mel", "mermaid", "mizar", "mongodb", "monkey", "moonscript", "n1ql", "n4js", "nand2tetris-hdl", "naniscript", "nasm", "neon", "nevod", "nginx", "nim", "nix", "nsis", "objectivec", "ocaml", "opencl", "openqasm", "oz", "parigp", "parser", "pascal", "pascaligo", "pcaxis", "peoplecode", "perl", "php-extras", "php", "phpdoc", "plsql", "powerquery", "powershell", "processing", "prolog", "promql", "properties", "protobuf", "psl", "pug", "puppet", "pure", "purebasic", "purescript", "python", "q", "qml", "qore", "qsharp", "r", "racket", "reason", "regex", "rego", "renpy", "rest", "rip", "roboconf", "robotframework", "ruby", "rust", "sas", "sass", "scala", "scheme", "scss", "shell-session", "smali", "smalltalk", "smarty", "sml", "solidity", "solution-file", "soy", "sparql", "splunk-spl", "sqf", "sql", "squirrel", "stan", "stylus", "swift", "systemd", "t4-cs", "t4-templating", "t4-vb", "tap", "tcl", "textile", "toml", "tremor", "tsx", "tt2", "turtle", "twig", "typescript", "typoscript", "unrealscript", "uorazor", "uri", "v", "vala", "vbnet", "velocity", "verilog", "vhdl", "vim", "visual-basic", "warpscript", "wasm", "web-idl", "wiki", "wolfram", "wren", "xeora", "xml-doc", "xojo", "xquery", "yaml", "yang", "zig"];
|
|
3569
|
-
|
|
3570
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/styles/prism/prism.js
|
|
3571
|
-
var prism_default = {
|
|
3572
|
-
'code[class*="language-"]': {
|
|
3573
|
-
"color": "black",
|
|
3574
|
-
"background": "none",
|
|
3575
|
-
"textShadow": "0 1px white",
|
|
3576
|
-
"fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
|
|
3577
|
-
"fontSize": "1em",
|
|
3578
|
-
"textAlign": "left",
|
|
3579
|
-
"whiteSpace": "pre",
|
|
3580
|
-
"wordSpacing": "normal",
|
|
3581
|
-
"wordBreak": "normal",
|
|
3582
|
-
"wordWrap": "normal",
|
|
3583
|
-
"lineHeight": "1.5",
|
|
3584
|
-
"MozTabSize": "4",
|
|
3585
|
-
"OTabSize": "4",
|
|
3586
|
-
"tabSize": "4",
|
|
3587
|
-
"WebkitHyphens": "none",
|
|
3588
|
-
"MozHyphens": "none",
|
|
3589
|
-
"msHyphens": "none",
|
|
3590
|
-
"hyphens": "none"
|
|
3591
|
-
},
|
|
3592
|
-
'pre[class*="language-"]': {
|
|
3593
|
-
"color": "black",
|
|
3594
|
-
"background": "#f5f2f0",
|
|
3595
|
-
"textShadow": "0 1px white",
|
|
3596
|
-
"fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
|
|
3597
|
-
"fontSize": "1em",
|
|
3598
|
-
"textAlign": "left",
|
|
3599
|
-
"whiteSpace": "pre",
|
|
3600
|
-
"wordSpacing": "normal",
|
|
3601
|
-
"wordBreak": "normal",
|
|
3602
|
-
"wordWrap": "normal",
|
|
3603
|
-
"lineHeight": "1.5",
|
|
3604
|
-
"MozTabSize": "4",
|
|
3605
|
-
"OTabSize": "4",
|
|
3606
|
-
"tabSize": "4",
|
|
3607
|
-
"WebkitHyphens": "none",
|
|
3608
|
-
"MozHyphens": "none",
|
|
3609
|
-
"msHyphens": "none",
|
|
3610
|
-
"hyphens": "none",
|
|
3611
|
-
"padding": "1em",
|
|
3612
|
-
"margin": ".5em 0",
|
|
3613
|
-
"overflow": "auto"
|
|
3614
|
-
},
|
|
3615
|
-
'pre[class*="language-"]::-moz-selection': {
|
|
3616
|
-
"textShadow": "none",
|
|
3617
|
-
"background": "#b3d4fc"
|
|
3618
|
-
},
|
|
3619
|
-
'pre[class*="language-"] ::-moz-selection': {
|
|
3620
|
-
"textShadow": "none",
|
|
3621
|
-
"background": "#b3d4fc"
|
|
3622
|
-
},
|
|
3623
|
-
'code[class*="language-"]::-moz-selection': {
|
|
3624
|
-
"textShadow": "none",
|
|
3625
|
-
"background": "#b3d4fc"
|
|
3626
|
-
},
|
|
3627
|
-
'code[class*="language-"] ::-moz-selection': {
|
|
3628
|
-
"textShadow": "none",
|
|
3629
|
-
"background": "#b3d4fc"
|
|
3630
|
-
},
|
|
3631
|
-
'pre[class*="language-"]::selection': {
|
|
3632
|
-
"textShadow": "none",
|
|
3633
|
-
"background": "#b3d4fc"
|
|
3634
|
-
},
|
|
3635
|
-
'pre[class*="language-"] ::selection': {
|
|
3636
|
-
"textShadow": "none",
|
|
3637
|
-
"background": "#b3d4fc"
|
|
3638
|
-
},
|
|
3639
|
-
'code[class*="language-"]::selection': {
|
|
3640
|
-
"textShadow": "none",
|
|
3641
|
-
"background": "#b3d4fc"
|
|
3642
|
-
},
|
|
3643
|
-
'code[class*="language-"] ::selection': {
|
|
3644
|
-
"textShadow": "none",
|
|
3645
|
-
"background": "#b3d4fc"
|
|
3646
|
-
},
|
|
3647
|
-
':not(pre) > code[class*="language-"]': {
|
|
3648
|
-
"background": "#f5f2f0",
|
|
3649
|
-
"padding": ".1em",
|
|
3650
|
-
"borderRadius": ".3em",
|
|
3651
|
-
"whiteSpace": "normal"
|
|
3652
|
-
},
|
|
3653
|
-
"comment": {
|
|
3654
|
-
"color": "slategray"
|
|
3655
|
-
},
|
|
3656
|
-
"prolog": {
|
|
3657
|
-
"color": "slategray"
|
|
3658
|
-
},
|
|
3659
|
-
"doctype": {
|
|
3660
|
-
"color": "slategray"
|
|
3661
|
-
},
|
|
3662
|
-
"cdata": {
|
|
3663
|
-
"color": "slategray"
|
|
3664
|
-
},
|
|
3665
|
-
"punctuation": {
|
|
3666
|
-
"color": "#999"
|
|
3667
|
-
},
|
|
3668
|
-
"namespace": {
|
|
3669
|
-
"Opacity": ".7"
|
|
3670
|
-
},
|
|
3671
|
-
"property": {
|
|
3672
|
-
"color": "#905"
|
|
3673
|
-
},
|
|
3674
|
-
"tag": {
|
|
3675
|
-
"color": "#905"
|
|
3676
|
-
},
|
|
3677
|
-
"boolean": {
|
|
3678
|
-
"color": "#905"
|
|
3679
|
-
},
|
|
3680
|
-
"number": {
|
|
3681
|
-
"color": "#905"
|
|
3682
|
-
},
|
|
3683
|
-
"constant": {
|
|
3684
|
-
"color": "#905"
|
|
3685
|
-
},
|
|
3686
|
-
"symbol": {
|
|
3687
|
-
"color": "#905"
|
|
3688
|
-
},
|
|
3689
|
-
"deleted": {
|
|
3690
|
-
"color": "#905"
|
|
3691
|
-
},
|
|
3692
|
-
"selector": {
|
|
3693
|
-
"color": "#690"
|
|
3694
|
-
},
|
|
3695
|
-
"attr-name": {
|
|
3696
|
-
"color": "#690"
|
|
3697
|
-
},
|
|
3698
|
-
"string": {
|
|
3699
|
-
"color": "#690"
|
|
3700
|
-
},
|
|
3701
|
-
"char": {
|
|
3702
|
-
"color": "#690"
|
|
3703
|
-
},
|
|
3704
|
-
"builtin": {
|
|
3705
|
-
"color": "#690"
|
|
3706
|
-
},
|
|
3707
|
-
"inserted": {
|
|
3708
|
-
"color": "#690"
|
|
3709
|
-
},
|
|
3710
|
-
"operator": {
|
|
3711
|
-
"color": "#9a6e3a",
|
|
3712
|
-
"background": "hsla(0, 0%, 100%, .5)"
|
|
3713
|
-
},
|
|
3714
|
-
"entity": {
|
|
3715
|
-
"color": "#9a6e3a",
|
|
3716
|
-
"background": "hsla(0, 0%, 100%, .5)",
|
|
3717
|
-
"cursor": "help"
|
|
3718
|
-
},
|
|
3719
|
-
"url": {
|
|
3720
|
-
"color": "#9a6e3a",
|
|
3721
|
-
"background": "hsla(0, 0%, 100%, .5)"
|
|
3722
|
-
},
|
|
3723
|
-
".language-css .token.string": {
|
|
3724
|
-
"color": "#9a6e3a",
|
|
3725
|
-
"background": "hsla(0, 0%, 100%, .5)"
|
|
3726
|
-
},
|
|
3727
|
-
".style .token.string": {
|
|
3728
|
-
"color": "#9a6e3a",
|
|
3729
|
-
"background": "hsla(0, 0%, 100%, .5)"
|
|
3730
|
-
},
|
|
3731
|
-
"atrule": {
|
|
3732
|
-
"color": "#07a"
|
|
3733
|
-
},
|
|
3734
|
-
"attr-value": {
|
|
3735
|
-
"color": "#07a"
|
|
3736
|
-
},
|
|
3737
|
-
"keyword": {
|
|
3738
|
-
"color": "#07a"
|
|
3739
|
-
},
|
|
3740
|
-
"function": {
|
|
3741
|
-
"color": "#DD4A68"
|
|
3742
|
-
},
|
|
3743
|
-
"class-name": {
|
|
3744
|
-
"color": "#DD4A68"
|
|
3745
|
-
},
|
|
3746
|
-
"regex": {
|
|
3747
|
-
"color": "#e90"
|
|
3748
|
-
},
|
|
3749
|
-
"important": {
|
|
3750
|
-
"color": "#e90",
|
|
3751
|
-
"fontWeight": "bold"
|
|
3752
|
-
},
|
|
3753
|
-
"variable": {
|
|
3754
|
-
"color": "#e90"
|
|
3755
|
-
},
|
|
3756
|
-
"bold": {
|
|
3757
|
-
"fontWeight": "bold"
|
|
3758
|
-
},
|
|
3759
|
-
"italic": {
|
|
3760
|
-
"fontStyle": "italic"
|
|
3761
|
-
}
|
|
3762
|
-
};
|
|
3763
|
-
|
|
3764
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/prism.js
|
|
3765
|
-
var import_refractor = __toESM(require_refractor());
|
|
3766
|
-
var highlighter = highlight_default(import_refractor.default, prism_default);
|
|
3767
|
-
highlighter.supportedLanguages = supported_languages_default;
|
|
3768
|
-
var prism_default2 = highlighter;
|
|
3769
|
-
|
|
3770
|
-
// ../../../node_modules/.pnpm/react-syntax-highlighter@15.6.6_react@18.3.1/node_modules/react-syntax-highlighter/dist/esm/styles/prism/vsc-dark-plus.js
|
|
3771
|
-
var vsc_dark_plus_default = {
|
|
3772
|
-
'pre[class*="language-"]': {
|
|
3773
|
-
"color": "#d4d4d4",
|
|
3774
|
-
"fontSize": "13px",
|
|
3775
|
-
"textShadow": "none",
|
|
3776
|
-
"fontFamily": 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',
|
|
3777
|
-
"direction": "ltr",
|
|
3778
|
-
"textAlign": "left",
|
|
3779
|
-
"whiteSpace": "pre",
|
|
3780
|
-
"wordSpacing": "normal",
|
|
3781
|
-
"wordBreak": "normal",
|
|
3782
|
-
"lineHeight": "1.5",
|
|
3783
|
-
"MozTabSize": "4",
|
|
3784
|
-
"OTabSize": "4",
|
|
3785
|
-
"tabSize": "4",
|
|
3786
|
-
"WebkitHyphens": "none",
|
|
3787
|
-
"MozHyphens": "none",
|
|
3788
|
-
"msHyphens": "none",
|
|
3789
|
-
"hyphens": "none",
|
|
3790
|
-
"padding": "1em",
|
|
3791
|
-
"margin": ".5em 0",
|
|
3792
|
-
"overflow": "auto",
|
|
3793
|
-
"background": "#1e1e1e"
|
|
3794
|
-
},
|
|
3795
|
-
'code[class*="language-"]': {
|
|
3796
|
-
"color": "#d4d4d4",
|
|
3797
|
-
"fontSize": "13px",
|
|
3798
|
-
"textShadow": "none",
|
|
3799
|
-
"fontFamily": 'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',
|
|
3800
|
-
"direction": "ltr",
|
|
3801
|
-
"textAlign": "left",
|
|
3802
|
-
"whiteSpace": "pre",
|
|
3803
|
-
"wordSpacing": "normal",
|
|
3804
|
-
"wordBreak": "normal",
|
|
3805
|
-
"lineHeight": "1.5",
|
|
3806
|
-
"MozTabSize": "4",
|
|
3807
|
-
"OTabSize": "4",
|
|
3808
|
-
"tabSize": "4",
|
|
3809
|
-
"WebkitHyphens": "none",
|
|
3810
|
-
"MozHyphens": "none",
|
|
3811
|
-
"msHyphens": "none",
|
|
3812
|
-
"hyphens": "none"
|
|
3813
|
-
},
|
|
3814
|
-
'pre[class*="language-"]::selection': {
|
|
3815
|
-
"textShadow": "none",
|
|
3816
|
-
"background": "#264F78"
|
|
3817
|
-
},
|
|
3818
|
-
'code[class*="language-"]::selection': {
|
|
3819
|
-
"textShadow": "none",
|
|
3820
|
-
"background": "#264F78"
|
|
3821
|
-
},
|
|
3822
|
-
'pre[class*="language-"] *::selection': {
|
|
3823
|
-
"textShadow": "none",
|
|
3824
|
-
"background": "#264F78"
|
|
3825
|
-
},
|
|
3826
|
-
'code[class*="language-"] *::selection': {
|
|
3827
|
-
"textShadow": "none",
|
|
3828
|
-
"background": "#264F78"
|
|
3829
|
-
},
|
|
3830
|
-
':not(pre) > code[class*="language-"]': {
|
|
3831
|
-
"padding": ".1em .3em",
|
|
3832
|
-
"borderRadius": ".3em",
|
|
3833
|
-
"color": "#db4c69",
|
|
3834
|
-
"background": "#1e1e1e"
|
|
3835
|
-
},
|
|
3836
|
-
".namespace": {
|
|
3837
|
-
"Opacity": ".7"
|
|
3838
|
-
},
|
|
3839
|
-
"doctype.doctype-tag": {
|
|
3840
|
-
"color": "#569CD6"
|
|
3841
|
-
},
|
|
3842
|
-
"doctype.name": {
|
|
3843
|
-
"color": "#9cdcfe"
|
|
3844
|
-
},
|
|
3845
|
-
"comment": {
|
|
3846
|
-
"color": "#6a9955"
|
|
3847
|
-
},
|
|
3848
|
-
"prolog": {
|
|
3849
|
-
"color": "#6a9955"
|
|
3850
|
-
},
|
|
3851
|
-
"punctuation": {
|
|
3852
|
-
"color": "#d4d4d4"
|
|
3853
|
-
},
|
|
3854
|
-
".language-html .language-css .token.punctuation": {
|
|
3855
|
-
"color": "#d4d4d4"
|
|
3856
|
-
},
|
|
3857
|
-
".language-html .language-javascript .token.punctuation": {
|
|
3858
|
-
"color": "#d4d4d4"
|
|
3859
|
-
},
|
|
3860
|
-
"property": {
|
|
3861
|
-
"color": "#9cdcfe"
|
|
3862
|
-
},
|
|
3863
|
-
"tag": {
|
|
3864
|
-
"color": "#569cd6"
|
|
3865
|
-
},
|
|
3866
|
-
"boolean": {
|
|
3867
|
-
"color": "#569cd6"
|
|
3868
|
-
},
|
|
3869
|
-
"number": {
|
|
3870
|
-
"color": "#b5cea8"
|
|
3871
|
-
},
|
|
3872
|
-
"constant": {
|
|
3873
|
-
"color": "#9cdcfe"
|
|
3874
|
-
},
|
|
3875
|
-
"symbol": {
|
|
3876
|
-
"color": "#b5cea8"
|
|
3877
|
-
},
|
|
3878
|
-
"inserted": {
|
|
3879
|
-
"color": "#b5cea8"
|
|
3880
|
-
},
|
|
3881
|
-
"unit": {
|
|
3882
|
-
"color": "#b5cea8"
|
|
3883
|
-
},
|
|
3884
|
-
"selector": {
|
|
3885
|
-
"color": "#d7ba7d"
|
|
3886
|
-
},
|
|
3887
|
-
"attr-name": {
|
|
3888
|
-
"color": "#9cdcfe"
|
|
3889
|
-
},
|
|
3890
|
-
"string": {
|
|
3891
|
-
"color": "#ce9178"
|
|
3892
|
-
},
|
|
3893
|
-
"char": {
|
|
3894
|
-
"color": "#ce9178"
|
|
3895
|
-
},
|
|
3896
|
-
"builtin": {
|
|
3897
|
-
"color": "#ce9178"
|
|
3898
|
-
},
|
|
3899
|
-
"deleted": {
|
|
3900
|
-
"color": "#ce9178"
|
|
3901
|
-
},
|
|
3902
|
-
".language-css .token.string.url": {
|
|
3903
|
-
"textDecoration": "underline"
|
|
3904
|
-
},
|
|
3905
|
-
"operator": {
|
|
3906
|
-
"color": "#d4d4d4"
|
|
3907
|
-
},
|
|
3908
|
-
"entity": {
|
|
3909
|
-
"color": "#569cd6"
|
|
3910
|
-
},
|
|
3911
|
-
"operator.arrow": {
|
|
3912
|
-
"color": "#569CD6"
|
|
3913
|
-
},
|
|
3914
|
-
"atrule": {
|
|
3915
|
-
"color": "#ce9178"
|
|
3916
|
-
},
|
|
3917
|
-
"atrule.rule": {
|
|
3918
|
-
"color": "#c586c0"
|
|
3919
|
-
},
|
|
3920
|
-
"atrule.url": {
|
|
3921
|
-
"color": "#9cdcfe"
|
|
3922
|
-
},
|
|
3923
|
-
"atrule.url.function": {
|
|
3924
|
-
"color": "#dcdcaa"
|
|
3925
|
-
},
|
|
3926
|
-
"atrule.url.punctuation": {
|
|
3927
|
-
"color": "#d4d4d4"
|
|
3928
|
-
},
|
|
3929
|
-
"keyword": {
|
|
3930
|
-
"color": "#569CD6"
|
|
3931
|
-
},
|
|
3932
|
-
"keyword.module": {
|
|
3933
|
-
"color": "#c586c0"
|
|
3934
|
-
},
|
|
3935
|
-
"keyword.control-flow": {
|
|
3936
|
-
"color": "#c586c0"
|
|
3937
|
-
},
|
|
3938
|
-
"function": {
|
|
3939
|
-
"color": "#dcdcaa"
|
|
3940
|
-
},
|
|
3941
|
-
"function.maybe-class-name": {
|
|
3942
|
-
"color": "#dcdcaa"
|
|
3943
|
-
},
|
|
3944
|
-
"regex": {
|
|
3945
|
-
"color": "#d16969"
|
|
3946
|
-
},
|
|
3947
|
-
"important": {
|
|
3948
|
-
"color": "#569cd6"
|
|
3949
|
-
},
|
|
3950
|
-
"italic": {
|
|
3951
|
-
"fontStyle": "italic"
|
|
3952
|
-
},
|
|
3953
|
-
"class-name": {
|
|
3954
|
-
"color": "#4ec9b0"
|
|
3955
|
-
},
|
|
3956
|
-
"maybe-class-name": {
|
|
3957
|
-
"color": "#4ec9b0"
|
|
3958
|
-
},
|
|
3959
|
-
"console": {
|
|
3960
|
-
"color": "#9cdcfe"
|
|
3961
|
-
},
|
|
3962
|
-
"parameter": {
|
|
3963
|
-
"color": "#9cdcfe"
|
|
3964
|
-
},
|
|
3965
|
-
"interpolation": {
|
|
3966
|
-
"color": "#9cdcfe"
|
|
3967
|
-
},
|
|
3968
|
-
"punctuation.interpolation-punctuation": {
|
|
3969
|
-
"color": "#569cd6"
|
|
3970
|
-
},
|
|
3971
|
-
"variable": {
|
|
3972
|
-
"color": "#9cdcfe"
|
|
3973
|
-
},
|
|
3974
|
-
"imports.maybe-class-name": {
|
|
3975
|
-
"color": "#9cdcfe"
|
|
3976
|
-
},
|
|
3977
|
-
"exports.maybe-class-name": {
|
|
3978
|
-
"color": "#9cdcfe"
|
|
3979
|
-
},
|
|
3980
|
-
"escape": {
|
|
3981
|
-
"color": "#d7ba7d"
|
|
3982
|
-
},
|
|
3983
|
-
"tag.punctuation": {
|
|
3984
|
-
"color": "#808080"
|
|
3985
|
-
},
|
|
3986
|
-
"cdata": {
|
|
3987
|
-
"color": "#808080"
|
|
3988
|
-
},
|
|
3989
|
-
"attr-value": {
|
|
3990
|
-
"color": "#ce9178"
|
|
3991
|
-
},
|
|
3992
|
-
"attr-value.punctuation": {
|
|
3993
|
-
"color": "#ce9178"
|
|
3994
|
-
},
|
|
3995
|
-
"attr-value.punctuation.attr-equals": {
|
|
3996
|
-
"color": "#d4d4d4"
|
|
3997
|
-
},
|
|
3998
|
-
"namespace": {
|
|
3999
|
-
"color": "#4ec9b0"
|
|
4000
|
-
},
|
|
4001
|
-
'pre[class*="language-javascript"]': {
|
|
4002
|
-
"color": "#9cdcfe"
|
|
4003
|
-
},
|
|
4004
|
-
'code[class*="language-javascript"]': {
|
|
4005
|
-
"color": "#9cdcfe"
|
|
4006
|
-
},
|
|
4007
|
-
'pre[class*="language-jsx"]': {
|
|
4008
|
-
"color": "#9cdcfe"
|
|
4009
|
-
},
|
|
4010
|
-
'code[class*="language-jsx"]': {
|
|
4011
|
-
"color": "#9cdcfe"
|
|
4012
|
-
},
|
|
4013
|
-
'pre[class*="language-typescript"]': {
|
|
4014
|
-
"color": "#9cdcfe"
|
|
4015
|
-
},
|
|
4016
|
-
'code[class*="language-typescript"]': {
|
|
4017
|
-
"color": "#9cdcfe"
|
|
4018
|
-
},
|
|
4019
|
-
'pre[class*="language-tsx"]': {
|
|
4020
|
-
"color": "#9cdcfe"
|
|
4021
|
-
},
|
|
4022
|
-
'code[class*="language-tsx"]': {
|
|
4023
|
-
"color": "#9cdcfe"
|
|
4024
|
-
},
|
|
4025
|
-
'pre[class*="language-css"]': {
|
|
4026
|
-
"color": "#ce9178"
|
|
4027
|
-
},
|
|
4028
|
-
'code[class*="language-css"]': {
|
|
4029
|
-
"color": "#ce9178"
|
|
4030
|
-
},
|
|
4031
|
-
'pre[class*="language-html"]': {
|
|
4032
|
-
"color": "#d4d4d4"
|
|
4033
|
-
},
|
|
4034
|
-
'code[class*="language-html"]': {
|
|
4035
|
-
"color": "#d4d4d4"
|
|
4036
|
-
},
|
|
4037
|
-
".language-regex .token.anchor": {
|
|
4038
|
-
"color": "#dcdcaa"
|
|
4039
|
-
},
|
|
4040
|
-
".language-html .token.punctuation": {
|
|
4041
|
-
"color": "#808080"
|
|
4042
|
-
},
|
|
4043
|
-
'pre[class*="language-"] > code[class*="language-"]': {
|
|
4044
|
-
"position": "relative",
|
|
4045
|
-
"zIndex": "1"
|
|
4046
|
-
},
|
|
4047
|
-
".line-highlight.line-highlight": {
|
|
4048
|
-
"background": "#f7ebc6",
|
|
4049
|
-
"boxShadow": "inset 5px 0 0 #f7d87c",
|
|
4050
|
-
"zIndex": "0"
|
|
2423
|
+
// src/components/renderers/utils.tsx
|
|
2424
|
+
function extractContent(message) {
|
|
2425
|
+
let text = "";
|
|
2426
|
+
let hasMarkdown = false;
|
|
2427
|
+
let hasCode = false;
|
|
2428
|
+
let hasLinks = false;
|
|
2429
|
+
let hasImages = false;
|
|
2430
|
+
let imageParts = [];
|
|
2431
|
+
if ("parts" in message && Array.isArray(message.parts)) {
|
|
2432
|
+
const distriMessage = message;
|
|
2433
|
+
const textParts = distriMessage.parts?.filter((p) => p.part_type === "text" && p.data)?.map((p) => p.data)?.filter((text2) => text2 && text2.trim()) || [];
|
|
2434
|
+
text = textParts.join(" ").trim();
|
|
2435
|
+
imageParts = distriMessage.parts?.filter((p) => p.part_type === "image") || [];
|
|
2436
|
+
if (!text) {
|
|
2437
|
+
const structuredParts = distriMessage.parts?.filter(
|
|
2438
|
+
(part) => part.part_type !== "text" && part.part_type !== "image"
|
|
2439
|
+
) || [];
|
|
2440
|
+
if (structuredParts.length > 0) {
|
|
2441
|
+
text = structuredParts.map((part) => formatStructuredPart(part)).filter(Boolean).join("\n\n");
|
|
2442
|
+
if (text) {
|
|
2443
|
+
hasMarkdown = true;
|
|
2444
|
+
hasCode = true;
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
hasMarkdown = /[*_`#[\]()>]/.test(text);
|
|
2449
|
+
hasCode = /```|`/.test(text);
|
|
2450
|
+
hasLinks = /\[.*?\]\(.*?\)|https?:\/\/[^\s]+/.test(text);
|
|
2451
|
+
hasImages = /!\[.*?\]\(.*?\)/.test(text) || imageParts.length > 0;
|
|
2452
|
+
} else {
|
|
2453
|
+
text = JSON.stringify(message, null, 2);
|
|
2454
|
+
}
|
|
2455
|
+
return {
|
|
2456
|
+
text,
|
|
2457
|
+
hasMarkdown,
|
|
2458
|
+
hasCode,
|
|
2459
|
+
hasLinks,
|
|
2460
|
+
hasImages,
|
|
2461
|
+
imageParts,
|
|
2462
|
+
rawContent: message
|
|
2463
|
+
};
|
|
2464
|
+
}
|
|
2465
|
+
function formatStructuredPart(part) {
|
|
2466
|
+
switch (part.part_type) {
|
|
2467
|
+
case "tool_call": {
|
|
2468
|
+
const payload = part.data;
|
|
2469
|
+
const toolName = payload?.tool_name || "unknown tool";
|
|
2470
|
+
return `**Tool Call: ${toolName}**
|
|
2471
|
+
|
|
2472
|
+
\`\`\`json
|
|
2473
|
+
${JSON.stringify(part.data, null, 2)}
|
|
2474
|
+
\`\`\``;
|
|
2475
|
+
}
|
|
2476
|
+
case "tool_result":
|
|
2477
|
+
return `**Tool Result**
|
|
2478
|
+
|
|
2479
|
+
\`\`\`json
|
|
2480
|
+
${JSON.stringify(part.data, null, 2)}
|
|
2481
|
+
\`\`\``;
|
|
2482
|
+
case "data":
|
|
2483
|
+
return `\`\`\`json
|
|
2484
|
+
${JSON.stringify(part.data, null, 2)}
|
|
2485
|
+
\`\`\``;
|
|
2486
|
+
default:
|
|
2487
|
+
return `\`\`\`json
|
|
2488
|
+
${JSON.stringify(part, null, 2)}
|
|
2489
|
+
\`\`\``;
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
// src/components/renderers/ImageRenderer.tsx
|
|
2494
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2495
|
+
var ImageRenderer = ({
|
|
2496
|
+
imageParts,
|
|
2497
|
+
className = ""
|
|
2498
|
+
}) => {
|
|
2499
|
+
if (!imageParts || imageParts.length === 0) {
|
|
2500
|
+
return null;
|
|
4051
2501
|
}
|
|
2502
|
+
const getImageSrc = (imageData) => {
|
|
2503
|
+
if ("data" in imageData) {
|
|
2504
|
+
return `data:${imageData.mime_type};base64,${imageData.data}`;
|
|
2505
|
+
} else {
|
|
2506
|
+
return imageData.url;
|
|
2507
|
+
}
|
|
2508
|
+
};
|
|
2509
|
+
const getImageAlt = (imageData) => {
|
|
2510
|
+
return imageData.name || "Attached image";
|
|
2511
|
+
};
|
|
2512
|
+
return /* @__PURE__ */ jsx9("div", { className: `flex flex-wrap gap-3 mt-3 ${className}`, children: imageParts.map((imagePart, index) => {
|
|
2513
|
+
const src = getImageSrc(imagePart.data);
|
|
2514
|
+
const alt = getImageAlt(imagePart.data);
|
|
2515
|
+
return /* @__PURE__ */ jsxs4("div", { className: "relative group", children: [
|
|
2516
|
+
/* @__PURE__ */ jsx9(
|
|
2517
|
+
"img",
|
|
2518
|
+
{
|
|
2519
|
+
src,
|
|
2520
|
+
alt,
|
|
2521
|
+
className: "max-w-sm max-h-64 rounded-lg border border-border object-cover shadow-sm hover:shadow-md transition-shadow cursor-pointer",
|
|
2522
|
+
onClick: () => {
|
|
2523
|
+
window.open(src, "_blank");
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
),
|
|
2527
|
+
imagePart.data.name && /* @__PURE__ */ jsx9("div", { className: "absolute bottom-0 left-0 right-0 bg-black/50 text-white text-xs p-2 rounded-b-lg opacity-0 group-hover:opacity-100 transition-opacity", children: imagePart.data.name })
|
|
2528
|
+
] }, index);
|
|
2529
|
+
}) });
|
|
4052
2530
|
};
|
|
4053
2531
|
|
|
4054
2532
|
// src/components/renderers/TextRenderer.tsx
|
|
2533
|
+
import ReactMarkdown from "react-markdown";
|
|
2534
|
+
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
2535
|
+
import { vscDarkPlus } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
4055
2536
|
import remarkGfm from "remark-gfm";
|
|
4056
2537
|
import rehypeRaw from "rehype-raw";
|
|
4057
2538
|
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
|
|
@@ -4088,9 +2569,9 @@ var TextRenderer = ({ content, className = "" }) => {
|
|
|
4088
2569
|
const language = match ? match[1] : "";
|
|
4089
2570
|
const isInline = !match;
|
|
4090
2571
|
return !isInline && language ? /* @__PURE__ */ jsx10("div", { className: "w-full max-w-full overflow-hidden", style: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx10(
|
|
4091
|
-
|
|
2572
|
+
SyntaxHighlighter,
|
|
4092
2573
|
{
|
|
4093
|
-
style:
|
|
2574
|
+
style: vscDarkPlus,
|
|
4094
2575
|
language,
|
|
4095
2576
|
PreTag: "div",
|
|
4096
2577
|
className: "!mt-0 !mb-0 text-sm",
|
|
@@ -4143,6 +2624,8 @@ import { isDistriMessage as isDistriMessage2 } from "@distri/core";
|
|
|
4143
2624
|
// src/components/renderers/StreamingTextRenderer.tsx
|
|
4144
2625
|
import { useMemo as useMemo4 } from "react";
|
|
4145
2626
|
import ReactMarkdown2 from "react-markdown";
|
|
2627
|
+
import { Prism as SyntaxHighlighter2 } from "react-syntax-highlighter";
|
|
2628
|
+
import { vscDarkPlus as vscDarkPlus2 } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
4146
2629
|
import remarkGfm2 from "remark-gfm";
|
|
4147
2630
|
import rehypeRaw2 from "rehype-raw";
|
|
4148
2631
|
import rehypeSanitize2, { defaultSchema as defaultSchema2 } from "rehype-sanitize";
|
|
@@ -4230,9 +2713,9 @@ var StreamingTextRenderer = ({
|
|
|
4230
2713
|
const language = match ? match[1] : "";
|
|
4231
2714
|
const isInline = !match;
|
|
4232
2715
|
return !isInline && language ? /* @__PURE__ */ jsx12("div", { className: "w-full max-w-full overflow-hidden", style: { maxWidth: "100%" }, children: /* @__PURE__ */ jsx12(
|
|
4233
|
-
|
|
2716
|
+
SyntaxHighlighter2,
|
|
4234
2717
|
{
|
|
4235
|
-
style:
|
|
2718
|
+
style: vscDarkPlus2,
|
|
4236
2719
|
language,
|
|
4237
2720
|
PreTag: "div",
|
|
4238
2721
|
className: "!mt-0 !mb-0 rounded-md text-sm",
|
|
@@ -4584,16 +3067,8 @@ var ToolExecutionRenderer = ({
|
|
|
4584
3067
|
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4585
3068
|
var RendererWrapper = ({
|
|
4586
3069
|
children,
|
|
4587
|
-
className = ""
|
|
4588
|
-
|
|
4589
|
-
}) => /* @__PURE__ */ jsx17("div", { className: `w-full px-4 overflow-hidden ${className}`, style: { maxWidth: "100%", wordBreak: "break-word" }, children: /* @__PURE__ */ jsx17(
|
|
4590
|
-
"div",
|
|
4591
|
-
{
|
|
4592
|
-
className: `w-full overflow-hidden ${isUserMessage ? "ml-auto" : "max-w-4xl mx-auto"}`,
|
|
4593
|
-
style: { maxWidth: isUserMessage ? "100%" : "min(100%, 56rem)", wordBreak: "break-word" },
|
|
4594
|
-
children
|
|
4595
|
-
}
|
|
4596
|
-
) });
|
|
3070
|
+
className = ""
|
|
3071
|
+
}) => /* @__PURE__ */ jsx17("div", { className: `w-full px-4 overflow-hidden ${className}`, style: { maxWidth: "100%", wordBreak: "break-word" }, children: /* @__PURE__ */ jsx17("div", { className: "w-full max-w-4xl mx-auto overflow-hidden", style: { maxWidth: "min(100%, 56rem)", wordBreak: "break-word" }, children }) });
|
|
4597
3072
|
function MessageRenderer({
|
|
4598
3073
|
message,
|
|
4599
3074
|
index,
|
|
@@ -4612,7 +3087,7 @@ function MessageRenderer({
|
|
|
4612
3087
|
const distriMessage = message;
|
|
4613
3088
|
switch (distriMessage.role) {
|
|
4614
3089
|
case "user":
|
|
4615
|
-
return /* @__PURE__ */ jsx17(RendererWrapper, { className: "distri-user-message",
|
|
3090
|
+
return /* @__PURE__ */ jsx17(RendererWrapper, { className: "distri-user-message", children: /* @__PURE__ */ jsx17(
|
|
4616
3091
|
UserMessageRenderer,
|
|
4617
3092
|
{
|
|
4618
3093
|
message: distriMessage
|
|
@@ -4864,14 +3339,14 @@ var LoadingAnimation = ({ config = {} }) => {
|
|
|
4864
3339
|
};
|
|
4865
3340
|
|
|
4866
3341
|
// src/components/ui/select.tsx
|
|
4867
|
-
import * as
|
|
3342
|
+
import * as React11 from "react";
|
|
4868
3343
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4869
3344
|
import { Check as Check2, ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
|
|
4870
3345
|
import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4871
3346
|
var Select = SelectPrimitive.Root;
|
|
4872
3347
|
var SelectGroup = SelectPrimitive.Group;
|
|
4873
3348
|
var SelectValue = SelectPrimitive.Value;
|
|
4874
|
-
var SelectTrigger =
|
|
3349
|
+
var SelectTrigger = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
4875
3350
|
SelectPrimitive.Trigger,
|
|
4876
3351
|
{
|
|
4877
3352
|
ref,
|
|
@@ -4887,7 +3362,7 @@ var SelectTrigger = React13.forwardRef(({ className, children, ...props }, ref)
|
|
|
4887
3362
|
}
|
|
4888
3363
|
));
|
|
4889
3364
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
4890
|
-
var SelectScrollUpButton =
|
|
3365
|
+
var SelectScrollUpButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
4891
3366
|
SelectPrimitive.ScrollUpButton,
|
|
4892
3367
|
{
|
|
4893
3368
|
ref,
|
|
@@ -4900,7 +3375,7 @@ var SelectScrollUpButton = React13.forwardRef(({ className, ...props }, ref) =>
|
|
|
4900
3375
|
}
|
|
4901
3376
|
));
|
|
4902
3377
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
4903
|
-
var SelectScrollDownButton =
|
|
3378
|
+
var SelectScrollDownButton = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
4904
3379
|
SelectPrimitive.ScrollDownButton,
|
|
4905
3380
|
{
|
|
4906
3381
|
ref,
|
|
@@ -4913,7 +3388,7 @@ var SelectScrollDownButton = React13.forwardRef(({ className, ...props }, ref) =
|
|
|
4913
3388
|
}
|
|
4914
3389
|
));
|
|
4915
3390
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
4916
|
-
var SelectContent =
|
|
3391
|
+
var SelectContent = React11.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx20(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs14(
|
|
4917
3392
|
SelectPrimitive.Content,
|
|
4918
3393
|
{
|
|
4919
3394
|
ref,
|
|
@@ -4941,7 +3416,7 @@ var SelectContent = React13.forwardRef(({ className, children, position = "poppe
|
|
|
4941
3416
|
}
|
|
4942
3417
|
) }));
|
|
4943
3418
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
4944
|
-
var SelectLabel =
|
|
3419
|
+
var SelectLabel = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
4945
3420
|
SelectPrimitive.Label,
|
|
4946
3421
|
{
|
|
4947
3422
|
ref,
|
|
@@ -4950,7 +3425,7 @@ var SelectLabel = React13.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4950
3425
|
}
|
|
4951
3426
|
));
|
|
4952
3427
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
4953
|
-
var SelectItem =
|
|
3428
|
+
var SelectItem = React11.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
4954
3429
|
SelectPrimitive.Item,
|
|
4955
3430
|
{
|
|
4956
3431
|
ref,
|
|
@@ -4966,7 +3441,7 @@ var SelectItem = React13.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
4966
3441
|
}
|
|
4967
3442
|
));
|
|
4968
3443
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
4969
|
-
var SelectSeparator =
|
|
3444
|
+
var SelectSeparator = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx20(
|
|
4970
3445
|
SelectPrimitive.Separator,
|
|
4971
3446
|
{
|
|
4972
3447
|
ref,
|
|
@@ -5147,16 +3622,12 @@ var DefaultChatEmptyState = ({ controller, options, maxWidth }) => {
|
|
|
5147
3622
|
const defaultLayout = options?.layout ?? "list";
|
|
5148
3623
|
const handleStarterClick = (starter) => {
|
|
5149
3624
|
const prompt = starter.prompt ?? starter.label;
|
|
5150
|
-
console.log("[ChatEmptyState] Starter clicked:", { label: starter.label, prompt, autoSend: starter.autoSend });
|
|
5151
3625
|
controller.setInput(prompt);
|
|
5152
3626
|
const shouldSubmit = starter.autoSend ?? options?.autoSendOnStarterClick ?? true;
|
|
5153
|
-
console.log("[ChatEmptyState] Should submit:", shouldSubmit);
|
|
5154
3627
|
if (!shouldSubmit) {
|
|
5155
3628
|
return;
|
|
5156
3629
|
}
|
|
5157
|
-
|
|
5158
|
-
void controller.submit(prompt).catch((err) => {
|
|
5159
|
-
console.error("[ChatEmptyState] Submit error:", err);
|
|
3630
|
+
void controller.submit(prompt).catch(() => {
|
|
5160
3631
|
});
|
|
5161
3632
|
};
|
|
5162
3633
|
const renderStarter = (starter, layout) => {
|
|
@@ -5168,12 +3639,8 @@ var DefaultChatEmptyState = ({ controller, options, maxWidth }) => {
|
|
|
5168
3639
|
type: "button",
|
|
5169
3640
|
variant,
|
|
5170
3641
|
size: "sm",
|
|
5171
|
-
className: `h-auto whitespace-normal rounded-lg border-border/50 bg-background text-left text-sm font-normal hover:border-primary/40 hover:bg-primary/5 transition-all
|
|
5172
|
-
onClick: (
|
|
5173
|
-
e.preventDefault();
|
|
5174
|
-
e.stopPropagation();
|
|
5175
|
-
handleStarterClick(starter);
|
|
5176
|
-
},
|
|
3642
|
+
className: `h-auto whitespace-normal rounded-lg border-border/50 bg-background text-left text-sm font-normal hover:border-primary/40 hover:bg-primary/5 transition-all ${isGrid ? "flex-col items-center justify-center p-4 gap-2" : "justify-start px-3 py-3"}`,
|
|
3643
|
+
onClick: () => handleStarterClick(starter),
|
|
5177
3644
|
disabled,
|
|
5178
3645
|
children: [
|
|
5179
3646
|
starter.icon && /* @__PURE__ */ jsx21("span", { className: `text-lg ${isGrid ? "" : "mr-2"}`, children: starter.icon }),
|
|
@@ -5225,6 +3692,41 @@ var DefaultChatEmptyState = ({ controller, options, maxWidth }) => {
|
|
|
5225
3692
|
) });
|
|
5226
3693
|
};
|
|
5227
3694
|
|
|
3695
|
+
// src/components/BrowserPreviewPanel.tsx
|
|
3696
|
+
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3697
|
+
var BrowserPreviewPanel = ({
|
|
3698
|
+
frameSrc,
|
|
3699
|
+
timestampLabel,
|
|
3700
|
+
className
|
|
3701
|
+
}) => {
|
|
3702
|
+
return /* @__PURE__ */ jsxs16(
|
|
3703
|
+
"div",
|
|
3704
|
+
{
|
|
3705
|
+
className: cn(
|
|
3706
|
+
"rounded-xl border bg-muted/40 shadow-sm overflow-hidden",
|
|
3707
|
+
className
|
|
3708
|
+
),
|
|
3709
|
+
children: [
|
|
3710
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between px-3 py-2 border-b bg-background/70 backdrop-blur text-xs text-muted-foreground", children: [
|
|
3711
|
+
/* @__PURE__ */ jsx22("span", { className: "text-xs sm:text-sm font-medium text-foreground", children: "Live browser preview" }),
|
|
3712
|
+
timestampLabel && /* @__PURE__ */ jsxs16("span", { className: "text-[11px] text-muted-foreground/80", children: [
|
|
3713
|
+
"Updated ",
|
|
3714
|
+
timestampLabel
|
|
3715
|
+
] })
|
|
3716
|
+
] }),
|
|
3717
|
+
/* @__PURE__ */ jsx22("div", { className: "bg-background", children: /* @__PURE__ */ jsx22(
|
|
3718
|
+
"img",
|
|
3719
|
+
{
|
|
3720
|
+
src: frameSrc,
|
|
3721
|
+
alt: "Browser screenshot",
|
|
3722
|
+
className: "block w-full h-auto object-contain"
|
|
3723
|
+
}
|
|
3724
|
+
) })
|
|
3725
|
+
]
|
|
3726
|
+
}
|
|
3727
|
+
);
|
|
3728
|
+
};
|
|
3729
|
+
|
|
5228
3730
|
// src/hooks/useChatMessages.ts
|
|
5229
3731
|
import { useCallback as useCallback11, useEffect as useEffect9, useState as useState13, useRef as useRef8 } from "react";
|
|
5230
3732
|
|
|
@@ -5418,17 +3920,6 @@ function convertA2AStatusUpdateToDistri(statusUpdate) {
|
|
|
5418
3920
|
};
|
|
5419
3921
|
return hookRequested;
|
|
5420
3922
|
}
|
|
5421
|
-
case "browser_session_started": {
|
|
5422
|
-
const browserSessionStarted = {
|
|
5423
|
-
type: "browser_session_started",
|
|
5424
|
-
data: {
|
|
5425
|
-
session_id: metadata.session_id || "",
|
|
5426
|
-
viewer_url: metadata.viewer_url,
|
|
5427
|
-
stream_url: metadata.stream_url
|
|
5428
|
-
}
|
|
5429
|
-
};
|
|
5430
|
-
return browserSessionStarted;
|
|
5431
|
-
}
|
|
5432
3923
|
default: {
|
|
5433
3924
|
console.warn(`Unhandled status update metadata type: ${metadata.type}`, metadata);
|
|
5434
3925
|
const defaultResult = {
|
|
@@ -5540,7 +4031,7 @@ function useChatMessages({
|
|
|
5540
4031
|
// src/components/AuthLoading.tsx
|
|
5541
4032
|
import { useEffect as useEffect10, useRef as useRef9, useMemo as useMemo5 } from "react";
|
|
5542
4033
|
import { Loader2 as Loader22, AlertCircle as AlertCircle2 } from "lucide-react";
|
|
5543
|
-
import { Fragment as Fragment3, jsx as
|
|
4034
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5544
4035
|
var AuthLoading = ({
|
|
5545
4036
|
children,
|
|
5546
4037
|
className = ""
|
|
@@ -5608,10 +4099,10 @@ var AuthLoading = ({
|
|
|
5608
4099
|
}, [config]);
|
|
5609
4100
|
const containerClass = `relative flex flex-col items-center justify-center p-8 text-center min-h-[400px] w-full bg-background animate-in fade-in duration-300 ${className}`;
|
|
5610
4101
|
if (status === "loading") {
|
|
5611
|
-
return /* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5613
|
-
/* @__PURE__ */
|
|
5614
|
-
/* @__PURE__ */
|
|
4102
|
+
return /* @__PURE__ */ jsxs17("div", { className: containerClass, children: [
|
|
4103
|
+
/* @__PURE__ */ jsx23(Loader22, { className: "h-8 w-8 animate-spin text-primary mb-4" }),
|
|
4104
|
+
/* @__PURE__ */ jsx23("p", { className: "text-muted-foreground font-sans text-sm animate-pulse font-medium", children: "Initializing Security\u2026" }),
|
|
4105
|
+
/* @__PURE__ */ jsx23(
|
|
5615
4106
|
"iframe",
|
|
5616
4107
|
{
|
|
5617
4108
|
ref: iframeRef,
|
|
@@ -5631,11 +4122,11 @@ var AuthLoading = ({
|
|
|
5631
4122
|
] });
|
|
5632
4123
|
}
|
|
5633
4124
|
if (status === "error") {
|
|
5634
|
-
return /* @__PURE__ */
|
|
5635
|
-
/* @__PURE__ */
|
|
5636
|
-
/* @__PURE__ */
|
|
5637
|
-
/* @__PURE__ */
|
|
5638
|
-
/* @__PURE__ */
|
|
4125
|
+
return /* @__PURE__ */ jsxs17("div", { className: containerClass, children: [
|
|
4126
|
+
/* @__PURE__ */ jsx23(AlertCircle2, { className: "h-12 w-12 text-destructive mb-4" }),
|
|
4127
|
+
/* @__PURE__ */ jsx23("h2", { className: "text-lg font-semibold text-foreground mb-2", children: "Authentication Failed" }),
|
|
4128
|
+
/* @__PURE__ */ jsx23("p", { className: "text-muted-foreground font-sans text-sm mb-6 max-w-xs", children: error || "Could not establish a secure connection." }),
|
|
4129
|
+
/* @__PURE__ */ jsx23(
|
|
5639
4130
|
"button",
|
|
5640
4131
|
{
|
|
5641
4132
|
onClick: () => requestAuth(),
|
|
@@ -5645,16 +4136,16 @@ var AuthLoading = ({
|
|
|
5645
4136
|
)
|
|
5646
4137
|
] });
|
|
5647
4138
|
}
|
|
5648
|
-
return /* @__PURE__ */
|
|
4139
|
+
return /* @__PURE__ */ jsx23(Fragment3, { children });
|
|
5649
4140
|
};
|
|
5650
4141
|
|
|
5651
4142
|
// src/components/Chat.tsx
|
|
5652
4143
|
import { AlertCircle as AlertCircle3, Loader2 as Loader23 } from "lucide-react";
|
|
5653
|
-
import { jsx as
|
|
4144
|
+
import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5654
4145
|
var RendererWrapper2 = ({
|
|
5655
4146
|
children,
|
|
5656
4147
|
className = ""
|
|
5657
|
-
}) => /* @__PURE__ */
|
|
4148
|
+
}) => /* @__PURE__ */ jsx24("div", { className: `max-w-3xl mx-auto w-full ${className}`, children });
|
|
5658
4149
|
var getThemeClasses = (theme) => {
|
|
5659
4150
|
if (theme === "dark") return "dark";
|
|
5660
4151
|
if (theme === "light") return "light";
|
|
@@ -5704,7 +4195,9 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
5704
4195
|
const [streamingTranscript, setStreamingTranscript] = useState14("");
|
|
5705
4196
|
const [audioChunks, setAudioChunks] = useState14([]);
|
|
5706
4197
|
const [browserEnabled, setBrowserEnabled] = useState14(false);
|
|
5707
|
-
const
|
|
4198
|
+
const browserFrame = useChatStateStore((state) => state.browserFrame);
|
|
4199
|
+
const browserFrameUpdatedAt = useChatStateStore((state) => state.browserFrameUpdatedAt);
|
|
4200
|
+
const clearBrowserFrame = useChatStateStore((state) => state.clearBrowserFrame);
|
|
5708
4201
|
const agentDefinition = useMemo6(() => agent?.getDefinition(), [agent]);
|
|
5709
4202
|
const supportsBrowserStreaming = allowBrowserPreview && Boolean(agentDefinition?.browser_config);
|
|
5710
4203
|
const browserAgentIdRef = useRef10(void 0);
|
|
@@ -5713,34 +4206,33 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
5713
4206
|
if (!agentDefinition || !supportsBrowserStreaming) {
|
|
5714
4207
|
setBrowserEnabled(false);
|
|
5715
4208
|
browserAgentIdRef.current = agentId;
|
|
4209
|
+
clearBrowserFrame();
|
|
5716
4210
|
return;
|
|
5717
4211
|
}
|
|
5718
4212
|
if (browserAgentIdRef.current !== agentId) {
|
|
5719
4213
|
browserAgentIdRef.current = agentId;
|
|
5720
4214
|
const defaultEnabled = agentDefinition.browser_config?.enabled ?? false;
|
|
5721
4215
|
setBrowserEnabled(defaultEnabled);
|
|
4216
|
+
if (!defaultEnabled) {
|
|
4217
|
+
clearBrowserFrame();
|
|
4218
|
+
}
|
|
5722
4219
|
}
|
|
5723
|
-
}, [agentDefinition, supportsBrowserStreaming]);
|
|
4220
|
+
}, [agentDefinition, supportsBrowserStreaming, clearBrowserFrame]);
|
|
5724
4221
|
useEffect11(() => {
|
|
5725
4222
|
if (typeof initialInput === "string" && initialInput !== initialInputRef.current) {
|
|
5726
4223
|
setInput(initialInput);
|
|
5727
4224
|
initialInputRef.current = initialInput;
|
|
5728
4225
|
}
|
|
5729
4226
|
}, [initialInput]);
|
|
5730
|
-
const browserSessionId = useChatStateStore((state) => state.browserSessionId);
|
|
5731
4227
|
const mergedMetadataProvider = useCallback12(async () => {
|
|
5732
4228
|
const baseMetadata = await getMetadataProp?.() ?? {};
|
|
5733
4229
|
const existingOverrides = baseMetadata.definition_overrides ?? {};
|
|
5734
4230
|
const overrides = supportsBrowserStreaming ? { ...existingOverrides, use_browser: browserEnabled } : existingOverrides;
|
|
5735
|
-
|
|
4231
|
+
return {
|
|
5736
4232
|
...baseMetadata,
|
|
5737
|
-
definition_overrides: overrides
|
|
5738
|
-
// Include browser_session_id if we have one so browsr reuses the same session
|
|
5739
|
-
...browserSessionId ? { browser_session_id: browserSessionId } : {}
|
|
4233
|
+
definition_overrides: overrides
|
|
5740
4234
|
};
|
|
5741
|
-
|
|
5742
|
-
return metadata;
|
|
5743
|
-
}, [browserEnabled, browserSessionId, getMetadataProp, supportsBrowserStreaming]);
|
|
4235
|
+
}, [browserEnabled, getMetadataProp, supportsBrowserStreaming]);
|
|
5744
4236
|
const {
|
|
5745
4237
|
sendMessage,
|
|
5746
4238
|
stopStreaming,
|
|
@@ -5759,6 +4251,16 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
5759
4251
|
initialMessages,
|
|
5760
4252
|
beforeSendMessage
|
|
5761
4253
|
});
|
|
4254
|
+
console.log("[ChatInner] useChat state:", { isStreaming, isLoading, error, messagesLength: messages.length });
|
|
4255
|
+
const browserTimestampLabel = useMemo6(() => {
|
|
4256
|
+
if (!browserFrameUpdatedAt) return null;
|
|
4257
|
+
try {
|
|
4258
|
+
const date = new Date(browserFrameUpdatedAt);
|
|
4259
|
+
return date.toLocaleTimeString();
|
|
4260
|
+
} catch {
|
|
4261
|
+
return null;
|
|
4262
|
+
}
|
|
4263
|
+
}, [browserFrameUpdatedAt]);
|
|
5762
4264
|
const emptyState = useMemo6(() => {
|
|
5763
4265
|
if (!emptyStateProp && !starterCommands) return void 0;
|
|
5764
4266
|
const starterCategory = starterCommands && starterCommands.length > 0 ? { id: "_starter_commands", starters: starterCommands } : null;
|
|
@@ -5784,39 +4286,13 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
5784
4286
|
onChatStateChange(currentState);
|
|
5785
4287
|
}
|
|
5786
4288
|
}, [currentState, onChatStateChange]);
|
|
5787
|
-
const
|
|
5788
|
-
|
|
5789
|
-
const handleToggleBrowser = useCallback12(async (enabled) => {
|
|
5790
|
-
console.log("[Chat] handleToggleBrowser called:", { enabled, supportsBrowserStreaming, distriClient: !!distriClient, browserSessionId });
|
|
5791
|
-
if (!supportsBrowserStreaming) {
|
|
5792
|
-
console.warn("[Chat] Browser streaming not supported for this agent");
|
|
5793
|
-
return;
|
|
5794
|
-
}
|
|
5795
|
-
if (enabled && !distriClient) {
|
|
5796
|
-
console.warn("[Chat] Cannot create browser session - client not ready");
|
|
5797
|
-
return;
|
|
5798
|
-
}
|
|
4289
|
+
const handleToggleBrowser = useCallback12((enabled) => {
|
|
4290
|
+
if (!supportsBrowserStreaming) return;
|
|
5799
4291
|
setBrowserEnabled(enabled);
|
|
5800
|
-
if (enabled
|
|
5801
|
-
|
|
5802
|
-
if (!currentSessionId) {
|
|
5803
|
-
setBrowserLoading(true);
|
|
5804
|
-
try {
|
|
5805
|
-
console.log("[Chat] Creating browser session...");
|
|
5806
|
-
const session = await distriClient.createBrowserSession();
|
|
5807
|
-
console.log("[Chat] Browser session created:", session);
|
|
5808
|
-
useChatStateStore.getState().setBrowserSession(session.session_id, session.frame_url);
|
|
5809
|
-
} catch (err) {
|
|
5810
|
-
console.error("[Chat] Failed to create browser session:", err);
|
|
5811
|
-
setBrowserEnabled(false);
|
|
5812
|
-
} finally {
|
|
5813
|
-
setBrowserLoading(false);
|
|
5814
|
-
}
|
|
5815
|
-
} else {
|
|
5816
|
-
console.log("[Chat] Reusing existing browser session:", currentSessionId);
|
|
5817
|
-
}
|
|
4292
|
+
if (!enabled) {
|
|
4293
|
+
clearBrowserFrame();
|
|
5818
4294
|
}
|
|
5819
|
-
}, [supportsBrowserStreaming,
|
|
4295
|
+
}, [supportsBrowserStreaming, clearBrowserFrame]);
|
|
5820
4296
|
const addImages = useCallback12(async (files) => {
|
|
5821
4297
|
const imageFiles = Array.from(files).filter((file) => file.type.startsWith("image/"));
|
|
5822
4298
|
for (const file of imageFiles) {
|
|
@@ -6077,7 +4553,7 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6077
4553
|
const renderMessages = () => {
|
|
6078
4554
|
const elements = [];
|
|
6079
4555
|
messages.forEach((message, index) => {
|
|
6080
|
-
const renderedMessage = /* @__PURE__ */
|
|
4556
|
+
const renderedMessage = /* @__PURE__ */ jsx24(
|
|
6081
4557
|
MessageRenderer,
|
|
6082
4558
|
{
|
|
6083
4559
|
message,
|
|
@@ -6104,20 +4580,17 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6104
4580
|
);
|
|
6105
4581
|
externalToolCalls.forEach((toolCall) => {
|
|
6106
4582
|
elements.push(
|
|
6107
|
-
/* @__PURE__ */
|
|
4583
|
+
/* @__PURE__ */ jsx24(RendererWrapper2, { children: toolCall.component }, `external-tool-${toolCall.tool_call_id}`)
|
|
6108
4584
|
);
|
|
6109
4585
|
});
|
|
6110
4586
|
return elements;
|
|
6111
4587
|
};
|
|
6112
4588
|
const showEmptyState = messages.length === 0 && !isLoading && !error;
|
|
6113
4589
|
const submitFromEmptyState = useCallback12(async (value) => {
|
|
6114
|
-
console.log("[Chat] submitFromEmptyState called with:", value);
|
|
6115
4590
|
if (typeof value === "string" || Array.isArray(value)) {
|
|
6116
|
-
console.log("[Chat] Sending message:", value);
|
|
6117
4591
|
await handleSendMessage(value);
|
|
6118
4592
|
return;
|
|
6119
4593
|
}
|
|
6120
|
-
console.log("[Chat] Sending input:", input);
|
|
6121
4594
|
await handleSendMessage(input);
|
|
6122
4595
|
}, [handleSendMessage, input]);
|
|
6123
4596
|
const setComposerInput = useCallback12((value) => {
|
|
@@ -6132,7 +4605,7 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6132
4605
|
}), [input, setComposerInput, submitFromEmptyState, isLoading, isStreaming]);
|
|
6133
4606
|
const renderComposer = useCallback12((variant, className2) => {
|
|
6134
4607
|
const basePlaceholder = showEmptyState && emptyState?.promptPlaceholder ? emptyState.promptPlaceholder : "Type your message\u2026";
|
|
6135
|
-
return /* @__PURE__ */
|
|
4608
|
+
return /* @__PURE__ */ jsx24(
|
|
6136
4609
|
ChatInput,
|
|
6137
4610
|
{
|
|
6138
4611
|
value: input,
|
|
@@ -6140,8 +4613,6 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6140
4613
|
onSend: handleSendMessage,
|
|
6141
4614
|
onStop: handleStopStreaming,
|
|
6142
4615
|
browserEnabled: supportsBrowserStreaming && browserEnabled,
|
|
6143
|
-
browserHasSession: Boolean(browserSessionId),
|
|
6144
|
-
browserLoading,
|
|
6145
4616
|
onToggleBrowser: supportsBrowserStreaming ? handleToggleBrowser : void 0,
|
|
6146
4617
|
placeholder: isStreamingVoice ? "Voice mode active\u2026" : isStreaming ? "Message will be queued\u2026" : basePlaceholder,
|
|
6147
4618
|
disabled: isLoading || hasPendingToolCalls || isStreamingVoice,
|
|
@@ -6156,7 +4627,8 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6156
4627
|
useSpeechRecognition: useSpeechRecognition2,
|
|
6157
4628
|
onSpeechTranscript: handleSpeechTranscript,
|
|
6158
4629
|
className: className2,
|
|
6159
|
-
variant
|
|
4630
|
+
variant,
|
|
4631
|
+
theme
|
|
6160
4632
|
}
|
|
6161
4633
|
);
|
|
6162
4634
|
}, [
|
|
@@ -6165,8 +4637,6 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6165
4637
|
handleSendMessage,
|
|
6166
4638
|
handleStopStreaming,
|
|
6167
4639
|
browserEnabled,
|
|
6168
|
-
browserSessionId,
|
|
6169
|
-
browserLoading,
|
|
6170
4640
|
supportsBrowserStreaming,
|
|
6171
4641
|
handleToggleBrowser,
|
|
6172
4642
|
isStreamingVoice,
|
|
@@ -6183,14 +4653,15 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6183
4653
|
useSpeechRecognition2,
|
|
6184
4654
|
handleSpeechTranscript,
|
|
6185
4655
|
showEmptyState,
|
|
6186
|
-
emptyState
|
|
4656
|
+
emptyState,
|
|
4657
|
+
theme
|
|
6187
4658
|
]);
|
|
6188
4659
|
const emptyStateComposer = useMemo6(() => {
|
|
6189
4660
|
const baseClass = "w-full mx-auto empty-state-composer";
|
|
6190
4661
|
const className2 = maxWidth ? baseClass : `${baseClass} max-w-2xl`;
|
|
6191
4662
|
const composer = renderComposer("hero", className2);
|
|
6192
4663
|
if (maxWidth) {
|
|
6193
|
-
return /* @__PURE__ */
|
|
4664
|
+
return /* @__PURE__ */ jsx24("div", { style: { maxWidth }, children: composer });
|
|
6194
4665
|
}
|
|
6195
4666
|
return composer;
|
|
6196
4667
|
}, [renderComposer, maxWidth]);
|
|
@@ -6206,22 +4677,22 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6206
4677
|
if (renderEmptyState) {
|
|
6207
4678
|
return renderEmptyState(controllerWithComposer);
|
|
6208
4679
|
}
|
|
6209
|
-
return /* @__PURE__ */
|
|
4680
|
+
return /* @__PURE__ */ jsx24(DefaultChatEmptyState, { controller: controllerWithComposer, options: emptyState, maxWidth });
|
|
6210
4681
|
}, [showEmptyState, renderEmptyState, controllerWithComposer, emptyState, maxWidth]);
|
|
6211
4682
|
const shouldRenderFooterComposer = !showEmptyState || Boolean(renderEmptyState);
|
|
6212
4683
|
const footerHasContent = shouldRenderFooterComposer || models && models.length > 0 || voiceEnabled && speechToText && (isStreamingVoice || streamingTranscript);
|
|
6213
|
-
const showBrowserPreview = supportsBrowserStreaming && browserEnabled && Boolean(
|
|
4684
|
+
const showBrowserPreview = supportsBrowserStreaming && browserEnabled && Boolean(browserFrame);
|
|
6214
4685
|
const renderThinkingIndicator = () => {
|
|
6215
4686
|
if (streamingIndicator === "typing") {
|
|
6216
4687
|
if (renderLoadingAnimation) {
|
|
6217
|
-
return /* @__PURE__ */
|
|
4688
|
+
return /* @__PURE__ */ jsx24(RendererWrapper2, { className: "distri-typing-indicator", children: renderLoadingAnimation() }, `typing-indicator`);
|
|
6218
4689
|
}
|
|
6219
4690
|
if (loadingAnimation) {
|
|
6220
|
-
return /* @__PURE__ */
|
|
4691
|
+
return /* @__PURE__ */ jsx24(RendererWrapper2, { className: "distri-typing-indicator", children: /* @__PURE__ */ jsx24(LoadingAnimation, { config: loadingAnimation }) }, `typing-indicator`);
|
|
6221
4692
|
}
|
|
6222
|
-
return /* @__PURE__ */
|
|
4693
|
+
return /* @__PURE__ */ jsx24(RendererWrapper2, { className: "distri-typing-indicator", children: /* @__PURE__ */ jsx24(TypingIndicator, {}) }, `typing-indicator`);
|
|
6223
4694
|
} else if (streamingIndicator) {
|
|
6224
|
-
return /* @__PURE__ */
|
|
4695
|
+
return /* @__PURE__ */ jsx24(RendererWrapper2, { className: "distri-thinking-indicator", children: /* @__PURE__ */ jsx24(
|
|
6225
4696
|
ThinkingRenderer,
|
|
6226
4697
|
{
|
|
6227
4698
|
indicator: streamingIndicator,
|
|
@@ -6234,38 +4705,38 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6234
4705
|
const renderPendingMessage = () => {
|
|
6235
4706
|
if (!pendingMessage || pendingMessage.length === 0) return null;
|
|
6236
4707
|
const partCount = pendingMessage.length;
|
|
6237
|
-
return /* @__PURE__ */
|
|
6238
|
-
/* @__PURE__ */
|
|
6239
|
-
/* @__PURE__ */
|
|
6240
|
-
/* @__PURE__ */
|
|
4708
|
+
return /* @__PURE__ */ jsx24(RendererWrapper2, { children: /* @__PURE__ */ jsx24("div", { className: "border-l-4 border-yellow-400 bg-yellow-50 dark:bg-yellow-900/20 p-4 rounded-r-lg", children: /* @__PURE__ */ jsxs18("div", { className: "flex items-start", children: [
|
|
4709
|
+
/* @__PURE__ */ jsx24("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx24("div", { className: "w-2 h-2 bg-yellow-400 rounded-full animate-pulse mt-2" }) }),
|
|
4710
|
+
/* @__PURE__ */ jsxs18("div", { className: "ml-3 flex-1", children: [
|
|
4711
|
+
/* @__PURE__ */ jsxs18("h3", { className: "text-sm font-medium text-yellow-800 dark:text-yellow-200", children: [
|
|
6241
4712
|
"Message queued (",
|
|
6242
4713
|
partCount,
|
|
6243
4714
|
" part",
|
|
6244
4715
|
partCount > 1 ? "s" : "",
|
|
6245
4716
|
")"
|
|
6246
4717
|
] }),
|
|
6247
|
-
/* @__PURE__ */
|
|
4718
|
+
/* @__PURE__ */ jsx24("div", { className: "mt-2", children: /* @__PURE__ */ jsx24("div", { className: "text-sm text-yellow-700 dark:text-yellow-300 bg-white dark:bg-gray-800 p-2 rounded border", children: pendingMessage.map((part, partIndex) => {
|
|
6248
4719
|
if (part.part_type === "text") {
|
|
6249
|
-
return /* @__PURE__ */
|
|
4720
|
+
return /* @__PURE__ */ jsx24("span", { className: "block mb-1", children: part.data }, partIndex);
|
|
6250
4721
|
} else if (part.part_type === "image" && typeof part.data === "object" && part.data !== null && "name" in part.data) {
|
|
6251
|
-
return /* @__PURE__ */
|
|
4722
|
+
return /* @__PURE__ */ jsxs18("span", { className: "inline-block text-xs text-muted-foreground bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded mr-2 mb-1", children: [
|
|
6252
4723
|
"\u{1F4F7} ",
|
|
6253
4724
|
part.data.name
|
|
6254
4725
|
] }, partIndex);
|
|
6255
4726
|
}
|
|
6256
|
-
return /* @__PURE__ */
|
|
4727
|
+
return /* @__PURE__ */ jsxs18("span", { className: "inline-block text-xs text-muted-foreground bg-gray-100 dark:bg-gray-700 px-2 py-1 rounded mr-2 mb-1", children: [
|
|
6257
4728
|
"[",
|
|
6258
4729
|
part.part_type,
|
|
6259
4730
|
"]"
|
|
6260
4731
|
] }, partIndex);
|
|
6261
4732
|
}) }) }),
|
|
6262
|
-
/* @__PURE__ */
|
|
4733
|
+
/* @__PURE__ */ jsx24("p", { className: "mt-2 text-xs text-yellow-600 dark:text-yellow-400", children: "Will be sent automatically when AI response is complete" })
|
|
6263
4734
|
] })
|
|
6264
4735
|
] }) }) }, "pending-message");
|
|
6265
4736
|
};
|
|
6266
4737
|
if (!agent)
|
|
6267
|
-
return /* @__PURE__ */
|
|
6268
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ jsx24("div", { children: " Agent not available" });
|
|
4739
|
+
return /* @__PURE__ */ jsxs18(
|
|
6269
4740
|
"div",
|
|
6270
4741
|
{
|
|
6271
4742
|
className: `flex flex-col h-full bg-background font-sans overflow-hidden relative ${getThemeClasses(theme)} ${className}`,
|
|
@@ -6274,62 +4745,63 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6274
4745
|
onDragLeave: handleDragLeave,
|
|
6275
4746
|
onDrop: handleDrop,
|
|
6276
4747
|
children: [
|
|
6277
|
-
isDragOver && /* @__PURE__ */
|
|
6278
|
-
/* @__PURE__ */
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
4748
|
+
isDragOver && /* @__PURE__ */ jsx24("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-primary/10 border-2 border-primary border-dashed", children: /* @__PURE__ */ jsx24("div", { className: "text-primary font-medium text-lg", children: "Drop images anywhere to upload" }) }),
|
|
4749
|
+
/* @__PURE__ */ jsx24("div", { className: "flex-1 overflow-y-auto bg-background text-foreground selection:bg-primary/20 selection:text-primary-foreground dark:selection:bg-primary/40", children: /* @__PURE__ */ jsxs18(
|
|
4750
|
+
"div",
|
|
4751
|
+
{
|
|
4752
|
+
className: "mx-auto w-full px-2 sm:px-4 py-4 text-sm space-y-4",
|
|
4753
|
+
style: maxWidth ? { maxWidth, width: "100%", boxSizing: "border-box" } : void 0,
|
|
4754
|
+
children: [
|
|
4755
|
+
error && /* @__PURE__ */ jsx24("div", { className: "p-4 bg-destructive/10 border-l-4 border-destructive", children: /* @__PURE__ */ jsxs18("div", { className: "text-destructive text-xs", children: [
|
|
4756
|
+
/* @__PURE__ */ jsx24("strong", { children: "Error:" }),
|
|
4757
|
+
" ",
|
|
4758
|
+
error.message
|
|
4759
|
+
] }) }),
|
|
4760
|
+
/* @__PURE__ */ jsxs18(
|
|
4761
|
+
"div",
|
|
4762
|
+
{
|
|
4763
|
+
className: "flex flex-col gap-4 lg:flex-row lg:items-start",
|
|
4764
|
+
style: maxWidth ? { maxWidth: "100%" } : void 0,
|
|
4765
|
+
children: [
|
|
4766
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex-1 min-w-0 space-y-4 w-full", children: [
|
|
4767
|
+
emptyStateContent,
|
|
4768
|
+
renderMessages(),
|
|
4769
|
+
renderExternalToolCalls(),
|
|
4770
|
+
renderThinkingIndicator(),
|
|
4771
|
+
renderPendingMessage(),
|
|
4772
|
+
/* @__PURE__ */ jsx24("div", { ref: messagesEndRef })
|
|
4773
|
+
] }),
|
|
4774
|
+
showBrowserPreview && browserFrame && /* @__PURE__ */ jsx24("div", { className: "w-full lg:w-[320px] xl:w-[360px] shrink-0", children: /* @__PURE__ */ jsx24("div", { className: "lg:sticky lg:top-4 space-y-3", children: /* @__PURE__ */ jsx24(
|
|
4775
|
+
BrowserPreviewPanel,
|
|
4776
|
+
{
|
|
4777
|
+
frameSrc: browserFrame,
|
|
4778
|
+
timestampLabel: browserTimestampLabel
|
|
4779
|
+
}
|
|
4780
|
+
) }) })
|
|
4781
|
+
]
|
|
4782
|
+
}
|
|
4783
|
+
)
|
|
4784
|
+
]
|
|
4785
|
+
}
|
|
4786
|
+
) }),
|
|
4787
|
+
footerHasContent ? /* @__PURE__ */ jsx24("footer", { className: "\n sticky bottom-0 inset-x-0 z-30\n border-t border-border\n bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/60\n pb-[env(safe-area-inset-bottom)]\n", children: /* @__PURE__ */ jsxs18(
|
|
6316
4788
|
"div",
|
|
6317
4789
|
{
|
|
6318
4790
|
className: "mx-auto w-full px-4 py-3 sm:py-4 space-y-3",
|
|
6319
|
-
style: { maxWidth
|
|
4791
|
+
style: maxWidth ? { maxWidth } : void 0,
|
|
6320
4792
|
children: [
|
|
6321
|
-
models && models.length > 0 && /* @__PURE__ */
|
|
6322
|
-
/* @__PURE__ */
|
|
6323
|
-
/* @__PURE__ */
|
|
6324
|
-
/* @__PURE__ */
|
|
6325
|
-
/* @__PURE__ */
|
|
4793
|
+
models && models.length > 0 && /* @__PURE__ */ jsxs18("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
4794
|
+
/* @__PURE__ */ jsx24("span", { className: "text-sm text-muted-foreground shrink-0", children: "Model:" }),
|
|
4795
|
+
/* @__PURE__ */ jsxs18(Select, { value: selectedModelId, onValueChange: onModelChange, children: [
|
|
4796
|
+
/* @__PURE__ */ jsx24(SelectTrigger, { className: "w-64 max-w-full", children: /* @__PURE__ */ jsx24(SelectValue, { placeholder: "Select a model" }) }),
|
|
4797
|
+
/* @__PURE__ */ jsx24(SelectContent, { children: models.map((model) => /* @__PURE__ */ jsx24(SelectItem, { value: model.id, children: model.name }, model.id)) })
|
|
6326
4798
|
] })
|
|
6327
4799
|
] }),
|
|
6328
|
-
voiceEnabled && speechToText && (isStreamingVoice || streamingTranscript) && /* @__PURE__ */
|
|
6329
|
-
/* @__PURE__ */
|
|
6330
|
-
/* @__PURE__ */
|
|
6331
|
-
/* @__PURE__ */
|
|
6332
|
-
isStreamingVoice && /* @__PURE__ */
|
|
4800
|
+
voiceEnabled && speechToText && (isStreamingVoice || streamingTranscript) && /* @__PURE__ */ jsxs18("div", { className: "p-3 bg-muted/50 border border-muted rounded-lg", children: [
|
|
4801
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
4802
|
+
/* @__PURE__ */ jsx24("span", { className: "w-2 h-2 rounded-full bg-red-500 animate-pulse" }),
|
|
4803
|
+
/* @__PURE__ */ jsx24("span", { className: "text-sm font-medium text-muted-foreground", children: isStreamingVoice ? "Listening\u2026" : "Processing\u2026" }),
|
|
4804
|
+
isStreamingVoice && /* @__PURE__ */ jsx24(
|
|
6333
4805
|
"button",
|
|
6334
4806
|
{
|
|
6335
4807
|
onClick: stopStreamingVoice,
|
|
@@ -6338,7 +4810,7 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6338
4810
|
}
|
|
6339
4811
|
)
|
|
6340
4812
|
] }),
|
|
6341
|
-
streamingTranscript && /* @__PURE__ */
|
|
4813
|
+
streamingTranscript && /* @__PURE__ */ jsxs18("p", { className: "mt-2 text-sm text-foreground font-mono break-words", children: [
|
|
6342
4814
|
"\u201C",
|
|
6343
4815
|
streamingTranscript,
|
|
6344
4816
|
"\u201D"
|
|
@@ -6353,45 +4825,70 @@ var ChatInner = forwardRef4(function ChatInner2({
|
|
|
6353
4825
|
);
|
|
6354
4826
|
});
|
|
6355
4827
|
var Chat = forwardRef4((props, ref) => {
|
|
6356
|
-
return /* @__PURE__ */
|
|
4828
|
+
return /* @__PURE__ */ jsx24(AuthLoading, { children: /* @__PURE__ */ jsx24(ChatContainer, { ref, ...props }) });
|
|
6357
4829
|
});
|
|
6358
4830
|
var ChatContainer = forwardRef4(function ChatContainer2({ agent: agentProp, agentId, enableHistory, threadId, initialMessages: initialMessagesProp, theme, ...props }, ref) {
|
|
6359
|
-
const { isLoading: clientLoading } = useDistri();
|
|
6360
|
-
|
|
4831
|
+
const { isLoading: clientLoading, client } = useDistri();
|
|
4832
|
+
useEffect11(() => {
|
|
4833
|
+
console.log("[ChatContainer] State:", {
|
|
4834
|
+
clientLoading,
|
|
4835
|
+
hasClient: !!client,
|
|
4836
|
+
agentId,
|
|
4837
|
+
agentProp: !!agentProp,
|
|
4838
|
+
enableHistory,
|
|
4839
|
+
threadId
|
|
4840
|
+
});
|
|
4841
|
+
}, [clientLoading, client, agentId, agentProp, enableHistory, threadId]);
|
|
4842
|
+
const { agent: fetchedAgent, loading: agentLoading, error: agentError } = useAgent({
|
|
6361
4843
|
agentIdOrDef: agentId || "",
|
|
6362
4844
|
enabled: !agentProp && !!agentId
|
|
6363
4845
|
});
|
|
4846
|
+
useEffect11(() => {
|
|
4847
|
+
console.log("[ChatContainer] Agent Fetch:", {
|
|
4848
|
+
agentLoading,
|
|
4849
|
+
hasAgent: !!(agentProp || fetchedAgent),
|
|
4850
|
+
agentError: agentError?.message
|
|
4851
|
+
});
|
|
4852
|
+
}, [agentLoading, agentProp, fetchedAgent, agentError]);
|
|
6364
4853
|
const agent = agentProp || fetchedAgent;
|
|
6365
|
-
const { messages: fetchedMessages, isLoading: historyLoading } = useChatMessages({
|
|
4854
|
+
const { messages: fetchedMessages, isLoading: historyLoading, error: historyError } = useChatMessages({
|
|
6366
4855
|
threadId,
|
|
6367
4856
|
enabled: !!enableHistory && !initialMessagesProp && !!threadId
|
|
6368
4857
|
});
|
|
4858
|
+
useEffect11(() => {
|
|
4859
|
+
console.log("[ChatContainer] History Fetch:", {
|
|
4860
|
+
historyLoading,
|
|
4861
|
+
hasMessages: !!(initialMessagesProp || fetchedMessages),
|
|
4862
|
+
historyError: historyError?.message
|
|
4863
|
+
});
|
|
4864
|
+
}, [historyLoading, initialMessagesProp, fetchedMessages, historyError]);
|
|
6369
4865
|
const initialMessages = initialMessagesProp || fetchedMessages;
|
|
6370
4866
|
if (clientLoading || agentLoading || enableHistory && historyLoading) {
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
/* @__PURE__ */
|
|
4867
|
+
console.log("[ChatContainer] Rendering Loading State:", { clientLoading, agentLoading, historyLoading, enableHistory });
|
|
4868
|
+
return /* @__PURE__ */ jsxs18("div", { className: `flex flex-col items-center justify-center p-8 text-center h-full bg-background ${getThemeClasses(theme || "auto")}`, children: [
|
|
4869
|
+
/* @__PURE__ */ jsx24(Loader23, { className: "h-8 w-8 animate-spin text-primary mb-4" }),
|
|
4870
|
+
/* @__PURE__ */ jsx24("p", { className: "text-muted-foreground font-sans text-sm", children: "Initializing..." })
|
|
6374
4871
|
] });
|
|
6375
4872
|
}
|
|
6376
4873
|
if (!agent) {
|
|
6377
|
-
return /* @__PURE__ */
|
|
6378
|
-
/* @__PURE__ */
|
|
6379
|
-
/* @__PURE__ */
|
|
6380
|
-
/* @__PURE__ */
|
|
6381
|
-
/* @__PURE__ */
|
|
4874
|
+
return /* @__PURE__ */ jsxs18("div", { className: `flex flex-col items-center justify-center p-8 text-center h-full bg-background ${getThemeClasses(theme || "auto")}`, children: [
|
|
4875
|
+
/* @__PURE__ */ jsx24(AlertCircle3, { className: "h-12 w-12 text-amber-500 mb-4" }),
|
|
4876
|
+
/* @__PURE__ */ jsx24("h2", { className: "text-lg font-semibold text-foreground mb-2", children: "Agent Not Available" }),
|
|
4877
|
+
/* @__PURE__ */ jsx24("p", { className: "text-muted-foreground font-sans text-sm mb-4", children: "No agent has been configured or the backend is not responding." }),
|
|
4878
|
+
/* @__PURE__ */ jsx24("p", { className: "text-muted-foreground font-sans text-xs", children: "Make sure your Distri backend is running and accessible." })
|
|
6382
4879
|
] });
|
|
6383
4880
|
}
|
|
6384
|
-
return /* @__PURE__ */
|
|
4881
|
+
return /* @__PURE__ */ jsx24(ChatInner, { ref, agent, threadId, initialMessages, theme, ...props });
|
|
6385
4882
|
});
|
|
6386
4883
|
|
|
6387
4884
|
// src/components/AgentList.tsx
|
|
6388
|
-
import
|
|
4885
|
+
import React14 from "react";
|
|
6389
4886
|
import { RefreshCw, Play, Bot } from "lucide-react";
|
|
6390
|
-
import { jsx as
|
|
4887
|
+
import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
6391
4888
|
|
|
6392
4889
|
// src/components/AgentSelect.tsx
|
|
6393
4890
|
import { Bot as Bot2 } from "lucide-react";
|
|
6394
|
-
import { jsx as
|
|
4891
|
+
import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6395
4892
|
var AgentSelect = ({
|
|
6396
4893
|
agents,
|
|
6397
4894
|
selectedAgentId,
|
|
@@ -6401,40 +4898,40 @@ var AgentSelect = ({
|
|
|
6401
4898
|
disabled = false
|
|
6402
4899
|
}) => {
|
|
6403
4900
|
const selectedAgent = agents.find((agent) => agent.id === selectedAgentId);
|
|
6404
|
-
return /* @__PURE__ */
|
|
6405
|
-
/* @__PURE__ */
|
|
6406
|
-
/* @__PURE__ */
|
|
6407
|
-
/* @__PURE__ */
|
|
4901
|
+
return /* @__PURE__ */ jsxs20(Select, { value: selectedAgentId, onValueChange: onAgentSelect, disabled, children: [
|
|
4902
|
+
/* @__PURE__ */ jsx26(SelectTrigger, { className: `w-full ${className} ${disabled ? "opacity-50 cursor-not-allowed" : ""}`, children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-2", children: [
|
|
4903
|
+
/* @__PURE__ */ jsx26(Bot2, { className: "h-4 w-4" }),
|
|
4904
|
+
/* @__PURE__ */ jsx26(SelectValue, { placeholder, children: selectedAgent?.name || placeholder })
|
|
6408
4905
|
] }) }),
|
|
6409
|
-
/* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6412
|
-
/* @__PURE__ */
|
|
6413
|
-
agent.description && /* @__PURE__ */
|
|
4906
|
+
/* @__PURE__ */ jsx26(SelectContent, { children: agents.map((agent) => /* @__PURE__ */ jsx26(SelectItem, { value: agent.id, children: /* @__PURE__ */ jsxs20("div", { className: "flex items-center space-x-2", children: [
|
|
4907
|
+
/* @__PURE__ */ jsx26(Bot2, { className: "h-4 w-4" }),
|
|
4908
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col", children: [
|
|
4909
|
+
/* @__PURE__ */ jsx26("span", { className: "font-medium", children: agent.name }),
|
|
4910
|
+
agent.description && /* @__PURE__ */ jsx26("span", { className: "text-xs text-muted-foreground", children: agent.description })
|
|
6414
4911
|
] })
|
|
6415
4912
|
] }) }, agent.id)) })
|
|
6416
4913
|
] });
|
|
6417
4914
|
};
|
|
6418
4915
|
|
|
6419
4916
|
// src/components/AgentsPage.tsx
|
|
6420
|
-
import { jsx as
|
|
4917
|
+
import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6421
4918
|
|
|
6422
4919
|
// src/components/AppSidebar.tsx
|
|
6423
4920
|
import { useState as useState16, useCallback as useCallback14 } from "react";
|
|
6424
4921
|
import { MoreHorizontal, Trash2, Edit3, Bot as Bot3, Users, Edit2, RefreshCw as RefreshCw2, Github, Loader2 as Loader24 } from "lucide-react";
|
|
6425
4922
|
|
|
6426
4923
|
// src/components/ui/sidebar.tsx
|
|
6427
|
-
import * as
|
|
4924
|
+
import * as React18 from "react";
|
|
6428
4925
|
import { Slot } from "@radix-ui/react-slot";
|
|
6429
4926
|
import { cva as cva2 } from "class-variance-authority";
|
|
6430
4927
|
import { PanelLeft } from "lucide-react";
|
|
6431
4928
|
|
|
6432
4929
|
// src/components/ui/separator.tsx
|
|
6433
|
-
import * as
|
|
4930
|
+
import * as React15 from "react";
|
|
6434
4931
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
6435
|
-
import { jsx as
|
|
6436
|
-
var Separator2 =
|
|
6437
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */
|
|
4932
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4933
|
+
var Separator2 = React15.forwardRef(
|
|
4934
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
6438
4935
|
SeparatorPrimitive.Root,
|
|
6439
4936
|
{
|
|
6440
4937
|
ref,
|
|
@@ -6452,14 +4949,14 @@ var Separator2 = React17.forwardRef(
|
|
|
6452
4949
|
Separator2.displayName = SeparatorPrimitive.Root.displayName;
|
|
6453
4950
|
|
|
6454
4951
|
// src/components/ui/sheet.tsx
|
|
6455
|
-
import * as
|
|
4952
|
+
import * as React16 from "react";
|
|
6456
4953
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
6457
4954
|
import { cva } from "class-variance-authority";
|
|
6458
4955
|
import { X as X2 } from "lucide-react";
|
|
6459
|
-
import { jsx as
|
|
4956
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6460
4957
|
var Sheet = SheetPrimitive.Root;
|
|
6461
4958
|
var SheetPortal = SheetPrimitive.Portal;
|
|
6462
|
-
var SheetOverlay =
|
|
4959
|
+
var SheetOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
6463
4960
|
SheetPrimitive.Overlay,
|
|
6464
4961
|
{
|
|
6465
4962
|
className: cn(
|
|
@@ -6487,9 +4984,9 @@ var sheetVariants = cva(
|
|
|
6487
4984
|
}
|
|
6488
4985
|
}
|
|
6489
4986
|
);
|
|
6490
|
-
var SheetContent =
|
|
6491
|
-
/* @__PURE__ */
|
|
6492
|
-
/* @__PURE__ */
|
|
4987
|
+
var SheetContent = React16.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs22(SheetPortal, { children: [
|
|
4988
|
+
/* @__PURE__ */ jsx29(SheetOverlay, {}),
|
|
4989
|
+
/* @__PURE__ */ jsxs22(
|
|
6493
4990
|
SheetPrimitive.Content,
|
|
6494
4991
|
{
|
|
6495
4992
|
ref,
|
|
@@ -6497,9 +4994,9 @@ var SheetContent = React18.forwardRef(({ side = "right", className, children, ..
|
|
|
6497
4994
|
...props,
|
|
6498
4995
|
children: [
|
|
6499
4996
|
children,
|
|
6500
|
-
/* @__PURE__ */
|
|
6501
|
-
/* @__PURE__ */
|
|
6502
|
-
/* @__PURE__ */
|
|
4997
|
+
/* @__PURE__ */ jsxs22(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
4998
|
+
/* @__PURE__ */ jsx29(X2, { className: "h-4 w-4" }),
|
|
4999
|
+
/* @__PURE__ */ jsx29("span", { className: "sr-only", children: "Close" })
|
|
6503
5000
|
] })
|
|
6504
5001
|
]
|
|
6505
5002
|
}
|
|
@@ -6509,7 +5006,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
6509
5006
|
var SheetHeader = ({
|
|
6510
5007
|
className,
|
|
6511
5008
|
...props
|
|
6512
|
-
}) => /* @__PURE__ */
|
|
5009
|
+
}) => /* @__PURE__ */ jsx29(
|
|
6513
5010
|
"div",
|
|
6514
5011
|
{
|
|
6515
5012
|
className: cn(
|
|
@@ -6523,7 +5020,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
6523
5020
|
var SheetFooter = ({
|
|
6524
5021
|
className,
|
|
6525
5022
|
...props
|
|
6526
|
-
}) => /* @__PURE__ */
|
|
5023
|
+
}) => /* @__PURE__ */ jsx29(
|
|
6527
5024
|
"div",
|
|
6528
5025
|
{
|
|
6529
5026
|
className: cn(
|
|
@@ -6534,7 +5031,7 @@ var SheetFooter = ({
|
|
|
6534
5031
|
}
|
|
6535
5032
|
);
|
|
6536
5033
|
SheetFooter.displayName = "SheetFooter";
|
|
6537
|
-
var SheetTitle =
|
|
5034
|
+
var SheetTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
6538
5035
|
SheetPrimitive.Title,
|
|
6539
5036
|
{
|
|
6540
5037
|
ref,
|
|
@@ -6543,7 +5040,7 @@ var SheetTitle = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
6543
5040
|
}
|
|
6544
5041
|
));
|
|
6545
5042
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
6546
|
-
var SheetDescription =
|
|
5043
|
+
var SheetDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
6547
5044
|
SheetPrimitive.Description,
|
|
6548
5045
|
{
|
|
6549
5046
|
ref,
|
|
@@ -6554,12 +5051,12 @@ var SheetDescription = React18.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
6554
5051
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
6555
5052
|
|
|
6556
5053
|
// src/components/ui/skeleton.tsx
|
|
6557
|
-
import { jsx as
|
|
5054
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
6558
5055
|
function Skeleton({
|
|
6559
5056
|
className,
|
|
6560
5057
|
...props
|
|
6561
5058
|
}) {
|
|
6562
|
-
return /* @__PURE__ */
|
|
5059
|
+
return /* @__PURE__ */ jsx30(
|
|
6563
5060
|
"div",
|
|
6564
5061
|
{
|
|
6565
5062
|
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
@@ -6569,13 +5066,13 @@ function Skeleton({
|
|
|
6569
5066
|
}
|
|
6570
5067
|
|
|
6571
5068
|
// src/components/ui/tooltip.tsx
|
|
6572
|
-
import * as
|
|
5069
|
+
import * as React17 from "react";
|
|
6573
5070
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
6574
|
-
import { jsx as
|
|
5071
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
6575
5072
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
6576
5073
|
var Tooltip = TooltipPrimitive.Root;
|
|
6577
5074
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
6578
|
-
var TooltipContent =
|
|
5075
|
+
var TooltipContent = React17.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx31(
|
|
6579
5076
|
TooltipPrimitive.Content,
|
|
6580
5077
|
{
|
|
6581
5078
|
ref,
|
|
@@ -6590,25 +5087,25 @@ var TooltipContent = React19.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
6590
5087
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
6591
5088
|
|
|
6592
5089
|
// src/components/ui/sidebar.tsx
|
|
6593
|
-
import { jsx as
|
|
5090
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6594
5091
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
6595
5092
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
6596
5093
|
var SIDEBAR_WIDTH = "16rem";
|
|
6597
5094
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
6598
5095
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
6599
5096
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
6600
|
-
var SidebarContext =
|
|
5097
|
+
var SidebarContext = React18.createContext(null);
|
|
6601
5098
|
function useSidebar() {
|
|
6602
|
-
const context =
|
|
5099
|
+
const context = React18.useContext(SidebarContext);
|
|
6603
5100
|
if (!context) {
|
|
6604
5101
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
6605
5102
|
}
|
|
6606
5103
|
return context;
|
|
6607
5104
|
}
|
|
6608
|
-
var SidebarProvider =
|
|
6609
|
-
const [_open, _setOpen] =
|
|
5105
|
+
var SidebarProvider = React18.forwardRef(({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }, ref) => {
|
|
5106
|
+
const [_open, _setOpen] = React18.useState(defaultOpen);
|
|
6610
5107
|
const open = openProp ?? _open;
|
|
6611
|
-
const setOpen =
|
|
5108
|
+
const setOpen = React18.useCallback(
|
|
6612
5109
|
(value) => {
|
|
6613
5110
|
const openState = typeof value === "function" ? value(open) : value;
|
|
6614
5111
|
if (setOpenProp) {
|
|
@@ -6620,9 +5117,9 @@ var SidebarProvider = React20.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
6620
5117
|
},
|
|
6621
5118
|
[setOpenProp, open]
|
|
6622
5119
|
);
|
|
6623
|
-
const [openMobile, setOpenMobile] =
|
|
6624
|
-
const [isMobile, setIsMobile] =
|
|
6625
|
-
|
|
5120
|
+
const [openMobile, setOpenMobile] = React18.useState(false);
|
|
5121
|
+
const [isMobile, setIsMobile] = React18.useState(false);
|
|
5122
|
+
React18.useEffect(() => {
|
|
6626
5123
|
const checkMobile = () => {
|
|
6627
5124
|
setIsMobile(window.innerWidth < 768);
|
|
6628
5125
|
if (window.innerWidth < 768 && open) {
|
|
@@ -6633,13 +5130,13 @@ var SidebarProvider = React20.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
6633
5130
|
window.addEventListener("resize", checkMobile);
|
|
6634
5131
|
return () => window.removeEventListener("resize", checkMobile);
|
|
6635
5132
|
}, [setOpen, open]);
|
|
6636
|
-
|
|
5133
|
+
React18.useEffect(() => {
|
|
6637
5134
|
const savedState = localStorage.getItem(SIDEBAR_COOKIE_NAME);
|
|
6638
5135
|
if (savedState !== null) {
|
|
6639
5136
|
setOpen(savedState === "true");
|
|
6640
5137
|
}
|
|
6641
5138
|
}, [setOpen]);
|
|
6642
|
-
|
|
5139
|
+
React18.useEffect(() => {
|
|
6643
5140
|
const handleKeyDown = (event) => {
|
|
6644
5141
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
6645
5142
|
event.preventDefault();
|
|
@@ -6649,11 +5146,11 @@ var SidebarProvider = React20.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
6649
5146
|
window.addEventListener("keydown", handleKeyDown);
|
|
6650
5147
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
6651
5148
|
}, [open, setOpen]);
|
|
6652
|
-
const toggleSidebar =
|
|
5149
|
+
const toggleSidebar = React18.useCallback(() => {
|
|
6653
5150
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
6654
5151
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
6655
5152
|
const state = open ? "expanded" : "collapsed";
|
|
6656
|
-
const contextValue =
|
|
5153
|
+
const contextValue = React18.useMemo(
|
|
6657
5154
|
() => ({
|
|
6658
5155
|
state,
|
|
6659
5156
|
open,
|
|
@@ -6665,7 +5162,7 @@ var SidebarProvider = React20.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
6665
5162
|
}),
|
|
6666
5163
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
6667
5164
|
);
|
|
6668
|
-
const providerStyle =
|
|
5165
|
+
const providerStyle = React18.useMemo(() => {
|
|
6669
5166
|
const vars = {
|
|
6670
5167
|
...style,
|
|
6671
5168
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
@@ -6673,7 +5170,7 @@ var SidebarProvider = React20.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
6673
5170
|
};
|
|
6674
5171
|
return vars;
|
|
6675
5172
|
}, [style]);
|
|
6676
|
-
return /* @__PURE__ */
|
|
5173
|
+
return /* @__PURE__ */ jsx32(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx32(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx32(
|
|
6677
5174
|
"div",
|
|
6678
5175
|
{
|
|
6679
5176
|
style: providerStyle,
|
|
@@ -6688,10 +5185,10 @@ var SidebarProvider = React20.forwardRef(({ defaultOpen = true, open: openProp,
|
|
|
6688
5185
|
) }) });
|
|
6689
5186
|
});
|
|
6690
5187
|
SidebarProvider.displayName = "SidebarProvider";
|
|
6691
|
-
var Sidebar =
|
|
5188
|
+
var Sidebar = React18.forwardRef(({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }, ref) => {
|
|
6692
5189
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
6693
5190
|
if (collapsible === "none") {
|
|
6694
|
-
return /* @__PURE__ */
|
|
5191
|
+
return /* @__PURE__ */ jsx32(
|
|
6695
5192
|
"div",
|
|
6696
5193
|
{
|
|
6697
5194
|
className: cn(
|
|
@@ -6708,7 +5205,7 @@ var Sidebar = React20.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
6708
5205
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
6709
5206
|
};
|
|
6710
5207
|
if (isMobile) {
|
|
6711
|
-
return /* @__PURE__ */
|
|
5208
|
+
return /* @__PURE__ */ jsx32(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx32(
|
|
6712
5209
|
SheetContent,
|
|
6713
5210
|
{
|
|
6714
5211
|
"data-sidebar": "sidebar",
|
|
@@ -6716,11 +5213,11 @@ var Sidebar = React20.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
6716
5213
|
className: "w-[--sidebar-width-mobile] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
6717
5214
|
style: sheetStyles,
|
|
6718
5215
|
side,
|
|
6719
|
-
children: /* @__PURE__ */
|
|
5216
|
+
children: /* @__PURE__ */ jsx32("div", { className: "flex h-full w-full flex-col", children })
|
|
6720
5217
|
}
|
|
6721
5218
|
) });
|
|
6722
5219
|
}
|
|
6723
|
-
return /* @__PURE__ */
|
|
5220
|
+
return /* @__PURE__ */ jsxs23(
|
|
6724
5221
|
"div",
|
|
6725
5222
|
{
|
|
6726
5223
|
ref,
|
|
@@ -6730,7 +5227,7 @@ var Sidebar = React20.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
6730
5227
|
"data-variant": variant,
|
|
6731
5228
|
"data-side": side,
|
|
6732
5229
|
children: [
|
|
6733
|
-
/* @__PURE__ */
|
|
5230
|
+
/* @__PURE__ */ jsx32(
|
|
6734
5231
|
"div",
|
|
6735
5232
|
{
|
|
6736
5233
|
className: cn(
|
|
@@ -6741,7 +5238,7 @@ var Sidebar = React20.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
6741
5238
|
)
|
|
6742
5239
|
}
|
|
6743
5240
|
),
|
|
6744
|
-
/* @__PURE__ */
|
|
5241
|
+
/* @__PURE__ */ jsx32(
|
|
6745
5242
|
"div",
|
|
6746
5243
|
{
|
|
6747
5244
|
className: cn(
|
|
@@ -6752,7 +5249,7 @@ var Sidebar = React20.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
6752
5249
|
className
|
|
6753
5250
|
),
|
|
6754
5251
|
...props,
|
|
6755
|
-
children: /* @__PURE__ */
|
|
5252
|
+
children: /* @__PURE__ */ jsx32(
|
|
6756
5253
|
"div",
|
|
6757
5254
|
{
|
|
6758
5255
|
"data-sidebar": "sidebar",
|
|
@@ -6767,9 +5264,9 @@ var Sidebar = React20.forwardRef(({ side = "left", variant = "sidebar", collapsi
|
|
|
6767
5264
|
);
|
|
6768
5265
|
});
|
|
6769
5266
|
Sidebar.displayName = "Sidebar";
|
|
6770
|
-
var SidebarTrigger =
|
|
5267
|
+
var SidebarTrigger = React18.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
6771
5268
|
const { toggleSidebar } = useSidebar();
|
|
6772
|
-
return /* @__PURE__ */
|
|
5269
|
+
return /* @__PURE__ */ jsxs23(
|
|
6773
5270
|
Button,
|
|
6774
5271
|
{
|
|
6775
5272
|
ref,
|
|
@@ -6783,16 +5280,16 @@ var SidebarTrigger = React20.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
6783
5280
|
},
|
|
6784
5281
|
...props,
|
|
6785
5282
|
children: [
|
|
6786
|
-
/* @__PURE__ */
|
|
6787
|
-
/* @__PURE__ */
|
|
5283
|
+
/* @__PURE__ */ jsx32(PanelLeft, {}),
|
|
5284
|
+
/* @__PURE__ */ jsx32("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
6788
5285
|
]
|
|
6789
5286
|
}
|
|
6790
5287
|
);
|
|
6791
5288
|
});
|
|
6792
5289
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
6793
|
-
var SidebarRail =
|
|
5290
|
+
var SidebarRail = React18.forwardRef(({ className, ...props }, ref) => {
|
|
6794
5291
|
const { toggleSidebar } = useSidebar();
|
|
6795
|
-
return /* @__PURE__ */
|
|
5292
|
+
return /* @__PURE__ */ jsx32(
|
|
6796
5293
|
"button",
|
|
6797
5294
|
{
|
|
6798
5295
|
ref,
|
|
@@ -6815,8 +5312,8 @@ var SidebarRail = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6815
5312
|
);
|
|
6816
5313
|
});
|
|
6817
5314
|
SidebarRail.displayName = "SidebarRail";
|
|
6818
|
-
var SidebarInset =
|
|
6819
|
-
return /* @__PURE__ */
|
|
5315
|
+
var SidebarInset = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5316
|
+
return /* @__PURE__ */ jsx32(
|
|
6820
5317
|
"main",
|
|
6821
5318
|
{
|
|
6822
5319
|
ref,
|
|
@@ -6830,8 +5327,8 @@ var SidebarInset = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6830
5327
|
);
|
|
6831
5328
|
});
|
|
6832
5329
|
SidebarInset.displayName = "SidebarInset";
|
|
6833
|
-
var SidebarHeader =
|
|
6834
|
-
return /* @__PURE__ */
|
|
5330
|
+
var SidebarHeader = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5331
|
+
return /* @__PURE__ */ jsx32(
|
|
6835
5332
|
"div",
|
|
6836
5333
|
{
|
|
6837
5334
|
ref,
|
|
@@ -6842,8 +5339,8 @@ var SidebarHeader = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6842
5339
|
);
|
|
6843
5340
|
});
|
|
6844
5341
|
SidebarHeader.displayName = "SidebarHeader";
|
|
6845
|
-
var SidebarFooter =
|
|
6846
|
-
return /* @__PURE__ */
|
|
5342
|
+
var SidebarFooter = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5343
|
+
return /* @__PURE__ */ jsx32(
|
|
6847
5344
|
"div",
|
|
6848
5345
|
{
|
|
6849
5346
|
ref,
|
|
@@ -6854,8 +5351,8 @@ var SidebarFooter = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6854
5351
|
);
|
|
6855
5352
|
});
|
|
6856
5353
|
SidebarFooter.displayName = "SidebarFooter";
|
|
6857
|
-
var SidebarSeparator =
|
|
6858
|
-
return /* @__PURE__ */
|
|
5354
|
+
var SidebarSeparator = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5355
|
+
return /* @__PURE__ */ jsx32(
|
|
6859
5356
|
Separator2,
|
|
6860
5357
|
{
|
|
6861
5358
|
ref,
|
|
@@ -6866,8 +5363,8 @@ var SidebarSeparator = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6866
5363
|
);
|
|
6867
5364
|
});
|
|
6868
5365
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
6869
|
-
var SidebarContent =
|
|
6870
|
-
return /* @__PURE__ */
|
|
5366
|
+
var SidebarContent = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5367
|
+
return /* @__PURE__ */ jsx32(
|
|
6871
5368
|
"div",
|
|
6872
5369
|
{
|
|
6873
5370
|
ref,
|
|
@@ -6881,8 +5378,8 @@ var SidebarContent = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6881
5378
|
);
|
|
6882
5379
|
});
|
|
6883
5380
|
SidebarContent.displayName = "SidebarContent";
|
|
6884
|
-
var SidebarGroup =
|
|
6885
|
-
return /* @__PURE__ */
|
|
5381
|
+
var SidebarGroup = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5382
|
+
return /* @__PURE__ */ jsx32(
|
|
6886
5383
|
"div",
|
|
6887
5384
|
{
|
|
6888
5385
|
ref,
|
|
@@ -6893,9 +5390,9 @@ var SidebarGroup = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6893
5390
|
);
|
|
6894
5391
|
});
|
|
6895
5392
|
SidebarGroup.displayName = "SidebarGroup";
|
|
6896
|
-
var SidebarGroupLabel =
|
|
5393
|
+
var SidebarGroupLabel = React18.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
6897
5394
|
const Comp = asChild ? Slot : "div";
|
|
6898
|
-
return /* @__PURE__ */
|
|
5395
|
+
return /* @__PURE__ */ jsx32(
|
|
6899
5396
|
Comp,
|
|
6900
5397
|
{
|
|
6901
5398
|
ref,
|
|
@@ -6910,9 +5407,9 @@ var SidebarGroupLabel = React20.forwardRef(({ className, asChild = false, ...pro
|
|
|
6910
5407
|
);
|
|
6911
5408
|
});
|
|
6912
5409
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
6913
|
-
var SidebarGroupAction =
|
|
5410
|
+
var SidebarGroupAction = React18.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
6914
5411
|
const Comp = asChild ? Slot : "button";
|
|
6915
|
-
return /* @__PURE__ */
|
|
5412
|
+
return /* @__PURE__ */ jsx32(
|
|
6916
5413
|
Comp,
|
|
6917
5414
|
{
|
|
6918
5415
|
ref,
|
|
@@ -6929,8 +5426,8 @@ var SidebarGroupAction = React20.forwardRef(({ className, asChild = false, ...pr
|
|
|
6929
5426
|
);
|
|
6930
5427
|
});
|
|
6931
5428
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
6932
|
-
var SidebarGroupContent =
|
|
6933
|
-
return /* @__PURE__ */
|
|
5429
|
+
var SidebarGroupContent = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5430
|
+
return /* @__PURE__ */ jsx32(
|
|
6934
5431
|
"div",
|
|
6935
5432
|
{
|
|
6936
5433
|
ref,
|
|
@@ -6941,8 +5438,8 @@ var SidebarGroupContent = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6941
5438
|
);
|
|
6942
5439
|
});
|
|
6943
5440
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
6944
|
-
var SidebarMenu =
|
|
6945
|
-
return /* @__PURE__ */
|
|
5441
|
+
var SidebarMenu = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5442
|
+
return /* @__PURE__ */ jsx32(
|
|
6946
5443
|
"ul",
|
|
6947
5444
|
{
|
|
6948
5445
|
ref,
|
|
@@ -6953,8 +5450,8 @@ var SidebarMenu = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
6953
5450
|
);
|
|
6954
5451
|
});
|
|
6955
5452
|
SidebarMenu.displayName = "SidebarMenu";
|
|
6956
|
-
var SidebarMenuItem =
|
|
6957
|
-
return /* @__PURE__ */
|
|
5453
|
+
var SidebarMenuItem = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5454
|
+
return /* @__PURE__ */ jsx32(
|
|
6958
5455
|
"li",
|
|
6959
5456
|
{
|
|
6960
5457
|
ref,
|
|
@@ -6985,10 +5482,10 @@ var sidebarMenuButtonVariants = cva2(
|
|
|
6985
5482
|
}
|
|
6986
5483
|
}
|
|
6987
5484
|
);
|
|
6988
|
-
var SidebarMenuButton =
|
|
5485
|
+
var SidebarMenuButton = React18.forwardRef(({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }, ref) => {
|
|
6989
5486
|
const Comp = asChild ? Slot : "button";
|
|
6990
5487
|
const { isMobile, state } = useSidebar();
|
|
6991
|
-
const button = /* @__PURE__ */
|
|
5488
|
+
const button = /* @__PURE__ */ jsx32(
|
|
6992
5489
|
Comp,
|
|
6993
5490
|
{
|
|
6994
5491
|
ref,
|
|
@@ -7007,9 +5504,9 @@ var SidebarMenuButton = React20.forwardRef(({ asChild = false, isActive = false,
|
|
|
7007
5504
|
children: tooltip
|
|
7008
5505
|
};
|
|
7009
5506
|
}
|
|
7010
|
-
return /* @__PURE__ */
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
5507
|
+
return /* @__PURE__ */ jsxs23(Tooltip, { children: [
|
|
5508
|
+
/* @__PURE__ */ jsx32(TooltipTrigger, { asChild: true, children: button }),
|
|
5509
|
+
/* @__PURE__ */ jsx32(
|
|
7013
5510
|
TooltipContent,
|
|
7014
5511
|
{
|
|
7015
5512
|
side: "right",
|
|
@@ -7021,9 +5518,9 @@ var SidebarMenuButton = React20.forwardRef(({ asChild = false, isActive = false,
|
|
|
7021
5518
|
] });
|
|
7022
5519
|
});
|
|
7023
5520
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
7024
|
-
var SidebarMenuAction =
|
|
5521
|
+
var SidebarMenuAction = React18.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
7025
5522
|
const Comp = asChild ? Slot : "button";
|
|
7026
|
-
return /* @__PURE__ */
|
|
5523
|
+
return /* @__PURE__ */ jsx32(
|
|
7027
5524
|
Comp,
|
|
7028
5525
|
{
|
|
7029
5526
|
ref,
|
|
@@ -7044,8 +5541,8 @@ var SidebarMenuAction = React20.forwardRef(({ className, asChild = false, showOn
|
|
|
7044
5541
|
);
|
|
7045
5542
|
});
|
|
7046
5543
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
7047
|
-
var SidebarMenuBadge =
|
|
7048
|
-
return /* @__PURE__ */
|
|
5544
|
+
var SidebarMenuBadge = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5545
|
+
return /* @__PURE__ */ jsx32(
|
|
7049
5546
|
"div",
|
|
7050
5547
|
{
|
|
7051
5548
|
ref,
|
|
@@ -7064,12 +5561,12 @@ var SidebarMenuBadge = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
7064
5561
|
);
|
|
7065
5562
|
});
|
|
7066
5563
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
7067
|
-
var SidebarMenuSkeleton =
|
|
7068
|
-
const width =
|
|
5564
|
+
var SidebarMenuSkeleton = React18.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
5565
|
+
const width = React18.useMemo(() => {
|
|
7069
5566
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
7070
5567
|
}, []);
|
|
7071
5568
|
const skeletonStyle = { "--skeleton-width": width };
|
|
7072
|
-
return /* @__PURE__ */
|
|
5569
|
+
return /* @__PURE__ */ jsxs23(
|
|
7073
5570
|
"div",
|
|
7074
5571
|
{
|
|
7075
5572
|
ref,
|
|
@@ -7077,8 +5574,8 @@ var SidebarMenuSkeleton = React20.forwardRef(({ className, showIcon = false, ...
|
|
|
7077
5574
|
className: cn("rounded-md h-8 flex gap-2 px-2 items-center", className),
|
|
7078
5575
|
...props,
|
|
7079
5576
|
children: [
|
|
7080
|
-
showIcon && /* @__PURE__ */
|
|
7081
|
-
/* @__PURE__ */
|
|
5577
|
+
showIcon && /* @__PURE__ */ jsx32(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
|
|
5578
|
+
/* @__PURE__ */ jsx32(
|
|
7082
5579
|
Skeleton,
|
|
7083
5580
|
{
|
|
7084
5581
|
className: "h-4 flex-1 max-w-[--skeleton-width]",
|
|
@@ -7091,8 +5588,8 @@ var SidebarMenuSkeleton = React20.forwardRef(({ className, showIcon = false, ...
|
|
|
7091
5588
|
);
|
|
7092
5589
|
});
|
|
7093
5590
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
7094
|
-
var SidebarMenuSub =
|
|
7095
|
-
return /* @__PURE__ */
|
|
5591
|
+
var SidebarMenuSub = React18.forwardRef(({ className, ...props }, ref) => {
|
|
5592
|
+
return /* @__PURE__ */ jsx32(
|
|
7096
5593
|
"ul",
|
|
7097
5594
|
{
|
|
7098
5595
|
ref,
|
|
@@ -7107,13 +5604,13 @@ var SidebarMenuSub = React20.forwardRef(({ className, ...props }, ref) => {
|
|
|
7107
5604
|
);
|
|
7108
5605
|
});
|
|
7109
5606
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
7110
|
-
var SidebarMenuSubItem =
|
|
7111
|
-
return /* @__PURE__ */
|
|
5607
|
+
var SidebarMenuSubItem = React18.forwardRef(({ ...props }, ref) => {
|
|
5608
|
+
return /* @__PURE__ */ jsx32("li", { ref, ...props });
|
|
7112
5609
|
});
|
|
7113
5610
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
7114
|
-
var SidebarMenuSubButton =
|
|
5611
|
+
var SidebarMenuSubButton = React18.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
7115
5612
|
const Comp = asChild ? Slot : "a";
|
|
7116
|
-
return /* @__PURE__ */
|
|
5613
|
+
return /* @__PURE__ */ jsx32(
|
|
7117
5614
|
Comp,
|
|
7118
5615
|
{
|
|
7119
5616
|
ref,
|
|
@@ -7135,11 +5632,11 @@ var SidebarMenuSubButton = React20.forwardRef(({ asChild = false, size = "md", i
|
|
|
7135
5632
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
7136
5633
|
|
|
7137
5634
|
// src/components/ui/input.tsx
|
|
7138
|
-
import * as
|
|
7139
|
-
import { jsx as
|
|
7140
|
-
var Input =
|
|
5635
|
+
import * as React19 from "react";
|
|
5636
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5637
|
+
var Input = React19.forwardRef(
|
|
7141
5638
|
({ className, type, ...props }, ref) => {
|
|
7142
|
-
return /* @__PURE__ */
|
|
5639
|
+
return /* @__PURE__ */ jsx33(
|
|
7143
5640
|
"input",
|
|
7144
5641
|
{
|
|
7145
5642
|
type,
|
|
@@ -7156,9 +5653,9 @@ var Input = React21.forwardRef(
|
|
|
7156
5653
|
Input.displayName = "Input";
|
|
7157
5654
|
|
|
7158
5655
|
// src/components/ui/card.tsx
|
|
7159
|
-
import * as
|
|
7160
|
-
import { jsx as
|
|
7161
|
-
var Card =
|
|
5656
|
+
import * as React20 from "react";
|
|
5657
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5658
|
+
var Card = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
7162
5659
|
"div",
|
|
7163
5660
|
{
|
|
7164
5661
|
ref,
|
|
@@ -7170,7 +5667,7 @@ var Card = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
7170
5667
|
}
|
|
7171
5668
|
));
|
|
7172
5669
|
Card.displayName = "Card";
|
|
7173
|
-
var CardHeader =
|
|
5670
|
+
var CardHeader = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
7174
5671
|
"div",
|
|
7175
5672
|
{
|
|
7176
5673
|
ref,
|
|
@@ -7179,7 +5676,7 @@ var CardHeader = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
7179
5676
|
}
|
|
7180
5677
|
));
|
|
7181
5678
|
CardHeader.displayName = "CardHeader";
|
|
7182
|
-
var CardTitle =
|
|
5679
|
+
var CardTitle = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
7183
5680
|
"h3",
|
|
7184
5681
|
{
|
|
7185
5682
|
ref,
|
|
@@ -7191,7 +5688,7 @@ var CardTitle = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
7191
5688
|
}
|
|
7192
5689
|
));
|
|
7193
5690
|
CardTitle.displayName = "CardTitle";
|
|
7194
|
-
var CardDescription =
|
|
5691
|
+
var CardDescription = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
7195
5692
|
"p",
|
|
7196
5693
|
{
|
|
7197
5694
|
ref,
|
|
@@ -7200,9 +5697,9 @@ var CardDescription = React22.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
7200
5697
|
}
|
|
7201
5698
|
));
|
|
7202
5699
|
CardDescription.displayName = "CardDescription";
|
|
7203
|
-
var CardContent =
|
|
5700
|
+
var CardContent = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
7204
5701
|
CardContent.displayName = "CardContent";
|
|
7205
|
-
var CardFooter =
|
|
5702
|
+
var CardFooter = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
7206
5703
|
"div",
|
|
7207
5704
|
{
|
|
7208
5705
|
ref,
|
|
@@ -7214,7 +5711,7 @@ CardFooter.displayName = "CardFooter";
|
|
|
7214
5711
|
|
|
7215
5712
|
// src/components/ui/badge.tsx
|
|
7216
5713
|
import { cva as cva3 } from "class-variance-authority";
|
|
7217
|
-
import { jsx as
|
|
5714
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
7218
5715
|
var badgeVariants = cva3(
|
|
7219
5716
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
7220
5717
|
{
|
|
@@ -7232,19 +5729,19 @@ var badgeVariants = cva3(
|
|
|
7232
5729
|
}
|
|
7233
5730
|
);
|
|
7234
5731
|
function Badge({ className, variant, ...props }) {
|
|
7235
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ jsx35("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
7236
5733
|
}
|
|
7237
5734
|
|
|
7238
5735
|
// src/components/ui/dialog.tsx
|
|
7239
|
-
import * as
|
|
7240
|
-
import { jsx as
|
|
7241
|
-
var Dialog =
|
|
5736
|
+
import * as React21 from "react";
|
|
5737
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5738
|
+
var Dialog = React21.createContext({});
|
|
7242
5739
|
var DialogRoot = ({ open, onOpenChange, children }) => {
|
|
7243
|
-
return /* @__PURE__ */
|
|
5740
|
+
return /* @__PURE__ */ jsx36(Dialog.Provider, { value: { open, onOpenChange }, children });
|
|
7244
5741
|
};
|
|
7245
|
-
var DialogTrigger =
|
|
7246
|
-
const context =
|
|
7247
|
-
return /* @__PURE__ */
|
|
5742
|
+
var DialogTrigger = React21.forwardRef(({ className, children, ...props }, ref) => {
|
|
5743
|
+
const context = React21.useContext(Dialog);
|
|
5744
|
+
return /* @__PURE__ */ jsx36(
|
|
7248
5745
|
"button",
|
|
7249
5746
|
{
|
|
7250
5747
|
ref,
|
|
@@ -7256,10 +5753,10 @@ var DialogTrigger = React23.forwardRef(({ className, children, ...props }, ref)
|
|
|
7256
5753
|
);
|
|
7257
5754
|
});
|
|
7258
5755
|
DialogTrigger.displayName = "DialogTrigger";
|
|
7259
|
-
var DialogContent =
|
|
7260
|
-
const context =
|
|
5756
|
+
var DialogContent = React21.forwardRef(({ className, children, ...props }, ref) => {
|
|
5757
|
+
const context = React21.useContext(Dialog);
|
|
7261
5758
|
if (!context.open) return null;
|
|
7262
|
-
return /* @__PURE__ */
|
|
5759
|
+
return /* @__PURE__ */ jsx36("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm", children: /* @__PURE__ */ jsxs24(
|
|
7263
5760
|
"div",
|
|
7264
5761
|
{
|
|
7265
5762
|
ref,
|
|
@@ -7270,12 +5767,12 @@ var DialogContent = React23.forwardRef(({ className, children, ...props }, ref)
|
|
|
7270
5767
|
...props,
|
|
7271
5768
|
children: [
|
|
7272
5769
|
children,
|
|
7273
|
-
/* @__PURE__ */
|
|
5770
|
+
/* @__PURE__ */ jsx36(
|
|
7274
5771
|
"button",
|
|
7275
5772
|
{
|
|
7276
5773
|
className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
7277
5774
|
onClick: () => context.onOpenChange?.(false),
|
|
7278
|
-
children: /* @__PURE__ */
|
|
5775
|
+
children: /* @__PURE__ */ jsxs24(
|
|
7279
5776
|
"svg",
|
|
7280
5777
|
{
|
|
7281
5778
|
width: "24",
|
|
@@ -7288,8 +5785,8 @@ var DialogContent = React23.forwardRef(({ className, children, ...props }, ref)
|
|
|
7288
5785
|
strokeLinejoin: "round",
|
|
7289
5786
|
className: "h-4 w-4",
|
|
7290
5787
|
children: [
|
|
7291
|
-
/* @__PURE__ */
|
|
7292
|
-
/* @__PURE__ */
|
|
5788
|
+
/* @__PURE__ */ jsx36("path", { d: "m18 6-12 12" }),
|
|
5789
|
+
/* @__PURE__ */ jsx36("path", { d: "m6 6 12 12" })
|
|
7293
5790
|
]
|
|
7294
5791
|
}
|
|
7295
5792
|
)
|
|
@@ -7300,7 +5797,7 @@ var DialogContent = React23.forwardRef(({ className, children, ...props }, ref)
|
|
|
7300
5797
|
) });
|
|
7301
5798
|
});
|
|
7302
5799
|
DialogContent.displayName = "DialogContent";
|
|
7303
|
-
var DialogHeader =
|
|
5800
|
+
var DialogHeader = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
7304
5801
|
"div",
|
|
7305
5802
|
{
|
|
7306
5803
|
ref,
|
|
@@ -7312,7 +5809,7 @@ var DialogHeader = React23.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
7312
5809
|
}
|
|
7313
5810
|
));
|
|
7314
5811
|
DialogHeader.displayName = "DialogHeader";
|
|
7315
|
-
var DialogTitle =
|
|
5812
|
+
var DialogTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
7316
5813
|
"h3",
|
|
7317
5814
|
{
|
|
7318
5815
|
ref,
|
|
@@ -7326,11 +5823,11 @@ var DialogTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7326
5823
|
DialogTitle.displayName = "DialogTitle";
|
|
7327
5824
|
|
|
7328
5825
|
// src/components/ui/textarea.tsx
|
|
7329
|
-
import * as
|
|
7330
|
-
import { jsx as
|
|
7331
|
-
var Textarea =
|
|
5826
|
+
import * as React22 from "react";
|
|
5827
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
5828
|
+
var Textarea = React22.forwardRef(
|
|
7332
5829
|
({ className, ...props }, ref) => {
|
|
7333
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ jsx37(
|
|
7334
5831
|
"textarea",
|
|
7335
5832
|
{
|
|
7336
5833
|
className: cn(
|
|
@@ -7346,17 +5843,17 @@ var Textarea = React24.forwardRef(
|
|
|
7346
5843
|
Textarea.displayName = "Textarea";
|
|
7347
5844
|
|
|
7348
5845
|
// src/components/ui/dropdown-menu.tsx
|
|
7349
|
-
import * as
|
|
5846
|
+
import * as React23 from "react";
|
|
7350
5847
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
7351
5848
|
import { Check as Check3, ChevronRight as ChevronRight2, Circle } from "lucide-react";
|
|
7352
|
-
import { jsx as
|
|
5849
|
+
import { jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7353
5850
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
7354
5851
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
7355
5852
|
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
7356
5853
|
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
7357
5854
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
7358
5855
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
7359
|
-
var DropdownMenuSubTrigger =
|
|
5856
|
+
var DropdownMenuSubTrigger = React23.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs25(
|
|
7360
5857
|
DropdownMenuPrimitive.SubTrigger,
|
|
7361
5858
|
{
|
|
7362
5859
|
ref,
|
|
@@ -7368,12 +5865,12 @@ var DropdownMenuSubTrigger = React25.forwardRef(({ className, inset, children, .
|
|
|
7368
5865
|
...props,
|
|
7369
5866
|
children: [
|
|
7370
5867
|
children,
|
|
7371
|
-
/* @__PURE__ */
|
|
5868
|
+
/* @__PURE__ */ jsx38(ChevronRight2, { className: "ml-auto" })
|
|
7372
5869
|
]
|
|
7373
5870
|
}
|
|
7374
5871
|
));
|
|
7375
5872
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
7376
|
-
var DropdownMenuSubContent =
|
|
5873
|
+
var DropdownMenuSubContent = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
7377
5874
|
DropdownMenuPrimitive.SubContent,
|
|
7378
5875
|
{
|
|
7379
5876
|
ref,
|
|
@@ -7385,7 +5882,7 @@ var DropdownMenuSubContent = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
7385
5882
|
}
|
|
7386
5883
|
));
|
|
7387
5884
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
7388
|
-
var DropdownMenuContent =
|
|
5885
|
+
var DropdownMenuContent = React23.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx38(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx38(
|
|
7389
5886
|
DropdownMenuPrimitive.Content,
|
|
7390
5887
|
{
|
|
7391
5888
|
ref,
|
|
@@ -7399,7 +5896,7 @@ var DropdownMenuContent = React25.forwardRef(({ className, sideOffset = 4, ...pr
|
|
|
7399
5896
|
}
|
|
7400
5897
|
) }));
|
|
7401
5898
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
7402
|
-
var DropdownMenuItem =
|
|
5899
|
+
var DropdownMenuItem = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
7403
5900
|
DropdownMenuPrimitive.Item,
|
|
7404
5901
|
{
|
|
7405
5902
|
ref,
|
|
@@ -7412,7 +5909,7 @@ var DropdownMenuItem = React25.forwardRef(({ className, inset, ...props }, ref)
|
|
|
7412
5909
|
}
|
|
7413
5910
|
));
|
|
7414
5911
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
7415
|
-
var DropdownMenuCheckboxItem =
|
|
5912
|
+
var DropdownMenuCheckboxItem = React23.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs25(
|
|
7416
5913
|
DropdownMenuPrimitive.CheckboxItem,
|
|
7417
5914
|
{
|
|
7418
5915
|
ref,
|
|
@@ -7423,13 +5920,13 @@ var DropdownMenuCheckboxItem = React25.forwardRef(({ className, children, checke
|
|
|
7423
5920
|
checked,
|
|
7424
5921
|
...props,
|
|
7425
5922
|
children: [
|
|
7426
|
-
/* @__PURE__ */
|
|
5923
|
+
/* @__PURE__ */ jsx38("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx38(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx38(Check3, { className: "h-4 w-4" }) }) }),
|
|
7427
5924
|
children
|
|
7428
5925
|
]
|
|
7429
5926
|
}
|
|
7430
5927
|
));
|
|
7431
5928
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
7432
|
-
var DropdownMenuRadioItem =
|
|
5929
|
+
var DropdownMenuRadioItem = React23.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs25(
|
|
7433
5930
|
DropdownMenuPrimitive.RadioItem,
|
|
7434
5931
|
{
|
|
7435
5932
|
ref,
|
|
@@ -7439,13 +5936,13 @@ var DropdownMenuRadioItem = React25.forwardRef(({ className, children, ...props
|
|
|
7439
5936
|
),
|
|
7440
5937
|
...props,
|
|
7441
5938
|
children: [
|
|
7442
|
-
/* @__PURE__ */
|
|
5939
|
+
/* @__PURE__ */ jsx38("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx38(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx38(Circle, { className: "h-2 w-2 fill-current" }) }) }),
|
|
7443
5940
|
children
|
|
7444
5941
|
]
|
|
7445
5942
|
}
|
|
7446
5943
|
));
|
|
7447
5944
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
7448
|
-
var DropdownMenuLabel =
|
|
5945
|
+
var DropdownMenuLabel = React23.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
7449
5946
|
DropdownMenuPrimitive.Label,
|
|
7450
5947
|
{
|
|
7451
5948
|
ref,
|
|
@@ -7458,7 +5955,7 @@ var DropdownMenuLabel = React25.forwardRef(({ className, inset, ...props }, ref)
|
|
|
7458
5955
|
}
|
|
7459
5956
|
));
|
|
7460
5957
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
7461
|
-
var DropdownMenuSeparator =
|
|
5958
|
+
var DropdownMenuSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
|
|
7462
5959
|
DropdownMenuPrimitive.Separator,
|
|
7463
5960
|
{
|
|
7464
5961
|
ref,
|
|
@@ -7471,7 +5968,7 @@ var DropdownMenuShortcut = ({
|
|
|
7471
5968
|
className,
|
|
7472
5969
|
...props
|
|
7473
5970
|
}) => {
|
|
7474
|
-
return /* @__PURE__ */
|
|
5971
|
+
return /* @__PURE__ */ jsx38(
|
|
7475
5972
|
"span",
|
|
7476
5973
|
{
|
|
7477
5974
|
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
@@ -7482,7 +5979,7 @@ var DropdownMenuShortcut = ({
|
|
|
7482
5979
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
7483
5980
|
|
|
7484
5981
|
// src/components/AppSidebar.tsx
|
|
7485
|
-
import { jsx as
|
|
5982
|
+
import { jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7486
5983
|
var ThreadItem = ({
|
|
7487
5984
|
thread,
|
|
7488
5985
|
isActive,
|
|
@@ -7507,8 +6004,8 @@ var ThreadItem = ({
|
|
|
7507
6004
|
setIsEditing(false);
|
|
7508
6005
|
}
|
|
7509
6006
|
}, [handleRename, thread.title]);
|
|
7510
|
-
return /* @__PURE__ */
|
|
7511
|
-
/* @__PURE__ */
|
|
6007
|
+
return /* @__PURE__ */ jsxs26(SidebarMenuItem, { className: "mb-3", children: [
|
|
6008
|
+
/* @__PURE__ */ jsx39(SidebarMenuButton, { asChild: true, isActive, children: /* @__PURE__ */ jsx39("div", { onClick, children: isEditing ? /* @__PURE__ */ jsx39(
|
|
7512
6009
|
Input,
|
|
7513
6010
|
{
|
|
7514
6011
|
value: editTitle,
|
|
@@ -7519,17 +6016,17 @@ var ThreadItem = ({
|
|
|
7519
6016
|
autoFocus: true,
|
|
7520
6017
|
onClick: (e) => e.stopPropagation()
|
|
7521
6018
|
}
|
|
7522
|
-
) : /* @__PURE__ */
|
|
7523
|
-
/* @__PURE__ */
|
|
7524
|
-
/* @__PURE__ */
|
|
6019
|
+
) : /* @__PURE__ */ jsxs26("div", { className: "flex-1", children: [
|
|
6020
|
+
/* @__PURE__ */ jsx39("p", { className: "text-sm font-medium truncate leading-tight", children: thread.title || "New Chat" }),
|
|
6021
|
+
/* @__PURE__ */ jsx39("p", { className: "text-xs text-muted-foreground truncate leading-tight mt-0.5", children: thread.last_message || "No messages yet" })
|
|
7525
6022
|
] }) }) }),
|
|
7526
|
-
!isEditing && /* @__PURE__ */
|
|
7527
|
-
/* @__PURE__ */
|
|
6023
|
+
!isEditing && /* @__PURE__ */ jsxs26(DropdownMenu, { children: [
|
|
6024
|
+
/* @__PURE__ */ jsx39(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx39(SidebarMenuAction, { onClick: (e) => {
|
|
7528
6025
|
e.stopPropagation();
|
|
7529
6026
|
setShowMenu(!showMenu);
|
|
7530
|
-
}, children: /* @__PURE__ */
|
|
7531
|
-
/* @__PURE__ */
|
|
7532
|
-
/* @__PURE__ */
|
|
6027
|
+
}, children: /* @__PURE__ */ jsx39(MoreHorizontal, {}) }) }),
|
|
6028
|
+
/* @__PURE__ */ jsxs26(DropdownMenuContent, { className: "w-[--radix-popper-anchor-width]", children: [
|
|
6029
|
+
/* @__PURE__ */ jsxs26(
|
|
7533
6030
|
DropdownMenuItem,
|
|
7534
6031
|
{
|
|
7535
6032
|
onClick: (e) => {
|
|
@@ -7538,12 +6035,12 @@ var ThreadItem = ({
|
|
|
7538
6035
|
setShowMenu(false);
|
|
7539
6036
|
},
|
|
7540
6037
|
children: [
|
|
7541
|
-
/* @__PURE__ */
|
|
7542
|
-
/* @__PURE__ */
|
|
6038
|
+
/* @__PURE__ */ jsx39(Edit3, { className: "h-3 w-3" }),
|
|
6039
|
+
/* @__PURE__ */ jsx39("span", { children: "Rename" })
|
|
7543
6040
|
]
|
|
7544
6041
|
}
|
|
7545
6042
|
),
|
|
7546
|
-
/* @__PURE__ */
|
|
6043
|
+
/* @__PURE__ */ jsxs26(
|
|
7547
6044
|
DropdownMenuItem,
|
|
7548
6045
|
{
|
|
7549
6046
|
onClick: (e) => {
|
|
@@ -7552,8 +6049,8 @@ var ThreadItem = ({
|
|
|
7552
6049
|
setShowMenu(false);
|
|
7553
6050
|
},
|
|
7554
6051
|
children: [
|
|
7555
|
-
/* @__PURE__ */
|
|
7556
|
-
/* @__PURE__ */
|
|
6052
|
+
/* @__PURE__ */ jsx39(Trash2, { className: "h-3 w-3" }),
|
|
6053
|
+
/* @__PURE__ */ jsx39("span", { children: "Delete" })
|
|
7557
6054
|
]
|
|
7558
6055
|
}
|
|
7559
6056
|
)
|
|
@@ -7577,40 +6074,40 @@ function AppSidebar({
|
|
|
7577
6074
|
const handleRefresh = useCallback14(() => {
|
|
7578
6075
|
refetch();
|
|
7579
6076
|
}, [refetch]);
|
|
7580
|
-
return /* @__PURE__ */
|
|
7581
|
-
/* @__PURE__ */
|
|
7582
|
-
/* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ jsxs26(Sidebar, { collapsible: "icon", variant: "floating", children: [
|
|
6078
|
+
/* @__PURE__ */ jsx39(SidebarHeader, { children: /* @__PURE__ */ jsx39(SidebarMenu, { children: /* @__PURE__ */ jsxs26(SidebarMenuItem, { children: [
|
|
6079
|
+
/* @__PURE__ */ jsxs26(
|
|
7583
6080
|
SidebarMenuButton,
|
|
7584
6081
|
{
|
|
7585
6082
|
onClick: onLogoClick,
|
|
7586
6083
|
children: [
|
|
7587
|
-
/* @__PURE__ */
|
|
6084
|
+
/* @__PURE__ */ jsx39(Bot3, {}),
|
|
7588
6085
|
"Distri"
|
|
7589
6086
|
]
|
|
7590
6087
|
}
|
|
7591
6088
|
),
|
|
7592
|
-
/* @__PURE__ */
|
|
6089
|
+
/* @__PURE__ */ jsxs26(
|
|
7593
6090
|
SidebarMenuAction,
|
|
7594
6091
|
{
|
|
7595
6092
|
onClick: () => setTheme(theme === "light" ? "dark" : "light"),
|
|
7596
6093
|
title: "Toggle theme",
|
|
7597
6094
|
className: "absolute right-0 top-0",
|
|
7598
6095
|
children: [
|
|
7599
|
-
/* @__PURE__ */
|
|
7600
|
-
/* @__PURE__ */
|
|
7601
|
-
/* @__PURE__ */
|
|
6096
|
+
/* @__PURE__ */ jsxs26("svg", { className: "h-4 w-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: [
|
|
6097
|
+
/* @__PURE__ */ jsx39("circle", { cx: "12", cy: "12", r: "5" }),
|
|
6098
|
+
/* @__PURE__ */ jsx39("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
|
|
7602
6099
|
] }),
|
|
7603
|
-
/* @__PURE__ */
|
|
6100
|
+
/* @__PURE__ */ jsx39("svg", { className: "absolute h-4 w-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx39("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) })
|
|
7604
6101
|
]
|
|
7605
6102
|
}
|
|
7606
6103
|
)
|
|
7607
6104
|
] }) }) }),
|
|
7608
|
-
/* @__PURE__ */
|
|
7609
|
-
/* @__PURE__ */
|
|
7610
|
-
/* @__PURE__ */
|
|
7611
|
-
/* @__PURE__ */
|
|
7612
|
-
/* @__PURE__ */
|
|
7613
|
-
/* @__PURE__ */
|
|
6105
|
+
/* @__PURE__ */ jsx39(SidebarSeparator, {}),
|
|
6106
|
+
/* @__PURE__ */ jsxs26(SidebarContent, { children: [
|
|
6107
|
+
/* @__PURE__ */ jsxs26(SidebarGroup, { children: [
|
|
6108
|
+
/* @__PURE__ */ jsx39(SidebarGroupLabel, { children: "Actions" }),
|
|
6109
|
+
/* @__PURE__ */ jsx39(SidebarGroupContent, { children: /* @__PURE__ */ jsxs26(SidebarMenu, { children: [
|
|
6110
|
+
/* @__PURE__ */ jsx39(SidebarMenuItem, { className: "mb-1", children: /* @__PURE__ */ jsxs26(
|
|
7614
6111
|
SidebarMenuButton,
|
|
7615
6112
|
{
|
|
7616
6113
|
isActive: currentPage === "chat",
|
|
@@ -7619,30 +6116,30 @@ function AppSidebar({
|
|
|
7619
6116
|
onNewChat();
|
|
7620
6117
|
},
|
|
7621
6118
|
children: [
|
|
7622
|
-
/* @__PURE__ */
|
|
6119
|
+
/* @__PURE__ */ jsx39(Edit2, { className: "h-4 w-4" }),
|
|
7623
6120
|
"New Chat"
|
|
7624
6121
|
]
|
|
7625
6122
|
}
|
|
7626
6123
|
) }),
|
|
7627
|
-
/* @__PURE__ */
|
|
6124
|
+
/* @__PURE__ */ jsx39(SidebarMenuItem, { className: "mb-1", children: /* @__PURE__ */ jsxs26(
|
|
7628
6125
|
SidebarMenuButton,
|
|
7629
6126
|
{
|
|
7630
6127
|
isActive: currentPage === "agents",
|
|
7631
6128
|
onClick: () => onPageChange("agents"),
|
|
7632
6129
|
children: [
|
|
7633
|
-
/* @__PURE__ */
|
|
6130
|
+
/* @__PURE__ */ jsx39(Users, { className: "h-4 w-4" }),
|
|
7634
6131
|
"Agents"
|
|
7635
6132
|
]
|
|
7636
6133
|
}
|
|
7637
6134
|
) })
|
|
7638
6135
|
] }) })
|
|
7639
6136
|
] }),
|
|
7640
|
-
open && /* @__PURE__ */
|
|
7641
|
-
/* @__PURE__ */
|
|
7642
|
-
/* @__PURE__ */
|
|
7643
|
-
/* @__PURE__ */
|
|
7644
|
-
/* @__PURE__ */
|
|
7645
|
-
] }) : threads.length === 0 ? /* @__PURE__ */
|
|
6137
|
+
open && /* @__PURE__ */ jsxs26(SidebarGroup, { children: [
|
|
6138
|
+
/* @__PURE__ */ jsx39(SidebarGroupLabel, { children: "Conversations" }),
|
|
6139
|
+
/* @__PURE__ */ jsx39(SidebarGroupContent, { children: /* @__PURE__ */ jsx39(SidebarMenu, { children: threadsLoading ? /* @__PURE__ */ jsxs26(SidebarMenuItem, { children: [
|
|
6140
|
+
/* @__PURE__ */ jsx39(Loader24, { className: "h-4 w-4 animate-spin" }),
|
|
6141
|
+
/* @__PURE__ */ jsx39("span", { children: "Loading threads..." })
|
|
6142
|
+
] }) : threads.length === 0 ? /* @__PURE__ */ jsx39(SidebarMenuItem, { children: "No conversations yet" }) : threads.map((thread) => /* @__PURE__ */ jsx39(
|
|
7646
6143
|
ThreadItem,
|
|
7647
6144
|
{
|
|
7648
6145
|
thread,
|
|
@@ -7653,27 +6150,27 @@ function AppSidebar({
|
|
|
7653
6150
|
},
|
|
7654
6151
|
thread.id
|
|
7655
6152
|
)) }) }),
|
|
7656
|
-
/* @__PURE__ */
|
|
6153
|
+
/* @__PURE__ */ jsxs26(
|
|
7657
6154
|
SidebarGroupAction,
|
|
7658
6155
|
{
|
|
7659
6156
|
onClick: handleRefresh,
|
|
7660
6157
|
disabled: threadsLoading,
|
|
7661
6158
|
title: "Refresh conversations",
|
|
7662
6159
|
children: [
|
|
7663
|
-
/* @__PURE__ */
|
|
7664
|
-
/* @__PURE__ */
|
|
6160
|
+
/* @__PURE__ */ jsx39(RefreshCw2, { className: `${threadsLoading ? "animate-spin" : ""}` }),
|
|
6161
|
+
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Refresh conversations" })
|
|
7665
6162
|
]
|
|
7666
6163
|
}
|
|
7667
6164
|
)
|
|
7668
6165
|
] })
|
|
7669
6166
|
] }),
|
|
7670
|
-
/* @__PURE__ */
|
|
6167
|
+
/* @__PURE__ */ jsx39(SidebarFooter, { children: /* @__PURE__ */ jsx39(SidebarMenu, { children: /* @__PURE__ */ jsx39(SidebarMenuItem, { children: /* @__PURE__ */ jsxs26(
|
|
7671
6168
|
SidebarMenuButton,
|
|
7672
6169
|
{
|
|
7673
6170
|
onClick: () => window.open("https://github.com/your-repo/distri", "_blank"),
|
|
7674
6171
|
title: "GitHub",
|
|
7675
6172
|
children: [
|
|
7676
|
-
/* @__PURE__ */
|
|
6173
|
+
/* @__PURE__ */ jsx39(Github, {}),
|
|
7677
6174
|
"Distri"
|
|
7678
6175
|
]
|
|
7679
6176
|
}
|
|
@@ -7681,89 +6178,38 @@ function AppSidebar({
|
|
|
7681
6178
|
] });
|
|
7682
6179
|
}
|
|
7683
6180
|
|
|
7684
|
-
// src/components/BrowserPreviewPanel.tsx
|
|
7685
|
-
import { jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7686
|
-
var BrowserPreviewPanel = ({
|
|
7687
|
-
frameSrc,
|
|
7688
|
-
timestampLabel,
|
|
7689
|
-
className
|
|
7690
|
-
}) => {
|
|
7691
|
-
return /* @__PURE__ */ jsxs26(
|
|
7692
|
-
"div",
|
|
7693
|
-
{
|
|
7694
|
-
className: cn(
|
|
7695
|
-
"rounded-xl border bg-muted/40 shadow-sm overflow-hidden",
|
|
7696
|
-
className
|
|
7697
|
-
),
|
|
7698
|
-
children: [
|
|
7699
|
-
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between px-3 py-2 border-b bg-background/70 backdrop-blur text-xs text-muted-foreground", children: [
|
|
7700
|
-
/* @__PURE__ */ jsx39("span", { className: "text-xs sm:text-sm font-medium text-foreground", children: "Live browser preview" }),
|
|
7701
|
-
timestampLabel && /* @__PURE__ */ jsxs26("span", { className: "text-[11px] text-muted-foreground/80", children: [
|
|
7702
|
-
"Updated ",
|
|
7703
|
-
timestampLabel
|
|
7704
|
-
] })
|
|
7705
|
-
] }),
|
|
7706
|
-
/* @__PURE__ */ jsx39("div", { className: "bg-background", children: /* @__PURE__ */ jsx39(
|
|
7707
|
-
"img",
|
|
7708
|
-
{
|
|
7709
|
-
src: frameSrc,
|
|
7710
|
-
alt: "Browser screenshot",
|
|
7711
|
-
className: "block w-full h-auto object-contain"
|
|
7712
|
-
}
|
|
7713
|
-
) })
|
|
7714
|
-
]
|
|
7715
|
-
}
|
|
7716
|
-
);
|
|
7717
|
-
};
|
|
7718
|
-
|
|
7719
6181
|
// src/components/BrowserViewport.tsx
|
|
7720
6182
|
import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7721
6183
|
var DefaultEmptyState = () => /* @__PURE__ */ jsxs27("div", { className: "flex h-full flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground", children: [
|
|
7722
|
-
/* @__PURE__ */ jsx40("p", { children: "No browser
|
|
7723
|
-
/* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground/70", children: "
|
|
6184
|
+
/* @__PURE__ */ jsx40("p", { children: "No browser preview yet." }),
|
|
6185
|
+
/* @__PURE__ */ jsx40("p", { className: "text-xs text-muted-foreground/70", children: "Run the bot to capture a live frame." })
|
|
7724
6186
|
] });
|
|
7725
6187
|
var BrowserViewport = ({
|
|
7726
6188
|
className,
|
|
7727
6189
|
emptyState,
|
|
7728
|
-
|
|
6190
|
+
showTimestamp = true
|
|
7729
6191
|
}) => {
|
|
7730
|
-
const
|
|
7731
|
-
const
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
return /* @__PURE__ */ jsxs27(
|
|
6192
|
+
const browserFrame = useChatStateStore((state) => state.browserFrame);
|
|
6193
|
+
const browserFrameUpdatedAt = useChatStateStore((state) => state.browserFrameUpdatedAt);
|
|
6194
|
+
if (!browserFrame) {
|
|
6195
|
+
return /* @__PURE__ */ jsx40(
|
|
7735
6196
|
"div",
|
|
7736
6197
|
{
|
|
7737
6198
|
className: cn(
|
|
7738
|
-
"
|
|
6199
|
+
"h-full min-h-[220px] rounded-xl border border-dashed border-border/40 bg-muted/10 p-4",
|
|
7739
6200
|
className
|
|
7740
6201
|
),
|
|
7741
|
-
children:
|
|
7742
|
-
browserSessionId && /* @__PURE__ */ jsxs27("div", { className: "absolute left-2 top-2 z-10 rounded-md bg-background/90 px-2 py-1 text-xs text-muted-foreground backdrop-blur-sm", children: [
|
|
7743
|
-
"Session: ",
|
|
7744
|
-
browserSessionId
|
|
7745
|
-
] }),
|
|
7746
|
-
/* @__PURE__ */ jsx40(
|
|
7747
|
-
"iframe",
|
|
7748
|
-
{
|
|
7749
|
-
src: effectiveViewerUrl,
|
|
7750
|
-
className: "h-full w-full border-0",
|
|
7751
|
-
title: "Browser Viewer",
|
|
7752
|
-
sandbox: "allow-scripts allow-same-origin allow-forms"
|
|
7753
|
-
}
|
|
7754
|
-
)
|
|
7755
|
-
]
|
|
6202
|
+
children: emptyState ?? /* @__PURE__ */ jsx40(DefaultEmptyState, {})
|
|
7756
6203
|
}
|
|
7757
6204
|
);
|
|
7758
6205
|
}
|
|
6206
|
+
const timestampLabel = browserFrameUpdatedAt ? new Date(browserFrameUpdatedAt).toLocaleTimeString() : void 0;
|
|
7759
6207
|
return /* @__PURE__ */ jsx40(
|
|
7760
|
-
|
|
6208
|
+
BrowserPreviewPanel,
|
|
7761
6209
|
{
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
),
|
|
7766
|
-
children: emptyState ?? /* @__PURE__ */ jsx40(DefaultEmptyState, {})
|
|
6210
|
+
frameSrc: browserFrame,
|
|
6211
|
+
timestampLabel: showTimestamp ? timestampLabel : void 0,
|
|
6212
|
+
className: cn("h-full", className)
|
|
7767
6213
|
}
|
|
7768
6214
|
);
|
|
7769
6215
|
};
|
|
@@ -8222,12 +6668,12 @@ function ConfigurationPanel({ className, title = "Agent Settings" }) {
|
|
|
8222
6668
|
}
|
|
8223
6669
|
|
|
8224
6670
|
// src/components/ThemeToggle.tsx
|
|
8225
|
-
import
|
|
6671
|
+
import React26 from "react";
|
|
8226
6672
|
import { Moon, Sun } from "lucide-react";
|
|
8227
6673
|
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8228
6674
|
function ThemeToggle() {
|
|
8229
6675
|
const { theme, setTheme } = useTheme();
|
|
8230
|
-
const dropdownRef =
|
|
6676
|
+
const dropdownRef = React26.useRef(null);
|
|
8231
6677
|
return /* @__PURE__ */ jsx42("div", { className: "relative", ref: dropdownRef, children: /* @__PURE__ */ jsxs29(
|
|
8232
6678
|
"button",
|
|
8233
6679
|
{
|
|
@@ -8248,7 +6694,7 @@ import { X as X3, CheckCircle as CheckCircle4, AlertCircle as AlertCircle4, Aler
|
|
|
8248
6694
|
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
8249
6695
|
|
|
8250
6696
|
// src/utils/toolWrapper.ts
|
|
8251
|
-
import
|
|
6697
|
+
import React28 from "react";
|
|
8252
6698
|
function wrapFnToolAsUiTool(fnTool, options = {}) {
|
|
8253
6699
|
const { autoExecute = false } = options;
|
|
8254
6700
|
return {
|
|
@@ -8257,7 +6703,7 @@ function wrapFnToolAsUiTool(fnTool, options = {}) {
|
|
|
8257
6703
|
description: fnTool.description,
|
|
8258
6704
|
parameters: fnTool.parameters,
|
|
8259
6705
|
component: (props) => {
|
|
8260
|
-
return
|
|
6706
|
+
return React28.createElement(DefaultToolActions, {
|
|
8261
6707
|
...props,
|
|
8262
6708
|
tool: { ...fnTool, autoExecute: fnTool.autoExecute || autoExecute }
|
|
8263
6709
|
});
|
|
@@ -8375,7 +6821,6 @@ export {
|
|
|
8375
6821
|
extractContent,
|
|
8376
6822
|
useAgent,
|
|
8377
6823
|
useAgentDefinitions,
|
|
8378
|
-
useAgentsByUsage,
|
|
8379
6824
|
useChat,
|
|
8380
6825
|
useChatMessages,
|
|
8381
6826
|
useChatStateStore,
|