@next-bricks/ai-portal 0.52.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/bricks.json +43 -35
  2. package/dist/chunks/6201.610c66e3.js +2 -0
  3. package/dist/chunks/6201.610c66e3.js.map +1 -0
  4. package/dist/chunks/7713.278cfb8b.js +2 -0
  5. package/dist/chunks/7713.278cfb8b.js.map +1 -0
  6. package/dist/chunks/chat-box.279647b5.js +2 -0
  7. package/dist/chunks/chat-box.279647b5.js.map +1 -0
  8. package/dist/chunks/flow-tabs.222a11ea.js +3 -0
  9. package/dist/chunks/flow-tabs.222a11ea.js.map +1 -0
  10. package/dist/chunks/main.72d51c8f.js +2 -0
  11. package/dist/chunks/{main.4cb00675.js.map → main.72d51c8f.js.map} +1 -1
  12. package/dist/chunks/set-chat-command.367b9c88.js +2 -0
  13. package/dist/chunks/set-chat-command.367b9c88.js.map +1 -0
  14. package/dist/chunks/stage-flow.1ece0479.js +2 -0
  15. package/dist/chunks/stage-flow.1ece0479.js.map +1 -0
  16. package/dist/examples.json +19 -16
  17. package/dist/images/60cd488d.svg +6 -0
  18. package/dist/images/ecaecc18.svg +6 -0
  19. package/dist/index.6e1371ec.js +2 -0
  20. package/dist/index.6e1371ec.js.map +1 -0
  21. package/dist/manifest.json +384 -298
  22. package/dist/types.json +1507 -736
  23. package/dist-types/bootstrap.d.ts +2 -0
  24. package/dist-types/chat-box/index.d.ts +3 -1
  25. package/dist-types/data-providers/set-chat-command.d.ts +7 -0
  26. package/dist-types/data-providers/set-chat-command.spec.d.ts +1 -0
  27. package/dist-types/shared/interfaces.d.ts +9 -0
  28. package/dist-types/stage-flow/i18n.d.ts +23 -0
  29. package/dist-types/stage-flow/index.d.ts +39 -0
  30. package/dist-types/stage-flow/index.spec.d.ts +1 -0
  31. package/docs/stage-flow.md +32 -0
  32. package/package.json +2 -2
  33. package/dist/chunks/6201.58eeb93e.js +0 -2
  34. package/dist/chunks/6201.58eeb93e.js.map +0 -1
  35. package/dist/chunks/943.7073ef6f.js +0 -2
  36. package/dist/chunks/943.7073ef6f.js.map +0 -1
  37. package/dist/chunks/chat-box.59ab1b62.js +0 -2
  38. package/dist/chunks/chat-box.59ab1b62.js.map +0 -1
  39. package/dist/chunks/flow-tabs.ba72493e.js +0 -3
  40. package/dist/chunks/flow-tabs.ba72493e.js.map +0 -1
  41. package/dist/chunks/main.4cb00675.js +0 -2
  42. package/dist/index.fede9e49.js +0 -2
  43. package/dist/index.fede9e49.js.map +0 -1
  44. /package/dist/chunks/{flow-tabs.ba72493e.js.LICENSE.txt → flow-tabs.222a11ea.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[7713],{24:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.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=s.toString()},9687:(e,t,i)=>{var n,a=i(74635),r=i(70918),s=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),p=i(18769),h=i.n(p),u=i(90870),m=i(30981),g=(i(34419),i(52616)),b=i(2901),A=i(47706);let f,v,E,x,k,w,y,T,S,C,N,_,M,R,I,W,D,L,O,z,P,B,H,U,V,F,G,j,K,$,Y,q,X,J,Q,Z,ee,te,ie,ne,ae,re,se,oe,le,ce,de,pe,he,ue,me,ge,be,Ae,fe,ve,Ee,xe,ke,we,ye,Te;(0,g.initializeI18n)(b.NS,b.I);const{defineElement:Se,property:Ce,event:Ne,method:_e}=(0,u.createDecorators)(),Me=(0,p.forwardRef)(A.B);let Re;var Ie=new WeakMap,We=new WeakMap,De=new WeakMap,Le=new WeakMap,Oe=new WeakMap,ze=new WeakMap,Pe=new WeakMap,Be=new WeakMap,He=new WeakMap,Ue=new WeakMap,Ve=new WeakMap,Fe=new WeakMap,Ge=new WeakMap,je=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Ye=new WeakMap,qe=new WeakMap,Xe=new WeakMap,Je=new WeakSet,Qe=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,st=new WeakMap,ot=new WeakMap,lt=new WeakMap,ct=new WeakMap;class dt extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Je),(0,r.A)(this,Ie,(f(this),E(this))),(0,r.A)(this,We,(x(this),k(this))),(0,r.A)(this,De,(w(this),y(this))),(0,r.A)(this,Le,(T(this),S(this))),(0,r.A)(this,Oe,(C(this),N(this))),(0,r.A)(this,ze,(_(this),M(this))),(0,r.A)(this,Pe,(R(this),I(this))),(0,r.A)(this,Be,(W(this),D(this))),(0,r.A)(this,He,(L(this),O(this))),(0,r.A)(this,Ue,(z(this),P(this))),(0,r.A)(this,Ve,(B(this),H(this))),(0,r.A)(this,Fe,(U(this),V(this))),(0,r.A)(this,Ge,(F(this),G(this))),(0,r.A)(this,je,(j(this),K(this))),(0,r.A)(this,Ke,($(this),Y(this))),(0,r.A)(this,$e,(q(this),X(this))),(0,r.A)(this,Ye,(J(this),Q(this))),(0,r.A)(this,qe,(Z(this),ee(this))),(0,r.A)(this,Xe,(te(this),ie(this))),(0,r.A)(this,Qe,(re(this),()=>{(0,o.A)(Je,this,ne).emit()})),(0,r.A)(this,Ze,se(this)),(0,r.A)(this,et,(ce(this),()=>{(0,o.A)(Je,this,oe).emit()})),(0,r.A)(this,tt,de(this)),(0,r.A)(this,it,(ue(this),e=>{(0,o.A)(Je,this,pe).emit(e)})),(0,r.A)(this,nt,me(this)),(0,r.A)(this,at,(Ae(this),e=>{(0,o.A)(Je,this,ge).emit(e)})),(0,r.A)(this,rt,fe(this)),(0,r.A)(this,st,(xe(this),()=>{(0,o.A)(Je,this,ve).emit("chat")})),(0,r.A)(this,ot,ke(this)),(0,r.A)(this,lt,(Te(this),e=>{(0,o.A)(Je,this,we).emit(e)})),(0,r.A)(this,ct,(0,p.createRef)())}get conversationId(){return(0,c.A)(Ie,this)}set conversationId(e){(0,l.A)(Ie,this,e)}get initialRequest(){return(0,c.A)(We,this)}set initialRequest(e){(0,l.A)(We,this,e)}get replay(){return(0,c.A)(De,this)}set replay(e){(0,l.A)(De,this,e)}get replayDelay(){return(0,c.A)(Le,this)}set replayDelay(e){(0,l.A)(Le,this,e)}get supports(){return(0,c.A)(Oe,this)}set supports(e){(0,l.A)(Oe,this,e)}get showHiddenJobs(){return(0,c.A)(ze,this)}set showHiddenJobs(e){(0,l.A)(ze,this,e)}get showHumanActions(){return(0,c.A)(Pe,this)}set showHumanActions(e){(0,l.A)(Pe,this,e)}get showFeedback(){return(0,c.A)(Be,this)}set showFeedback(e){(0,l.A)(Be,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(He,this)}set showFeedbackAfterFailed(e){(0,l.A)(He,this,e)}get showFeedbackOnView(){return(0,c.A)(Ue,this)}set showFeedbackOnView(e){(0,l.A)(Ue,this,e)}get showUiSwitch(){return(0,c.A)(Ve,this)}set showUiSwitch(e){(0,l.A)(Ve,this,e)}get hideMermaid(){return(0,c.A)(Fe,this)}set hideMermaid(e){(0,l.A)(Fe,this,e)}get showJsxEditor(){return(0,c.A)(Ge,this)}set showJsxEditor(e){(0,l.A)(Ge,this,e)}get previewUrlTemplate(){return(0,c.A)(je,this)}set previewUrlTemplate(e){(0,l.A)(je,this,e)}get showCases(){return(0,c.A)(Ke,this)}set showCases(e){(0,l.A)(Ke,this,e)}get exampleProjects(){return(0,c.A)($e,this)}set exampleProjects(e){(0,l.A)($e,this,e)}get tryItOutUrl(){return(0,c.A)(Ye,this)}set tryItOutUrl(e){(0,l.A)(Ye,this,e)}get separateInstructions(){return(0,c.A)(qe,this)}set separateInstructions(e){(0,l.A)(qe,this,e)}resumed(){var e,t;null===(e=(0,c.A)(ct,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(ct,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(ct,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(ct,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(Me,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,separateInstructions:this.separateInstructions,onShare:(0,c.A)(Qe,this),onTerminate:(0,c.A)(et,this),onSubmitFeedback:(0,c.A)(it,this),onSwitchToChat:(0,c.A)(st,this),onFeedbackOnView:(0,c.A)(at,this),onDetailChange:(0,c.A)(lt,this),ref:(0,c.A)(ct,this)})}}n=dt,({e:[E,x,k,w,y,T,S,C,N,_,M,R,I,W,D,L,O,z,P,B,H,U,V,F,G,j,K,$,Y,q,X,J,Q,Z,ee,te,ie,ne,ae,re,se,oe,le,ce,de,pe,he,ue,me,ge,be,Ae,fe,ve,Ee,xe,ke,we,ye,Te,f],c:[Re,v]}=(0,d.A)(n,[Se("ai-portal.cruise-canvas",{shadowOptions:!1})],[[Ce(),1,"conversationId"],[Ce({attribute:!1,render:!1}),1,"initialRequest"],[Ce({type:Boolean,render:!1}),1,"replay"],[Ce({type:Number,render:!1}),1,"replayDelay"],[Ce({attribute:!1}),1,"supports"],[Ce({type:Boolean}),1,"showHiddenJobs"],[Ce({type:Boolean}),1,"showHumanActions"],[Ce({type:Boolean}),1,"showFeedback"],[Ce({type:Boolean}),1,"showFeedbackAfterFailed"],[Ce({type:Boolean}),1,"showFeedbackOnView"],[Ce({type:Boolean}),1,"showUiSwitch"],[Ce({type:Boolean,render:!1}),1,"hideMermaid"],[Ce({type:Boolean}),1,"showJsxEditor"],[Ce(),1,"previewUrlTemplate"],[Ce({attribute:!1}),1,"showCases"],[Ce({attribute:!1}),1,"exampleProjects"],[Ce(),1,"tryItOutUrl"],[Ce({type:Boolean}),1,"separateInstructions"],[Ne({type:"share"}),1,"shareEvent",e=>(0,c.A)(Xe,e),(e,t)=>(0,l.A)(Xe,e,t)],[Ne({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ze,e),(e,t)=>(0,l.A)(Ze,e,t)],[Ne({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(tt,e),(e,t)=>(0,l.A)(tt,e,t)],[Ne({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(nt,e),(e,t)=>(0,l.A)(nt,e,t)],[Ne({type:"ui.switch"}),1,"switch",e=>(0,c.A)(rt,e),(e,t)=>(0,l.A)(rt,e,t)],[Ne({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(ot,e),(e,t)=>(0,l.A)(ot,e,t)],[_e(),2,"resumed"],[_e(),2,"feedbackSubmitDone"],[_e(),2,"feedbackSubmitFailed"],[_e(),2,"feedbackOnViewDone"]],0,(e=>ct.has((0,s.A)(e))),m.ReactNextElement)),v();var pt=i(24586),ht=i(59435);const ut=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"];function mt(e){const t=window.getComputedStyle(e);return`${ut.map((e=>`${e}:${t.getPropertyValue(e)}`)).join(";")};\n min-height: 0!important;\n max-height: none!important;\n height: 0!important;\n visibility: hidden!important;\n overflow: hidden!important;\n position: absolute!important;\n z-index: -1000!important;\n top: 0!important;\n left: 0!important;\n pointer-events: none!important;\n`}let gt,bt;function At(e,t){gt||(gt=document.createElement("div"),gt.setAttribute("tab-index","-1"),gt.setAttribute("aria-hidden","true"),document.body.appendChild(gt)),gt.setAttribute("style",mt(e)),gt.textContent=e.value.slice(0,t);const i=document.createElement("span");i.textContent="​",gt.appendChild(i);const n=i.getBoundingClientRect();return i.remove(),{top:n.top,left:n.left}}function ft(e,t,i){bt||(bt=document.createElement("div"),bt.setAttribute("tab-index","-1"),bt.setAttribute("aria-hidden","true"),document.body.appendChild(bt)),bt.setAttribute("style",mt(e)),bt.textContent=t;const n=document.createElement("span");n.textContent=i,bt.appendChild(n);const a=n.getBoundingClientRect();if(n.remove(),i.length<=1)return[a];const r=i[0],s=document.createElement("span");s.textContent=r,bt.appendChild(s);const o=s.getBoundingClientRect();s.remove(),bt.textContent=`${t}${i.slice(0,-1)}`;const l=i[i.length-1],c=document.createElement("span");c.textContent=l,bt.appendChild(c);const d=c.getBoundingClientRect();if(c.remove(),o.top===d.top)return[a];const p=[];p.push(new DOMRect(o.left,o.top,a.right-o.left,o.bottom-o.top));const h=d.top-o.bottom;return h>=10&&p.push(new DOMRect(a.left,o.bottom,a.width,h)),p.push(new DOMRect(a.left,d.top,d.right-a.left,d.bottom-d.top)),p}var vt=i(89575),Et=i(99126);let xt;const kt=/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"metaKey":"ctrlKey",wt=p.forwardRef(yt);function yt(e,t){let{autoResize:i,minRows:n,maxRows:a,borderSize:r,paddingSize:s,containerRef:o,value:l,style:c,submitWhen:d,desiredSelectionRef:h,onChange:u,onSubmit:m,onKeyDown:g,onCompositionStart:b,onCompositionEnd:A,...f}=e;const v=null==i||i,[E,x]=(0,p.useState)(null!=l?l:""),k=(0,p.useRef)(null),[w,y]=(0,p.useState)(null);(0,p.useImperativeHandle)(t,(()=>({focus:()=>{const e=k.current;if(e){var t;const i=null===(t=e.value)||void 0===t?void 0:t.length;e.focus(),i&&e.setSelectionRange(i,i)}},element:k.current})),[]);const T=(0,p.useCallback)((()=>{const e=k.current;if(e&&v){const t=function(e,t){const{minRows:i=null,maxRows:n=null,borderSize:a=2,paddingSize:r=8}=null!=t?t:{};let s,o,l;xt||(xt=document.createElement("textarea"),xt.setAttribute("tab-index","-1"),xt.setAttribute("aria-hidden","true"),document.body.appendChild(xt)),xt.setAttribute("style",mt(e)),xt.value=e.value||e.placeholder||"";let c=xt.scrollHeight+a;if(null!==i||null!==n){const e=parseFloat(window.getComputedStyle(xt).getPropertyValue("line-height"));null!==i&&(s=e*i+r+a,c=Math.max(s,c)),null!==n&&(o=e*n+r+a,c<=o&&(l="hidden"),c=Math.min(o,c))}const d={height:c,overflowY:l,resize:"none"};return s&&(d.minHeight=s),o&&(d.maxHeight=o),d}(e,{minRows:n,maxRows:a,borderSize:r,paddingSize:s});(0,ht.flushSync)((()=>{y(t)}))}}),[v,a,n,r,s]);(0,p.useEffect)((()=>{x(null!=l?l:"")}),[l]),(0,p.useEffect)((()=>{T()}),[T,E]);const S=(0,p.useRef)(!1),C=(0,p.useCallback)((e=>{S.current=!0,null==b||b(e)}),[b]),N=(0,p.useCallback)((e=>{S.current=!1,null==A||A(e)}),[A]),_=(0,p.useCallback)((e=>{S.current||!1!==(null==g?void 0:g(e))&&"Enter"===e.key&&("enter-without-shift"===d?!e.shiftKey:"enter-with-mod"===d&&e[kt])&&(e.preventDefault(),e.stopPropagation(),null==m||m(e))}),[g,m,d]);return(0,p.useLayoutEffect)((()=>{const e=null==h?void 0:h.current,t=k.current;if(e&&t){const{start:i,end:n}=e;h.current=null,t.setSelectionRange(i,n)}}),[h,E]),(0,p.useEffect)((()=>{const e=null==o?void 0:o.current;if(!e||!v)return;let t;const i=new Et.A((i=>{for(const n of i)if(n.target===e){const e=n.contentBoxSize?n.contentBoxSize[0]?n.contentBoxSize[0].inlineSize:n.contentBoxSize.inlineSize:n.contentRect.width;if(void 0!==e&&e!==t){const i=!t;t=e,i||requestAnimationFrame(T)}}}));return i.observe(e),()=>{i.disconnect()}}),[v,o,T]),p.createElement("textarea",(0,vt.A)({},f,{ref:k,value:E,style:{...c,...w},onChange:e=>{x(e.target.value),null==u||u(e)},onCompositionStart:C,onCompositionEnd:N,onKeyDown:_}))}let Tt=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const St="bricks/ai-portal/chat-box",Ct={en:{[Tt.ASK_ANY_THING]:"Ask anything",[Tt.COMMON_TASKS]:"Common tasks"},zh:{[Tt.ASK_ANY_THING]:"询问任何问题",[Tt.COMMON_TASKS]:"常用任务"}},Nt=g.i18n.getFixedT(null,St);var _t=i(47008),Mt=i(77019);let Rt=null;function It(e){Rt=e}function Wt(){return Rt}var Dt;let Lt,Ot,zt,Pt,Bt,Ht,Ut,Vt,Ft,Gt,jt,Kt,$t,Yt,qt,Xt,Jt,Qt,Zt,ei,ti,ii,ni,ai;customElements.define("ai-portal.set-chat-command",(0,Mt.createProviderClass)(It)),(0,g.initializeI18n)(St,Ct);const ri=(0,m.wrapBrick)("eo-icon"),si=(0,m.wrapBrick)("eo-actions",{onActionClick:"action.click",onItemDragEnd:"item.drag.end",onItemDragStart:"item.drag.start"}),{defineElement:oi,property:li,event:ci,method:di}=(0,u.createDecorators)(),pi=(0,p.forwardRef)(Si);let hi;var ui=new WeakMap,mi=new WeakMap,gi=new WeakMap,bi=new WeakMap,Ai=new WeakMap,fi=new WeakMap,vi=new WeakSet,Ei=new WeakMap,xi=new WeakMap,ki=new WeakMap,wi=new WeakMap,yi=new WeakMap;class Ti extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,vi),(0,pt.A)(this,"ref",(Lt(this),(0,p.createRef)())),(0,r.A)(this,ui,zt(this)),(0,r.A)(this,mi,(Pt(this),Bt(this))),(0,r.A)(this,gi,(Ht(this),Ut(this))),(0,r.A)(this,bi,(Vt(this),Ft(this))),(0,r.A)(this,Ai,(Gt(this),jt(this))),(0,r.A)(this,fi,(Kt(this),$t(this))),(0,r.A)(this,Ei,(Xt(this),e=>{(0,o.A)(vi,this,Yt).emit(e)})),(0,r.A)(this,xi,Jt(this)),(0,r.A)(this,ki,(ei(this),e=>{(0,o.A)(vi,this,Qt).emit(e)})),(0,r.A)(this,wi,ti(this)),(0,r.A)(this,yi,(ai(this),e=>{(0,o.A)(vi,this,ii).emit(e)}))}get disabled(){return(0,c.A)(ui,this)}set disabled(e){(0,l.A)(ui,this,e)}get placeholder(){return(0,c.A)(mi,this)}set placeholder(e){(0,l.A)(mi,this,e)}get autoFocus(){return(0,c.A)(gi,this)}set autoFocus(e){(0,l.A)(gi,this,e)}get aiEmployees(){return(0,c.A)(bi,this)}set aiEmployees(e){(0,l.A)(bi,this,e)}get commands(){return(0,c.A)(Ai,this)}set commands(e){(0,l.A)(Ai,this,e)}setValue(e){var t;null===(t=this.ref.current)||void 0===t||t.setValue(e)}getValue(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.getValue()}focusOnInput(){var e;return null===(e=this.ref.current)||void 0===e?void 0:e.focusOnInput()}render(){return h().createElement(pi,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,aiEmployees:this.aiEmployees,commands:this.commands,onSubmit:(0,c.A)(Ei,this),onEmployeeMention:(0,c.A)(ki,this),onCommandSelect:(0,c.A)(yi,this),ref:this.ref})}}function Si(e,t){let{disabled:i,placeholder:n,autoFocus:a,aiEmployees:r,commands:s,onSubmit:o,onEmployeeMention:l,onCommandSelect:c}=e;const d=(0,p.useRef)(null),u=(0,p.useRef)(null),[m,g]=(0,p.useState)(""),b=(0,p.useRef)(""),[A,f]=(0,p.useState)(null),[v,E]=(0,p.useState)(""),[x,k]=(0,p.useState)(0),[w,y]=(0,p.useState)([0]),[T,S]=(0,p.useState)(null),[C,N]=(0,p.useState)(null),[_,M]=(0,p.useState)(""),R=(0,p.useRef)(null);(0,p.useEffect)((()=>{const e=window.__elevo_try_it_out;e&&delete window.__elevo_try_it_out,"string"==typeof(null==e?void 0:e.content)&&(b.current=e.content,g(e.content))}),[]),(0,p.useImperativeHandle)(t,(()=>({setValue:e=>{b.current=e,g(e)},getValue:()=>b.current,focusOnInput:()=>{var e;null===(e=u.current)||void 0===e||e.focus()}})));const I=(0,p.useCallback)((e=>{var t;o(e.slice(null!==(t=null==_?void 0:_.length)&&void 0!==t?t:0))}),[null==_?void 0:_.length,o]),W=(0,p.useCallback)((e=>{e.currentTarget.value&&I(e.currentTarget.value)}),[I]),D=(0,p.useCallback)((e=>{const{value:t,selectionStart:i,selectionEnd:n}=e.target;if(b.current=t,g(t),!v&&null!==i&&i===n&&null!=r&&r.length){const n=t.slice(0,i),a=n.lastIndexOf("@");if(a>=0){const t=n.slice(a+1).toLowerCase(),s=r.filter((e=>e.employeeId.toLowerCase().includes(t)||e.name.toLowerCase().includes(t))).slice(0,10);if(s.length>0){const t=At(e.currentTarget,i),n=e.currentTarget.getBoundingClientRect();return f({style:{left:t.left+10+n.left,top:t.top+22+n.top,position:"absolute",zIndex:1},range:{start:a,end:i},actions:s.map((e=>({key:e.employeeId,text:e.name,data:e})))}),void k(0)}}}if(f(null),null!==i&&i===n&&null!=s&&s.length){const n=t.slice(0,i);if(n.startsWith("/")){const t=n.slice(1).toLowerCase(),a=s.filter((e=>e.label.toLowerCase().includes(t))).slice(0,10);if(a.length>0){const t=At(e.currentTarget,i),n=e.currentTarget.getBoundingClientRect();return S({style:{left:t.left+10+n.left,top:t.top+22+n.top,position:"absolute",zIndex:1},range:{start:0,end:i},actions:a.map((e=>({key:e.value,text:e.label,data:e,ancestors:[],items:Ci(e,[]),payload:e.payload})))}),void y([0])}}}S(null)}),[r,s,v]);(0,p.useEffect)((()=>{v&&!m.includes(v)&&(E(""),l(null))}),[v,l,m]),(0,p.useEffect)((()=>{_&&!m.includes(_)&&(M(""),c(null))}),[_,c,m]);const L=(0,p.useCallback)((()=>{I(b.current)}),[I]);(0,p.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=u.current)||void 0===e||e.focus()}))}),[]);const O=(0,p.useMemo)((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.element;if(!v||!t)return"";const i=m.indexOf(v);return i<0?"":m.slice(0,i)}),[v,m]),z=(0,p.useMemo)((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.element;return v&&t?ft(t,O,v.slice(0,-1)).map((e=>({left:e.left-1,top:e.top-1,width:e.width+4,height:e.height+4}))):null}),[v,O]);(0,p.useEffect)((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.element;if(!_||!t)return void N(null);const i=ft(t,"",_.slice(0,-1));N(i.map((e=>({left:e.left-1,top:e.top-1,width:e.width+4,height:e.height+4}))))}),[_]);const P=(0,p.useMemo)((()=>{const e=Wt();return e&&It(null),e}),[]);(0,p.useEffect)((()=>{P&&c(P.payload)}),[P,c]),(0,p.useEffect)((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.element;if(P&&t){const e=`/${P.command} `,i=ft(t,"",e.slice(0,-1));N(i.map((e=>({left:e.left-1,top:e.top-1,width:e.width+4,height:e.height+4})))),b.current=e,R.current={start:e.length,end:e.length},g(e),M(e)}}),[P]);const B=(0,p.useCallback)((e=>{var t;const i=`@${e.text} `,n=`${b.current.slice(0,A.range.start)}${i}`,a=`${n}${b.current.slice(A.range.end)}`;b.current=a,R.current={start:n.length,end:n.length},g(a),E(i),f(null),l(e.data),null===(t=u.current)||void 0===t||t.focus()}),[A,l]),H=(0,p.useCallback)((e=>{var t;const i=`/${[...e.ancestors.map((e=>e.label)),e.text].join(": ")} `,n=`${b.current.slice(0,T.range.start)}${i}`,a=`${n}${b.current.slice(T.range.end)}`;b.current=a,R.current={start:n.length,end:n.length},g(a),M(i),S(null),c(e.payload),null===(t=u.current)||void 0===t||t.focus()}),[T,c]),U=(0,p.useCallback)((e=>{switch(e.key){case"Escape":if(!A&&!T)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),f(null),S(null),!1;case"ArrowUp":case"ArrowDown":if(!A&&!T)return;return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),A?k((t=>{const i=t+("ArrowUp"===e.key?-1:1),n=A.actions.length;return(n+i)%n})):y((t=>{let i=0,{actions:n}=T;const a=[];for(;i<t.length-1;){const e=n[t[i]];if(!Ni(e))break;n=e.items,a.push(t[i]),i+=1}const r=t[i]+("ArrowUp"===e.key?-1:1),s=n.length,o=(s+r)%s;return a.push(o),a})),!1;case"Enter":case"ArrowLeft":case"ArrowRight":if(A){if("Enter"===e.key)return e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),B(A.actions[x]),!1}else if(T){if(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),"ArrowLeft"===e.key)return w.length>1&&y((e=>e.slice(0,-1))),!1;let t,i=0,{actions:n}=T;for(;i<w.length&&(t=n[w[i]],Ni(t));)n=t.items,i+=1;return t&&(Ni(t)?y((e=>[...e,0])):"Enter"===e.key&&H(t)),!1}break;case"Delete":case"Backspace":{const t=[{textLength:null==v?void 0:v.length,prefixLength:O.length},{textLength:null==_?void 0:_.length,prefixLength:0}];for(const{textLength:i,prefixLength:n}of t)if(i){let{selectionStart:t,selectionEnd:a}=e.currentTarget;t===a&&("Backspace"===e.key?t-=1:a+=1);const r=n,s=r+i;if(t<s&&a>r){const i=Math.min(t,r),n=Math.max(a,s),o=`${b.current.slice(0,i)}${b.current.slice(n)}`;return b.current=o,R.current={start:i,end:i},g(o),e.preventDefault(),e.stopPropagation(),!1}}break}}}),[x,w,T,null==_?void 0:_.length,B,H,A,O.length,null==v?void 0:v.length]),V=(0,p.useMemo)((()=>{if(!T)return[];let e=T.actions;const t=[];for(let i=0;i<w.length;i+=1){const n=e[w[i]];if(!n)break;if(!Ni(n)){t.push(n.key);break}t.push(n.key),e=n.items}return t}),[w,T]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:d},h().createElement(wt,{containerRef:d,ref:u,value:m,minRows:58/22,paddingSize:60,autoResize:!0,disabled:i,placeholder:null!=n?n:Nt(Tt.ASK_ANY_THING),submitWhen:"enter-without-shift",desiredSelectionRef:R,onSubmit:W,onChange:D,onKeyDown:U}),h().createElement("div",{className:"actions-bar"},h().createElement("div",null,h().createElement("slot",{name:"actions"})),h().createElement("button",{className:"btn-send",disabled:!m,onClick:L},h().createElement(ri,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),null==z?void 0:z.map(((e,t)=>h().createElement("div",{key:t,className:"mention-overlay",style:e}))),null==C?void 0:C.map(((e,t)=>h().createElement("div",{key:t,className:"mention-overlay",style:e}))),A&&(0,ht.createPortal)(h().createElement(si,{actions:A.actions,style:A.style,activeKeys:[A.actions[x].key],onActionClick:e=>B(e.detail)}),document.body),T&&(0,ht.createPortal)(h().createElement(si,{actions:T.actions,style:T.style,activeKeys:V,onActionClick:e=>H(e.detail)}),document.body)))}function Ci(e,t){var i;return null===(i=e.options)||void 0===i?void 0:i.map((i=>{const n=[...t,e];return{key:i.value,text:i.label,data:i,ancestors:n,items:Ci(i,n),payload:i.payload}}))}function Ni(e){var t;return!(null===(t=e.items)||void 0===t||!t.length)}Dt=Ti,({e:[zt,Pt,Bt,Ht,Ut,Vt,Ft,Gt,jt,Kt,$t,Yt,qt,Xt,Jt,Qt,Zt,ei,ti,ii,ni,ai,Lt],c:[hi,Ot]}=(0,d.A)(Dt,[oi("ai-portal.chat-box",{styleTexts:[_t.A],shadowOptions:{delegatesFocus:!0}})],[[li({type:Boolean}),1,"disabled"],[li(),1,"placeholder"],[li({type:Boolean}),1,"autoFocus"],[li({attribute:!1}),1,"aiEmployees"],[li({attribute:!1}),1,"commands"],[ci({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(fi,e),(e,t)=>(0,l.A)(fi,e,t)],[ci({type:"ai-employee.mention"}),1,"employeeMention",e=>(0,c.A)(xi,e),(e,t)=>(0,l.A)(xi,e,t)],[ci({type:"command.select"}),1,"commandSelect",e=>(0,c.A)(wi,e),(e,t)=>(0,l.A)(wi,e,t)],[di(),2,"setValue"],[di(),2,"getValue"],[di(),2,"focusOnInput"]],0,(e=>yi.has((0,s.A)(e))),m.ReactNextElement)),Ot();var _i,Mi=i(82165);let Ri,Ii,Wi;const{defineElement:Di,property:Li}=(0,u.createDecorators)();let Oi;var zi=new WeakMap;class Pi extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,zi,Ii(this)),Wi(this)}get sticky(){return(0,c.A)(zi,this)}set sticky(e){(0,l.A)(zi,this,e)}render(){return h().createElement(Bi,null)}}function Bi(){return h().createElement("slot",null)}_i=Pi,({e:[Ii,Wi],c:[Oi,Ri]}=(0,d.A)(_i,[Di("ai-portal.home-container",{styleTexts:[Mi.A]})],[[Li({type:Boolean,render:!1}),1,"sticky"]],0,void 0,m.ReactNextElement)),Ri();var Hi,Ui=i(24);let Vi,Fi,Gi,ji,Ki,$i,Yi,qi,Xi,Ji,Qi,Zi,en,tn,nn,an,rn,sn,on,ln,cn;const dn=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:pn,property:hn}=(0,u.createDecorators)();let un;var mn=new WeakMap,gn=new WeakMap,bn=new WeakMap,An=new WeakMap,fn=new WeakMap,vn=new WeakMap,En=new WeakMap,xn=new WeakMap,kn=new WeakMap,wn=new WeakMap;class yn extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,mn,Fi(this)),(0,r.A)(this,gn,(Gi(this),ji(this))),(0,r.A)(this,bn,(Ki(this),$i(this))),(0,r.A)(this,An,(Yi(this),qi(this))),(0,r.A)(this,fn,(Xi(this),Ji(this))),(0,r.A)(this,vn,(Qi(this),Zi(this))),(0,r.A)(this,En,(en(this),tn(this))),(0,r.A)(this,xn,(nn(this),an(this))),(0,r.A)(this,kn,(rn(this),sn(this))),(0,r.A)(this,wn,(on(this),ln(this))),cn(this)}get label(){return(0,c.A)(mn,this)}set label(e){(0,l.A)(mn,this,e)}get value(){return(0,c.A)(gn,this)}set value(e){(0,l.A)(gn,this,e)}get size(){return(0,c.A)(bn,this)}set size(e){(0,l.A)(bn,this,e)}get lineColor(){return(0,c.A)(An,this)}set lineColor(e){(0,l.A)(An,this,e)}get showArea(){return(0,c.A)(fn,this)}set showArea(e){(0,l.A)(fn,this,e)}get min(){return(0,c.A)(vn,this)}set min(e){(0,l.A)(vn,this,e)}get max(){return(0,c.A)(En,this)}set max(e){(0,l.A)(En,this,e)}get xField(){return(0,c.A)(xn,this)}set xField(e){(0,l.A)(xn,this,e)}get yField(){return(0,c.A)(kn,this)}set yField(e){(0,l.A)(kn,this,e)}get data(){return(0,c.A)(wn,this)}set data(e){(0,l.A)(wn,this,e)}render(){return h().createElement(Tn,{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 Tn(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(dn,(0,vt.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(dn,(0,vt.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}Hi=yn,({e:[Fi,Gi,ji,Ki,$i,Yi,qi,Xi,Ji,Qi,Zi,en,tn,nn,an,rn,sn,on,ln,cn],c:[un,Vi]}=(0,d.A)(Hi,[pn("ai-portal.stat-with-mini-chart",{styleTexts:[Ui.A]})],[[hn(),1,"label"],[hn(),1,"value"],[hn(),1,"size"],[hn(),1,"lineColor"],[hn({type:Boolean}),1,"showArea"],[hn({type:Number}),1,"min"],[hn({type:Number}),1,"max"],[hn(),1,"xField"],[hn(),1,"yField"],[hn({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),Vi();var Sn,Cn=i(30348),Nn=i(53373),_n=i.n(Nn),Mn=i(5813),Rn=i(61408),In=i(70579),Wn=i(75197),Dn=i(94504);let Ln,On,zn,Pn,Bn,Hn,Un,Vn,Fn,Gn,jn,Kn,$n,Yn,qn,Xn,Jn,Qn,Zn,ea,ta,ia,na,aa,ra,sa,oa,la,ca,da,pa,ha,ua,ma,ga,ba,Aa,fa,va,Ea,xa,ka;(0,g.initializeI18n)(Mn.NS,Mn.I);const wa={lib:"easyops",icon:"sidebar"},ya=(0,m.wrapBrick)("ai-portal.elevo-logo"),{defineElement:Ta,property:Sa,event:Ca,method:Na}=(0,u.createDecorators)(),_a=(0,p.forwardRef)(er);let Ma;var Ra=new WeakMap,Ia=new WeakMap,Wa=new WeakMap,Da=new WeakMap,La=new WeakMap,Oa=new WeakMap,za=new WeakMap,Pa=new WeakMap,Ba=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Fa=new WeakMap,Ga=new WeakSet,ja=new WeakMap,Ka=new WeakMap,$a=new WeakMap,Ya=new WeakMap,qa=new WeakMap,Xa=new WeakMap,Ja=new WeakMap,Qa=new WeakMap;class Za extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ga),(0,r.A)(this,Ra,(Ln(this),zn(this))),(0,r.A)(this,Ia,(Pn(this),Bn(this))),(0,r.A)(this,Wa,(Hn(this),Un(this))),(0,r.A)(this,Da,(Vn(this),Fn(this))),(0,r.A)(this,La,(Gn(this),jn(this))),(0,r.A)(this,Oa,(Kn(this),$n(this))),(0,r.A)(this,za,(Yn(this),qn(this))),(0,r.A)(this,Pa,(Xn(this),Jn(this))),(0,r.A)(this,Ba,(Qn(this),Zn(this))),(0,r.A)(this,Ha,(ea(this),ta(this))),(0,r.A)(this,Ua,(ia(this),na(this,!0))),(0,r.A)(this,Va,(aa(this),ra(this))),(0,r.A)(this,Fa,(sa(this),oa(this))),(0,r.A)(this,ja,(da(this),()=>{(0,o.A)(Ga,this,la).emit()})),(0,r.A)(this,Ka,pa(this)),(0,r.A)(this,$a,(ma(this),e=>{(0,o.A)(Ga,this,ha).emit(e)})),(0,r.A)(this,Ya,ga(this)),(0,r.A)(this,qa,(fa(this),e=>{(0,o.A)(Ga,this,ba).emit(e)})),(0,r.A)(this,Xa,va(this)),(0,r.A)(this,Ja,(ka(this),()=>{(0,o.A)(Ga,this,Ea).emit()})),(0,r.A)(this,Qa,(0,p.createRef)())}get userInstanceId(){return(0,c.A)(Ra,this)}set userInstanceId(e){(0,l.A)(Ra,this,e)}get behavior(){return(0,c.A)(Ia,this)}set behavior(e){(0,l.A)(Ia,this,e)}get logoUrl(){return(0,c.A)(Wa,this)}set logoUrl(e){(0,l.A)(Wa,this,e)}get newChatUrl(){return(0,c.A)(Da,this)}set newChatUrl(e){(0,l.A)(Da,this,e)}get newChatLinkWhenCollapsed(){return(0,c.A)(La,this)}set newChatLinkWhenCollapsed(e){(0,l.A)(La,this,e)}get historyUrlTemplate(){return(0,c.A)(Oa,this)}set historyUrlTemplate(e){(0,l.A)(Oa,this,e)}get historyActions(){return(0,c.A)(za,this)}set historyActions(e){(0,l.A)(za,this,e)}get projectUrlTemplate(){return(0,c.A)(Pa,this)}set projectUrlTemplate(e){(0,l.A)(Pa,this,e)}get projectActions(){return(0,c.A)(Ba,this)}set projectActions(e){(0,l.A)(Ba,this,e)}get links(){return(0,c.A)(Ha,this)}set links(e){(0,l.A)(Ha,this,e)}get canAddProject(){return(0,c.A)(Ua,this)}set canAddProject(e){(0,l.A)(Ua,this,e)}get myLinks(){return(0,c.A)(Va,this)}set myLinks(e){(0,l.A)(Va,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(Qa,this).current)||void 0===e||e.pull()}),e)}open(){var e;null===(e=(0,c.A)(Qa,this).current)||void 0===e||e.open()}close(){var e;null===(e=(0,c.A)(Qa,this).current)||void 0===e||e.close()}removeProject(e){var t,i;null===(t=(0,c.A)(Qa,this).current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)}addProject(e){var t,i;null===(t=(0,c.A)(Qa,this).current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)}moveConversation(e){var t,i;null===(t=(0,c.A)(Qa,this).current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}render(){return h().createElement(_a,{ref:(0,c.A)(Qa,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,newChatLinkWhenCollapsed:this.newChatLinkWhenCollapsed,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,projectUrlTemplate:this.projectUrlTemplate,projectActions:this.projectActions,links:this.links,canAddProject:this.canAddProject,myLinks:this.myLinks,onLogout:(0,c.A)(ja,this),onActionClick:(0,c.A)($a,this),onProjectActionClick:(0,c.A)(qa,this),onAddProject:(0,c.A)(Ja,this)})}}function er(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:r,newChatLinkWhenCollapsed:s,historyUrlTemplate:o,historyActions:l,projectUrlTemplate:c,projectActions:d,links:u,canAddProject:m,myLinks:b,onLogout:A,onActionClick:f,onProjectActionClick:v,onAddProject:E}=e;const[x,k]=(0,p.useState)("drawer"===n),w=(0,p.useCallback)((()=>{k(!0)}),[]),y=(0,p.useCallback)((()=>{k(!1)}),[]);(0,p.useEffect)((()=>{"drawer"===n&&k(!0)}),[n]);const T=(0,p.useCallback)((()=>{k(!0)}),[]),S=(0,p.useCallback)((()=>{"drawer"===n&&k(!0)}),[n]),C=(0,p.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:(0,Mn.t)(Mn.K.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:(0,Mn.t)(Mn.K.SWITCH_LANGUAGE)}]),[]),N=(0,p.useRef)(null);return(0,p.useImperativeHandle)(t,(()=>({close:()=>{k(!0)},pull:()=>{var e;null===(e=N.current)||void 0===e||e.pull()},removeProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)},addProject:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)},moveConversation:e=>{var t,i;null===(t=N.current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)},open:()=>{k(!1)}})),[]),h().createElement("div",{className:_n()("container",{collapsed:x})},"drawer"===n&&!x&&h().createElement("div",{className:"mask",onClick:T}),h().createElement("div",{className:"alternative"},h().createElement(In.Py,{icon:wa,variant:"light",onClick:y}),s&&h().createElement(In.EM,{className:"new-chat",url:r},h().createElement(In.Bj,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),(0,Mn.t)(Mn.K.NEW_CHAT))),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(In.EM,{url:a,className:"logo-link"},h().createElement(ya,null)),h().createElement(In.Py,{icon:wa,variant:"light",onClick:w})),h().createElement(In.EM,{className:"new-chat",url:r},h().createElement(In.Bj,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),(0,Mn.t)(Mn.K.NEW_CHAT)),null!=u&&u.length?h().createElement("div",{className:"links"},u.map(((e,t)=>h().createElement(Dn.k,{key:t,url:e.url,activeIncludes:e.activeIncludes,render:i=>{let{active:n}=i;return h().createElement(In.EM,{key:t,className:_n()("link",{active:n}),url:e.url},h().createElement(In.Bj,(0,vt.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))}})))):null,h().createElement(Wn.D,{ref:N,canAddProject:m,historyUrlTemplate:o,historyActions:l,projectUrlTemplate:c,projectActions:d,myLinks:b,onActionClick:f,onHistoryClick:S,onProjectActionClick:v,onAddProject:E}),h().createElement("div",{className:"footer"},h().createElement(In.qb,{className:"dropdown",actions:C,onActionClick:async e=>{"logout"===e.detail.key?A():(await g.i18n.changeLanguage(g.i18n.language&&"en"===g.i18n.language.split("-")[0]?"zh":"en"),(0,Cn.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(In.JQ,{nameOrInstanceId:i,showName:!0,size:"xs"}))))))}Sn=Za,({e:[zn,Pn,Bn,Hn,Un,Vn,Fn,Gn,jn,Kn,$n,Yn,qn,Xn,Jn,Qn,Zn,ea,ta,ia,na,aa,ra,sa,oa,la,ca,da,pa,ha,ua,ma,ga,ba,Aa,fa,va,Ea,xa,ka,Ln],c:[Ma,On]}=(0,d.A)(Sn,[Ta("ai-portal.elevo-sidebar",{styleTexts:[Rn.A]})],[[Sa(),1,"userInstanceId"],[Sa(),1,"behavior"],[Sa(),1,"logoUrl"],[Sa(),1,"newChatUrl"],[Sa({type:Boolean}),1,"newChatLinkWhenCollapsed"],[Sa(),1,"historyUrlTemplate"],[Sa({attribute:!1}),1,"historyActions"],[Sa(),1,"projectUrlTemplate"],[Sa({attribute:!1}),1,"projectActions"],[Sa({attribute:!1}),1,"links"],[Sa({type:Boolean}),1,"canAddProject"],[Sa({attribute:!1}),1,"myLinks"],[Ca({type:"logout"}),1,"logout",e=>(0,c.A)(Fa,e),(e,t)=>(0,l.A)(Fa,e,t)],[Ca({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Ka,e),(e,t)=>(0,l.A)(Ka,e,t)],[Ca({type:"project.action.click"}),1,"projectActionClick",e=>(0,c.A)(Ya,e),(e,t)=>(0,l.A)(Ya,e,t)],[Ca({type:"add.project"}),1,"addProject",e=>(0,c.A)(Xa,e),(e,t)=>(0,l.A)(Xa,e,t)],[Na(),2,"pullHistory"],[Na(),2,"open"],[Na(),2,"close"],[Na(),2,"removeProject"],[Na(),2,"addProject"],[Na(),2,"moveConversation"]],0,(e=>Qa.has((0,s.A)(e))),m.ReactNextElement)),On();var tr,ir=i(47338);let nr,ar,rr,sr,or,lr,cr,dr,pr,hr,ur;const mr=(0,m.wrapBrick)("eo-icon"),gr=(0,m.wrapBrick)("eo-tooltip"),{defineElement:br,property:Ar}=(0,u.createDecorators)();let fr;var vr=new WeakMap,Er=new WeakMap,xr=new WeakMap,kr=new WeakMap,wr=new WeakMap;class yr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,vr,ar(this)),(0,r.A)(this,Er,(rr(this),sr(this))),(0,r.A)(this,xr,(or(this),lr(this))),(0,r.A)(this,kr,(cr(this),dr(this))),(0,r.A)(this,wr,(pr(this),hr(this))),ur(this)}get icon(){return(0,c.A)(vr,this)}set icon(e){(0,l.A)(vr,this,e)}get tooltip(){return(0,c.A)(Er,this)}set tooltip(e){(0,l.A)(Er,this,e)}get tooltipHoist(){return(0,c.A)(xr,this)}set tooltipHoist(e){(0,l.A)(xr,this,e)}get disabled(){return(0,c.A)(kr,this)}set disabled(e){(0,l.A)(kr,this,e)}get variant(){return(0,c.A)(wr,this)}set variant(e){(0,l.A)(wr,this,e)}render(){return h().createElement(Tr,{icon:this.icon,tooltip:this.tooltip,tooltipHoist:this.tooltipHoist,disabled:this.disabled})}}function Tr(e){let{icon:t,tooltip:i,tooltipHoist:n,disabled:a}=e;const r=h().createElement("button",{disabled:a},h().createElement(mr,t));return i?h().createElement(gr,{content:i,hoist:n},r):r}tr=yr,({e:[ar,rr,sr,or,lr,cr,dr,pr,hr,ur],c:[fr,nr]}=(0,d.A)(tr,[br("ai-portal.icon-button",{styleTexts:[ir.A]})],[[Ar({attribute:!1}),1,"icon"],[Ar(),1,"tooltip"],[Ar({type:Boolean}),1,"tooltipHoist"],[Ar({type:Boolean}),1,"disabled"],[Ar({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),nr();let Sr=function(e){return e.ALL="ALL",e.EXPLORE_EXCELLENT_CASES="EXPLORE_EXCELLENT_CASES",e}({});const Cr="bricks/ai-portal/show-cases",Nr={en:{[Sr.ALL]:"All",[Sr.EXPLORE_EXCELLENT_CASES]:"Explore excellent cases"},zh:{[Sr.ALL]:"全部",[Sr.EXPLORE_EXCELLENT_CASES]:"探索优秀案例"}},_r=g.i18n.getFixedT(null,Cr);var Mr,Rr=i(42873);let Ir,Wr,Dr,Lr,Or;(0,g.initializeI18n)(Cr,Nr);const zr=(0,m.wrapBrick)("ai-portal.show-case"),Pr=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Br,property:Hr}=(0,u.createDecorators)();let Ur;var Vr=new WeakMap,Fr=new WeakMap;class Gr extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Vr,Wr(this)),(0,r.A)(this,Fr,(Dr(this),Lr(this))),Or(this)}get list(){return(0,c.A)(Vr,this)}set list(e){(0,l.A)(Vr,this,e)}get limit(){return(0,c.A)(Fr,this)}set limit(e){(0,l.A)(Fr,this,e)}render(){return h().createElement(jr,{list:this.list,limit:this.limit})}}function jr(e){let{list:t,limit:i}=e;const n=(0,p.useMemo)((()=>["",...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[a,r]=(0,p.useState)(""),s=(0,p.useMemo)((()=>{if(!t)return;let e=t;return a&&(e=e.filter((e=>e.scenario===a))),i&&(e=e.slice(0,i)),e}),[a,t,i]),o=(0,p.useMemo)((()=>n.map((e=>({id:e,label:""===e?_r(Sr.ALL):e})))),[n]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("div",{className:"tips"},`${_r(Sr.EXPLORE_EXCELLENT_CASES)} ↓`),h().createElement(Pr,{tabs:o,activeTab:a,onTabClick:e=>r(e.detail.id)}),h().createElement("ul",{className:"cases"},null==s?void 0:s.map((e=>h().createElement("li",{key:e.conversationId},h().createElement(zr,{caseTitle:e.title,summary:e.summary,url:e.url})))))):null}Mr=Gr,({e:[Wr,Dr,Lr,Or],c:[Ur,Ir]}=(0,d.A)(Mr,[Br("ai-portal.show-cases",{styleTexts:[Rr.A]})],[[Hr({attribute:!1}),1,"list"],[Hr({type:Number}),1,"limit"]],0,void 0,m.ReactNextElement)),Ir();let Kr=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 $r="bricks/ai-portal/mcp-tools",Yr={en:{[Kr.MCP_HUB]:"MCP Hub",[Kr.ALL]:"All",[Kr.SERVER_cmdb]:"CMDB",[Kr.SERVER_cmdb_product_helper]:"CMDB",[Kr.SERVER_alert]:"Alert",[Kr.SERVER_web_builder]:"View",[Kr.SERVER_web_builder2]:"View",[Kr.SERVER_host_troubleshooting]:"Host Troubleshooting",[Kr.SERVER_system_inspection]:"System Inspection",[Kr.SERVER_grafana]:"Grafana",[Kr.SERVER_kubernetes]:"Kubernetes",[Kr.SERVER_llm]:"LLM"},zh:{[Kr.MCP_HUB]:"MCP 中心",[Kr.ALL]:"全部",[Kr.SERVER_cmdb]:"CMDB",[Kr.SERVER_cmdb_product_helper]:"CMDB",[Kr.SERVER_alert]:"告警",[Kr.SERVER_web_builder]:"视图",[Kr.SERVER_web_builder2]:"视图",[Kr.SERVER_host_troubleshooting]:"主机故障排查",[Kr.SERVER_system_inspection]:"系统巡检",[Kr.SERVER_grafana]:"Grafana",[Kr.SERVER_kubernetes]:"Kubernetes",[Kr.SERVER_llm]:"大模型"}},qr=g.i18n.getFixedT(null,$r);var Xr,Jr=i(31748);let Qr,Zr,es,ts,is;(0,g.initializeI18n)($r,Yr);const ns={lib:"antd",icon:"tool"},as=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"]}]]),rs=(0,m.wrapBrick)("eo-icon"),ss=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),os=(0,m.wrapBrick)("ai-portal.sticky-container"),{defineElement:ls,property:cs}=(0,u.createDecorators)();let ds;var ps=new WeakMap,hs=new WeakMap;class us extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,ps,Zr(this)),(0,r.A)(this,hs,(es(this),ts(this))),is(this)}get list(){return(0,c.A)(ps,this)}set list(e){(0,l.A)(ps,this,e)}get stickyTop(){return(0,c.A)(hs,this)}set stickyTop(e){(0,l.A)(hs,this,e)}render(){return h().createElement(ms,{list:this.list,stickyTop:this.stickyTop})}}function ms(e){let{list:t,stickyTop:i}=e;const[n,a]=(0,p.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=qr(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const r=[...as.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),s=r?r[0]:"其他";let o=i.get(s);o||i.set(s,o=[]),o.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const r=n.indexOf(i),s=n.indexOf(a);return(r<0?n.length:r)-(s<0?n.length:s)}))),i]}),[t]),r=(0,p.useMemo)((()=>{const e=[...as.keys()],t=[...a.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)})),["",...t]}),[a]),[s,o]=(0,p.useState)(""),l=(0,p.useMemo)((()=>{const e=[...n];if(!s)return e;const t=a.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,n,a]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:""===e?qr(Kr.ALL):e})))),[r]),d=h().createElement(ss,{tabs:c,activeTab:s,onTabClick:e=>o(e.detail.id)});return h().createElement(h().Fragment,null,null==i?h().createElement("div",{className:"non-sticky-tabs"},d):h().createElement(os,{className:"sticky-tabs",style:{top:i}},d),h().createElement("ul",{className:"groups"},null==l?void 0:l.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(rs,(0,vt.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:ns,{fallback:ns})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))))}Xr=us,({e:[Zr,es,ts,is],c:[ds,Qr]}=(0,d.A)(Xr,[ls("ai-portal.mcp-tools",{styleTexts:[Jr.A]})],[[cs({attribute:!1}),1,"list"],[cs({type:Number}),1,"stickyTop"]],0,void 0,m.ReactNextElement)),Qr();var gs,bs=i(48952),As=i(68717);let fs,vs,Es,xs,ks,ws,ys,Ts,Ss,Cs,Ns,_s,Ms,Rs,Is,Ws,Ds,Ls,Os,zs,Ps,Bs,Hs,Us,Vs,Fs,Gs,js,Ks,$s,Ys,qs,Xs,Js,Qs,Zs,eo,to,io,no,ao,ro,so,oo,lo,co,po,ho,uo,mo,go,bo,Ao,fo,vo,Eo;(0,g.initializeI18n)(bs.NS,bs.I);const{defineElement:xo,property:ko,event:wo,method:yo}=(0,u.createDecorators)(),To=(0,p.forwardRef)(As.C);let So;var Co=new WeakMap,No=new WeakMap,_o=new WeakMap,Mo=new WeakMap,Ro=new WeakMap,Io=new WeakMap,Wo=new WeakMap,Do=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,zo=new WeakMap,Po=new WeakMap,Bo=new WeakMap,Ho=new WeakMap,Uo=new WeakMap,Vo=new WeakMap,Fo=new WeakSet,Go=new WeakMap,jo=new WeakMap,Ko=new WeakMap,$o=new WeakMap,Yo=new WeakMap,qo=new WeakMap,Xo=new WeakMap,Jo=new WeakMap,Qo=new WeakMap,Zo=new WeakMap,el=new WeakMap,tl=new WeakMap;class il extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Fo),(0,r.A)(this,Co,(fs(this),Es(this))),(0,r.A)(this,No,(xs(this),ks(this))),(0,r.A)(this,_o,(ws(this),ys(this))),(0,r.A)(this,Mo,(Ts(this),Ss(this))),(0,r.A)(this,Ro,(Cs(this),Ns(this))),(0,r.A)(this,Io,(_s(this),Ms(this))),(0,r.A)(this,Wo,(Rs(this),Is(this))),(0,r.A)(this,Do,(Ws(this),Ds(this))),(0,r.A)(this,Lo,(Ls(this),Os(this))),(0,r.A)(this,Oo,(zs(this),Ps(this))),(0,r.A)(this,zo,(Bs(this),Hs(this))),(0,r.A)(this,Po,(Us(this),Vs(this))),(0,r.A)(this,Bo,(Fs(this),Gs(this))),(0,r.A)(this,Ho,(js(this),Ks(this))),(0,r.A)(this,Uo,($s(this),Ys(this))),(0,r.A)(this,Vo,(qs(this),Xs(this))),(0,r.A)(this,Go,(Zs(this),()=>{(0,o.A)(Fo,this,Js).emit()})),(0,r.A)(this,jo,eo(this)),(0,r.A)(this,Ko,(no(this),()=>{(0,o.A)(Fo,this,to).emit()})),(0,r.A)(this,$o,ao(this)),(0,r.A)(this,Yo,(oo(this),e=>{(0,o.A)(Fo,this,ro).emit(e)})),(0,r.A)(this,qo,lo(this)),(0,r.A)(this,Xo,(ho(this),e=>{(0,o.A)(Fo,this,co).emit(e)})),(0,r.A)(this,Jo,uo(this)),(0,r.A)(this,Qo,(bo(this),()=>{(0,o.A)(Fo,this,mo).emit("canvas")})),(0,r.A)(this,Zo,Ao(this)),(0,r.A)(this,el,(Eo(this),e=>{(0,o.A)(Fo,this,fo).emit(e)})),(0,r.A)(this,tl,(0,p.createRef)())}get conversationId(){return(0,c.A)(Co,this)}set conversationId(e){(0,l.A)(Co,this,e)}get initialRequest(){return(0,c.A)(No,this)}set initialRequest(e){(0,l.A)(No,this,e)}get replay(){return(0,c.A)(_o,this)}set replay(e){(0,l.A)(_o,this,e)}get replayDelay(){return(0,c.A)(Mo,this)}set replayDelay(e){(0,l.A)(Mo,this,e)}get supports(){return(0,c.A)(Ro,this)}set supports(e){(0,l.A)(Ro,this,e)}get showHumanActions(){return(0,c.A)(Io,this)}set showHumanActions(e){(0,l.A)(Io,this,e)}get showFeedback(){return(0,c.A)(Wo,this)}set showFeedback(e){(0,l.A)(Wo,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(Do,this)}set showFeedbackAfterFailed(e){(0,l.A)(Do,this,e)}get showFeedbackOnView(){return(0,c.A)(Lo,this)}set showFeedbackOnView(e){(0,l.A)(Lo,this,e)}get showUiSwitch(){return(0,c.A)(Oo,this)}set showUiSwitch(e){(0,l.A)(Oo,this,e)}get hideMermaid(){return(0,c.A)(zo,this)}set hideMermaid(e){(0,l.A)(zo,this,e)}get previewUrlTemplate(){return(0,c.A)(Po,this)}set previewUrlTemplate(e){(0,l.A)(Po,this,e)}get showCases(){return(0,c.A)(Bo,this)}set showCases(e){(0,l.A)(Bo,this,e)}get exampleProjects(){return(0,c.A)(Ho,this)}set exampleProjects(e){(0,l.A)(Ho,this,e)}get tryItOutUrl(){return(0,c.A)(Uo,this)}set tryItOutUrl(e){(0,l.A)(Uo,this,e)}resumed(){var e,t;null===(e=(0,c.A)(tl,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(tl,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(tl,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(tl,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return h().createElement(To,{conversationId:this.conversationId,initialRequest:this.initialRequest,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHumanActions:this.showHumanActions,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,previewUrlTemplate:this.previewUrlTemplate,showCases:this.showCases,exampleProjects:this.exampleProjects,tryItOutUrl:this.tryItOutUrl,onShare:(0,c.A)(Go,this),onTerminate:(0,c.A)(Ko,this),onSubmitFeedback:(0,c.A)(Yo,this),onSwitchToCanvas:(0,c.A)(Qo,this),onFeedbackOnView:(0,c.A)(Xo,this),onDetailChange:(0,c.A)(el,this)})}}gs=il,({e:[Es,xs,ks,ws,ys,Ts,Ss,Cs,Ns,_s,Ms,Rs,Is,Ws,Ds,Ls,Os,zs,Ps,Bs,Hs,Us,Vs,Fs,Gs,js,Ks,$s,Ys,qs,Xs,Js,Qs,Zs,eo,to,io,no,ao,ro,so,oo,lo,co,po,ho,uo,mo,go,bo,Ao,fo,vo,Eo,fs],c:[So,vs]}=(0,d.A)(gs,[xo("ai-portal.chat-stream",{shadowOptions:!1})],[[ko(),1,"conversationId"],[ko({attribute:!1,render:!1}),1,"initialRequest"],[ko({type:Boolean}),1,"replay"],[ko({type:Number}),1,"replayDelay"],[ko({attribute:!1}),1,"supports"],[ko({type:Boolean}),1,"showHumanActions"],[ko({type:Boolean}),1,"showFeedback"],[ko({type:Boolean}),1,"showFeedbackAfterFailed"],[ko({type:Boolean}),1,"showFeedbackOnView"],[ko({type:Boolean}),1,"showUiSwitch"],[ko({type:Boolean,render:!1}),1,"hideMermaid"],[ko(),1,"previewUrlTemplate"],[ko({attribute:!1}),1,"showCases"],[ko({attribute:!1}),1,"exampleProjects"],[ko(),1,"tryItOutUrl"],[wo({type:"share"}),1,"shareEvent",e=>(0,c.A)(Vo,e),(e,t)=>(0,l.A)(Vo,e,t)],[wo({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(jo,e),(e,t)=>(0,l.A)(jo,e,t)],[wo({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)($o,e),(e,t)=>(0,l.A)($o,e,t)],[wo({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(qo,e),(e,t)=>(0,l.A)(qo,e,t)],[wo({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Jo,e),(e,t)=>(0,l.A)(Jo,e,t)],[wo({type:"detail.change"}),1,"detailChange",e=>(0,c.A)(Zo,e),(e,t)=>(0,l.A)(Zo,e,t)],[yo(),2,"resumed"],[yo(),2,"feedbackSubmitDone"],[yo(),2,"feedbackSubmitFailed"],[yo(),2,"feedbackOnViewDone"]],0,(e=>tl.has((0,s.A)(e))),m.ReactNextElement)),vs();let nl=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e.UNTITLED="UNTITLED",e}({});const al="bricks/ai-portal/ai-employees",rl=g.i18n.getFixedT(null,al);var sl,ol=i(98036),ll=i(65549);let cl,dl,pl,hl,ul,ml,gl,bl,Al;(0,g.initializeI18n)(al,{en:{AI_EMPLOYEES:"AI Employees",UNTITLED:"Untitled"},zh:{AI_EMPLOYEES:"Ai 数字人",UNTITLED:"未命名"}});const fl=(0,m.wrapBrick)("eo-link"),vl=(0,m.wrapBrick)("eo-icon"),El=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:xl,property:kl}=(0,u.createDecorators)();let wl;var yl=new WeakMap,Tl=new WeakMap,Sl=new WeakMap,Cl=new WeakMap;class Nl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,yl,dl(this)),(0,r.A)(this,Tl,(pl(this),hl(this))),(0,r.A)(this,Sl,(ul(this),ml(this))),(0,r.A)(this,Cl,(gl(this),bl(this,!0))),Al(this)}get list(){return(0,c.A)(yl,this)}set list(e){(0,l.A)(yl,this,e)}get industries(){return(0,c.A)(Tl,this)}set industries(e){(0,l.A)(Tl,this,e)}get urlTemplate(){return(0,c.A)(Sl,this)}set urlTemplate(e){(0,l.A)(Sl,this,e)}get withContainer(){return(0,c.A)(Cl,this)}set withContainer(e){(0,l.A)(Cl,this,e)}render(){return h().createElement(_l,{list:this.list,industries:this.industries,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function _l(e){let{list:t,industries:i,urlTemplate:n,withContainer:a}=e;const r=(0,p.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[s,o]=(0,p.useState)(r[0]),l=(0,p.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==s)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[s,t]),c=(0,p.useMemo)((()=>r.map((e=>({id:e,label:e||rl(nl.UNTITLED)})))),[r]),d=h().createElement(h().Fragment,null,h().createElement(El,{tabs:c,activeTab:s,onTabClick:e=>o(e.detail.id)}),h().createElement("ul",{className:"groups"},l.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)=>h().createElement("li",{key:t},h().createElement(fl,(0,vt.A)({className:_n()("link",{clickable:!!n})},n?{url:(0,ll.Q)(n,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},e.avatar?h().createElement("img",{src:e.avatar}):h().createElement(vl,{lib:"antd",icon:"user"})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description)))))))}))));return a?h().createElement("div",{className:"container"},h().createElement("h1",null,rl(nl.AI_EMPLOYEES)),d):d}sl=Nl,({e:[dl,pl,hl,ul,ml,gl,bl,Al],c:[wl,cl]}=(0,d.A)(sl,[xl("ai-portal.ai-employees",{styleTexts:[ol.A]})],[[kl({attribute:!1}),1,"list"],[kl({attribute:!1}),1,"industries"],[kl(),1,"urlTemplate"],[kl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),cl();let Ml=function(e){return e.AGENTS="AGENTS",e}({});const Rl="bricks/ai-portal/ai-agents",Il=g.i18n.getFixedT(null,Rl);var Wl,Dl=i(83059);let Ll,Ol,zl,Pl,Bl,Hl,Ul;const Vl={lib:"antd",icon:"tool"};(0,g.initializeI18n)(Rl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const Fl=(0,m.wrapBrick)("eo-icon"),Gl=(0,m.wrapBrick)("eo-link"),{defineElement:jl,property:Kl}=(0,u.createDecorators)();let $l;var Yl=new WeakMap,ql=new WeakMap,Xl=new WeakMap;class Jl extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Yl,Ol(this)),(0,r.A)(this,ql,(zl(this),Pl(this))),(0,r.A)(this,Xl,(Bl(this),Hl(this,!0))),Ul(this)}get list(){return(0,c.A)(Yl,this)}set list(e){(0,l.A)(Yl,this,e)}get urlTemplate(){return(0,c.A)(ql,this)}set urlTemplate(e){(0,l.A)(ql,this,e)}get withContainer(){return(0,c.A)(Xl,this)}set withContainer(e){(0,l.A)(Xl,this,e)}render(){return h().createElement(Ql,{list:this.list,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function Ql(e){let{list:t,urlTemplate:i,withContainer:n}=e;const a=h().createElement(h().Fragment,null,h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var n,a;return h().createElement("li",{key:t},h().createElement(Gl,(0,vt.A)({className:_n()("link",{clickable:!!i})},i?{url:(0,ll.Q)(i,e)}:null),h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(Fl,(0,vt.A)({},null!==(n=e.icon)&&void 0!==n?n:Vl,{fallback:Vl}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(a=e.tags)||void 0===a?void 0:a.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description)))}))));return n?h().createElement("div",{className:"container"},h().createElement("h1",null,Il(Ml.AGENTS)),a):a}Wl=Jl,({e:[Ol,zl,Pl,Bl,Hl,Ul],c:[$l,Ll]}=(0,d.A)(Wl,[jl("ai-portal.ai-agents",{styleTexts:[Dl.A]})],[[Kl({attribute:!1}),1,"list"],[Kl(),1,"urlTemplate"],[Kl({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Ll();let Zl=null;customElements.define("ai-portal.save-request-store",(0,Mt.createProviderClass)((function(e){Zl=e}))),customElements.define("ai-portal.load-request-store",(0,Mt.createProviderClass)((function(){const e=Zl;return Zl=null,e}))),customElements.define("ai-portal.clear-request-store",(0,Mt.createProviderClass)((function(){Zl=null})));var ec,tc=i(49041);let ic,nc,ac,rc,sc,oc,lc,cc,dc,pc,hc;const uc=(0,m.wrapBrick)("eo-link"),mc=(0,m.wrapBrick)("ai-portal.sticky-container"),{defineElement:gc,property:bc}=(0,u.createDecorators)();let Ac;var fc=new WeakMap,vc=new WeakMap,Ec=new WeakMap,xc=new WeakMap,kc=new WeakMap;class wc extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,fc,nc(this)),(0,r.A)(this,vc,(ac(this),rc(this))),(0,r.A)(this,Ec,(sc(this),oc(this))),(0,r.A)(this,xc,(lc(this),cc(this))),(0,r.A)(this,kc,(dc(this),pc(this))),hc(this)}get pageTitle(){return(0,c.A)(fc,this)}set pageTitle(e){(0,l.A)(fc,this,e)}get breadcrumbs(){return(0,c.A)(vc,this)}set breadcrumbs(e){(0,l.A)(vc,this,e)}get size(){return(0,c.A)(Ec,this)}set size(e){(0,l.A)(Ec,this,e)}get variant(){return(0,c.A)(xc,this)}set variant(e){(0,l.A)(xc,this,e)}get sticky(){return(0,c.A)(kc,this)}set sticky(e){(0,l.A)(kc,this,e)}render(){return h().createElement(yc,{pageTitle:this.pageTitle,breadcrumbs:this.breadcrumbs,sticky:this.sticky})}}function yc(e){let{breadcrumbs:t,pageTitle:i,sticky:n}=e;(0,p.useEffect)((()=>{"string"==typeof i&&(0,Cn.getRuntime)().applyPageTitle(i)}),[i]);const a=i||null!=t&&t.length?h().createElement("div",{className:"header"},h().createElement("nav",null,null!=t&&t.length?h().createElement("ul",{className:"breadcrumbs"},t.map(((e,t)=>h().createElement("li",{key:t},h().createElement(uc,{url:e.url},e.text))))):null,i?h().createElement("h1",null,i):null),h().createElement("slot",{name:"toolbar"})):null;return h().createElement("div",{className:"container"},a&&n?h().createElement(mc,{className:"sticky-header"},a):h().createElement("div",{className:"non-sticky-header"},a),h().createElement("slot",null))}ec=wc,({e:[nc,ac,rc,sc,oc,lc,cc,dc,pc,hc],c:[Ac,ic]}=(0,d.A)(ec,[gc("ai-portal.page-container",{styleTexts:[tc.A]})],[[bc(),1,"pageTitle"],[bc({attribute:!1}),1,"breadcrumbs"],[bc({render:!1}),1,"size"],[bc({render:!1}),1,"variant"],[bc({type:Boolean}),1,"sticky"]],0,void 0,m.ReactNextElement)),ic();var Tc,Sc=i(20124);let Cc,Nc,_c,Mc,Rc,Ic,Wc,Dc,Lc;const{defineElement:Oc,property:zc,event:Pc}=(0,u.createDecorators)();let Bc;var Hc=new WeakMap,Uc=new WeakMap,Vc=new WeakMap,Fc=new WeakSet,Gc=new WeakMap;class jc extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Fc),(0,r.A)(this,Hc,Nc(this)),(0,r.A)(this,Uc,(_c(this),Mc(this))),(0,r.A)(this,Vc,(Rc(this),Ic(this))),(0,r.A)(this,Gc,(Lc(this),e=>{this.activeTab=e.id,(0,o.A)(Fc,this,Wc).emit(e)}))}get tabs(){return(0,c.A)(Hc,this)}set tabs(e){(0,l.A)(Hc,this,e)}get activeTab(){return(0,c.A)(Uc,this)}set activeTab(e){(0,l.A)(Uc,this,e)}render(){return h().createElement(Kc,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Gc,this)})}}function Kc(e){let{tabs:t,activeTab:i,onTabClick:n}=e;return h().createElement("ul",{className:"tabs",part:"tabs"},null==t?void 0:t.map((e=>h().createElement("li",{key:e.id,part:"tab",className:_n()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>n(e)},e.label)))))}Tc=jc,({e:[Nc,_c,Mc,Rc,Ic,Wc,Dc,Lc],c:[Bc,Cc]}=(0,d.A)(Tc,[Oc("ai-portal.tab-list",{styleTexts:[Sc.A]})],[[zc({attribute:!1}),1,"tabs"],[zc({attribute:!1}),1,"activeTab"],[Pc({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(Vc,e),(e,t)=>(0,l.A)(Vc,e,t)]],0,(e=>Gc.has((0,s.A)(e))),m.ReactNextElement)),Cc();var $c=i(41030);let Yc=function(e){return e.PLEASE_SELECT="PLEASE_SELECT",e.SEARCH_PLACEHOLDER="SEARCH_PLACEHOLDER",e.SEARCH_NO_DATA="SEARCH_NO_DATA",e}({});const qc="bricks/ai-portal/dropdown-select",Xc=g.i18n.getFixedT(null,qc);var Jc,Qc=i(40138);let Zc,ed,td,id,nd,ad,rd,sd,od,ld,cd,dd,pd,hd,ud,md,gd,bd,Ad,fd,vd;(0,g.initializeI18n)(qc,{en:{PLEASE_SELECT:"Please Select",SEARCH_PLACEHOLDER:"Search",SEARCH_NO_DATA:"No Data"},zh:{PLEASE_SELECT:"请选择",SEARCH_PLACEHOLDER:"搜索",SEARCH_NO_DATA:"暂无结果"}});const{defineElement:Ed,property:xd,event:kd}=(0,u.createDecorators)(),wd=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),yd=(0,m.wrapBrick)("eo-icon"),Td=(0,m.wrapBrick)("eo-loading-container"),Sd=(0,m.wrapBrick)("eo-menu"),Cd=(0,m.wrapBrick)("eo-menu-item"),Nd=(0,m.wrapBrick)("eo-input",{onValueChange:"change"});let _d;var Md=new WeakMap,Rd=new WeakMap,Id=new WeakMap,Wd=new WeakMap,Dd=new WeakMap,Ld=new WeakMap,Od=new WeakMap,zd=new WeakMap,Pd=new WeakMap,Bd=new WeakSet,Hd=new WeakMap;class Ud extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Bd),(0,r.A)(this,Md,ed(this)),(0,r.A)(this,Rd,(td(this),id(this))),(0,r.A)(this,Id,(nd(this),ad(this))),(0,r.A)(this,Wd,(rd(this),sd(this))),(0,r.A)(this,Dd,(od(this),ld(this))),(0,r.A)(this,Ld,(cd(this),dd(this))),(0,r.A)(this,Od,(pd(this),hd(this))),(0,r.A)(this,zd,(ud(this),md(this))),(0,r.A)(this,Pd,(gd(this),bd(this))),(0,r.A)(this,Hd,(vd(this),e=>{(0,o.A)(Bd,this,Ad).emit(e)}))}get value(){return(0,c.A)(Md,this)}set value(e){(0,l.A)(Md,this,e)}get options(){return(0,c.A)(Rd,this)}set options(e){(0,l.A)(Rd,this,e)}get labelMaxWidth(){return(0,c.A)(Id,this)}set labelMaxWidth(e){(0,l.A)(Id,this,e)}get loading(){return(0,c.A)(Wd,this)}set loading(e){(0,l.A)(Wd,this,e)}get searchPlaceholder(){return(0,c.A)(Dd,this)}set searchPlaceholder(e){(0,l.A)(Dd,this,e)}get dropdownContentStyle(){return(0,c.A)(Ld,this)}set dropdownContentStyle(e){(0,l.A)(Ld,this,e)}get dropdownMaxWidth(){return(0,c.A)(Od,this)}set dropdownMaxWidth(e){(0,l.A)(Od,this,e)}get showSearch(){return(0,c.A)(zd,this)}set showSearch(e){(0,l.A)(zd,this,e)}render(){return h().createElement(Vd,{value:this.value,options:this.options,onChange:(0,c.A)(Hd,this),loading:this.loading,labelMaxWidth:this.labelMaxWidth,dropdownMaxWidth:this.dropdownMaxWidth,showSearch:this.showSearch,searchPlaceholder:this.searchPlaceholder,dropdownContentStyle:this.dropdownContentStyle})}}function Vd(e){let{value:t,options:i,labelMaxWidth:n,dropdownMaxWidth:a,showSearch:r,loading:s,searchPlaceholder:o,dropdownContentStyle:l,onChange:c}=e;const[d,u]=(0,p.useState)(!1),[m,g]=(0,p.useState)(t),[b,A]=(0,p.useState)(""),[f,v]=(0,p.useState)(i);(0,p.useEffect)((()=>{v(i)}),[i]);const E=(0,p.useMemo)((()=>null==f?void 0:f.find((e=>e.value===m))),[f,m]),x=(0,p.useMemo)((()=>b&&f?null==f?void 0:f.filter((e=>e.label.toLowerCase().includes(b.toLowerCase()))):f),[f,b]),k=(0,p.useCallback)((e=>{u(e.detail),e.detail||A("")}),[]),w=(0,p.useMemo)((()=>(0,$c.debounce)((e=>{A(e.detail)}),300)),[]);return h().createElement(wd,{placement:"bottom-start",trigger:"click",active:d,arrow:!1,distance:5,onBeforeVisibleChange:k},h().createElement("span",{slot:"anchor",className:"trigger"},h().createElement("span",{className:"label",style:{maxWidth:n}},E?null==E?void 0:E.label:Xc(Yc.PLEASE_SELECT)),h().createElement(yd,{lib:"lucide",icon:d?"chevron-up":"chevron-down"})),h().createElement("div",{className:"dropdown",style:{maxWidth:a}},r&&h().createElement("div",{className:"search-container"},h().createElement(Nd,{className:"search",value:b,placeholder:o||Xc(Yc.SEARCH_PLACEHOLDER),onValueChange:w},h().createElement(yd,{slot:"prefix",lib:"antd",icon:"search"}))),h().createElement(Td,{loading:s,delay:500,style:{width:"100%"}},h().createElement("div",{className:"dropdown-inner",style:l},h().createElement("slot",{name:"prefix"}),!(null==x||!x.length)&&h().createElement(Sd,null,null==x?void 0:x.map((e=>h().createElement(Cd,{key:e.value,disabled:e.disabled,className:m===e.value?"active":void 0,onClick:t=>{t.preventDefault(),t.stopPropagation(),u(!1),m!==e.value&&(g(e.value),c(e))}},e.label)))),!(null!=x&&x.length)&&h().createElement("div",{className:"empty"},Xc(Yc.SEARCH_NO_DATA))))))}Jc=Ud,({e:[ed,td,id,nd,ad,rd,sd,od,ld,cd,dd,pd,hd,ud,md,gd,bd,Ad,fd,vd],c:[_d,Zc]}=(0,d.A)(Jc,[Ed("ai-portal.dropdown-select",{styleTexts:[Qc.A]})],[[xd(),1,"value"],[xd({attribute:!1}),1,"options"],[xd({attribute:!1}),1,"labelMaxWidth"],[xd({type:Boolean}),1,"loading"],[xd({attribute:!1}),1,"searchPlaceholder"],[xd({attribute:!1}),1,"dropdownContentStyle"],[xd({attribute:!1}),1,"dropdownMaxWidth"],[xd({type:Boolean}),1,"showSearch"],[kd({type:"change"}),1,"changeEvent",e=>(0,c.A)(Pd,e),(e,t)=>(0,l.A)(Pd,e,t)]],0,(e=>Hd.has((0,s.A)(e))),m.ReactNextElement)),Zc();var Fd=i(71568);let Gd=function(e){return e.UNTITLED="UNTITLED",e}({});const jd="bricks/ai-portal/preview-container",Kd=g.i18n.getFixedT(null,jd);var $d=i(72591),Yd=i.n($d),qd=i(1740),Xd=i.n(qd),Jd=i(88128),Qd=i.n(Jd),Zd=i(30855),ep=i.n(Zd),tp=i(93051),ip=i.n(tp),np=i(73656),ap=i.n(np),rp=i(62522),sp={};sp.styleTagTransform=ap(),sp.setAttributes=ep(),sp.insert=Qd().bind(null,"head"),sp.domAPI=Xd(),sp.insertStyleElement=ip(),Yd()(rp.A,sp);const op=rp.A&&rp.A.locals?rp.A.locals:void 0;var lp,cp=i(43100),dp=i(23241);let pp,hp,up,mp,gp;(0,g.initializeI18n)(jd,{en:{UNTITLED:"Untitled"},zh:{UNTITLED:"无标题"}});const bp=(0,m.wrapBrick)("eo-icon"),Ap=(0,m.wrapBrick)("eo-page-title"),fp=(0,m.wrapBrick)("eo-main-view"),vp=(0,m.wrapBrick)("eo-narrow-view"),{defineElement:Ep,property:xp}=(0,u.createDecorators)();let kp;var wp=new WeakMap,yp=new WeakMap,Tp=new WeakMap;class Sp extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,wp,hp(this)),(0,r.A)(this,yp,(up(this),mp(this))),(0,r.A)(this,Tp,(gp(this),(0,$c.uniqueId)()))}get source(){return(0,c.A)(wp,this)}set source(e){(0,l.A)(wp,this,e)}get url(){return(0,c.A)(yp,this)}set url(e){(0,l.A)(yp,this,e)}render(){return h().createElement(p.Suspense,{fallback:h().createElement(bp,{lib:"antd",icon:"loading-3-quarters",spinning:!0,className:op.loading})},h().createElement(Cp,{rootId:(0,c.A)(Tp,this),source:this.source,url:this.url}))}}function Cp(e){let{rootId:t,source:i,url:n}=e;const a=(0,p.useMemo)((()=>i?async function(e){const t=await(0,cp.f)();return await t.parseView(e)}(i).catch((e=>(console.error("Failed to parse view:",e),null))):Promise.resolve(null)),[i]),r=(0,p.use)(a),s=(0,p.useMemo)((()=>r?(0,Fd.z)(r,{rootId:t,expanded:!0}).catch((e=>(console.error("Failed to convert view:",e),null))):Promise.resolve(null)),[r,t]),o=(0,p.use)(s),l=(0,p.useMemo)((()=>{var e;return null==r||null===(e=r.entry)||void 0===e||null===(e=e.defaultExport)||void 0===e?void 0:e.title}),[r]);return h().createElement(Np,{rootId:t,pageTitle:l,convertedResult:o,url:n})}function Np(e){let{rootId:t,pageTitle:i,convertedResult:n,url:a}=e;const r=(0,p.useRef)(null),s=(0,p.useRef)(null);return(0,p.useEffect)((()=>{const e=r.current;if(!e)return;const i=(0,dp.d)(t),n=(0,Cn.unstable_createRoot)(e,{portal:i,supportsUseChildren:!0});return s.current=n,()=>{n.unmount(),i.remove(),s.current=null}}),[t]),(0,p.useEffect)((()=>{var e;if(!n)return;const{brick:t,context:i,functions:r,templates:o}=n;null===(e=s.current)||void 0===e||e.render(t,{context:i,functions:r,templates:o,url:a})}),[n,a]),h().createElement(vp,{size:"large",className:op.container},h().createElement(fp,null,h().createElement(Ap,{slot:"pageTitle",pageTitle:i||Kd(Gd.UNTITLED)}),h().createElement("div",{className:op.main,ref:r,"data-root-id":t})))}lp=Sp,({e:[hp,up,mp,gp],c:[kp,pp]}=(0,d.A)(lp,[Ep("ai-portal.preview-container",{shadowOptions:!1})],[[xp({attribute:!1}),1,"source"],[xp(),1,"url"]],0,void 0,m.ReactNextElement)),pp();const _p="bricks/ai-portal/action-buttons";g.i18n.getFixedT(null,_p);var Mp,Rp=i(11816);let Ip,Wp,Dp,Lp,Op,zp,Pp,Bp,Hp;(0,g.initializeI18n)(_p,{en:{},zh:{}});const Up=(0,m.wrapBrick)("eo-icon"),Vp=(0,m.wrapBrick)("eo-button"),{defineElement:Fp,property:Gp,event:jp}=(0,u.createDecorators)();let Kp;var $p=new WeakMap,Yp=new WeakMap,qp=new WeakMap,Xp=new WeakSet,Jp=new WeakMap;class Qp extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Xp),(0,r.A)(this,$p,Wp(this)),(0,r.A)(this,Yp,(Dp(this),Lp(this))),(0,r.A)(this,qp,(Op(this),zp(this))),(0,r.A)(this,Jp,(Hp(this),e=>{this.activeKey=e?e.key:null,(0,o.A)(Xp,this,Pp).emit(e)}))}get items(){return(0,c.A)($p,this)}set items(e){(0,l.A)($p,this,e)}get activeKey(){return(0,c.A)(Yp,this)}set activeKey(e){(0,l.A)(Yp,this,e)}render(){return h().createElement(Zp,{items:this.items,activeKey:this.activeKey,onChange:(0,c.A)(Jp,this)})}}function Zp(e){let{items:t,activeKey:i,onChange:n}=e;const[a,r]=(0,p.useState)(null!=i?i:null),s=(0,p.useRef)(!1);(0,p.useEffect)((()=>{r(null!=i?i:null)}),[i]),(0,p.useEffect)((()=>{var e;s.current?n(a&&null!==(e=null==t?void 0:t.find((e=>!e.hidden&&e.key===a)))&&void 0!==e?e:null):s.current=!0}),[a,t,n]);const o=(0,p.useMemo)((()=>null==t?void 0:t.filter((e=>!e.hidden&&!a||e.key===a))),[t,a]);return h().createElement("div",{className:"button-container"},null==o?void 0:o.map((e=>{const{text:t,icon:i,key:n}=e;return h().createElement(Vp,{key:n,className:"action"+(a?" active":""),themeVariant:"elevo",type:"neutral",onClick:()=>{a||r(n)}},i?h().createElement(Up,(0,vt.A)({className:"icon"},i)):null,t,a?h().createElement(Up,{className:"remove",lib:"lucide",icon:"x",onClick:e=>{e.stopPropagation(),e.preventDefault(),r(null)}}):null)})))}Mp=Qp,({e:[Wp,Dp,Lp,Op,zp,Pp,Bp,Hp],c:[Kp,Ip]}=(0,d.A)(Mp,[Fp("ai-portal.action-buttons",{styleTexts:[Rp.A]})],[[Gp({attribute:!1}),1,"items"],[Gp(),1,"activeKey"],[jp({type:"change"}),1,"change",e=>(0,c.A)(qp,e),(e,t)=>(0,l.A)(qp,e,t)]],0,(e=>Jp.has((0,s.A)(e))),m.ReactNextElement)),Ip();let eh=function(e){return e.UN_START_STATUS="UN_START_STATUS",e.RUNNING_STATUS="RUNNING_STATUS",e.COMPLETED_STATUS="COMPLETED_STATUS",e.NEW_CHAT="NEW_CHAT",e}({});const th="bricks/ai-portal/goal-card-list",ih={en:{UN_START_STATUS:"Not Start",RUNNING_STATUS:"Running",COMPLETED_STATUS:"Completed",NEW_CHAT:"New chat"},zh:{UN_START_STATUS:"未开始",RUNNING_STATUS:"运行中",COMPLETED_STATUS:"已完成",NEW_CHAT:"新对话"}},nh=g.i18n.getFixedT(null,th);var ah=i(46342),rh=i(10335);let sh;(0,g.initializeI18n)(th,ih);const oh=(0,m.wrapBrick)("eo-icon"),lh=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),ch=(0,m.wrapBrick)("eo-easyops-avatar"),dh=(0,m.wrapBrick)("eo-button"),ph={ready:"uncheck-status",working:"active-status",completed:"check-status"},hh=[{key:"ready",icon:{icon:"uncheck-status",lib:"easyops",category:"colored-common"},text:nh(eh.UN_START_STATUS)},{key:"working",icon:{icon:"active-status",lib:"easyops",category:"colored-common"},text:nh(eh.RUNNING_STATUS)},{key:"completed",icon:{icon:"check-status",lib:"easyops",category:"colored-common"},text:nh(eh.COMPLETED_STATUS)}];function uh(e){let{goalItem:t,idWidth:i,cardStyle:n,onStatusChange:a,onTitleChange:r,onClick:s,onNewChat:o,onAppendChild:l,onRevokeAppendChild:c,isActive:d}=e;const{state:u,id:m,title:g,conversations:b,owner:A,pending:f}=t,v=(0,p.useRef)(!1),E=(0,p.useCallback)((()=>{v.current=!0}),[]),x=(0,p.useCallback)((()=>{v.current=!1}),[]),[k,w]=(0,p.useState)(!1),y=(0,p.useCallback)((()=>{w(!0)}),[]),T=(0,p.useCallback)((e=>{w(!1);const t=e.currentTarget.textContent;!f||null!=t&&t.trim()?null!==t&&g!==t&&(null==r||r(t)):null==c||c()}),[f,g,c,r]),S=(0,p.useCallback)((e=>{v.current||"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}),[]),C=(0,p.useRef)(null);return(0,p.useEffect)((()=>{var e;f&&(null===(e=C.current)||void 0===e||e.focus())}),[f]),h().createElement("div",{className:_n()("goal-item",t.state,{editing:k},{active:d}),style:{paddingLeft:24*(t.level+1)+"px",...n},onClick:f?void 0:s},h().createElement("div",{className:"start"},h().createElement(lh,{actions:hh,disabled:f,onActionClick:e=>{var t;t=e.detail,null==a||a(t.key)}},h().createElement(oh,{className:"icon",lib:"easyops",category:"colored-common",icon:ph[u],onClick:e=>e.stopPropagation()})),h().createElement("span",{className:"serial-number",style:{width:i}},"#",f?"":m),h().createElement("span",{className:"title",ref:C,onClick:e=>e.stopPropagation(),onFocus:y,onBlur:T,onKeyDown:S,onCompositionStart:E,onCompositionEnd:x,contentEditable:(N=!0,N?function(){if("boolean"!=typeof sh){const e=document.createElement("div");e.setAttribute("contenteditable","PLAINTEXT-ONLY"),sh="plaintext-only"===e.contentEditable}return sh}()?"plaintext-only":"true":"false"),suppressContentEditableWarning:!0},g)),h().createElement("div",{className:"end"},h().createElement("div",{className:"info"},h().createElement("div",{className:"message"},h().createElement(oh,{lib:"easyops",category:"common",icon:"message"}),h().createElement("span",{className:"count"},b||0)),h().createElement(ch,{nameOrInstanceId:null==A?void 0:A.instanceId,size:"small"})),h().createElement("div",{className:"operation",onClick:e=>e.stopPropagation()},0===t.level&&h().createElement(dh,{className:"append-child",themeVariant:"elevo",type:"neutral",size:"small",onClick:l},h().createElement(oh,{lib:"lucide",icon:"plus"})),!f&&h().createElement(dh,{className:"new-chat",themeVariant:"elevo",type:"neutral",size:"small",onClick:o},nh(eh.NEW_CHAT)))));var N}var mh;let gh,bh,Ah,fh,vh,Eh,xh,kh,wh,yh,Th,Sh,Ch,Nh,_h,Mh,Rh,Ih,Wh,Dh,Lh,Oh,zh,Ph;(0,g.initializeI18n)(th,ih);const{defineElement:Bh,property:Hh,event:Uh,method:Vh}=(0,u.createDecorators)(),Fh=(0,m.wrapBrick)("eo-icon"),Gh=(0,p.forwardRef)(su);let jh;var Kh=new WeakMap,$h=new WeakMap,Yh=new WeakMap,qh=new WeakMap,Xh=new WeakSet,Jh=new WeakMap,Qh=new WeakMap,Zh=new WeakMap,eu=new WeakMap,tu=new WeakMap,iu=new WeakMap,nu=new WeakMap,au=new WeakMap;class ru extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Xh),(0,r.A)(this,Kh,(gh(this),Ah(this))),(0,r.A)(this,$h,(fh(this),vh(this))),(0,r.A)(this,Yh,(Eh(this),xh(this))),(0,r.A)(this,qh,(kh(this),wh(this))),(0,r.A)(this,Jh,(Sh(this),e=>{(0,o.A)(Xh,this,yh).emit(e)})),(0,r.A)(this,Qh,Ch(this)),(0,r.A)(this,Zh,(Mh(this),e=>{(0,o.A)(Xh,this,Nh).emit(e)})),(0,r.A)(this,eu,Rh(this)),(0,r.A)(this,tu,(Dh(this),e=>{(0,o.A)(Xh,this,Ih).emit(e)})),(0,r.A)(this,iu,Lh(this)),(0,r.A)(this,nu,(Ph(this),e=>{(0,o.A)(Xh,this,Oh).emit(e)})),(0,r.A)(this,au,(0,p.createRef)())}get goalList(){return(0,c.A)(Kh,this)}set goalList(e){(0,l.A)(Kh,this,e)}get cardStyle(){return(0,c.A)($h,this)}set cardStyle(e){(0,l.A)($h,this,e)}get activeKey(){return(0,c.A)(Yh,this)}set activeKey(e){(0,l.A)(Yh,this,e)}appendChildDone(e,t){var i;null===(i=(0,c.A)(au,this).current)||void 0===i||i.appendChildDone(e,t)}render(){return h().createElement(Gh,{ref:(0,c.A)(au,this),goalList:this.goalList,cardStyle:this.cardStyle,onTitleChange:(0,c.A)(tu,this),onStatusChange:(0,c.A)(Zh,this),onItemClick:(0,c.A)(Jh,this),onNewChat:(0,c.A)(nu,this),activeKey:this.activeKey})}}function su(e,t){let{goalList:i,cardStyle:n,onTitleChange:a,onStatusChange:r,onItemClick:s,onNewChat:o,activeKey:l}=e;const[c,d]=(0,p.useState)(i);(0,p.useEffect)((()=>{d(i)}),[i]);const u=(e,t,i,n)=>{const a={...e,[t]:i};d(null==c?void 0:c.map((e=>e.instanceId===a.instanceId?a:e))),null==n||n(a)};(0,p.useImperativeHandle)(t,(()=>({appendChildDone:(e,t)=>{d((i=>null==i?void 0:i.map((i=>i.instanceId===e?{...t,level:i.level}:i))))}})),[]);const m=(0,p.useMemo)((()=>{var e;return 10*((null!==(e=null==c?void 0:c.reduce(((e,t)=>Math.max(e,t.id)),0))&&void 0!==e?e:0).toString().length+1)}),[c]);return c?h().createElement("div",{className:"goal-container"},null==c?void 0:c.map((e=>h().createElement(uh,{key:e.instanceId,isActive:l===e.instanceId,goalItem:e,idWidth:m,cardStyle:n,onTitleChange:t=>((e,t)=>{u(t,"title",e,a)})(t,e),onStatusChange:t=>((e,t)=>{u(t,"state",e,r)})(t,e),onNewChat:()=>null==o?void 0:o(e),onClick:()=>null==s?void 0:s(e),onAppendChild:()=>(e=>{const t={instanceId:(0,$c.uniqueId)("pending-"),pending:!0,id:0,title:"",state:"ready",level:1,pendingParentId:e.instanceId};d((i=>{var n;const a=null!==(n=null==i?void 0:i.findIndex((t=>t.instanceId===e.instanceId)))&&void 0!==n?n:-1;if(-1===a)return i;const r=i.slice(a+1).findIndex((e=>0===e.level))+1;return 0===r?[...i,t]:[...i.slice(0,a+r),t,...i.slice(a+r)]}))})(e),onRevokeAppendChild:()=>{d((t=>null==t?void 0:t.filter((t=>t.instanceId!==e.instanceId))))}})))):h().createElement("div",{className:"loading"},h().createElement(Fh,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}mh=ru,({e:[Ah,fh,vh,Eh,xh,kh,wh,yh,Th,Sh,Ch,Nh,_h,Mh,Rh,Ih,Wh,Dh,Lh,Oh,zh,Ph,gh],c:[jh,bh]}=(0,d.A)(mh,[Bh("ai-portal.goal-card-list",{styleTexts:[rh.A,ah.A]})],[[Hh({attribute:!1}),1,"goalList"],[Hh({attribute:!1}),1,"cardStyle"],[Hh(),1,"activeKey"],[Uh({type:"item.click"}),1,"itemClickEvent",e=>(0,c.A)(qh,e),(e,t)=>(0,l.A)(qh,e,t)],[Uh({type:"item.status.change"}),1,"itemStatusChangeEvent",e=>(0,c.A)(Qh,e),(e,t)=>(0,l.A)(Qh,e,t)],[Uh({type:"item.title.change"}),1,"itemTitleChangeEvent",e=>(0,c.A)(eu,e),(e,t)=>(0,l.A)(eu,e,t)],[Uh({type:"item.new.chat"}),1,"itemNewChatEvent",e=>(0,c.A)(iu,e),(e,t)=>(0,l.A)(iu,e,t)],[Vh(),2,"appendChildDone"]],0,(e=>au.has((0,s.A)(e))),m.ReactNextElement)),bh();var ou=i(62916);let lu=function(e){return e.PROJECT_OVERALL="PROJECT_OVERALL",e}({});const cu="bricks/ai-portal/project-conversations",du=g.i18n.getFixedT(null,cu);var pu,hu=i(79286);let uu,mu,gu,bu,Au,fu,vu,Eu,xu,ku,wu,yu,Tu,Su,Cu,Nu,_u;(0,g.initializeI18n)(cu,{en:{PROJECT_OVERALL:"Project overall"},zh:{PROJECT_OVERALL:"项目整体"}});const Mu=(0,m.wrapBrick)("eo-link"),Ru=(0,m.wrapBrick)("eo-icon"),Iu=(0,m.wrapBrick)("eo-easyops-avatar"),Wu=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Du,property:Lu,event:Ou}=(0,u.createDecorators)();let zu;var Pu=new WeakMap,Bu=new WeakMap,Hu=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,Fu=new WeakSet,Gu=new WeakMap,ju=new WeakMap,Ku=new WeakMap;class $u extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Fu),(0,r.A)(this,Pu,mu(this)),(0,r.A)(this,Bu,(gu(this),bu(this))),(0,r.A)(this,Hu,(Au(this),fu(this))),(0,r.A)(this,Uu,(vu(this),Eu(this))),(0,r.A)(this,Vu,(xu(this),ku(this))),(0,r.A)(this,Gu,(Tu(this),e=>{(0,o.A)(Fu,this,wu).emit(e)})),(0,r.A)(this,ju,Su(this)),(0,r.A)(this,Ku,(_u(this),e=>{(0,o.A)(Fu,this,Cu).emit(e)}))}get list(){return(0,c.A)(Pu,this)}set list(e){(0,l.A)(Pu,this,e)}get urlTemplate(){return(0,c.A)(Bu,this)}set urlTemplate(e){(0,l.A)(Bu,this,e)}get actions(){return(0,c.A)(Hu,this)}set actions(e){(0,l.A)(Hu,this,e)}get goals(){return(0,c.A)(Uu,this)}set goals(e){(0,l.A)(Uu,this,e)}render(){return h().createElement(Yu,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,goals:this.goals,onGoalClick:(0,c.A)(Gu,this),onActionClick:(0,c.A)(Ku,this)})}}function Yu(e){let{list:t,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:s}=e;return t?h().createElement("ul",null,t.map((e=>h().createElement("li",{className:"item",key:e.conversationId},h().createElement(qu,{conversation:e,urlTemplate:i,actions:n,goals:a,onGoalClick:r,onActionClick:s}))))):h().createElement("div",{className:"loading"},h().createElement(Ru,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function qu(e){var t;let{conversation:i,urlTemplate:n,actions:a,goals:r,onGoalClick:s,onActionClick:o}=e;const l=(0,p.useRef)(null),c=g.i18n.language.split("-")[0];(0,p.useEffect)((()=>{const e=l.current;if(!e)return;const t=e=>{e.stopPropagation(),e.preventDefault(),s(i)};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}),[i,s]);const[d,u]=(0,p.useState)(!1);return h().createElement(Mu,{className:_n()("link",{"actions-active":d}),url:(0,ll.Q)(n,i)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(Ru,{className:"icon",lib:"easyops",category:"common",icon:"clock"}),h().createElement("div",{className:"title"},i.title)),i.description&&h().createElement("div",{className:"description"},i.description)),r&&h().createElement("div",{className:_n()("goal",{global:!i.goalInstanceId}),ref:l},i.goalInstanceId?null===(t=r.find((e=>e.instanceId===i.goalInstanceId)))||void 0===t?void 0:t.title:du(lu.PROJECT_OVERALL)),h().createElement(Iu,{className:"avatar",size:"small",nameOrInstanceId:i.username}),h().createElement("div",{className:`operations lang-${c}`},h().createElement(Wu,{className:"actions",actions:a,onActionClick:e=>{o({action:e.detail,item:i})},onVisibleChange:e=>{u(e.detail)}}),h().createElement("div",{className:"time",title:(0,ou.P)(1e3*i.startTime,ou.c.full)},(0,ou.P)(1e3*i.startTime,ou.c.relative))))}pu=$u,({e:[mu,gu,bu,Au,fu,vu,Eu,xu,ku,wu,yu,Tu,Su,Cu,Nu,_u],c:[zu,uu]}=(0,d.A)(pu,[Du("ai-portal.project-conversations",{styleTexts:[hu.A]})],[[Lu({attribute:!1}),1,"list"],[Lu(),1,"urlTemplate"],[Lu({attribute:!1}),1,"actions"],[Lu({attribute:!1}),1,"goals"],[Ou({type:"goal.click"}),1,"goalClick",e=>(0,c.A)(Vu,e),(e,t)=>(0,l.A)(Vu,e,t)],[Ou({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ju,e),(e,t)=>(0,l.A)(ju,e,t)]],0,(e=>Ku.has((0,s.A)(e))),m.ReactNextElement)),uu();var Xu,Ju=i(23677);let Qu,Zu,em,tm,im,nm,am,rm,sm,om,lm,cm,dm,pm,hm;const um=(0,m.wrapBrick)("eo-link"),mm=(0,m.wrapBrick)("eo-icon"),gm=(0,m.wrapBrick)("eo-easyops-avatar"),bm=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Am,property:fm,event:vm}=(0,u.createDecorators)();let Em;var xm=new WeakMap,km=new WeakMap,wm=new WeakMap,ym=new WeakMap,Tm=new WeakSet,Sm=new WeakMap,Cm=new WeakMap,Nm=new WeakMap;class _m extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Tm),(0,r.A)(this,xm,Zu(this)),(0,r.A)(this,km,(em(this),tm(this))),(0,r.A)(this,wm,(im(this),nm(this))),(0,r.A)(this,ym,(am(this),rm(this))),(0,r.A)(this,Sm,(lm(this),cm(this))),(0,r.A)(this,Cm,(hm(this),e=>{(0,o.A)(Tm,this,sm).emit(e)})),(0,r.A)(this,Nm,(e=>{(0,o.A)(Tm,this,dm).emit(e)}))}get list(){return(0,c.A)(xm,this)}set list(e){(0,l.A)(xm,this,e)}get urlTemplate(){return(0,c.A)(km,this)}set urlTemplate(e){(0,l.A)(km,this,e)}get actions(){return(0,c.A)(wm,this)}set actions(e){(0,l.A)(wm,this,e)}render(){return h().createElement(Mm,{list:this.list,urlTemplate:this.urlTemplate,actions:this.actions,onActionClick:(0,c.A)(Cm,this),onItemClick:(0,c.A)(Nm,this)})}}function Mm(e){let{list:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;return t?h().createElement("ul",null,null==t?void 0:t.map((e=>h().createElement("li",{className:"item",key:e.instanceId},h().createElement(Rm,{knowledge:e,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}))))):h().createElement("div",{className:"loading"},h().createElement(mm,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}function Rm(e){let{knowledge:t,urlTemplate:i,actions:n,onActionClick:a,onItemClick:r}=e;const[s,o]=(0,p.useState)(!1);return h().createElement(um,{className:_n()("link",{"actions-active":s}),url:(0,ll.Q)(i,t),onClick:()=>null==r?void 0:r(t)},h().createElement("div",{className:"main"},h().createElement("div",{className:"header"},h().createElement(mm,{className:"icon",lib:"easyops",icon:"lightbulb",category:"common"}),h().createElement("span",{className:"title"},t.name),h().createElement(mm,{className:"attachment",lib:"lucide",icon:"paperclip"})),t.description&&h().createElement("div",{className:"description"},t.description)),h().createElement("div",{className:"time"},(0,ou.P)(1e3*t.time,ou.c.relative)),h().createElement("div",{className:"operations"},h().createElement(bm,{className:"actions",actions:n,onActionClick:e=>{a({action:e.detail,item:t})},onVisibleChange:e=>{o(e.detail)}}),h().createElement(gm,{className:"avatar",size:"small",nameOrInstanceId:t.user})))}Xu=_m,({e:[Zu,em,tm,im,nm,am,rm,sm,om,lm,cm,dm,pm,hm],c:[Em,Qu]}=(0,d.A)(Xu,[Am("ai-portal.project-knowledges",{styleTexts:[Ju.A]})],[[fm({attribute:!1}),1,"list"],[fm(),1,"urlTemplate"],[fm({attribute:!1}),1,"actions"],[vm({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ym,e),(e,t)=>(0,l.A)(ym,e,t)],[vm({type:"item.click"}),1,"itemClick",e=>(0,c.A)(Sm,e),(e,t)=>(0,l.A)(Sm,e,t)]],0,(e=>Nm.has((0,s.A)(e))),m.ReactNextElement)),Qu();let Im=function(e){return e.STARTED_A_CHAT="STARTED_A_CHAT",e.CREATED_THIS_GOAL="CREATED_THIS_GOAL",e.CHANGED_THE_GOAL_TITLE="CHANGED_THE_GOAL_TITLE",e.CHANGED_THE_GOAL_DESCRIPTION="CHANGED_THE_GOAL_DESCRIPTION",e.CHANGED_THE_GOAL="CHANGED_THE_GOAL",e.DELETED_THIS_GOAL="DELETED_THIS_GOAL",e.DECOMPOSED_THIS_GOAL="DECOMPOSED_THIS_GOAL",e.SET_OWNER="SET_OWNER",e.REMOVED_GOAL_PARTICIPANTS="REMOVED_GOAL_PARTICIPANTS",e.ADDED_GOAL_PARTICIPANTS="ADDED_GOAL_PARTICIPANTS",e.COMMENTED="COMMENTED",e.COMMA="COMMA",e.SEMICOLON="SEMICOLON",e}({});const Wm="bricks/ai-portal/activity-timeline",Dm=g.i18n.getFixedT(null,Wm);var Lm,Om=i(14763);let zm,Pm,Bm,Hm,Um;(0,g.initializeI18n)(Wm,{en:{STARTED_A_CHAT:"started a chat",CREATED_THIS_GOAL:"created this goal",CHANGED_THE_GOAL_TITLE:'changed the goal title to "{{ title }}"',CHANGED_THE_GOAL_DESCRIPTION:'changed the goal description to "{{ description }}"',CHANGED_THE_GOAL:"changed the goal",DELETED_THIS_GOAL:"deleted this goal",DECOMPOSED_THIS_GOAL:"decomposed this goal to {{ count }} sub-goal: ",DECOMPOSED_THIS_GOAL_plural:"decomposed this goal to {{ count }} sub-goals: ",SET_OWNER:"set {{ user }} as the owner",REMOVED_GOAL_PARTICIPANTS:"removed a goal participant: ",REMOVED_GOAL_PARTICIPANTS_plural:"removed {{ count }} goal participants: ",ADDED_GOAL_PARTICIPANTS:"added a goal participant: ",ADDED_GOAL_PARTICIPANTS_plural:"added {{ count }} goal participants: ",COMMENTED:"commented",COMMA:", ",SEMICOLON:"; "},zh:{STARTED_A_CHAT:"发起了对话",CREATED_THIS_GOAL:"创建了此目标",CHANGED_THE_GOAL_TITLE:"修改目标标题为 “{{ title }}”",CHANGED_THE_GOAL_DESCRIPTION:"修改目标描述为 “{{ description }}”",CHANGED_THE_GOAL:"修改了此目标",DELETED_THIS_GOAL:"删除了此目标",DECOMPOSED_THIS_GOAL:"将此目标分解为 {{ count }} 个子目标:",DECOMPOSED_THIS_GOAL_plural:"将此目标分解为 {{ count }} 个子目标:",SET_OWNER:"设定负责人为 {{ user }}",REMOVED_GOAL_PARTICIPANTS:"移除了目标参与成员:",ADDED_GOAL_PARTICIPANTS:"添加了目标参与成员:",COMMENTED:"评论",COMMA:",",SEMICOLON:";"}});const Vm=(0,m.wrapBrick)("eo-link"),Fm=(0,m.wrapBrick)("eo-icon"),Gm=(0,m.wrapBrick)("eo-easyops-avatar"),{defineElement:jm,property:Km}=(0,u.createDecorators)();let $m;var Ym=new WeakMap,qm=new WeakMap;class Xm extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Ym,Pm(this)),(0,r.A)(this,qm,(Bm(this),Hm(this))),Um(this)}get list(){return(0,c.A)(Ym,this)}set list(e){(0,l.A)(Ym,this,e)}get chatUrlTemplate(){return(0,c.A)(qm,this)}set chatUrlTemplate(e){(0,l.A)(qm,this,e)}render(){return h().createElement(Jm,{list:this.list,chatUrlTemplate:this.chatUrlTemplate})}}function Jm(e){let{list:t,chatUrlTemplate:i}=e;return t?h().createElement("ul",null,t.map(((e,t)=>{var n,a;return h().createElement("li",{className:"activity",key:t},h().createElement("div",{className:"guide-line"}),h().createElement("div",{className:"main"},h().createElement(Gm,{className:"avatar",nameOrInstanceId:e.user_id,size:"xs"}),h().createElement("span",{className:"action"},e.user_name," ","start_conversation"===e.action_type?h().createElement(h().Fragment,null,h().createElement("span",null,Dm(Im.STARTED_A_CHAT)),h().createElement(Vm,{className:"conversation",url:(0,ll.Q)(i,e),target:"_blank"},null===(n=e.metadata)||void 0===n?void 0:n.conversation_title),h().createElement(Fm,{className:"external-link-icon",lib:"lucide",icon:"external-link"})):"create_goal"===e.action_type?Dm(Im.CREATED_THIS_GOAL):"edit_goal"===e.action_type?e.metadata.after.title?Dm(Im.CHANGED_THE_GOAL_TITLE,e.metadata.after):e.metadata.after.description?Dm(Im.CHANGED_THE_GOAL_DESCRIPTION,e.metadata.after):Dm(Im.CHANGED_THE_GOAL):"delete_goal"===e.action_type?Dm(Im.DELETED_THIS_GOAL):"decompose_goals"===e.action_type?`${Dm(Im.DECOMPOSED_THIS_GOAL,{count:e.metadata.sub_goals_count})}${e.metadata.sub_goals.map((e=>e.title)).join(Dm(Im.COMMA))}`:"alter_owner"===e.action_type?Dm(Im.SET_OWNER,{user:e.metadata.after.owner.user_name}):"alter_user"===e.action_type?function(e){const t=[],i=[],n=new Set(e.metadata.before.users.map((e=>e.user_name)));for(const t of e.metadata.after.users)n.has(t.user_name)||i.push(t.user_name);const a=new Set(e.metadata.after.users.map((e=>e.user_name)));for(const i of e.metadata.before.users)a.has(i.user_name)||t.push(i.user_name);const r=[];return t.length>0&&r.push(Dm(Im.REMOVED_GOAL_PARTICIPANTS,{count:t.length})+t.join(Dm(Im.COMMA))),i.length>0&&r.push(Dm(Im.ADDED_GOAL_PARTICIPANTS,{count:i.length})+i.join(Dm(Im.COMMA))),r.join(Dm(Im.SEMICOLON))}(e):"add_comment"===e.action_type?Dm(Im.COMMENTED):e.action_type),h().createElement("span",{className:"time",title:(0,ou.P)(e.time,ou.c.full)},(0,ou.P)(e.time,ou.c.relative))),"add_comment"===e.action_type&&h().createElement("div",{className:"comment"},null===(a=e.metadata)||void 0===a?void 0:a.comment_content))}))):h().createElement("div",{className:"loading"},h().createElement(Fm,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))}Lm=Xm,({e:[Pm,Bm,Hm,Um],c:[$m,zm]}=(0,d.A)(Lm,[jm("ai-portal.activity-timeline",{styleTexts:[Om.A]})],[[Km({attribute:!1}),1,"list"],[Km(),1,"chatUrlTemplate"]],0,void 0,m.ReactNextElement)),zm();let Qm=function(e){return e.TERMINATE_THE_TASK="TERMINATE_THE_TASK",e}({});const Zm="bricks/ai-portal/chat-input",eg=g.i18n.getFixedT(null,Zm);var tg,ig=i(84479);let ng,ag,rg,sg,og,lg,cg,dg,pg,hg,ug,mg,gg,bg,Ag,fg,vg,Eg,xg;(0,g.initializeI18n)(Zm,{en:{TERMINATE_THE_TASK:"Terminate the task"},zh:{TERMINATE_THE_TASK:"终止任务"}});const kg={lib:"antd",icon:"loading-3-quarters",spinning:!0},wg={lib:"fa",prefix:"far",icon:"circle-stop"},yg=(0,m.wrapBrick)("eo-icon"),Tg=(0,m.wrapBrick)("ai-portal.icon-button"),{defineElement:Sg,property:Cg,event:Ng}=(0,u.createDecorators)();let _g;var Mg=new WeakMap,Rg=new WeakMap,Ig=new WeakMap,Wg=new WeakMap,Dg=new WeakMap,Lg=new WeakMap,Og=new WeakSet,zg=new WeakMap,Pg=new WeakMap,Bg=new WeakMap;class Hg extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Og),(0,r.A)(this,Mg,ag(this)),(0,r.A)(this,Rg,(rg(this),sg(this))),(0,r.A)(this,Ig,(og(this),lg(this))),(0,r.A)(this,Wg,(cg(this),dg(this))),(0,r.A)(this,Dg,(pg(this),hg(this))),(0,r.A)(this,Lg,(ug(this),mg(this))),(0,r.A)(this,zg,(Ag(this),e=>{(0,o.A)(Og,this,gg).emit(e)})),(0,r.A)(this,Pg,fg(this)),(0,r.A)(this,Bg,(xg(this),()=>{(0,o.A)(Og,this,vg).emit()}))}get placeholder(){return(0,c.A)(Mg,this)}set placeholder(e){(0,l.A)(Mg,this,e)}get autoFocus(){return(0,c.A)(Rg,this)}set autoFocus(e){(0,l.A)(Rg,this,e)}get submitDisabled(){return(0,c.A)(Ig,this)}set submitDisabled(e){(0,l.A)(Ig,this,e)}get supportsTerminate(){return(0,c.A)(Wg,this)}set supportsTerminate(e){(0,l.A)(Wg,this,e)}get terminating(){return(0,c.A)(Dg,this)}set terminating(e){(0,l.A)(Dg,this,e)}render(){return h().createElement(Ug,{placeholder:this.placeholder,autoFocus:this.autoFocus,submitDisabled:this.submitDisabled,supportsTerminate:this.supportsTerminate,terminating:this.terminating,onSubmit:(0,c.A)(zg,this),onTerminate:(0,c.A)(Bg,this)})}}function Ug(e){let{placeholder:t,autoFocus:i,submitDisabled:n,supportsTerminate:a,terminating:r,onSubmit:s,onTerminate:o}=e;const l=(0,p.useRef)(null),c=(0,p.useRef)(null),[d,u]=(0,p.useState)(""),m=(0,p.useRef)(""),[g,b]=(0,p.useState)(!1);(0,p.useEffect)((()=>{var e;i&&!n&&(null===(e=c.current)||void 0===e||e.focus())}),[i,n]);const A=(0,p.useCallback)((e=>{!n&&e&&(s(e),m.current="",u(""))}),[n,s]),f=(0,p.useCallback)((e=>{A(e.currentTarget.value)}),[A]),v=(0,p.useCallback)((e=>{m.current=e.target.value,u(e.target.value)}),[]),E=(0,p.useCallback)((()=>{A(m.current)}),[A]);(0,p.useEffect)((()=>{const e=null==l?void 0:l.current;if(!e)return;const t=new Et.A((t=>{for(const i of t)i.target===e&&(i.contentBoxSize?i.contentBoxSize[0]?i.contentBoxSize[0].blockSize:i.contentBoxSize.blockSize:i.contentRect.height)>52&&b(!0)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,p.useEffect)((()=>{d||b(!1)}),[d]);const x=(0,p.useCallback)((e=>{var t;for(const t of e.nativeEvent.composedPath())if(t instanceof HTMLTextAreaElement||t instanceof HTMLButtonElement)return;null===(t=c.current)||void 0===t||t.focus()}),[]);return h().createElement("div",{className:"container",onClick:x},h().createElement("div",{className:_n()("box",{wrap:g})},h().createElement("div",{className:"input",ref:l},h().createElement(wt,{containerRef:l,ref:c,value:d,minRows:1,maxRows:4,borderSize:0,paddingSize:16,autoResize:!0,placeholder:t,submitWhen:"enter-without-shift",onSubmit:f,onChange:v})),h().createElement("div",{className:"toolbar"},n&&a?h().createElement(h().Fragment,null,r?h().createElement(Tg,{icon:kg,disabled:!0}):h().createElement(Tg,{icon:wg,tooltip:eg(Qm.TERMINATE_THE_TASK),onClick:o})):h().createElement("button",{className:"btn-send",disabled:n||!d,onClick:E},h().createElement(yg,{lib:"fa",icon:"arrow-up"})))))}tg=Hg,({e:[ag,rg,sg,og,lg,cg,dg,pg,hg,ug,mg,gg,bg,Ag,fg,vg,Eg,xg],c:[_g,ng]}=(0,d.A)(tg,[Sg("ai-portal.chat-input",{styleTexts:[ig.A],shadowOptions:{delegatesFocus:!0}})],[[Cg(),1,"placeholder"],[Cg({type:Boolean}),1,"autoFocus"],[Cg({type:Boolean}),1,"submitDisabled"],[Cg({type:Boolean}),1,"supportsTerminate"],[Cg({type:Boolean}),1,"terminating"],[Ng({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(Lg,e),(e,t)=>(0,l.A)(Lg,e,t)],[Ng({type:"terminate"}),1,"terminate",e=>(0,c.A)(Pg,e),(e,t)=>(0,l.A)(Pg,e,t)]],0,(e=>Bg.has((0,s.A)(e))),m.ReactNextElement)),ng();const Vg=i.p+"images/e47076cc.png";var Fg,Gg=i(31653);let jg;const{defineElement:Kg}=(0,u.createDecorators)();let $g;class Yg extends m.ReactNextElement{render(){return h().createElement("img",{className:"logo",alt:"Elevo",src:Vg,width:95,height:28})}}Fg=Yg,[$g,jg]=(0,d.A)(Fg,[Kg("ai-portal.elevo-logo",{styleTexts:[Gg.A]})],[],0,void 0,m.ReactNextElement).c,jg();let qg=function(e){return e.WATCH_REPLAY="WATCH_REPLAY",e}({});const Xg="bricks/ai-portal/show-case",Jg={en:{[qg.WATCH_REPLAY]:"Watch replay"},zh:{[qg.WATCH_REPLAY]:"查看回放"}},Qg=g.i18n.getFixedT(null,Xg);var Zg,eb=i(46122);let tb,ib,nb,ab,rb,sb,ob;(0,g.initializeI18n)(Xg,Jg);const lb=["purple","green","pink"],cb=(0,m.wrapBrick)("eo-icon"),db=(0,m.wrapBrick)("eo-link"),{defineElement:pb,property:hb}=(0,u.createDecorators)();let ub;var mb=new WeakMap,gb=new WeakMap,bb=new WeakMap;class Ab extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,mb,ib(this)),(0,r.A)(this,gb,(nb(this),ab(this))),(0,r.A)(this,bb,(rb(this),sb(this))),ob(this)}get caseTitle(){return(0,c.A)(mb,this)}set caseTitle(e){(0,l.A)(mb,this,e)}get summary(){return(0,c.A)(gb,this)}set summary(e){(0,l.A)(gb,this,e)}get url(){return(0,c.A)(bb,this)}set url(e){(0,l.A)(bb,this,e)}render(){return h().createElement(fb,{caseTitle:this.caseTitle,summary:this.summary,url:this.url})}}function fb(e){let{caseTitle:t,summary:i,url:n}=e;const a=(0,p.useMemo)((()=>{if(!t)return lb[0];let e=0;for(let i=0;i<t.length;i++)e=t.charCodeAt(i)+((e<<5)-e);const i=Math.abs(e)%lb.length;return lb[i]}),[t]);return h().createElement(db,{className:`link ${a}`,url:n},h().createElement("span",{className:"title"},t),h().createElement("span",{className:"description"},i),h().createElement("span",{className:"mask"}),h().createElement("span",{className:"button"},h().createElement(cb,{lib:"easyops",icon:"replay"}),Qg(qg.WATCH_REPLAY)))}Zg=Ab,({e:[ib,nb,ab,rb,sb,ob],c:[ub,tb]}=(0,d.A)(Zg,[pb("ai-portal.show-case",{styleTexts:[eb.A]})],[[hb(),1,"caseTitle"],[hb(),1,"summary"],[hb(),1,"url"]],0,void 0,m.ReactNextElement)),tb();var vb=i(22919);customElements.define("ai-portal.call-tool",(0,Mt.createProviderClass)((async function(e,t){return(await vb.http.post(`api/gateway/logic.llm.aiops_service/api/v1/elevo/conversation/${e.conversationId}/step/${e.stepId}/view`,{params:t})).data})));const Eb=i.p+"images/449e2e64.png",xb=i.p+"images/fc2c99bb.png",kb=i.p+"images/27bd64e1.png",wb=i.p+"images/c19e3f37.png";var yb,Tb=i(19428);let Sb,Cb,Nb,_b,Mb;const{defineElement:Rb,property:Ib}=(0,u.createDecorators)();let Wb;var Db=new WeakMap,Lb=new WeakMap;class Ob extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,Db,Cb(this)),(0,r.A)(this,Lb,(Nb(this),_b(this))),Mb(this)}get illustration(){return(0,c.A)(Db,this)}set illustration(e){(0,l.A)(Db,this,e)}get description(){return(0,c.A)(Lb,this)}set description(e){(0,l.A)(Lb,this,e)}render(){return h().createElement(zb,{illustration:this.illustration,description:this.description})}}function zb(e){let{illustration:t,description:i}=e;return h().createElement(h().Fragment,null,h().createElement("img",{src:Pb(t),width:184,height:138}),h().createElement("p",null,i))}function Pb(e){switch(e){case"goals":return Eb;case"collaboration-spaces":return kb;case"serviceflows":return wb;default:return xb}}yb=Ob,({e:[Cb,Nb,_b,Mb],c:[Wb,Sb]}=(0,d.A)(yb,[Rb("ai-portal.blank-state",{styleTexts:[Tb.A]})],[[Ib(),1,"illustration"],[Ib(),1,"description"]],0,void 0,m.ReactNextElement)),Sb();var Bb,Hb=i(81129);let Ub,Vb,Fb;const{defineElement:Gb,property:jb}=(0,u.createDecorators)();let Kb;var $b=new WeakMap;class Yb extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,$b,Vb(this)),Fb(this)}get variant(){return(0,c.A)($b,this)}set variant(e){(0,l.A)($b,this,e)}render(){return h().createElement(qb,null)}}function qb(){return h().createElement("slot",null)}Bb=Yb,({e:[Vb,Fb],c:[Kb,Ub]}=(0,d.A)(Bb,[Gb("ai-portal.sticky-container",{styleTexts:[Hb.A]})],[[jb({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),Ub();var Xb,Jb=i(18338);let Qb,Zb,eA,tA,iA,nA,aA,rA,sA,oA,lA;const cA=(0,m.wrapBrick)("eo-link"),dA=(0,m.wrapBrick)("eo-icon"),{defineElement:pA,property:hA}=(0,u.createDecorators)();let uA;var mA=new WeakMap,gA=new WeakMap,bA=new WeakMap,AA=new WeakMap,fA=new WeakMap;class vA extends m.ReactNextElement{constructor(){super(...arguments),(0,r.A)(this,mA,Zb(this)),(0,r.A)(this,gA,(eA(this),tA(this))),(0,r.A)(this,bA,(iA(this),nA(this))),(0,r.A)(this,AA,(aA(this),rA(this))),(0,r.A)(this,fA,(sA(this),oA(this))),lA(this)}get cardTitle(){return(0,c.A)(mA,this)}set cardTitle(e){(0,l.A)(mA,this,e)}get description(){return(0,c.A)(gA,this)}set description(e){(0,l.A)(gA,this,e)}get url(){return(0,c.A)(bA,this)}set url(e){(0,l.A)(bA,this,e)}get avatar(){return(0,c.A)(AA,this)}set avatar(e){(0,l.A)(AA,this,e)}get avatarType(){return(0,c.A)(fA,this)}set avatarType(e){(0,l.A)(fA,this,e)}render(){return h().createElement(EA,{cardTitle:this.cardTitle,description:this.description,url:this.url,avatar:this.avatar,avatarType:this.avatarType})}}function EA(e){let{cardTitle:t,description:i,url:n,avatar:a,avatarType:r}=e;return h().createElement(cA,{className:_n()("card",{clickable:!!n}),url:n},h().createElement("div",{className:"header"},h().createElement("div",{className:"heading"},"image"!==r&&a?h().createElement(xA,a):h().createElement("div",{className:"avatar"}),h().createElement("div",{className:"title"},t)),h().createElement("div",{className:"actions"},h().createElement("slot",{name:"actions"}))),h().createElement("div",{className:"body"},i),h().createElement("div",{className:"footer"},h().createElement("slot",{name:"footer"})))}function xA(e){let{color:t,...i}=e;return h().createElement("div",{className:"avatar",style:t?{borderColor:`rgba(var(--theme-${t}-color-rgb-channel), 0.15)`,color:`var(--theme-${t}-color)`}:void 0},h().createElement(dA,i))}Xb=vA,({e:[Zb,eA,tA,iA,nA,aA,rA,sA,oA,lA],c:[uA,Qb]}=(0,d.A)(Xb,[pA("ai-portal.elevo-card",{styleTexts:[Jb.A]})],[[hA(),1,"cardTitle"],[hA(),1,"description"],[hA(),1,"url"],[hA({attribute:!1}),1,"avatar"],[hA(),1,"avatarType"]],0,void 0,m.ReactNextElement)),Qb();const kA=window.devicePixelRatio||1,wA=40,yA=12,TA=36*Math.PI/180,SA=yA*(1-Math.sin(TA)),CA=yA*Math.cos(TA),NA=(wA-2*SA)*Math.tan(TA),_A=CA+NA/2;var MA,RA=i(29511);let IA,WA,DA,LA,OA,zA,PA,BA,HA;const{defineElement:UA,property:VA,event:FA}=(0,u.createDecorators)();let GA;var jA=new WeakMap,KA=new WeakMap,$A=new WeakMap,YA=new WeakSet,qA=new WeakMap;class XA extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,YA),(0,r.A)(this,jA,WA(this)),(0,r.A)(this,KA,(DA(this),LA(this))),(0,r.A)(this,$A,(OA(this),zA(this))),(0,r.A)(this,qA,(HA(this),e=>{this.activeTab=e.id,(0,o.A)(YA,this,PA).emit(e)}))}get tabs(){return(0,c.A)(jA,this)}set tabs(e){(0,l.A)(jA,this,e)}get activeTab(){return(0,c.A)(KA,this)}set activeTab(e){(0,l.A)(KA,this,e)}render(){return h().createElement(JA,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(qA,this)})}}function JA(e){let{tabs:t,activeTab:i,onTabClick:n}=e;const a=(0,p.useRef)(null),r=(0,p.useRef)(null),s=(0,p.useRef)(null);return(0,p.useEffect)((()=>{const e=a.current,i=r.current,n=s.current;if(!(e&&i&&n&&null!=t&&t.length))return;const o=i.getContext("2d");if(!o)return;let l,c;const d=new Et.A((t=>{for(const i of t)if(i.target===e){const e=QA(i,"width"),t=QA(i,"height");l=[e,t]}const a=Array.from(n.querySelectorAll(".tab")),r=a.find((e=>e.classList.contains("active")));if(!r)return;const s=r.getBoundingClientRect().width,d=0===a.indexOf(r);let p=0;if(!d){const e=n.getBoundingClientRect().left,t=r.getBoundingClientRect().left;p=t-e}c&&cancelAnimationFrame(c),c=requestAnimationFrame((()=>{l&&function(e,t,i,n,a,r,s){e.width=i*kA,e.height=n*kA,e.style.width=`${i}px`,e.style.height=`${n}px`,t.scale(kA,kA),t.clearRect(0,0,i,n),t.fillStyle="rgba(255,255,255,0.5)";const o=t.createLinearGradient(0,0,0,n);o.addColorStop(0,"rgba(255,255,255,0.9)"),o.addColorStop(1,"rgba(255,255,255,0.4)"),t.lineWidth=1,t.strokeStyle=o;const l=i-1,c=n-1;if(t.translate(.5,.5),t.beginPath(),a)t.moveTo(0,yA),t.arcTo(0,0,yA,0,yA);else{t.moveTo(0,52),t.arcTo(0,wA,yA,wA,yA);const e=r-_A;t.lineTo(e,wA),t.arc(e,28,yA,Math.PI/2,TA,!0),t.lineTo(e+CA+NA,SA),t.arc(e+2*_A,yA,yA,Math.PI+TA,1.5*Math.PI,!1)}const d=r+s-_A;t.lineTo(d,0),t.arc(d,yA,yA,1.5*Math.PI,2*Math.PI-TA,!1),t.lineTo(d+CA+NA,wA-SA),t.arc(d+2*_A,28,yA,Math.PI-TA,Math.PI/2,!0),t.lineTo(l-yA,wA),t.arcTo(l,wA,l,52,yA),t.lineTo(l,c-yA),t.arcTo(l,c,l-yA,c,yA),t.lineTo(yA,c),t.arcTo(0,c,0,c-yA,yA),t.closePath(),t.fill(),t.stroke()}(i,o,l[0],l[1],d,p,s)}))}));return d.observe(e),d.observe(n),()=>{d.disconnect(),c&&cancelAnimationFrame(c)}}),[t,i]),h().createElement("div",{className:"container",ref:a},h().createElement("canvas",{className:"bg",ref:r}),h().createElement("div",{className:"header"},h().createElement("ul",{className:"tabs",ref:s},null==t?void 0:t.map((e=>h().createElement("li",{key:e.id,part:"tab",className:_n()("tab",{active:e.id===i})},h().createElement("a",{onClick:()=>n(e)},e.label))))),h().createElement("div",{className:"toolbar"},h().createElement("slot",{name:"toolbar"}))),h().createElement("div",{className:"body"},h().createElement("slot",null)))}function QA(e,t){const i="height"===t?"blockSize":"inlineSize";return e.contentBoxSize?e.contentBoxSize[0]?e.contentBoxSize[0][i]:e.contentBoxSize[i]:e.contentRect[t]}MA=XA,({e:[WA,DA,LA,OA,zA,PA,BA,HA],c:[GA,IA]}=(0,d.A)(MA,[UA("ai-portal.flow-tabs",{styleTexts:[RA.A]})],[[VA({attribute:!1}),1,"tabs"],[VA({attribute:!1}),1,"activeTab"],[FA({type:"tab.click"}),1,"tabClick",e=>(0,c.A)($A,e),(e,t)=>(0,l.A)($A,e,t)]],0,(e=>qA.has((0,s.A)(e))),m.ReactNextElement)),IA();let ZA=function(e){return e.ADD_STAGE="ADD_STAGE",e.PLEASE_ENTER_NAME="PLEASE_ENTER_NAME",e.UNASSIGNED="UNASSIGNED",e.DELETE_STAGE="DELETE_STAGE",e.DELETE_STAGE_TIPS="DELETE_STAGE_TIPS",e.DELETE="DELETE",e.ADD_ACTIVITY="ADD_ACTIVITY",e.STAGE_NAME_EXISTS="STAGE_NAME_EXISTS",e.ACTIVITY_NAME_EXISTS="ACTIVITY_NAME_EXISTS",e}({});const ef="bricks/ai-portal/stage-flow",tf={en:{[ZA.ADD_STAGE]:"Add stage",[ZA.PLEASE_ENTER_NAME]:"Please enter name",[ZA.UNASSIGNED]:"Unassigned",[ZA.DELETE_STAGE]:"Delete stage",[ZA.DELETE_STAGE_TIPS]:'Are you sure you want to delete stage "{{ name }}"?',[ZA.DELETE]:"Delete",[ZA.ADD_ACTIVITY]:"Add activity",[ZA.STAGE_NAME_EXISTS]:'Stage with name "{{ name }}" already exists.',[ZA.ACTIVITY_NAME_EXISTS]:'Activity with name "{{ name }}" already exists.'},zh:{[ZA.ADD_STAGE]:"添加阶段",[ZA.PLEASE_ENTER_NAME]:"请输入名称",[ZA.UNASSIGNED]:"未设置",[ZA.DELETE_STAGE]:"删除阶段",[ZA.DELETE_STAGE_TIPS]:"您确定要删除阶段 “{{ name }}” 吗?",[ZA.DELETE]:"删除",[ZA.ADD_ACTIVITY]:"添加活动",[ZA.STAGE_NAME_EXISTS]:'阶段名称 "{{ name }}" 已存在。',[ZA.ACTIVITY_NAME_EXISTS]:'活动名称 "{{ name }}" 已存在。'}},nf=g.i18n.getFixedT(null,ef);var af,rf=i(66489);let sf,of,lf,cf,df,pf,hf,uf,mf,gf,bf,Af,ff,vf,Ef,xf,kf,wf;(0,g.initializeI18n)(ef,tf);const yf=(0,m.wrapBrick)("eo-icon"),Tf=(0,m.wrapBrick)("eo-popover",{onVisibleChange:"visible.change",onBeforeVisibleChange:"before.visible.change"}),Sf=(0,m.wrapBrick)("eo-input",{onChange:"change"}),Cf=(0,Mt.unwrapProvider)("basic.show-dialog"),{defineElement:Nf,property:_f,event:Mf,method:Rf}=(0,u.createDecorators)(),If=(0,p.forwardRef)(jf);let Wf;var Df=new WeakMap,Lf=new WeakMap,Of=new WeakMap,zf=new WeakSet,Pf=new WeakMap,Bf=new WeakMap,Hf=new WeakMap,Uf=new WeakMap,Vf=new WeakMap,Ff=new WeakMap;class Gf extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,zf),(0,r.A)(this,Df,(sf(this),lf(this))),(0,r.A)(this,Lf,(cf(this),df(this))),(0,r.A)(this,Of,(pf(this),hf(this))),(0,r.A)(this,Pf,(gf(this),e=>{(0,o.A)(zf,this,uf).emit(e)})),(0,r.A)(this,Bf,bf(this)),(0,r.A)(this,Hf,(vf(this),e=>{(0,o.A)(zf,this,Af).emit({stage:e})})),(0,r.A)(this,Uf,Ef(this)),(0,r.A)(this,Vf,(wf(this),e=>{(0,o.A)(zf,this,xf).emit(e)})),(0,r.A)(this,Ff,(0,p.createRef)())}get spec(){return(0,c.A)(Df,this)}set spec(e){(0,l.A)(Df,this,e)}get aiEmployees(){return(0,c.A)(Lf,this)}set aiEmployees(e){(0,l.A)(Lf,this,e)}addActivity(e,t){var i;null===(i=(0,c.A)(Ff,this).current)||void 0===i||i.addActivity(e,t)}editActivity(e,t,i){var n;null===(n=(0,c.A)(Ff,this).current)||void 0===n||n.editActivity(e,t,i)}deleteActivity(e,t){var i;null===(i=(0,c.A)(Ff,this).current)||void 0===i||i.deleteActivity(e,t)}render(){return h().createElement(If,{ref:(0,c.A)(Ff,this),spec:this.spec,aiEmployees:this.aiEmployees,onChange:(0,c.A)(Pf,this),onAddActivity:(0,c.A)(Hf,this),onEditActivity:(0,c.A)(Vf,this)})}}function jf(e,t){let{spec:i,aiEmployees:n,onChange:a,onAddActivity:r,onEditActivity:s}=e;const[o,l]=(0,p.useState)(i),[c,d]=(0,p.useState)(!1),u=(0,p.useRef)(!0);(0,p.useEffect)((()=>{l(i)}),[i]),(0,p.useEffect)((()=>{u.current?u.current=!1:o&&a(o)}),[o,a]);const m=(0,p.useCallback)((e=>{if(!e)return nf(ZA.UNASSIGNED);const t=null==n?void 0:n.find((t=>t.employeeId===e));return t?t.name:e}),[n]);return(0,p.useImperativeHandle)(t,(()=>({addActivity(e,t){l((i=>{var n;const a=null!=i?i:[],r=a.findIndex((t=>t.name===e.name));if(-1===r)return a;const s={...a[r]},o=null!==(n=s.serviceFlowActivities)&&void 0!==n?n:[];if(o.find((e=>e.name===t.name)))return Cf({type:"warn",content:nf(ZA.ACTIVITY_NAME_EXISTS,{name:t.name})}),a;const l=[...o,t];s.serviceFlowActivities=l;const c=[...a];return c[r]=s,c}))},editActivity(e,t,i){l((n=>{var a;const r=null!=n?n:[],s=r.findIndex((t=>t.name===e.name));if(-1===s)return r;const o={...r[s]},l=null!==(a=o.serviceFlowActivities)&&void 0!==a?a:[];if(l.find(((e,n)=>e.name===t.name&&n!==i)))return Cf({type:"warn",content:nf(ZA.ACTIVITY_NAME_EXISTS,{name:t.name})}),r;const c=[...l];if(i<0||i>=c.length)return r;c[i]=t,o.serviceFlowActivities=c;const d=[...r];return d[s]=o,d}))},deleteActivity(e,t){l((i=>{var n;const a=null!=i?i:[],r=a.findIndex((t=>t.name===e.name));if(-1===r)return a;const s={...a[r]},o=[...null!==(n=s.serviceFlowActivities)&&void 0!==n?n:[]];if(t<0||t>=o.length)return a;o.splice(t,1),s.serviceFlowActivities=o;const l=[...a];return l[r]=s,l}))}})),[]),h().createElement("div",{className:"container"},h().createElement("ul",{className:"nav"},null==o?void 0:o.map(((e,t)=>h().createElement($f,{key:t,stage:e,otherStageNames:o.filter((t=>t!==e)).map((e=>e.name)),onNameChange:i=>{l((n=>{const a=[...null!=n?n:[]];return a[t]={...e,name:i},a}))},onDelete:()=>{l((e=>(null!=e?e:[]).filter(((e,i)=>i!==t))))}}))),c&&h().createElement("li",{className:"nav-item pending"},h().createElement(Kf,{onDone:e=>{d(!1),e&&l((t=>{const i=null!=t?t:[];return i.find((t=>t.name===e))?(Cf({type:"warn",content:nf(ZA.STAGE_NAME_EXISTS,{name:e})}),i):[...i,{name:e}]}))}})),h().createElement("li",{className:"nav-add"},h().createElement("button",{className:"btn-add-stage",onClick:()=>d(!0)},h().createElement(yf,{lib:"antd",icon:"plus",className:"plus"}),nf(ZA.ADD_STAGE)))),h().createElement("div",{className:"lanes"},null==o?void 0:o.map(((e,t)=>{var i;return h().createElement("ul",{className:"lane",key:t},null===(i=e.serviceFlowActivities)||void 0===i?void 0:i.map(((t,i)=>h().createElement("li",{key:i},h().createElement("div",{className:"activity",onClick:()=>{s({stage:e,activity:t,activityIndex:i})}},h().createElement("div",{className:"title"},t.name),h().createElement("div",{className:"assignee"},h().createElement(yf,{lib:"antd",icon:"user",className:"assignee-icon"}),m(t.aiEmployeeId)))))),h().createElement("li",null,h().createElement("button",{className:"btn-add-activity",onClick:()=>r(e)},h().createElement(yf,{lib:"antd",icon:"plus"}),nf(ZA.ADD_ACTIVITY))))}))))}function Kf(e){let{onDone:t}=e;const i=(0,p.useRef)(!1);return h().createElement("input",{className:"input-new-stage",type:"text",placeholder:nf(ZA.PLEASE_ENTER_NAME),autoFocus:!0,onCompositionStart:()=>{i.current=!0},onCompositionEnd:()=>{i.current=!1},onKeyDown:e=>{if(!i.current)if("Enter"===e.key){e.preventDefault();const i=e.target.value.trim();t(i)}else"Escape"===e.key&&(e.preventDefault(),t(""))},onBlur:e=>{const i=e.target.value.trim();t(i)}})}function $f(e){let{stage:t,otherStageNames:i,onNameChange:n,onDelete:a}=e;const r=(0,p.useRef)(!1),s=(0,p.useRef)(null);return h().createElement("li",{className:"nav-item"},h().createElement(Tf,{trigger:"click",placement:"bottom",sync:"width",arrow:!1,distance:8,themeVariant:"elevo",ref:s},h().createElement("button",{className:"nav-link",slot:"anchor"},h().createElement("span",null,t.name)),h().createElement("div",{className:"stage-settings"},h().createElement(Sf,{value:t.name,themeVariant:"elevo",onCompositionStart:()=>{r.current=!0},onCompositionEnd:()=>{r.current=!1},onBlur:e=>{var a;const r=null===(a=e.currentTarget.value)||void 0===a?void 0:a.trim();r&&r!==t.name?i.includes(r)?(Cf({type:"warn",content:nf(ZA.STAGE_NAME_EXISTS,{name:r})}),e.currentTarget.value=t.name):n(r):r||(e.currentTarget.value=t.name)},onKeyDown:e=>{r.current||"Enter"===e.key&&(e.preventDefault(),s.current.active=!1)}}),h().createElement("div",{className:"divider"}),h().createElement("button",{onClick:async()=>{s.current.active=!1,await Cf({type:"delete",title:nf(ZA.DELETE_STAGE),content:nf(ZA.DELETE_STAGE_TIPS,{name:t.name})}),a(t)}},nf(ZA.DELETE)))))}af=Gf,({e:[lf,cf,df,pf,hf,uf,mf,gf,bf,Af,ff,vf,Ef,xf,kf,wf,sf],c:[Wf,of]}=(0,d.A)(af,[Nf("ai-portal.stage-flow",{styleTexts:[rf.A]})],[[_f({attribute:!1}),1,"spec"],[_f({attribute:!1}),1,"aiEmployees"],[Mf({type:"change"}),1,"change",e=>(0,c.A)(Of,e),(e,t)=>(0,l.A)(Of,e,t)],[Mf({type:"add.activity"}),1,"addActivity",e=>(0,c.A)(Bf,e),(e,t)=>(0,l.A)(Bf,e,t)],[Mf({type:"edit.activity"}),1,"editActivity",e=>(0,c.A)(Uf,e),(e,t)=>(0,l.A)(Uf,e,t)],[Rf(),2,"addActivity"],[Rf(),2,"editActivity"],[Rf(),2,"deleteActivity"]],0,(e=>Ff.has((0,s.A)(e))),m.ReactNextElement)),of()},10335:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.goal-container{display:flex;flex-direction:column;gap:3px}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const o=s.toString()},11816:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}.button-container{display:flex;gap:6px}.action{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.action::part(button){height:28px;font-size:13px;padding:5px 10px}.action.active::part(button){color:var(--elevo-color-brand);background-color:rgba(var(--elevo-color-brand-rgb-channel),0.04);border-color:#c9d7ff}.icon{font-size:16px;margin-right:4px}.remove{padding:1px;font-size:14px;margin-left:10px}",""]);const o=s.toString()},14763:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:block;color:#262626}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.activity{position:relative;padding-left:27px}.activity + .activity{margin-top:20px}.main{display:flex;align-items:flex-start}.action{flex:1;min-width:0;display:flex;align-items:center;margin-left:6px;word-break:break-word}.time{color:#8c8c8c;margin-left:12px}.action,\n.time{padding:1px 0}.guide-line{position:absolute;left:8px;top:0;bottom:-20px;width:0;background-color:#d8d8d8}.guide-line::before{content:"";position:absolute;top:0;bottom:0;left:3.5px;width:1px;background-color:#d8d8d8}.guide-line::after{content:"";position:absolute;top:8px;left:0;width:8px;height:8px;border-radius:8px;background-color:#d8d8d8}.activity:first-child .guide-line::before{top:12px}.activity:last-child .guide-line::before{height:12px;bottom:auto}.activity:first-child:last-child .guide-line::before{height:0}.comment{position:relative;font-size:13px;color:#595959;background-color:#f3f3f3;border-radius:8px;padding:8px 12px;margin-top:10px}.comment::before{content:"";position:absolute;top:-6px;left:36px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #f3f3f3}.conversation{margin:0 7px 0 10px}.conversation::part(link){background:#f9f0ff;border-radius:3px;font-weight:500;font-size:12px;color:#aa64f5;display:flex;align-items:center;height:24px;padding:0 8px}.external-link-icon{color:#8c8c8c}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}',""]);const o=s.toString()},18338:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.card{display:block}.card::part(link){display:flex;flex-direction:column;gap:12px;background:rgba(255,255,255,0.6);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.04);border-radius:12px;border:1px solid #fff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:16px;color:#262626}.card:not(.clickable)::part(link){cursor:auto}.card::part(link):hover{background:#fff}.header,\n.body,\n.footer{width:100%}.header{display:flex;gap:12px}.heading{display:flex;align-items:center;gap:12px;flex:1;min-width:0}.avatar{width:42px;height:42px;border-radius:50%;border:1px solid rgba(0,0,0,0.15);font-size:24px;display:flex;align-items:center;justify-content:center}.title{font-weight:500;font-size:16px;color:#262626;line-height:22px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{margin:-8px -8px 0 0}.body{font-size:12px;color:rgba(0,0,0,0.45);line-height:17px;height:51px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.footer{display:flex;align-items:center;justify-content:flex-end;gap:8px}",""]);const o=s.toString()},19428:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:flex;flex-direction:column;align-items:center;gap:26px}:host([hidden]){display:none}p{color:rgba(0,0,0,0.45);margin:0}",""]);const o=s.toString()},20124:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.tabs{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:32px;row-gap:10px;font-size:16px}.tabs a{color:rgba(38,38,38,0.65);cursor:pointer;padding:0 0 4px;display:block;position:relative}.tabs .active a{color:#262626;font-weight:500}.tabs .active a::after{content:"";position:absolute;bottom:0;left:0;right:0;height:4px;background-color:currentColor;border-radius:2px}',""]);const o=s.toString()},23677:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.item:not(:last-child){margin-bottom:4px}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.icon{font-size:20px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment{color:#1a7aff;margin-left:8px}.header{display:flex;align-items:center}.description{color:#595959;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);margin:0 16px}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:center;width:32px;height:32px}.link.actions-active .avatar,\n.link:hover .avatar,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const o=s.toString()},29511:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container{position:relative}.bg{position:absolute;top:0;left:0;z-index:-1;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.header{display:flex;align-items:center;justify-content:space-between}.tabs{list-style:none;padding:0;margin:0;display:flex}.tabs .tab{padding:0 18px}.tabs a{display:block;padding:9px 10px;color:rgba(0,0,0,0.55);line-height:20px;cursor:pointer}.tabs .active a{font-weight:500;color:#262626}.body{padding:23px 27px;overflow-x:auto}.toolbar{display:flex;align-items:center;gap:8px}",""]);const o=s.toString()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:inline-block}:host([hidden]){display:none}img{vertical-align:middle}",""]);const o=s.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}h2{font-weight:500;margin:0;font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:17px}.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}.sticky-tabs{margin:0 -24px;padding:0 24px 10px}.non-sticky-tabs{padding:0 0 10px}",""]);const o=s.toString()},40138:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,':host{display:inline-block}:host([hidden]){display:none}*{box-sizing:border-box}.trigger{display:flex;align-items:center;font-size:14px;cursor:pointer;position:relative;padding:4px 12px;border-radius:15px;color:var(--elevo-color-brand)}.trigger:hover{background-color:rgba(37,64,255,0.06)}.trigger::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;padding:1px;background:linear-gradient(145deg,rgba(37,64,255,1),rgba(180,95,248,1));border-radius:15px;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:xor;-webkit-mask:linear-gradient(#fff 0,#fff 0) content-box,linear-gradient(#fff 0,#fff 0);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor}.trigger .label{margin-right:0}.label{max-width:650px;margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown{max-width:500px;border-radius:4px;background:var(--antd-dropdown-menu-bg);box-shadow:var(--antd-box-shadow-base)}.dropdown-inner{padding:9px 4px}.search-container{padding:3px;border-bottom:1px solid rgba(0,0,0,0.08)}.search::part(affix-wrapper){box-shadow:none;border:none}eo-menu{border:0;padding:0;background:none;border-radius:0}eo-menu-item::part(menu-item){padding:5px 8px;line-height:22px;border-radius:var(--medius-border-radius)}eo-menu-item:not([disabled]):hover::part(menu-item){background-color:var(--left-sidebar-item-hover-bg)}.active::part(menu-item){font-weight:600;background-color:var(--left-sidebar-item-hover-bg)}.empty{display:flex;justify-content:center;align-items:center;color:var(--color-secondary-text)}',""]);const o=s.toString()},42873:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:flex;flex-direction:column;align-items:center;max-width:1020px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.tips{color:rgba(0,0,0,0.45);margin-bottom:27px}.cases{list-style:none;padding:0;margin:0;display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px;margin-top:36px}",""]);const o=s.toString()},44492:(e,t,i)=>{e.exports=i.p+"images/60cd488d.svg"},46121:(e,t,i)=>{e.exports=i.p+"images/69cf3ae2.png"},46122:(e,t,i)=>{i.d(t,{A:()=>b});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(56791),i.b),d=new URL(i(88786),i.b),p=new URL(i(46121),i.b),h=s()(a()),u=l()(c),m=l()(d),g=l()(p);h.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.link{display:block;background:rgba(255,255,255,0.6);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-size:cover;background-position:center;background-repeat:no-repeat;background-clip:padding-box;overflow:hidden}.purple{background-image:url(${u})}.green{background-image:url(${m})}.pink{background-image:url(${g})}.link::part(link){display:flex;flex-direction:column;gap:0;box-sizing:border-box;height:128px;padding:20px;position:relative}.title{width:100%;margin-bottom:8px;color:#262626;font-weight:500;font-size:14px;line-height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{width:100%;height:60px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;color:#18212f;line-height:20px}.link::part(link):hover{box-shadow:0px 4px 12px 0px rgba(96,96,138,0.15),0px 2px 4px 0px rgba(96,96,138,0.06)}.button{display:none;position:absolute;bottom:12px;left:20px;right:20px;height:32px;background:rgba(0,0,0,0.04);border-radius:8px;align-items:center;justify-content:center;gap:4px;color:#262626}.button:hover{background:rgba(0,0,0,0.08)}.link:hover .button{display:flex}.link:hover .description{-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0.65) 0%,rgba(0,0,0,0.11) 51%,rgba(0,0,0,0) 100%);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 60%;mask-size:100% 60%}`,""]);const b=h.toString()},46342:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,".goal-item{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;padding:12px 24px;background-color:rgba(255,255,255,0.6);border-radius:8px;-webkit-user-select:none;user-select:none;border:1px solid transparent}.goal-item:hover,.goal-item:has(.title:focus){background-color:rgba(0,0,0,0.05)}.goal-item:has(.title:focus) .end .operation{display:flex}.goal-item:hover:not(.does-not-exist) .end .operation{display:flex}.goal-item:has(.title:focus) .end .info{display:none}.goal-item:hover:not(.does-not-exist) .end .info{display:none}.goal-item.completed .serial-number,.goal-item.completed .title{color:#bfbfbf}.goal-item.active{background:rgba(37,64,255,0.1);border:1px solid #2540ff}.goal-item > *{-webkit-user-select:auto;user-select:auto}.goal-item .start,.goal-item .end{display:flex;align-items:center}.goal-item .start{flex:1;min-width:0;column-gap:16px;min-width:0}.goal-item .end{flex-shrink:0;column-gap:30px}.goal-item .end .operation{display:none;align-items:center;gap:8px}.goal-item .end .operation eo-button::part(button){height:28px}.goal-item .end .operation .new-chat::part(button){padding:5px 10px;font-size:13px}.goal-item .end .operation .append-child::part(button){padding:5px 8px;font-size:14px}.goal-item .end .info{display:inline-flex;align-items:center;column-gap:24px}.goal-item .serial-number{font-weight:400;color:var(--palette-gray-7);font-size:16px;overflow:visible}.goal-item .title{font-weight:500;padding:2px 4px;font-size:16px;color:var(--palette-gray-10);border:1px solid transparent;border-radius:8px;cursor:pointer;min-width:80px}.goal-item .title:hover{background-color:rgba(255,255,255,0.6);border:1px solid var(--palette-gray-5);cursor:text}.goal-item .title:focus{outline:none;background-color:rgba(255,255,255,0.6);border:1px solid var(--elevo-color-brand)}.goal-item .icon{border-radius:8px;padding:6px;position:relative;top:2px}.goal-item .icon:hover{background-color:rgba(0,0,0,0.04)}.goal-item .message{color:var(--palette-gray-7);display:inline-flex;align-items:center;column-gap:6px}.goal-item .message .count{font-weight:500;color:var(--palette-gray-10)}.goal-item:not(.editing) .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",""]);const o=s.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(47336),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background:url(${p}) no-repeat center bottom;background-size:100% 104px;padding:12px 12px 29px;margin:0 -12px}.container{position:relative;background:#ffffff;box-shadow:0px 2px 4px 0px rgba(38,45,65,0.1);border-radius:16px;border:1px solid #dadfe8}.container:has(textarea:focus){border-color:#b7c3d8}textarea{display:block;width:100%;padding:10px 16px 50px;color:var(--antd-input-color);border-radius:16px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font:inherit;font-size:14px;line-height:22px;height:120px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.actions-bar{position:absolute;bottom:12px;left:14px;right:14px;display:flex;align-items:flex-end;justify-content:space-between;gap:6px}.btn-send{width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff;flex-shrink:0}.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}.mention-overlay{position:absolute;border-radius:4px;pointer-events:none;background:rgba(38,45,65,0.1)}`,""]);const h=d.toString()},47336:(e,t,i)=>{e.exports=i.p+"images/25c20165.png"},47338:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.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}:host([variant="mini-light"]) button{color:#8c8c8c;width:20px;height:20px;font-size:14px;border-radius:4px}:host([variant="bordered"]) button{background:#ffffff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);color:#595959;width:32px;height:32px;font-size:18px}:host([variant="bordered"]) button:not(:disabled):hover{background:rgba(0,0,0,0.04)}',""]);const o=s.toString()},49041:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;color:#262626;padding:0 54px 48px;overflow:hidden;overflow-y:auto}:host::before{content:"";position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background-color:rgb(205,206,207);background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}:host([variant="form"])::before{background:#fff}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}:host([size="small"]) .container{max-width:1000px}:host([size="full"]) .container{max-width:100%}.sticky-header{margin:0 -24px;padding:17px 24px 30px}.non-sticky-header{padding:17px 0 30px}.header{display:flex;justify-content:space-between;align-items:center}nav{font-weight:500;font-size:20px;line-height:28px;display:flex;min-width:0;white-space:nowrap;flex-wrap:wrap}h1{margin:0;font-size:inherit;line-height:inherit}.breadcrumbs{list-style:none;padding:0;margin:0;color:#bfbfbf}.breadcrumbs eo-link::part(link){color:inherit}.breadcrumbs eo-link::part(link):hover{color:#595959}.breadcrumbs li::after{content:"/";margin:0 8px}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}nav{margin-left:40px}}`,""]);const h=d.toString()},56791:(e,t,i)=>{e.exports=i.p+"images/3e0f6758.png"},61393:(e,t,i)=>{e.exports=i.p+"images/ecaecc18.svg"},62522:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,"ai-portal\\.preview-container{display:block;background:rgba(247,248,250,1)}.loading--uD2jY9vX{position:absolute;top:50%;left:50%;font-size:48px;color:var(--palette-gray-5);margin:0 -24px}",""]),s.locals={loading:"loading--uD2jY9vX"};const o=s},66489:(e,t,i)=>{i.d(t,{A:()=>m});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(61393),i.b),d=new URL(i(44492),i.b),p=s()(a()),h=l()(c),u=l()(d);p.push([e.id,`:host{display:block;--stage-flow-lane-width:268px}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}button{background:none;border:none;cursor:pointer;padding:0}.button:focus{outline:none}.nav,\n.lanes{display:flex;gap:40px}.nav-item,\n.nav-add,\n.lane{width:var(--stage-flow-lane-width);flex-shrink:0}.nav-item{position:relative;background-color:var(--stage-flow-nav-bg);--stage-flow-nav-bg:rgba(37,64,255,0.1)}.nav-item:first-child{border-top-left-radius:20px;border-bottom-left-radius:20px}.nav-item.pending{--stage-flow-nav-bg:rgba(0,0,0,0.04)}.nav-item::after{content:"";position:absolute;top:0;right:-20px;border-color:transparent;border-style:solid;border-width:20px 0 20px 20px;border-left-color:var(--stage-flow-nav-bg)}.nav-item:not(:first-child)::before{content:"";position:absolute;top:0;left:-30px;width:30px;height:40px;background-color:var(--stage-flow-nav-bg);-webkit-clip-path:polygon(0 0,100% 0,100% 100%,0 100%,20px 50%);clip-path:polygon(0 0,100% 0,100% 100%,0 100%,20px 50%)}.nav-link,\n.btn-add-stage{width:100%;display:flex;align-items:center;justify-content:center;height:40px;font-size:16px}.nav-item.pending:first-child .input-new-stage{padding-left:20px}.nav-link{font-weight:600;color:#000}.nav-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-add-stage{font-weight:500;color:rgba(0,0,0,0.65);gap:8px;position:relative}.btn-add-stage .plus{margin-right:8px;font-size:14px}.nav-add:first-child .btn-add-stage{border-radius:20px;border:1px dashed rgba(0,0,0,0.1)}.nav-add:first-child .btn-add-stage:hover{background:rgba(0,0,0,0.04)}.nav-add:not(:first-child) .btn-add-stage::before{content:"";position:absolute;top:0;bottom:0;left:-30px;right:-20px;pointer-events:none;background:url(${h}) center center no-repeat}.nav-add:not(:first-child) .btn-add-stage:hover::before{background-image:url(${u})}.input-new-stage{width:100%;border:none;background:none;display:flex;align-items:center;height:40px;font-weight:600;font-size:16px;color:#000}.input-new-stage::placeholder{color:#8c8c8c;font-weight:400}.input-new-stage:focus{outline:none}.lanes{margin-top:16px}.lane{display:flex;flex-direction:column;gap:8px}.activity{background:#ffffff;box-shadow:0px 1px 2px 0px rgba(0,0,0,0.1);border-radius:8px;padding:12px 14px 10px;cursor:pointer}.activity .title{font-weight:600;color:#000000;line-height:20px;text-shadow:0px 1px 2px rgba(0,0,0,0.1)}.assignee{display:flex;align-items:center;gap:4px;font-size:12px;color:#000000;line-height:17px;margin-top:10px}.assignee-icon{font-size:14px;color:rgba(0,0,0,0.45)}.btn-add-activity{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;height:34px;border:1px dashed rgba(0,0,0,0.1);border-radius:8px;color:rgba(0,0,0,0.45)}.btn-add-activity:hover{background:rgba(0,0,0,0.04);color:rgba(0,0,0,0.65)}.stage-settings{padding:4px;display:flex;flex-direction:column;align-items:stretch;gap:4px}.stage-settings eo-input{margin-bottom:5px}.stage-settings .divider{height:1px;background-color:rgba(0,0,0,0.1)}.stage-settings button{color:var(--color-error);border-radius:6px;padding:5px 8px;font-size:14px;line-height:22px;text-align:left}.stage-settings button:hover{background-color:var(--left-sidebar-item-hover-bg)}`,""]);const m=p.toString()},79286:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.link{display:block}.link::part(link){display:flex;align-items:center;gap:16px;padding:12px 24px;color:#262626;background:rgba(255,255,255,0.6);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.link.actions-active::part(link),\n.link::part(link):hover{background:rgba(0,0,0,0.05);-webkit-backdrop-filter:none;backdrop-filter:none}.item:not(:last-child){margin-bottom:4px}.icon{font-size:18px;margin-right:8px}.title{font-weight:500;font-size:16px}.title,\n.description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal{background:#f0fff8;border-radius:4px;font-weight:500;font-size:12px;color:#1dc897;line-height:20px;padding:2px 8px;white-space:nowrap}.goal.global{background:#e6f4ff;color:#1a7aff}.header{display:flex;align-items:center}.description{color:#595959;margin-top:6px;padding-left:28px;line-height:20px}.time{color:rgba(0,0,0,0.45);white-space:nowrap}.main{flex:1;min-width:0}.operations{display:flex;align-items:center;justify-content:right;width:100px}.operations.lang-zh{width:64px}.link.actions-active .time,\n.link:hover .time,\n.link:not(:hover):not(.actions-active) .actions{display:none}.loading{display:flex;align-items:center;justify-content:center;padding:24px;font-size:20px;color:#595959}",""]);const o=s.toString()},81129:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block;position:sticky;top:0}:host([hidden]){display:none}:host::before{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;background-color:rgb(205,206,207);background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;pointer-events:none}:host([variant="home"])::before{background-color:#f1f1f1}`,""]);const h=d.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block;padding:24px 54px 72px}:host([sticky]){padding-top:0}:host([hidden]){display:none}:host::before{content:"";position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background-color:#f1f1f1;background-image:url(${p});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}@media (max-width: 719px){:host{padding-left:24px;padding-right:24px}}`,""]);const h=d.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px;margin-bottom:17px}.list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;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;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.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}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.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()},84479:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r)()(a());s.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.container{background-color:#fff;border:2px solid #7891ff;border-radius:12px;box-shadow:0px 9px 28px 8px rgba(0,0,0,0.05),0px 6px 16px 0px rgba(0,0,0,0.08),0px 3px 6px -4px rgba(0,0,0,0.12);cursor:text}.container:not(:has(textarea:focus)){background-color:rgba(255,255,255,0.5);border-color:#99c4ff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.box{display:flex;flex-wrap:wrap;border-radius:10px;padding:8px}.input{min-width:0;flex:1}.wrap .input{flex-basis:100%}.input textarea{display:block;width:100%;padding:8px;font:inherit;font-size:16px;line-height:24px;color:var(--antd-input-color);border:none;background:none;height:24px;color:#262626}.input textarea::placeholder{color:#bfbfbf}.toolbar{padding:5px 0 5px 8px;margin-left:auto;display:flex;align-items:center;gap:2px}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{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}",""]);const o=s.toString()},88786:(e,t,i)=>{e.exports=i.p+"images/e15a6988.png"},98036:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),r=i(40935),s=i.n(r),o=i(20062),l=i.n(o),c=new URL(i(32360),i.b),d=s()(a()),p=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto;margin-bottom:17px}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.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}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;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;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6;display:flex;align-items:center;justify-content:center;font-size:24px;overflow:hidden}.avatar img{width:100%;height:100%}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.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()}}]);
2
+ //# sourceMappingURL=7713.278cfb8b.js.map