mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-14 11:18:02 +00:00
1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[1179],{24170:function(e,n,t){t.d(n,{Lr:function(){return C},_t:function(){return s},i8:function(){return y},n1:function(){return v},sE:function(){return m},tY:function(){return h},x_:function(){return g}});var o=t(90819),r=t.n(o),i=t(73193),a=t.n(i),u=t(89933),c=t.n(u),l=t(55735),d=t(41159);function s(e){return f.apply(this,arguments)}function f(){return(f=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/query/org",{method:"GET",params:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e){return p.apply(this,arguments)}function p(){return(p=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/query/detail",{method:"GET",params:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return b.apply(this,arguments)}function b(){return(b=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/create",{method:"POST",data:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return w.apply(this,arguments)}function w(){return(w=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/update",{method:"POST",data:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return x.apply(this,arguments)}function x(){return(x=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/update/avatar",{method:"POST",data:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return k.apply(this,arguments)}function k(){return(k=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/update/autoreply",{method:"POST",data:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e){return R.apply(this,arguments)}function R(){return(R=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/delete",{method:"POST",data:a()(a()({},n),{},{client:l.bVn})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},72614:function(e,n,t){t.d(n,{LE:function(){return d},W5:function(){return b},c$:function(){return f},n1:function(){return w},p0:function(){return p},zl:function(){return x}});var o=t(90819),r=t.n(o),i=t(73193),a=t.n(i),u=t(89933),c=t.n(u),l=t(41159);function d(e){return s.apply(this,arguments)}function s(){return(s=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/workgroup/query/org",{method:"GET",params:a()({},n)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return h.apply(this,arguments)}function h(){return(h=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/workgroup/query/uid",{method:"GET",params:a()({},n)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return g.apply(this,arguments)}function g(){return(g=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/workgroup/create",{method:"POST",data:a()({},n)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return m.apply(this,arguments)}function m(){return(m=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/workgroup/update",{method:"POST",data:a()({},n)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return v.apply(this,arguments)}function v(){return(v=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/workgroup/update/avatar",{method:"POST",data:a()({},n)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return y.apply(this,arguments)}function y(){return(y=c()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/workgroup/delete",{method:"POST",data:a()({},n)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},91723:function(e,n,t){t.d(n,{Z:function(){return O}});var o=t(73193),r=t.n(o),i=t(45332),a=t.n(i),u=t(7358),c=t(71529),l=t(3340),d=t(61107),s=t(32327),f=t(1430),h=t(3849),p=t(75365),g=t(53530),b=t(88958),m=t(11184),w=t(69169),v=t(48708),x=t(84881),y=t(85954),k=t(32350),C=t(62673),R=t(44194),M=t(66310),Z=t(40612),j=t(1902),U=t(95490),P=t(36310),S=t(55735),T=t(86803),q=t(41159),W=t(76711),A=t.n(W),F=t(44435),V=t(83642),I=t(83890),z=(0,F.Ue)()((0,V.mW)((0,V.tJ)((0,I.n)((function(e,n){return{unifiedResult:{data:{content:[]}},currentUnified:{uid:"",nickname:"",avatar:"",description:"",orgUid:""},insertUnified:function(n){e((function(e){e.unifiedResult.data.content.unshift(n)}))},updateUnified:function(n){e((function(e){var t=e.unifiedResult.data.content,o=t.findIndex((function(e){return e.uid===n.uid}));-1!==o?t[o]=n:console.warn("Unified with uid ".concat(n.uid," not found."))}))},deleteUnified:function(n){e((function(e){var t=e.unifiedResult.data.content,o=t.findIndex((function(e){return e.uid===n.uid}));-1!==o?t.splice(o,1):console.warn("Unified with uid ".concat(n.uid," not found."))}))},setUnifiedResult:function(t){var o;(e({unifiedResult:t}),""===n().currentUnified.uid)&&((null===(o=t.data)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.length)>0&&e({currentUnified:t.data.content[0]}))},setCurrentUnified:function(t){var o=n().unifiedResult.data.content,i=o.findIndex((function(e){return e.uid===t.uid}));if(-1!==i){var a=[].concat(A()(o.slice(0,i)),[t],A()(o.slice(i+1))),u=r()(r()({},n().unifiedResult),{},{data:{content:a}});e({unifiedResult:u,currentUnified:t})}else console.warn("Unified with the specified uid not found."),e({currentUnified:t})},deleteCurrentUnified:function(t){var o=n().unifiedResult.data.content,i=o.findIndex((function(e){return e.uid===t}));-1!==i?e({unifiedResult:r()(r()({},n().unifiedResult),{},{data:{content:[].concat(A()(o.slice(0,i)),A()(o.slice(i+1)))}})}):console.warn("Unified not found in cache:",t),n().currentUnified.uid===t&&e({currentUnified:{uid:"",orgUid:""}})},deleteUnifiedCache:function(){return e({},!0)}}})),{name:S.jlI}))),E=t(31549),O=(s.Z.Text,function(e){var n,t,o,i,s,W,A,F,V=e.type,I=w.A.useForm(),O=a()(I,1)[0],B=(0,m.M)(),L=B.config,G=B.updateConfig,_=(0,Z.u)((function(e){return e.currentOrg})),J=(0,M.V)((function(e){return e.currentRobot})),N=(0,j.E)((function(e){return e.currentAgent})),$=(0,U.$)((function(e){return e.currentWorkgroup})),D=z((function(e){return e.currentUnified})),H=(0,R.useState)(!1),Y=a()(H,2),X=Y[0],K=Y[1],Q=(0,R.useState)(!1),ee=a()(Q,2),ne=ee[0],te=ee[1],oe=(0,R.useState)("zh-cn"),re=a()(oe,2),ie=re[0],ae=re[1],ue=(0,R.useState)("system"),ce=a()(ue,2),le=ce[0],de=ce[1],se=(0,q.useIntl)(),fe=(0,R.useState)(!1),he=a()(fe,2),pe=he[0],ge=he[1],be=(0,R.useState)("full"),me=a()(be,2),we=me[0],ve=me[1],xe=(0,R.useMemo)((function(){return V===S._X4?{chatType:S.xtN,chatSid:J.uid}:V===S.Njn?{chatType:S.scI,chatSid:N.uid}:V===S.aZD?{chatType:S.vPY,chatSid:$.uid}:V===S.RB4?{chatType:S.vIe,chatSid:D.uid}:{chatType:S.xtN,chatSid:""}}),[V,J,N,$]),ye=xe.chatType,ke=xe.chatSid;(0,R.useEffect)((function(){var e,n;null!=_&&_.uid&&ye&&ke&&G({chatConfig:{org:null==_?void 0:_.uid,t:ye,sid:ke},theme:{backgroundColor:null===(e=L.theme)||void 0===e?void 0:e.backgroundColor,textColor:null===(n=L.theme)||void 0===n?void 0:n.textColor}})}),[null==_?void 0:_.uid,ye,ke,null===(n=L.theme)||void 0===n?void 0:n.backgroundColor,null===(t=L.theme)||void 0===t?void 0:t.textColor]);var Ce=function(e){var n,t,o=e+"?".concat(S.I3Y,"=").concat(null==_?void 0:_.uid)+"&".concat(S.ZfG,"=").concat(ye)+"&".concat(S.RI9,"=").concat(ke);(X&&(o+="&".concat(S.ErC,"=").concat(ie)),ne)&&(o+="&".concat(S.N1q,"=").concat(le)+"&".concat(S.spX,"=").concat(null===(n=L.theme)||void 0===n?void 0:n.backgroundColor)+"&".concat(S.cW9,"=").concat(null===(t=L.theme)||void 0===t?void 0:t.textColor));return o+"&"},Re=(0,R.useMemo)((function(){return Ce((0,P.Cn)())}),[null==_?void 0:_.uid,J,N,$,X,ie,ne,le,null===(o=L.theme)||void 0===o?void 0:o.backgroundColor,null===(i=L.theme)||void 0===i?void 0:i.textColor]),Me=(0,R.useMemo)((function(){return Ce((0,P.Z$)())}),[null==_?void 0:_.uid,J,N,$,X,ie,ne,le,null===(s=L.theme)||void 0===s?void 0:s.backgroundColor,null===(W=L.theme)||void 0===W?void 0:W.textColor]),Ze=function(e){var n,t,o,r,i,a,u,c,l,d;return'\x3c!-- bytedesk.com --\x3e\n<script src="https://www.weiyuai.cn/embed/bytedesk-web.js"><\/script>\n<script>\n const config = {\n baseUrl: \''.concat(e.baseUrl||"https://www.weiyuai.cn/chat","',\n placement: '").concat(e.placement||"bottom-right","',\n autoPopup: ").concat(e.autoPopup||!1,",\n locale: '").concat(ie,"',\n inviteConfig: {\n show: ").concat((null===(n=e.inviteConfig)||void 0===n?void 0:n.show)||!1,",\n text: '").concat((null===(t=e.inviteConfig)||void 0===t?void 0:t.text)||"需要帮助么","',\n },\n bubbleConfig: {\n show: ").concat(null===(o=null===(r=e.bubbleConfig)||void 0===r?void 0:r.show)||void 0===o||o,",\n icon: '").concat((null===(i=e.bubbleConfig)||void 0===i?void 0:i.icon)||"👋","',\n title: '").concat((null===(a=e.bubbleConfig)||void 0===a?void 0:a.title)||"需要帮助么","',\n subtitle: '").concat((null===(u=e.bubbleConfig)||void 0===u?void 0:u.subtitle)||"点击我,与我对话","'\n },\n theme: {\n mode: '").concat(le,"',\n backgroundColor: '").concat((null===(c=e.theme)||void 0===c?void 0:c.backgroundColor)||"#0066FF","',\n textColor: '").concat((null===(l=e.theme)||void 0===l?void 0:l.textColor)||"#ffffff","'\n },\n window: {\n width: '").concat((null===(d=e.window)||void 0===d?void 0:d.width)||380,"'\n },\n chatConfig: {\n org: '").concat(null==_?void 0:_.uid,"',\n t: '").concat(ye,"',\n sid: '").concat(ke,"'\n }\n };\n const bytedesk = new BytedeskWeb(config);\n bytedesk.init();\n<\/script>")};(0,R.useEffect)((function(){var e,n;L&&(O.setFieldValue("codeFullUrl",Re),O.setFieldValue("codeFrameUrl",Me),O.setFieldValue("buttonColor",null===(e=L.theme)||void 0===e?void 0:e.backgroundColor),O.setFieldValue("showBubble",null===(n=L.bubbleConfig)||void 0===n?void 0:n.show),O.setFieldsValue({rightPlacement:"bottom-right"===L.placement,configText:Ze(L)}))}),[L]);var je=function(e){ve(e),ge(!0)};return(0,E.jsxs)(C.Z,{title:se.formatMessage({id:"channel.web.config.title"}),children:[(0,E.jsxs)(w.A,{form:O,submitter:!1,onValuesChange:function(e,n){var t=n.rightPlacement?{placement:"bottom-right"}:{placement:"bottom-left"};G(t),O.setFieldsValue({configText:Ze(r()(r()({},L),t))})},children:[(0,E.jsx)(v.Z,{name:"rightPlacement",label:se.formatMessage({id:"channel.web.position"}),tooltip:se.formatMessage({id:"channel.web.position.tooltip"}),fieldProps:{checked:"bottom-right"===L.placement}}),(0,E.jsx)(x.Z,{name:"buttonColor",width:"md",label:se.formatMessage({id:"channel.web.button.color"}),options:[{label:se.formatMessage({id:"channel.web.button.color.blue"}),value:"#0066FF"},{label:se.formatMessage({id:"channel.web.button.color.green"}),value:"#52c41a"},{label:se.formatMessage({id:"channel.web.button.color.red"}),value:"#ff4d4f"},{label:se.formatMessage({id:"channel.web.button.color.yellow"}),value:"#faad14"},{label:se.formatMessage({id:"channel.web.button.color.purple"}),value:"#722ed1"}],fieldProps:{value:null===(A=L.theme)||void 0===A?void 0:A.backgroundColor,onChange:function(e){G({theme:r()(r()({},L.theme),{},{textColor:"#ffffff",backgroundColor:e})}),O.setFieldsValue({configText:Ze(r()(r()({},L),{},{theme:r()(r()({},L.theme),{},{textColor:"#ffffff",backgroundColor:e})}))})}},addonAfter:(0,E.jsx)(f.Z,{value:null===(F=L.theme)||void 0===F?void 0:F.backgroundColor,onChange:function(e){var n=e.toHexString();G({theme:r()(r()({},L.theme),{},{backgroundColor:n})}),O.setFieldsValue({buttonColor:n,configText:Ze(r()(r()({},L),{},{theme:r()(r()({},L.theme),{},{backgroundColor:n})}))})}})}),(0,E.jsx)(y.Z,{name:"showBubble",width:"xl",tooltip:se.formatMessage({id:"channel.web.show.bubble.tooltip"}),label:se.formatMessage({id:"channel.web.show.bubble"}),fieldProps:{onChange:function(e){var n=e.target.checked;G({bubbleConfig:r()(r()({},L.bubbleConfig),{},{show:n})}),O.setFieldsValue({configText:Ze(r()(r()({},L),{},{bubbleConfig:r()(r()({},L.bubbleConfig),{},{show:n})}))})}}}),(0,E.jsx)(y.Z,{name:"showLang",width:"xl",tooltip:se.formatMessage({id:"channel.web.enable.multilang.tooltip"}),label:se.formatMessage({id:"channel.web.enable.multilang"}),fieldProps:{checked:X,onChange:function(e){var n=e.target.checked;K(n),n||ae("zh-cn")}}}),X&&(0,E.jsx)(x.Z,{name:"language",width:"md",label:se.formatMessage({id:"channel.web.select.language"}),options:[{label:se.formatMessage({id:"channel.web.lang.zh_cn"}),value:"zh-cn"},{label:se.formatMessage({id:"channel.web.lang.zh_tw"}),value:"zh-tw"},{label:se.formatMessage({id:"channel.web.lang.en"}),value:"en"}],fieldProps:{onChange:function(e){return ae(e)}}}),(0,E.jsx)(y.Z,{name:"showTheme",width:"xl",tooltip:se.formatMessage({id:"channel.web.enable.theme.tooltip"}),label:se.formatMessage({id:"channel.web.enable.theme"}),fieldProps:{checked:ne,onChange:function(e){var n=e.target.checked;te(n),n||de("system")}}}),ne&&(0,E.jsx)(x.Z,{name:"theme",width:"md",label:se.formatMessage({id:"channel.web.theme.select"}),options:[{label:se.formatMessage({id:"channel.web.theme.follow.system"}),value:"system"},{label:se.formatMessage({id:"channel.web.theme.light"}),value:"light"},{label:se.formatMessage({id:"channel.web.theme.dark"}),value:"dark"}],fieldProps:{value:le,onChange:de}}),(0,E.jsx)(k.Z,{name:"configText",width:"xl",label:se.formatMessage({id:"channel.web.code.embed"}),tooltip:se.formatMessage({id:"channel.web.code.embed.desc"}),fieldProps:{autoSize:{minRows:15,maxRows:25},readOnly:!0}}),(0,E.jsxs)(h.Z,{direction:"horizontal",style:{width:"100%",marginTop:10,marginBottom:10},children:[(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(u.Z,{}),onClick:function(){var e=O.getFieldValue("configText");navigator.clipboard.writeText(e).then((function(){T.yw.success(se.formatMessage({id:"channel.web.copy.success"}))})).catch((function(){T.yw.error(se.formatMessage({id:"channel.web.copy.error"}))}))},children:se.formatMessage({id:"channel.web.copy.code"})}),(0,E.jsx)(p.ZP,{type:"primary",onClick:function(){var e;null===(e=window.bytedesk)||void 0===e||e.showChat()},children:se.formatMessage({id:"channel.web.show.chat"})}),(0,E.jsx)(p.ZP,{type:"primary",onClick:function(){var e;null===(e=window.bytedesk)||void 0===e||e.hideChat()},children:se.formatMessage({id:"channel.web.hide.chat"})})]}),(0,E.jsx)(k.Z,{name:"codeFullUrl",width:"xl",label:se.formatMessage({id:"channel.web.code.fullscreen"}),tooltip:se.formatMessage({id:"channel.web.code.fullscreen.desc"}),fieldProps:{autoSize:{minRows:2,maxRows:5},readOnly:!0}}),(0,E.jsxs)(h.Z,{direction:"horizontal",style:{width:"100%",marginBottom:10},children:[(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(u.Z,{}),onClick:function(){navigator.clipboard.writeText(Re).then((function(){T.yw.success(se.formatMessage({id:"channel.web.fullscreen.copy.success"}))})).catch((function(){T.yw.error(se.formatMessage({id:"channel.web.copy.error"}))}))},children:se.formatMessage({id:"channel.web.copy.fullscreen"})}),(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(c.Z,{}),onClick:function(){window.open(Re)},children:se.formatMessage({id:"channel.web.open.fullscreen"})}),(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(l.Z,{}),onClick:function(){return je("full")},children:se.formatMessage({id:"channel.web.generate.qrcode",defaultMessage:"生成二维码"})})]}),(0,E.jsx)(k.Z,{name:"codeFrameUrl",width:"xl",label:se.formatMessage({id:"channel.web.code.frame"}),tooltip:se.formatMessage({id:"channel.web.code.frame.desc"}),fieldProps:{autoSize:{minRows:2,maxRows:5},readOnly:!0}}),(0,E.jsxs)(h.Z,{direction:"horizontal",style:{width:"100%"},children:[(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(u.Z,{}),onClick:function(){var e=O.getFieldValue("codeFrameUrl");navigator.clipboard.writeText(e).then((function(){T.yw.success(se.formatMessage({id:"channel.web.frame.copy.success"}))})).catch((function(){T.yw.error(se.formatMessage({id:"channel.web.copy.error"}))}))},children:se.formatMessage({id:"channel.web.copy.frame"})}),(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(c.Z,{}),onClick:function(){window.open(Me)},children:se.formatMessage({id:"channel.web.open.frame"})}),(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(l.Z,{}),onClick:function(){return je("frame")},children:se.formatMessage({id:"channel.web.generate.qrcode",defaultMessage:"生成二维码"})})]})]}),(0,E.jsx)(g.Z,{title:se.formatMessage({id:"channel.web.qrcode.title",defaultMessage:"客服二维码"}),open:pe,onCancel:function(){return ge(!1)},footer:[(0,E.jsx)(p.ZP,{onClick:function(){return ge(!1)},children:se.formatMessage({id:"common.close",defaultMessage:"关闭"})},"close"),(0,E.jsx)(p.ZP,{type:"primary",icon:(0,E.jsx)(d.Z,{}),onClick:function(){var e,n=null===(e=document.getElementById("bytedesk-qrcode-canvas"))||void 0===e?void 0:e.querySelector("canvas");if(n){var t=n.toDataURL(),o=document.createElement("a");o.download="bytedesk-".concat(we,"-qrcode.png"),o.href=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),T.yw.success(se.formatMessage({id:"channel.web.qrcode.download.success"}))}},children:se.formatMessage({id:"channel.web.qrcode.download",defaultMessage:"下载二维码"})},"download")],width:400,centered:!0,children:(0,E.jsxs)("div",{style:{textAlign:"center",padding:"20px 0"},id:"bytedesk-qrcode-canvas",children:[(0,E.jsx)(b.Z,{value:"full"===we?Re:Me,size:280,style:{margin:"0 auto"},errorLevel:"H"}),(0,E.jsx)("div",{style:{marginTop:10},children:se.formatMessage({id:"channel.web.qrcode.scan",defaultMessage:"扫描二维码咨询客服"})})]})})]})})},96865:function(e,n,t){var o=t(23864);n.Z=function(){var e=(0,o.Z)().isDarkMode;return{leftSiderStyle:{borderRight:e?"1px solid #333":"1px solid #ccc",background:e?"#141414":"#f5f5f5",height:"100vh",overflow:"auto"},leftSiderWidth:250,headerStyle:{background:e?"#141414":"#fff"},rightSiderStyle:{borderLeft:e?"1px solid #333":"1px solid #ccc",background:e?"#141414":"#f5f5f5"},contentStyle:{minHeight:120,background:e?"#141414":"#f5f5f5",height:"100vh",overflow:"auto"}}}},66310:function(e,n,t){t.d(n,{V:function(){return s}});var o=t(73193),r=t.n(o),i=t(76711),a=t.n(i),u=t(55735),c=t(44435),l=t(83642),d=t(83890),s=(0,c.Ue)()((0,l.mW)((0,l.tJ)((0,d.n)((function(e,n){return{robotResult:{data:{content:[]}},currentRobot:{uid:"",nickname:""},insertRobot:function(n){e((function(e){e.robotResult.data.content.unshift(n)}))},setRobotResult:function(t){e({robotResult:t});var o,r=n().currentRobot;""!==r.uid&&void 0!==r||(null===(o=t.data)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.length)>0&&e({currentRobot:t.data.content[0]})},setCurrentRobot:function(t){var o=n().robotResult.data.content,i=o.findIndex((function(e){return e.uid===t.uid}));if(-1!==i){var u=[].concat(a()(o.slice(0,i)),[t],a()(o.slice(i+1))),c=r()(r()({},n().robotResult),{},{data:{content:u}});e({robotResult:c,currentRobot:t})}else console.warn("Robot with the specified uid not found."),e({currentRobot:t})},deleteCurrentRobot:function(t){var o=n().robotResult.data.content,i=o.findIndex((function(e){return e.uid===t}));-1!==i?e({robotResult:r()(r()({},n().robotResult),{},{data:{content:[].concat(a()(o.slice(0,i)),a()(o.slice(i+1)))}})}):console.warn("Robot not found in cache:",t),n().currentRobot.uid===t&&e({currentRobot:{uid:""}})},deleteRobotCache:function(){return e({},!0)}}})),{name:u.Eis})))},1902:function(e,n,t){t.d(n,{E:function(){return s}});var o=t(73193),r=t.n(o),i=t(76711),a=t.n(i),u=t(55735),c=t(44435),l=t(83642),d=t(83890),s=(0,c.Ue)()((0,l.mW)((0,l.tJ)((0,d.n)((function(e,n){return{agentResult:{data:{content:[]}},currentAgent:{uid:"",orgUid:""},insertAgent:function(n){e((function(e){e.agentResult.data.content.unshift(n)}))},updateAgent:function(n){e((function(e){var t=e.agentResult.data.content,o=t.findIndex((function(e){return e.uid===n.uid}));-1!==o?t[o]=n:console.warn("Agent with uid ".concat(n.uid," not found."))}))},setAgentResult:function(t){var o;(e({agentResult:t}),""===n().currentAgent.uid)&&((null===(o=t.data)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.length)>0&&e({currentAgent:t.data.content[0]}))},setCurrentAgent:function(t){var o=n().agentResult.data.content,i=o.findIndex((function(e){return e.uid===t.uid}));if(-1!==i){var u=[].concat(a()(o.slice(0,i)),[t],a()(o.slice(i+1))),c=r()(r()({},n().agentResult),{},{data:{content:u}});e({agentResult:c,currentAgent:t})}else console.warn("Agent with the specified uid not found."),e({currentAgent:t})},deleteCurrentAgent:function(t){var o=n().agentResult.data.content,i=o.findIndex((function(e){return e.uid===t}));-1!==i?e({agentResult:r()(r()({},n().agentResult),{},{data:{content:[].concat(a()(o.slice(0,i)),a()(o.slice(i+1)))}})}):console.warn("Agent not found in cache:",t),n().currentAgent.uid===t&&e({currentAgent:{uid:"",orgUid:""}})},deleteAgentCache:function(){return e({},!0)}}})),{name:u.zzK})))},95490:function(e,n,t){t.d(n,{$:function(){return s}});var o=t(73193),r=t.n(o),i=t(76711),a=t.n(i),u=t(55735),c=t(44435),l=t(83642),d=t(83890),s=(0,c.Ue)()((0,l.mW)((0,l.tJ)((0,d.n)((function(e,n){return{workgroupResult:{data:{content:[]}},currentWorkgroup:{uid:"",nickname:"",avatar:"",description:"",orgUid:""},insertWorkgroup:function(n){e((function(e){e.workgroupResult.data.content.unshift(n)}))},updateWorkgroup:function(n){e((function(e){var t=e.workgroupResult.data.content,o=t.findIndex((function(e){return e.uid===n.uid}));-1!==o?t[o]=n:console.warn("Workgroup with uid ".concat(n.uid," not found."))}))},deleteWorkgroup:function(n){e((function(e){var t=e.workgroupResult.data.content,o=t.findIndex((function(e){return e.uid===n.uid}));-1!==o?t.splice(o,1):console.warn("Workgroup with uid ".concat(n.uid," not found."))}))},setWorkgroupResult:function(t){var o;(e({workgroupResult:t}),""===n().currentWorkgroup.uid)&&((null===(o=t.data)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.length)>0&&e({currentWorkgroup:t.data.content[0]}))},setCurrentWorkgroup:function(t){var o=n().workgroupResult.data.content,i=o.findIndex((function(e){return e.uid===t.uid}));if(-1!==i){var u=[].concat(a()(o.slice(0,i)),[t],a()(o.slice(i+1))),c=r()(r()({},n().workgroupResult),{},{data:{content:u}});e({workgroupResult:c,currentWorkgroup:t})}else console.warn("Workgroup with the specified uid not found."),e({currentWorkgroup:t})},deleteCurrentWorkgroup:function(t){var o=n().workgroupResult.data.content,i=o.findIndex((function(e){return e.uid===t}));-1!==i?e({workgroupResult:r()(r()({},n().workgroupResult),{},{data:{content:[].concat(a()(o.slice(0,i)),a()(o.slice(i+1)))}})}):console.warn("Workgroup not found in cache:",t),n().currentWorkgroup.uid===t&&e({currentWorkgroup:{uid:"",orgUid:""}})},deleteWorkgroupCache:function(){return e({},!0)}}})),{name:u.b6l})))}}]); |