@shumai-one/shumai 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/bin/{chunk-wbmqbpgm.js → chunk-01ym2agz.js} +1 -1
  2. package/bin/{chunk-ncv8v6mj.js → chunk-047n9gfs.js} +2 -2
  3. package/bin/chunk-0a4ahz7r.js +2 -0
  4. package/bin/{chunk-v5hz09a1.js → chunk-0awcpx0a.js} +2 -2
  5. package/bin/{chunk-bcyvxp1c.js → chunk-0fbgfgxv.js} +4 -4
  6. package/bin/{chunk-jt6v15wx.js → chunk-0nnqha4f.js} +1 -1
  7. package/bin/chunk-0tvggyy4.js +1 -0
  8. package/bin/{chunk-s9sf37dv.js → chunk-113baw0m.js} +1 -1
  9. package/bin/{chunk-axeq2pq5.js → chunk-1dbjyarc.js} +1 -1
  10. package/bin/{chunk-d1q1tn36.js → chunk-1qre79kf.js} +1 -1
  11. package/bin/chunk-27v3yepb.js +1 -0
  12. package/bin/{chunk-gvcjqcjf.js → chunk-2rq3w8sg.js} +1 -1
  13. package/bin/{chunk-wperd2h9.js → chunk-3020am4q.js} +1 -1
  14. package/bin/chunk-3pwwg1xm.js +1 -0
  15. package/bin/{chunk-scvepfv8.js → chunk-3sfb63fp.js} +1 -1
  16. package/bin/{chunk-y6xyc4wp.js → chunk-3tg10kwz.js} +1 -1
  17. package/bin/{chunk-hsx4pns6.js → chunk-4g4pxmef.js} +1 -1
  18. package/bin/{chunk-9fyb95r5.js → chunk-4jj92zwa.js} +1 -1
  19. package/bin/{chunk-6pwf7qa6.js → chunk-4yhvexzk.js} +1 -1
  20. package/bin/chunk-58cbk6e8.js +1 -0
  21. package/bin/{chunk-59ayg5am.js → chunk-59t9s2jh.js} +1 -1
  22. package/bin/{chunk-5y3kx4kk.js → chunk-5e7r7a9d.js} +1 -1
  23. package/bin/{chunk-4nkwe7dz.js → chunk-5m51b7af.js} +1 -1
  24. package/bin/{chunk-fnkkwna8.js → chunk-65t6rm5d.js} +1 -1
  25. package/bin/chunk-6bed0rz4.js +1 -0
  26. package/bin/{chunk-w4adkd0a.js → chunk-6smn0q1n.js} +4 -4
  27. package/bin/{chunk-b3tkvdfk.js → chunk-6zerk0em.js} +1 -1
  28. package/bin/{chunk-t6myw0jf.js → chunk-7bbsv8g0.js} +1 -1
  29. package/bin/chunk-83bdgs2c.js +1 -0
  30. package/bin/{chunk-zpk87b33.js → chunk-86qtjd30.js} +5 -5
  31. package/bin/{chunk-b5r0be06.js → chunk-8rekh4h9.js} +1 -1
  32. package/bin/{chunk-68xsb3t8.js → chunk-8s9fehda.js} +1 -1
  33. package/bin/{chunk-srv5kvm4.js → chunk-8sf2hf31.js} +1 -1
  34. package/bin/{chunk-2rrcdhkj.js → chunk-9d3w678j.js} +1 -1
  35. package/bin/{chunk-ppb4aj0y.js → chunk-9gftd4f7.js} +2 -2
  36. package/bin/{chunk-6hs63sva.js → chunk-9rcg8zgs.js} +32 -32
  37. package/bin/{chunk-xfmnfcv2.js → chunk-a23q1kc4.js} +2 -2
  38. package/bin/{chunk-eshwjf91.js → chunk-a6cdt85k.js} +1 -1
  39. package/bin/chunk-a76h3ehe.js +1 -0
  40. package/bin/{chunk-3wcvema0.js → chunk-b1bkd2p4.js} +7 -7
  41. package/bin/{chunk-np39aknv.js → chunk-bf5m8f6t.js} +1 -1
  42. package/bin/{chunk-24nx3krz.js → chunk-cf57fk11.js} +1 -1
  43. package/bin/{chunk-929abwgr.js → chunk-cv5xx81e.js} +1 -1
  44. package/bin/{chunk-fpjvr3qw.js → chunk-czybv3vy.js} +1 -1
  45. package/bin/{chunk-fsr83nb1.js → chunk-d4sbcvpa.js} +1 -1
  46. package/bin/{chunk-b6dbqs39.js → chunk-d6xezgrg.js} +1 -1
  47. package/bin/{chunk-hy5ncvpf.js → chunk-da86fpjt.js} +1 -1
  48. package/bin/{chunk-me3zmpj5.js → chunk-dzjmwat0.js} +7 -7
  49. package/bin/{chunk-909h3qzp.js → chunk-eex8sjfs.js} +1 -1
  50. package/bin/{chunk-qqapw198.js → chunk-emgyjhmx.js} +1 -1
  51. package/bin/{chunk-y5h5d5gx.js → chunk-exmwerag.js} +4 -4
  52. package/bin/{chunk-fznchvm7.js → chunk-f38xyahm.js} +1 -1
  53. package/bin/{chunk-cqnected.js → chunk-fb1bes2h.js} +1 -1
  54. package/bin/chunk-fbvak7q2.js +1 -0
  55. package/bin/{chunk-tqdde9bj.js → chunk-fg9sr6r9.js} +1 -1
  56. package/bin/{chunk-m41tbrvt.js → chunk-fyb6t7ct.js} +2 -2
  57. package/bin/{chunk-cfqny70c.js → chunk-g2ptqqm3.js} +2 -2
  58. package/bin/{chunk-k3ds96cb.js → chunk-ggwqxn95.js} +1 -1
  59. package/bin/chunk-ghk54h71.js +13 -0
  60. package/bin/{chunk-40tmh04g.js → chunk-h1fbev9c.js} +1 -1
  61. package/bin/{chunk-6sq6dfa1.js → chunk-h9akn41s.js} +1 -1
  62. package/bin/{chunk-zq5j9wsc.js → chunk-hdansxny.js} +1 -1
  63. package/bin/{chunk-zsg61vr0.js → chunk-hjwpd09v.js} +1 -1
  64. package/bin/{chunk-03zkxckm.js → chunk-hjzbw975.js} +1 -1
  65. package/bin/{chunk-mzme3m82.js → chunk-j4p3eqtd.js} +1 -1
  66. package/bin/chunk-jtkxeat4.js +2 -0
  67. package/bin/{chunk-5ebb2pdf.js → chunk-jw4g9628.js} +3 -3
  68. package/bin/{chunk-hbnpx0a5.js → chunk-jxebakyq.js} +1 -1
  69. package/bin/{chunk-d1rjpbgv.js → chunk-kfewyax2.js} +1 -1
  70. package/bin/chunk-kk3m4za5.js +1 -0
  71. package/bin/{chunk-24da4wg9.js → chunk-m7tnj47b.js} +1 -1
  72. package/bin/{chunk-b88tdt79.js → chunk-maw5ah8t.js} +2 -2
  73. package/bin/{chunk-hn2g40r6.js → chunk-n0wwtjwv.js} +1 -1
  74. package/bin/{chunk-qcpeefhr.js → chunk-nahdd2t9.js} +1 -1
  75. package/bin/{chunk-fa9yq17g.js → chunk-nv7tztvh.js} +28 -28
  76. package/bin/{chunk-srmx5z3v.js → chunk-nyjwdxyj.js} +2 -2
  77. package/bin/{chunk-t1h12r3q.js → chunk-p0yfxt5e.js} +5 -5
  78. package/bin/{chunk-4bc3gqmn.js → chunk-q27qn367.js} +2 -2
  79. package/bin/{chunk-9ca8a5f2.js → chunk-q36sdt2w.js} +1 -1
  80. package/bin/{chunk-zzbn0b6c.js → chunk-qbj5pe8t.js} +1 -1
  81. package/bin/chunk-qj0bxb1m.js +2 -0
  82. package/bin/{chunk-xdrpahym.js → chunk-qk5hsn6e.js} +1 -1
  83. package/bin/{chunk-qjdvs1s5.js → chunk-qnyqtaf0.js} +1 -1
  84. package/bin/{chunk-3ahax79y.js → chunk-qqkr6h07.js} +2 -2
  85. package/bin/chunk-qyqc5j3a.css +1 -0
  86. package/bin/chunk-qzaf6bre.js +2 -0
  87. package/bin/{chunk-nmd1901j.js → chunk-r1e59gf0.js} +1 -1
  88. package/bin/chunk-ra5csbkr.js +2 -0
  89. package/bin/{chunk-2w2bknn2.js → chunk-rx9g95wk.js} +3 -3
  90. package/bin/{chunk-04nqnkzs.js → chunk-rxyy37wa.js} +3 -3
  91. package/bin/{chunk-bn0taqr3.js → chunk-scez7ppq.js} +2 -2
  92. package/bin/{chunk-26am2rzm.js → chunk-t2a1vq34.js} +1 -1
  93. package/bin/chunk-t879v3b7.js +1 -0
  94. package/bin/{chunk-a8bymrv1.js → chunk-tjavzarz.js} +2 -2
  95. package/bin/{chunk-n08h1jgx.js → chunk-treyx8em.js} +1 -1
  96. package/bin/{chunk-p7zw53ep.js → chunk-v3z4z04s.js} +1 -1
  97. package/bin/{chunk-461gcgrs.js → chunk-v3z63tpw.js} +1 -1
  98. package/bin/{chunk-s0vfj06y.js → chunk-v9bes1fv.js} +1 -1
  99. package/bin/{chunk-vsnq4381.js → chunk-vjyget8s.js} +1 -1
  100. package/bin/{chunk-s6g2mzpn.js → chunk-vmm9m3nv.js} +1 -1
  101. package/bin/{chunk-qx553512.js → chunk-vvr8tnse.js} +36 -36
  102. package/bin/{chunk-hgy9rqt1.js → chunk-w3stry4v.js} +1 -1
  103. package/bin/{chunk-8ts3xkme.js → chunk-w89czwjj.js} +1 -1
  104. package/bin/{chunk-157axqz1.js → chunk-wk0hk00z.js} +1 -1
  105. package/bin/{chunk-pwq6dbb5.js → chunk-ww9qq8yq.js} +1 -1
  106. package/bin/{chunk-q1gfypy3.js → chunk-x4q082e6.js} +1 -1
  107. package/bin/{chunk-cvfznrnt.js → chunk-x6rf77jm.js} +1 -1
  108. package/bin/chunk-x7dyj53k.js +2 -0
  109. package/bin/{chunk-j420aqk8.js → chunk-xcrd0y8v.js} +3 -3
  110. package/bin/{chunk-q4qqmes7.js → chunk-z0z0jn5h.js} +2 -2
  111. package/bin/{chunk-1tesbv8w.js → chunk-zasjhrwc.js} +1 -1
  112. package/bin/chunk-zefds5gg.js +1 -0
  113. package/bin/{chunk-2pt9h882.js → chunk-zzzgk1d5.js} +2 -2
  114. package/bin/shumai-app.html +1 -1
  115. package/bin/shumai-app.js +364 -364
  116. package/package.json +8 -11
  117. package/bin/chunk-45p7d22e.js +0 -2
  118. package/bin/chunk-87secbzy.js +0 -1
  119. package/bin/chunk-8pykp70z.js +0 -1
  120. package/bin/chunk-cb37q6t0.js +0 -1
  121. package/bin/chunk-g2z0c39g.js +0 -1
  122. package/bin/chunk-gnt9gewm.js +0 -2
  123. package/bin/chunk-hk659cg2.css +0 -1
  124. package/bin/chunk-k97axrc4.js +0 -13
  125. package/bin/chunk-m9f21ye9.js +0 -1
  126. package/bin/chunk-md7pgk86.js +0 -2
  127. package/bin/chunk-mg6sybt0.js +0 -1
  128. package/bin/chunk-r3s1x5wp.js +0 -1
  129. package/bin/chunk-sjbvt3wa.js +0 -2
  130. package/bin/chunk-t8jfp3vx.js +0 -1
  131. package/bin/chunk-vk9ecq8n.js +0 -2
  132. package/bin/chunk-xhngtwn9.js +0 -1
  133. package/bin/chunk-xjnehexk.js +0 -2
  134. package/bin/chunk-xzb0t8mx.js +0 -1
  135. package/bin/chunk-zts21ft7.js +0 -1
@@ -1,2 +1,2 @@
1
- import{F,m,D,_,u,S,L,t,o,C,gt,ye,Y,Lt,se,Ai,_i,$n,bi,Lc}from"./chunk-qx553512.js";S();S();var De=Object.defineProperty,f=(a,e)=>De(a,"name",{value:e,configurable:!0}),ue=["PageUp","PageDown"],fe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],me={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},O="Slider",[J,Ve,Ie]=_i(O),[Q,it]=gt(O,[Ie]),[Ae,U]=Q(O),Be=F(f(function(e,r){let{name:i,min:s=0,max:n=100,step:c=1,orientation:d="horizontal",disabled:h=!1,minStepsBetweenThumbs:g=0,defaultValue:b=[s],value:v,onValueChange:l=f(()=>{},"onValueChange"),onValueCommit:p=f(()=>{},"onValueCommit"),inverted:P=!1,form:R,...x}=e,T=_(new Set),y=_(0),E=_(!1),V=d==="horizontal"?Ke:ke,[B,te]=u(null),j=ye(r,te),[I=[],X]=Lt({prop:v,defaultProp:b,onChange:f((w)=>{[...T.current][y.current]?.focus({preventScroll:!0,focusVisible:E.current}),E.current=!1,l(w)},"onChange")}),ne=_(I),Ce=_(I);m(()=>{let w=R?B?.ownerDocument.getElementById(R):B?.closest("form");if(w instanceof HTMLFormElement){let A=f(()=>X(Ce.current),"reset");return w.addEventListener("reset",A),()=>w.removeEventListener("reset",A)}},[B,R,X]);function re(w){let A=we(I,w);k(w,A)}f(re,"handleSlideStart");function oe(w){k(w,y.current)}f(oe,"handleSlideMove");function ie(){if(String(I)!==String(ne.current))p(I)}f(ie,"handleSlideEnd");function k(w,A,{commit:ae}={commit:!1}){let le=ee(c),W=H(Math.round((w-s)/c)*c+s,le),z=bi(W,[s,n]);X((N=[])=>{let K=ve(N,z,A);if(_e(K,g*c)){y.current=K.indexOf(z);let ce=String(K)!==String(N);if(ce&&ae)p(K);return ce?K:N}else return N})}return f(k,"updateValues"),t(Ae,{scope:e.__scopeSlider,name:i,disabled:h,min:s,max:n,valueIndexToChangeRef:y,thumbs:T.current,values:I,orientation:d,form:R,children:t(J.Provider,{scope:e.__scopeSlider,children:t(J.Slot,{scope:e.__scopeSlider,children:t(V,{"aria-disabled":h,"data-disabled":h?"":void 0,...x,ref:j,onPointerDown:Y(x.onPointerDown,()=>{if(!h)ne.current=I,E.current=!1}),min:s,max:n,inverted:P,onSlideStart:h?void 0:re,onSlideMove:h?void 0:oe,onSlideEnd:h?void 0:ie,onHomeKeyDown:()=>{if(!h)E.current=!0,k(s,0,{commit:!0})},onEndKeyDown:()=>{if(!h)E.current=!0,k(n,I.length-1,{commit:!0})},onStepKeyDown:({event:w,direction:A})=>{if(!h){E.current=!0;let W=ue.includes(w.key)||w.shiftKey&&fe.includes(w.key)?10:1,z=y.current,N=I[z],K=Te(N,{min:s,step:c,direction:A,multiplier:W});k(K,z,{commit:!0})}}})})})})},"Slider")),[Se,he]=Q(O,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Ke=F(f(function(e,r){let{min:i,max:s,dir:n,inverted:c,onSlideStart:d,onSlideMove:h,onSlideEnd:g,onStepKeyDown:b,...v}=e,[l,p]=u(null),P=ye(r,p),R=_(void 0),x=$n(n),T=x==="ltr",y=T&&!c||!T&&c;function E(M){let V=R.current||l.getBoundingClientRect(),B=[0,V.width],j=G(B,y?[i,s]:[s,i]);return R.current=V,j(M-V.left)}return f(E,"getValueFromPointer"),t(Se,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:t(pe,{dir:x,"data-orientation":"horizontal",...v,ref:P,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:(M)=>{let V=E(M.clientX);d?.(V)},onSlideMove:(M)=>{let V=E(M.clientX);h?.(V)},onSlideEnd:()=>{R.current=void 0,g?.()},onStepKeyDown:(M)=>{let B=me[y?"from-left":"from-right"].includes(M.key);b?.({event:M,direction:B?-1:1})}})})},"SliderHorizontal")),ke=F(f(function(e,r){let{min:i,max:s,inverted:n,onSlideStart:c,onSlideMove:d,onSlideEnd:h,onStepKeyDown:g,...b}=e,v=_(null),l=ye(r,v),p=_(void 0),P=!n;function R(x){let T=p.current||v.current.getBoundingClientRect(),y=[0,T.height],M=G(y,P?[s,i]:[i,s]);return p.current=T,M(x-T.top)}return f(R,"getValueFromPointer"),t(Se,{scope:e.__scopeSlider,startEdge:P?"bottom":"top",endEdge:P?"top":"bottom",size:"height",direction:P?1:-1,children:t(pe,{"data-orientation":"vertical",...b,ref:l,style:{...b.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:(x)=>{let T=R(x.clientY);c?.(T)},onSlideMove:(x)=>{let T=R(x.clientY);d?.(T)},onSlideEnd:()=>{p.current=void 0,h?.()},onStepKeyDown:(x)=>{let y=me[P?"from-bottom":"from-top"].includes(x.key);g?.({event:x,direction:y?-1:1})}})})},"SliderVertical")),pe=F(f(function(e,r){let{__scopeSlider:i,onSlideStart:s,onSlideMove:n,onSlideEnd:c,onHomeKeyDown:d,onEndKeyDown:h,onStepKeyDown:g,...b}=e,v=U(O,i);return t(se.span,{...b,ref:r,onKeyDown:Y(e.onKeyDown,(l)=>{if(l.key==="Home")d(l),l.preventDefault();else if(l.key==="End")h(l),l.preventDefault();else if(ue.concat(fe).includes(l.key))g(l),l.preventDefault()}),onPointerDown:Y(e.onPointerDown,(l)=>{let p=l.target;if(p.setPointerCapture(l.pointerId),l.preventDefault(),v.thumbs.has(p))p.focus({preventScroll:!0,focusVisible:!1});else s(l)}),onPointerMove:Y(e.onPointerMove,(l)=>{if(l.target.hasPointerCapture(l.pointerId))n(l)}),onPointerUp:Y(e.onPointerUp,(l)=>{let p=l.target;if(p.hasPointerCapture(l.pointerId))p.releasePointerCapture(l.pointerId),c(l)})})},"SliderImpl")),Ne="SliderTrack",ze=F(f(function(e,r){let{__scopeSlider:i,...s}=e,n=U(Ne,i);return t(se.span,{"data-disabled":n.disabled?"":void 0,"data-orientation":n.orientation,...s,ref:r})},"SliderTrack")),de="SliderRange",He=F(f(function(e,r){let{__scopeSlider:i,...s}=e,n=U(de,i),c=he(de,i),d=_(null),h=ye(r,d),g=n.values.length,b=n.values.map((p)=>Z(p,n.min,n.max)),v=g>1?Math.min(...b):0,l=100-Math.max(...b);return t(se.span,{"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,...s,ref:h,style:{...e.style,[c.startEdge]:v+"%",[c.endEdge]:l+"%"}})},"SliderRange")),Fe="SliderThumb",[Le,ge]=Q(Fe),Oe="SliderThumbProvider";function be(a){let{__scopeSlider:e,name:r,children:i,internal_do_not_use_render:s}=a,n=U(Oe,e),c=Ve(e),[d,h]=u(null),g=D(()=>d?c().findIndex((x)=>x.ref.current===d):-1,[c,d]),b=Ai(d),v=d?!!n.form||!!d.closest("form"):!0,l=n.values[g],p=r??(n.name?n.name+(n.values.length>1?"[]":""):void 0),P=l===void 0?0:Z(l,n.min,n.max);m(()=>{if(d)return n.thumbs.add(d),()=>{n.thumbs.delete(d)}},[d,n.thumbs]);let R={value:l,name:p,form:n.form,isFormControl:v,index:g,thumb:d,onThumbChange:h,percent:P,size:b};return t(Le,{scope:e,...R,children:Ee(s)?s(R):i})}f(be,"SliderThumbProvider");var q="SliderThumbTrigger",Ue=F(f(function(e,r){let{__scopeSlider:i,...s}=e,n=U(q,i),c=he(q,i),{index:d,value:h,percent:g,size:b,onThumbChange:v}=ge(q,i),l=ye(r,v),p=Re(d,n.values.length),P=b?.[c.size],R=P?Pe(P,g,c.direction):0;return t("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${g}% + ${R}px)`},children:t(J.ItemSlot,{scope:i,children:t(se.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":n.min,"aria-valuenow":h,"aria-valuemax":n.max,"aria-orientation":n.orientation,"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,tabIndex:n.disabled?void 0:0,...s,ref:l,style:h===void 0?{display:"none"}:e.style,onFocus:Y(e.onFocus,()=>{n.valueIndexToChangeRef.current=d})})})})},"SliderThumbTrigger")),Ye=F(f(function(e,r){let{__scopeSlider:i,name:s,...n}=e;return t(be,{__scopeSlider:i,name:s,internal_do_not_use_render:({index:c,isFormControl:d})=>o(L,{children:[t(Ue,{...n,ref:r,__scopeSlider:i}),d?t($e,{__scopeSlider:i},c):null]})})},"SliderThumb")),Ge="SliderBubbleInput",$e=F(f(function({__scopeSlider:e,...r},i){let{value:s,name:n,form:c}=ge(Ge,e),d=_(null),h=ye(d,i),g=Lc(s);return m(()=>{let b=d.current;if(!b)return;let v=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(v,"value").set;if(g!==s&&p){let P=new Event("input",{bubbles:!0});p.call(b,s),b.dispatchEvent(P)}},[g,s]),t(se.input,{style:{display:"none"},name:n,form:c,...r,ref:h,defaultValue:s})},"SliderBubbleInput"));function ve(a=[],e,r){let i=[...a];return i[r]=e,i.sort((s,n)=>s-n)}f(ve,"getNextSortedValues");function Z(a,e,r){let n=100/(r-e)*(a-e);return bi(n,[0,100])}f(Z,"convertValueToPercentage");function Re(a,e){if(e>2)return`Value ${a+1} of ${e}`;else if(e===2)return["Minimum","Maximum"][a];else return}f(Re,"getLabel");function we(a,e){if(a.length===1)return 0;let r=a.map((s)=>Math.abs(s-e)),i=Math.min(...r);return r.indexOf(i)}f(we,"getClosestValueIndex");function Pe(a,e,r){let i=a/2,s=50,n=G([0,50],[0,i]);return(i-n(e)*r)*r}f(Pe,"getThumbInBoundsOffset");function xe(a){return a.slice(0,-1).map((e,r)=>a[r+1]-e)}f(xe,"getStepsBetweenValues");function _e(a,e){if(e>0){let r=xe(a);return Math.min(...r)>=e}return!0}f(_e,"hasMinStepsBetweenValues");function G(a,e){return(r)=>{if(a[0]===a[1]||e[0]===e[1])return e[0];let i=(e[1]-e[0])/(a[1]-a[0]);return e[0]+i*(r-a[0])}}f(G,"linearScale");function ee(a){if(!Number.isFinite(a))return 0;let e=a.toString();if(e.includes("e")){let[i,s]=e.split("e"),n=i.split(".")[1]||"",c=Number(s);return Math.max(0,n.length-c)}let r=e.split(".")[1];return r?r.length:0}f(ee,"getDecimalCount");function H(a,e){let r=Math.pow(10,e);return Math.round(a*r)/r}f(H,"roundValue");function Te(a,{min:e,step:r,direction:i,multiplier:s}){let n=ee(r),c=(a-e)/r,d=Math.round(c),h=H(d*r+e,n)===H(a,n),g;if(h)g=d+s*i;else if(i>0)g=Math.ceil(c);else g=Math.floor(c);return H(g*r+e,n)}f(Te,"getNextStepValue");function Ee(a){return typeof a==="function"}f(Ee,"isFunction");function jo({className:a,defaultValue:e,value:r,min:i=0,max:s=100,...n}){let c=D(()=>Array.isArray(r)?r:Array.isArray(e)?e:[i,s],[r,e,i,s]);return o(Be,{"data-slot":"slider",defaultValue:e,value:r,min:i,max:s,className:C("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",a),...n,children:[t(ze,{"data-slot":"slider-track",className:C("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:t(He,{"data-slot":"slider-range",className:C("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(d,h)=>t(Ye,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},h))]})}
1
+ import{F,m,D,_,u,S,L,t,o,E,gt,ye,Y,Lt,se,Ai,_i,$n,bi,Lc}from"./chunk-vvr8tnse.js";S();S();var De=Object.defineProperty,f=(a,e)=>De(a,"name",{value:e,configurable:!0}),ue=["PageUp","PageDown"],fe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],me={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},O="Slider",[J,Ve,Ie]=_i(O),[Q,it]=gt(O,[Ie]),[Ae,U]=Q(O),Be=F(f(function(e,r){let{name:i,min:s=0,max:n=100,step:c=1,orientation:d="horizontal",disabled:h=!1,minStepsBetweenThumbs:g=0,defaultValue:b=[s],value:v,onValueChange:l=f(()=>{},"onValueChange"),onValueCommit:p=f(()=>{},"onValueCommit"),inverted:P=!1,form:R,...x}=e,T=_(new Set),y=_(0),C=_(!1),V=d==="horizontal"?Ke:ke,[B,te]=u(null),j=ye(r,te),[I=[],X]=Lt({prop:v,defaultProp:b,onChange:f((w)=>{[...T.current][y.current]?.focus({preventScroll:!0,focusVisible:C.current}),C.current=!1,l(w)},"onChange")}),ne=_(I),Ce=_(I);m(()=>{let w=R?B?.ownerDocument.getElementById(R):B?.closest("form");if(w instanceof HTMLFormElement){let A=f(()=>X(Ce.current),"reset");return w.addEventListener("reset",A),()=>w.removeEventListener("reset",A)}},[B,R,X]);function re(w){let A=we(I,w);k(w,A)}f(re,"handleSlideStart");function oe(w){k(w,y.current)}f(oe,"handleSlideMove");function ie(){if(String(I)!==String(ne.current))p(I)}f(ie,"handleSlideEnd");function k(w,A,{commit:ae}={commit:!1}){let le=ee(c),W=H(Math.round((w-s)/c)*c+s,le),z=bi(W,[s,n]);X((N=[])=>{let K=ve(N,z,A);if(_e(K,g*c)){y.current=K.indexOf(z);let ce=String(K)!==String(N);if(ce&&ae)p(K);return ce?K:N}else return N})}return f(k,"updateValues"),t(Ae,{scope:e.__scopeSlider,name:i,disabled:h,min:s,max:n,valueIndexToChangeRef:y,thumbs:T.current,values:I,orientation:d,form:R,children:t(J.Provider,{scope:e.__scopeSlider,children:t(J.Slot,{scope:e.__scopeSlider,children:t(V,{"aria-disabled":h,"data-disabled":h?"":void 0,...x,ref:j,onPointerDown:Y(x.onPointerDown,()=>{if(!h)ne.current=I,C.current=!1}),min:s,max:n,inverted:P,onSlideStart:h?void 0:re,onSlideMove:h?void 0:oe,onSlideEnd:h?void 0:ie,onHomeKeyDown:()=>{if(!h)C.current=!0,k(s,0,{commit:!0})},onEndKeyDown:()=>{if(!h)C.current=!0,k(n,I.length-1,{commit:!0})},onStepKeyDown:({event:w,direction:A})=>{if(!h){C.current=!0;let W=ue.includes(w.key)||w.shiftKey&&fe.includes(w.key)?10:1,z=y.current,N=I[z],K=Te(N,{min:s,step:c,direction:A,multiplier:W});k(K,z,{commit:!0})}}})})})})},"Slider")),[Se,he]=Q(O,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Ke=F(f(function(e,r){let{min:i,max:s,dir:n,inverted:c,onSlideStart:d,onSlideMove:h,onSlideEnd:g,onStepKeyDown:b,...v}=e,[l,p]=u(null),P=ye(r,p),R=_(void 0),x=$n(n),T=x==="ltr",y=T&&!c||!T&&c;function C(M){let V=R.current||l.getBoundingClientRect(),B=[0,V.width],j=G(B,y?[i,s]:[s,i]);return R.current=V,j(M-V.left)}return f(C,"getValueFromPointer"),t(Se,{scope:e.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:t(pe,{dir:x,"data-orientation":"horizontal",...v,ref:P,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:(M)=>{let V=C(M.clientX);d?.(V)},onSlideMove:(M)=>{let V=C(M.clientX);h?.(V)},onSlideEnd:()=>{R.current=void 0,g?.()},onStepKeyDown:(M)=>{let B=me[y?"from-left":"from-right"].includes(M.key);b?.({event:M,direction:B?-1:1})}})})},"SliderHorizontal")),ke=F(f(function(e,r){let{min:i,max:s,inverted:n,onSlideStart:c,onSlideMove:d,onSlideEnd:h,onStepKeyDown:g,...b}=e,v=_(null),l=ye(r,v),p=_(void 0),P=!n;function R(x){let T=p.current||v.current.getBoundingClientRect(),y=[0,T.height],M=G(y,P?[s,i]:[i,s]);return p.current=T,M(x-T.top)}return f(R,"getValueFromPointer"),t(Se,{scope:e.__scopeSlider,startEdge:P?"bottom":"top",endEdge:P?"top":"bottom",size:"height",direction:P?1:-1,children:t(pe,{"data-orientation":"vertical",...b,ref:l,style:{...b.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:(x)=>{let T=R(x.clientY);c?.(T)},onSlideMove:(x)=>{let T=R(x.clientY);d?.(T)},onSlideEnd:()=>{p.current=void 0,h?.()},onStepKeyDown:(x)=>{let y=me[P?"from-bottom":"from-top"].includes(x.key);g?.({event:x,direction:y?-1:1})}})})},"SliderVertical")),pe=F(f(function(e,r){let{__scopeSlider:i,onSlideStart:s,onSlideMove:n,onSlideEnd:c,onHomeKeyDown:d,onEndKeyDown:h,onStepKeyDown:g,...b}=e,v=U(O,i);return t(se.span,{...b,ref:r,onKeyDown:Y(e.onKeyDown,(l)=>{if(l.key==="Home")d(l),l.preventDefault();else if(l.key==="End")h(l),l.preventDefault();else if(ue.concat(fe).includes(l.key))g(l),l.preventDefault()}),onPointerDown:Y(e.onPointerDown,(l)=>{let p=l.target;if(p.setPointerCapture(l.pointerId),l.preventDefault(),v.thumbs.has(p))p.focus({preventScroll:!0,focusVisible:!1});else s(l)}),onPointerMove:Y(e.onPointerMove,(l)=>{if(l.target.hasPointerCapture(l.pointerId))n(l)}),onPointerUp:Y(e.onPointerUp,(l)=>{let p=l.target;if(p.hasPointerCapture(l.pointerId))p.releasePointerCapture(l.pointerId),c(l)})})},"SliderImpl")),Ne="SliderTrack",ze=F(f(function(e,r){let{__scopeSlider:i,...s}=e,n=U(Ne,i);return t(se.span,{"data-disabled":n.disabled?"":void 0,"data-orientation":n.orientation,...s,ref:r})},"SliderTrack")),de="SliderRange",He=F(f(function(e,r){let{__scopeSlider:i,...s}=e,n=U(de,i),c=he(de,i),d=_(null),h=ye(r,d),g=n.values.length,b=n.values.map((p)=>Z(p,n.min,n.max)),v=g>1?Math.min(...b):0,l=100-Math.max(...b);return t(se.span,{"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,...s,ref:h,style:{...e.style,[c.startEdge]:v+"%",[c.endEdge]:l+"%"}})},"SliderRange")),Fe="SliderThumb",[Le,ge]=Q(Fe),Oe="SliderThumbProvider";function be(a){let{__scopeSlider:e,name:r,children:i,internal_do_not_use_render:s}=a,n=U(Oe,e),c=Ve(e),[d,h]=u(null),g=D(()=>d?c().findIndex((x)=>x.ref.current===d):-1,[c,d]),b=Ai(d),v=d?!!n.form||!!d.closest("form"):!0,l=n.values[g],p=r??(n.name?n.name+(n.values.length>1?"[]":""):void 0),P=l===void 0?0:Z(l,n.min,n.max);m(()=>{if(d)return n.thumbs.add(d),()=>{n.thumbs.delete(d)}},[d,n.thumbs]);let R={value:l,name:p,form:n.form,isFormControl:v,index:g,thumb:d,onThumbChange:h,percent:P,size:b};return t(Le,{scope:e,...R,children:Ee(s)?s(R):i})}f(be,"SliderThumbProvider");var q="SliderThumbTrigger",Ue=F(f(function(e,r){let{__scopeSlider:i,...s}=e,n=U(q,i),c=he(q,i),{index:d,value:h,percent:g,size:b,onThumbChange:v}=ge(q,i),l=ye(r,v),p=Re(d,n.values.length),P=b?.[c.size],R=P?Pe(P,g,c.direction):0;return t("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${g}% + ${R}px)`},children:t(J.ItemSlot,{scope:i,children:t(se.span,{role:"slider","aria-label":e["aria-label"]||p,"aria-valuemin":n.min,"aria-valuenow":h,"aria-valuemax":n.max,"aria-orientation":n.orientation,"data-orientation":n.orientation,"data-disabled":n.disabled?"":void 0,tabIndex:n.disabled?void 0:0,...s,ref:l,style:h===void 0?{display:"none"}:e.style,onFocus:Y(e.onFocus,()=>{n.valueIndexToChangeRef.current=d})})})})},"SliderThumbTrigger")),Ye=F(f(function(e,r){let{__scopeSlider:i,name:s,...n}=e;return t(be,{__scopeSlider:i,name:s,internal_do_not_use_render:({index:c,isFormControl:d})=>o(L,{children:[t(Ue,{...n,ref:r,__scopeSlider:i}),d?t($e,{__scopeSlider:i},c):null]})})},"SliderThumb")),Ge="SliderBubbleInput",$e=F(f(function({__scopeSlider:e,...r},i){let{value:s,name:n,form:c}=ge(Ge,e),d=_(null),h=ye(d,i),g=Lc(s);return m(()=>{let b=d.current;if(!b)return;let v=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(v,"value").set;if(g!==s&&p){let P=new Event("input",{bubbles:!0});p.call(b,s),b.dispatchEvent(P)}},[g,s]),t(se.input,{style:{display:"none"},name:n,form:c,...r,ref:h,defaultValue:s})},"SliderBubbleInput"));function ve(a=[],e,r){let i=[...a];return i[r]=e,i.sort((s,n)=>s-n)}f(ve,"getNextSortedValues");function Z(a,e,r){let n=100/(r-e)*(a-e);return bi(n,[0,100])}f(Z,"convertValueToPercentage");function Re(a,e){if(e>2)return`Value ${a+1} of ${e}`;else if(e===2)return["Minimum","Maximum"][a];else return}f(Re,"getLabel");function we(a,e){if(a.length===1)return 0;let r=a.map((s)=>Math.abs(s-e)),i=Math.min(...r);return r.indexOf(i)}f(we,"getClosestValueIndex");function Pe(a,e,r){let i=a/2,s=50,n=G([0,50],[0,i]);return(i-n(e)*r)*r}f(Pe,"getThumbInBoundsOffset");function xe(a){return a.slice(0,-1).map((e,r)=>a[r+1]-e)}f(xe,"getStepsBetweenValues");function _e(a,e){if(e>0){let r=xe(a);return Math.min(...r)>=e}return!0}f(_e,"hasMinStepsBetweenValues");function G(a,e){return(r)=>{if(a[0]===a[1]||e[0]===e[1])return e[0];let i=(e[1]-e[0])/(a[1]-a[0]);return e[0]+i*(r-a[0])}}f(G,"linearScale");function ee(a){if(!Number.isFinite(a))return 0;let e=a.toString();if(e.includes("e")){let[i,s]=e.split("e"),n=i.split(".")[1]||"",c=Number(s);return Math.max(0,n.length-c)}let r=e.split(".")[1];return r?r.length:0}f(ee,"getDecimalCount");function H(a,e){let r=Math.pow(10,e);return Math.round(a*r)/r}f(H,"roundValue");function Te(a,{min:e,step:r,direction:i,multiplier:s}){let n=ee(r),c=(a-e)/r,d=Math.round(c),h=H(d*r+e,n)===H(a,n),g;if(h)g=d+s*i;else if(i>0)g=Math.ceil(c);else g=Math.floor(c);return H(g*r+e,n)}f(Te,"getNextStepValue");function Ee(a){return typeof a==="function"}f(Ee,"isFunction");function jo({className:a,defaultValue:e,value:r,min:i=0,max:s=100,...n}){let c=D(()=>Array.isArray(r)?r:Array.isArray(e)?e:[i,s],[r,e,i,s]);return o(Be,{"data-slot":"slider",defaultValue:e,value:r,min:i,max:s,className:E("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",a),...n,children:[t(ze,{"data-slot":"slider-track",className:E("relative grow overflow-hidden rounded-full bg-muted data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:t(He,{"data-slot":"slider-range",className:E("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(d,h)=>t(Ye,{"data-slot":"slider-thumb",className:"block size-4 shrink-0 rounded-full border border-primary bg-white shadow-sm ring-ring/50 transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},h))]})}
2
2
  export{jo};
@@ -0,0 +1 @@
1
+ import{t,Ue}from"./chunk-vvr8tnse.js";import"./chunk-dzjmwat0.js";import"./chunk-zasjhrwc.js";import"./chunk-fb1bes2h.js";import"./chunk-nv7tztvh.js";import"./chunk-bf5m8f6t.js";import"./chunk-v3z63tpw.js";import"./chunk-kfewyax2.js";import"./chunk-zzzgk1d5.js";import"./chunk-a23q1kc4.js";import"./chunk-rx9g95wk.js";import"./chunk-1dbjyarc.js";import"./chunk-4yhvexzk.js";import{Ii}from"./chunk-vmm9m3nv.js";import"./chunk-3tg10kwz.js";import"./chunk-hjzbw975.js";import"./chunk-5m51b7af.js";import"./chunk-emgyjhmx.js";import"./chunk-01ym2agz.js";import"./chunk-hjwpd09v.js";import"./chunk-8s9fehda.js";function a(){let{shareId:e}=s.useParams();return t(Ii,{shareId:e})}var s=Ue("/share/$shareId/")({component:a});export{s as Route};
@@ -1,4 +1,4 @@
1
- import{In,S,t,o,Z,A,m0,v0,Nf,_d,Yf,wS,HC,Pp,Yg,DI,Gp,Vp,An,ue,ae,pe,le,Mt,DA,kn,ao,Io,he}from"./chunk-qx553512.js";import{ko}from"./chunk-03zkxckm.js";S();var y=(g)=>g.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:");function Yl({sessionId:g,open:N,onOpenChange:_}){let{data:x,isLoading:D}=Z({queryKey:["agent-sessions",g,"entries"],queryFn:async()=>{if(!g)return[];let s=await A.api["agent-sessions"][":sessionId"].entries.$get({param:{sessionId:g}});if(!s.ok)throw Error("Failed to fetch session logs");return await s.json()},enabled:N&&!!g});return t(ue,{open:N,onOpenChange:_,children:o(ae,{className:"sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl",children:[o(pe,{className:"pb-4 border-b border-foreground/15",children:[o(le,{className:"flex items-center gap-2 text-xl font-bold",children:[t(ko,{className:"w-5 h-5 text-violet-500"}),v0()]}),t(Mt,{children:m0()})]}),t("div",{className:"flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text",children:D?o("div",{className:"space-y-4",children:[o("div",{className:"flex gap-4",children:[t(he,{className:"h-5 w-5 rounded-full shrink-0"}),o("div",{className:"flex-1 space-y-2",children:[t(he,{className:"h-4 w-1/4"}),t(he,{className:"h-20 w-full"})]})]}),o("div",{className:"flex gap-4",children:[t(he,{className:"h-5 w-5 rounded-full shrink-0"}),o("div",{className:"flex-1 space-y-2",children:[t(he,{className:"h-4 w-1/4"}),t(he,{className:"h-12 w-full"})]})]})]}):x&&x.length>0?t("div",{className:"flex flex-col",children:x.map((s)=>{let a=s.entry,b=a?.timestamp||s.timestamp,f="";if(typeof b==="string"||typeof b==="number"){let e=new Date(b);if(!isNaN(e.getTime()))f=kn(e.toISOString())}if(a&&typeof a==="object"){if(a.type==="custom_message"){if(a.customType==="context")return null;if(a.customType==="shumai_message"){let e=DA(a.details),m=typeof a.content==="string"?a.content:"",p=e?`${m}
1
+ import{In,S,t,o,Z,A,m0,v0,Df,_d,Jf,wS,HC,Np,eA,DI,Vp,Qp,An,de,le,me,ce,Mt,LA,kn,ao,Io,ae}from"./chunk-vvr8tnse.js";import{ko}from"./chunk-hjzbw975.js";S();var y=(g)=>g.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:");function Yl({sessionId:g,open:N,onOpenChange:_}){let{data:x,isLoading:D}=Z({queryKey:["agent-sessions",g,"entries"],queryFn:async()=>{if(!g)return[];let s=await A.api["agent-sessions"][":sessionId"].entries.$get({param:{sessionId:g}});if(!s.ok)throw Error("Failed to fetch session logs");return await s.json()},enabled:N&&!!g});return t(de,{open:N,onOpenChange:_,children:o(le,{className:"sm:max-w-2xl max-h-[80vh] flex flex-col p-6 overflow-hidden bg-background/95 backdrop-blur-md border border-foreground/15 shadow-2xl",children:[o(me,{className:"pb-4 border-b border-foreground/15",children:[o(ce,{className:"flex items-center gap-2 text-xl font-bold",children:[t(ko,{className:"w-5 h-5 text-violet-500"}),v0()]}),t(Mt,{children:m0()})]}),t("div",{className:"flex-1 overflow-y-auto pr-1 py-4 space-y-4 min-h-0 select-text",children:D?o("div",{className:"space-y-4",children:[o("div",{className:"flex gap-4",children:[t(ae,{className:"h-5 w-5 rounded-full shrink-0"}),o("div",{className:"flex-1 space-y-2",children:[t(ae,{className:"h-4 w-1/4"}),t(ae,{className:"h-20 w-full"})]})]}),o("div",{className:"flex gap-4",children:[t(ae,{className:"h-5 w-5 rounded-full shrink-0"}),o("div",{className:"flex-1 space-y-2",children:[t(ae,{className:"h-4 w-1/4"}),t(ae,{className:"h-12 w-full"})]})]})]}):x&&x.length>0?t("div",{className:"flex flex-col",children:x.map((s)=>{let a=s.entry,b=a?.timestamp||s.timestamp,f="";if(typeof b==="string"||typeof b==="number"){let e=new Date(b);if(!isNaN(e.getTime()))f=kn(e.toISOString())}if(a&&typeof a==="object"){if(a.type==="custom_message"){if(a.customType==="context")return null;if(a.customType==="shumai_message"){let e=LA(a.details),m=typeof a.content==="string"?a.content:"",p=e?`${m}
2
2
 
3
- ${e}`.trim():m,w="bg-primary/10 text-primary",v=Yg();return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center bg-primary"}),o("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[o("div",{className:"flex items-center justify-between gap-2",children:[o("div",{className:"flex items-center gap-2 flex-wrap",children:[t("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider bg-primary/10 text-primary",children:v}),o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:_d(),children:[_d(),": ",s.id]})]}),t("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),t("div",{className:"text-xs text-foreground/90 whitespace-pre-wrap leading-relaxed font-sans",children:p})]})]},s.id)}}if(a.type==="message"&&a.message){let e=a.message,m="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",p=String(e.role||"");if(e.role==="user")m="bg-primary/10 text-primary",p=Yg();else if(e.role==="assistant")m="bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",p=HC();else if(e.role==="toolResult")m=e.isError?"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300",p=Vp({name:String(e.toolName||An())});else if(e.role==="thought")m="bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",p=Pp();let w=(n)=>{let r=n;if(typeof n==="string")try{r=JSON.parse(n)}catch{}if(r&&typeof r==="object"&&!Array.isArray(r))return t("div",{className:"mt-1 space-y-1.5 pt-3",children:Object.entries(r).map(([l,i])=>{let c=i&&typeof i==="object"?JSON.stringify(i,null,2):String(i);return o("div",{className:"text-xs leading-relaxed break-words",children:[o("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:[l,":"]})," ",t("span",{className:"text-foreground/90 font-mono whitespace-pre-wrap",children:c})]},l)})});return t("div",{className:"text-xs font-mono whitespace-pre-wrap",children:String(n)})},v=()=>{let n=e.content;if(!n)return null;if(typeof n==="string"){if(!n.trim())return null;return t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(n)})})}if(Array.isArray(n)){let r=[];if(n.forEach((d,l)=>{if(!d)return;if(typeof d==="string"){if(!d.trim())return;r.push(t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(d)})},`str-${l}`));return}if(typeof d==="object"){let i=d,c=i.type;if(c==="text"){let u=i.text;if(typeof u!=="string"||!u.trim())return;r.push(t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(u)})},`txt-${l}`));return}if(c==="toolCall"){let u=String(i.name||i.toolName||An()),h=i.arguments||i.args;r.push(o("div",{className:"text-xs space-y-2 py-1",children:[o("div",{className:"font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5",children:[Nf()," ",t("span",{className:"font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]",children:u})]}),!!h&&o("div",{className:"space-y-1 pt-3",children:[t("div",{className:"text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider",children:Gp()}),w(h)]})]},`tool-${l}`));return}if(c==="image"){r.push(t("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:Yf()},`img-${l}`));return}let k=JSON.stringify(d,null,2);if(k==="{}")return;r.push(t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:k},`other-${l}`))}}),r.length===0)return null;return t("div",{className:"space-y-3 w-full",children:r.map((d,l)=>o(In,{children:[l>0&&t(ao,{className:"my-3 opacity-50"}),d]},l))})}return null};return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${e.role==="user"?"bg-primary":e.role==="assistant"?"bg-violet-500":e.role==="toolResult"?e.isError?"bg-red-500":"bg-emerald-500":"bg-amber-500"}`}),o("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[o("div",{className:"flex items-center justify-between gap-2",children:[o("div",{className:"flex items-center gap-2 flex-wrap",children:[t("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${m}`,children:p}),o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:_d(),children:[_d(),": ",s.id]})]}),t("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),v()]})]},s.id)}}return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400"}),o("div",{className:"bg-muted/30 p-3 rounded-lg border border-foreground/5",children:[o("div",{className:"flex items-center justify-between gap-2 mb-1.5 flex-wrap",children:[o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",s.id]}),t("div",{className:"text-[10px] text-muted-foreground/60",children:f})]}),t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words",children:JSON.stringify(s.entry,null,2)})]})]},s.id)})}):o("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[t(ko,{className:"w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse"}),t("p",{className:"text-sm font-medium",children:wS()}),t("p",{className:"text-xs text-muted-foreground/60 mt-1",children:DI()})]})})]})})}
3
+ ${e}`.trim():m,w="bg-primary/10 text-primary",v=eA();return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center bg-primary"}),o("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[o("div",{className:"flex items-center justify-between gap-2",children:[o("div",{className:"flex items-center gap-2 flex-wrap",children:[t("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider bg-primary/10 text-primary",children:v}),o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:_d(),children:[_d(),": ",s.id]})]}),t("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),t("div",{className:"text-xs text-foreground/90 whitespace-pre-wrap leading-relaxed font-sans",children:p})]})]},s.id)}}if(a.type==="message"&&a.message){let e=a.message,m="bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200",p=String(e.role||"");if(e.role==="user")m="bg-primary/10 text-primary",p=eA();else if(e.role==="assistant")m="bg-violet-100 text-violet-800 dark:bg-violet-900/30 dark:text-violet-300",p=HC();else if(e.role==="toolResult")m=e.isError?"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300":"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300",p=Qp({name:String(e.toolName||An())});else if(e.role==="thought")m="bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",p=Np();let w=(n)=>{let r=n;if(typeof n==="string")try{r=JSON.parse(n)}catch{}if(r&&typeof r==="object"&&!Array.isArray(r))return t("div",{className:"mt-1 space-y-1.5 pt-3",children:Object.entries(r).map(([l,i])=>{let c=i&&typeof i==="object"?JSON.stringify(i,null,2):String(i);return o("div",{className:"text-xs leading-relaxed break-words",children:[o("span",{className:"font-semibold text-violet-600 dark:text-violet-400",children:[l,":"]})," ",t("span",{className:"text-foreground/90 font-mono whitespace-pre-wrap",children:c})]},l)})});return t("div",{className:"text-xs font-mono whitespace-pre-wrap",children:String(n)})},v=()=>{let n=e.content;if(!n)return null;if(typeof n==="string"){if(!n.trim())return null;return t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(n)})})}if(Array.isArray(n)){let r=[];if(n.forEach((d,l)=>{if(!d)return;if(typeof d==="string"){if(!d.trim())return;r.push(t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(d)})},`str-${l}`));return}if(typeof d==="object"){let i=d,c=i.type;if(c==="text"){let u=i.text;if(typeof u!=="string"||!u.trim())return;r.push(t("div",{className:"text-xs text-foreground/80 dark:text-foreground/95 leading-relaxed prose prose-sm dark:prose-invert max-w-none break-words",children:t(Io,{children:y(u)})},`txt-${l}`));return}if(c==="toolCall"){let u=String(i.name||i.toolName||An()),h=i.arguments||i.args;r.push(o("div",{className:"text-xs space-y-2 py-1",children:[o("div",{className:"font-semibold text-violet-600 dark:text-violet-400 flex items-center gap-1.5",children:[Df()," ",t("span",{className:"font-mono bg-violet-500/10 px-1 py-0.5 rounded text-[11px]",children:u})]}),!!h&&o("div",{className:"space-y-1 pt-3",children:[t("div",{className:"text-[10px] text-muted-foreground/60 uppercase font-bold tracking-wider",children:Vp()}),w(h)]})]},`tool-${l}`));return}if(c==="image"){r.push(t("div",{className:"text-xs text-muted-foreground italic flex items-center gap-1.5 py-1",children:Jf()},`img-${l}`));return}let k=JSON.stringify(d,null,2);if(k==="{}")return;r.push(t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words bg-muted/20 p-2 rounded",children:k},`other-${l}`))}}),r.length===0)return null;return t("div",{className:"space-y-3 w-full",children:r.map((d,l)=>o(In,{children:[l>0&&t(ao,{className:"my-3 opacity-50"}),d]},l))})}return null};return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:`absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background flex items-center justify-center ${e.role==="user"?"bg-primary":e.role==="assistant"?"bg-violet-500":e.role==="toolResult"?e.isError?"bg-red-500":"bg-emerald-500":"bg-amber-500"}`}),o("div",{className:"flex flex-col gap-1.5 bg-muted/30 dark:bg-muted/10 p-3 rounded-lg border border-foreground/5 backdrop-blur-xs w-full",children:[o("div",{className:"flex items-center justify-between gap-2",children:[o("div",{className:"flex items-center gap-2 flex-wrap",children:[t("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-semibold uppercase tracking-wider ${m}`,children:p}),o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:_d(),children:[_d(),": ",s.id]})]}),t("span",{className:"text-[10px] text-muted-foreground/60 shrink-0",children:f})]}),v()]})]},s.id)}}return o("div",{className:"relative pl-6 pb-6 last:pb-0",children:[t("div",{className:"absolute left-[9px] top-2 bottom-0 w-0.5 bg-foreground/10 last:hidden"}),t("div",{className:"absolute left-0 top-1.5 h-5 w-5 rounded-full border-4 border-background bg-gray-400"}),o("div",{className:"bg-muted/30 p-3 rounded-lg border border-foreground/5",children:[o("div",{className:"flex items-center justify-between gap-2 mb-1.5 flex-wrap",children:[o("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted/50 px-1.5 py-0.5 rounded border border-foreground/10 select-all",title:"Entry ID",children:["ID: ",s.id]}),t("div",{className:"text-[10px] text-muted-foreground/60",children:f})]}),t("pre",{className:"text-xs text-foreground/80 font-mono whitespace-pre-wrap break-words",children:JSON.stringify(s.entry,null,2)})]})]},s.id)})}):o("div",{className:"flex flex-col items-center justify-center py-12 text-center text-muted-foreground",children:[t(ko,{className:"w-8 h-8 text-muted-foreground/40 mb-2 animate-pulse"}),t("p",{className:"text-sm font-medium",children:wS()}),t("p",{className:"text-xs text-muted-foreground/60 mt-1",children:DI()})]})})]})})}
4
4
  export{Yl};
@@ -25,7 +25,7 @@
25
25
  <meta name="theme-color" content="#ffffff" />
26
26
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
27
27
  <title>Shumai</title>
28
- <link rel="stylesheet" crossorigin href="./chunk-hk659cg2.css"><script type="module" crossorigin src="./chunk-qx553512.js"></script></head>
28
+ <link rel="stylesheet" crossorigin href="./chunk-qyqc5j3a.css"><script type="module" crossorigin src="./chunk-vvr8tnse.js"></script></head>
29
29
  <body>
30
30
  <div id="root"></div>
31
31