@next-bricks/ai-portal 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +15 -15
- package/dist/chunks/3624.fa6c9a8b.js +2 -0
- package/dist/chunks/3624.fa6c9a8b.js.map +1 -0
- package/dist/chunks/3800.8a37614f.js +2 -0
- package/dist/chunks/3800.8a37614f.js.map +1 -0
- package/dist/chunks/{6175.7bb583eb.js → 6175.18e07f1a.js} +3 -3
- package/dist/chunks/6175.18e07f1a.js.map +1 -0
- package/dist/chunks/{elevo-logo.c20b185a.js → elevo-logo.f5f72599.js} +2 -2
- package/dist/chunks/{elevo-logo.c20b185a.js.map → elevo-logo.f5f72599.js.map} +1 -1
- package/dist/chunks/elevo-sidebar.1761f230.js +3 -0
- package/dist/chunks/elevo-sidebar.1761f230.js.map +1 -0
- package/dist/chunks/main.25b9de22.js +2 -0
- package/dist/chunks/main.25b9de22.js.map +1 -0
- package/dist/examples.json +12 -12
- package/dist/images/e47076cc.png +0 -0
- package/dist/index.80bf5579.js +2 -0
- package/dist/index.80bf5579.js.map +1 -0
- package/dist/manifest.json +118 -118
- package/dist-types/cruise-canvas/utils/jsx-converters/convertFormItem.d.ts +1 -52
- package/dist-types/cruise-canvas/utils/jsx-converters/convertText.d.ts +3 -0
- package/package.json +2 -2
- package/dist/chunks/3624.e880f724.js +0 -2
- package/dist/chunks/3624.e880f724.js.map +0 -1
- package/dist/chunks/3800.3dccb1f9.js +0 -2
- package/dist/chunks/3800.3dccb1f9.js.map +0 -1
- package/dist/chunks/6175.7bb583eb.js.map +0 -1
- package/dist/chunks/elevo-sidebar.21a91aef.js +0 -3
- package/dist/chunks/elevo-sidebar.21a91aef.js.map +0 -1
- package/dist/chunks/main.47abfac1.js +0 -2
- package/dist/chunks/main.47abfac1.js.map +0 -1
- package/dist/images/7385e5f5.png +0 -0
- package/dist/index.73637f83.js +0 -2
- package/dist/index.73637f83.js.map +0 -1
- /package/dist/chunks/{6175.7bb583eb.js.LICENSE.txt → 6175.18e07f1a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{elevo-sidebar.21a91aef.js.LICENSE.txt → elevo-sidebar.1761f230.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 6175.
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[6175],{24:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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()},15733:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},21411:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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()},29476:(e,t,i)=>{var n,a=i(74635),s=i(70918),r=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),u=i(18769),h=i.n(u),p=i(7921),m=i(11280),g=i(23081),b=(i(65168),i(90079)),f=i(53373),v=i.n(f),k=i(99126),A=i(67566),x=i(8324),E=i(69445),w=i(2460),y=i(32464),S=i(58231),R=i(36494),N=i(97642),M=i(92773),_=i(59533),T=i(34999),C=i(27954),I=i(24388),W=i(56938),z=i(25718),D=i(39295),U=i(83888),V=i(16854),L=i(97907),O=i(44394),Y=i(85620),F=i(73349),P=i(62601),B=i(57097),H=i(85011),j=i(54163),J=i(65023),G=i(92449),$=i(62897),q=i(11303),K=i(31918),X=i(48680),Q=i(45462);let Z,ee,te,ie,ne,ae,se,re,oe,le,ce,de,ue,he,pe,me,ge,be,fe,ve,ke,Ae,xe,Ee,we,ye,Se,Re,Ne,Me,_e,Te,Ce,Ie,We,ze,De,Ue,Ve,Le,Oe,Ye,Fe,Pe,Be,He,je,Je;(0,b.initializeI18n)(w.NS,w.I);const{defineElement:Ge,property:$e,event:qe,method:Ke}=(0,p.createDecorators)(),Xe=(0,u.memo)(Nt),Qe=(0,u.forwardRef)(Rt);let Ze;var et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,st=new WeakMap,rt=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,ht=new WeakSet,pt=new WeakMap,mt=new WeakMap,gt=new WeakMap,bt=new WeakMap,ft=new WeakMap,vt=new WeakMap,kt=new WeakMap,At=new WeakMap,xt=new WeakMap,Et=new WeakMap,wt=new WeakMap,yt=new WeakMap;class St extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ht),(0,s.A)(this,et,(Z(this),te(this))),(0,s.A)(this,tt,(ie(this),ne(this))),(0,s.A)(this,it,(ae(this),se(this))),(0,s.A)(this,nt,(re(this),oe(this))),(0,s.A)(this,at,(le(this),ce(this))),(0,s.A)(this,st,(de(this),ue(this))),(0,s.A)(this,rt,(he(this),pe(this))),(0,s.A)(this,ot,(me(this),ge(this))),(0,s.A)(this,lt,(be(this),fe(this))),(0,s.A)(this,ct,(ve(this),ke(this))),(0,s.A)(this,dt,(Ae(this),xe(this))),(0,s.A)(this,ut,(Ee(this),we(this))),(0,s.A)(this,pt,(Re(this),()=>{(0,o.A)(ht,this,ye).emit()})),(0,s.A)(this,mt,Ne(this)),(0,s.A)(this,gt,(Te(this),()=>{(0,o.A)(ht,this,Me).emit()})),(0,s.A)(this,bt,Ce(this)),(0,s.A)(this,ft,(ze(this),()=>{(0,o.A)(ht,this,Ie).emit()})),(0,s.A)(this,vt,De(this)),(0,s.A)(this,kt,(Le(this),()=>{(0,o.A)(ht,this,Ue).emit()})),(0,s.A)(this,At,Oe(this)),(0,s.A)(this,xt,(Pe(this),e=>{(0,o.A)(ht,this,Ye).emit(e)})),(0,s.A)(this,Et,Be(this)),(0,s.A)(this,wt,(Je(this),()=>{(0,o.A)(ht,this,He).emit("chat")})),(0,s.A)(this,yt,(0,u.createRef)())}get taskId(){return(0,c.A)(et,this)}set taskId(e){(0,l.A)(et,this,e)}get task(){return(0,c.A)(tt,this)}set task(e){(0,l.A)(tt,this,e)}get jobs(){return(0,c.A)(it,this)}set jobs(e){(0,l.A)(it,this,e)}get replay(){return(0,c.A)(nt,this)}set replay(e){(0,l.A)(nt,this,e)}get replayDelay(){return(0,c.A)(at,this)}set replayDelay(e){(0,l.A)(at,this,e)}get supports(){return(0,c.A)(st,this)}set supports(e){(0,l.A)(st,this,e)}get showHiddenJobs(){return(0,c.A)(rt,this)}set showHiddenJobs(e){(0,l.A)(rt,this,e)}get showFeedback(){return(0,c.A)(ot,this)}set showFeedback(e){(0,l.A)(ot,this,e)}get showUiSwitch(){return(0,c.A)(lt,this)}set showUiSwitch(e){(0,l.A)(lt,this,e)}get hideMermaid(){return(0,c.A)(ct,this)}set hideMermaid(e){(0,l.A)(ct,this,e)}get showJsxEditor(){return(0,c.A)(dt,this)}set showJsxEditor(e){(0,l.A)(dt,this,e)}resumed(){var e;null===(e=(0,c.A)(yt,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(yt,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(yt,this).current)||void 0===e||e.feedbackSubmitFailed()}render(){return h().createElement(Qe,{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,showJsxEditor:this.showJsxEditor,onShare:(0,c.A)(pt,this),onPause:(0,c.A)(gt,this),onResume:(0,c.A)(ft,this),onCancel:(0,c.A)(kt,this),onSubmitFeedback:(0,c.A)(xt,this),onSwitchToChat:(0,c.A)(wt,this),ref:(0,c.A)(yt,this)})}}function Rt(e,t){var i;let{taskId:n,task:a,jobs:s,replay:r,replayDelay:o,supports:l,showHiddenJobs:c,showFeedback:d,showUiSwitch:p,showJsxEditor:m,onShare:b,onPause:f,onResume:k,onCancel:w,onSubmitFeedback:C,onSwitchToChat:I}=e;const W=(0,u.useRef)(null),{task:z,jobs:D,error:U,humanInputRef:q,resumedRef:X,skipToResults:Z,watchAgain:ee}=(0,M.S)(n,r,o),te=n?z:a,ie=n?D:s,ne=null==te?void 0:te.plan,ae=(0,_.B)(te,ie,{showHiddenJobs:c}),se=null==ae?void 0:ae.nodes,re=null==ae?void 0:ae.edges,oe=null==ae?void 0:ae.nav,le=null==ae?void 0:ae.views,ce=null==ae?void 0:ae.jobLevels,de=null!==(i=null==te?void 0:te.title)&&void 0!==i?i:"",ue=null==te?void 0:te.state,[he,pe]=(0,u.useState)(null),me=(0,u.useMemo)((()=>{if(he){const[e,t]=he.split(":");if("job"===e||"view"===e)return t}return null}),[he]),[ge,be]=(0,u.useState)(!1),[fe,ve]=(0,u.useState)(!1),[ke,Ae]=(0,u.useState)(!!d);(0,u.useEffect)((()=>{Ae(!!d)}),[d]);const xe=(0,u.useCallback)((e=>{be(!0),C(e)}),[C]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.call(X)},feedbackSubmitDone:()=>{ve(!0),setTimeout((()=>{Ae(!1)}),3e3)},feedbackSubmitFailed:()=>{be(!1)}})),[X]);const Ee=(0,u.useRef)(!1);(0,u.useEffect)((()=>{const e=setTimeout((()=>{Ee.current=!0}),3e3);return()=>{clearTimeout(e)}}),[]),(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(de)}),[de]),(0,u.useEffect)((()=>{U&&(0,g.handleHttpError)(U)}),[U]);const we=(0,u.useCallback)(((e,t)=>{var i;null===(i=q.current)||void 0===i||i.call(q,e,t)}),[q]),[ye,Se]=(0,u.useState)(null),Re=(0,u.useCallback)(((e,t)=>{Se((i=>{if(!t){if(!i)return null;const t=new Map(i);return t.delete(e)?t:i}return i?new Map(i).set(e,t):new Map([[e,t]])}))}),[]),{sizeReady:Ne,nodes:Me,edges:_e}=(0,N.g)({rawNodes:se,rawEdges:re,state:ue,sizeMap:ye,showFeedback:ke}),Te=(0,u.useRef)(!1),Ce=(0,u.useRef)(!1),[Ie,We]=(0,u.useState)(!1),{grabbing:ze,transform:De,transformRef:Ue,zoomer:Ve}=(0,S.f)({rootRef:W,zoomable:Ne,scrollable:Ne&&!Ie,pannable:Ne,manualScrolledUpRef:Ce}),Le=(0,u.useRef)(!1),Oe=(0,u.useMemo)((()=>{let e=null;const t=i=>{const n=Ue.current,a="function"==typeof i?i(n):i;if(!a)return;const{transform:s,translateBy:r}=a;let o=(0,A.A)(W.current);var l,c,d,u,h,p;Ee.current&&0!==a.duration&&(Le.current=!0,o=o.transition().duration(null!==(l=a.duration)&&void 0!==l?l:300).ease((e=>e*(2-e))).on("end",(()=>{if(Le.current=!1,e){const i=e;e=null,t(i)}}))),s?Ve.transform(o,new x.uV(null!==(c=s.k)&&void 0!==c?c:n.k,null!==(d=s.x)&&void 0!==d?d:n.x,null!==(u=s.y)&&void 0!==u?u:n.y)):Ve.translateBy(o,null!==(h=r[0])&&void 0!==h?h:0,null!==(p=r[1])&&void 0!==p?p:0)};return i=>{Le.current?e=i:t(i)}}),[Ue,Ve]),{centered:Ye,setCentered:Fe,reCenterRef:Pe}=(0,R.E)({nodes:Me,sizeReady:Ne,zoomer:Ve,rootRef:W,pushZoomTransition:Oe}),Be=L.QB.includes(ue),He=(0,u.useMemo)((()=>new Set(_e.map((e=>e.source)))),[_e]),je=(0,u.useMemo)((()=>{if(!Ne)return null;const e=[];for(const t of Me)He.has(t.id)||e.push(t);return e.length>0?Math.max(...e.map((e=>e.view.y+e.view.height))):null}),[Me,He,Ne]),Je=(0,u.useRef)(null);(0,u.useEffect)((()=>{Je.current=je}),[je]),(0,u.useEffect)((()=>{const e=W.current;!e||null===je||Te.current&&Ce.current||Oe((t=>{const{offsetHeight:i}=e,n=je*t.k+t.y,a=i-V.xX-n;return a<0?{transform:{y:t.y+a},duration:a>-100?100:a<-500?300:200}:null}))}),[je,Oe]),(0,u.useEffect)((()=>{const e=Je.current,t=W.current;if(!t||null===e||Le.current)return;const{offsetHeight:i}=t,n=e*De.k+De.y,a=i-V.xX-n;Te.current=a<0}),[De,Ve]);const Ge=(0,u.useCallback)((()=>{Pe.current=!0,Fe(!1)}),[Pe,Fe]),$e=(0,u.useCallback)((e=>{Ve.scaleTo((0,A.A)(W.current),e)}),[Ve]),qe=(0,u.useMemo)((()=>Ne?(0,E.o)(Me.map((e=>e.view))):null),[Me,Ne]);(0,u.useEffect)((()=>{if(!qe)return;const e=W.current;if(!e)return;const{offsetWidth:t,offsetHeight:i}=e,n=t/De.k,a=i/De.k,s=-(n-20-qe.x),r=n-20+(qe.x+qe.width),o=-(a-20-qe.y),l=a-20+(qe.y+qe.height);Ve.translateExtent([[s,o],[r,l]])}),[Ve,De.k,qe]);const Ke=(0,u.useCallback)((e=>{let{nodeId:t,jobId:i,behavior:n,block:a}=e;const s=W.current,r=Me.filter((e=>{var n;return!(t&&e.id!==t||i&&(null===(n=e.job)||void 0===n?void 0:n.id)!==i)}));if(!s||0===r.length)return;const o=(0,E.o)(r.map((e=>e.view))),{x:l,y:c}=(0,P.D)(o,[s.offsetWidth,s.offsetHeight],[V.RV,V.kq,V.xX,V.bL],Ue.current,a);(l||c)&&Oe({translateBy:[l,c],duration:"instant"===n?0:void 0})}),[Me,Oe,Ue]),Qe=(0,u.useCallback)(((e,t)=>{const i=W.current;if(!i||!Ne)return;let n,a=0,s=0,r=300;const o="left"===e||"right"===e;if("line"===t)n=40*("up"===e||"left"===e?1:-1),r=150;else if("page"===t)n=(i.offsetHeight-V.xX)*("up"===e?-1:1);else{const{y:t,height:a}=(0,E.o)(Me.map((e=>e.view)));if("down"===e){const e=t+a-t+V.xX;n=i.offsetHeight-e-Ue.current.y}else n=t+V.RV-Ue.current.y}o?a=n:s=n,(a||s)&&Oe({translateBy:[a,s],duration:r})}),[Me,Oe,Ne,Ue]),[Ze,et]=(0,u.useState)(null),[tt,it]=(0,u.useState)(null),[nt,at]=h().useState(null),[st,rt]=(0,u.useState)(),[ot,lt]=(0,u.useState)(),ct=(0,u.useCallback)(((e,t)=>{lt((i=>{const n=new Map(i);return n.set(e,t),n}))}),[]),dt=(0,u.useMemo)((()=>({humanInput:we,onShare:b,onPause:f,onResume:k,onCancel:w,supports:l,activeExpandedViewJobId:tt,setActiveExpandedViewJobId:it,activeToolCallJobId:Ze,setActiveToolCallJobId:et,submittingFeedback:ge,submittedFeedback:fe,onSubmitFeedback:xe,setShowFeedback:Ae,showJsxEditor:m,activeJsxEditorJob:st,setActiveJsxEditorJob:rt,manuallyUpdatedViews:ot,updateView:ct})),[we,w,f,k,b,l,tt,Ze,ge,fe,xe,m,st,ot,ct]),ut=(0,u.useMemo)((()=>({onNodeResize:Re,setActiveNodeId:pe,hoverOnScrollableContent:Ie,setHoverOnScrollableContent:We,setActiveFile:at})),[Ie,Re]),ht=(0,u.useMemo)((()=>Ze?null==ie?void 0:ie.find((e=>e.id===Ze)):null),[Ze,ie]),pt=(0,u.useCallback)((e=>{for(const t of e.nativeEvent.composedPath()){if(t instanceof HTMLElement&&t.classList.contains(y.A.node))return;if(t===W.current)break}pe(null)}),[]);return(0,u.useEffect)((()=>{const e=W.current;if(!e||ht||tt||nt)return;const t=t=>{if(document.activeElement&&document.activeElement!==document.body&&document.activeElement!==e)return;const i=(0,B.l)(t,{activeNodeId:he,nodes:Me});if(!i)return;const{action:n,node:a}=i;if("scroll"===n)Qe(i.direction,i.range);else if("enter"===n){var s,r;if("job"!==a.type&&"view"!==a.type)return;const e="ask_human"===(null===(s=a.job.toolCall)||void 0===s?void 0:s.name),t="ask_human_confirming_plan"===(null===(r=a.job.toolCall)||void 0===r?void 0:r.name);if(e||t)return}t.preventDefault(),t.stopPropagation(),"enter"===n?"view"===a.type?it(a.job.id):et(a.job.id):"switch-active-node"===n&&(a?(pe(a.id),"job"===a.type||"view"===a.type?Ke({jobId:a.job.id,behavior:"smooth"}):Ke({nodeId:a.id,behavior:"smooth"})):pe(null))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[he,ht,tt,nt,Me,Ke,Qe]),h().createElement(K.j.Provider,{value:dt},h().createElement(Y.Q.Provider,{value:ut},h().createElement("div",{className:v()(y.A.root,{[y.A.loading]:!te}),ref:W,style:{cursor:ze?"grabbing":"grab"},tabIndex:-1,onClick:pt},!te&&h().createElement("div",{className:y.A["loading-icon"]},h().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),h().createElement("div",{className:v()(y.A.canvas,{[y.A.ready]:Ne&&Ye}),style:{transform:`translate3d(${De.x}px, ${De.y}px, 0) scale(${De.k})`}},h().createElement("svg",{className:y.A.edges},_e.map((e=>e.source===V.Jw||e.target===V.Jw?null:h().createElement("path",{className:y.A.edge,key:`${e.source}-${e.target}`,d:e.points.map(((e,t)=>{let{x:i,y:n}=e;return`${0===t?"M":"L"}${i},${n}`})).join(" ")})))),Me.map((e=>{var t,i;return h().createElement(Xe,{key:e.id,id:e.id,type:e.type,content:e.content,job:e.job,state:e.state,startTime:null==te?void 0:te.startTime,instructionLoading:"instruction"===e.type&&!He.has(e.id)&&!L.QB.includes(e.state)&&!L.X4.includes(ue),edges:_e,x:null===(t=e.view)||void 0===t?void 0:t.x,y:null===(i=e.view)||void 0===i?void 0:i.y,active:he===e.id})})))),h().createElement("div",{className:y.A.widgets},h().createElement(j.s,{nav:oe,plan:ne,jobs:ie,jobLevels:ce,currentNavId:me,taskState:ue,onClick:e=>{pe(`job:${e}`),Ke({jobId:e,block:"start"})}}),h().createElement(T.l,{scale:De.k,showUiSwitch:p,onScaleChange:$e,onReCenter:Ge,onSwitchToChat:I}),r?h().createElement("div",{className:y.A["footer-container"]},h().createElement(J.b,{taskDone:Be,skipToResults:Z,watchAgain:()=>{ee(),Fe(!1)}})):null!=l&&l.chat?h().createElement("div",{className:y.A["footer-container"]},h().createElement(G.s,{taskState:ue,taskDone:Be})):null),ht&&h().createElement(F.M,{job:ht}),tt&&h().createElement(H.f,{views:le}),nt&&h().createElement($.d,{file:nt}),m&&st&&h().createElement(Q.D,null)))}function Nt(e){let{id:t,type:i,state:n,job:a,content:s,startTime:r,instructionLoading:o,x:l,y:c,active:d}=e;const p=(0,u.useRef)(null),{onNodeResize:m,setActiveNodeId:g}=(0,u.useContext)(Y.Q);(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const i=new k.A((()=>{m(t,[e.offsetWidth,e.offsetHeight])}));return i.observe(e),()=>{i.disconnect(),m(t,null)}}),[t,m]),(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const t=e=>{e.stopPropagation()};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}}),[]);const b=(0,u.useCallback)((()=>{"start"!==i&&"instruction"!==i&&g(t)}),[t,g,i]);return h().createElement("div",{className:v()(y.A.node,{[y.A.ready]:null!=l&&null!=c}),ref:p,style:{left:l,top:c},onClick:b},"start"===i?h().createElement(C.H,null):"end"===i?h().createElement(D.s,null):"feedback"===i?h().createElement(q.k,null):"requirement"===i?h().createElement(I.O,{content:s,startTime:r,active:d}):"loading"===i?h().createElement(X.V,null):"instruction"===i?h().createElement(W.L,{content:a.instruction,loading:o}):"view"===i?h().createElement(U.Y,{job:a,active:d}):h().createElement(z.W,{state:n,job:a,active:d}))}n=St,({e:[te,ie,ne,ae,se,re,oe,le,ce,de,ue,he,pe,me,ge,be,fe,ve,ke,Ae,xe,Ee,we,ye,Se,Re,Ne,Me,_e,Te,Ce,Ie,We,ze,De,Ue,Ve,Le,Oe,Ye,Fe,Pe,Be,He,je,Je,Z],c:[Ze,ee]}=(0,d.A)(n,[Ge("ai-portal.cruise-canvas",{shadowOptions:!1})],[[$e(),1,"taskId"],[$e({attribute:!1}),1,"task"],[$e({attribute:!1}),1,"jobs"],[$e({type:Boolean}),1,"replay"],[$e({type:Number}),1,"replayDelay"],[$e({attribute:!1}),1,"supports"],[$e({type:Boolean}),1,"showHiddenJobs"],[$e({type:Boolean}),1,"showFeedback"],[$e({type:Boolean}),1,"showUiSwitch"],[$e({type:Boolean,render:!1}),1,"hideMermaid"],[$e({type:Boolean}),1,"showJsxEditor"],[qe({type:"share"}),1,"shareEvent",e=>(0,c.A)(ut,e),(e,t)=>(0,l.A)(ut,e,t)],[qe({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(mt,e),(e,t)=>(0,l.A)(mt,e,t)],[qe({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(bt,e),(e,t)=>(0,l.A)(bt,e,t)],[qe({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(vt,e),(e,t)=>(0,l.A)(vt,e,t)],[qe({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(At,e),(e,t)=>(0,l.A)(At,e,t)],[qe({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Et,e),(e,t)=>(0,l.A)(Et,e,t)],[Ke(),2,"resumed"],[Ke(),2,"feedbackSubmitDone"],[Ke(),2,"feedbackSubmitFailed"]],0,(e=>yt.has((0,r.A)(e))),m.ReactNextElement)),ee();var Mt=i(71451),_t=i(41030);let Tt=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const Ct="bricks/ai-portal/chat-box",It={en:{[Tt.ASK_ANY_THING]:"Ask anything",[Tt.COMMON_TASKS]:"Common tasks"},zh:{[Tt.ASK_ANY_THING]:"询问任何问题",[Tt.COMMON_TASKS]:"常用任务"}},Wt=b.i18n.getFixedT(null,Ct),zt=i.p+"images/af389fa6.svg";var Dt,Ut=i(47008);let Vt,Lt,Ot,Yt,Ft,Pt,Bt,Ht,jt,Jt,Gt,$t,qt,Kt,Xt;(0,b.initializeI18n)(Ct,It);const Qt=(0,m.wrapBrick)("eo-icon"),{defineElement:Zt,property:ei,event:ti}=(0,p.createDecorators)();let ii;var ni=new WeakMap,ai=new WeakMap,si=new WeakMap,ri=new WeakMap,oi=new WeakMap,li=new WeakMap,ci=new WeakSet,di=new WeakMap;class ui extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ci),(0,s.A)(this,ni,Lt(this)),(0,s.A)(this,ai,(Ot(this),Yt(this))),(0,s.A)(this,si,(Ft(this),Pt(this))),(0,s.A)(this,ri,(Bt(this),Ht(this))),(0,s.A)(this,oi,(jt(this),Jt(this))),(0,s.A)(this,li,(Gt(this),$t(this))),(0,s.A)(this,di,(Xt(this),e=>{(0,o.A)(ci,this,qt).emit(e)}))}get disabled(){return(0,c.A)(ni,this)}set disabled(e){(0,l.A)(ni,this,e)}get placeholder(){return(0,c.A)(ai,this)}set placeholder(e){(0,l.A)(ai,this,e)}get autoFocus(){return(0,c.A)(si,this)}set autoFocus(e){(0,l.A)(si,this,e)}get suggestions(){return(0,c.A)(ri,this)}set suggestions(e){(0,l.A)(ri,this,e)}get suggestionsLabel(){return(0,c.A)(oi,this)}set suggestionsLabel(e){(0,l.A)(oi,this,e)}render(){return h().createElement(hi,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(di,this)})}}function hi(e){let{disabled:t,placeholder:i,autoFocus:n,suggestions:a,suggestionsLabel:s,onSubmit:r}=e;const o=(0,u.useRef)(null),l=(0,u.useRef)(null),[c,d]=(0,u.useState)(""),p=(0,u.useRef)(""),m=(0,u.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,u.useCallback)((e=>{p.current=e.target.value,d(e.target.value)}),[]),b=(0,u.useCallback)((()=>{null==r||r(p.current)}),[r]);(0,u.useEffect)((()=>{n&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const f=(0,u.useMemo)((()=>null!=a&&a.length?(0,_t.chunk)(a,Math.max(2,Math.ceil(a.length/2))):[]),[a]),v=(0,u.useCallback)((e=>{p.current=e.content,d(e.content),setTimeout((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:o},h().createElement(Mt.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=i?i:Wt(Tt.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:m,onChange:g}),h().createElement("button",{className:"btn-send",disabled:!c,onClick:b},h().createElement(Qt,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),!(null==f||!f.length)&&h().createElement("div",{className:"suggestions"},h().createElement("div",{className:"heading"},h().createElement("img",{className:"icon",src:zt,width:16,height:16}),h().createElement("span",null,null!=s?s:Wt(Tt.COMMON_TASKS))),f.map(((e,t)=>h().createElement(pi,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:v})))))}function pi(e){let{suggestions:t,pixelPerSecond:i,onSelect:n}=e;const a=(0,u.useRef)(null),s=(0,u.useRef)(null),[r,o]=(0,u.useState)(0);return(0,u.useEffect)((()=>{const e=a.current,t=s.current;if(!e||!t)return;let n,r,l,c,d=0;const u=(t.offsetWidth-7)/2+7;function h(e){r=e,void 0===l&&(l=e),void 0!==n&&(d+=e-n,n=void 0),o((e-l-d)/1e3*i%u),c=requestAnimationFrame(h)}c=requestAnimationFrame(h);const p=()=>{cancelAnimationFrame(c),n=r},m=()=>{c=requestAnimationFrame(h)};return e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",m),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",m)}}),[t,i]),h().createElement("div",{className:"carousel",ref:a},h().createElement("ul",{className:"list",ref:s,style:{transform:`translateX(${-r}px)`}},[...t,...t].map(((e,t)=>h().createElement("li",{key:t},h().createElement("div",{className:"item",onClick:()=>n(e),title:e.content},h().createElement("div",{className:"title"},e.title),h().createElement("div",{className:"content"},e.content)))))))}Dt=ui,({e:[Lt,Ot,Yt,Ft,Pt,Bt,Ht,jt,Jt,Gt,$t,qt,Kt,Xt],c:[ii,Vt]}=(0,d.A)(Dt,[Zt("ai-portal.chat-box",{styleTexts:[Ut.A]})],[[ei({type:Boolean}),1,"disabled"],[ei(),1,"placeholder"],[ei({type:Boolean}),1,"autoFocus"],[ei({attribute:!1}),1,"suggestions"],[ei(),1,"suggestionsLabel"],[ti({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(li,e),(e,t)=>(0,l.A)(li,e,t)]],0,(e=>di.has((0,r.A)(e))),m.ReactNextElement)),Vt();var mi,gi=i(82165);let bi;const{defineElement:fi}=(0,p.createDecorators)();let vi;class ki extends m.ReactNextElement{render(){return h().createElement(Ai,null)}}function Ai(){return h().createElement("slot",null)}mi=ki,[vi,bi]=(0,d.A)(mi,[fi("ai-portal.home-container",{styleTexts:[gi.A]})],[],0,void 0,m.ReactNextElement).c,bi();var xi=i(21302),Ei=i.n(xi);let wi=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 yi="bricks/ai-portal/chat-history",Si={en:{[wi.TODAY]:"Today",[wi.YESTERDAY]:"Yesterday",[wi.PREVIOUS_7_DAYS]:"Previous 7 days",[wi.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[wi.TODAY]:"今天",[wi.YESTERDAY]:"昨天",[wi.PREVIOUS_7_DAYS]:"过去7天",[wi.PREVIOUS_30_DAYS]:"过去30天"}},Ri=b.i18n.getFixedT(null,yi);var Ni,Mi=i(21411);let _i,Ti,Ci,Ii,Wi,zi,Di,Ui,Vi,Li,Oi,Yi,Fi,Pi,Bi;(0,b.initializeI18n)(yi,Si);const Hi=(0,m.wrapBrick)("eo-icon"),ji=(0,m.wrapBrick)("eo-link"),Ji=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Gi,property:$i,event:qi}=(0,p.createDecorators)();let Ki;var Xi=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,en=new WeakMap,tn=new WeakSet,nn=new WeakMap,an=new WeakMap,sn=new WeakMap;class rn extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,tn),(0,s.A)(this,Xi,Ti(this)),(0,s.A)(this,Qi,(Ci(this),Ii(this))),(0,s.A)(this,Zi,(Wi(this),zi(this))),(0,s.A)(this,en,(Di(this),Ui(this))),(0,s.A)(this,nn,(Oi(this),e=>{(0,o.A)(tn,this,Vi).emit(e)})),(0,s.A)(this,an,Yi(this)),(0,s.A)(this,sn,(Bi(this),e=>{(0,o.A)(tn,this,Fi).emit({nextToken:e})}))}get list(){return(0,c.A)(Xi,this)}set list(e){(0,l.A)(Xi,this,e)}get actions(){return(0,c.A)(Qi,this)}set actions(e){(0,l.A)(Qi,this,e)}get nextToken(){return(0,c.A)(Zi,this)}set nextToken(e){(0,l.A)(Zi,this,e)}render(){return h().createElement(on,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(nn,this),onLoadMore:(0,c.A)(sn,this)})}}function on(e){let{root:t,list:i,actions:n,nextToken:a,onActionClick:s,onLoadMore:r}=e;const o=(0,u.useMemo)((()=>{const e=new Map,t=Ei()(),n=t.clone().startOf("day"),a=n.clone().subtract(1,"day"),s=n.clone().subtract(7,"days"),r=n.clone().subtract(30,"days"),o=+n/1e3,l=+a/1e3,c=+s/1e3,d=+r/1e3,u=+t.clone().startOf("year")/1e3;for(const t of null!=i?i:[]){let i;i=t.startTime>=o?Ri(wi.TODAY):t.startTime>=l?Ri(wi.YESTERDAY):t.startTime>=c?Ri(wi.PREVIOUS_7_DAYS):t.startTime>=d?Ri(wi.PREVIOUS_30_DAYS):t.startTime>=u?Ei()(1e3*t.startTime).format("MMMM"):Ei()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[i]),[l,c]=(0,u.useState)(null),d=(0,u.useRef)(null);return(0,u.useEffect)((()=>{const e=d.current;if(!e||!a)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(a)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[a,r,t]),i?h().createElement(h().Fragment,null,h().createElement("ul",null,o.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>h().createElement("li",{key:e.id},h().createElement(ji,{className:v()("item",{active:l===e.id}),url:e.url},h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(Ji,{className:"actions",actions:n,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!L.QB.includes(e.state)&&h().createElement("div",{className:"working"})))))))))),a&&h().createElement("div",{className:"load-more",ref:d},h().createElement(Hi,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"loading"},h().createElement(Hi,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}Ni=rn,({e:[Ti,Ci,Ii,Wi,zi,Di,Ui,Vi,Li,Oi,Yi,Fi,Pi,Bi],c:[Ki,_i]}=(0,d.A)(Ni,[Gi("ai-portal.chat-history",{styleTexts:[Mi.A]})],[[$i({attribute:!1}),1,"list"],[$i({attribute:!1}),1,"actions"],[$i(),1,"nextToken"],[qi({type:"action.click"}),1,"actionClick",e=>(0,c.A)(en,e),(e,t)=>(0,l.A)(en,e,t)],[qi({type:"load.more"}),1,"loadMore",e=>(0,c.A)(an,e),(e,t)=>(0,l.A)(an,e,t)]],0,(e=>sn.has((0,r.A)(e))),m.ReactNextElement)),_i();var ln,cn=i(89575),dn=i(24);let un,hn,pn,mn,gn,bn,fn,vn,kn,An,xn,En,wn,yn,Sn,Rn,Nn,Mn,_n,Tn,Cn;const In=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:Wn,property:zn}=(0,p.createDecorators)();let Dn;var Un=new WeakMap,Vn=new WeakMap,Ln=new WeakMap,On=new WeakMap,Yn=new WeakMap,Fn=new WeakMap,Pn=new WeakMap,Bn=new WeakMap,Hn=new WeakMap,jn=new WeakMap;class Jn extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Un,hn(this)),(0,s.A)(this,Vn,(pn(this),mn(this))),(0,s.A)(this,Ln,(gn(this),bn(this))),(0,s.A)(this,On,(fn(this),vn(this))),(0,s.A)(this,Yn,(kn(this),An(this))),(0,s.A)(this,Fn,(xn(this),En(this))),(0,s.A)(this,Pn,(wn(this),yn(this))),(0,s.A)(this,Bn,(Sn(this),Rn(this))),(0,s.A)(this,Hn,(Nn(this),Mn(this))),(0,s.A)(this,jn,(_n(this),Tn(this))),Cn(this)}get label(){return(0,c.A)(Un,this)}set label(e){(0,l.A)(Un,this,e)}get value(){return(0,c.A)(Vn,this)}set value(e){(0,l.A)(Vn,this,e)}get size(){return(0,c.A)(Ln,this)}set size(e){(0,l.A)(Ln,this,e)}get lineColor(){return(0,c.A)(On,this)}set lineColor(e){(0,l.A)(On,this,e)}get showArea(){return(0,c.A)(Yn,this)}set showArea(e){(0,l.A)(Yn,this,e)}get min(){return(0,c.A)(Fn,this)}set min(e){(0,l.A)(Fn,this,e)}get max(){return(0,c.A)(Pn,this)}set max(e){(0,l.A)(Pn,this,e)}get xField(){return(0,c.A)(Bn,this)}set xField(e){(0,l.A)(Bn,this,e)}get yField(){return(0,c.A)(Hn,this)}set yField(e){(0,l.A)(Hn,this,e)}get data(){return(0,c.A)(jn,this)}set data(e){(0,l.A)(jn,this,e)}render(){return h().createElement(Gn,{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 Gn(e){let{label:t,value:i,size:n,...a}=e;return"small"===n?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},i)),h().createElement("div",{className:"chart"},h().createElement(In,(0,cn.A)({},a,{lineWidth:1.5,width:"auto",height:"55"})))):h().createElement("div",{className:"container"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat-and-chart"},h().createElement("div",{className:"chart"},h().createElement(In,(0,cn.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}ln=Jn,({e:[hn,pn,mn,gn,bn,fn,vn,kn,An,xn,En,wn,yn,Sn,Rn,Nn,Mn,_n,Tn,Cn],c:[Dn,un]}=(0,d.A)(ln,[Wn("ai-portal.stat-with-mini-chart",{styleTexts:[dn.A]})],[[zn(),1,"label"],[zn(),1,"value"],[zn(),1,"size"],[zn(),1,"lineColor"],[zn({type:Boolean}),1,"showArea"],[zn({type:Number}),1,"min"],[zn({type:Number}),1,"max"],[zn(),1,"xField"],[zn(),1,"yField"],[zn({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),un();const $n=i.p+"images/7385e5f5.png";var qn,Kn=i(31653);let Xn;const{defineElement:Qn}=(0,p.createDecorators)();let Zn;class ea extends m.ReactNextElement{render(){return h().createElement(ta,null)}}function ta(){return h().createElement("img",{src:$n,alt:"Elevo",width:95,height:26})}qn=ea,[Zn,Xn]=(0,d.A)(qn,[Qn("ai-portal.elevo-logo",{styleTexts:[Kn.A]})],[],0,void 0,m.ReactNextElement).c,Xn();let ia=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",aa={en:{[ia.NEW_CHAT]:"New chat",[ia.LOGOUT]:"Logout",[ia.TODAY]:"Today",[ia.YESTERDAY]:"Yesterday",[ia.PREVIOUS_7_DAYS]:"Previous 7 days",[ia.PREVIOUS_30_DAYS]:"Previous 30 days",[ia.SWITCH_LANGUAGE]:"中文"},zh:{[ia.NEW_CHAT]:"新对话",[ia.LOGOUT]:"登出",[ia.TODAY]:"今天",[ia.YESTERDAY]:"昨天",[ia.PREVIOUS_7_DAYS]:"过去7天",[ia.PREVIOUS_30_DAYS]:"过去30天",[ia.SWITCH_LANGUAGE]:"English"}},sa=b.i18n.getFixedT(null,na);var ra=i(61408);const oa=(0,m.wrapBrick)("eo-icon"),la=(0,m.wrapBrick)("eo-link"),ca=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),da=(0,m.wrapBrick)("eo-easyops-avatar"),ua=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),ha=(0,m.wrapBrick)("ai-portal.icon-button");var pa=i(57372);const ma=async(e,t)=>(await pa.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data,ga=(0,u.forwardRef)(ba);function ba(e,t){let{activeId:i,actions:n,urlTemplate:a,onActionClick:s,onHistoryClick:r}=e;const o=(0,u.useRef)(null),[l,c]=(0,u.useState)(null),[d,p]=(0,u.useState)(),[m,g]=(0,u.useState)();(0,u.useEffect)((()=>{Promise.all([ma({next_token:m},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;c((e=>[...null!=e?e:[],...t.data])),p(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[m]);const b=(0,u.useMemo)((()=>{const e=new Map,t=Ei()(),i=t.clone().startOf("day"),n=i.clone().subtract(1,"day"),a=i.clone().subtract(7,"days"),s=i.clone().subtract(30,"days"),r=+i/1e3,o=+n/1e3,c=+a/1e3,d=+s/1e3,u=+t.clone().startOf("year")/1e3;for(const t of null!=l?l:[]){let i;i=t.startTime>=r?sa(ia.TODAY):t.startTime>=o?sa(ia.YESTERDAY):t.startTime>=c?sa(ia.PREVIOUS_7_DAYS):t.startTime>=d?sa(ia.PREVIOUS_30_DAYS):t.startTime>=u?Ei()(1e3*t.startTime).format("MMMM"):Ei()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[l]),[f,k]=(0,u.useState)(null),A=(0,u.useRef)(null);(0,u.useEffect)((()=>{const e=A.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 x=(0,u.useRef)(0),E=(0,u.useCallback)((async()=>{try{const e=++x.current,t=await ma({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==x.current)return;c((e=>{const i=null!=e?e:[],n=t.data,a=new Set(n.map((e=>e.id))),s=new Map(n.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!==n[0]||!(0,_t.isEqual)(t,e),o)break;l=!1}return r?o?[...n,...i.filter((e=>!a.has(e.id)))]:e:(p(t.next_token),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,u.useImperativeHandle)(t,(()=>({pull:E})),[E]),l?h().createElement("div",{className:"history",ref:o},h().createElement("ul",null,b.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>{return h().createElement("li",{key:e.id},h().createElement(la,(0,cn.A)({className:v()("item",{"actions-active":e.id===f,active:e.id===i}),onClick:r},a?{url:(t=a,o=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,_t.get)(o,t))))}:null),h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(ua,{className:"actions",actions:n,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{k(t.detail?e.id:null)}}),!L.QB.includes(e.state)&&h().createElement("div",{className:"working"})));var t,o}))))))),d&&h().createElement("div",{className:"load-more",ref:A},h().createElement(oa,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"history"},h().createElement("div",{className:"loading"},h().createElement(oa,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}var fa;let va,ka,Aa,xa,Ea,wa,ya,Sa,Ra,Na,Ma,_a,Ta,Ca,Ia,Wa,za,Da,Ua,Va,La,Oa,Ya,Fa,Pa,Ba;(0,b.initializeI18n)(na,aa);const Ha={lib:"easyops",icon:"sidebar"},{defineElement:ja,property:Ja,event:Ga,method:$a}=(0,p.createDecorators)(),qa=(0,u.forwardRef)(hs);let Ka;var Xa=new WeakMap,Qa=new WeakMap,Za=new WeakMap,es=new WeakMap,ts=new WeakMap,is=new WeakMap,ns=new WeakMap,as=new WeakMap,ss=new WeakMap,rs=new WeakSet,os=new WeakMap,ls=new WeakMap,cs=new WeakMap,ds=new WeakMap;class us extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,rs),(0,s.A)(this,Xa,(va(this),Aa(this))),(0,s.A)(this,Qa,(xa(this),Ea(this))),(0,s.A)(this,Za,(wa(this),ya(this))),(0,s.A)(this,es,(Sa(this),Ra(this))),(0,s.A)(this,ts,(Na(this),Ma(this))),(0,s.A)(this,is,(_a(this),Ta(this))),(0,s.A)(this,ns,(Ca(this),Ia(this))),(0,s.A)(this,as,(Wa(this),za(this))),(0,s.A)(this,ss,(Da(this),Ua(this))),(0,s.A)(this,os,(Oa(this),()=>{(0,o.A)(rs,this,Va).emit()})),(0,s.A)(this,ls,Ya(this)),(0,s.A)(this,cs,(Ba(this),e=>{(0,o.A)(rs,this,Fa).emit(e)})),(0,s.A)(this,ds,(0,u.createRef)())}get userInstanceId(){return(0,c.A)(Xa,this)}set userInstanceId(e){(0,l.A)(Xa,this,e)}get behavior(){return(0,c.A)(Qa,this)}set behavior(e){(0,l.A)(Qa,this,e)}get logoUrl(){return(0,c.A)(Za,this)}set logoUrl(e){(0,l.A)(Za,this,e)}get newChatUrl(){return(0,c.A)(es,this)}set newChatUrl(e){(0,l.A)(es,this,e)}get historyActiveId(){return(0,c.A)(ts,this)}set historyActiveId(e){(0,l.A)(ts,this,e)}get historyUrlTemplate(){return(0,c.A)(is,this)}set historyUrlTemplate(e){(0,l.A)(is,this,e)}get historyActions(){return(0,c.A)(ns,this)}set historyActions(e){(0,l.A)(ns,this,e)}get links(){return(0,c.A)(as,this)}set links(e){(0,l.A)(as,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(ds,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(ds,this).current)||void 0===e||e.close()}render(){return h().createElement(qa,{ref:(0,c.A)(ds,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)(os,this),onActionClick:(0,c.A)(cs,this)})}}function hs(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:s,historyActiveId:r,historyUrlTemplate:o,historyActions:l,links:c,onLogout:d,onActionClick:p}=e;const[m,f]=(0,u.useState)("drawer"===n),k=(0,u.useCallback)((()=>{f(!0)}),[]),A=(0,u.useCallback)((()=>{f(!1)}),[]);(0,u.useEffect)((()=>{"drawer"===n&&f(!0)}),[n]);const x=(0,u.useCallback)((()=>{f(!0)}),[]),E=(0,u.useCallback)((()=>{"drawer"===n&&f(!0)}),[n]),w=(0,u.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:sa(ia.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:sa(ia.SWITCH_LANGUAGE)}]),[]),y=(0,u.useRef)(null);return(0,u.useImperativeHandle)(t,(()=>({close:()=>{f(!0)},pull:()=>{var e;null===(e=y.current)||void 0===e||e.pull()}})),[]),h().createElement("div",{className:v()("container",{collapsed:m})},"drawer"===n&&!m&&h().createElement("div",{className:"mask",onClick:x}),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(la,{url:a,className:"logo-link"},h().createElement("img",{className:"logo",alt:"Elevo",src:$n,width:95,height:26})),h().createElement(ha,{icon:Ha,variant:"light",onClick:k})),h().createElement(la,{className:"new-chat",url:s},h().createElement(oa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),sa(ia.NEW_CHAT)),null!=c&&c.length?h().createElement("div",{className:"links"},c.map(((e,t)=>h().createElement(la,{className:"link",key:t,url:e.url},h().createElement(oa,(0,cn.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))))):null,h().createElement(ga,{ref:y,activeId:r,urlTemplate:o,actions:l,onActionClick:p,onHistoryClick:E}),h().createElement("div",{className:"footer"},h().createElement(ca,{className:"dropdown",actions:w,onActionClick:async e=>{"logout"===e.detail.key?d():(await b.i18n.changeLanguage(b.i18n.language&&"en"===b.i18n.language.split("-")[0]?"zh":"en"),(0,g.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(da,{nameOrInstanceId:i,showName:!0,size:"xs"}))))),h().createElement("div",{className:"alternative"},h().createElement(ha,{icon:Ha,variant:"light",onClick:A}),h().createElement(la,{className:"new-chat",url:s},h().createElement(oa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),sa(ia.NEW_CHAT))))}fa=us,({e:[Aa,xa,Ea,wa,ya,Sa,Ra,Na,Ma,_a,Ta,Ca,Ia,Wa,za,Da,Ua,Va,La,Oa,Ya,Fa,Pa,Ba,va],c:[Ka,ka]}=(0,d.A)(fa,[ja("ai-portal.elevo-sidebar",{styleTexts:[ra.A]})],[[Ja(),1,"userInstanceId"],[Ja(),1,"behavior"],[Ja(),1,"logoUrl"],[Ja(),1,"newChatUrl"],[Ja(),1,"historyActiveId"],[Ja(),1,"historyUrlTemplate"],[Ja({attribute:!1}),1,"historyActions"],[Ja({attribute:!1}),1,"links"],[Ga({type:"logout"}),1,"logout",e=>(0,c.A)(ss,e),(e,t)=>(0,l.A)(ss,e,t)],[Ga({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ls,e),(e,t)=>(0,l.A)(ls,e,t)],[$a(),2,"pullHistory"],[$a(),2,"close"]],0,(e=>ds.has((0,r.A)(e))),m.ReactNextElement)),ka();var ps,ms=i(47338);let gs,bs,fs,vs,ks,As,xs,Es,ws;const ys=(0,m.wrapBrick)("eo-icon"),Ss=(0,m.wrapBrick)("eo-tooltip"),{defineElement:Rs,property:Ns}=(0,p.createDecorators)();let Ms;var _s=new WeakMap,Ts=new WeakMap,Cs=new WeakMap,Is=new WeakMap;class Ws extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,_s,bs(this)),(0,s.A)(this,Ts,(fs(this),vs(this))),(0,s.A)(this,Cs,(ks(this),As(this))),(0,s.A)(this,Is,(xs(this),Es(this))),ws(this)}get icon(){return(0,c.A)(_s,this)}set icon(e){(0,l.A)(_s,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)(Cs,this)}set disabled(e){(0,l.A)(Cs,this,e)}get variant(){return(0,c.A)(Is,this)}set variant(e){(0,l.A)(Is,this,e)}render(){return h().createElement(zs,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function zs(e){let{icon:t,tooltip:i,disabled:n}=e;const a=h().createElement("button",{disabled:n},h().createElement(ys,t));return i?h().createElement(Ss,{content:i},a):a}ps=Ws,({e:[bs,fs,vs,ks,As,xs,Es,ws],c:[Ms,gs]}=(0,d.A)(ps,[Rs("ai-portal.icon-button",{styleTexts:[ms.A]})],[[Ns({attribute:!1}),1,"icon"],[Ns(),1,"tooltip"],[Ns({type:Boolean}),1,"disabled"],[Ns({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),gs();let Ds=function(e){return e.ALL="ALL",e}({});const Us="bricks/ai-portal/show-cases",Vs={en:{[Ds.ALL]:"All"},zh:{[Ds.ALL]:"全部"}},Ls=b.i18n.getFixedT(null,Us);var Os,Ys=i(42873);let Fs,Ps,Bs,Hs,js;(0,b.initializeI18n)(Us,Vs);const Js=(0,m.wrapBrick)("eo-link"),{defineElement:Gs,property:$s}=(0,p.createDecorators)();let qs;var Ks=new WeakMap,Xs=new WeakMap;class Qs extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ks,Ps(this)),(0,s.A)(this,Xs,(Bs(this),Hs(this))),js(this)}get list(){return(0,c.A)(Ks,this)}set list(e){(0,l.A)(Ks,this,e)}get taskUrlTemplate(){return(0,c.A)(Xs,this)}set taskUrlTemplate(e){(0,l.A)(Xs,this,e)}render(){return h().createElement(Zs,{list:this.list,taskUrlTemplate:this.taskUrlTemplate})}}function Zs(e){let{list:t,taskUrlTemplate:i}=e;const n=(0,u.useMemo)((()=>[null,...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[a,s]=(0,u.useState)(null),r=(0,u.useMemo)((()=>a?null==t?void 0:t.filter((e=>e.scenario===a)):t),[a,t]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("ul",{className:"nav"},null==n?void 0:n.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:a===e}),onClick:()=>s(e)},null===e?Ls(Ds.ALL):e))))),h().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>{return h().createElement("li",{key:e.taskId,className:"item"},h().createElement(Js,{className:"link",url:(t=i,n=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,_t.get)(n,t))))},h().createElement("span",{className:v()("placeholder",e.thumbUrl?"thumbnail":"summary")},e.thumbUrl?h().createElement("span",{style:{backgroundImage:`url(${(0,g.getBasePath)()}${e.thumbUrl})`}}):h().createElement("span",{className:"summary-1"},h().createElement("span",{className:"summary-2"},h().createElement("span",null,e.summary)))),h().createElement("span",{className:"title"},h().createElement("span",null,e.title))));var t,n})))):null}Os=Qs,({e:[Ps,Bs,Hs,js],c:[qs,Fs]}=(0,d.A)(Os,[Gs("ai-portal.show-cases",{styleTexts:[Ys.A]})],[[$s({attribute:!1}),1,"list"],[$s(),1,"taskUrlTemplate"]],0,void 0,m.ReactNextElement)),Fs();let er=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 tr="bricks/ai-portal/mcp-tools",ir={en:{[er.MCP_HUB]:"MCP Hub",[er.ALL]:"All",[er.SERVER_cmdb]:"CMDB",[er.SERVER_cmdb_product_helper]:"CMDB",[er.SERVER_alert]:"Alert",[er.SERVER_web_builder]:"View",[er.SERVER_web_builder2]:"View",[er.SERVER_host_troubleshooting]:"Host Troubleshooting",[er.SERVER_system_inspection]:"System Inspection",[er.SERVER_grafana]:"Grafana",[er.SERVER_kubernetes]:"Kubernetes",[er.SERVER_llm]:"LLM"},zh:{[er.MCP_HUB]:"MCP 中心",[er.ALL]:"全部",[er.SERVER_cmdb]:"CMDB",[er.SERVER_cmdb_product_helper]:"CMDB",[er.SERVER_alert]:"告警",[er.SERVER_web_builder]:"视图",[er.SERVER_web_builder2]:"视图",[er.SERVER_host_troubleshooting]:"主机故障排查",[er.SERVER_system_inspection]:"系统巡检",[er.SERVER_grafana]:"Grafana",[er.SERVER_kubernetes]:"Kubernetes",[er.SERVER_llm]:"大模型"}},nr=b.i18n.getFixedT(null,tr);var ar,sr=i(31748);let rr,or,lr;(0,b.initializeI18n)(tr,ir);const cr={lib:"antd",icon:"tool"},dr=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"]}]]),ur=(0,m.wrapBrick)("eo-icon"),{defineElement:hr,property:pr}=(0,p.createDecorators)();let mr;var gr=new WeakMap;class br extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,gr,or(this)),lr(this)}get list(){return(0,c.A)(gr,this)}set list(e){(0,l.A)(gr,this,e)}render(){return h().createElement(fr,{list:this.list})}}function fr(e){let{list:t}=e;const[i,n]=(0,u.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=nr(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const s=[...dr.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),r=s?s[0]:"其他";let o=i.get(r);o||i.set(r,o=[]),o.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const s=n.indexOf(i),r=n.indexOf(a);return(s<0?n.length:s)-(r<0?n.length:r)}))),i]}),[t]),a=(0,u.useMemo)((()=>{const e=[...dr.keys()],t=[...n.keys()];return t.sort(((t,i)=>{const n=e.indexOf(t),a=e.indexOf(i);return(n<0?e.length:n)-(a<0?e.length:a)})),[null,...t]}),[n]),[s,r]=(0,u.useState)(null),o=(0,u.useMemo)((()=>{const e=[...i];if(null===s)return e;const t=n.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,i,n]);return h().createElement("div",{className:"container"},h().createElement("h1",null,nr(er.MCP_HUB)),h().createElement("ul",{className:"nav"},null==a?void 0:a.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:s===e}),onClick:()=>r(e)},null===e?nr(er.ALL):e))))),h().createElement("ul",{className:"groups"},null==o?void 0:o.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement(ur,(0,cn.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:cr,{fallback:cr})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))))}ar=br,({e:[or,lr],c:[mr,rr]}=(0,d.A)(ar,[hr("ai-portal.mcp-tools",{styleTexts:[sr.A]})],[[pr({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),rr();var vr,kr=i(92914),Ar=i(80413),xr=i(22025),Er=i(13183),wr=i(30578),yr=i(17911),Sr=i(95491);let Rr,Nr,Mr,_r,Tr,Cr,Ir,Wr,zr,Dr,Ur,Vr,Lr,Or,Yr,Fr,Pr,Br,Hr,jr,Jr,Gr,$r,qr,Kr,Xr,Qr,Zr,eo,to,io,no,ao,so,ro,oo,lo,co,uo,ho;(0,b.initializeI18n)(kr.NS,kr.I);const po={lib:"easyops",icon:"share"},{defineElement:mo,property:go,event:bo,method:fo}=(0,p.createDecorators)(),vo=(0,u.forwardRef)(Po);let ko;var Ao=new WeakMap,xo=new WeakMap,Eo=new WeakMap,wo=new WeakMap,yo=new WeakMap,So=new WeakMap,Ro=new WeakMap,No=new WeakMap,Mo=new WeakSet,_o=new WeakMap,To=new WeakMap,Co=new WeakMap,Io=new WeakMap,Wo=new WeakMap,zo=new WeakMap,Do=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Yo=new WeakMap;class Fo extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Mo),(0,s.A)(this,Ao,(Rr(this),Mr(this))),(0,s.A)(this,xo,(_r(this),Tr(this))),(0,s.A)(this,Eo,(Cr(this),Ir(this))),(0,s.A)(this,wo,(Wr(this),zr(this))),(0,s.A)(this,yo,(Dr(this),Ur(this))),(0,s.A)(this,So,(Vr(this),Lr(this))),(0,s.A)(this,Ro,(Or(this),Yr(this))),(0,s.A)(this,No,(Fr(this),Pr(this))),(0,s.A)(this,_o,(jr(this),()=>{(0,o.A)(Mo,this,Br).emit()})),(0,s.A)(this,To,Jr(this)),(0,s.A)(this,Co,(qr(this),()=>{(0,o.A)(Mo,this,Gr).emit()})),(0,s.A)(this,Io,Kr(this)),(0,s.A)(this,Wo,(Zr(this),()=>{(0,o.A)(Mo,this,Xr).emit()})),(0,s.A)(this,zo,eo(this)),(0,s.A)(this,Do,(no(this),()=>{(0,o.A)(Mo,this,to).emit()})),(0,s.A)(this,Uo,ao(this)),(0,s.A)(this,Vo,(oo(this),e=>{(0,o.A)(Mo,this,so).emit(e)})),(0,s.A)(this,Lo,lo(this)),(0,s.A)(this,Oo,(ho(this),()=>{(0,o.A)(Mo,this,co).emit("canvas")})),(0,s.A)(this,Yo,(0,u.createRef)())}get taskId(){return(0,c.A)(Ao,this)}set taskId(e){(0,l.A)(Ao,this,e)}get replay(){return(0,c.A)(xo,this)}set replay(e){(0,l.A)(xo,this,e)}get replayDelay(){return(0,c.A)(Eo,this)}set replayDelay(e){(0,l.A)(Eo,this,e)}get supports(){return(0,c.A)(wo,this)}set supports(e){(0,l.A)(wo,this,e)}get showFeedback(){return(0,c.A)(yo,this)}set showFeedback(e){(0,l.A)(yo,this,e)}get showUiSwitch(){return(0,c.A)(So,this)}set showUiSwitch(e){(0,l.A)(So,this,e)}get hideMermaid(){return(0,c.A)(Ro,this)}set hideMermaid(e){(0,l.A)(Ro,this,e)}resumed(){var e;null===(e=(0,c.A)(Yo,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Yo,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Yo,this).current)||void 0===e||e.feedbackSubmitFailed()}render(){return h().createElement(vo,{taskId:this.taskId,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showFeedback:this.showFeedback,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(_o,this),onPause:(0,c.A)(Co,this),onResume:(0,c.A)(Wo,this),onCancel:(0,c.A)(Do,this),onSubmitFeedback:(0,c.A)(Vo,this),onSwitchToCanvas:(0,c.A)(Oo,this)})}}function Po(e,t){var i;let{taskId:n,replay:a,replayDelay:s,supports:r,showFeedback:o,showUiSwitch:l,onShare:c,onPause:d,onResume:p,onCancel:m,onSubmitFeedback:b,onSwitchToCanvas:f}=e;const{task:A,jobs:x,error:E,humanInputRef:w,resumedRef:y,skipToResults:S,watchAgain:R}=(0,M.S)(n,a,s),N=null!==(i=null==A?void 0:A.title)&&void 0!==i?i:"",_=null==A?void 0:A.state,T=L.QB.includes(_),{messages:C,inputRequiredJobId:I,lastToolCallJobId:W}=(0,Ar.e)(A,x),z=(0,u.useMemo)((()=>null==x?void 0:x.flatMap((e=>e.generatedView?{id:e.id,view:e.generatedView}:[]))),[x]),[D,U]=(0,u.useState)(!1),[V,Y]=(0,u.useState)(!1),[F,P]=(0,u.useState)(!!o);(0,u.useEffect)((()=>{P(!!o)}),[o]);const B=(0,u.useCallback)((e=>{U(!0),b(e)}),[b]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.call(y)},feedbackSubmitDone:()=>{Y(!0),setTimeout((()=>{P(!1)}),3e3)},feedbackSubmitFailed:()=>{U(!1)}})),[y]);const[j,$]=(0,u.useState)(null),[X,Q]=(0,u.useState)(null),[Z,ee]=(0,u.useState)(!1),te=(0,u.useRef)(!1),ie=!!A;(0,u.useEffect)((()=>{if(ie){const e=setTimeout((()=>{te.current=!0}),1e3);return()=>{clearTimeout(e)}}}),[ie]),(0,u.useEffect)((()=>{te.current&&W&&!Z&&Q(W)}),[W,Z]),(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(N)}),[N]),(0,u.useEffect)((()=>{E&&(0,g.handleHttpError)(E)}),[E]);const ne=(0,u.useCallback)(((e,t)=>{var i;null===(i=w.current)||void 0===i||i.call(w,e,t)}),[w]),ae=(0,u.useMemo)((()=>({humanInput:ne,onShare:c,onPause:d,onResume:p,onCancel:m,supports:r,activeExpandedViewJobId:j,setActiveExpandedViewJobId:$,activeToolCallJobId:X,setActiveToolCallJobId:Q,submittingFeedback:D,submittedFeedback:V,onSubmitFeedback:B,setShowFeedback:P})),[ne,c,d,p,m,r,j,X,D,V,B]),se=(0,u.useMemo)((()=>({lastToolCallJobId:W,setUserClosedAside:ee})),[W]),re=(0,u.useRef)(!1),oe=(0,u.useRef)(!1),le=(0,u.useRef)(null),[ce,de]=(0,u.useState)(!1);(0,u.useEffect)((()=>{const e=le.current,t=null==e?void 0:e.firstElementChild;if(oe.current||!e||!t)return;const i=()=>{de(e.scrollTop+e.clientHeight+24<e.scrollHeight),re.current&&(oe.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let n;e.addEventListener("scroll",i);const a=new k.A((()=>{oe.current||(re.current=!1,e.scrollTo({top:t.scrollHeight,behavior:"instant"}),clearTimeout(n),n=setTimeout((()=>{re.current=!0}),100))}));return a.observe(t),()=>{a.disconnect(),e.removeEventListener("scroll",i)}}),[ie]);const ue=(0,u.useCallback)((()=>{const e=le.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[]),he=(0,u.useMemo)((()=>X?null==x?void 0:x.find((e=>e.id===X)):null),[X,x]);return h().createElement(K.j.Provider,{value:ae},h().createElement(Sr.W.Provider,{value:se},h().createElement("div",{className:xr.A.container},h().createElement("div",{className:xr.A.header},h().createElement("div",{className:xr.A.left}),h().createElement("h1",null,N),h().createElement("div",{className:xr.A.right},l&&h().createElement(O.Py,{icon:L.Rq,variant:"mini",style:{transform:"rotate(90deg)"},onClick:f}),h().createElement(O.Py,{icon:po,variant:"mini",onClick:c}))),ie?h().createElement(h().Fragment,null,h().createElement("div",{className:xr.A.main,ref:le},h().createElement("div",{className:xr.A.narrow},C.map(((e,t,i)=>h().createElement("div",{className:xr.A.message,key:t},"user"===e.role?h().createElement(Er.R,{content:e.content}):h().createElement(wr.G,{jobs:e.jobs,taskState:_,isLatest:t===i.length-1})))),F&&"completed"===_&&h().createElement(q.k,{className:xr.A.feedback}))),h().createElement("div",{className:xr.A["scroll-down"],hidden:!ce,onClick:ue},h().createElement(O.Bj,{lib:"antd",icon:"down"}))):h().createElement("div",{className:xr.A["loading-icon"]},h().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),a||null!=r&&r.chat?h().createElement("div",{className:xr.A.footer},h().createElement("div",{className:xr.A.narrow},a?h().createElement(J.b,{taskDone:T,skipToResults:S,watchAgain:R}):h().createElement(G.s,{taskState:_,taskDone:T,inputRequiredJobId:I}))):null),h().createElement("div",{className:v()(xr.A.aside,{[xr.A.expanded]:!!X})},X&&h().createElement(yr.n,{job:he})),j&&h().createElement(H.f,{views:z})))}vr=Fo,({e:[Mr,_r,Tr,Cr,Ir,Wr,zr,Dr,Ur,Vr,Lr,Or,Yr,Fr,Pr,Br,Hr,jr,Jr,Gr,$r,qr,Kr,Xr,Qr,Zr,eo,to,io,no,ao,so,ro,oo,lo,co,uo,ho,Rr],c:[ko,Nr]}=(0,d.A)(vr,[mo("ai-portal.chat-stream",{shadowOptions:!1})],[[go(),1,"taskId"],[go({type:Boolean}),1,"replay"],[go({type:Number}),1,"replayDelay"],[go({attribute:!1}),1,"supports"],[go({type:Boolean}),1,"showFeedback"],[go({type:Boolean}),1,"showUiSwitch"],[go({type:Boolean,render:!1}),1,"hideMermaid"],[bo({type:"share"}),1,"shareEvent",e=>(0,c.A)(No,e),(e,t)=>(0,l.A)(No,e,t)],[bo({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(To,e),(e,t)=>(0,l.A)(To,e,t)],[bo({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(Io,e),(e,t)=>(0,l.A)(Io,e,t)],[bo({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(zo,e),(e,t)=>(0,l.A)(zo,e,t)],[bo({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Uo,e),(e,t)=>(0,l.A)(Uo,e,t)],[bo({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Lo,e),(e,t)=>(0,l.A)(Lo,e,t)],[fo(),2,"resumed"],[fo(),2,"feedbackSubmitDone"],[fo(),2,"feedbackSubmitFailed"]],0,(e=>Yo.has((0,r.A)(e))),m.ReactNextElement)),Nr();const Bo=i.p+"images/8c2cf79e.png",Ho=i.p+"images/0cbe181e.png",jo=i.p+"images/87c8a33b.png",Jo=i.p+"images/f542faa9.png",Go=i.p+"images/8e5c445f.png",$o=i.p+"images/dd5fc700.png",qo=i.p+"images/4215203f.png",Ko=i.p+"images/5e54ffc5.png";let Xo=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e}({});const Qo="bricks/ai-portal/ai-employees",Zo=b.i18n.getFixedT(null,Qo);var el,tl=i(98036);let il,nl,al,sl,rl;(0,b.initializeI18n)(Qo,{en:{AI_EMPLOYEES:"AI Employees"},zh:{AI_EMPLOYEES:"Ai 数字人"}});const ol=[Bo,Ho,jo,Jo,Go,$o,qo,Ko],{defineElement:ll,property:cl}=(0,p.createDecorators)();let dl;var ul=new WeakMap,hl=new WeakMap;class pl extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ul,nl(this)),(0,s.A)(this,hl,(al(this),sl(this))),rl(this)}get list(){return(0,c.A)(ul,this)}set list(e){(0,l.A)(ul,this,e)}get industries(){return(0,c.A)(hl,this)}set industries(e){(0,l.A)(hl,this,e)}render(){return h().createElement(ml,{list:this.list,industries:this.industries})}}function ml(e){let{list:t,industries:i}=e;const n=(0,u.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[a,s]=(0,u.useState)(n[0]),r=(0,u.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==a)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[a,t]),o=n.indexOf(a);return h().createElement("div",{className:"container"},h().createElement("h1",null,Zo(Xo.AI_EMPLOYEES)),h().createElement("ul",{className:"nav"},n.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:e===a}),onClick:()=>s(e)},e))))),h().createElement("ul",{className:"groups"},r.map(((e,t)=>{let[i,n]=e;return h().createElement("li",{key:i,className:"group"},h().createElement("h2",null,i),h().createElement("ul",{className:"list"},n.map(((e,i)=>h().createElement("li",{key:i,className:"item"},h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},h().createElement("img",{src:ol[(i+t+o)%ol.length]})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description))))))}))))}el=pl,({e:[nl,al,sl,rl],c:[dl,il]}=(0,d.A)(el,[ll("ai-portal.ai-employees",{styleTexts:[tl.A]})],[[cl({attribute:!1}),1,"list"],[cl({attribute:!1}),1,"industries"]],0,void 0,m.ReactNextElement)),il();let gl=function(e){return e.AGENTS="AGENTS",e}({});const bl="bricks/ai-portal/ai-agents",fl=b.i18n.getFixedT(null,bl);var vl,kl=i(83059);let Al,xl,El;const wl={lib:"antd",icon:"tool"};(0,b.initializeI18n)(bl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const yl=(0,m.wrapBrick)("eo-icon"),{defineElement:Sl,property:Rl}=(0,p.createDecorators)();let Nl;var Ml=new WeakMap;class _l extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ml,xl(this)),El(this)}get list(){return(0,c.A)(Ml,this)}set list(e){(0,l.A)(Ml,this,e)}render(){return h().createElement(Tl,{list:this.list})}}function Tl(e){let{list:t}=e;return h().createElement("div",{className:"container"},h().createElement("h1",null,fl(gl.AGENTS)),h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var i,n;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(yl,(0,cn.A)({},null!==(i=e.icon)&&void 0!==i?i:wl,{fallback:wl}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(n=e.tags)||void 0===n?void 0:n.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description))}))))}vl=_l,({e:[xl,El],c:[Nl,Al]}=(0,d.A)(vl,[Sl("ai-portal.ai-agents",{styleTexts:[kl.A]})],[[Rl({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),Al()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=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(${u});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 h=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/6336f999.png"},42873:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(89518),i.b),d=r()(a()),u=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(${u});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 h=d.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(91107),i.b),d=r()(a()),u=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(${u});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 h=d.toString()},47338:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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 n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;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:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${u});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const h=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=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(${u});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 h=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:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=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(${u});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 h=d.toString()}}]);
|
|
3
|
-
//# sourceMappingURL=6175.
|
|
1
|
+
/*! For license information please see 6175.18e07f1a.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[6175],{24:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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()},15733:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},21411:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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()},29476:(e,t,i)=>{var n,a=i(74635),s=i(70918),r=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),u=i(18769),h=i.n(u),p=i(7921),m=i(11280),g=i(23081),b=(i(65168),i(90079)),f=i(53373),v=i.n(f),k=i(99126),A=i(67566),x=i(8324),E=i(69445),w=i(2460),y=i(32464),S=i(58231),R=i(36494),N=i(97642),M=i(92773),_=i(59533),T=i(34999),C=i(27954),I=i(24388),W=i(56938),z=i(25718),D=i(39295),U=i(83888),V=i(16854),L=i(97907),O=i(44394),Y=i(85620),F=i(73349),P=i(62601),B=i(57097),H=i(85011),j=i(54163),J=i(65023),G=i(92449),$=i(62897),q=i(11303),K=i(31918),X=i(48680),Q=i(45462);let Z,ee,te,ie,ne,ae,se,re,oe,le,ce,de,ue,he,pe,me,ge,be,fe,ve,ke,Ae,xe,Ee,we,ye,Se,Re,Ne,Me,_e,Te,Ce,Ie,We,ze,De,Ue,Ve,Le,Oe,Ye,Fe,Pe,Be,He,je,Je;(0,b.initializeI18n)(w.NS,w.I);const{defineElement:Ge,property:$e,event:qe,method:Ke}=(0,p.createDecorators)(),Xe=(0,u.memo)(Nt),Qe=(0,u.forwardRef)(Rt);let Ze;var et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,st=new WeakMap,rt=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,ht=new WeakSet,pt=new WeakMap,mt=new WeakMap,gt=new WeakMap,bt=new WeakMap,ft=new WeakMap,vt=new WeakMap,kt=new WeakMap,At=new WeakMap,xt=new WeakMap,Et=new WeakMap,wt=new WeakMap,yt=new WeakMap;class St extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ht),(0,s.A)(this,et,(Z(this),te(this))),(0,s.A)(this,tt,(ie(this),ne(this))),(0,s.A)(this,it,(ae(this),se(this))),(0,s.A)(this,nt,(re(this),oe(this))),(0,s.A)(this,at,(le(this),ce(this))),(0,s.A)(this,st,(de(this),ue(this))),(0,s.A)(this,rt,(he(this),pe(this))),(0,s.A)(this,ot,(me(this),ge(this))),(0,s.A)(this,lt,(be(this),fe(this))),(0,s.A)(this,ct,(ve(this),ke(this))),(0,s.A)(this,dt,(Ae(this),xe(this))),(0,s.A)(this,ut,(Ee(this),we(this))),(0,s.A)(this,pt,(Re(this),()=>{(0,o.A)(ht,this,ye).emit()})),(0,s.A)(this,mt,Ne(this)),(0,s.A)(this,gt,(Te(this),()=>{(0,o.A)(ht,this,Me).emit()})),(0,s.A)(this,bt,Ce(this)),(0,s.A)(this,ft,(ze(this),()=>{(0,o.A)(ht,this,Ie).emit()})),(0,s.A)(this,vt,De(this)),(0,s.A)(this,kt,(Le(this),()=>{(0,o.A)(ht,this,Ue).emit()})),(0,s.A)(this,At,Oe(this)),(0,s.A)(this,xt,(Pe(this),e=>{(0,o.A)(ht,this,Ye).emit(e)})),(0,s.A)(this,Et,Be(this)),(0,s.A)(this,wt,(Je(this),()=>{(0,o.A)(ht,this,He).emit("chat")})),(0,s.A)(this,yt,(0,u.createRef)())}get taskId(){return(0,c.A)(et,this)}set taskId(e){(0,l.A)(et,this,e)}get task(){return(0,c.A)(tt,this)}set task(e){(0,l.A)(tt,this,e)}get jobs(){return(0,c.A)(it,this)}set jobs(e){(0,l.A)(it,this,e)}get replay(){return(0,c.A)(nt,this)}set replay(e){(0,l.A)(nt,this,e)}get replayDelay(){return(0,c.A)(at,this)}set replayDelay(e){(0,l.A)(at,this,e)}get supports(){return(0,c.A)(st,this)}set supports(e){(0,l.A)(st,this,e)}get showHiddenJobs(){return(0,c.A)(rt,this)}set showHiddenJobs(e){(0,l.A)(rt,this,e)}get showFeedback(){return(0,c.A)(ot,this)}set showFeedback(e){(0,l.A)(ot,this,e)}get showUiSwitch(){return(0,c.A)(lt,this)}set showUiSwitch(e){(0,l.A)(lt,this,e)}get hideMermaid(){return(0,c.A)(ct,this)}set hideMermaid(e){(0,l.A)(ct,this,e)}get showJsxEditor(){return(0,c.A)(dt,this)}set showJsxEditor(e){(0,l.A)(dt,this,e)}resumed(){var e;null===(e=(0,c.A)(yt,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(yt,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(yt,this).current)||void 0===e||e.feedbackSubmitFailed()}render(){return h().createElement(Qe,{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,showJsxEditor:this.showJsxEditor,onShare:(0,c.A)(pt,this),onPause:(0,c.A)(gt,this),onResume:(0,c.A)(ft,this),onCancel:(0,c.A)(kt,this),onSubmitFeedback:(0,c.A)(xt,this),onSwitchToChat:(0,c.A)(wt,this),ref:(0,c.A)(yt,this)})}}function Rt(e,t){var i;let{taskId:n,task:a,jobs:s,replay:r,replayDelay:o,supports:l,showHiddenJobs:c,showFeedback:d,showUiSwitch:p,showJsxEditor:m,onShare:b,onPause:f,onResume:k,onCancel:w,onSubmitFeedback:C,onSwitchToChat:I}=e;const W=(0,u.useRef)(null),{task:z,jobs:D,error:U,humanInputRef:q,resumedRef:X,skipToResults:Z,watchAgain:ee}=(0,M.S)(n,r,o),te=n?z:a,ie=n?D:s,ne=null==te?void 0:te.plan,ae=(0,_.B)(te,ie,{showHiddenJobs:c}),se=null==ae?void 0:ae.nodes,re=null==ae?void 0:ae.edges,oe=null==ae?void 0:ae.nav,le=null==ae?void 0:ae.views,ce=null==ae?void 0:ae.jobLevels,de=null!==(i=null==te?void 0:te.title)&&void 0!==i?i:"",ue=null==te?void 0:te.state,[he,pe]=(0,u.useState)(null),me=(0,u.useMemo)((()=>{if(he){const[e,t]=he.split(":");if("job"===e||"view"===e)return t}return null}),[he]),[ge,be]=(0,u.useState)(!1),[fe,ve]=(0,u.useState)(!1),[ke,Ae]=(0,u.useState)(!!d);(0,u.useEffect)((()=>{Ae(!!d)}),[d]);const xe=(0,u.useCallback)((e=>{be(!0),C(e)}),[C]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.call(X)},feedbackSubmitDone:()=>{ve(!0),setTimeout((()=>{Ae(!1)}),3e3)},feedbackSubmitFailed:()=>{be(!1)}})),[X]);const Ee=(0,u.useRef)(!1);(0,u.useEffect)((()=>{const e=setTimeout((()=>{Ee.current=!0}),3e3);return()=>{clearTimeout(e)}}),[]),(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(de)}),[de]),(0,u.useEffect)((()=>{U&&(0,g.handleHttpError)(U)}),[U]);const we=(0,u.useCallback)(((e,t)=>{var i;null===(i=q.current)||void 0===i||i.call(q,e,t)}),[q]),[ye,Se]=(0,u.useState)(null),Re=(0,u.useCallback)(((e,t)=>{Se((i=>{if(!t){if(!i)return null;const t=new Map(i);return t.delete(e)?t:i}return i?new Map(i).set(e,t):new Map([[e,t]])}))}),[]),{sizeReady:Ne,nodes:Me,edges:_e}=(0,N.g)({rawNodes:se,rawEdges:re,state:ue,sizeMap:ye,showFeedback:ke}),Te=(0,u.useRef)(!1),Ce=(0,u.useRef)(!1),[Ie,We]=(0,u.useState)(!1),{grabbing:ze,transform:De,transformRef:Ue,zoomer:Ve}=(0,S.f)({rootRef:W,zoomable:Ne,scrollable:Ne&&!Ie,pannable:Ne,manualScrolledUpRef:Ce}),Le=(0,u.useRef)(!1),Oe=(0,u.useMemo)((()=>{let e=null;const t=i=>{const n=Ue.current,a="function"==typeof i?i(n):i;if(!a)return;const{transform:s,translateBy:r}=a;let o=(0,A.A)(W.current);var l,c,d,u,h,p;Ee.current&&0!==a.duration&&(Le.current=!0,o=o.transition().duration(null!==(l=a.duration)&&void 0!==l?l:300).ease((e=>e*(2-e))).on("end",(()=>{if(Le.current=!1,e){const i=e;e=null,t(i)}}))),s?Ve.transform(o,new x.uV(null!==(c=s.k)&&void 0!==c?c:n.k,null!==(d=s.x)&&void 0!==d?d:n.x,null!==(u=s.y)&&void 0!==u?u:n.y)):Ve.translateBy(o,null!==(h=r[0])&&void 0!==h?h:0,null!==(p=r[1])&&void 0!==p?p:0)};return i=>{Le.current?e=i:t(i)}}),[Ue,Ve]),{centered:Ye,setCentered:Fe,reCenterRef:Pe}=(0,R.E)({nodes:Me,sizeReady:Ne,zoomer:Ve,rootRef:W,pushZoomTransition:Oe}),Be=L.QB.includes(ue),He=(0,u.useMemo)((()=>new Set(_e.map((e=>e.source)))),[_e]),je=(0,u.useMemo)((()=>{if(!Ne)return null;const e=[];for(const t of Me)He.has(t.id)||e.push(t);return e.length>0?Math.max(...e.map((e=>e.view.y+e.view.height))):null}),[Me,He,Ne]),Je=(0,u.useRef)(null);(0,u.useEffect)((()=>{Je.current=je}),[je]),(0,u.useEffect)((()=>{const e=W.current;!e||null===je||Te.current&&Ce.current||Oe((t=>{const{offsetHeight:i}=e,n=je*t.k+t.y,a=i-V.xX-n;return a<0?{transform:{y:t.y+a},duration:a>-100?100:a<-500?300:200}:null}))}),[je,Oe]),(0,u.useEffect)((()=>{const e=Je.current,t=W.current;if(!t||null===e||Le.current)return;const{offsetHeight:i}=t,n=e*De.k+De.y,a=i-V.xX-n;Te.current=a<0}),[De,Ve]);const Ge=(0,u.useCallback)((()=>{Pe.current=!0,Fe(!1)}),[Pe,Fe]),$e=(0,u.useCallback)((e=>{Ve.scaleTo((0,A.A)(W.current),e)}),[Ve]),qe=(0,u.useMemo)((()=>Ne?(0,E.o)(Me.map((e=>e.view))):null),[Me,Ne]);(0,u.useEffect)((()=>{if(!qe)return;const e=W.current;if(!e)return;const{offsetWidth:t,offsetHeight:i}=e,n=t/De.k,a=i/De.k,s=-(n-20-qe.x),r=n-20+(qe.x+qe.width),o=-(a-20-qe.y),l=a-20+(qe.y+qe.height);Ve.translateExtent([[s,o],[r,l]])}),[Ve,De.k,qe]);const Ke=(0,u.useCallback)((e=>{let{nodeId:t,jobId:i,behavior:n,block:a}=e;const s=W.current,r=Me.filter((e=>{var n;return!(t&&e.id!==t||i&&(null===(n=e.job)||void 0===n?void 0:n.id)!==i)}));if(!s||0===r.length)return;const o=(0,E.o)(r.map((e=>e.view))),{x:l,y:c}=(0,P.D)(o,[s.offsetWidth,s.offsetHeight],[V.RV,V.kq,V.xX,V.bL],Ue.current,a);(l||c)&&Oe({translateBy:[l,c],duration:"instant"===n?0:void 0})}),[Me,Oe,Ue]),Qe=(0,u.useCallback)(((e,t)=>{const i=W.current;if(!i||!Ne)return;let n,a=0,s=0,r=300;const o="left"===e||"right"===e;if("line"===t)n=40*("up"===e||"left"===e?1:-1),r=150;else if("page"===t)n=(i.offsetHeight-V.xX)*("up"===e?-1:1);else{const{y:t,height:a}=(0,E.o)(Me.map((e=>e.view)));if("down"===e){const e=t+a-t+V.xX;n=i.offsetHeight-e-Ue.current.y}else n=t+V.RV-Ue.current.y}o?a=n:s=n,(a||s)&&Oe({translateBy:[a,s],duration:r})}),[Me,Oe,Ne,Ue]),[Ze,et]=(0,u.useState)(null),[tt,it]=(0,u.useState)(null),[nt,at]=h().useState(null),[st,rt]=(0,u.useState)(),[ot,lt]=(0,u.useState)(),ct=(0,u.useCallback)(((e,t)=>{lt((i=>{const n=new Map(i);return n.set(e,t),n}))}),[]),dt=(0,u.useMemo)((()=>({humanInput:we,onShare:b,onPause:f,onResume:k,onCancel:w,supports:l,activeExpandedViewJobId:tt,setActiveExpandedViewJobId:it,activeToolCallJobId:Ze,setActiveToolCallJobId:et,submittingFeedback:ge,submittedFeedback:fe,onSubmitFeedback:xe,setShowFeedback:Ae,showJsxEditor:m,activeJsxEditorJob:st,setActiveJsxEditorJob:rt,manuallyUpdatedViews:ot,updateView:ct})),[we,w,f,k,b,l,tt,Ze,ge,fe,xe,m,st,ot,ct]),ut=(0,u.useMemo)((()=>({onNodeResize:Re,setActiveNodeId:pe,hoverOnScrollableContent:Ie,setHoverOnScrollableContent:We,setActiveFile:at})),[Ie,Re]),ht=(0,u.useMemo)((()=>Ze?null==ie?void 0:ie.find((e=>e.id===Ze)):null),[Ze,ie]),pt=(0,u.useCallback)((e=>{for(const t of e.nativeEvent.composedPath()){if(t instanceof HTMLElement&&t.classList.contains(y.A.node))return;if(t===W.current)break}pe(null)}),[]);return(0,u.useEffect)((()=>{const e=W.current;if(!e||ht||tt||nt)return;const t=t=>{if(document.activeElement&&document.activeElement!==document.body&&document.activeElement!==e)return;const i=(0,B.l)(t,{activeNodeId:he,nodes:Me});if(!i)return;const{action:n,node:a}=i;if("scroll"===n)Qe(i.direction,i.range);else if("enter"===n){var s,r;if("job"!==a.type&&"view"!==a.type)return;const e="ask_human"===(null===(s=a.job.toolCall)||void 0===s?void 0:s.name),t="ask_human_confirming_plan"===(null===(r=a.job.toolCall)||void 0===r?void 0:r.name);if(e||t)return}t.preventDefault(),t.stopPropagation(),"enter"===n?"view"===a.type?it(a.job.id):et(a.job.id):"switch-active-node"===n&&(a?(pe(a.id),"job"===a.type||"view"===a.type?Ke({jobId:a.job.id,behavior:"smooth"}):Ke({nodeId:a.id,behavior:"smooth"})):pe(null))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[he,ht,tt,nt,Me,Ke,Qe]),h().createElement(K.j.Provider,{value:dt},h().createElement(Y.Q.Provider,{value:ut},h().createElement("div",{className:v()(y.A.root,{[y.A.loading]:!te}),ref:W,style:{cursor:ze?"grabbing":"grab"},tabIndex:-1,onClick:pt},!te&&h().createElement("div",{className:y.A["loading-icon"]},h().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),h().createElement("div",{className:v()(y.A.canvas,{[y.A.ready]:Ne&&Ye}),style:{transform:`translate3d(${De.x}px, ${De.y}px, 0) scale(${De.k})`}},h().createElement("svg",{className:y.A.edges},_e.map((e=>e.source===V.Jw||e.target===V.Jw?null:h().createElement("path",{className:y.A.edge,key:`${e.source}-${e.target}`,d:e.points.map(((e,t)=>{let{x:i,y:n}=e;return`${0===t?"M":"L"}${i},${n}`})).join(" ")})))),Me.map((e=>{var t,i;return h().createElement(Xe,{key:e.id,id:e.id,type:e.type,content:e.content,job:e.job,state:e.state,startTime:null==te?void 0:te.startTime,instructionLoading:"instruction"===e.type&&!He.has(e.id)&&!L.QB.includes(e.state)&&!L.X4.includes(ue),edges:_e,x:null===(t=e.view)||void 0===t?void 0:t.x,y:null===(i=e.view)||void 0===i?void 0:i.y,active:he===e.id})})))),h().createElement("div",{className:y.A.widgets},h().createElement(j.s,{nav:oe,plan:ne,jobs:ie,jobLevels:ce,currentNavId:me,taskState:ue,onClick:e=>{pe(`job:${e}`),Ke({jobId:e,block:"start"})}}),h().createElement(T.l,{scale:De.k,showUiSwitch:p,onScaleChange:$e,onReCenter:Ge,onSwitchToChat:I}),r?h().createElement("div",{className:y.A["footer-container"]},h().createElement(J.b,{taskDone:Be,skipToResults:Z,watchAgain:()=>{ee(),Fe(!1)}})):null!=l&&l.chat?h().createElement("div",{className:y.A["footer-container"]},h().createElement(G.s,{taskState:ue,taskDone:Be})):null),ht&&h().createElement(F.M,{job:ht}),tt&&h().createElement(H.f,{views:le}),nt&&h().createElement($.d,{file:nt}),m&&st&&h().createElement(Q.D,null)))}function Nt(e){let{id:t,type:i,state:n,job:a,content:s,startTime:r,instructionLoading:o,x:l,y:c,active:d}=e;const p=(0,u.useRef)(null),{onNodeResize:m,setActiveNodeId:g}=(0,u.useContext)(Y.Q);(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const i=new k.A((()=>{m(t,[e.offsetWidth,e.offsetHeight])}));return i.observe(e),()=>{i.disconnect(),m(t,null)}}),[t,m]),(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const t=e=>{e.stopPropagation()};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}}),[]);const b=(0,u.useCallback)((()=>{"start"!==i&&"instruction"!==i&&g(t)}),[t,g,i]);return h().createElement("div",{className:v()(y.A.node,{[y.A.ready]:null!=l&&null!=c}),ref:p,style:{left:l,top:c},onClick:b},"start"===i?h().createElement(C.H,null):"end"===i?h().createElement(D.s,null):"feedback"===i?h().createElement(q.k,null):"requirement"===i?h().createElement(I.O,{content:s,startTime:r,active:d}):"loading"===i?h().createElement(X.V,null):"instruction"===i?h().createElement(W.L,{content:a.instruction,loading:o}):"view"===i?h().createElement(U.Y,{job:a,active:d}):h().createElement(z.W,{state:n,job:a,active:d}))}n=St,({e:[te,ie,ne,ae,se,re,oe,le,ce,de,ue,he,pe,me,ge,be,fe,ve,ke,Ae,xe,Ee,we,ye,Se,Re,Ne,Me,_e,Te,Ce,Ie,We,ze,De,Ue,Ve,Le,Oe,Ye,Fe,Pe,Be,He,je,Je,Z],c:[Ze,ee]}=(0,d.A)(n,[Ge("ai-portal.cruise-canvas",{shadowOptions:!1})],[[$e(),1,"taskId"],[$e({attribute:!1}),1,"task"],[$e({attribute:!1}),1,"jobs"],[$e({type:Boolean}),1,"replay"],[$e({type:Number}),1,"replayDelay"],[$e({attribute:!1}),1,"supports"],[$e({type:Boolean}),1,"showHiddenJobs"],[$e({type:Boolean}),1,"showFeedback"],[$e({type:Boolean}),1,"showUiSwitch"],[$e({type:Boolean,render:!1}),1,"hideMermaid"],[$e({type:Boolean}),1,"showJsxEditor"],[qe({type:"share"}),1,"shareEvent",e=>(0,c.A)(ut,e),(e,t)=>(0,l.A)(ut,e,t)],[qe({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(mt,e),(e,t)=>(0,l.A)(mt,e,t)],[qe({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(bt,e),(e,t)=>(0,l.A)(bt,e,t)],[qe({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(vt,e),(e,t)=>(0,l.A)(vt,e,t)],[qe({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(At,e),(e,t)=>(0,l.A)(At,e,t)],[qe({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Et,e),(e,t)=>(0,l.A)(Et,e,t)],[Ke(),2,"resumed"],[Ke(),2,"feedbackSubmitDone"],[Ke(),2,"feedbackSubmitFailed"]],0,(e=>yt.has((0,r.A)(e))),m.ReactNextElement)),ee();var Mt=i(71451),_t=i(41030);let Tt=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const Ct="bricks/ai-portal/chat-box",It={en:{[Tt.ASK_ANY_THING]:"Ask anything",[Tt.COMMON_TASKS]:"Common tasks"},zh:{[Tt.ASK_ANY_THING]:"询问任何问题",[Tt.COMMON_TASKS]:"常用任务"}},Wt=b.i18n.getFixedT(null,Ct),zt=i.p+"images/af389fa6.svg";var Dt,Ut=i(47008);let Vt,Lt,Ot,Yt,Ft,Pt,Bt,Ht,jt,Jt,Gt,$t,qt,Kt,Xt;(0,b.initializeI18n)(Ct,It);const Qt=(0,m.wrapBrick)("eo-icon"),{defineElement:Zt,property:ei,event:ti}=(0,p.createDecorators)();let ii;var ni=new WeakMap,ai=new WeakMap,si=new WeakMap,ri=new WeakMap,oi=new WeakMap,li=new WeakMap,ci=new WeakSet,di=new WeakMap;class ui extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,ci),(0,s.A)(this,ni,Lt(this)),(0,s.A)(this,ai,(Ot(this),Yt(this))),(0,s.A)(this,si,(Ft(this),Pt(this))),(0,s.A)(this,ri,(Bt(this),Ht(this))),(0,s.A)(this,oi,(jt(this),Jt(this))),(0,s.A)(this,li,(Gt(this),$t(this))),(0,s.A)(this,di,(Xt(this),e=>{(0,o.A)(ci,this,qt).emit(e)}))}get disabled(){return(0,c.A)(ni,this)}set disabled(e){(0,l.A)(ni,this,e)}get placeholder(){return(0,c.A)(ai,this)}set placeholder(e){(0,l.A)(ai,this,e)}get autoFocus(){return(0,c.A)(si,this)}set autoFocus(e){(0,l.A)(si,this,e)}get suggestions(){return(0,c.A)(ri,this)}set suggestions(e){(0,l.A)(ri,this,e)}get suggestionsLabel(){return(0,c.A)(oi,this)}set suggestionsLabel(e){(0,l.A)(oi,this,e)}render(){return h().createElement(hi,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(di,this)})}}function hi(e){let{disabled:t,placeholder:i,autoFocus:n,suggestions:a,suggestionsLabel:s,onSubmit:r}=e;const o=(0,u.useRef)(null),l=(0,u.useRef)(null),[c,d]=(0,u.useState)(""),p=(0,u.useRef)(""),m=(0,u.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,u.useCallback)((e=>{p.current=e.target.value,d(e.target.value)}),[]),b=(0,u.useCallback)((()=>{null==r||r(p.current)}),[r]);(0,u.useEffect)((()=>{n&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const f=(0,u.useMemo)((()=>null!=a&&a.length?(0,_t.chunk)(a,Math.max(2,Math.ceil(a.length/2))):[]),[a]),v=(0,u.useCallback)((e=>{p.current=e.content,d(e.content),setTimeout((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:o},h().createElement(Mt.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=i?i:Wt(Tt.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:m,onChange:g}),h().createElement("button",{className:"btn-send",disabled:!c,onClick:b},h().createElement(Qt,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),!(null==f||!f.length)&&h().createElement("div",{className:"suggestions"},h().createElement("div",{className:"heading"},h().createElement("img",{className:"icon",src:zt,width:16,height:16}),h().createElement("span",null,null!=s?s:Wt(Tt.COMMON_TASKS))),f.map(((e,t)=>h().createElement(pi,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:v})))))}function pi(e){let{suggestions:t,pixelPerSecond:i,onSelect:n}=e;const a=(0,u.useRef)(null),s=(0,u.useRef)(null),[r,o]=(0,u.useState)(0);return(0,u.useEffect)((()=>{const e=a.current,t=s.current;if(!e||!t)return;let n,r,l,c,d=0;const u=(t.offsetWidth-7)/2+7;function h(e){r=e,void 0===l&&(l=e),void 0!==n&&(d+=e-n,n=void 0),o((e-l-d)/1e3*i%u),c=requestAnimationFrame(h)}c=requestAnimationFrame(h);const p=()=>{cancelAnimationFrame(c),n=r},m=()=>{c=requestAnimationFrame(h)};return e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",m),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",m)}}),[t,i]),h().createElement("div",{className:"carousel",ref:a},h().createElement("ul",{className:"list",ref:s,style:{transform:`translateX(${-r}px)`}},[...t,...t].map(((e,t)=>h().createElement("li",{key:t},h().createElement("div",{className:"item",onClick:()=>n(e),title:e.content},h().createElement("div",{className:"title"},e.title),h().createElement("div",{className:"content"},e.content)))))))}Dt=ui,({e:[Lt,Ot,Yt,Ft,Pt,Bt,Ht,jt,Jt,Gt,$t,qt,Kt,Xt],c:[ii,Vt]}=(0,d.A)(Dt,[Zt("ai-portal.chat-box",{styleTexts:[Ut.A]})],[[ei({type:Boolean}),1,"disabled"],[ei(),1,"placeholder"],[ei({type:Boolean}),1,"autoFocus"],[ei({attribute:!1}),1,"suggestions"],[ei(),1,"suggestionsLabel"],[ti({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(li,e),(e,t)=>(0,l.A)(li,e,t)]],0,(e=>di.has((0,r.A)(e))),m.ReactNextElement)),Vt();var mi,gi=i(82165);let bi;const{defineElement:fi}=(0,p.createDecorators)();let vi;class ki extends m.ReactNextElement{render(){return h().createElement(Ai,null)}}function Ai(){return h().createElement("slot",null)}mi=ki,[vi,bi]=(0,d.A)(mi,[fi("ai-portal.home-container",{styleTexts:[gi.A]})],[],0,void 0,m.ReactNextElement).c,bi();var xi=i(21302),Ei=i.n(xi);let wi=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 yi="bricks/ai-portal/chat-history",Si={en:{[wi.TODAY]:"Today",[wi.YESTERDAY]:"Yesterday",[wi.PREVIOUS_7_DAYS]:"Previous 7 days",[wi.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[wi.TODAY]:"今天",[wi.YESTERDAY]:"昨天",[wi.PREVIOUS_7_DAYS]:"过去7天",[wi.PREVIOUS_30_DAYS]:"过去30天"}},Ri=b.i18n.getFixedT(null,yi);var Ni,Mi=i(21411);let _i,Ti,Ci,Ii,Wi,zi,Di,Ui,Vi,Li,Oi,Yi,Fi,Pi,Bi;(0,b.initializeI18n)(yi,Si);const Hi=(0,m.wrapBrick)("eo-icon"),ji=(0,m.wrapBrick)("eo-link"),Ji=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Gi,property:$i,event:qi}=(0,p.createDecorators)();let Ki;var Xi=new WeakMap,Qi=new WeakMap,Zi=new WeakMap,en=new WeakMap,tn=new WeakSet,nn=new WeakMap,an=new WeakMap,sn=new WeakMap;class rn extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,tn),(0,s.A)(this,Xi,Ti(this)),(0,s.A)(this,Qi,(Ci(this),Ii(this))),(0,s.A)(this,Zi,(Wi(this),zi(this))),(0,s.A)(this,en,(Di(this),Ui(this))),(0,s.A)(this,nn,(Oi(this),e=>{(0,o.A)(tn,this,Vi).emit(e)})),(0,s.A)(this,an,Yi(this)),(0,s.A)(this,sn,(Bi(this),e=>{(0,o.A)(tn,this,Fi).emit({nextToken:e})}))}get list(){return(0,c.A)(Xi,this)}set list(e){(0,l.A)(Xi,this,e)}get actions(){return(0,c.A)(Qi,this)}set actions(e){(0,l.A)(Qi,this,e)}get nextToken(){return(0,c.A)(Zi,this)}set nextToken(e){(0,l.A)(Zi,this,e)}render(){return h().createElement(on,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(nn,this),onLoadMore:(0,c.A)(sn,this)})}}function on(e){let{root:t,list:i,actions:n,nextToken:a,onActionClick:s,onLoadMore:r}=e;const o=(0,u.useMemo)((()=>{const e=new Map,t=Ei()(),n=t.clone().startOf("day"),a=n.clone().subtract(1,"day"),s=n.clone().subtract(7,"days"),r=n.clone().subtract(30,"days"),o=+n/1e3,l=+a/1e3,c=+s/1e3,d=+r/1e3,u=+t.clone().startOf("year")/1e3;for(const t of null!=i?i:[]){let i;i=t.startTime>=o?Ri(wi.TODAY):t.startTime>=l?Ri(wi.YESTERDAY):t.startTime>=c?Ri(wi.PREVIOUS_7_DAYS):t.startTime>=d?Ri(wi.PREVIOUS_30_DAYS):t.startTime>=u?Ei()(1e3*t.startTime).format("MMMM"):Ei()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[i]),[l,c]=(0,u.useState)(null),d=(0,u.useRef)(null);return(0,u.useEffect)((()=>{const e=d.current;if(!e||!a)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(a)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[a,r,t]),i?h().createElement(h().Fragment,null,h().createElement("ul",null,o.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>h().createElement("li",{key:e.id},h().createElement(ji,{className:v()("item",{active:l===e.id}),url:e.url},h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(Ji,{className:"actions",actions:n,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!L.QB.includes(e.state)&&h().createElement("div",{className:"working"})))))))))),a&&h().createElement("div",{className:"load-more",ref:d},h().createElement(Hi,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"loading"},h().createElement(Hi,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}Ni=rn,({e:[Ti,Ci,Ii,Wi,zi,Di,Ui,Vi,Li,Oi,Yi,Fi,Pi,Bi],c:[Ki,_i]}=(0,d.A)(Ni,[Gi("ai-portal.chat-history",{styleTexts:[Mi.A]})],[[$i({attribute:!1}),1,"list"],[$i({attribute:!1}),1,"actions"],[$i(),1,"nextToken"],[qi({type:"action.click"}),1,"actionClick",e=>(0,c.A)(en,e),(e,t)=>(0,l.A)(en,e,t)],[qi({type:"load.more"}),1,"loadMore",e=>(0,c.A)(an,e),(e,t)=>(0,l.A)(an,e,t)]],0,(e=>sn.has((0,r.A)(e))),m.ReactNextElement)),_i();var ln,cn=i(89575),dn=i(24);let un,hn,pn,mn,gn,bn,fn,vn,kn,An,xn,En,wn,yn,Sn,Rn,Nn,Mn,_n,Tn,Cn;const In=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:Wn,property:zn}=(0,p.createDecorators)();let Dn;var Un=new WeakMap,Vn=new WeakMap,Ln=new WeakMap,On=new WeakMap,Yn=new WeakMap,Fn=new WeakMap,Pn=new WeakMap,Bn=new WeakMap,Hn=new WeakMap,jn=new WeakMap;class Jn extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Un,hn(this)),(0,s.A)(this,Vn,(pn(this),mn(this))),(0,s.A)(this,Ln,(gn(this),bn(this))),(0,s.A)(this,On,(fn(this),vn(this))),(0,s.A)(this,Yn,(kn(this),An(this))),(0,s.A)(this,Fn,(xn(this),En(this))),(0,s.A)(this,Pn,(wn(this),yn(this))),(0,s.A)(this,Bn,(Sn(this),Rn(this))),(0,s.A)(this,Hn,(Nn(this),Mn(this))),(0,s.A)(this,jn,(_n(this),Tn(this))),Cn(this)}get label(){return(0,c.A)(Un,this)}set label(e){(0,l.A)(Un,this,e)}get value(){return(0,c.A)(Vn,this)}set value(e){(0,l.A)(Vn,this,e)}get size(){return(0,c.A)(Ln,this)}set size(e){(0,l.A)(Ln,this,e)}get lineColor(){return(0,c.A)(On,this)}set lineColor(e){(0,l.A)(On,this,e)}get showArea(){return(0,c.A)(Yn,this)}set showArea(e){(0,l.A)(Yn,this,e)}get min(){return(0,c.A)(Fn,this)}set min(e){(0,l.A)(Fn,this,e)}get max(){return(0,c.A)(Pn,this)}set max(e){(0,l.A)(Pn,this,e)}get xField(){return(0,c.A)(Bn,this)}set xField(e){(0,l.A)(Bn,this,e)}get yField(){return(0,c.A)(Hn,this)}set yField(e){(0,l.A)(Hn,this,e)}get data(){return(0,c.A)(jn,this)}set data(e){(0,l.A)(jn,this,e)}render(){return h().createElement(Gn,{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 Gn(e){let{label:t,value:i,size:n,...a}=e;return"small"===n?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},i)),h().createElement("div",{className:"chart"},h().createElement(In,(0,cn.A)({},a,{lineWidth:1.5,width:"auto",height:"55"})))):h().createElement("div",{className:"container"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat-and-chart"},h().createElement("div",{className:"chart"},h().createElement(In,(0,cn.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}ln=Jn,({e:[hn,pn,mn,gn,bn,fn,vn,kn,An,xn,En,wn,yn,Sn,Rn,Nn,Mn,_n,Tn,Cn],c:[Dn,un]}=(0,d.A)(ln,[Wn("ai-portal.stat-with-mini-chart",{styleTexts:[dn.A]})],[[zn(),1,"label"],[zn(),1,"value"],[zn(),1,"size"],[zn(),1,"lineColor"],[zn({type:Boolean}),1,"showArea"],[zn({type:Number}),1,"min"],[zn({type:Number}),1,"max"],[zn(),1,"xField"],[zn(),1,"yField"],[zn({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),un();const $n=i.p+"images/e47076cc.png";var qn,Kn=i(31653);let Xn;const{defineElement:Qn}=(0,p.createDecorators)();let Zn;class ea extends m.ReactNextElement{render(){return h().createElement(ta,null)}}function ta(){return h().createElement("img",{src:$n,alt:"Elevo",width:95,height:28})}qn=ea,[Zn,Xn]=(0,d.A)(qn,[Qn("ai-portal.elevo-logo",{styleTexts:[Kn.A]})],[],0,void 0,m.ReactNextElement).c,Xn();let ia=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",aa={en:{[ia.NEW_CHAT]:"New chat",[ia.LOGOUT]:"Logout",[ia.TODAY]:"Today",[ia.YESTERDAY]:"Yesterday",[ia.PREVIOUS_7_DAYS]:"Previous 7 days",[ia.PREVIOUS_30_DAYS]:"Previous 30 days",[ia.SWITCH_LANGUAGE]:"中文"},zh:{[ia.NEW_CHAT]:"新对话",[ia.LOGOUT]:"登出",[ia.TODAY]:"今天",[ia.YESTERDAY]:"昨天",[ia.PREVIOUS_7_DAYS]:"过去7天",[ia.PREVIOUS_30_DAYS]:"过去30天",[ia.SWITCH_LANGUAGE]:"English"}},sa=b.i18n.getFixedT(null,na);var ra=i(61408);const oa=(0,m.wrapBrick)("eo-icon"),la=(0,m.wrapBrick)("eo-link"),ca=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),da=(0,m.wrapBrick)("eo-easyops-avatar"),ua=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),ha=(0,m.wrapBrick)("ai-portal.icon-button");var pa=i(57372);const ma=async(e,t)=>(await pa.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data,ga=(0,u.forwardRef)(ba);function ba(e,t){let{activeId:i,actions:n,urlTemplate:a,onActionClick:s,onHistoryClick:r}=e;const o=(0,u.useRef)(null),[l,c]=(0,u.useState)(null),[d,p]=(0,u.useState)(),[m,g]=(0,u.useState)();(0,u.useEffect)((()=>{Promise.all([ma({next_token:m},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;c((e=>[...null!=e?e:[],...t.data])),p(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[m]);const b=(0,u.useMemo)((()=>{const e=new Map,t=Ei()(),i=t.clone().startOf("day"),n=i.clone().subtract(1,"day"),a=i.clone().subtract(7,"days"),s=i.clone().subtract(30,"days"),r=+i/1e3,o=+n/1e3,c=+a/1e3,d=+s/1e3,u=+t.clone().startOf("year")/1e3;for(const t of null!=l?l:[]){let i;i=t.startTime>=r?sa(ia.TODAY):t.startTime>=o?sa(ia.YESTERDAY):t.startTime>=c?sa(ia.PREVIOUS_7_DAYS):t.startTime>=d?sa(ia.PREVIOUS_30_DAYS):t.startTime>=u?Ei()(1e3*t.startTime).format("MMMM"):Ei()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[l]),[f,k]=(0,u.useState)(null),A=(0,u.useRef)(null);(0,u.useEffect)((()=>{const e=A.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 x=(0,u.useRef)(0),E=(0,u.useCallback)((async()=>{try{const e=++x.current,t=await ma({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==x.current)return;c((e=>{const i=null!=e?e:[],n=t.data,a=new Set(n.map((e=>e.id))),s=new Map(n.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!==n[0]||!(0,_t.isEqual)(t,e),o)break;l=!1}return r?o?[...n,...i.filter((e=>!a.has(e.id)))]:e:(p(t.next_token),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,u.useImperativeHandle)(t,(()=>({pull:E})),[E]),l?h().createElement("div",{className:"history",ref:o},h().createElement("ul",null,b.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>{return h().createElement("li",{key:e.id},h().createElement(la,(0,cn.A)({className:v()("item",{"actions-active":e.id===f,active:e.id===i}),onClick:r},a?{url:(t=a,o=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,_t.get)(o,t))))}:null),h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(ua,{className:"actions",actions:n,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{k(t.detail?e.id:null)}}),!L.QB.includes(e.state)&&h().createElement("div",{className:"working"})));var t,o}))))))),d&&h().createElement("div",{className:"load-more",ref:A},h().createElement(oa,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"history"},h().createElement("div",{className:"loading"},h().createElement(oa,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}var fa;let va,ka,Aa,xa,Ea,wa,ya,Sa,Ra,Na,Ma,_a,Ta,Ca,Ia,Wa,za,Da,Ua,Va,La,Oa,Ya,Fa,Pa,Ba;(0,b.initializeI18n)(na,aa);const Ha={lib:"easyops",icon:"sidebar"},{defineElement:ja,property:Ja,event:Ga,method:$a}=(0,p.createDecorators)(),qa=(0,u.forwardRef)(hs);let Ka;var Xa=new WeakMap,Qa=new WeakMap,Za=new WeakMap,es=new WeakMap,ts=new WeakMap,is=new WeakMap,ns=new WeakMap,as=new WeakMap,ss=new WeakMap,rs=new WeakSet,os=new WeakMap,ls=new WeakMap,cs=new WeakMap,ds=new WeakMap;class us extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,rs),(0,s.A)(this,Xa,(va(this),Aa(this))),(0,s.A)(this,Qa,(xa(this),Ea(this))),(0,s.A)(this,Za,(wa(this),ya(this))),(0,s.A)(this,es,(Sa(this),Ra(this))),(0,s.A)(this,ts,(Na(this),Ma(this))),(0,s.A)(this,is,(_a(this),Ta(this))),(0,s.A)(this,ns,(Ca(this),Ia(this))),(0,s.A)(this,as,(Wa(this),za(this))),(0,s.A)(this,ss,(Da(this),Ua(this))),(0,s.A)(this,os,(Oa(this),()=>{(0,o.A)(rs,this,Va).emit()})),(0,s.A)(this,ls,Ya(this)),(0,s.A)(this,cs,(Ba(this),e=>{(0,o.A)(rs,this,Fa).emit(e)})),(0,s.A)(this,ds,(0,u.createRef)())}get userInstanceId(){return(0,c.A)(Xa,this)}set userInstanceId(e){(0,l.A)(Xa,this,e)}get behavior(){return(0,c.A)(Qa,this)}set behavior(e){(0,l.A)(Qa,this,e)}get logoUrl(){return(0,c.A)(Za,this)}set logoUrl(e){(0,l.A)(Za,this,e)}get newChatUrl(){return(0,c.A)(es,this)}set newChatUrl(e){(0,l.A)(es,this,e)}get historyActiveId(){return(0,c.A)(ts,this)}set historyActiveId(e){(0,l.A)(ts,this,e)}get historyUrlTemplate(){return(0,c.A)(is,this)}set historyUrlTemplate(e){(0,l.A)(is,this,e)}get historyActions(){return(0,c.A)(ns,this)}set historyActions(e){(0,l.A)(ns,this,e)}get links(){return(0,c.A)(as,this)}set links(e){(0,l.A)(as,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(ds,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(ds,this).current)||void 0===e||e.close()}render(){return h().createElement(qa,{ref:(0,c.A)(ds,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)(os,this),onActionClick:(0,c.A)(cs,this)})}}function hs(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:s,historyActiveId:r,historyUrlTemplate:o,historyActions:l,links:c,onLogout:d,onActionClick:p}=e;const[m,f]=(0,u.useState)("drawer"===n),k=(0,u.useCallback)((()=>{f(!0)}),[]),A=(0,u.useCallback)((()=>{f(!1)}),[]);(0,u.useEffect)((()=>{"drawer"===n&&f(!0)}),[n]);const x=(0,u.useCallback)((()=>{f(!0)}),[]),E=(0,u.useCallback)((()=>{"drawer"===n&&f(!0)}),[n]),w=(0,u.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:sa(ia.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:sa(ia.SWITCH_LANGUAGE)}]),[]),y=(0,u.useRef)(null);return(0,u.useImperativeHandle)(t,(()=>({close:()=>{f(!0)},pull:()=>{var e;null===(e=y.current)||void 0===e||e.pull()}})),[]),h().createElement("div",{className:v()("container",{collapsed:m})},"drawer"===n&&!m&&h().createElement("div",{className:"mask",onClick:x}),h().createElement("div",{className:"alternative"},h().createElement(ha,{icon:Ha,variant:"light",onClick:A}),h().createElement(la,{className:"new-chat",url:s},h().createElement(oa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),sa(ia.NEW_CHAT))),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(la,{url:a,className:"logo-link"},h().createElement("img",{className:"logo",alt:"Elevo",src:$n,width:95,height:28})),h().createElement(ha,{icon:Ha,variant:"light",onClick:k})),h().createElement(la,{className:"new-chat",url:s},h().createElement(oa,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),sa(ia.NEW_CHAT)),null!=c&&c.length?h().createElement("div",{className:"links"},c.map(((e,t)=>h().createElement(la,{className:"link",key:t,url:e.url},h().createElement(oa,(0,cn.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))))):null,h().createElement(ga,{ref:y,activeId:r,urlTemplate:o,actions:l,onActionClick:p,onHistoryClick:E}),h().createElement("div",{className:"footer"},h().createElement(ca,{className:"dropdown",actions:w,onActionClick:async e=>{"logout"===e.detail.key?d():(await b.i18n.changeLanguage(b.i18n.language&&"en"===b.i18n.language.split("-")[0]?"zh":"en"),(0,g.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(da,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}fa=us,({e:[Aa,xa,Ea,wa,ya,Sa,Ra,Na,Ma,_a,Ta,Ca,Ia,Wa,za,Da,Ua,Va,La,Oa,Ya,Fa,Pa,Ba,va],c:[Ka,ka]}=(0,d.A)(fa,[ja("ai-portal.elevo-sidebar",{styleTexts:[ra.A]})],[[Ja(),1,"userInstanceId"],[Ja(),1,"behavior"],[Ja(),1,"logoUrl"],[Ja(),1,"newChatUrl"],[Ja(),1,"historyActiveId"],[Ja(),1,"historyUrlTemplate"],[Ja({attribute:!1}),1,"historyActions"],[Ja({attribute:!1}),1,"links"],[Ga({type:"logout"}),1,"logout",e=>(0,c.A)(ss,e),(e,t)=>(0,l.A)(ss,e,t)],[Ga({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ls,e),(e,t)=>(0,l.A)(ls,e,t)],[$a(),2,"pullHistory"],[$a(),2,"close"]],0,(e=>ds.has((0,r.A)(e))),m.ReactNextElement)),ka();var ps,ms=i(47338);let gs,bs,fs,vs,ks,As,xs,Es,ws;const ys=(0,m.wrapBrick)("eo-icon"),Ss=(0,m.wrapBrick)("eo-tooltip"),{defineElement:Rs,property:Ns}=(0,p.createDecorators)();let Ms;var _s=new WeakMap,Ts=new WeakMap,Cs=new WeakMap,Is=new WeakMap;class Ws extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,_s,bs(this)),(0,s.A)(this,Ts,(fs(this),vs(this))),(0,s.A)(this,Cs,(ks(this),As(this))),(0,s.A)(this,Is,(xs(this),Es(this))),ws(this)}get icon(){return(0,c.A)(_s,this)}set icon(e){(0,l.A)(_s,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)(Cs,this)}set disabled(e){(0,l.A)(Cs,this,e)}get variant(){return(0,c.A)(Is,this)}set variant(e){(0,l.A)(Is,this,e)}render(){return h().createElement(zs,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function zs(e){let{icon:t,tooltip:i,disabled:n}=e;const a=h().createElement("button",{disabled:n},h().createElement(ys,t));return i?h().createElement(Ss,{content:i},a):a}ps=Ws,({e:[bs,fs,vs,ks,As,xs,Es,ws],c:[Ms,gs]}=(0,d.A)(ps,[Rs("ai-portal.icon-button",{styleTexts:[ms.A]})],[[Ns({attribute:!1}),1,"icon"],[Ns(),1,"tooltip"],[Ns({type:Boolean}),1,"disabled"],[Ns({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),gs();let Ds=function(e){return e.ALL="ALL",e}({});const Us="bricks/ai-portal/show-cases",Vs={en:{[Ds.ALL]:"All"},zh:{[Ds.ALL]:"全部"}},Ls=b.i18n.getFixedT(null,Us);var Os,Ys=i(42873);let Fs,Ps,Bs,Hs,js;(0,b.initializeI18n)(Us,Vs);const Js=(0,m.wrapBrick)("eo-link"),{defineElement:Gs,property:$s}=(0,p.createDecorators)();let qs;var Ks=new WeakMap,Xs=new WeakMap;class Qs extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ks,Ps(this)),(0,s.A)(this,Xs,(Bs(this),Hs(this))),js(this)}get list(){return(0,c.A)(Ks,this)}set list(e){(0,l.A)(Ks,this,e)}get taskUrlTemplate(){return(0,c.A)(Xs,this)}set taskUrlTemplate(e){(0,l.A)(Xs,this,e)}render(){return h().createElement(Zs,{list:this.list,taskUrlTemplate:this.taskUrlTemplate})}}function Zs(e){let{list:t,taskUrlTemplate:i}=e;const n=(0,u.useMemo)((()=>[null,...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[a,s]=(0,u.useState)(null),r=(0,u.useMemo)((()=>a?null==t?void 0:t.filter((e=>e.scenario===a)):t),[a,t]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("ul",{className:"nav"},null==n?void 0:n.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:a===e}),onClick:()=>s(e)},null===e?Ls(Ds.ALL):e))))),h().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>{return h().createElement("li",{key:e.taskId,className:"item"},h().createElement(Js,{className:"link",url:(t=i,n=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,_t.get)(n,t))))},h().createElement("span",{className:v()("placeholder",e.thumbUrl?"thumbnail":"summary")},e.thumbUrl?h().createElement("span",{style:{backgroundImage:`url(${(0,g.getBasePath)()}${e.thumbUrl})`}}):h().createElement("span",{className:"summary-1"},h().createElement("span",{className:"summary-2"},h().createElement("span",null,e.summary)))),h().createElement("span",{className:"title"},h().createElement("span",null,e.title))));var t,n})))):null}Os=Qs,({e:[Ps,Bs,Hs,js],c:[qs,Fs]}=(0,d.A)(Os,[Gs("ai-portal.show-cases",{styleTexts:[Ys.A]})],[[$s({attribute:!1}),1,"list"],[$s(),1,"taskUrlTemplate"]],0,void 0,m.ReactNextElement)),Fs();let er=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 tr="bricks/ai-portal/mcp-tools",ir={en:{[er.MCP_HUB]:"MCP Hub",[er.ALL]:"All",[er.SERVER_cmdb]:"CMDB",[er.SERVER_cmdb_product_helper]:"CMDB",[er.SERVER_alert]:"Alert",[er.SERVER_web_builder]:"View",[er.SERVER_web_builder2]:"View",[er.SERVER_host_troubleshooting]:"Host Troubleshooting",[er.SERVER_system_inspection]:"System Inspection",[er.SERVER_grafana]:"Grafana",[er.SERVER_kubernetes]:"Kubernetes",[er.SERVER_llm]:"LLM"},zh:{[er.MCP_HUB]:"MCP 中心",[er.ALL]:"全部",[er.SERVER_cmdb]:"CMDB",[er.SERVER_cmdb_product_helper]:"CMDB",[er.SERVER_alert]:"告警",[er.SERVER_web_builder]:"视图",[er.SERVER_web_builder2]:"视图",[er.SERVER_host_troubleshooting]:"主机故障排查",[er.SERVER_system_inspection]:"系统巡检",[er.SERVER_grafana]:"Grafana",[er.SERVER_kubernetes]:"Kubernetes",[er.SERVER_llm]:"大模型"}},nr=b.i18n.getFixedT(null,tr);var ar,sr=i(31748);let rr,or,lr;(0,b.initializeI18n)(tr,ir);const cr={lib:"antd",icon:"tool"},dr=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"]}]]),ur=(0,m.wrapBrick)("eo-icon"),{defineElement:hr,property:pr}=(0,p.createDecorators)();let mr;var gr=new WeakMap;class br extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,gr,or(this)),lr(this)}get list(){return(0,c.A)(gr,this)}set list(e){(0,l.A)(gr,this,e)}render(){return h().createElement(fr,{list:this.list})}}function fr(e){let{list:t}=e;const[i,n]=(0,u.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=nr(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const s=[...dr.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),r=s?s[0]:"其他";let o=i.get(r);o||i.set(r,o=[]),o.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const s=n.indexOf(i),r=n.indexOf(a);return(s<0?n.length:s)-(r<0?n.length:r)}))),i]}),[t]),a=(0,u.useMemo)((()=>{const e=[...dr.keys()],t=[...n.keys()];return t.sort(((t,i)=>{const n=e.indexOf(t),a=e.indexOf(i);return(n<0?e.length:n)-(a<0?e.length:a)})),[null,...t]}),[n]),[s,r]=(0,u.useState)(null),o=(0,u.useMemo)((()=>{const e=[...i];if(null===s)return e;const t=n.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,i,n]);return h().createElement("div",{className:"container"},h().createElement("h1",null,nr(er.MCP_HUB)),h().createElement("ul",{className:"nav"},null==a?void 0:a.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:s===e}),onClick:()=>r(e)},null===e?nr(er.ALL):e))))),h().createElement("ul",{className:"groups"},null==o?void 0:o.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement(ur,(0,cn.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:cr,{fallback:cr})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))))}ar=br,({e:[or,lr],c:[mr,rr]}=(0,d.A)(ar,[hr("ai-portal.mcp-tools",{styleTexts:[sr.A]})],[[pr({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),rr();var vr,kr=i(92914),Ar=i(80413),xr=i(22025),Er=i(13183),wr=i(30578),yr=i(17911),Sr=i(95491);let Rr,Nr,Mr,_r,Tr,Cr,Ir,Wr,zr,Dr,Ur,Vr,Lr,Or,Yr,Fr,Pr,Br,Hr,jr,Jr,Gr,$r,qr,Kr,Xr,Qr,Zr,eo,to,io,no,ao,so,ro,oo,lo,co,uo,ho;(0,b.initializeI18n)(kr.NS,kr.I);const po={lib:"easyops",icon:"share"},{defineElement:mo,property:go,event:bo,method:fo}=(0,p.createDecorators)(),vo=(0,u.forwardRef)(Po);let ko;var Ao=new WeakMap,xo=new WeakMap,Eo=new WeakMap,wo=new WeakMap,yo=new WeakMap,So=new WeakMap,Ro=new WeakMap,No=new WeakMap,Mo=new WeakSet,_o=new WeakMap,To=new WeakMap,Co=new WeakMap,Io=new WeakMap,Wo=new WeakMap,zo=new WeakMap,Do=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Yo=new WeakMap;class Fo extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Mo),(0,s.A)(this,Ao,(Rr(this),Mr(this))),(0,s.A)(this,xo,(_r(this),Tr(this))),(0,s.A)(this,Eo,(Cr(this),Ir(this))),(0,s.A)(this,wo,(Wr(this),zr(this))),(0,s.A)(this,yo,(Dr(this),Ur(this))),(0,s.A)(this,So,(Vr(this),Lr(this))),(0,s.A)(this,Ro,(Or(this),Yr(this))),(0,s.A)(this,No,(Fr(this),Pr(this))),(0,s.A)(this,_o,(jr(this),()=>{(0,o.A)(Mo,this,Br).emit()})),(0,s.A)(this,To,Jr(this)),(0,s.A)(this,Co,(qr(this),()=>{(0,o.A)(Mo,this,Gr).emit()})),(0,s.A)(this,Io,Kr(this)),(0,s.A)(this,Wo,(Zr(this),()=>{(0,o.A)(Mo,this,Xr).emit()})),(0,s.A)(this,zo,eo(this)),(0,s.A)(this,Do,(no(this),()=>{(0,o.A)(Mo,this,to).emit()})),(0,s.A)(this,Uo,ao(this)),(0,s.A)(this,Vo,(oo(this),e=>{(0,o.A)(Mo,this,so).emit(e)})),(0,s.A)(this,Lo,lo(this)),(0,s.A)(this,Oo,(ho(this),()=>{(0,o.A)(Mo,this,co).emit("canvas")})),(0,s.A)(this,Yo,(0,u.createRef)())}get taskId(){return(0,c.A)(Ao,this)}set taskId(e){(0,l.A)(Ao,this,e)}get replay(){return(0,c.A)(xo,this)}set replay(e){(0,l.A)(xo,this,e)}get replayDelay(){return(0,c.A)(Eo,this)}set replayDelay(e){(0,l.A)(Eo,this,e)}get supports(){return(0,c.A)(wo,this)}set supports(e){(0,l.A)(wo,this,e)}get showFeedback(){return(0,c.A)(yo,this)}set showFeedback(e){(0,l.A)(yo,this,e)}get showUiSwitch(){return(0,c.A)(So,this)}set showUiSwitch(e){(0,l.A)(So,this,e)}get hideMermaid(){return(0,c.A)(Ro,this)}set hideMermaid(e){(0,l.A)(Ro,this,e)}resumed(){var e;null===(e=(0,c.A)(Yo,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Yo,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Yo,this).current)||void 0===e||e.feedbackSubmitFailed()}render(){return h().createElement(vo,{taskId:this.taskId,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showFeedback:this.showFeedback,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(_o,this),onPause:(0,c.A)(Co,this),onResume:(0,c.A)(Wo,this),onCancel:(0,c.A)(Do,this),onSubmitFeedback:(0,c.A)(Vo,this),onSwitchToCanvas:(0,c.A)(Oo,this)})}}function Po(e,t){var i;let{taskId:n,replay:a,replayDelay:s,supports:r,showFeedback:o,showUiSwitch:l,onShare:c,onPause:d,onResume:p,onCancel:m,onSubmitFeedback:b,onSwitchToCanvas:f}=e;const{task:A,jobs:x,error:E,humanInputRef:w,resumedRef:y,skipToResults:S,watchAgain:R}=(0,M.S)(n,a,s),N=null!==(i=null==A?void 0:A.title)&&void 0!==i?i:"",_=null==A?void 0:A.state,T=L.QB.includes(_),{messages:C,inputRequiredJobId:I,lastToolCallJobId:W}=(0,Ar.e)(A,x),z=(0,u.useMemo)((()=>null==x?void 0:x.flatMap((e=>e.generatedView?{id:e.id,view:e.generatedView}:[]))),[x]),[D,U]=(0,u.useState)(!1),[V,Y]=(0,u.useState)(!1),[F,P]=(0,u.useState)(!!o);(0,u.useEffect)((()=>{P(!!o)}),[o]);const B=(0,u.useCallback)((e=>{U(!0),b(e)}),[b]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.call(y)},feedbackSubmitDone:()=>{Y(!0),setTimeout((()=>{P(!1)}),3e3)},feedbackSubmitFailed:()=>{U(!1)}})),[y]);const[j,$]=(0,u.useState)(null),[X,Q]=(0,u.useState)(null),[Z,ee]=(0,u.useState)(!1),te=(0,u.useRef)(!1),ie=!!A;(0,u.useEffect)((()=>{if(ie){const e=setTimeout((()=>{te.current=!0}),1e3);return()=>{clearTimeout(e)}}}),[ie]),(0,u.useEffect)((()=>{te.current&&W&&!Z&&Q(W)}),[W,Z]),(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(N)}),[N]),(0,u.useEffect)((()=>{E&&(0,g.handleHttpError)(E)}),[E]);const ne=(0,u.useCallback)(((e,t)=>{var i;null===(i=w.current)||void 0===i||i.call(w,e,t)}),[w]),ae=(0,u.useMemo)((()=>({humanInput:ne,onShare:c,onPause:d,onResume:p,onCancel:m,supports:r,activeExpandedViewJobId:j,setActiveExpandedViewJobId:$,activeToolCallJobId:X,setActiveToolCallJobId:Q,submittingFeedback:D,submittedFeedback:V,onSubmitFeedback:B,setShowFeedback:P})),[ne,c,d,p,m,r,j,X,D,V,B]),se=(0,u.useMemo)((()=>({lastToolCallJobId:W,setUserClosedAside:ee})),[W]),re=(0,u.useRef)(!1),oe=(0,u.useRef)(!1),le=(0,u.useRef)(null),[ce,de]=(0,u.useState)(!1);(0,u.useEffect)((()=>{const e=le.current,t=null==e?void 0:e.firstElementChild;if(oe.current||!e||!t)return;const i=()=>{de(e.scrollTop+e.clientHeight+24<e.scrollHeight),re.current&&(oe.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let n;e.addEventListener("scroll",i);const a=new k.A((()=>{oe.current||(re.current=!1,e.scrollTo({top:t.scrollHeight,behavior:"instant"}),clearTimeout(n),n=setTimeout((()=>{re.current=!0}),100))}));return a.observe(t),()=>{a.disconnect(),e.removeEventListener("scroll",i)}}),[ie]);const ue=(0,u.useCallback)((()=>{const e=le.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[]),he=(0,u.useMemo)((()=>X?null==x?void 0:x.find((e=>e.id===X)):null),[X,x]);return h().createElement(K.j.Provider,{value:ae},h().createElement(Sr.W.Provider,{value:se},h().createElement("div",{className:xr.A.container},h().createElement("div",{className:xr.A.header},h().createElement("div",{className:xr.A.left}),h().createElement("h1",null,N),h().createElement("div",{className:xr.A.right},l&&h().createElement(O.Py,{icon:L.Rq,variant:"mini",style:{transform:"rotate(90deg)"},onClick:f}),h().createElement(O.Py,{icon:po,variant:"mini",onClick:c}))),ie?h().createElement(h().Fragment,null,h().createElement("div",{className:xr.A.main,ref:le},h().createElement("div",{className:xr.A.narrow},C.map(((e,t,i)=>h().createElement("div",{className:xr.A.message,key:t},"user"===e.role?h().createElement(Er.R,{content:e.content}):h().createElement(wr.G,{jobs:e.jobs,taskState:_,isLatest:t===i.length-1})))),F&&"completed"===_&&h().createElement(q.k,{className:xr.A.feedback}))),h().createElement("div",{className:xr.A["scroll-down"],hidden:!ce,onClick:ue},h().createElement(O.Bj,{lib:"antd",icon:"down"}))):h().createElement("div",{className:xr.A["loading-icon"]},h().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),a||null!=r&&r.chat?h().createElement("div",{className:xr.A.footer},h().createElement("div",{className:xr.A.narrow},a?h().createElement(J.b,{taskDone:T,skipToResults:S,watchAgain:R}):h().createElement(G.s,{taskState:_,taskDone:T,inputRequiredJobId:I}))):null),h().createElement("div",{className:v()(xr.A.aside,{[xr.A.expanded]:!!X})},X&&h().createElement(yr.n,{job:he})),j&&h().createElement(H.f,{views:z})))}vr=Fo,({e:[Mr,_r,Tr,Cr,Ir,Wr,zr,Dr,Ur,Vr,Lr,Or,Yr,Fr,Pr,Br,Hr,jr,Jr,Gr,$r,qr,Kr,Xr,Qr,Zr,eo,to,io,no,ao,so,ro,oo,lo,co,uo,ho,Rr],c:[ko,Nr]}=(0,d.A)(vr,[mo("ai-portal.chat-stream",{shadowOptions:!1})],[[go(),1,"taskId"],[go({type:Boolean}),1,"replay"],[go({type:Number}),1,"replayDelay"],[go({attribute:!1}),1,"supports"],[go({type:Boolean}),1,"showFeedback"],[go({type:Boolean}),1,"showUiSwitch"],[go({type:Boolean,render:!1}),1,"hideMermaid"],[bo({type:"share"}),1,"shareEvent",e=>(0,c.A)(No,e),(e,t)=>(0,l.A)(No,e,t)],[bo({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(To,e),(e,t)=>(0,l.A)(To,e,t)],[bo({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(Io,e),(e,t)=>(0,l.A)(Io,e,t)],[bo({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(zo,e),(e,t)=>(0,l.A)(zo,e,t)],[bo({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Uo,e),(e,t)=>(0,l.A)(Uo,e,t)],[bo({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Lo,e),(e,t)=>(0,l.A)(Lo,e,t)],[fo(),2,"resumed"],[fo(),2,"feedbackSubmitDone"],[fo(),2,"feedbackSubmitFailed"]],0,(e=>Yo.has((0,r.A)(e))),m.ReactNextElement)),Nr();const Bo=i.p+"images/8c2cf79e.png",Ho=i.p+"images/0cbe181e.png",jo=i.p+"images/87c8a33b.png",Jo=i.p+"images/f542faa9.png",Go=i.p+"images/8e5c445f.png",$o=i.p+"images/dd5fc700.png",qo=i.p+"images/4215203f.png",Ko=i.p+"images/5e54ffc5.png";let Xo=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e}({});const Qo="bricks/ai-portal/ai-employees",Zo=b.i18n.getFixedT(null,Qo);var el,tl=i(98036);let il,nl,al,sl,rl;(0,b.initializeI18n)(Qo,{en:{AI_EMPLOYEES:"AI Employees"},zh:{AI_EMPLOYEES:"Ai 数字人"}});const ol=[Bo,Ho,jo,Jo,Go,$o,qo,Ko],{defineElement:ll,property:cl}=(0,p.createDecorators)();let dl;var ul=new WeakMap,hl=new WeakMap;class pl extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ul,nl(this)),(0,s.A)(this,hl,(al(this),sl(this))),rl(this)}get list(){return(0,c.A)(ul,this)}set list(e){(0,l.A)(ul,this,e)}get industries(){return(0,c.A)(hl,this)}set industries(e){(0,l.A)(hl,this,e)}render(){return h().createElement(ml,{list:this.list,industries:this.industries})}}function ml(e){let{list:t,industries:i}=e;const n=(0,u.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[a,s]=(0,u.useState)(n[0]),r=(0,u.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==a)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[a,t]),o=n.indexOf(a);return h().createElement("div",{className:"container"},h().createElement("h1",null,Zo(Xo.AI_EMPLOYEES)),h().createElement("ul",{className:"nav"},n.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:e===a}),onClick:()=>s(e)},e))))),h().createElement("ul",{className:"groups"},r.map(((e,t)=>{let[i,n]=e;return h().createElement("li",{key:i,className:"group"},h().createElement("h2",null,i),h().createElement("ul",{className:"list"},n.map(((e,i)=>h().createElement("li",{key:i,className:"item"},h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},h().createElement("img",{src:ol[(i+t+o)%ol.length]})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description))))))}))))}el=pl,({e:[nl,al,sl,rl],c:[dl,il]}=(0,d.A)(el,[ll("ai-portal.ai-employees",{styleTexts:[tl.A]})],[[cl({attribute:!1}),1,"list"],[cl({attribute:!1}),1,"industries"]],0,void 0,m.ReactNextElement)),il();let gl=function(e){return e.AGENTS="AGENTS",e}({});const bl="bricks/ai-portal/ai-agents",fl=b.i18n.getFixedT(null,bl);var vl,kl=i(83059);let Al,xl,El;const wl={lib:"antd",icon:"tool"};(0,b.initializeI18n)(bl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const yl=(0,m.wrapBrick)("eo-icon"),{defineElement:Sl,property:Rl}=(0,p.createDecorators)();let Nl;var Ml=new WeakMap;class _l extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ml,xl(this)),El(this)}get list(){return(0,c.A)(Ml,this)}set list(e){(0,l.A)(Ml,this,e)}render(){return h().createElement(Tl,{list:this.list})}}function Tl(e){let{list:t}=e;return h().createElement("div",{className:"container"},h().createElement("h1",null,fl(gl.AGENTS)),h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var i,n;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(yl,(0,cn.A)({},null!==(i=e.icon)&&void 0!==i?i:wl,{fallback:wl}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(n=e.tags)||void 0===n?void 0:n.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description))}))))}vl=_l,({e:[xl,El],c:[Nl,Al]}=(0,d.A)(vl,[Sl("ai-portal.ai-agents",{styleTexts:[kl.A]})],[[Rl({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),Al()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=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(${u});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 h=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/6336f999.png"},42873:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(89518),i.b),d=r()(a()),u=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(${u});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 h=d.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(91107),i.b),d=r()(a()),u=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(${u});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 h=d.toString()},47338:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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 n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());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:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${u});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const h=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=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(${u});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 h=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:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=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(${u});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 h=d.toString()}}]);
|
|
3
|
+
//# sourceMappingURL=6175.18e07f1a.js.map
|