@next-bricks/ai-portal 0.27.2 → 0.27.4

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 (81) hide show
  1. package/dist/bricks.json +22 -22
  2. package/dist/chunks/1097.2d02ad95.js +3 -0
  3. package/dist/chunks/{2966.30d4dbdb.js.LICENSE.txt → 1097.2d02ad95.js.LICENSE.txt} +2 -2
  4. package/dist/chunks/1097.2d02ad95.js.map +1 -0
  5. package/dist/chunks/{5552.02ddc385.js → 3171.f486ac82.js} +2 -2
  6. package/dist/chunks/{3171.1b784ef4.js.map → 3171.f486ac82.js.map} +1 -1
  7. package/dist/chunks/{4306.27789c20.js → 4306.bae21d5d.js} +2 -2
  8. package/dist/chunks/4306.bae21d5d.js.map +1 -0
  9. package/dist/chunks/{7146.9e1f38b0.js → 4765.ae81ae59.js} +2 -2
  10. package/dist/chunks/4765.ae81ae59.js.map +1 -0
  11. package/dist/chunks/4820.4305acaa.js +2 -0
  12. package/dist/chunks/4820.4305acaa.js.map +1 -0
  13. package/dist/chunks/{4837.5b90ffe2.js → 4837.ef36f6e2.js} +2 -2
  14. package/dist/chunks/{7218.893a0ad4.js.map → 4837.ef36f6e2.js.map} +1 -1
  15. package/dist/chunks/{5054.dee4d597.js → 5054.0e746eec.js} +2 -2
  16. package/dist/chunks/{5054.dee4d597.js.map → 5054.0e746eec.js.map} +1 -1
  17. package/dist/chunks/{3171.1b784ef4.js → 5552.57a9edba.js} +2 -2
  18. package/dist/chunks/{5552.02ddc385.js.map → 5552.57a9edba.js.map} +1 -1
  19. package/dist/chunks/{4765.0d4af568.js → 7146.c0ae3b12.js} +2 -2
  20. package/dist/chunks/7146.c0ae3b12.js.map +1 -0
  21. package/dist/chunks/{7218.893a0ad4.js → 7218.13c19b72.js} +2 -2
  22. package/dist/chunks/{4837.5b90ffe2.js.map → 7218.13c19b72.js.map} +1 -1
  23. package/dist/chunks/871.42c14164.js +2 -0
  24. package/dist/chunks/871.42c14164.js.map +1 -0
  25. package/dist/chunks/{8928.31043568.js → 8928.c3da7b15.js} +3 -3
  26. package/dist/chunks/{8928.31043568.js.map → 8928.c3da7b15.js.map} +1 -1
  27. package/dist/chunks/9140.8e69fcb4.js +3 -0
  28. package/dist/chunks/9140.8e69fcb4.js.map +1 -0
  29. package/dist/chunks/981.e0bd1e25.js +2 -0
  30. package/dist/chunks/981.e0bd1e25.js.map +1 -0
  31. package/dist/chunks/{ai-agents.2da5692c.js → ai-agents.921e8399.js} +2 -2
  32. package/dist/chunks/{ai-agents.2da5692c.js.map → ai-agents.921e8399.js.map} +1 -1
  33. package/dist/chunks/{ai-employees.1c05e0e7.js → ai-employees.f2cc101e.js} +3 -3
  34. package/dist/chunks/{ai-employees.1c05e0e7.js.map → ai-employees.f2cc101e.js.map} +1 -1
  35. package/dist/chunks/{chat-box.2fbc1947.js → chat-box.b34adf84.js} +2 -2
  36. package/dist/chunks/{chat-box.2fbc1947.js.map → chat-box.b34adf84.js.map} +1 -1
  37. package/dist/chunks/{chat-history.a7ed7639.js → chat-history.d6faa19d.js} +3 -3
  38. package/dist/chunks/{chat-history.a7ed7639.js.map → chat-history.d6faa19d.js.map} +1 -1
  39. package/dist/chunks/{chat-stream.52db0e15.js → chat-stream.0274b098.js} +2 -2
  40. package/dist/chunks/{chat-stream.52db0e15.js.map → chat-stream.0274b098.js.map} +1 -1
  41. package/dist/chunks/{cruise-canvas.847fcd10.js → cruise-canvas.d4e9e5d8.js} +2 -2
  42. package/dist/chunks/{cruise-canvas.847fcd10.js.map → cruise-canvas.d4e9e5d8.js.map} +1 -1
  43. package/dist/chunks/{elevo-sidebar.c1b8a33b.js → elevo-sidebar.f02fd532.js} +3 -3
  44. package/dist/chunks/{elevo-sidebar.c1b8a33b.js.map → elevo-sidebar.f02fd532.js.map} +1 -1
  45. package/dist/chunks/{load-request-store.291fe1bf.js → load-request-store.eb92f754.js} +2 -2
  46. package/dist/chunks/{load-request-store.291fe1bf.js.map → load-request-store.eb92f754.js.map} +1 -1
  47. package/dist/chunks/main.b1cbab28.js +2 -0
  48. package/dist/chunks/{main.7f69e4a0.js.map → main.b1cbab28.js.map} +1 -1
  49. package/dist/chunks/{mcp-tools.169e225f.js → mcp-tools.089be187.js} +3 -3
  50. package/dist/chunks/{mcp-tools.169e225f.js.map → mcp-tools.089be187.js.map} +1 -1
  51. package/dist/chunks/{show-cases.cac0e03e.js → show-cases.f0f70cfb.js} +3 -3
  52. package/dist/chunks/{show-cases.cac0e03e.js.map → show-cases.f0f70cfb.js.map} +1 -1
  53. package/dist/examples.json +10 -10
  54. package/dist/index.978fd8b7.js +2 -0
  55. package/dist/index.978fd8b7.js.map +1 -0
  56. package/dist/manifest.json +200 -200
  57. package/dist/types.json +301 -301
  58. package/package.json +3 -3
  59. package/dist/chunks/2966.30d4dbdb.js +0 -3
  60. package/dist/chunks/2966.30d4dbdb.js.map +0 -1
  61. package/dist/chunks/4306.27789c20.js.map +0 -1
  62. package/dist/chunks/4765.0d4af568.js.map +0 -1
  63. package/dist/chunks/4820.e3f1d522.js +0 -2
  64. package/dist/chunks/4820.e3f1d522.js.map +0 -1
  65. package/dist/chunks/7146.9e1f38b0.js.map +0 -1
  66. package/dist/chunks/871.4a339fab.js +0 -2
  67. package/dist/chunks/871.4a339fab.js.map +0 -1
  68. package/dist/chunks/9140.5bed5052.js +0 -3
  69. package/dist/chunks/9140.5bed5052.js.map +0 -1
  70. package/dist/chunks/981.03a72180.js +0 -2
  71. package/dist/chunks/981.03a72180.js.map +0 -1
  72. package/dist/chunks/main.7f69e4a0.js +0 -2
  73. package/dist/index.bd7e0061.js +0 -2
  74. package/dist/index.bd7e0061.js.map +0 -1
  75. /package/dist/chunks/{8928.31043568.js.LICENSE.txt → 8928.c3da7b15.js.LICENSE.txt} +0 -0
  76. /package/dist/chunks/{9140.5bed5052.js.LICENSE.txt → 9140.8e69fcb4.js.LICENSE.txt} +0 -0
  77. /package/dist/chunks/{ai-employees.1c05e0e7.js.LICENSE.txt → ai-employees.f2cc101e.js.LICENSE.txt} +0 -0
  78. /package/dist/chunks/{chat-history.a7ed7639.js.LICENSE.txt → chat-history.d6faa19d.js.LICENSE.txt} +0 -0
  79. /package/dist/chunks/{elevo-sidebar.c1b8a33b.js.LICENSE.txt → elevo-sidebar.f02fd532.js.LICENSE.txt} +0 -0
  80. /package/dist/chunks/{mcp-tools.169e225f.js.LICENSE.txt → mcp-tools.089be187.js.LICENSE.txt} +0 -0
  81. /package/dist/chunks/{show-cases.cac0e03e.js.LICENSE.txt → show-cases.f0f70cfb.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
- /*! For license information please see 8928.31043568.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[8928],{24:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:block;white-space:nowrap}.container{border-radius:var(--elevo-border-radius)}:host([hidden]){display:none}*{box-sizing:border-box}.label{font-weight:500;overflow:hidden;text-overflow:ellipsis}.stat{font-weight:600}.chart{min-width:0}.chart > *{display:block}:host(:not([size="small"])) .container{background:linear-gradient(164deg,rgba(105,153,253,0) 40%,rgba(105,153,253,0.05) 60%,rgba(105,153,253,0.32) 100%),#fff;padding:22px}:host(:not([size="small"])) .label{font-size:14px;height:22px;margin-bottom:16px}:host(:not([size="small"])) .stat-and-chart{display:flex;align-items:center;justify-content:end;position:relative}:host(:not([size="small"])) .stat{font-size:36px;color:#1d212a;position:absolute;left:0}:host(:not([size="small"])) .chart{width:calc(100% - 160px)}:host([size="small"]) .container{padding:11px 15px;display:flex;align-items:center;justify-content:end;position:relative;background:var(--elevo-component-background);-webkit-backdrop-filter:var(--elevo-component-backdrop-filter);backdrop-filter:var(--elevo-component-backdrop-filter)}:host([size="small"]) .label-and-stat{position:absolute;left:15px}:host([size="small"]) .label{font-size:12px;color:#8c8c8c;line-height:17px;height:17px;margin-bottom:7px}:host([size="small"]) .stat{font-size:20px;color:#262626;line-height:24px}:host([size="small"]) .chart{width:calc(100% - 90px)}',""]);const o=r.toString()},14817:(e,t,i)=>{var a,n=i(74635),s=i(70918),r=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),h=i(18769),p=i.n(h),u=i(7921),m=i(11280),g=(i(65168),i(90079)),b=i(80079),k=i(51850),A=i(28548);let x,w,v,f,E,y,S,R,N,M,_,T,W,I,C,V,O,z,D,U,F,Y,L,B,P,H,G,j,q,J,K,$,Q,X,Z,ee,te,ie,ae,ne,se,re,oe,le,ce,de,he,pe,ue,me;(0,g.initializeI18n)(b.NS,b.I);const{defineElement:ge,property:be,event:ke,method:Ae}=(0,u.createDecorators)(),xe=(0,h.forwardRef)(k.A),we=(0,h.forwardRef)(A.B);let ve;var fe=new WeakMap,Ee=new WeakMap,ye=new WeakMap,Se=new WeakMap,Re=new WeakMap,Ne=new WeakMap,Me=new WeakMap,_e=new WeakMap,Te=new WeakMap,We=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,Ve=new WeakMap,Oe=new WeakMap,ze=new WeakMap,De=new WeakSet,Ue=new WeakMap,Fe=new WeakMap,Ye=new WeakMap,Le=new WeakMap,Be=new WeakMap,Pe=new WeakMap,He=new WeakMap,Ge=new WeakMap,je=new WeakMap,qe=new WeakMap;class Je extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,De),(0,s.A)(this,fe,(x(this),v(this))),(0,s.A)(this,Ee,(f(this),E(this))),(0,s.A)(this,ye,(y(this),S(this))),(0,s.A)(this,Se,(R(this),N(this))),(0,s.A)(this,Re,(M(this),_(this))),(0,s.A)(this,Ne,(T(this),W(this))),(0,s.A)(this,Me,(I(this),C(this))),(0,s.A)(this,_e,(V(this),O(this))),(0,s.A)(this,Te,(z(this),D(this))),(0,s.A)(this,We,(U(this),F(this))),(0,s.A)(this,Ie,(Y(this),L(this))),(0,s.A)(this,Ce,(B(this),P(this))),(0,s.A)(this,Ve,(H(this),G(this))),(0,s.A)(this,Oe,(j(this),q(this))),(0,s.A)(this,ze,(J(this),K(this))),(0,s.A)(this,Ue,(X(this),()=>{(0,o.A)(De,this,$).emit()})),(0,s.A)(this,Fe,Z(this)),(0,s.A)(this,Ye,(ie(this),()=>{(0,o.A)(De,this,ee).emit()})),(0,s.A)(this,Le,ae(this)),(0,s.A)(this,Be,(re(this),e=>{(0,o.A)(De,this,ne).emit(e)})),(0,s.A)(this,Pe,oe(this)),(0,s.A)(this,He,(de(this),e=>{(0,o.A)(De,this,le).emit(e)})),(0,s.A)(this,Ge,he(this)),(0,s.A)(this,je,(me(this),()=>{(0,o.A)(De,this,pe).emit("chat")})),(0,s.A)(this,qe,(0,h.createRef)())}get conversationId(){return(0,c.A)(fe,this)}set conversationId(e){(0,l.A)(fe,this,e)}get initialRequest(){return(0,c.A)(Ee,this)}set initialRequest(e){(0,l.A)(Ee,this,e)}get taskId(){return(0,c.A)(ye,this)}set taskId(e){(0,l.A)(ye,this,e)}get task(){return(0,c.A)(Se,this)}set task(e){(0,l.A)(Se,this,e)}get jobs(){return(0,c.A)(Re,this)}set jobs(e){(0,l.A)(Re,this,e)}get replay(){return(0,c.A)(Ne,this)}set replay(e){(0,l.A)(Ne,this,e)}get replayDelay(){return(0,c.A)(Me,this)}set replayDelay(e){(0,l.A)(Me,this,e)}get supports(){return(0,c.A)(_e,this)}set supports(e){(0,l.A)(_e,this,e)}get showHiddenJobs(){return(0,c.A)(Te,this)}set showHiddenJobs(e){(0,l.A)(Te,this,e)}get showFeedback(){return(0,c.A)(We,this)}set showFeedback(e){(0,l.A)(We,this,e)}get showFeedbackOnView(){return(0,c.A)(Ie,this)}set showFeedbackOnView(e){(0,l.A)(Ie,this,e)}get showUiSwitch(){return(0,c.A)(Ce,this)}set showUiSwitch(e){(0,l.A)(Ce,this,e)}get hideMermaid(){return(0,c.A)(Ve,this)}set hideMermaid(e){(0,l.A)(Ve,this,e)}get showJsxEditor(){return(0,c.A)(Oe,this)}set showJsxEditor(e){(0,l.A)(Oe,this,e)}resumed(){var e,t;null===(e=(0,c.A)(qe,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(qe,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(qe,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(qe,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){const e=this.conversationId?we:xe;return p().createElement(e,{conversationId:this.conversationId,initialRequest:this.initialRequest,taskId:this.taskId,jobs:this.jobs,task:this.task,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showFeedback:this.showFeedback,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,onShare:(0,c.A)(Ue,this),onTerminate:(0,c.A)(Ye,this),onSubmitFeedback:(0,c.A)(Be,this),onSwitchToChat:(0,c.A)(je,this),onFeedbackOnView:(0,c.A)(He,this),ref:(0,c.A)(qe,this)})}}a=Je,({e:[v,f,E,y,S,R,N,M,_,T,W,I,C,V,O,z,D,U,F,Y,L,B,P,H,G,j,q,J,K,$,Q,X,Z,ee,te,ie,ae,ne,se,re,oe,le,ce,de,he,pe,ue,me,x],c:[ve,w]}=(0,d.A)(a,[ge("ai-portal.cruise-canvas",{shadowOptions:!1})],[[be(),1,"conversationId"],[be({attribute:!1,render:!1}),1,"initialRequest"],[be(),1,"taskId"],[be({attribute:!1}),1,"task"],[be({attribute:!1}),1,"jobs"],[be({type:Boolean,render:!1}),1,"replay"],[be({type:Number,render:!1}),1,"replayDelay"],[be({attribute:!1}),1,"supports"],[be({type:Boolean}),1,"showHiddenJobs"],[be({type:Boolean}),1,"showFeedback"],[be({type:Boolean}),1,"showFeedbackOnView"],[be({type:Boolean}),1,"showUiSwitch"],[be({type:Boolean,render:!1}),1,"hideMermaid"],[be({type:Boolean}),1,"showJsxEditor"],[ke({type:"share"}),1,"shareEvent",e=>(0,c.A)(ze,e),(e,t)=>(0,l.A)(ze,e,t)],[ke({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Fe,e),(e,t)=>(0,l.A)(Fe,e,t)],[ke({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Le,e),(e,t)=>(0,l.A)(Le,e,t)],[ke({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(Pe,e),(e,t)=>(0,l.A)(Pe,e,t)],[ke({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Ge,e),(e,t)=>(0,l.A)(Ge,e,t)],[Ae(),2,"resumed"],[Ae(),2,"feedbackSubmitDone"],[Ae(),2,"feedbackSubmitFailed"],[Ae(),2,"feedbackOnViewDone"]],0,(e=>qe.has((0,r.A)(e))),m.ReactNextElement)),w();var Ke=i(71451),$e=i(41030);let Qe=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const Xe="bricks/ai-portal/chat-box",Ze={en:{[Qe.ASK_ANY_THING]:"Ask anything",[Qe.COMMON_TASKS]:"Common tasks"},zh:{[Qe.ASK_ANY_THING]:"询问任何问题",[Qe.COMMON_TASKS]:"常用任务"}},et=g.i18n.getFixedT(null,Xe),tt=i.p+"images/af389fa6.svg";var it,at=i(47008);let nt,st,rt,ot,lt,ct,dt,ht,pt,ut,mt,gt,bt,kt,At;(0,g.initializeI18n)(Xe,Ze);const xt=(0,m.wrapBrick)("eo-icon"),{defineElement:wt,property:vt,event:ft}=(0,u.createDecorators)();let Et;var yt=new WeakMap,St=new WeakMap,Rt=new WeakMap,Nt=new WeakMap,Mt=new WeakMap,_t=new WeakMap,Tt=new WeakSet,Wt=new WeakMap;class It extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Tt),(0,s.A)(this,yt,st(this)),(0,s.A)(this,St,(rt(this),ot(this))),(0,s.A)(this,Rt,(lt(this),ct(this))),(0,s.A)(this,Nt,(dt(this),ht(this))),(0,s.A)(this,Mt,(pt(this),ut(this))),(0,s.A)(this,_t,(mt(this),gt(this))),(0,s.A)(this,Wt,(At(this),e=>{(0,o.A)(Tt,this,bt).emit(e)}))}get disabled(){return(0,c.A)(yt,this)}set disabled(e){(0,l.A)(yt,this,e)}get placeholder(){return(0,c.A)(St,this)}set placeholder(e){(0,l.A)(St,this,e)}get autoFocus(){return(0,c.A)(Rt,this)}set autoFocus(e){(0,l.A)(Rt,this,e)}get suggestions(){return(0,c.A)(Nt,this)}set suggestions(e){(0,l.A)(Nt,this,e)}get suggestionsLabel(){return(0,c.A)(Mt,this)}set suggestionsLabel(e){(0,l.A)(Mt,this,e)}render(){return p().createElement(Ct,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(Wt,this)})}}function Ct(e){let{disabled:t,placeholder:i,autoFocus:a,suggestions:n,suggestionsLabel:s,onSubmit:r}=e;const o=(0,h.useRef)(null),l=(0,h.useRef)(null),[c,d]=(0,h.useState)(""),u=(0,h.useRef)(""),m=(0,h.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,h.useCallback)((e=>{u.current=e.target.value,d(e.target.value)}),[]),b=(0,h.useCallback)((()=>{null==r||r(u.current)}),[r]);(0,h.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const k=(0,h.useMemo)((()=>null!=n&&n.length?(0,$e.chunk)(n,Math.max(2,Math.ceil(n.length/2))):[]),[n]),A=(0,h.useCallback)((e=>{u.current=e.content,d(e.content),setTimeout((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);return p().createElement("div",{className:"root"},p().createElement("div",{className:"container",ref:o},p().createElement(Ke.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=i?i:et(Qe.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:m,onChange:g}),p().createElement("button",{className:"btn-send",disabled:!c,onClick:b},p().createElement(xt,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),!(null==k||!k.length)&&p().createElement("div",{className:"suggestions"},p().createElement("div",{className:"heading"},p().createElement("img",{className:"icon",src:tt,width:16,height:16}),p().createElement("span",null,null!=s?s:et(Qe.COMMON_TASKS))),k.map(((e,t)=>p().createElement(Vt,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:A})))))}function Vt(e){let{suggestions:t,pixelPerSecond:i,onSelect:a}=e;const n=(0,h.useRef)(null),s=(0,h.useRef)(null),[r,o]=(0,h.useState)(0);return(0,h.useEffect)((()=>{const e=n.current,t=s.current;if(!e||!t)return;let a,r,l,c,d=0;const h=(t.offsetWidth-7)/2+7;function p(e){r=e,void 0===l&&(l=e),void 0!==a&&(d+=e-a,a=void 0),o((e-l-d)/1e3*i%h),c=requestAnimationFrame(p)}c=requestAnimationFrame(p);const u=()=>{cancelAnimationFrame(c),a=r},m=()=>{c=requestAnimationFrame(p)};return e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",m),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseleave",m)}}),[t,i]),p().createElement("div",{className:"carousel",ref:n},p().createElement("ul",{className:"list",ref:s,style:{transform:`translateX(${-r}px)`}},[...t,...t].map(((e,t)=>p().createElement("li",{key:t},p().createElement("div",{className:"item",onClick:()=>a(e),title:e.content},p().createElement("div",{className:"title"},e.title),p().createElement("div",{className:"content"},e.content)))))))}it=It,({e:[st,rt,ot,lt,ct,dt,ht,pt,ut,mt,gt,bt,kt,At],c:[Et,nt]}=(0,d.A)(it,[wt("ai-portal.chat-box",{styleTexts:[at.A]})],[[vt({type:Boolean}),1,"disabled"],[vt(),1,"placeholder"],[vt({type:Boolean}),1,"autoFocus"],[vt({attribute:!1}),1,"suggestions"],[vt(),1,"suggestionsLabel"],[ft({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(_t,e),(e,t)=>(0,l.A)(_t,e,t)]],0,(e=>Wt.has((0,r.A)(e))),m.ReactNextElement)),nt();var Ot,zt=i(82165);let Dt;const{defineElement:Ut}=(0,u.createDecorators)();let Ft;class Yt extends m.ReactNextElement{render(){return p().createElement(Lt,null)}}function Lt(){return p().createElement("slot",null)}Ot=Yt,[Ft,Dt]=(0,d.A)(Ot,[Ut("ai-portal.home-container",{styleTexts:[zt.A]})],[],0,void 0,m.ReactNextElement).c,Dt();var Bt=i(21302),Pt=i.n(Bt),Ht=i(53373),Gt=i.n(Ht);let jt=function(e){return e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e}({});const qt="bricks/ai-portal/chat-history",Jt={en:{[jt.TODAY]:"Today",[jt.YESTERDAY]:"Yesterday",[jt.PREVIOUS_7_DAYS]:"Previous 7 days",[jt.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[jt.TODAY]:"今天",[jt.YESTERDAY]:"昨天",[jt.PREVIOUS_7_DAYS]:"过去7天",[jt.PREVIOUS_30_DAYS]:"过去30天"}},Kt=g.i18n.getFixedT(null,qt);var $t,Qt=i(21411),Xt=i(97907);let Zt,ei,ti,ii,ai,ni,si,ri,oi,li,ci,di,hi,pi,ui;(0,g.initializeI18n)(qt,Jt);const mi=(0,m.wrapBrick)("eo-icon"),gi=(0,m.wrapBrick)("eo-link"),bi=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:ki,property:Ai,event:xi}=(0,u.createDecorators)();let wi;var vi=new WeakMap,fi=new WeakMap,Ei=new WeakMap,yi=new WeakMap,Si=new WeakSet,Ri=new WeakMap,Ni=new WeakMap,Mi=new WeakMap;class _i extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Si),(0,s.A)(this,vi,ei(this)),(0,s.A)(this,fi,(ti(this),ii(this))),(0,s.A)(this,Ei,(ai(this),ni(this))),(0,s.A)(this,yi,(si(this),ri(this))),(0,s.A)(this,Ri,(ci(this),e=>{(0,o.A)(Si,this,oi).emit(e)})),(0,s.A)(this,Ni,di(this)),(0,s.A)(this,Mi,(ui(this),e=>{(0,o.A)(Si,this,hi).emit({nextToken:e})}))}get list(){return(0,c.A)(vi,this)}set list(e){(0,l.A)(vi,this,e)}get actions(){return(0,c.A)(fi,this)}set actions(e){(0,l.A)(fi,this,e)}get nextToken(){return(0,c.A)(Ei,this)}set nextToken(e){(0,l.A)(Ei,this,e)}render(){return p().createElement(Ti,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(Ri,this),onLoadMore:(0,c.A)(Mi,this)})}}function Ti(e){let{root:t,list:i,actions:a,nextToken:n,onActionClick:s,onLoadMore:r}=e;const o=(0,h.useMemo)((()=>{const e=new Map,t=Pt()(),a=t.clone().startOf("day"),n=a.clone().subtract(1,"day"),s=a.clone().subtract(7,"days"),r=a.clone().subtract(30,"days"),o=+a/1e3,l=+n/1e3,c=+s/1e3,d=+r/1e3,h=+t.clone().startOf("year")/1e3;for(const t of null!=i?i:[]){let i;i=t.startTime>=o?Kt(jt.TODAY):t.startTime>=l?Kt(jt.YESTERDAY):t.startTime>=c?Kt(jt.PREVIOUS_7_DAYS):t.startTime>=d?Kt(jt.PREVIOUS_30_DAYS):t.startTime>=h?Pt()(1e3*t.startTime).format("MMMM"):Pt()(1e3*t.startTime).format("YYYY");let a=e.get(i);a||e.set(i,a={title:i,items:[]}),a.items.push(t)}return[...e.values()]}),[i]),[l,c]=(0,h.useState)(null),d=(0,h.useRef)(null);return(0,h.useEffect)((()=>{const e=d.current;if(!e||!n)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(n)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[n,r,t]),i?p().createElement(p().Fragment,null,p().createElement("ul",null,o.map((e=>p().createElement("li",{key:e.title,className:"group"},p().createElement("div",{className:"group-title"},e.title),p().createElement("ul",{className:"items"},e.items.map((e=>p().createElement("li",{key:e.id},p().createElement(gi,{className:Gt()("item",{active:l===e.id}),url:e.url},p().createElement("div",{className:"item-title",title:e.title},e.title),p().createElement(bi,{className:"actions",actions:a,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!Xt.QB.includes(e.state)&&p().createElement("div",{className:"working"})))))))))),n&&p().createElement("div",{className:"load-more",ref:d},p().createElement(mi,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):p().createElement("div",{className:"loading"},p().createElement(mi,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}$t=_i,({e:[ei,ti,ii,ai,ni,si,ri,oi,li,ci,di,hi,pi,ui],c:[wi,Zt]}=(0,d.A)($t,[ki("ai-portal.chat-history",{styleTexts:[Qt.A]})],[[Ai({attribute:!1}),1,"list"],[Ai({attribute:!1}),1,"actions"],[Ai(),1,"nextToken"],[xi({type:"action.click"}),1,"actionClick",e=>(0,c.A)(yi,e),(e,t)=>(0,l.A)(yi,e,t)],[xi({type:"load.more"}),1,"loadMore",e=>(0,c.A)(Ni,e),(e,t)=>(0,l.A)(Ni,e,t)]],0,(e=>Mi.has((0,r.A)(e))),m.ReactNextElement)),Zt();var Wi,Ii=i(89575),Ci=i(24);let Vi,Oi,zi,Di,Ui,Fi,Yi,Li,Bi,Pi,Hi,Gi,ji,qi,Ji,Ki,$i,Qi,Xi,Zi,ea;const ta=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:ia,property:aa}=(0,u.createDecorators)();let na;var sa=new WeakMap,ra=new WeakMap,oa=new WeakMap,la=new WeakMap,ca=new WeakMap,da=new WeakMap,ha=new WeakMap,pa=new WeakMap,ua=new WeakMap,ma=new WeakMap;class ga extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,sa,Oi(this)),(0,s.A)(this,ra,(zi(this),Di(this))),(0,s.A)(this,oa,(Ui(this),Fi(this))),(0,s.A)(this,la,(Yi(this),Li(this))),(0,s.A)(this,ca,(Bi(this),Pi(this))),(0,s.A)(this,da,(Hi(this),Gi(this))),(0,s.A)(this,ha,(ji(this),qi(this))),(0,s.A)(this,pa,(Ji(this),Ki(this))),(0,s.A)(this,ua,($i(this),Qi(this))),(0,s.A)(this,ma,(Xi(this),Zi(this))),ea(this)}get label(){return(0,c.A)(sa,this)}set label(e){(0,l.A)(sa,this,e)}get value(){return(0,c.A)(ra,this)}set value(e){(0,l.A)(ra,this,e)}get size(){return(0,c.A)(oa,this)}set size(e){(0,l.A)(oa,this,e)}get lineColor(){return(0,c.A)(la,this)}set lineColor(e){(0,l.A)(la,this,e)}get showArea(){return(0,c.A)(ca,this)}set showArea(e){(0,l.A)(ca,this,e)}get min(){return(0,c.A)(da,this)}set min(e){(0,l.A)(da,this,e)}get max(){return(0,c.A)(ha,this)}set max(e){(0,l.A)(ha,this,e)}get xField(){return(0,c.A)(pa,this)}set xField(e){(0,l.A)(pa,this,e)}get yField(){return(0,c.A)(ua,this)}set yField(e){(0,l.A)(ua,this,e)}get data(){return(0,c.A)(ma,this)}set data(e){(0,l.A)(ma,this,e)}render(){return p().createElement(ba,{label:this.label,value:this.value,size:this.size,lineColor:this.lineColor,showArea:this.showArea,min:this.min,max:this.max,xField:this.xField,yField:this.yField,data:this.data})}}function ba(e){let{label:t,value:i,size:a,...n}=e;return"small"===a?p().createElement("div",{className:"container"},p().createElement("div",{className:"label-and-stat"},p().createElement("div",{className:"label"},t),p().createElement("div",{className:"stat"},i)),p().createElement("div",{className:"chart"},p().createElement(ta,(0,Ii.A)({},n,{lineWidth:1.5,width:"auto",height:"55"})))):p().createElement("div",{className:"container"},p().createElement("div",{className:"label"},t),p().createElement("div",{className:"stat-and-chart"},p().createElement("div",{className:"chart"},p().createElement(ta,(0,Ii.A)({},n,{lineWidth:2,width:"auto",height:"92"}))),p().createElement("div",{className:"stat"},i)))}Wi=ga,({e:[Oi,zi,Di,Ui,Fi,Yi,Li,Bi,Pi,Hi,Gi,ji,qi,Ji,Ki,$i,Qi,Xi,Zi,ea],c:[na,Vi]}=(0,d.A)(Wi,[ia("ai-portal.stat-with-mini-chart",{styleTexts:[Ci.A]})],[[aa(),1,"label"],[aa(),1,"value"],[aa(),1,"size"],[aa(),1,"lineColor"],[aa({type:Boolean}),1,"showArea"],[aa({type:Number}),1,"min"],[aa({type:Number}),1,"max"],[aa(),1,"xField"],[aa(),1,"yField"],[aa({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),Vi();const ka=i.p+"images/e47076cc.png";var Aa,xa=i(31653);let wa;const{defineElement:va}=(0,u.createDecorators)();let fa;class Ea extends m.ReactNextElement{render(){return p().createElement(ya,null)}}function ya(){return p().createElement("img",{src:ka,alt:"Elevo",width:95,height:28})}Aa=Ea,[fa,wa]=(0,d.A)(Aa,[va("ai-portal.elevo-logo",{styleTexts:[xa.A]})],[],0,void 0,m.ReactNextElement).c,wa();var Sa=i(23081);let Ra=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e}({});const Na="bricks/ai-portal/elevo-sidebar",Ma={en:{[Ra.NEW_CHAT]:"New chat",[Ra.LOGOUT]:"Logout",[Ra.TODAY]:"Today",[Ra.YESTERDAY]:"Yesterday",[Ra.PREVIOUS_7_DAYS]:"Previous 7 days",[Ra.PREVIOUS_30_DAYS]:"Previous 30 days",[Ra.SWITCH_LANGUAGE]:"中文"},zh:{[Ra.NEW_CHAT]:"新对话",[Ra.LOGOUT]:"登出",[Ra.TODAY]:"今天",[Ra.YESTERDAY]:"昨天",[Ra.PREVIOUS_7_DAYS]:"过去7天",[Ra.PREVIOUS_30_DAYS]:"过去30天",[Ra.SWITCH_LANGUAGE]:"English"}},_a=g.i18n.getFixedT(null,Na);var Ta=i(61408);const Wa=(0,m.wrapBrick)("eo-icon"),Ia=(0,m.wrapBrick)("eo-link"),Ca=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),Va=(0,m.wrapBrick)("eo-easyops-avatar"),Oa=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),za=(0,m.wrapBrick)("ai-portal.icon-button");var Da=i(57372);const Ua=async(e,t)=>(await Da.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data,Fa=(0,h.forwardRef)(Ya);function Ya(e,t){let{activeId:i,actions:a,urlTemplate:n,onActionClick:s,onHistoryClick:r}=e;const o=(0,h.useRef)(null),[l,c]=(0,h.useState)(null),[d,u]=(0,h.useState)(),[m,g]=(0,h.useState)();(0,h.useEffect)((()=>{Promise.all([Ua({next_token:m},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;c((e=>[...null!=e?e:[],...t.data])),u(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[m]);const b=(0,h.useMemo)((()=>{const e=new Map,t=Pt()(),i=t.clone().startOf("day"),a=i.clone().subtract(1,"day"),n=i.clone().subtract(7,"days"),s=i.clone().subtract(30,"days"),r=+i/1e3,o=+a/1e3,c=+n/1e3,d=+s/1e3,h=+t.clone().startOf("year")/1e3;for(const t of null!=l?l:[]){let i;i=t.startTime>=r?_a(Ra.TODAY):t.startTime>=o?_a(Ra.YESTERDAY):t.startTime>=c?_a(Ra.PREVIOUS_7_DAYS):t.startTime>=d?_a(Ra.PREVIOUS_30_DAYS):t.startTime>=h?Pt()(1e3*t.startTime).format("MMMM"):Pt()(1e3*t.startTime).format("YYYY");let a=e.get(i);a||e.set(i,a={title:i,items:[]}),a.items.push(t)}return[...e.values()]}),[l]),[k,A]=(0,h.useState)(null),x=(0,h.useRef)(null);(0,h.useEffect)((()=>{const e=x.current,t=o.current;if(!e||!d||!t)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&g(d)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[d]);const w=(0,h.useRef)(0),v=(0,h.useCallback)((async()=>{try{const e=++w.current,t=await Ua({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==w.current)return;c((e=>{const i=null!=e?e:[],a=t.data,n=new Set(a.map((e=>e.id))),s=new Map(a.map((e=>[e.id,e])));let r=!1,o=!1,l=!0;for(const e of i){const t=s.get(e.id);if(!t)break;if(r=!0,o=l&&t!==a[0]||!(0,$e.isEqual)(t,e),o)break;l=!1}return r?o?[...a,...i.filter((e=>!n.has(e.id)))]:e:(u(t.next_token),a)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,h.useImperativeHandle)(t,(()=>({pull:v})),[v]),l?p().createElement("div",{className:"history",ref:o},p().createElement("ul",null,b.map((e=>p().createElement("li",{key:e.title,className:"group"},p().createElement("div",{className:"group-title"},e.title),p().createElement("ul",{className:"items"},e.items.map((e=>{return p().createElement("li",{key:e.id},p().createElement(Ia,(0,Ii.A)({className:Gt()("item",{"actions-active":e.id===k,active:e.id===i}),onClick:r},n?{url:(t=n,o=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,$e.get)(o,t))))}:null),p().createElement("div",{className:"item-title",title:e.title},e.title),p().createElement(Oa,{className:"actions",actions:a,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{A(t.detail?e.id:null)}}),!Xt.QB.includes(e.state)&&p().createElement("div",{className:"working"})));var t,o}))))))),d&&p().createElement("div",{className:"load-more",ref:x},p().createElement(Wa,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):p().createElement("div",{className:"history"},p().createElement("div",{className:"loading"},p().createElement(Wa,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}var La;let Ba,Pa,Ha,Ga,ja,qa,Ja,Ka,$a,Qa,Xa,Za,en,tn,an,nn,sn,rn,on,ln,cn,dn,hn,pn,un,mn;(0,g.initializeI18n)(Na,Ma);const gn={lib:"easyops",icon:"sidebar"},{defineElement:bn,property:kn,event:An,method:xn}=(0,u.createDecorators)(),wn=(0,h.forwardRef)(Dn);let vn;var fn=new WeakMap,En=new WeakMap,yn=new WeakMap,Sn=new WeakMap,Rn=new WeakMap,Nn=new WeakMap,Mn=new WeakMap,_n=new WeakMap,Tn=new WeakMap,Wn=new WeakSet,In=new WeakMap,Cn=new WeakMap,Vn=new WeakMap,On=new WeakMap;class zn extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Wn),(0,s.A)(this,fn,(Ba(this),Ha(this))),(0,s.A)(this,En,(Ga(this),ja(this))),(0,s.A)(this,yn,(qa(this),Ja(this))),(0,s.A)(this,Sn,(Ka(this),$a(this))),(0,s.A)(this,Rn,(Qa(this),Xa(this))),(0,s.A)(this,Nn,(Za(this),en(this))),(0,s.A)(this,Mn,(tn(this),an(this))),(0,s.A)(this,_n,(nn(this),sn(this))),(0,s.A)(this,Tn,(rn(this),on(this))),(0,s.A)(this,In,(dn(this),()=>{(0,o.A)(Wn,this,ln).emit()})),(0,s.A)(this,Cn,hn(this)),(0,s.A)(this,Vn,(mn(this),e=>{(0,o.A)(Wn,this,pn).emit(e)})),(0,s.A)(this,On,(0,h.createRef)())}get userInstanceId(){return(0,c.A)(fn,this)}set userInstanceId(e){(0,l.A)(fn,this,e)}get behavior(){return(0,c.A)(En,this)}set behavior(e){(0,l.A)(En,this,e)}get logoUrl(){return(0,c.A)(yn,this)}set logoUrl(e){(0,l.A)(yn,this,e)}get newChatUrl(){return(0,c.A)(Sn,this)}set newChatUrl(e){(0,l.A)(Sn,this,e)}get historyActiveId(){return(0,c.A)(Rn,this)}set historyActiveId(e){(0,l.A)(Rn,this,e)}get historyUrlTemplate(){return(0,c.A)(Nn,this)}set historyUrlTemplate(e){(0,l.A)(Nn,this,e)}get historyActions(){return(0,c.A)(Mn,this)}set historyActions(e){(0,l.A)(Mn,this,e)}get links(){return(0,c.A)(_n,this)}set links(e){(0,l.A)(_n,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(On,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(On,this).current)||void 0===e||e.close()}render(){return p().createElement(wn,{ref:(0,c.A)(On,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,links:this.links,onLogout:(0,c.A)(In,this),onActionClick:(0,c.A)(Vn,this)})}}function Dn(e,t){let{userInstanceId:i,behavior:a,logoUrl:n,newChatUrl:s,historyActiveId:r,historyUrlTemplate:o,historyActions:l,links:c,onLogout:d,onActionClick:u}=e;const[m,b]=(0,h.useState)("drawer"===a),k=(0,h.useCallback)((()=>{b(!0)}),[]),A=(0,h.useCallback)((()=>{b(!1)}),[]);(0,h.useEffect)((()=>{"drawer"===a&&b(!0)}),[a]);const x=(0,h.useCallback)((()=>{b(!0)}),[]),w=(0,h.useCallback)((()=>{"drawer"===a&&b(!0)}),[a]),v=(0,h.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:_a(Ra.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:_a(Ra.SWITCH_LANGUAGE)}]),[]),f=(0,h.useRef)(null);return(0,h.useImperativeHandle)(t,(()=>({close:()=>{b(!0)},pull:()=>{var e;null===(e=f.current)||void 0===e||e.pull()}})),[]),p().createElement("div",{className:Gt()("container",{collapsed:m})},"drawer"===a&&!m&&p().createElement("div",{className:"mask",onClick:x}),p().createElement("div",{className:"alternative"},p().createElement(za,{icon:gn,variant:"light",onClick:A}),p().createElement(Ia,{className:"new-chat",url:s},p().createElement(Wa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),_a(Ra.NEW_CHAT))),p().createElement("div",{className:"sidebar"},p().createElement("div",{className:"logo-bar"},p().createElement(Ia,{url:n,className:"logo-link"},p().createElement("img",{className:"logo",alt:"Elevo",src:ka,width:95,height:28})),p().createElement(za,{icon:gn,variant:"light",onClick:k})),p().createElement(Ia,{className:"new-chat",url:s},p().createElement(Wa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),_a(Ra.NEW_CHAT)),null!=c&&c.length?p().createElement("div",{className:"links"},c.map(((e,t)=>p().createElement(Ia,{className:"link",key:t,url:e.url},p().createElement(Wa,(0,Ii.A)({className:"icon"},e.icon)),p().createElement("span",{className:"title"},e.title))))):null,p().createElement(Fa,{ref:f,activeId:r,urlTemplate:o,actions:l,onActionClick:u,onHistoryClick:w}),p().createElement("div",{className:"footer"},p().createElement(Ca,{className:"dropdown",actions:v,onActionClick:async e=>{"logout"===e.detail.key?d():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,Sa.getHistory)().reload())}},p().createElement("button",{className:"account"},p().createElement(Va,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}La=zn,({e:[Ha,Ga,ja,qa,Ja,Ka,$a,Qa,Xa,Za,en,tn,an,nn,sn,rn,on,ln,cn,dn,hn,pn,un,mn,Ba],c:[vn,Pa]}=(0,d.A)(La,[bn("ai-portal.elevo-sidebar",{styleTexts:[Ta.A]})],[[kn(),1,"userInstanceId"],[kn(),1,"behavior"],[kn(),1,"logoUrl"],[kn(),1,"newChatUrl"],[kn(),1,"historyActiveId"],[kn(),1,"historyUrlTemplate"],[kn({attribute:!1}),1,"historyActions"],[kn({attribute:!1}),1,"links"],[An({type:"logout"}),1,"logout",e=>(0,c.A)(Tn,e),(e,t)=>(0,l.A)(Tn,e,t)],[An({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Cn,e),(e,t)=>(0,l.A)(Cn,e,t)],[xn(),2,"pullHistory"],[xn(),2,"close"]],0,(e=>On.has((0,r.A)(e))),m.ReactNextElement)),Pa();var Un,Fn=i(47338);let Yn,Ln,Bn,Pn,Hn,Gn,jn,qn,Jn;const Kn=(0,m.wrapBrick)("eo-icon"),$n=(0,m.wrapBrick)("eo-tooltip"),{defineElement:Qn,property:Xn}=(0,u.createDecorators)();let Zn;var es=new WeakMap,ts=new WeakMap,is=new WeakMap,as=new WeakMap;class ns extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,es,Ln(this)),(0,s.A)(this,ts,(Bn(this),Pn(this))),(0,s.A)(this,is,(Hn(this),Gn(this))),(0,s.A)(this,as,(jn(this),qn(this))),Jn(this)}get icon(){return(0,c.A)(es,this)}set icon(e){(0,l.A)(es,this,e)}get tooltip(){return(0,c.A)(ts,this)}set tooltip(e){(0,l.A)(ts,this,e)}get disabled(){return(0,c.A)(is,this)}set disabled(e){(0,l.A)(is,this,e)}get variant(){return(0,c.A)(as,this)}set variant(e){(0,l.A)(as,this,e)}render(){return p().createElement(ss,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function ss(e){let{icon:t,tooltip:i,disabled:a}=e;const n=p().createElement("button",{disabled:a},p().createElement(Kn,t));return i?p().createElement($n,{content:i},n):n}Un=ns,({e:[Ln,Bn,Pn,Hn,Gn,jn,qn,Jn],c:[Zn,Yn]}=(0,d.A)(Un,[Qn("ai-portal.icon-button",{styleTexts:[Fn.A]})],[[Xn({attribute:!1}),1,"icon"],[Xn(),1,"tooltip"],[Xn({type:Boolean}),1,"disabled"],[Xn({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),Yn();let rs=function(e){return e.ALL="ALL",e}({});const os="bricks/ai-portal/show-cases",ls={en:{[rs.ALL]:"All"},zh:{[rs.ALL]:"全部"}},cs=g.i18n.getFixedT(null,os);var ds,hs=i(42873);let ps,us,ms,gs,bs;(0,g.initializeI18n)(os,ls);const ks=(0,m.wrapBrick)("eo-link"),{defineElement:As,property:xs}=(0,u.createDecorators)();let ws;var vs=new WeakMap,fs=new WeakMap;class Es extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,vs,us(this)),(0,s.A)(this,fs,(ms(this),gs(this))),bs(this)}get list(){return(0,c.A)(vs,this)}set list(e){(0,l.A)(vs,this,e)}get taskUrlTemplate(){return(0,c.A)(fs,this)}set taskUrlTemplate(e){(0,l.A)(fs,this,e)}render(){return p().createElement(ys,{list:this.list,taskUrlTemplate:this.taskUrlTemplate})}}function ys(e){let{list:t,taskUrlTemplate:i}=e;const a=(0,h.useMemo)((()=>[null,...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[n,s]=(0,h.useState)(null),r=(0,h.useMemo)((()=>n?null==t?void 0:t.filter((e=>e.scenario===n)):t),[n,t]);return null!=t&&t.length?p().createElement(p().Fragment,null,p().createElement("ul",{className:"nav"},null==a?void 0:a.map((e=>p().createElement("li",{key:e,className:"item"},p().createElement("a",{className:Gt()({active:n===e}),onClick:()=>s(e)},null===e?cs(rs.ALL):e))))),p().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>{return p().createElement("li",{key:e.taskId,className:"item"},p().createElement(ks,{className:"link",url:(t=i,a=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,$e.get)(a,t))))},p().createElement("span",{className:Gt()("placeholder",e.thumbUrl?"thumbnail":"summary")},e.thumbUrl?p().createElement("span",{style:{backgroundImage:`url(${(0,Sa.getBasePath)()}${e.thumbUrl})`}}):p().createElement("span",{className:"summary-1"},p().createElement("span",{className:"summary-2"},p().createElement("span",null,e.summary)))),p().createElement("span",{className:"title"},p().createElement("span",null,e.title))));var t,a})))):null}ds=Es,({e:[us,ms,gs,bs],c:[ws,ps]}=(0,d.A)(ds,[As("ai-portal.show-cases",{styleTexts:[hs.A]})],[[xs({attribute:!1}),1,"list"],[xs(),1,"taskUrlTemplate"]],0,void 0,m.ReactNextElement)),ps();let Ss=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const Rs="bricks/ai-portal/mcp-tools",Ns={en:{[Ss.MCP_HUB]:"MCP Hub",[Ss.ALL]:"All",[Ss.SERVER_cmdb]:"CMDB",[Ss.SERVER_cmdb_product_helper]:"CMDB",[Ss.SERVER_alert]:"Alert",[Ss.SERVER_web_builder]:"View",[Ss.SERVER_web_builder2]:"View",[Ss.SERVER_host_troubleshooting]:"Host Troubleshooting",[Ss.SERVER_system_inspection]:"System Inspection",[Ss.SERVER_grafana]:"Grafana",[Ss.SERVER_kubernetes]:"Kubernetes",[Ss.SERVER_llm]:"LLM"},zh:{[Ss.MCP_HUB]:"MCP 中心",[Ss.ALL]:"全部",[Ss.SERVER_cmdb]:"CMDB",[Ss.SERVER_cmdb_product_helper]:"CMDB",[Ss.SERVER_alert]:"告警",[Ss.SERVER_web_builder]:"视图",[Ss.SERVER_web_builder2]:"视图",[Ss.SERVER_host_troubleshooting]:"主机故障排查",[Ss.SERVER_system_inspection]:"系统巡检",[Ss.SERVER_grafana]:"Grafana",[Ss.SERVER_kubernetes]:"Kubernetes",[Ss.SERVER_llm]:"大模型"}},Ms=g.i18n.getFixedT(null,Rs);var _s,Ts=i(31748);let Ws,Is,Cs;(0,g.initializeI18n)(Rs,Ns);const Vs={lib:"antd",icon:"tool"},Os=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),zs=(0,m.wrapBrick)("eo-icon"),{defineElement:Ds,property:Us}=(0,u.createDecorators)();let Fs;var Ys=new WeakMap;class Ls extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ys,Is(this)),Cs(this)}get list(){return(0,c.A)(Ys,this)}set list(e){(0,l.A)(Ys,this,e)}render(){return p().createElement(Bs,{list:this.list})}}function Bs(e){let{list:t}=e;const[i,a]=(0,h.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const a=Ms(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let n=e.get(a);n||e.set(a,n=[]),n.push(t);const s=[...Os.entries()].find((e=>{let[i,{servers:a}]=e;return a.includes(t.server.id)})),r=s?s[0]:"其他";let o=i.get(r);o||i.set(r,o=[]),o.push(a)}));const a=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[n]=t;const s=a.indexOf(i),r=a.indexOf(n);return(s<0?a.length:s)-(r<0?a.length:r)}))),i]}),[t]),n=(0,h.useMemo)((()=>{const e=[...Os.keys()],t=[...a.keys()];return t.sort(((t,i)=>{const a=e.indexOf(t),n=e.indexOf(i);return(a<0?e.length:a)-(n<0?e.length:n)})),[null,...t]}),[a]),[s,r]=(0,h.useState)(null),o=(0,h.useMemo)((()=>{const e=[...i];if(null===s)return e;const t=a.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,i,a]);return p().createElement("div",{className:"container"},p().createElement("h1",null,Ms(Ss.MCP_HUB)),p().createElement("ul",{className:"nav"},null==n?void 0:n.map((e=>p().createElement("li",{key:e,className:"item"},p().createElement("a",{className:Gt()({active:s===e}),onClick:()=>r(e)},null===e?Ms(Ss.ALL):e))))),p().createElement("ul",{className:"groups"},null==o?void 0:o.map((e=>{let[t,i]=e;return p().createElement("li",{key:t,className:"group"},p().createElement("h2",null,t),p().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return p().createElement("li",{key:t,className:"item"},p().createElement("div",{className:"heading"},p().createElement(zs,(0,Ii.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:Vs,{fallback:Vs})),p().createElement("div",{className:"title"},e.title)),p().createElement("div",{className:"description"},e.description))}))))}))))}_s=Ls,({e:[Is,Cs],c:[Fs,Ws]}=(0,d.A)(_s,[Ds("ai-portal.mcp-tools",{styleTexts:[Ts.A]})],[[Us({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),Ws();var Ps,Hs=i(99126),Gs=i(92914),js=i(7863),qs=i(80413),Js=i(22025),Ks=i(44394),$s=i(13183),Qs=i(30578),Xs=i(31918),Zs=i(92449),er=i(85011),tr=i(65023),ir=i(17911),ar=i(95491),nr=i(11303);let sr,rr,or,lr,cr,dr,hr,pr,ur,mr,gr,br,kr,Ar,xr,wr,vr,fr,Er,yr,Sr,Rr,Nr,Mr,_r,Tr,Wr,Ir,Cr,Vr,Or,zr,Dr,Ur,Fr,Yr,Lr,Br;(0,g.initializeI18n)(Gs.NS,Gs.I);const Pr={lib:"easyops",icon:"share"},{defineElement:Hr,property:Gr,event:jr,method:qr}=(0,u.createDecorators)(),Jr=(0,h.forwardRef)(Ao);let Kr;var $r=new WeakMap,Qr=new WeakMap,Xr=new WeakMap,Zr=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakMap,ao=new WeakMap,no=new WeakMap,so=new WeakSet,ro=new WeakMap,oo=new WeakMap,lo=new WeakMap,co=new WeakMap,ho=new WeakMap,po=new WeakMap,uo=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap;class ko extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,so),(0,s.A)(this,$r,(sr(this),or(this))),(0,s.A)(this,Qr,(lr(this),cr(this))),(0,s.A)(this,Xr,(dr(this),hr(this))),(0,s.A)(this,Zr,(pr(this),ur(this))),(0,s.A)(this,eo,(mr(this),gr(this))),(0,s.A)(this,to,(br(this),kr(this))),(0,s.A)(this,io,(Ar(this),xr(this))),(0,s.A)(this,ao,(wr(this),vr(this))),(0,s.A)(this,no,(fr(this),Er(this))),(0,s.A)(this,ro,(Rr(this),()=>{(0,o.A)(so,this,yr).emit()})),(0,s.A)(this,oo,Nr(this)),(0,s.A)(this,lo,(Tr(this),()=>{(0,o.A)(so,this,Mr).emit()})),(0,s.A)(this,co,Wr(this)),(0,s.A)(this,ho,(Vr(this),e=>{(0,o.A)(so,this,Ir).emit(e)})),(0,s.A)(this,po,Or(this)),(0,s.A)(this,uo,(Ur(this),e=>{(0,o.A)(so,this,zr).emit(e)})),(0,s.A)(this,mo,Fr(this)),(0,s.A)(this,go,(Br(this),()=>{(0,o.A)(so,this,Yr).emit("canvas")})),(0,s.A)(this,bo,(0,h.createRef)())}get taskId(){return(0,c.A)($r,this)}set taskId(e){(0,l.A)($r,this,e)}get replay(){return(0,c.A)(Qr,this)}set replay(e){(0,l.A)(Qr,this,e)}get replayDelay(){return(0,c.A)(Xr,this)}set replayDelay(e){(0,l.A)(Xr,this,e)}get supports(){return(0,c.A)(Zr,this)}set supports(e){(0,l.A)(Zr,this,e)}get showFeedback(){return(0,c.A)(eo,this)}set showFeedback(e){(0,l.A)(eo,this,e)}get showFeedbackOnView(){return(0,c.A)(to,this)}set showFeedbackOnView(e){(0,l.A)(to,this,e)}get showUiSwitch(){return(0,c.A)(io,this)}set showUiSwitch(e){(0,l.A)(io,this,e)}get hideMermaid(){return(0,c.A)(ao,this)}set hideMermaid(e){(0,l.A)(ao,this,e)}resumed(){var e;null===(e=(0,c.A)(bo,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(bo,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(bo,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(bo,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return p().createElement(Jr,{taskId:this.taskId,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showFeedback:this.showFeedback,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(ro,this),onTerminate:(0,c.A)(lo,this),onSubmitFeedback:(0,c.A)(ho,this),onSwitchToCanvas:(0,c.A)(go,this),onFeedbackOnView:(0,c.A)(uo,this)})}}function Ao(e,t){var i;let{taskId:a,replay:n,replayDelay:s,supports:r,showFeedback:o,showFeedbackOnView:l,showUiSwitch:c,onShare:d,onTerminate:u,onSubmitFeedback:m,onSwitchToCanvas:g,onFeedbackOnView:b}=e;const{task:k,jobs:A,error:x,humanInputRef:w,resumedRef:v,skipToResults:f,watchAgain:E}=(0,js.S)(a,n,s),y=null!==(i=null==k?void 0:k.title)&&void 0!==i?i:"",S=null==k?void 0:k.state,R=Xt.QB.includes(S),{messages:N,inputRequiredJobId:M,lastToolCallJobId:_}=(0,qs.e)(k,A),T=(0,h.useMemo)((()=>null==A?void 0:A.flatMap((e=>e.generatedView?{id:e.id,view:e.generatedView}:[]))),[A]),[W,I]=(0,h.useState)(!1),[C,V]=(0,h.useState)(!1),[O,z]=(0,h.useState)(!!o);(0,h.useEffect)((()=>{z(!!o)}),[o]);const[D,U]=(0,h.useState)(),F=(0,h.useCallback)((e=>{I(!0),m(e)}),[m]);(0,h.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.call(v)},feedbackSubmitDone:()=>{V(!0),setTimeout((()=>{z(!1)}),3e3)},feedbackSubmitFailed:()=>{I(!1)},feedbackOnViewDone:e=>{U((t=>{const i=new Set(t);return i.add(e),i}))}})),[v]);const[Y,L]=(0,h.useState)(null),[B,P]=(0,h.useState)(null),[H,G]=(0,h.useState)(!1),j=(0,h.useRef)(!1),q=!!k;(0,h.useEffect)((()=>{if(q){const e=setTimeout((()=>{j.current=!0}),1e3);return()=>{clearTimeout(e)}}}),[q]),(0,h.useEffect)((()=>{j.current&&_&&!H&&P(_)}),[_,H]),(0,h.useEffect)((()=>{(0,Sa.getRuntime)().applyPageTitle(y)}),[y]),(0,h.useEffect)((()=>{x&&(0,Sa.handleHttpError)(x)}),[x]);const J=(0,h.useCallback)(((e,t)=>{var i;null===(i=w.current)||void 0===i||i.call(w,e,t)}),[w]),K=(0,h.useMemo)((()=>({humanInput:J,onShare:d,onTerminate:u,supports:r,activeExpandedViewJobId:Y,setActiveExpandedViewJobId:L,activeToolCallJobId:B,setActiveToolCallJobId:P,submittingFeedback:W,submittedFeedback:C,onSubmitFeedback:F,setShowFeedback:z,showFeedbackOnView:l,onFeedbackOnView:b,feedbackDoneViews:D})),[J,d,u,r,Y,B,W,C,F,l,b,D]),$=(0,h.useMemo)((()=>({lastToolCallJobId:_,setUserClosedAside:G})),[_]),Q=(0,h.useRef)(!1),X=(0,h.useRef)(!1),Z=(0,h.useRef)(null),[ee,te]=(0,h.useState)(!1);(0,h.useEffect)((()=>{const e=Z.current,t=null==e?void 0:e.firstElementChild;if(X.current||!e||!t)return;const i=()=>{te(e.scrollTop+e.clientHeight+24<e.scrollHeight),Q.current&&(X.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let a;e.addEventListener("scroll",i);const n=new Hs.A((()=>{X.current||(Q.current=!1,e.scrollTo({top:t.scrollHeight,behavior:"instant"}),clearTimeout(a),a=setTimeout((()=>{Q.current=!0}),100))}));return n.observe(t),()=>{n.disconnect(),e.removeEventListener("scroll",i)}}),[q]);const ie=(0,h.useCallback)((()=>{const e=Z.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[]),ae=(0,h.useMemo)((()=>B?null==A?void 0:A.find((e=>e.id===B)):null),[B,A]);return p().createElement(Xs.j.Provider,{value:K},p().createElement(ar.W.Provider,{value:$},p().createElement("div",{className:Js.A.container},p().createElement("div",{className:Js.A.header},p().createElement("div",{className:Js.A.left}),p().createElement("h1",null,y),p().createElement("div",{className:Js.A.right},c&&p().createElement(Ks.Py,{icon:Xt.Rq,variant:"mini",style:{transform:"rotate(90deg)"},onClick:g}),p().createElement(Ks.Py,{icon:Pr,variant:"mini",onClick:d}))),q?p().createElement(p().Fragment,null,p().createElement("div",{className:Js.A.main,ref:Z},p().createElement("div",{className:Js.A.narrow},N.map(((e,t,i)=>p().createElement("div",{className:Js.A.message,key:t},"user"===e.role?p().createElement($s.R,{content:e.content}):p().createElement(Qs.G,{jobs:e.jobs,taskState:S,isLatest:t===i.length-1})))),O&&"completed"===S&&p().createElement(nr.k,{className:Js.A.feedback}))),p().createElement("div",{className:Js.A["scroll-down"],hidden:!ee,onClick:ie},p().createElement(Ks.Bj,{lib:"antd",icon:"down"}))):p().createElement("div",{className:Js.A["loading-icon"]},p().createElement(Ks.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),n||null!=r&&r.chat?p().createElement("div",{className:Js.A.footer},p().createElement("div",{className:Js.A.narrow},n?p().createElement(tr.b,{taskDone:R,skipToResults:f,watchAgain:E}):p().createElement(Zs.s,{state:S,canChat:R&&!!M,inputRequiredJobId:M}))):null),p().createElement("div",{className:Gt()(Js.A.aside,{[Js.A.expanded]:!!B})},B&&p().createElement(ir.n,{job:ae})),Y&&p().createElement(er.f,{views:T})))}Ps=ko,({e:[or,lr,cr,dr,hr,pr,ur,mr,gr,br,kr,Ar,xr,wr,vr,fr,Er,yr,Sr,Rr,Nr,Mr,_r,Tr,Wr,Ir,Cr,Vr,Or,zr,Dr,Ur,Fr,Yr,Lr,Br,sr],c:[Kr,rr]}=(0,d.A)(Ps,[Hr("ai-portal.chat-stream",{shadowOptions:!1})],[[Gr(),1,"taskId"],[Gr({type:Boolean}),1,"replay"],[Gr({type:Number}),1,"replayDelay"],[Gr({attribute:!1}),1,"supports"],[Gr({type:Boolean}),1,"showFeedback"],[Gr({type:Boolean}),1,"showFeedbackOnView"],[Gr({type:Boolean}),1,"showUiSwitch"],[Gr({type:Boolean,render:!1}),1,"hideMermaid"],[jr({type:"share"}),1,"shareEvent",e=>(0,c.A)(no,e),(e,t)=>(0,l.A)(no,e,t)],[jr({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(oo,e),(e,t)=>(0,l.A)(oo,e,t)],[jr({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(co,e),(e,t)=>(0,l.A)(co,e,t)],[jr({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(po,e),(e,t)=>(0,l.A)(po,e,t)],[jr({type:"ui.switch"}),1,"switch",e=>(0,c.A)(mo,e),(e,t)=>(0,l.A)(mo,e,t)],[qr(),2,"resumed"],[qr(),2,"feedbackSubmitDone"],[qr(),2,"feedbackSubmitFailed"],[qr(),2,"feedbackOnViewDone"]],0,(e=>bo.has((0,r.A)(e))),m.ReactNextElement)),rr();const xo=i.p+"images/8c2cf79e.png",wo=i.p+"images/0cbe181e.png",vo=i.p+"images/87c8a33b.png",fo=i.p+"images/f542faa9.png",Eo=i.p+"images/8e5c445f.png",yo=i.p+"images/dd5fc700.png",So=i.p+"images/4215203f.png",Ro=i.p+"images/5e54ffc5.png";let No=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e}({});const Mo="bricks/ai-portal/ai-employees",_o=g.i18n.getFixedT(null,Mo);var To,Wo=i(98036);let Io,Co,Vo,Oo,zo;(0,g.initializeI18n)(Mo,{en:{AI_EMPLOYEES:"AI Employees"},zh:{AI_EMPLOYEES:"Ai 数字人"}});const Do=[xo,wo,vo,fo,Eo,yo,So,Ro],{defineElement:Uo,property:Fo}=(0,u.createDecorators)();let Yo;var Lo=new WeakMap,Bo=new WeakMap;class Po extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Lo,Co(this)),(0,s.A)(this,Bo,(Vo(this),Oo(this))),zo(this)}get list(){return(0,c.A)(Lo,this)}set list(e){(0,l.A)(Lo,this,e)}get industries(){return(0,c.A)(Bo,this)}set industries(e){(0,l.A)(Bo,this,e)}render(){return p().createElement(Ho,{list:this.list,industries:this.industries})}}function Ho(e){let{list:t,industries:i}=e;const a=(0,h.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[n,s]=(0,h.useState)(a[0]),r=(0,h.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==n)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[n,t]),o=a.indexOf(n);return p().createElement("div",{className:"container"},p().createElement("h1",null,_o(No.AI_EMPLOYEES)),p().createElement("ul",{className:"nav"},a.map((e=>p().createElement("li",{key:e,className:"item"},p().createElement("a",{className:Gt()({active:e===n}),onClick:()=>s(e)},e))))),p().createElement("ul",{className:"groups"},r.map(((e,t)=>{let[i,a]=e;return p().createElement("li",{key:i,className:"group"},p().createElement("h2",null,i),p().createElement("ul",{className:"list"},a.map(((e,i)=>p().createElement("li",{key:i,className:"item"},p().createElement("div",{className:"heading"},p().createElement("div",{className:"avatar"},p().createElement("img",{src:Do[(i+t+o)%Do.length]})),p().createElement("div",{className:"title"},e.name)),p().createElement("div",{className:"description"},e.description))))))}))))}To=Po,({e:[Co,Vo,Oo,zo],c:[Yo,Io]}=(0,d.A)(To,[Uo("ai-portal.ai-employees",{styleTexts:[Wo.A]})],[[Fo({attribute:!1}),1,"list"],[Fo({attribute:!1}),1,"industries"]],0,void 0,m.ReactNextElement)),Io();let Go=function(e){return e.AGENTS="AGENTS",e}({});const jo="bricks/ai-portal/ai-agents",qo=g.i18n.getFixedT(null,jo);var Jo,Ko=i(83059);let $o,Qo,Xo;const Zo={lib:"antd",icon:"tool"};(0,g.initializeI18n)(jo,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const el=(0,m.wrapBrick)("eo-icon"),{defineElement:tl,property:il}=(0,u.createDecorators)();let al;var nl=new WeakMap;class sl extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,nl,Qo(this)),Xo(this)}get list(){return(0,c.A)(nl,this)}set list(e){(0,l.A)(nl,this,e)}render(){return p().createElement(rl,{list:this.list})}}function rl(e){let{list:t}=e;return p().createElement("div",{className:"container"},p().createElement("h1",null,qo(Go.AGENTS)),p().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var i,a;return p().createElement("li",{key:t,className:"item"},p().createElement("div",{className:"heading"},p().createElement("div",{className:"icon"},p().createElement(el,(0,Ii.A)({},null!==(i=e.icon)&&void 0!==i?i:Zo,{fallback:Zo}))),p().createElement("div",{className:"title"},e.name)),p().createElement("div",{className:"tags"},null===(a=e.tags)||void 0===a?void 0:a.map(((e,t)=>p().createElement("span",{key:t,className:"tag"},e)))),p().createElement("div",{className:"description"},e.description))}))))}Jo=sl,({e:[Qo,Xo],c:[al,$o]}=(0,d.A)(Jo,[tl("ai-portal.ai-agents",{styleTexts:[Ko.A]})],[[il({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),$o();var ol=i(37732);let ll=null;customElements.define("ai-portal.save-request-store",(0,ol.createProviderClass)((function(e){ll=e}))),customElements.define("ai-portal.load-request-store",(0,ol.createProviderClass)((function(){const e=ll;return ll=null,e}))),customElements.define("ai-portal.clear-request-store",(0,ol.createProviderClass)((function(){ll=null})))},15733:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},21411:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.loading{display:flex;justify-content:center;padding:8px}.group + .group{margin-top:15px}.group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.item{display:block}.item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.item::part(link):hover{background:rgba(0,0,0,0.04)}.item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions{cursor:auto}.item:not(:hover):not(.active) .actions{display:none}.working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.item:hover .working,\n.item.active .working{display:none}.load-more{display:flex;justify-content:center;align-items:center;height:36px}",""]);const o=r.toString()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:inline-block;padding:3px 0}:host([hidden]){display:none}img{display:block}",""]);const o=r.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${h});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px}h2{font-size:16px;line-height:22px}.nav,\n.groups,\n.list{list-style:none;margin:0;padding:0}.nav{display:flex;font-size:16px;margin-top:17px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const p=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/6336f999.png"},42873:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(89518),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:flex;flex-direction:column;align-items:center;max-width:1200px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.nav,\n.cases{list-style:none;padding:0;margin:0}.nav{display:flex;font-size:16px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.cases{display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(276px,1fr));gap:24px;margin-top:2em}.link{background:#fefefe;border:1px solid #e8e9ec;border-radius:12px;overflow:hidden;display:block}.link::part(link){display:flex;gap:0;flex-direction:column;height:218px}.title{width:100%;height:76px;padding:16px 16px 15px;color:#262626;border-top:1px solid #e8e9ec;font-weight:500;font-size:15px;line-height:22px}.title span{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.placeholder{width:100%;height:142px;background:linear-gradient(308deg,#dee9fc 0%,#fcfbfd 100%,#fbf9fe 100%);overflow:hidden}.summary{color:rgba(0,0,0,0.65);padding:27px 0 0 24px}.thumbnail span{display:block;width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.link:hover{box-shadow:0px 4px 12px 0px rgba(0,0,0,0.06)}.link:hover .title{color:var(--elevo-color-brand)}.summary-1{display:block;background-image:url(${h});background-size:237px 115px;background-repeat:no-repeat;background-position:0 0;padding:10px 0 0 10px}.summary-2{display:block;background:linear-gradient(90deg,#ffffff 0%,#e4ecfc 100%);padding:12px 15px 5px 15px;border-top-left-radius:12px}.summary-2 span{display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;color:#525971;line-height:22px;height:88px}`,""]);const p=d.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(91107),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background-color:#e1e3ec;background-image:url(${h});background-size:694px 144px;background-position:top left;background-repeat:no-repeat;box-shadow:inset 0px 2px 5px 1px rgba(42,46,59,0.1);border-radius:20px;padding:12px}.container{position:relative}textarea{display:block;width:100%;padding:10px 16px 52px;color:var(--antd-input-color);background:rgba(255,255,255,0.8);border-radius:14px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font-size:14px;line-height:22px;height:130px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{position:absolute;bottom:14px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}.suggestions{margin-top:19px}.heading{display:flex;align-items:center;padding:0 5px;margin-bottom:8px}.icon{margin-right:5px}.carousel{overflow:hidden}.carousel + .carousel{margin-top:7px}.list{display:flex;width:max-content;list-style:none;margin:0;padding:0;font-size:12px}.item{background:rgba(255,255,255,0.4);border-radius:12px;border:1px solid #dcdee6;padding:12px;max-width:330px;cursor:pointer}.item:hover{background:rgba(255,255,255,0.5);border:1px solid rgba(37,64,255,0.3)}.list > li + li{margin-left:7px}.title{margin-bottom:4px}.content{color:rgba(0,0,0,0.45);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tooltip{display:block}`,""]);const p=d.toString()},47338:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}',""]);const o=r.toString()},61408:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:261px;height:100%;background:#f6f7f9;border-right:1px solid #e3e5eb;padding:26px 16px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -16px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:261px;height:100%;transition:width 0.3s ease-in-out}.collapsed{width:0;overflow:visible}.collapsed .sidebar{transform:translateX(-100%)}.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 13px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -16px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .loading{display:flex;justify-content:center;padding:8px}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const o=r.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${h});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const p=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${h});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px}.list{list-style:none;margin:0;padding:0;margin-top:30px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const p=d.toString()},89518:(e,t,i)=>{e.exports=i.p+"images/f819b04a.png"},91107:(e,t,i)=>{e.exports=i.p+"images/eef4f2bd.png"},98036:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${h});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px}h2{font-size:16px;line-height:22px}.nav,\n.groups,\n.list{list-style:none;margin:0;padding:0}.nav{display:flex;font-size:16px;margin-top:17px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const p=d.toString()}}]);
3
- //# sourceMappingURL=8928.31043568.js.map
1
+ /*! For license information please see 8928.c3da7b15.js.LICENSE.txt */
2
+ "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[8928],{24:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:block;white-space:nowrap}.container{border-radius:var(--elevo-border-radius)}:host([hidden]){display:none}*{box-sizing:border-box}.label{font-weight:500;overflow:hidden;text-overflow:ellipsis}.stat{font-weight:600}.chart{min-width:0}.chart > *{display:block}:host(:not([size="small"])) .container{background:linear-gradient(164deg,rgba(105,153,253,0) 40%,rgba(105,153,253,0.05) 60%,rgba(105,153,253,0.32) 100%),#fff;padding:22px}:host(:not([size="small"])) .label{font-size:14px;height:22px;margin-bottom:16px}:host(:not([size="small"])) .stat-and-chart{display:flex;align-items:center;justify-content:end;position:relative}:host(:not([size="small"])) .stat{font-size:36px;color:#1d212a;position:absolute;left:0}:host(:not([size="small"])) .chart{width:calc(100% - 160px)}:host([size="small"]) .container{padding:11px 15px;display:flex;align-items:center;justify-content:end;position:relative;background:var(--elevo-component-background);-webkit-backdrop-filter:var(--elevo-component-backdrop-filter);backdrop-filter:var(--elevo-component-backdrop-filter)}:host([size="small"]) .label-and-stat{position:absolute;left:15px}:host([size="small"]) .label{font-size:12px;color:#8c8c8c;line-height:17px;height:17px;margin-bottom:7px}:host([size="small"]) .stat{font-size:20px;color:#262626;line-height:24px}:host([size="small"]) .chart{width:calc(100% - 90px)}',""]);const o=r.toString()},14817:(e,t,i)=>{var a,n=i(74635),s=i(70918),r=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),h=i(18769),p=i.n(h),u=i(7921),m=i(11280),g=(i(65168),i(87117)),b=i(80079),k=i(51850),A=i(28548);let x,w,v,f,E,y,S,R,N,M,_,T,W,I,C,V,O,z,D,U,F,Y,L,B,P,H,G,j,q,J,K,$,Q,X,Z,ee,te,ie,ae,ne,se,re,oe,le,ce,de,he,pe,ue,me;(0,g.initializeI18n)(b.NS,b.I);const{defineElement:ge,property:be,event:ke,method:Ae}=(0,u.createDecorators)(),xe=(0,h.forwardRef)(k.A),we=(0,h.forwardRef)(A.B);let ve;var fe=new WeakMap,Ee=new WeakMap,ye=new WeakMap,Se=new WeakMap,Re=new WeakMap,Ne=new WeakMap,Me=new WeakMap,_e=new WeakMap,Te=new WeakMap,We=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,Ve=new WeakMap,Oe=new WeakMap,ze=new WeakMap,De=new WeakSet,Ue=new WeakMap,Fe=new WeakMap,Ye=new WeakMap,Le=new WeakMap,Be=new WeakMap,Pe=new WeakMap,He=new WeakMap,Ge=new WeakMap,je=new WeakMap,qe=new WeakMap;class Je extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,De),(0,s.A)(this,fe,(x(this),v(this))),(0,s.A)(this,Ee,(f(this),E(this))),(0,s.A)(this,ye,(y(this),S(this))),(0,s.A)(this,Se,(R(this),N(this))),(0,s.A)(this,Re,(M(this),_(this))),(0,s.A)(this,Ne,(T(this),W(this))),(0,s.A)(this,Me,(I(this),C(this))),(0,s.A)(this,_e,(V(this),O(this))),(0,s.A)(this,Te,(z(this),D(this))),(0,s.A)(this,We,(U(this),F(this))),(0,s.A)(this,Ie,(Y(this),L(this))),(0,s.A)(this,Ce,(B(this),P(this))),(0,s.A)(this,Ve,(H(this),G(this))),(0,s.A)(this,Oe,(j(this),q(this))),(0,s.A)(this,ze,(J(this),K(this))),(0,s.A)(this,Ue,(X(this),()=>{(0,o.A)(De,this,$).emit()})),(0,s.A)(this,Fe,Z(this)),(0,s.A)(this,Ye,(ie(this),()=>{(0,o.A)(De,this,ee).emit()})),(0,s.A)(this,Le,ae(this)),(0,s.A)(this,Be,(re(this),e=>{(0,o.A)(De,this,ne).emit(e)})),(0,s.A)(this,Pe,oe(this)),(0,s.A)(this,He,(de(this),e=>{(0,o.A)(De,this,le).emit(e)})),(0,s.A)(this,Ge,he(this)),(0,s.A)(this,je,(me(this),()=>{(0,o.A)(De,this,pe).emit("chat")})),(0,s.A)(this,qe,(0,h.createRef)())}get conversationId(){return(0,c.A)(fe,this)}set conversationId(e){(0,l.A)(fe,this,e)}get initialRequest(){return(0,c.A)(Ee,this)}set initialRequest(e){(0,l.A)(Ee,this,e)}get taskId(){return(0,c.A)(ye,this)}set taskId(e){(0,l.A)(ye,this,e)}get task(){return(0,c.A)(Se,this)}set task(e){(0,l.A)(Se,this,e)}get jobs(){return(0,c.A)(Re,this)}set jobs(e){(0,l.A)(Re,this,e)}get replay(){return(0,c.A)(Ne,this)}set replay(e){(0,l.A)(Ne,this,e)}get replayDelay(){return(0,c.A)(Me,this)}set replayDelay(e){(0,l.A)(Me,this,e)}get supports(){return(0,c.A)(_e,this)}set supports(e){(0,l.A)(_e,this,e)}get showHiddenJobs(){return(0,c.A)(Te,this)}set showHiddenJobs(e){(0,l.A)(Te,this,e)}get showFeedback(){return(0,c.A)(We,this)}set showFeedback(e){(0,l.A)(We,this,e)}get showFeedbackOnView(){return(0,c.A)(Ie,this)}set showFeedbackOnView(e){(0,l.A)(Ie,this,e)}get showUiSwitch(){return(0,c.A)(Ce,this)}set showUiSwitch(e){(0,l.A)(Ce,this,e)}get hideMermaid(){return(0,c.A)(Ve,this)}set hideMermaid(e){(0,l.A)(Ve,this,e)}get showJsxEditor(){return(0,c.A)(Oe,this)}set showJsxEditor(e){(0,l.A)(Oe,this,e)}resumed(){var e,t;null===(e=(0,c.A)(qe,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(qe,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(qe,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(qe,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){const e=this.conversationId?we:xe;return p().createElement(e,{conversationId:this.conversationId,initialRequest:this.initialRequest,taskId:this.taskId,jobs:this.jobs,task:this.task,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showFeedback:this.showFeedback,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,onShare:(0,c.A)(Ue,this),onTerminate:(0,c.A)(Ye,this),onSubmitFeedback:(0,c.A)(Be,this),onSwitchToChat:(0,c.A)(je,this),onFeedbackOnView:(0,c.A)(He,this),ref:(0,c.A)(qe,this)})}}a=Je,({e:[v,f,E,y,S,R,N,M,_,T,W,I,C,V,O,z,D,U,F,Y,L,B,P,H,G,j,q,J,K,$,Q,X,Z,ee,te,ie,ae,ne,se,re,oe,le,ce,de,he,pe,ue,me,x],c:[ve,w]}=(0,d.A)(a,[ge("ai-portal.cruise-canvas",{shadowOptions:!1})],[[be(),1,"conversationId"],[be({attribute:!1,render:!1}),1,"initialRequest"],[be(),1,"taskId"],[be({attribute:!1}),1,"task"],[be({attribute:!1}),1,"jobs"],[be({type:Boolean,render:!1}),1,"replay"],[be({type:Number,render:!1}),1,"replayDelay"],[be({attribute:!1}),1,"supports"],[be({type:Boolean}),1,"showHiddenJobs"],[be({type:Boolean}),1,"showFeedback"],[be({type:Boolean}),1,"showFeedbackOnView"],[be({type:Boolean}),1,"showUiSwitch"],[be({type:Boolean,render:!1}),1,"hideMermaid"],[be({type:Boolean}),1,"showJsxEditor"],[ke({type:"share"}),1,"shareEvent",e=>(0,c.A)(ze,e),(e,t)=>(0,l.A)(ze,e,t)],[ke({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Fe,e),(e,t)=>(0,l.A)(Fe,e,t)],[ke({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Le,e),(e,t)=>(0,l.A)(Le,e,t)],[ke({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(Pe,e),(e,t)=>(0,l.A)(Pe,e,t)],[ke({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Ge,e),(e,t)=>(0,l.A)(Ge,e,t)],[Ae(),2,"resumed"],[Ae(),2,"feedbackSubmitDone"],[Ae(),2,"feedbackSubmitFailed"],[Ae(),2,"feedbackOnViewDone"]],0,(e=>qe.has((0,r.A)(e))),m.ReactNextElement)),w();var Ke=i(71451),$e=i(41030);let Qe=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const Xe="bricks/ai-portal/chat-box",Ze={en:{[Qe.ASK_ANY_THING]:"Ask anything",[Qe.COMMON_TASKS]:"Common tasks"},zh:{[Qe.ASK_ANY_THING]:"询问任何问题",[Qe.COMMON_TASKS]:"常用任务"}},et=g.i18n.getFixedT(null,Xe),tt=i.p+"images/af389fa6.svg";var it,at=i(47008);let nt,st,rt,ot,lt,ct,dt,ht,pt,ut,mt,gt,bt,kt,At;(0,g.initializeI18n)(Xe,Ze);const xt=(0,m.wrapBrick)("eo-icon"),{defineElement:wt,property:vt,event:ft}=(0,u.createDecorators)();let Et;var yt=new WeakMap,St=new WeakMap,Rt=new WeakMap,Nt=new WeakMap,Mt=new WeakMap,_t=new WeakMap,Tt=new WeakSet,Wt=new WeakMap;class It extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Tt),(0,s.A)(this,yt,st(this)),(0,s.A)(this,St,(rt(this),ot(this))),(0,s.A)(this,Rt,(lt(this),ct(this))),(0,s.A)(this,Nt,(dt(this),ht(this))),(0,s.A)(this,Mt,(pt(this),ut(this))),(0,s.A)(this,_t,(mt(this),gt(this))),(0,s.A)(this,Wt,(At(this),e=>{(0,o.A)(Tt,this,bt).emit(e)}))}get disabled(){return(0,c.A)(yt,this)}set disabled(e){(0,l.A)(yt,this,e)}get placeholder(){return(0,c.A)(St,this)}set placeholder(e){(0,l.A)(St,this,e)}get autoFocus(){return(0,c.A)(Rt,this)}set autoFocus(e){(0,l.A)(Rt,this,e)}get suggestions(){return(0,c.A)(Nt,this)}set suggestions(e){(0,l.A)(Nt,this,e)}get suggestionsLabel(){return(0,c.A)(Mt,this)}set suggestionsLabel(e){(0,l.A)(Mt,this,e)}render(){return p().createElement(Ct,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(Wt,this)})}}function Ct(e){let{disabled:t,placeholder:i,autoFocus:a,suggestions:n,suggestionsLabel:s,onSubmit:r}=e;const o=(0,h.useRef)(null),l=(0,h.useRef)(null),[c,d]=(0,h.useState)(""),u=(0,h.useRef)(""),m=(0,h.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,h.useCallback)((e=>{u.current=e.target.value,d(e.target.value)}),[]),b=(0,h.useCallback)((()=>{null==r||r(u.current)}),[r]);(0,h.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const k=(0,h.useMemo)((()=>null!=n&&n.length?(0,$e.chunk)(n,Math.max(2,Math.ceil(n.length/2))):[]),[n]),A=(0,h.useCallback)((e=>{u.current=e.content,d(e.content),setTimeout((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);return p().createElement("div",{className:"root"},p().createElement("div",{className:"container",ref:o},p().createElement(Ke.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=i?i:et(Qe.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:m,onChange:g}),p().createElement("button",{className:"btn-send",disabled:!c,onClick:b},p().createElement(xt,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),!(null==k||!k.length)&&p().createElement("div",{className:"suggestions"},p().createElement("div",{className:"heading"},p().createElement("img",{className:"icon",src:tt,width:16,height:16}),p().createElement("span",null,null!=s?s:et(Qe.COMMON_TASKS))),k.map(((e,t)=>p().createElement(Vt,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:A})))))}function Vt(e){let{suggestions:t,pixelPerSecond:i,onSelect:a}=e;const n=(0,h.useRef)(null),s=(0,h.useRef)(null),[r,o]=(0,h.useState)(0);return(0,h.useEffect)((()=>{const e=n.current,t=s.current;if(!e||!t)return;let a,r,l,c,d=0;const h=(t.offsetWidth-7)/2+7;function p(e){r=e,void 0===l&&(l=e),void 0!==a&&(d+=e-a,a=void 0),o((e-l-d)/1e3*i%h),c=requestAnimationFrame(p)}c=requestAnimationFrame(p);const u=()=>{cancelAnimationFrame(c),a=r},m=()=>{c=requestAnimationFrame(p)};return e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",m),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseleave",m)}}),[t,i]),p().createElement("div",{className:"carousel",ref:n},p().createElement("ul",{className:"list",ref:s,style:{transform:`translateX(${-r}px)`}},[...t,...t].map(((e,t)=>p().createElement("li",{key:t},p().createElement("div",{className:"item",onClick:()=>a(e),title:e.content},p().createElement("div",{className:"title"},e.title),p().createElement("div",{className:"content"},e.content)))))))}it=It,({e:[st,rt,ot,lt,ct,dt,ht,pt,ut,mt,gt,bt,kt,At],c:[Et,nt]}=(0,d.A)(it,[wt("ai-portal.chat-box",{styleTexts:[at.A]})],[[vt({type:Boolean}),1,"disabled"],[vt(),1,"placeholder"],[vt({type:Boolean}),1,"autoFocus"],[vt({attribute:!1}),1,"suggestions"],[vt(),1,"suggestionsLabel"],[ft({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(_t,e),(e,t)=>(0,l.A)(_t,e,t)]],0,(e=>Wt.has((0,r.A)(e))),m.ReactNextElement)),nt();var Ot,zt=i(82165);let Dt;const{defineElement:Ut}=(0,u.createDecorators)();let Ft;class Yt extends m.ReactNextElement{render(){return p().createElement(Lt,null)}}function Lt(){return p().createElement("slot",null)}Ot=Yt,[Ft,Dt]=(0,d.A)(Ot,[Ut("ai-portal.home-container",{styleTexts:[zt.A]})],[],0,void 0,m.ReactNextElement).c,Dt();var Bt=i(21302),Pt=i.n(Bt),Ht=i(53373),Gt=i.n(Ht);let jt=function(e){return e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e}({});const qt="bricks/ai-portal/chat-history",Jt={en:{[jt.TODAY]:"Today",[jt.YESTERDAY]:"Yesterday",[jt.PREVIOUS_7_DAYS]:"Previous 7 days",[jt.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[jt.TODAY]:"今天",[jt.YESTERDAY]:"昨天",[jt.PREVIOUS_7_DAYS]:"过去7天",[jt.PREVIOUS_30_DAYS]:"过去30天"}},Kt=g.i18n.getFixedT(null,qt);var $t,Qt=i(21411),Xt=i(97907);let Zt,ei,ti,ii,ai,ni,si,ri,oi,li,ci,di,hi,pi,ui;(0,g.initializeI18n)(qt,Jt);const mi=(0,m.wrapBrick)("eo-icon"),gi=(0,m.wrapBrick)("eo-link"),bi=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:ki,property:Ai,event:xi}=(0,u.createDecorators)();let wi;var vi=new WeakMap,fi=new WeakMap,Ei=new WeakMap,yi=new WeakMap,Si=new WeakSet,Ri=new WeakMap,Ni=new WeakMap,Mi=new WeakMap;class _i extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Si),(0,s.A)(this,vi,ei(this)),(0,s.A)(this,fi,(ti(this),ii(this))),(0,s.A)(this,Ei,(ai(this),ni(this))),(0,s.A)(this,yi,(si(this),ri(this))),(0,s.A)(this,Ri,(ci(this),e=>{(0,o.A)(Si,this,oi).emit(e)})),(0,s.A)(this,Ni,di(this)),(0,s.A)(this,Mi,(ui(this),e=>{(0,o.A)(Si,this,hi).emit({nextToken:e})}))}get list(){return(0,c.A)(vi,this)}set list(e){(0,l.A)(vi,this,e)}get actions(){return(0,c.A)(fi,this)}set actions(e){(0,l.A)(fi,this,e)}get nextToken(){return(0,c.A)(Ei,this)}set nextToken(e){(0,l.A)(Ei,this,e)}render(){return p().createElement(Ti,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(Ri,this),onLoadMore:(0,c.A)(Mi,this)})}}function Ti(e){let{root:t,list:i,actions:a,nextToken:n,onActionClick:s,onLoadMore:r}=e;const o=(0,h.useMemo)((()=>{const e=new Map,t=Pt()(),a=t.clone().startOf("day"),n=a.clone().subtract(1,"day"),s=a.clone().subtract(7,"days"),r=a.clone().subtract(30,"days"),o=+a/1e3,l=+n/1e3,c=+s/1e3,d=+r/1e3,h=+t.clone().startOf("year")/1e3;for(const t of null!=i?i:[]){let i;i=t.startTime>=o?Kt(jt.TODAY):t.startTime>=l?Kt(jt.YESTERDAY):t.startTime>=c?Kt(jt.PREVIOUS_7_DAYS):t.startTime>=d?Kt(jt.PREVIOUS_30_DAYS):t.startTime>=h?Pt()(1e3*t.startTime).format("MMMM"):Pt()(1e3*t.startTime).format("YYYY");let a=e.get(i);a||e.set(i,a={title:i,items:[]}),a.items.push(t)}return[...e.values()]}),[i]),[l,c]=(0,h.useState)(null),d=(0,h.useRef)(null);return(0,h.useEffect)((()=>{const e=d.current;if(!e||!n)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(n)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[n,r,t]),i?p().createElement(p().Fragment,null,p().createElement("ul",null,o.map((e=>p().createElement("li",{key:e.title,className:"group"},p().createElement("div",{className:"group-title"},e.title),p().createElement("ul",{className:"items"},e.items.map((e=>p().createElement("li",{key:e.id},p().createElement(gi,{className:Gt()("item",{active:l===e.id}),url:e.url},p().createElement("div",{className:"item-title",title:e.title},e.title),p().createElement(bi,{className:"actions",actions:a,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!Xt.QB.includes(e.state)&&p().createElement("div",{className:"working"})))))))))),n&&p().createElement("div",{className:"load-more",ref:d},p().createElement(mi,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):p().createElement("div",{className:"loading"},p().createElement(mi,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}$t=_i,({e:[ei,ti,ii,ai,ni,si,ri,oi,li,ci,di,hi,pi,ui],c:[wi,Zt]}=(0,d.A)($t,[ki("ai-portal.chat-history",{styleTexts:[Qt.A]})],[[Ai({attribute:!1}),1,"list"],[Ai({attribute:!1}),1,"actions"],[Ai(),1,"nextToken"],[xi({type:"action.click"}),1,"actionClick",e=>(0,c.A)(yi,e),(e,t)=>(0,l.A)(yi,e,t)],[xi({type:"load.more"}),1,"loadMore",e=>(0,c.A)(Ni,e),(e,t)=>(0,l.A)(Ni,e,t)]],0,(e=>Mi.has((0,r.A)(e))),m.ReactNextElement)),Zt();var Wi,Ii=i(89575),Ci=i(24);let Vi,Oi,zi,Di,Ui,Fi,Yi,Li,Bi,Pi,Hi,Gi,ji,qi,Ji,Ki,$i,Qi,Xi,Zi,ea;const ta=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:ia,property:aa}=(0,u.createDecorators)();let na;var sa=new WeakMap,ra=new WeakMap,oa=new WeakMap,la=new WeakMap,ca=new WeakMap,da=new WeakMap,ha=new WeakMap,pa=new WeakMap,ua=new WeakMap,ma=new WeakMap;class ga extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,sa,Oi(this)),(0,s.A)(this,ra,(zi(this),Di(this))),(0,s.A)(this,oa,(Ui(this),Fi(this))),(0,s.A)(this,la,(Yi(this),Li(this))),(0,s.A)(this,ca,(Bi(this),Pi(this))),(0,s.A)(this,da,(Hi(this),Gi(this))),(0,s.A)(this,ha,(ji(this),qi(this))),(0,s.A)(this,pa,(Ji(this),Ki(this))),(0,s.A)(this,ua,($i(this),Qi(this))),(0,s.A)(this,ma,(Xi(this),Zi(this))),ea(this)}get label(){return(0,c.A)(sa,this)}set label(e){(0,l.A)(sa,this,e)}get value(){return(0,c.A)(ra,this)}set value(e){(0,l.A)(ra,this,e)}get size(){return(0,c.A)(oa,this)}set size(e){(0,l.A)(oa,this,e)}get lineColor(){return(0,c.A)(la,this)}set lineColor(e){(0,l.A)(la,this,e)}get showArea(){return(0,c.A)(ca,this)}set showArea(e){(0,l.A)(ca,this,e)}get min(){return(0,c.A)(da,this)}set min(e){(0,l.A)(da,this,e)}get max(){return(0,c.A)(ha,this)}set max(e){(0,l.A)(ha,this,e)}get xField(){return(0,c.A)(pa,this)}set xField(e){(0,l.A)(pa,this,e)}get yField(){return(0,c.A)(ua,this)}set yField(e){(0,l.A)(ua,this,e)}get data(){return(0,c.A)(ma,this)}set data(e){(0,l.A)(ma,this,e)}render(){return p().createElement(ba,{label:this.label,value:this.value,size:this.size,lineColor:this.lineColor,showArea:this.showArea,min:this.min,max:this.max,xField:this.xField,yField:this.yField,data:this.data})}}function ba(e){let{label:t,value:i,size:a,...n}=e;return"small"===a?p().createElement("div",{className:"container"},p().createElement("div",{className:"label-and-stat"},p().createElement("div",{className:"label"},t),p().createElement("div",{className:"stat"},i)),p().createElement("div",{className:"chart"},p().createElement(ta,(0,Ii.A)({},n,{lineWidth:1.5,width:"auto",height:"55"})))):p().createElement("div",{className:"container"},p().createElement("div",{className:"label"},t),p().createElement("div",{className:"stat-and-chart"},p().createElement("div",{className:"chart"},p().createElement(ta,(0,Ii.A)({},n,{lineWidth:2,width:"auto",height:"92"}))),p().createElement("div",{className:"stat"},i)))}Wi=ga,({e:[Oi,zi,Di,Ui,Fi,Yi,Li,Bi,Pi,Hi,Gi,ji,qi,Ji,Ki,$i,Qi,Xi,Zi,ea],c:[na,Vi]}=(0,d.A)(Wi,[ia("ai-portal.stat-with-mini-chart",{styleTexts:[Ci.A]})],[[aa(),1,"label"],[aa(),1,"value"],[aa(),1,"size"],[aa(),1,"lineColor"],[aa({type:Boolean}),1,"showArea"],[aa({type:Number}),1,"min"],[aa({type:Number}),1,"max"],[aa(),1,"xField"],[aa(),1,"yField"],[aa({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),Vi();const ka=i.p+"images/e47076cc.png";var Aa,xa=i(31653);let wa;const{defineElement:va}=(0,u.createDecorators)();let fa;class Ea extends m.ReactNextElement{render(){return p().createElement(ya,null)}}function ya(){return p().createElement("img",{src:ka,alt:"Elevo",width:95,height:28})}Aa=Ea,[fa,wa]=(0,d.A)(Aa,[va("ai-portal.elevo-logo",{styleTexts:[xa.A]})],[],0,void 0,m.ReactNextElement).c,wa();var Sa=i(29475);let Ra=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e}({});const Na="bricks/ai-portal/elevo-sidebar",Ma={en:{[Ra.NEW_CHAT]:"New chat",[Ra.LOGOUT]:"Logout",[Ra.TODAY]:"Today",[Ra.YESTERDAY]:"Yesterday",[Ra.PREVIOUS_7_DAYS]:"Previous 7 days",[Ra.PREVIOUS_30_DAYS]:"Previous 30 days",[Ra.SWITCH_LANGUAGE]:"中文"},zh:{[Ra.NEW_CHAT]:"新对话",[Ra.LOGOUT]:"登出",[Ra.TODAY]:"今天",[Ra.YESTERDAY]:"昨天",[Ra.PREVIOUS_7_DAYS]:"过去7天",[Ra.PREVIOUS_30_DAYS]:"过去30天",[Ra.SWITCH_LANGUAGE]:"English"}},_a=g.i18n.getFixedT(null,Na);var Ta=i(61408);const Wa=(0,m.wrapBrick)("eo-icon"),Ia=(0,m.wrapBrick)("eo-link"),Ca=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),Va=(0,m.wrapBrick)("eo-easyops-avatar"),Oa=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),za=(0,m.wrapBrick)("ai-portal.icon-button");var Da=i(57372);const Ua=async(e,t)=>(await Da.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data,Fa=(0,h.forwardRef)(Ya);function Ya(e,t){let{activeId:i,actions:a,urlTemplate:n,onActionClick:s,onHistoryClick:r}=e;const o=(0,h.useRef)(null),[l,c]=(0,h.useState)(null),[d,u]=(0,h.useState)(),[m,g]=(0,h.useState)();(0,h.useEffect)((()=>{Promise.all([Ua({next_token:m},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;c((e=>[...null!=e?e:[],...t.data])),u(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[m]);const b=(0,h.useMemo)((()=>{const e=new Map,t=Pt()(),i=t.clone().startOf("day"),a=i.clone().subtract(1,"day"),n=i.clone().subtract(7,"days"),s=i.clone().subtract(30,"days"),r=+i/1e3,o=+a/1e3,c=+n/1e3,d=+s/1e3,h=+t.clone().startOf("year")/1e3;for(const t of null!=l?l:[]){let i;i=t.startTime>=r?_a(Ra.TODAY):t.startTime>=o?_a(Ra.YESTERDAY):t.startTime>=c?_a(Ra.PREVIOUS_7_DAYS):t.startTime>=d?_a(Ra.PREVIOUS_30_DAYS):t.startTime>=h?Pt()(1e3*t.startTime).format("MMMM"):Pt()(1e3*t.startTime).format("YYYY");let a=e.get(i);a||e.set(i,a={title:i,items:[]}),a.items.push(t)}return[...e.values()]}),[l]),[k,A]=(0,h.useState)(null),x=(0,h.useRef)(null);(0,h.useEffect)((()=>{const e=x.current,t=o.current;if(!e||!d||!t)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&g(d)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[d]);const w=(0,h.useRef)(0),v=(0,h.useCallback)((async()=>{try{const e=++w.current,t=await Ua({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==w.current)return;c((e=>{const i=null!=e?e:[],a=t.data,n=new Set(a.map((e=>e.id))),s=new Map(a.map((e=>[e.id,e])));let r=!1,o=!1,l=!0;for(const e of i){const t=s.get(e.id);if(!t)break;if(r=!0,o=l&&t!==a[0]||!(0,$e.isEqual)(t,e),o)break;l=!1}return r?o?[...a,...i.filter((e=>!n.has(e.id)))]:e:(u(t.next_token),a)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,h.useImperativeHandle)(t,(()=>({pull:v})),[v]),l?p().createElement("div",{className:"history",ref:o},p().createElement("ul",null,b.map((e=>p().createElement("li",{key:e.title,className:"group"},p().createElement("div",{className:"group-title"},e.title),p().createElement("ul",{className:"items"},e.items.map((e=>{return p().createElement("li",{key:e.id},p().createElement(Ia,(0,Ii.A)({className:Gt()("item",{"actions-active":e.id===k,active:e.id===i}),onClick:r},n?{url:(t=n,o=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,$e.get)(o,t))))}:null),p().createElement("div",{className:"item-title",title:e.title},e.title),p().createElement(Oa,{className:"actions",actions:a,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{A(t.detail?e.id:null)}}),!Xt.QB.includes(e.state)&&p().createElement("div",{className:"working"})));var t,o}))))))),d&&p().createElement("div",{className:"load-more",ref:x},p().createElement(Wa,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):p().createElement("div",{className:"history"},p().createElement("div",{className:"loading"},p().createElement(Wa,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}var La;let Ba,Pa,Ha,Ga,ja,qa,Ja,Ka,$a,Qa,Xa,Za,en,tn,an,nn,sn,rn,on,ln,cn,dn,hn,pn,un,mn;(0,g.initializeI18n)(Na,Ma);const gn={lib:"easyops",icon:"sidebar"},{defineElement:bn,property:kn,event:An,method:xn}=(0,u.createDecorators)(),wn=(0,h.forwardRef)(Dn);let vn;var fn=new WeakMap,En=new WeakMap,yn=new WeakMap,Sn=new WeakMap,Rn=new WeakMap,Nn=new WeakMap,Mn=new WeakMap,_n=new WeakMap,Tn=new WeakMap,Wn=new WeakSet,In=new WeakMap,Cn=new WeakMap,Vn=new WeakMap,On=new WeakMap;class zn extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Wn),(0,s.A)(this,fn,(Ba(this),Ha(this))),(0,s.A)(this,En,(Ga(this),ja(this))),(0,s.A)(this,yn,(qa(this),Ja(this))),(0,s.A)(this,Sn,(Ka(this),$a(this))),(0,s.A)(this,Rn,(Qa(this),Xa(this))),(0,s.A)(this,Nn,(Za(this),en(this))),(0,s.A)(this,Mn,(tn(this),an(this))),(0,s.A)(this,_n,(nn(this),sn(this))),(0,s.A)(this,Tn,(rn(this),on(this))),(0,s.A)(this,In,(dn(this),()=>{(0,o.A)(Wn,this,ln).emit()})),(0,s.A)(this,Cn,hn(this)),(0,s.A)(this,Vn,(mn(this),e=>{(0,o.A)(Wn,this,pn).emit(e)})),(0,s.A)(this,On,(0,h.createRef)())}get userInstanceId(){return(0,c.A)(fn,this)}set userInstanceId(e){(0,l.A)(fn,this,e)}get behavior(){return(0,c.A)(En,this)}set behavior(e){(0,l.A)(En,this,e)}get logoUrl(){return(0,c.A)(yn,this)}set logoUrl(e){(0,l.A)(yn,this,e)}get newChatUrl(){return(0,c.A)(Sn,this)}set newChatUrl(e){(0,l.A)(Sn,this,e)}get historyActiveId(){return(0,c.A)(Rn,this)}set historyActiveId(e){(0,l.A)(Rn,this,e)}get historyUrlTemplate(){return(0,c.A)(Nn,this)}set historyUrlTemplate(e){(0,l.A)(Nn,this,e)}get historyActions(){return(0,c.A)(Mn,this)}set historyActions(e){(0,l.A)(Mn,this,e)}get links(){return(0,c.A)(_n,this)}set links(e){(0,l.A)(_n,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(On,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(On,this).current)||void 0===e||e.close()}render(){return p().createElement(wn,{ref:(0,c.A)(On,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,links:this.links,onLogout:(0,c.A)(In,this),onActionClick:(0,c.A)(Vn,this)})}}function Dn(e,t){let{userInstanceId:i,behavior:a,logoUrl:n,newChatUrl:s,historyActiveId:r,historyUrlTemplate:o,historyActions:l,links:c,onLogout:d,onActionClick:u}=e;const[m,b]=(0,h.useState)("drawer"===a),k=(0,h.useCallback)((()=>{b(!0)}),[]),A=(0,h.useCallback)((()=>{b(!1)}),[]);(0,h.useEffect)((()=>{"drawer"===a&&b(!0)}),[a]);const x=(0,h.useCallback)((()=>{b(!0)}),[]),w=(0,h.useCallback)((()=>{"drawer"===a&&b(!0)}),[a]),v=(0,h.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:_a(Ra.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:_a(Ra.SWITCH_LANGUAGE)}]),[]),f=(0,h.useRef)(null);return(0,h.useImperativeHandle)(t,(()=>({close:()=>{b(!0)},pull:()=>{var e;null===(e=f.current)||void 0===e||e.pull()}})),[]),p().createElement("div",{className:Gt()("container",{collapsed:m})},"drawer"===a&&!m&&p().createElement("div",{className:"mask",onClick:x}),p().createElement("div",{className:"alternative"},p().createElement(za,{icon:gn,variant:"light",onClick:A}),p().createElement(Ia,{className:"new-chat",url:s},p().createElement(Wa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),_a(Ra.NEW_CHAT))),p().createElement("div",{className:"sidebar"},p().createElement("div",{className:"logo-bar"},p().createElement(Ia,{url:n,className:"logo-link"},p().createElement("img",{className:"logo",alt:"Elevo",src:ka,width:95,height:28})),p().createElement(za,{icon:gn,variant:"light",onClick:k})),p().createElement(Ia,{className:"new-chat",url:s},p().createElement(Wa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),_a(Ra.NEW_CHAT)),null!=c&&c.length?p().createElement("div",{className:"links"},c.map(((e,t)=>p().createElement(Ia,{className:"link",key:t,url:e.url},p().createElement(Wa,(0,Ii.A)({className:"icon"},e.icon)),p().createElement("span",{className:"title"},e.title))))):null,p().createElement(Fa,{ref:f,activeId:r,urlTemplate:o,actions:l,onActionClick:u,onHistoryClick:w}),p().createElement("div",{className:"footer"},p().createElement(Ca,{className:"dropdown",actions:v,onActionClick:async e=>{"logout"===e.detail.key?d():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,Sa.getHistory)().reload())}},p().createElement("button",{className:"account"},p().createElement(Va,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}La=zn,({e:[Ha,Ga,ja,qa,Ja,Ka,$a,Qa,Xa,Za,en,tn,an,nn,sn,rn,on,ln,cn,dn,hn,pn,un,mn,Ba],c:[vn,Pa]}=(0,d.A)(La,[bn("ai-portal.elevo-sidebar",{styleTexts:[Ta.A]})],[[kn(),1,"userInstanceId"],[kn(),1,"behavior"],[kn(),1,"logoUrl"],[kn(),1,"newChatUrl"],[kn(),1,"historyActiveId"],[kn(),1,"historyUrlTemplate"],[kn({attribute:!1}),1,"historyActions"],[kn({attribute:!1}),1,"links"],[An({type:"logout"}),1,"logout",e=>(0,c.A)(Tn,e),(e,t)=>(0,l.A)(Tn,e,t)],[An({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Cn,e),(e,t)=>(0,l.A)(Cn,e,t)],[xn(),2,"pullHistory"],[xn(),2,"close"]],0,(e=>On.has((0,r.A)(e))),m.ReactNextElement)),Pa();var Un,Fn=i(47338);let Yn,Ln,Bn,Pn,Hn,Gn,jn,qn,Jn;const Kn=(0,m.wrapBrick)("eo-icon"),$n=(0,m.wrapBrick)("eo-tooltip"),{defineElement:Qn,property:Xn}=(0,u.createDecorators)();let Zn;var es=new WeakMap,ts=new WeakMap,is=new WeakMap,as=new WeakMap;class ns extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,es,Ln(this)),(0,s.A)(this,ts,(Bn(this),Pn(this))),(0,s.A)(this,is,(Hn(this),Gn(this))),(0,s.A)(this,as,(jn(this),qn(this))),Jn(this)}get icon(){return(0,c.A)(es,this)}set icon(e){(0,l.A)(es,this,e)}get tooltip(){return(0,c.A)(ts,this)}set tooltip(e){(0,l.A)(ts,this,e)}get disabled(){return(0,c.A)(is,this)}set disabled(e){(0,l.A)(is,this,e)}get variant(){return(0,c.A)(as,this)}set variant(e){(0,l.A)(as,this,e)}render(){return p().createElement(ss,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function ss(e){let{icon:t,tooltip:i,disabled:a}=e;const n=p().createElement("button",{disabled:a},p().createElement(Kn,t));return i?p().createElement($n,{content:i},n):n}Un=ns,({e:[Ln,Bn,Pn,Hn,Gn,jn,qn,Jn],c:[Zn,Yn]}=(0,d.A)(Un,[Qn("ai-portal.icon-button",{styleTexts:[Fn.A]})],[[Xn({attribute:!1}),1,"icon"],[Xn(),1,"tooltip"],[Xn({type:Boolean}),1,"disabled"],[Xn({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),Yn();let rs=function(e){return e.ALL="ALL",e}({});const os="bricks/ai-portal/show-cases",ls={en:{[rs.ALL]:"All"},zh:{[rs.ALL]:"全部"}},cs=g.i18n.getFixedT(null,os);var ds,hs=i(42873);let ps,us,ms,gs,bs;(0,g.initializeI18n)(os,ls);const ks=(0,m.wrapBrick)("eo-link"),{defineElement:As,property:xs}=(0,u.createDecorators)();let ws;var vs=new WeakMap,fs=new WeakMap;class Es extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,vs,us(this)),(0,s.A)(this,fs,(ms(this),gs(this))),bs(this)}get list(){return(0,c.A)(vs,this)}set list(e){(0,l.A)(vs,this,e)}get taskUrlTemplate(){return(0,c.A)(fs,this)}set taskUrlTemplate(e){(0,l.A)(fs,this,e)}render(){return p().createElement(ys,{list:this.list,taskUrlTemplate:this.taskUrlTemplate})}}function ys(e){let{list:t,taskUrlTemplate:i}=e;const a=(0,h.useMemo)((()=>[null,...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[n,s]=(0,h.useState)(null),r=(0,h.useMemo)((()=>n?null==t?void 0:t.filter((e=>e.scenario===n)):t),[n,t]);return null!=t&&t.length?p().createElement(p().Fragment,null,p().createElement("ul",{className:"nav"},null==a?void 0:a.map((e=>p().createElement("li",{key:e,className:"item"},p().createElement("a",{className:Gt()({active:n===e}),onClick:()=>s(e)},null===e?cs(rs.ALL):e))))),p().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>{return p().createElement("li",{key:e.taskId,className:"item"},p().createElement(ks,{className:"link",url:(t=i,a=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,$e.get)(a,t))))},p().createElement("span",{className:Gt()("placeholder",e.thumbUrl?"thumbnail":"summary")},e.thumbUrl?p().createElement("span",{style:{backgroundImage:`url(${(0,Sa.getBasePath)()}${e.thumbUrl})`}}):p().createElement("span",{className:"summary-1"},p().createElement("span",{className:"summary-2"},p().createElement("span",null,e.summary)))),p().createElement("span",{className:"title"},p().createElement("span",null,e.title))));var t,a})))):null}ds=Es,({e:[us,ms,gs,bs],c:[ws,ps]}=(0,d.A)(ds,[As("ai-portal.show-cases",{styleTexts:[hs.A]})],[[xs({attribute:!1}),1,"list"],[xs(),1,"taskUrlTemplate"]],0,void 0,m.ReactNextElement)),ps();let Ss=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const Rs="bricks/ai-portal/mcp-tools",Ns={en:{[Ss.MCP_HUB]:"MCP Hub",[Ss.ALL]:"All",[Ss.SERVER_cmdb]:"CMDB",[Ss.SERVER_cmdb_product_helper]:"CMDB",[Ss.SERVER_alert]:"Alert",[Ss.SERVER_web_builder]:"View",[Ss.SERVER_web_builder2]:"View",[Ss.SERVER_host_troubleshooting]:"Host Troubleshooting",[Ss.SERVER_system_inspection]:"System Inspection",[Ss.SERVER_grafana]:"Grafana",[Ss.SERVER_kubernetes]:"Kubernetes",[Ss.SERVER_llm]:"LLM"},zh:{[Ss.MCP_HUB]:"MCP 中心",[Ss.ALL]:"全部",[Ss.SERVER_cmdb]:"CMDB",[Ss.SERVER_cmdb_product_helper]:"CMDB",[Ss.SERVER_alert]:"告警",[Ss.SERVER_web_builder]:"视图",[Ss.SERVER_web_builder2]:"视图",[Ss.SERVER_host_troubleshooting]:"主机故障排查",[Ss.SERVER_system_inspection]:"系统巡检",[Ss.SERVER_grafana]:"Grafana",[Ss.SERVER_kubernetes]:"Kubernetes",[Ss.SERVER_llm]:"大模型"}},Ms=g.i18n.getFixedT(null,Rs);var _s,Ts=i(31748);let Ws,Is,Cs;(0,g.initializeI18n)(Rs,Ns);const Vs={lib:"antd",icon:"tool"},Os=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),zs=(0,m.wrapBrick)("eo-icon"),{defineElement:Ds,property:Us}=(0,u.createDecorators)();let Fs;var Ys=new WeakMap;class Ls extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ys,Is(this)),Cs(this)}get list(){return(0,c.A)(Ys,this)}set list(e){(0,l.A)(Ys,this,e)}render(){return p().createElement(Bs,{list:this.list})}}function Bs(e){let{list:t}=e;const[i,a]=(0,h.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const a=Ms(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let n=e.get(a);n||e.set(a,n=[]),n.push(t);const s=[...Os.entries()].find((e=>{let[i,{servers:a}]=e;return a.includes(t.server.id)})),r=s?s[0]:"其他";let o=i.get(r);o||i.set(r,o=[]),o.push(a)}));const a=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[n]=t;const s=a.indexOf(i),r=a.indexOf(n);return(s<0?a.length:s)-(r<0?a.length:r)}))),i]}),[t]),n=(0,h.useMemo)((()=>{const e=[...Os.keys()],t=[...a.keys()];return t.sort(((t,i)=>{const a=e.indexOf(t),n=e.indexOf(i);return(a<0?e.length:a)-(n<0?e.length:n)})),[null,...t]}),[a]),[s,r]=(0,h.useState)(null),o=(0,h.useMemo)((()=>{const e=[...i];if(null===s)return e;const t=a.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,i,a]);return p().createElement("div",{className:"container"},p().createElement("h1",null,Ms(Ss.MCP_HUB)),p().createElement("ul",{className:"nav"},null==n?void 0:n.map((e=>p().createElement("li",{key:e,className:"item"},p().createElement("a",{className:Gt()({active:s===e}),onClick:()=>r(e)},null===e?Ms(Ss.ALL):e))))),p().createElement("ul",{className:"groups"},null==o?void 0:o.map((e=>{let[t,i]=e;return p().createElement("li",{key:t,className:"group"},p().createElement("h2",null,t),p().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return p().createElement("li",{key:t,className:"item"},p().createElement("div",{className:"heading"},p().createElement(zs,(0,Ii.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:Vs,{fallback:Vs})),p().createElement("div",{className:"title"},e.title)),p().createElement("div",{className:"description"},e.description))}))))}))))}_s=Ls,({e:[Is,Cs],c:[Fs,Ws]}=(0,d.A)(_s,[Ds("ai-portal.mcp-tools",{styleTexts:[Ts.A]})],[[Us({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),Ws();var Ps,Hs=i(99126),Gs=i(92914),js=i(7863),qs=i(80413),Js=i(22025),Ks=i(44394),$s=i(13183),Qs=i(30578),Xs=i(31918),Zs=i(92449),er=i(85011),tr=i(65023),ir=i(17911),ar=i(95491),nr=i(11303);let sr,rr,or,lr,cr,dr,hr,pr,ur,mr,gr,br,kr,Ar,xr,wr,vr,fr,Er,yr,Sr,Rr,Nr,Mr,_r,Tr,Wr,Ir,Cr,Vr,Or,zr,Dr,Ur,Fr,Yr,Lr,Br;(0,g.initializeI18n)(Gs.NS,Gs.I);const Pr={lib:"easyops",icon:"share"},{defineElement:Hr,property:Gr,event:jr,method:qr}=(0,u.createDecorators)(),Jr=(0,h.forwardRef)(Ao);let Kr;var $r=new WeakMap,Qr=new WeakMap,Xr=new WeakMap,Zr=new WeakMap,eo=new WeakMap,to=new WeakMap,io=new WeakMap,ao=new WeakMap,no=new WeakMap,so=new WeakSet,ro=new WeakMap,oo=new WeakMap,lo=new WeakMap,co=new WeakMap,ho=new WeakMap,po=new WeakMap,uo=new WeakMap,mo=new WeakMap,go=new WeakMap,bo=new WeakMap;class ko extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,so),(0,s.A)(this,$r,(sr(this),or(this))),(0,s.A)(this,Qr,(lr(this),cr(this))),(0,s.A)(this,Xr,(dr(this),hr(this))),(0,s.A)(this,Zr,(pr(this),ur(this))),(0,s.A)(this,eo,(mr(this),gr(this))),(0,s.A)(this,to,(br(this),kr(this))),(0,s.A)(this,io,(Ar(this),xr(this))),(0,s.A)(this,ao,(wr(this),vr(this))),(0,s.A)(this,no,(fr(this),Er(this))),(0,s.A)(this,ro,(Rr(this),()=>{(0,o.A)(so,this,yr).emit()})),(0,s.A)(this,oo,Nr(this)),(0,s.A)(this,lo,(Tr(this),()=>{(0,o.A)(so,this,Mr).emit()})),(0,s.A)(this,co,Wr(this)),(0,s.A)(this,ho,(Vr(this),e=>{(0,o.A)(so,this,Ir).emit(e)})),(0,s.A)(this,po,Or(this)),(0,s.A)(this,uo,(Ur(this),e=>{(0,o.A)(so,this,zr).emit(e)})),(0,s.A)(this,mo,Fr(this)),(0,s.A)(this,go,(Br(this),()=>{(0,o.A)(so,this,Yr).emit("canvas")})),(0,s.A)(this,bo,(0,h.createRef)())}get taskId(){return(0,c.A)($r,this)}set taskId(e){(0,l.A)($r,this,e)}get replay(){return(0,c.A)(Qr,this)}set replay(e){(0,l.A)(Qr,this,e)}get replayDelay(){return(0,c.A)(Xr,this)}set replayDelay(e){(0,l.A)(Xr,this,e)}get supports(){return(0,c.A)(Zr,this)}set supports(e){(0,l.A)(Zr,this,e)}get showFeedback(){return(0,c.A)(eo,this)}set showFeedback(e){(0,l.A)(eo,this,e)}get showFeedbackOnView(){return(0,c.A)(to,this)}set showFeedbackOnView(e){(0,l.A)(to,this,e)}get showUiSwitch(){return(0,c.A)(io,this)}set showUiSwitch(e){(0,l.A)(io,this,e)}get hideMermaid(){return(0,c.A)(ao,this)}set hideMermaid(e){(0,l.A)(ao,this,e)}resumed(){var e;null===(e=(0,c.A)(bo,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(bo,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(bo,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(bo,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return p().createElement(Jr,{taskId:this.taskId,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showFeedback:this.showFeedback,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(ro,this),onTerminate:(0,c.A)(lo,this),onSubmitFeedback:(0,c.A)(ho,this),onSwitchToCanvas:(0,c.A)(go,this),onFeedbackOnView:(0,c.A)(uo,this)})}}function Ao(e,t){var i;let{taskId:a,replay:n,replayDelay:s,supports:r,showFeedback:o,showFeedbackOnView:l,showUiSwitch:c,onShare:d,onTerminate:u,onSubmitFeedback:m,onSwitchToCanvas:g,onFeedbackOnView:b}=e;const{task:k,jobs:A,error:x,humanInputRef:w,resumedRef:v,skipToResults:f,watchAgain:E}=(0,js.S)(a,n,s),y=null!==(i=null==k?void 0:k.title)&&void 0!==i?i:"",S=null==k?void 0:k.state,R=Xt.QB.includes(S),{messages:N,inputRequiredJobId:M,lastToolCallJobId:_}=(0,qs.e)(k,A),T=(0,h.useMemo)((()=>null==A?void 0:A.flatMap((e=>e.generatedView?{id:e.id,view:e.generatedView}:[]))),[A]),[W,I]=(0,h.useState)(!1),[C,V]=(0,h.useState)(!1),[O,z]=(0,h.useState)(!!o);(0,h.useEffect)((()=>{z(!!o)}),[o]);const[D,U]=(0,h.useState)(),F=(0,h.useCallback)((e=>{I(!0),m(e)}),[m]);(0,h.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.call(v)},feedbackSubmitDone:()=>{V(!0),setTimeout((()=>{z(!1)}),3e3)},feedbackSubmitFailed:()=>{I(!1)},feedbackOnViewDone:e=>{U((t=>{const i=new Set(t);return i.add(e),i}))}})),[v]);const[Y,L]=(0,h.useState)(null),[B,P]=(0,h.useState)(null),[H,G]=(0,h.useState)(!1),j=(0,h.useRef)(!1),q=!!k;(0,h.useEffect)((()=>{if(q){const e=setTimeout((()=>{j.current=!0}),1e3);return()=>{clearTimeout(e)}}}),[q]),(0,h.useEffect)((()=>{j.current&&_&&!H&&P(_)}),[_,H]),(0,h.useEffect)((()=>{(0,Sa.getRuntime)().applyPageTitle(y)}),[y]),(0,h.useEffect)((()=>{x&&(0,Sa.handleHttpError)(x)}),[x]);const J=(0,h.useCallback)(((e,t)=>{var i;null===(i=w.current)||void 0===i||i.call(w,e,t)}),[w]),K=(0,h.useMemo)((()=>({humanInput:J,onShare:d,onTerminate:u,supports:r,activeExpandedViewJobId:Y,setActiveExpandedViewJobId:L,activeToolCallJobId:B,setActiveToolCallJobId:P,submittingFeedback:W,submittedFeedback:C,onSubmitFeedback:F,setShowFeedback:z,showFeedbackOnView:l,onFeedbackOnView:b,feedbackDoneViews:D})),[J,d,u,r,Y,B,W,C,F,l,b,D]),$=(0,h.useMemo)((()=>({lastToolCallJobId:_,setUserClosedAside:G})),[_]),Q=(0,h.useRef)(!1),X=(0,h.useRef)(!1),Z=(0,h.useRef)(null),[ee,te]=(0,h.useState)(!1);(0,h.useEffect)((()=>{const e=Z.current,t=null==e?void 0:e.firstElementChild;if(X.current||!e||!t)return;const i=()=>{te(e.scrollTop+e.clientHeight+24<e.scrollHeight),Q.current&&(X.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let a;e.addEventListener("scroll",i);const n=new Hs.A((()=>{X.current||(Q.current=!1,e.scrollTo({top:t.scrollHeight,behavior:"instant"}),clearTimeout(a),a=setTimeout((()=>{Q.current=!0}),100))}));return n.observe(t),()=>{n.disconnect(),e.removeEventListener("scroll",i)}}),[q]);const ie=(0,h.useCallback)((()=>{const e=Z.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[]),ae=(0,h.useMemo)((()=>B?null==A?void 0:A.find((e=>e.id===B)):null),[B,A]);return p().createElement(Xs.j.Provider,{value:K},p().createElement(ar.W.Provider,{value:$},p().createElement("div",{className:Js.A.container},p().createElement("div",{className:Js.A.header},p().createElement("div",{className:Js.A.left}),p().createElement("h1",null,y),p().createElement("div",{className:Js.A.right},c&&p().createElement(Ks.Py,{icon:Xt.Rq,variant:"mini",style:{transform:"rotate(90deg)"},onClick:g}),p().createElement(Ks.Py,{icon:Pr,variant:"mini",onClick:d}))),q?p().createElement(p().Fragment,null,p().createElement("div",{className:Js.A.main,ref:Z},p().createElement("div",{className:Js.A.narrow},N.map(((e,t,i)=>p().createElement("div",{className:Js.A.message,key:t},"user"===e.role?p().createElement($s.R,{content:e.content}):p().createElement(Qs.G,{jobs:e.jobs,taskState:S,isLatest:t===i.length-1})))),O&&"completed"===S&&p().createElement(nr.k,{className:Js.A.feedback}))),p().createElement("div",{className:Js.A["scroll-down"],hidden:!ee,onClick:ie},p().createElement(Ks.Bj,{lib:"antd",icon:"down"}))):p().createElement("div",{className:Js.A["loading-icon"]},p().createElement(Ks.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),n||null!=r&&r.chat?p().createElement("div",{className:Js.A.footer},p().createElement("div",{className:Js.A.narrow},n?p().createElement(tr.b,{taskDone:R,skipToResults:f,watchAgain:E}):p().createElement(Zs.s,{state:S,canChat:R&&!!M,inputRequiredJobId:M}))):null),p().createElement("div",{className:Gt()(Js.A.aside,{[Js.A.expanded]:!!B})},B&&p().createElement(ir.n,{job:ae})),Y&&p().createElement(er.f,{views:T})))}Ps=ko,({e:[or,lr,cr,dr,hr,pr,ur,mr,gr,br,kr,Ar,xr,wr,vr,fr,Er,yr,Sr,Rr,Nr,Mr,_r,Tr,Wr,Ir,Cr,Vr,Or,zr,Dr,Ur,Fr,Yr,Lr,Br,sr],c:[Kr,rr]}=(0,d.A)(Ps,[Hr("ai-portal.chat-stream",{shadowOptions:!1})],[[Gr(),1,"taskId"],[Gr({type:Boolean}),1,"replay"],[Gr({type:Number}),1,"replayDelay"],[Gr({attribute:!1}),1,"supports"],[Gr({type:Boolean}),1,"showFeedback"],[Gr({type:Boolean}),1,"showFeedbackOnView"],[Gr({type:Boolean}),1,"showUiSwitch"],[Gr({type:Boolean,render:!1}),1,"hideMermaid"],[jr({type:"share"}),1,"shareEvent",e=>(0,c.A)(no,e),(e,t)=>(0,l.A)(no,e,t)],[jr({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(oo,e),(e,t)=>(0,l.A)(oo,e,t)],[jr({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(co,e),(e,t)=>(0,l.A)(co,e,t)],[jr({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(po,e),(e,t)=>(0,l.A)(po,e,t)],[jr({type:"ui.switch"}),1,"switch",e=>(0,c.A)(mo,e),(e,t)=>(0,l.A)(mo,e,t)],[qr(),2,"resumed"],[qr(),2,"feedbackSubmitDone"],[qr(),2,"feedbackSubmitFailed"],[qr(),2,"feedbackOnViewDone"]],0,(e=>bo.has((0,r.A)(e))),m.ReactNextElement)),rr();const xo=i.p+"images/8c2cf79e.png",wo=i.p+"images/0cbe181e.png",vo=i.p+"images/87c8a33b.png",fo=i.p+"images/f542faa9.png",Eo=i.p+"images/8e5c445f.png",yo=i.p+"images/dd5fc700.png",So=i.p+"images/4215203f.png",Ro=i.p+"images/5e54ffc5.png";let No=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e}({});const Mo="bricks/ai-portal/ai-employees",_o=g.i18n.getFixedT(null,Mo);var To,Wo=i(98036);let Io,Co,Vo,Oo,zo;(0,g.initializeI18n)(Mo,{en:{AI_EMPLOYEES:"AI Employees"},zh:{AI_EMPLOYEES:"Ai 数字人"}});const Do=[xo,wo,vo,fo,Eo,yo,So,Ro],{defineElement:Uo,property:Fo}=(0,u.createDecorators)();let Yo;var Lo=new WeakMap,Bo=new WeakMap;class Po extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Lo,Co(this)),(0,s.A)(this,Bo,(Vo(this),Oo(this))),zo(this)}get list(){return(0,c.A)(Lo,this)}set list(e){(0,l.A)(Lo,this,e)}get industries(){return(0,c.A)(Bo,this)}set industries(e){(0,l.A)(Bo,this,e)}render(){return p().createElement(Ho,{list:this.list,industries:this.industries})}}function Ho(e){let{list:t,industries:i}=e;const a=(0,h.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[n,s]=(0,h.useState)(a[0]),r=(0,h.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==n)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[n,t]),o=a.indexOf(n);return p().createElement("div",{className:"container"},p().createElement("h1",null,_o(No.AI_EMPLOYEES)),p().createElement("ul",{className:"nav"},a.map((e=>p().createElement("li",{key:e,className:"item"},p().createElement("a",{className:Gt()({active:e===n}),onClick:()=>s(e)},e))))),p().createElement("ul",{className:"groups"},r.map(((e,t)=>{let[i,a]=e;return p().createElement("li",{key:i,className:"group"},p().createElement("h2",null,i),p().createElement("ul",{className:"list"},a.map(((e,i)=>p().createElement("li",{key:i,className:"item"},p().createElement("div",{className:"heading"},p().createElement("div",{className:"avatar"},p().createElement("img",{src:Do[(i+t+o)%Do.length]})),p().createElement("div",{className:"title"},e.name)),p().createElement("div",{className:"description"},e.description))))))}))))}To=Po,({e:[Co,Vo,Oo,zo],c:[Yo,Io]}=(0,d.A)(To,[Uo("ai-portal.ai-employees",{styleTexts:[Wo.A]})],[[Fo({attribute:!1}),1,"list"],[Fo({attribute:!1}),1,"industries"]],0,void 0,m.ReactNextElement)),Io();let Go=function(e){return e.AGENTS="AGENTS",e}({});const jo="bricks/ai-portal/ai-agents",qo=g.i18n.getFixedT(null,jo);var Jo,Ko=i(83059);let $o,Qo,Xo;const Zo={lib:"antd",icon:"tool"};(0,g.initializeI18n)(jo,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const el=(0,m.wrapBrick)("eo-icon"),{defineElement:tl,property:il}=(0,u.createDecorators)();let al;var nl=new WeakMap;class sl extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,nl,Qo(this)),Xo(this)}get list(){return(0,c.A)(nl,this)}set list(e){(0,l.A)(nl,this,e)}render(){return p().createElement(rl,{list:this.list})}}function rl(e){let{list:t}=e;return p().createElement("div",{className:"container"},p().createElement("h1",null,qo(Go.AGENTS)),p().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var i,a;return p().createElement("li",{key:t,className:"item"},p().createElement("div",{className:"heading"},p().createElement("div",{className:"icon"},p().createElement(el,(0,Ii.A)({},null!==(i=e.icon)&&void 0!==i?i:Zo,{fallback:Zo}))),p().createElement("div",{className:"title"},e.name)),p().createElement("div",{className:"tags"},null===(a=e.tags)||void 0===a?void 0:a.map(((e,t)=>p().createElement("span",{key:t,className:"tag"},e)))),p().createElement("div",{className:"description"},e.description))}))))}Jo=sl,({e:[Qo,Xo],c:[al,$o]}=(0,d.A)(Jo,[tl("ai-portal.ai-agents",{styleTexts:[Ko.A]})],[[il({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),$o();var ol=i(94558);let ll=null;customElements.define("ai-portal.save-request-store",(0,ol.createProviderClass)((function(e){ll=e}))),customElements.define("ai-portal.load-request-store",(0,ol.createProviderClass)((function(){const e=ll;return ll=null,e}))),customElements.define("ai-portal.clear-request-store",(0,ol.createProviderClass)((function(){ll=null})))},15733:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},21411:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.loading{display:flex;justify-content:center;padding:8px}.group + .group{margin-top:15px}.group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.item{display:block}.item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.item::part(link):hover{background:rgba(0,0,0,0.04)}.item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions{cursor:auto}.item:not(:hover):not(.active) .actions{display:none}.working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.item:hover .working,\n.item.active .working{display:none}.load-more{display:flex;justify-content:center;align-items:center;height:36px}",""]);const o=r.toString()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:inline-block;padding:3px 0}:host([hidden]){display:none}img{display:block}",""]);const o=r.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${h});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px}h2{font-size:16px;line-height:22px}.nav,\n.groups,\n.list{list-style:none;margin:0;padding:0}.nav{display:flex;font-size:16px;margin-top:17px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const p=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/6336f999.png"},42873:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(89518),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:flex;flex-direction:column;align-items:center;max-width:1200px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.nav,\n.cases{list-style:none;padding:0;margin:0}.nav{display:flex;font-size:16px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.cases{display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(276px,1fr));gap:24px;margin-top:2em}.link{background:#fefefe;border:1px solid #e8e9ec;border-radius:12px;overflow:hidden;display:block}.link::part(link){display:flex;gap:0;flex-direction:column;height:218px}.title{width:100%;height:76px;padding:16px 16px 15px;color:#262626;border-top:1px solid #e8e9ec;font-weight:500;font-size:15px;line-height:22px}.title span{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.placeholder{width:100%;height:142px;background:linear-gradient(308deg,#dee9fc 0%,#fcfbfd 100%,#fbf9fe 100%);overflow:hidden}.summary{color:rgba(0,0,0,0.65);padding:27px 0 0 24px}.thumbnail span{display:block;width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.link:hover{box-shadow:0px 4px 12px 0px rgba(0,0,0,0.06)}.link:hover .title{color:var(--elevo-color-brand)}.summary-1{display:block;background-image:url(${h});background-size:237px 115px;background-repeat:no-repeat;background-position:0 0;padding:10px 0 0 10px}.summary-2{display:block;background:linear-gradient(90deg,#ffffff 0%,#e4ecfc 100%);padding:12px 15px 5px 15px;border-top-left-radius:12px}.summary-2 span{display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;color:#525971;line-height:22px;height:88px}`,""]);const p=d.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(91107),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background-color:#e1e3ec;background-image:url(${h});background-size:694px 144px;background-position:top left;background-repeat:no-repeat;box-shadow:inset 0px 2px 5px 1px rgba(42,46,59,0.1);border-radius:20px;padding:12px}.container{position:relative}textarea{display:block;width:100%;padding:10px 16px 52px;color:var(--antd-input-color);background:rgba(255,255,255,0.8);border-radius:14px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font-size:14px;line-height:22px;height:130px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{position:absolute;bottom:14px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}.suggestions{margin-top:19px}.heading{display:flex;align-items:center;padding:0 5px;margin-bottom:8px}.icon{margin-right:5px}.carousel{overflow:hidden}.carousel + .carousel{margin-top:7px}.list{display:flex;width:max-content;list-style:none;margin:0;padding:0;font-size:12px}.item{background:rgba(255,255,255,0.4);border-radius:12px;border:1px solid #dcdee6;padding:12px;max-width:330px;cursor:pointer}.item:hover{background:rgba(255,255,255,0.5);border:1px solid rgba(37,64,255,0.3)}.list > li + li{margin-left:7px}.title{margin-bottom:4px}.content{color:rgba(0,0,0,0.45);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tooltip{display:block}`,""]);const p=d.toString()},47338:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}',""]);const o=r.toString()},61408:(e,t,i)=>{i.d(t,{A:()=>o});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:261px;height:100%;background:#f6f7f9;border-right:1px solid #e3e5eb;padding:26px 16px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -16px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:261px;height:100%;transition:width 0.3s ease-in-out}.collapsed{width:0;overflow:visible}.collapsed .sidebar{transform:translateX(-100%)}.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 13px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -16px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .loading{display:flex;justify-content:center;padding:8px}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const o=r.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${h});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const p=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${h});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px}.list{list-style:none;margin:0;padding:0;margin-top:30px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const p=d.toString()},89518:(e,t,i)=>{e.exports=i.p+"images/f819b04a.png"},91107:(e,t,i)=>{e.exports=i.p+"images/eef4f2bd.png"},98036:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(n()),h=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${h});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px}h2{font-size:16px;line-height:22px}.nav,\n.groups,\n.list{list-style:none;margin:0;padding:0}.nav{display:flex;font-size:16px;margin-top:17px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const p=d.toString()}}]);
3
+ //# sourceMappingURL=8928.c3da7b15.js.map