| 12345678910111213141516171819202122 |
- import{cQ as te,gV as Ze,gZ as ge,cq as A,g$ as t,fM as h,fV as s,cw as e,cp as l,gx as c,gN as B,ch as fe,c9 as X,ft as r,ac as Ce,gS as ke,eS as Y,cv as y,cs as z,gs as w,da as Se,fe as xe,cr as j,cD as Pe,h2 as oe,fL as et,w as Ke,y as de,gT as tt,F as ue,fS as re,eL as je,ff as pe,ee as at,af as lt,eU as ot,x as it,fr as Te,fa as Ae,fp as Ne,dx as Ve,e1 as Ye,fi as be,fX as Le,di as M,dF as ye,e$ as Ue,gd as Re,bM as nt,fh as st,fW as ct,h0 as ze,fU as Fe,dS as Qe,E as $e,fy as ut}from"./admin-ZywPplgI.js";import{_ as rt}from"./SettingAPIKeyDrawer.vue_vue_type_script_setup_true_lang-CZWhi3sp.js";const pt=""+new URL("window1-yunSyWkk.png",import.meta.url).href,dt=""+new URL("window3-DjMr2HXo.png",import.meta.url).href,mt=""+new URL("window2-D3eE6zm4.png",import.meta.url).href,vt={class:"border"},_t={class:"title p-16 bold"},ft={class:"code layout-bg border-t p-8"},gt={class:"flex-between p-8"},ht={class:"bold"},wt={class:"pre-wrap p-8 pt-0"},yt={class:"border"},At={class:"title p-16 bold"},bt={class:"code layout-bg border-t p-8"},kt={class:"flex-between p-8"},Dt={class:"bold"},$t={class:"pre-wrap p-8 pt-0"},xt={class:"border"},Vt={class:"title p-16 bold"},Ct={class:"code layout-bg border-t p-8"},Ot={class:"flex-between p-8"},It={class:"bold"},St={class:"pre-wrap p-8 pt-0"},Ut=te({__name:"EmbedDialog",props:{data:Object,apiInputParams:String},emits:["addData"],setup(P,{expose:m,emit:S}){const{application:$}=Ze(),x=P,U=h(!1),b=h(""),V=h(""),v=h(""),a=X(()=>x.apiInputParams?"?"+x.apiInputParams:""),i=X(()=>x.apiInputParams?"&"+x.apiInputParams:""),O=X(()=>x.apiInputParams?"?mode=mobile&"+x.apiInputParams:"?mode=mobile");return ge(U,g=>{g||(b.value="",V.value="",v.value="")}),m({open:g=>{b.value=`<iframe
- src="${$.location+g+a.value}"
- style="width: 100%; height: 100%;"
- frameborder="0"
- allow="microphone">
- </iframe>
- `,V.value=`<script
- async
- defer
- src="${$.location}api/embed?protocol=${window.location.protocol.replace(":","")}&host=${window.location.host}&token=${g}${i.value}">
- <\/script>
- `,v.value=`<iframe
- src="${$.location+g+O.value}"
- style="width: 100%; height: 100%;"
- frameborder="0"
- allow="microphone">
- </iframe>
- `,U.value=!0}}),(g,d)=>{const k=s("AppIcon"),T=s("el-button"),F=s("el-scrollbar"),p=s("el-col"),u=s("el-row"),Q=s("el-dialog");return r(),A(Q,{title:g.$t("views.applicationOverview.appInfo.embedInWebsite"),modelValue:U.value,"onUpdate:modelValue":d[3]||(d[3]=n=>U.value=n),width:"900",class:"embed-dialog","close-on-click-modal":!1,"close-on-press-escape":!1},{default:t(()=>[e(u,{gutter:12},{default:t(()=>[e(p,{span:8},{default:t(()=>[l("div",vt,[l("p",_t,c(g.$t("views.applicationOverview.appInfo.EmbedDialog.fullscreenModeTitle")),1),d[4]||(d[4]=l("img",{src:pt,alt:"",class:"ml-8",height:"150"},null,-1)),l("div",ft,[l("div",gt,[l("span",ht,c(g.$t("views.applicationOverview.appInfo.EmbedDialog.copyInstructions")),1),e(T,{text:"",onClick:d[0]||(d[0]=n=>B(fe)(b.value))},{default:t(()=>[e(k,{iconName:"app-copy"})]),_:1})]),e(F,{height:"180",always:""},{default:t(()=>[l("div",wt,c(b.value),1)]),_:1})])])]),_:1}),e(p,{span:8},{default:t(()=>[l("div",yt,[l("p",At,c(g.$t("views.applicationOverview.appInfo.EmbedDialog.mobileModeTitle")),1),d[5]||(d[5]=l("img",{src:dt,alt:"",class:"ml-8",height:"150"},null,-1)),l("div",bt,[l("div",kt,[l("span",Dt,c(g.$t("views.applicationOverview.appInfo.EmbedDialog.copyInstructions")),1),e(T,{text:"",onClick:d[1]||(d[1]=n=>B(fe)(v.value))},{default:t(()=>[e(k,{iconName:"app-copy"})]),_:1})]),e(F,{height:"180",always:""},{default:t(()=>[l("div",$t,c(v.value),1)]),_:1})])])]),_:1}),e(p,{span:8},{default:t(()=>[l("div",xt,[l("p",Vt,c(g.$t("views.applicationOverview.appInfo.EmbedDialog.floatingModeTitle")),1),d[6]||(d[6]=l("img",{src:mt,alt:"",class:"ml-8",height:"150"},null,-1)),l("div",Ct,[l("div",Ot,[l("span",It,c(g.$t("views.applicationOverview.appInfo.EmbedDialog.copyInstructions")),1),e(T,{text:"",onClick:d[2]||(d[2]=n=>B(fe)(V.value))},{default:t(()=>[e(k,{iconName:"app-copy"})]),_:1})]),e(F,{height:"180",always:""},{default:t(()=>[l("div",St,c(V.value),1)]),_:1})])])]),_:1})]),_:1})]),_:1},8,["title","modelValue"])}}}),Et=Ce(Ut,[["__scopeId","data-v-3a7d81c5"]]),Lt={class:"api-key-container"},Tt={class:"api-key-text vertical-middle lighter break-all"},Bt={key:0,class:"flex align-center"},Pt={class:"color-text-primary"},Rt={key:1,class:"flex align-center"},zt={class:"color-text-primary"},Ft={key:0,class:"permanent-status"},Qt={key:1,class:"expiry-info"},Mt={class:"mr-4"},Kt=te({__name:"APIKeyDialog",emits:["addData"],setup(P,{expose:m,emit:S}){const $=h(""),x=ke(),{params:{id:U}}=x,b=X(()=>x.path.includes("resource-management")?"systemManage":"workspace"),V=et({current_page:1,page_size:20,total:0});function v(){V.current_page=1,p()}const a=h(),i=h(!1),O=h(!1),K=h(null);ge(i,o=>{o||(K.value=null)});function g(o){a.value.open(o,"APPLICATION")}function d(o){Ke(`${w("views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1")}: ${o.secret_key}?`,w("views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2"),{confirmButtonText:w("common.confirm"),cancelButtonText:w("common.cancel"),confirmButtonClass:"danger"}).then(()=>{Y({type:"applicationKey",systemType:b.value}).delAPIKey(U,o.id,O).then(()=>{de(w("common.deleteSuccess")),p()})}).catch(()=>{})}async function k(o,R){const D={is_active:o},E=D.is_active?w("common.status.enabled"):w("common.status.disabled");await Y({type:"applicationKey",systemType:b.value}).putAPIKey(U,R.id,D,O).then(()=>(de(E),p(),!0)).catch(()=>!1)}function T(){Y({type:"applicationKey",systemType:b.value}).postAPIKey(U,O).then(()=>{de(w("common.createSuccess")),p()})}const F=()=>{p(),i.value=!0};function p(){const o={order_by:$.value};Y({type:"applicationKey",systemType:b.value}).getAPIKey(U,V.current_page,V.page_size,o,O).then(R=>{K.value=R.data.records,V.total=R.data.total})}function u({prop:o,order:R}){$.value=R==="ascending"?o:`-${o}`,p()}function Q(o){return Se(o)===w("layout.time.expired")?"color-danger":"color-warning"}function n(){p()}return m({open:F}),(o,R)=>{const D=s("el-button"),E=s("el-tooltip"),H=s("AppIcon"),N=s("el-table-column"),ae=s("SuccessFilled"),me=s("el-icon"),ie=s("el-tag"),ne=s("el-switch"),se=s("el-divider"),G=s("app-table"),I=s("el-dialog");return r(),A(I,{title:"API Key",modelValue:i.value,"onUpdate:modelValue":R[1]||(R[1]=L=>i.value=L),width:"1000","close-on-click-modal":!1,"close-on-press-escape":!1,"align-center":""},{default:t(()=>[e(D,{type:"primary",class:"mb-16",onClick:T},{default:t(()=>[y(c(o.$t("common.create")),1)]),_:1}),e(G,{data:K.value,loading:O.value,style:{"min-height":"300px"},class:"mb-16","max-height":500,"pagination-config":V,onSizeChange:v,onChangePage:p,onSortChange:u},{default:t(()=>[e(N,{prop:"secret_key",label:"API Key"},{default:t(({row:L})=>[l("div",Lt,[e(E,{content:L.secret_key,placement:"top",effect:"light","hide-after":0},{default:t(()=>[l("span",Tt,c(L.secret_key),1)]),_:2},1032,["content"]),e(D,{type:"primary",text:"",onClick:W=>B(fe)(L.secret_key),class:"copy-btn"},{default:t(()=>[e(H,{iconName:"app-copy"})]),_:1},8,["onClick"])])]),_:1}),e(N,{label:o.$t("views.document.enableStatus.label"),width:"100"},{default:t(({row:L})=>[L.is_active?(r(),z("div",Bt,[e(me,{class:"color-success mr-8",style:{"font-size":"16px"}},{default:t(()=>[e(ae)]),_:1}),l("span",Pt,c(o.$t("common.status.enabled")),1)])):(r(),z("div",Rt,[e(H,{iconName:"app-disabled",class:"color-secondary mr-8"}),l("span",zt,c(o.$t("common.status.disabled")),1)]))]),_:1},8,["label"]),e(N,{label:o.$t("layout.crossSettings"),width:"100",prop:"allow_cross_domain"},{default:t(({row:L})=>[L.allow_cross_domain?(r(),A(ie,{key:0,size:"small",type:"info",class:"info-tag"},{default:t(()=>[y(c(o.$t("views.system.authentication.scanTheQRCode.alreadyTurnedOn")),1)]),_:1})):(r(),A(ie,{key:1,size:"small",class:"blue-tag"},{default:t(()=>[y(c(o.$t("views.system.authentication.scanTheQRCode.notEnabled")),1)]),_:1}))]),_:1},8,["label"]),e(N,{label:o.$t("layout.about.expiredTime"),width:"265"},{default:t(({row:L})=>[L.is_permanent?(r(),z("span",Ft,c(B(w)("layout.time.neverExpires")),1)):(r(),z("span",Qt,[B(Se)(L.expire_time)?(r(),z("span",{key:0,class:xe([Q(L.expire_time),"relative-time"])}," ("+c(B(Se)(L.expire_time))+") ",3)):j("",!0),y(" "+c(B(Pe)(L.expire_time)),1)]))]),_:1},8,["label"]),e(N,{label:o.$t("common.createDate"),width:"170",prop:"create_time",sortable:""},{default:t(({row:L})=>[y(c(B(Pe)(L.create_time)),1)]),_:1},8,["label"]),e(N,{label:o.$t("common.operation"),align:"left",width:"130"},{default:t(({row:L})=>[l("span",{onClick:R[0]||(R[0]=oe(()=>{},["stop"]))},[e(ne,{size:"small",modelValue:L.is_active,"onUpdate:modelValue":W=>L.is_active=W,onChange:W=>k(W,L)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),e(se,{direction:"vertical"}),l("span",Mt,[e(E,{effect:"dark",content:o.$t("common.setting"),placement:"top"},{default:t(()=>[e(D,{type:"primary",text:"",onClick:oe(W=>g(L),["stop"])},{default:t(()=>[e(H,{iconName:"app-edit"})]),_:1},8,["onClick"])]),_:2},1032,["content"])]),e(E,{effect:"dark",content:o.$t("common.delete"),placement:"top"},{default:t(()=>[e(D,{type:"primary",text:"",onClick:W=>d(L)},{default:t(()=>[e(H,{iconName:"app-delete"})]),_:1},8,["onClick"])]),_:2},1032,["content"])]),_:1},8,["label"])]),_:1},8,["data","loading","pagination-config"]),e(rt,{ref_key:"SettingAPIKeyDialogRef",ref:a,onRefresh:n},null,512)]),_:1},8,["modelValue"])}}}),jt=Ce(Kt,[["__scopeId","data-v-1f709ada"]]),Nt={class:"ml-4"},Yt={class:"dialog-footer"},Xt=te({__name:"LimitDialog",emits:["refresh"],setup(P,{expose:m,emit:S}){const $=ke(),{params:{id:x}}=$,U=X(()=>$.path.includes("resource-management")?"systemManage":"workspace"),b=S,V=h(),v=h({access_num:0,white_active:!0,white_list:"",authentication_value:"",authentication:!1}),a=h(!1),i=h(!1);ge(a,g=>{g||(v.value={access_num:0,white_active:!0,white_list:""})});const O=g=>{v.value.access_num=g.access_num,v.value.white_active=g.white_active,v.value.white_list=g.white_list?.length?g.white_list?.join(`
- `):"",v.value.authentication_value=g.authentication_value,v.value.authentication=g.authentication,a.value=!0},K=async g=>{g&&await g.validate((d,k)=>{if(d){const T={white_list:v.value.white_list?v.value.white_list.split(`
- `):[],white_active:v.value.white_active,access_num:v.value.access_num,authentication:v.value.authentication,authentication_value:v.value.authentication_value};Y({type:"application",systemType:U.value}).putAccessToken(x,T,i).then(()=>{b("refresh"),de(w("common.settingSuccess")),a.value=!1})}})};return m({open:O}),(g,d)=>{const k=s("el-input-number"),T=s("el-form-item"),F=s("el-switch"),p=s("el-input"),u=s("el-form"),Q=s("el-button"),n=s("el-dialog");return r(),A(n,{title:g.$t("views.applicationOverview.appInfo.accessControl"),modelValue:a.value,"onUpdate:modelValue":d[6]||(d[6]=o=>a.value=o),"close-on-click-modal":!1,"close-on-press-escape":!1,width:"650"},{footer:t(()=>[l("span",Yt,[e(Q,{onClick:d[4]||(d[4]=oe(o=>a.value=!1,["prevent"]))},{default:t(()=>[y(c(g.$t("common.cancel")),1)]),_:1}),e(Q,{type:"primary",onClick:d[5]||(d[5]=o=>K(V.value)),loading:i.value},{default:t(()=>[y(c(g.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[e(u,{"label-position":"top",ref_key:"limitFormRef",ref:V,model:v.value},{default:t(()=>[e(T,{label:g.$t("views.applicationOverview.appInfo.LimitDialog.clientQueryLimitLabel")},{default:t(()=>[e(k,{modelValue:v.value.access_num,"onUpdate:modelValue":d[0]||(d[0]=o=>v.value.access_num=o),min:0,step:1,max:1e7,"value-on-clear":0,"controls-position":"right",style:{width:"268px"},"step-strictly":""},null,8,["modelValue"]),l("span",Nt,c(g.$t("views.applicationOverview.appInfo.LimitDialog.timesDays")),1)]),_:1},8,["label"]),e(T,{label:g.$t("views.applicationOverview.appInfo.LimitDialog.whitelistLabel"),onClick:d[2]||(d[2]=oe(()=>{},["prevent"]))},{default:t(()=>[e(F,{size:"small",modelValue:v.value.white_active,"onUpdate:modelValue":d[1]||(d[1]=o=>v.value.white_active=o)},null,8,["modelValue"])]),_:1},8,["label"]),e(T,null,{default:t(()=>[e(p,{modelValue:v.value.white_list,"onUpdate:modelValue":d[3]||(d[3]=o=>v.value.white_list=o),placeholder:g.$t("views.applicationOverview.appInfo.LimitDialog.whitelistPlaceholder"),rows:10,type:"textarea"},null,8,["modelValue","placeholder"])]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}}),Jt={class:"ml-4"},Ht={class:"mb-4 lighter"},qt={class:"complex-input flex align-center"},Gt={class:"mb-16 lighter flex align-center"},Wt={style:{"font-size":"13px"}},Zt={class:"ml-8",style:{"font-size":"13px"}},ea={class:"ml-8 font-small",style:{color:"#909399"}},ta=te({__name:"XPackLimitDrawer",emits:["refresh"],setup(P,{expose:m,emit:S}){const $=tt(),x=ke(),{params:{id:U}}=x,b=X(()=>x.path.includes("resource-management")?"systemManage":"workspace"),V=S,v=h([]),a=h(),i=h({access_num:0,white_active:!0,white_list:"",authentication_value:{type:"password",max_attempts:1},authentication:!1}),O=h(!1),K=h(!1);ge(O,p=>{p||(i.value={access_num:0,white_active:!0,white_list:""})});const g=p=>{i.value.access_num=p.access_num,i.value.white_active=p.white_active,i.value.white_list=p.white_list?.length?p.white_list?.join(`
- `):"",i.value.authentication_value=p.authentication_value||{type:"password"},i.value.authentication_value.type==="password"&&!i.value.authentication_value.password_value&&T(),i.value.authentication_value.max_attempts||(i.value.authentication_value.max_attempts=1),i.value.authentication=p.authentication,O.value=!0,Y({type:"application",systemType:b.value}).getChatUserAuthType().then(u=>{v.value=u.data})},d=async p=>{p&&await p.validate((u,Q)=>{if(u){const n={white_list:i.value.white_list?i.value.white_list.split(`
- `):[],white_active:i.value.white_active,access_num:i.value.access_num,authentication:i.value.authentication,authentication_value:i.value.authentication_value};Y({type:"application",systemType:b.value}).putAccessToken(U,n,K).then(()=>{V("refresh"),de(w("common.settingSuccess")),O.value=!1})}})};function k(p=10){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Q=new Uint8Array(p);return window.crypto.getRandomValues(Q),Array.from(Q).map(n=>u[n%u.length]).join("")}function T(){i.value.authentication_value.password_value=k()}function F(){i.value.authentication&&!i.value.authentication_value.password_value&&(i.value.authentication_value={type:"password",password_value:k()},i.value.authentication_value.max_attempts||(i.value.authentication_value.max_attempts=1))}return m({open:g}),(p,u)=>{const Q=s("el-input-number"),n=s("el-form-item"),o=s("el-switch"),R=s("el-radio"),D=s("el-input"),E=s("AppIcon"),H=s("el-button"),N=s("el-tooltip"),ae=s("el-card"),me=s("el-checkbox"),ie=s("el-checkbox-group"),ne=s("el-radio-group"),se=s("el-form"),G=s("el-drawer");return r(),A(G,{modelValue:O.value,"onUpdate:modelValue":u[14]||(u[14]=I=>O.value=I),size:"60%"},{header:t(()=>[l("h4",null,c(p.$t("views.applicationOverview.appInfo.accessControl")),1)]),footer:t(()=>[l("div",null,[e(H,{onClick:u[12]||(u[12]=oe(I=>O.value=!1,["prevent"]))},{default:t(()=>[y(c(p.$t("common.cancel")),1)]),_:1}),e(H,{type:"primary",onClick:u[13]||(u[13]=I=>d(a.value)),loading:K.value},{default:t(()=>[y(c(p.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[e(se,{"label-position":"top",ref_key:"limitFormRef",ref:a,model:i.value,"require-asterisk-position":"right"},{default:t(()=>[e(n,{label:p.$t("views.applicationOverview.appInfo.LimitDialog.clientQueryLimitLabel")},{default:t(()=>[e(Q,{modelValue:i.value.access_num,"onUpdate:modelValue":u[0]||(u[0]=I=>i.value.access_num=I),min:0,step:1,max:1e7,"value-on-clear":0,"controls-position":"right",style:{width:"268px"},"step-strictly":""},null,8,["modelValue"]),l("span",Jt,c(p.$t("views.applicationOverview.appInfo.LimitDialog.timesDays")),1)]),_:1},8,["label"]),e(n,{label:p.$t("views.applicationOverview.appInfo.LimitDialog.authentication"),onClick:u[2]||(u[2]=oe(()=>{},["prevent"]))},{default:t(()=>[e(o,{size:"small",modelValue:i.value.authentication,"onUpdate:modelValue":u[1]||(u[1]=I=>i.value.authentication=I),onChange:F},null,8,["modelValue"])]),_:1},8,["label"]),i.value.authentication?(r(),A(ne,{key:0,modelValue:i.value.authentication_value.type,"onUpdate:modelValue":u[8]||(u[8]=I=>i.value.authentication_value.type=I),class:"card__radio"},{default:t(()=>[e(ae,{shadow:"never",class:xe(["mb-16",i.value.authentication_value?.type==="password"?"border-active":""])},{default:t(()=>[e(R,{value:"password",size:"large"},{default:t(()=>[l("p",Ht,c(p.$t("views.applicationOverview.appInfo.LimitDialog.authenticationValue")),1)]),_:1}),i.value.authentication_value.type==="password"?(r(),A(n,{key:0,class:"ml-24"},{default:t(()=>[l("div",qt,[e(D,{class:"complex-input__left",modelValue:i.value.authentication_value.password_value,"onUpdate:modelValue":u[3]||(u[3]=I=>i.value.authentication_value.password_value=I),readonly:"",style:{width:"268px"}},null,8,["modelValue"]),l("div",null,[e(N,{content:p.$t("common.copy"),placement:"top"},{default:t(()=>[e(H,{text:"",onClick:u[4]||(u[4]=I=>B(fe)(i.value.authentication_value.password_value))},{default:t(()=>[e(E,{iconName:"app-copy",class:"color-secondary"})]),_:1})]),_:1},8,["content"]),e(N,{content:p.$t("common.refresh"),placement:"top"},{default:t(()=>[e(H,{onClick:T,text:"",style:{margin:"0 4px 0 0 !important"}},{default:t(()=>[e(E,{iconName:"app-refresh",class:"color-secondary"})]),_:1})]),_:1},8,["content"])])])]),_:1})):j("",!0)]),_:1},8,["class"]),e(ae,{shadow:"never",class:xe(["mb-16",i.value.authentication_value.type==="login"?"border-active":""])},{default:t(()=>[e(R,{value:"login",size:"large"},{default:t(()=>[l("p",Gt,[y(c(p.$t("views.system.authentication.title"))+" ",1),e(N,{"popper-class":"max-w-350",effect:"dark",content:p.$t("views.applicationOverview.appInfo.LimitDialog.authenticationTooltip")},{default:t(()=>[e(E,{iconName:"app-warning",class:"app-warning-icon"})]),_:1},8,["content"]),i.value.authentication_value.type==="login"?(r(),A(H,{key:0,type:"primary",link:"",onClick:u[5]||(u[5]=I=>B($).push({name:"applicationChatUser"}))},{default:t(()=>[y(c(p.$t("views.applicationOverview.appInfo.LimitDialog.toSettingChatUser")),1)]),_:1})):j("",!0)])]),_:1}),i.value.authentication_value.type==="login"?(r(),A(n,{key:0,label:p.$t("views.applicationOverview.appInfo.LimitDialog.loginMethod"),rules:[{required:!0,message:p.$t("views.applicationOverview.appInfo.LimitDialog.loginMethodRequired"),trigger:"change"}],prop:"authentication_value.login_value",class:"ml-24 border-t",style:{"padding-top":"16px"}},{default:t(()=>[e(ie,{modelValue:i.value.authentication_value.login_value,"onUpdate:modelValue":u[6]||(u[6]=I=>i.value.authentication_value.login_value=I)},{default:t(()=>[(r(!0),z(ue,null,re(v.value,I=>(r(),A(me,{key:I.value,label:I.label,value:I.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label","rules"])):j("",!0),i.value.authentication_value.type==="login"&&i.value.authentication_value?.login_value?.includes("LOCAL")?(r(),A(n,{key:1,class:"ml-24",label:p.$t("views.system.display_code"),rules:[{required:!0,message:p.$t("views.applicationOverview.appInfo.LimitDialog.displayCodeRequired"),trigger:"change"}],prop:"authentication_value.max_attempts"},{default:t(()=>[l("span",Wt,c(p.$t("views.system.loginFailed")),1),e(Q,{style:{"margin-left":"8px"},modelValue:i.value.authentication_value.max_attempts,"onUpdate:modelValue":u[7]||(u[7]=I=>i.value.authentication_value.max_attempts=I),min:-1,max:10,step:1,"controls-position":"right"},null,8,["modelValue"]),l("span",Zt,c(p.$t("views.system.loginFailedMessage")),1),l("span",ea," ("+c(p.$t("views.system.display_codeTip"))+") ",1)]),_:1},8,["label","rules"])):j("",!0)]),_:1},8,["class"])]),_:1},8,["modelValue"])):j("",!0),e(n,{label:p.$t("views.applicationOverview.appInfo.LimitDialog.whitelistLabel"),onClick:u[10]||(u[10]=oe(()=>{},["prevent"]))},{default:t(()=>[e(o,{size:"small",modelValue:i.value.white_active,"onUpdate:modelValue":u[9]||(u[9]=I=>i.value.white_active=I)},null,8,["modelValue"])]),_:1},8,["label"]),i.value.white_active?(r(),A(n,{key:1},{default:t(()=>[e(D,{modelValue:i.value.white_list,"onUpdate:modelValue":u[11]||(u[11]=I=>i.value.white_list=I),placeholder:p.$t("views.applicationOverview.appInfo.LimitDialog.whitelistPlaceholder"),rows:10,type:"textarea"},null,8,["modelValue","placeholder"])]),_:1})):j("",!0)]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),aa={class:"dialog-footer"},la=te({__name:"DisplaySettingDialog",emits:["refresh"],setup(P,{expose:m,emit:S}){const $=ke(),{params:{id:x}}=$,U=X(()=>$.path.includes("resource-management")?"systemManage":"workspace"),b=S,V=h(),v=h({show_source:!1,show_exec:!1,language:""}),a=h(null),i=h(!1),O=h(!1);ge(i,d=>{d||(v.value={show_source:!1,show_exec:!1,language:""})});const K=(d,k)=>{a.value=k,v.value.show_source=d.show_source,v.value.show_exec=d.show_exec,v.value.language=d.language,i.value=!0},g=async d=>{d&&await d.validate((k,T)=>{k&&Y({type:"application",systemType:U.value}).putAccessToken(x,v.value,O).then(()=>{b("refresh"),de(w("common.settingSuccess")),i.value=!1})})};return m({open:K}),(d,k)=>{const T=s("el-option"),F=s("el-select"),p=s("el-form-item"),u=s("el-checkbox"),Q=s("el-space"),n=s("el-form"),o=s("el-button"),R=s("el-dialog");return r(),A(R,{title:d.$t("views.applicationOverview.appInfo.displaySetting"),modelValue:i.value,"onUpdate:modelValue":k[5]||(k[5]=D=>i.value=D),"close-on-click-modal":!1,"close-on-press-escape":!1,width:"550"},{footer:t(()=>[l("span",aa,[e(o,{onClick:k[3]||(k[3]=oe(D=>i.value=!1,["prevent"]))},{default:t(()=>[y(c(d.$t("common.cancel")),1)]),_:1}),e(o,{type:"primary",onClick:k[4]||(k[4]=D=>g(V.value)),loading:O.value},{default:t(()=>[y(c(d.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[e(n,{"label-position":"top",ref_key:"displayFormRef",ref:V,model:v.value},{default:t(()=>[e(p,null,{default:t(()=>[l("span",null,c(d.$t("layout.language")),1),e(F,{modelValue:v.value.language,"onUpdate:modelValue":k[0]||(k[0]=D=>v.value.language=D),clearable:""},{default:t(()=>[(r(!0),z(ue,null,re(B(je),D=>(r(),A(T,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(p,null,{default:t(()=>[e(Q,{direction:"vertical",alignment:"start",size:2},{default:t(()=>[e(u,{modelValue:v.value.show_source,"onUpdate:modelValue":k[1]||(k[1]=D=>v.value.show_source=D),label:d.$t("views.applicationOverview.SettingDisplayDialog.showSourceLabel")},null,8,["modelValue","label"]),e(u,{modelValue:v.value.show_exec,"onUpdate:modelValue":k[2]||(k[2]=D=>v.value.show_exec=D),label:d.$t("views.applicationOverview.SettingDisplayDialog.showExecutionDetail")},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}}),oa=""+new URL("display-bg2-BETnngP8.png",import.meta.url).href,ia="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAAOCAYAAABjJ6RkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACFSURBVHgB7dyxDcJAEETRvcWkRIhWqIrKESEBsn3G7sG30XtFfE007fnabvMUj6lFBgDny5jbLz65XuIutgAD9bjmPmwzM6YAYKh1H7aWLUARwQUoIrgARQQXoIjgAhQRXIAiggtQRHABigguQJFctugBwFgZc7ZvvHuPJQAY4hi2x3nNH+AmFr6g66dUAAAAAElFTkSuQmCC",na="data:image/png;base64,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",sa=""+new URL("../MaxKB.gif",import.meta.url).href,ca={class:"flex-between mb-8"},ua=["id"],ra={class:"flex align-center"},pa={class:"flex",style:{height:"570px"}},da={class:"setting-preview border border-r-6 mr-16",style:{"min-width":"400px"}},ma={class:"flex-between"},va={class:"flex align-center"},_a={class:"mr-12 ml-24 flex"},fa=["src"],ga={class:"ellipsis"},ha={class:"mr-16"},wa={class:"p-16",style:{position:"relative"}},ya={class:"flex"},Aa={key:0,class:"avatar"},ba=["width"],ka={class:"flex mt-4",style:{"justify-content":"flex-end"}},Da=["width"],$a={key:0,class:"avatar ml-8"},xa={style:{position:"absolute",bottom:"0","padding-bottom":"8px","box-sizing":"border-box"},class:"p-16 text-center w-full"},Va={class:"float_icon"},Ca={key:1,src:sa,height:"50px",style:{width:"40px",height:"40px",display:"block"}},Oa={class:"p-8"},Ia={class:"mb-8"},Sa={class:"mb-8"},Ua={class:"mb-8"},Ea={class:"flex-between mb-8"},La={class:"lighter"},Ta={class:"flex align-center"},Ba={class:"flex-between mb-8"},Pa={class:"lighter"},Ra={class:"flex align-center"},za={class:"flex-between mb-8"},Fa={class:"lighter"},Qa={class:"flex align-center"},Ma={class:"flex-between mb-8"},Ka={class:"lighter"},ja={class:"flex align-center"},Na={class:"flex-between mb-8"},Ya={class:"lighter"},Xa={class:"border-t mt-8"},Ja={class:"flex-between mb-8"},Ha={class:"lighter"},qa={class:"flex align-center"},Ga={class:"flex align-center"},Wa={key:0},Za={class:"dialog-footer"},Me=te({__name:"XPackDisplaySettingDialog",emits:["refresh"],setup(P,{expose:m,emit:S}){const $=ke(),{params:{id:x}}=$,U=X(()=>$.path.includes("resource-management")?"systemManage":"workspace"),b=S,V={show_source:!1,show_exec:!1,language:"",show_history:!0,draggable:!0,show_guide:!0,icon:"",icon_url:"",chat_background:"",chat_background_url:"",avatar:"",avatar_url:"",float_icon:"",float_icon_url:"",user_avatar:"",user_avatar_url:"",disclaimer:!1,disclaimer_value:w("views.applicationOverview.SettingDisplayDialog.disclaimerValue"),custom_theme:{theme_color:"",header_font_color:"#1f2329"},float_location:{y:{type:"bottom",value:30},x:{type:"right",value:0}},show_avatar:!0,show_user_avatar:!1},v=h(),a=h({show_source:!1,show_exec:!1,language:"",icon:"",icon_url:"",show_history:!0,draggable:!1,show_guide:!1,chat_background:"",chat_background_url:"",avatar:"",avatar_url:"",float_icon:"",float_icon_url:"",user_avatar:"",user_avatar_url:"",disclaimer:!1,disclaimer_value:w("views.applicationOverview.SettingDisplayDialog.disclaimerValue"),custom_theme:{theme_color:"",header_font_color:"#1f2329"},float_location:{y:{type:"bottom",value:30},x:{type:"right",value:0}},show_avatar:!0,show_user_avatar:!1}),i=h({avatar:"",float_icon:"",user_avatar:"",icon:"",chat_background:""}),O=h(!1),K=h(!1),g=h(null),d=X(()=>({background:a.value.custom_theme?.theme_color,color:a.value.custom_theme?.header_font_color}));function k(){a.value=ot.cloneDeep(V),i.value={avatar:"",float_icon:"",user_avatar:"",icon:"",chat_background:""}}const T=(n,o,R)=>{if(n?.size/1024/1024<10)a.value[R]=n.raw,i.value[R]=URL.createObjectURL(n.raw),a.value[`${R}_url`]="";else return it(w("common.EditAvatarDialog.fileSizeExceeded")),!1},F=(n,o)=>{g.value=o,a.value.show_source=n.show_source,a.value.show_exec=n.show_exec,a.value.show_history=n.show_history,a.value.language=n.language,a.value.draggable=n.draggable,a.value.show_guide=n.show_guide,i.value.avatar=n.avatar,i.value.icon=n.icon,i.value.chat_background=n.chat_background,i.value.float_icon=n.float_icon,i.value.user_avatar=n.user_avatar,a.value.disclaimer=n.disclaimer,a.value.disclaimer_value=n.disclaimer_value,a.value.disclaimer_value===w("views.applicationOverview.SettingDisplayDialog.disclaimerValue")&&(a.value.disclaimer_value=w("views.applicationOverview.SettingDisplayDialog.disclaimerValue")),a.value.avatar_url=n.avatar,a.value.chat_background_url=n.chat_background,a.value.icon_url=n.icon,a.value.user_avatar_url=n.user_avatar,a.value.float_icon_url=n.float_icon,a.value.show_avatar=n.show_avatar,a.value.show_user_avatar=n.show_user_avatar,a.value.custom_theme={theme_color:n.custom_theme?.theme_color||"",header_font_color:n.custom_theme?.header_font_color||"#1f2329"},a.value.float_location=n.float_location,O.value=!0},p=n=>{a.value.disclaimer_value=n},u=n=>{a.value.disclaimer=n},Q=async n=>{n&&await n.validate((o,R)=>{if(o){const D=new FormData;Object.keys(a.value).map(E=>{["custom_theme","float_location"].includes(E)?D.append(E,JSON.stringify(a.value[E])):D.append(E,a.value[E])}),Y({type:"application",systemType:U.value}).putXpackAccessToken(x,D,K).then(()=>{b("refresh"),de(w("common.settingSuccess")),O.value=!1})}})};return m({open:F}),(n,o)=>{const R=s("Refresh"),D=s("el-icon"),E=s("el-button"),H=s("el-divider"),N=s("el-avatar"),ae=s("LogoIcon"),me=s("AppIcon"),ie=s("Close"),ne=s("el-image"),se=s("auto-tooltip"),G=s("el-text"),I=s("el-color-picker"),L=s("el-col"),W=s("el-row"),ve=s("el-option"),he=s("el-select"),_e=s("el-upload"),ce=s("el-card"),_=s("el-checkbox"),C=s("el-input-number"),J=s("el-input"),we=s("el-tooltip"),Oe=s("el-space"),le=s("el-form"),Z=s("el-scrollbar"),De=s("el-dialog");return r(),A(De,{title:n.$t("views.applicationOverview.appInfo.displaySetting"),width:"900",modelValue:O.value,"onUpdate:modelValue":o[18]||(o[18]=f=>O.value=f),"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,"align-center":"",class:"display-setting-dialog"},{header:t(({titleId:f,titleClass:q})=>[l("div",ca,[l("h4",{id:f,class:xe(q)},c(n.$t("views.applicationOverview.appInfo.displaySetting")),11,ua),l("div",ra,[e(E,{onClick:oe(k,["prevent"]),link:""},{default:t(()=>[e(D,{class:"mr-4"},{default:t(()=>[e(R)]),_:1}),y(" "+c(n.$t("views.applicationOverview.SettingDisplayDialog.restoreDefault")),1)]),_:1}),e(H,{direction:"vertical"})])])]),footer:t(()=>[l("span",Za,[e(E,{onClick:o[16]||(o[16]=oe(f=>O.value=!1,["prevent"]))},{default:t(()=>[y(c(n.$t("common.cancel")),1)]),_:1}),e(E,{type:"primary",onClick:o[17]||(o[17]=f=>Q(v.value)),loading:K.value},{default:t(()=>[y(c(n.$t("common.save")),1)]),_:1},8,["loading"])])]),default:t(()=>[l("div",pa,[l("div",da,[l("div",{class:"setting-preview-container",style:pe({backgroundImage:`url(${i.value?.chat_background})`})},[l("div",{class:"setting-preview-header",style:pe(d.value)},[l("div",ma,[l("div",va,[l("div",_a,[B(at)(i.value?.icon)?(r(),A(N,{key:0,shape:"square",size:32,style:{background:"none"}},{default:t(()=>[l("img",{src:i.value?.icon,alt:""},null,8,fa)]),_:1})):(r(),A(ae,{key:1,height:"32px"}))]),l("h4",ga,c(g.value?.name||n.$t("common.name")),1)]),l("div",ha,[e(E,{link:""},{default:t(()=>[e(me,{iconName:"app-magnify",style:pe([{color:a.value.custom_theme?.header_font_color},{"font-size":"20px"}])},null,8,["style"])]),_:1}),e(E,{link:""},{default:t(()=>[e(D,{size:20,class:"color-secondary",style:pe({color:a.value.custom_theme?.header_font_color})},{default:t(()=>[e(ie)]),_:1},8,["style"])]),_:1})])])],4),l("div",null,[l("div",wa,[l("div",ya,[a.value.show_avatar?(r(),z("div",Aa,[i.value.avatar?(r(),A(ne,{key:0,src:i.value.avatar,alt:"",fit:"cover",style:{width:"28px",height:"28px",display:"block"}},null,8,["src"])):(r(),A(ae,{key:1,height:"28px",style:{width:"28px",height:"28px",display:"block"}}))])):j("",!0),l("img",{src:oa,alt:"",width:a.value.show_avatar?a.value.show_user_avatar?"232px":"270px":a.value.show_user_avatar?"260px":"300px"},null,8,ba)]),l("div",ka,[l("img",{src:ia,alt:"",width:a.value.show_user_avatar?a.value.show_avatar?"227px":"255px":a.value.show_avatar?"265px":"292px",style:{"object-fit":"contain"}},null,8,Da),a.value.show_user_avatar?(r(),z("div",$a,[i.value.user_avatar?(r(),A(ne,{key:0,src:i.value.user_avatar,alt:"",fit:"cover",style:{width:"28px",height:"28px",display:"block"}},null,8,["src"])):(r(),A(N,{key:1,size:28},{default:t(()=>[...o[19]||(o[19]=[l("img",{src:lt,style:{width:"50%"},alt:""},null,-1)])]),_:1}))])):j("",!0)])]),l("div",xa,[o[20]||(o[20]=l("img",{src:na,alt:"",class:"w-full"},null,-1)),a.value.disclaimer?(r(),A(G,{key:0,type:"info",class:"mt-8 font-small"},{default:t(()=>[e(se,{content:a.value.disclaimer_value},{default:t(()=>[y(c(a.value.disclaimer_value),1)]),_:1},8,["content"])]),_:1})):j("",!0)])])],4),l("div",Va,[i.value.float_icon?(r(),A(ne,{key:0,src:i.value.float_icon,alt:"",fit:"cover",style:{width:"40px",height:"40px",display:"block"}},null,8,["src"])):(r(),z("img",Ca))])]),e(Z,null,{default:t(()=>[l("div",Oa,[e(le,{ref_key:"displayFormRef",ref:v,model:a.value},{default:t(()=>[e(W,{class:"w-full mb-8"},{default:t(()=>[e(L,{span:12},{default:t(()=>[l("h5",Ia,c(n.$t("views.applicationOverview.SettingDisplayDialog.customThemeColor")),1),l("div",null,[e(I,{modelValue:a.value.custom_theme.theme_color,"onUpdate:modelValue":o[0]||(o[0]=f=>a.value.custom_theme.theme_color=f)},null,8,["modelValue"]),y(" "+c(a.value.custom_theme.theme_color?"":n.$t("views.applicationOverview.SettingDisplayDialog.default")),1)])]),_:1}),e(L,{span:12},{default:t(()=>[l("h5",Sa,c(n.$t("views.applicationOverview.SettingDisplayDialog.headerTitleFontColor")),1),e(I,{modelValue:a.value.custom_theme.header_font_color,"onUpdate:modelValue":o[1]||(o[1]=f=>a.value.custom_theme.header_font_color=f)},null,8,["modelValue"])]),_:1})]),_:1}),e(W,{class:"w-full mb-8"},{default:t(()=>[l("h5",Ua,c(n.$t("layout.language")),1),e(he,{modelValue:a.value.language,"onUpdate:modelValue":o[2]||(o[2]=f=>a.value.language=f),clearable:""},{default:t(()=>[(r(!0),z(ue,null,re(B(je),f=>(r(),A(ve,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(ce,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Ea,[l("span",La,c(n.$t("views.application.title")+" LOGO"),1),l("span",Ta,[e(_e,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(f,q)=>T(f,q,"icon")},{default:t(()=>[e(E,{size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(G,{type:"info",size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1})]),_:1}),e(ce,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Ba,[l("span",Pa,c(n.$t("views.applicationOverview.SettingDisplayDialog.chatBackground")),1),l("span",Ra,[e(_e,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(f,q)=>T(f,q,"chat_background")},{default:t(()=>[e(E,{size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(G,{type:"info",size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.chatBackgroundMessage")),1)]),_:1})]),_:1}),e(ce,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",za,[l("span",Fa,c(n.$t("views.applicationOverview.SettingDisplayDialog.AIAvatar")),1),l("span",Qa,[e(_,{modelValue:a.value.show_avatar,"onUpdate:modelValue":o[3]||(o[3]=f=>a.value.show_avatar=f)},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.display")),1)]),_:1},8,["modelValue"]),e(_e,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(f,q)=>T(f,q,"avatar")},{default:t(()=>[e(E,{size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(G,{type:"info",size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1})]),_:1}),e(ce,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Ma,[l("span",Ka,c(n.$t("views.applicationOverview.SettingDisplayDialog.askUserAvatar")),1),l("span",ja,[e(_,{modelValue:a.value.show_user_avatar,"onUpdate:modelValue":o[4]||(o[4]=f=>a.value.show_user_avatar=f)},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.display")),1)]),_:1},8,["modelValue"]),e(_e,{class:"ml-8",ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(f,q)=>T(f,q,"user_avatar")},{default:t(()=>[e(E,{size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])])]),e(G,{type:"info",size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1})]),_:1}),e(ce,{shadow:"never",class:"mb-8"},{default:t(()=>[l("div",Na,[l("span",Ya,c(n.$t("views.applicationOverview.SettingDisplayDialog.floatIcon")),1),e(_e,{ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,accept:"image/jpeg, image/png, image/gif","on-change":(f,q)=>T(f,q,"float_icon")},{default:t(()=>[e(E,{size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.replace")),1)]),_:1})]),_:1},8,["on-change"])]),e(G,{type:"info",size:"small"},{default:t(()=>[y(c(n.$t("views.applicationOverview.SettingDisplayDialog.imageMessage")),1)]),_:1}),l("div",Xa,[l("div",Ja,[l("span",Ha,c(n.$t("views.applicationOverview.SettingDisplayDialog.iconDefaultPosition")),1),e(_,{modelValue:a.value.draggable,"onUpdate:modelValue":o[5]||(o[5]=f=>a.value.draggable=f),label:n.$t("views.applicationOverview.SettingDisplayDialog.draggablePosition")},null,8,["modelValue","label"])]),e(W,{gutter:8,class:"w-full mb-8"},{default:t(()=>[e(L,{span:12},{default:t(()=>[l("div",qa,[e(he,{modelValue:a.value.float_location.x.type,"onUpdate:modelValue":o[6]||(o[6]=f=>a.value.float_location.x.type=f),style:{width:"80px"}},{default:t(()=>[e(ve,{label:n.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.left"),value:"left"},null,8,["label"]),e(ve,{label:n.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.right"),value:"right"},null,8,["label"])]),_:1},8,["modelValue"]),e(C,{modelValue:a.value.float_location.x.value,"onUpdate:modelValue":o[7]||(o[7]=f=>a.value.float_location.x.value=f),min:0,step:1,precision:0,"value-on-clear":0,"step-strictly":"","controls-position":"right"},null,8,["modelValue"]),o[21]||(o[21]=l("span",{class:"ml-4"},"px",-1))])]),_:1}),e(L,{span:12},{default:t(()=>[l("div",Ga,[e(he,{modelValue:a.value.float_location.y.type,"onUpdate:modelValue":o[8]||(o[8]=f=>a.value.float_location.y.type=f),style:{width:"80px"}},{default:t(()=>[e(ve,{label:n.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.top"),value:"top"},null,8,["label"]),e(ve,{label:n.$t("views.applicationOverview.SettingDisplayDialog.iconPosition.bottom"),value:"bottom"},null,8,["label"])]),_:1},8,["modelValue"]),e(C,{modelValue:a.value.float_location.y.value,"onUpdate:modelValue":o[9]||(o[9]=f=>a.value.float_location.y.value=f),min:0,step:1,precision:0,"value-on-clear":0,"step-strictly":"","controls-position":"right"},null,8,["modelValue"]),o[22]||(o[22]=l("span",{class:"ml-4"},"px",-1))])]),_:1})]),_:1})])]),_:1}),e(Oe,{direction:"vertical",alignment:"start",size:2},{default:t(()=>[e(_,{modelValue:a.value.show_source,"onUpdate:modelValue":o[10]||(o[10]=f=>a.value.show_source=f),label:n.$t("views.applicationOverview.SettingDisplayDialog.showSourceLabel")},null,8,["modelValue","label"]),e(_,{modelValue:a.value.show_exec,"onUpdate:modelValue":o[11]||(o[11]=f=>a.value.show_exec=f),label:n.$t("views.applicationOverview.SettingDisplayDialog.showExecutionDetail")},null,8,["modelValue","label"]),e(_,{modelValue:a.value.show_history,"onUpdate:modelValue":o[12]||(o[12]=f=>a.value.show_history=f),label:n.$t("views.applicationOverview.SettingDisplayDialog.showHistory")},null,8,["modelValue","label"]),e(_,{modelValue:a.value.show_guide,"onUpdate:modelValue":o[13]||(o[13]=f=>a.value.show_guide=f),label:n.$t("views.applicationOverview.SettingDisplayDialog.displayGuide")},null,8,["modelValue","label"]),e(_,{modelValue:a.value.disclaimer,"onUpdate:modelValue":o[14]||(o[14]=f=>a.value.disclaimer=f),label:n.$t("views.applicationOverview.SettingDisplayDialog.disclaimer"),onChange:u},null,8,["modelValue","label"]),a.value.disclaimer?(r(),z("span",Wa,[e(we,{content:a.value.disclaimer_value,placement:"top"},{default:t(()=>[e(J,{modelValue:a.value.disclaimer_value,"onUpdate:modelValue":o[15]||(o[15]=f=>a.value.disclaimer_value=f),style:{width:"422px","margin-bottom":"10px"},onChange:p,maxlength:128},null,8,["modelValue"])]),_:1},8,["content"])])):j("",!0)]),_:1})]),_:1},8,["model"])])]),_:1})])]),_:1},8,["title","modelValue"])}}}),el=["id"],tl=te({__name:"LineCharts",props:{id:{type:String,default:"lineChartId"},width:{type:String,default:"100%"},height:{type:String,default:"200px"},option:{type:Object,required:!0}},setup(P){const m=P,S=["rgba(82, 133, 255, 1)","rgba(255, 207, 47, 1)"],$=["rgba(82, 133, 255, 0.2)","rgba(255, 207, 47, 0.2)"];function x(){let b=Ve(document.getElementById(m.id));b==null&&(b=Ye(document.getElementById(m.id)));const V=[];m.option?.yData?.length&&m.option?.yData.forEach((a,i)=>{V.push({type:"line",itemStyle:{color:S[i]},areaStyle:a.area?{color:$[i]}:null,...a})});const v={title:{text:m.option?.title,textStyle:{fontSize:"16px",color:"#1f2329"}},tooltip:{trigger:"axis",valueFormatter:a=>be(a)},legend:{right:0,itemWidth:8,textStyle:{color:"#646A73"},icon:"circle"},grid:{left:"1%",right:"1%",bottom:"0",top:"18%",containLabel:!0},xAxis:{type:"category",data:m.option.xData},yAxis:{type:"value",splitLine:{lineStyle:{color:"#EFF0F1"}},axisLabel:{formatter:a=>be(a)}},series:V};b.setOption(v,!0)}function U(){Ve(document.getElementById(m.id))?.resize()}return ge(()=>m.option,b=>{b&&Ae(()=>{x()})}),Te(()=>{Ae(()=>{x(),window.addEventListener("resize",U)})}),Ne(()=>{window.removeEventListener("resize",U)}),(b,V)=>(r(),z("div",{id:P.id,ref:"LineChartRef",style:pe({height:P.height,width:P.width})},null,12,el))}}),al=["id"],ll=te({__name:"BarCharts",props:{id:{type:String,default:"barChartId"},width:{type:String,default:"100%"},height:{type:String,default:"200px"},option:{type:Object,required:!0}},setup(P){const m=P,S=["rgba(82, 133, 255, 1)","rgba(255, 207, 47, 1)"],$=["rgba(82, 133, 255, 0.2)","rgba(255, 207, 47, 0.2)"];function x(){let b=Ve(document.getElementById(m.id));b==null&&(b=Ye(document.getElementById(m.id)));const V=[];m.option?.yData?.length&&m.option?.yData.forEach((a,i)=>{V.push({type:"bar",barWidth:"20",itemStyle:{color:S[i]},areaStyle:a.area?{color:$[i]}:null,...a})});const v={title:{text:m.option?.title,textStyle:{fontSize:"16px",color:"#1f2329"}},tooltip:{trigger:"axis",valueFormatter:a=>be(a)},legend:{right:0,itemWidth:8,textStyle:{color:"#646A73"},icon:"circle"},grid:{left:"1%",right:"1%",bottom:"0",top:"18%",containLabel:!0},xAxis:{type:"category",data:m.option.xData},yAxis:{type:"value",splitLine:{lineStyle:{color:"#EFF0F1"}},axisLabel:{formatter:a=>be(a)}},dataZoom:[{type:"inside",show:m.option.dataZoom},{type:"slider",show:m.option.dataZoom}],series:V};b.setOption(v,!0)}function U(){Ve(document.getElementById(m.id))?.resize()}return ge(()=>m.option,b=>{b&&Ae(()=>{x()})}),Te(()=>{Ae(()=>{x(),window.addEventListener("resize",U)})}),Ne(()=>{window.removeEventListener("resize",U)}),(b,V)=>(r(),z("div",{id:P.id,ref:"BarChartRef",style:pe({height:P.height,width:P.width})},null,12,al))}}),ol=te({name:"AppCharts"}),Ee=te({...ol,props:{type:{type:String,default:"line"},height:{type:String,default:"200px"},dataZoom:Boolean,option:{type:Object,required:!0}},setup(P){const m={line:tl,bar:ll};return(S,$)=>(r(),A(Le(m[P.type]),{height:P.height,option:P.option,dataZoom:P.dataZoom,class:"v-charts"},null,8,["height","option","dataZoom"]))}}),il={class:"flex align-center ml-8 mr-8"},nl={class:"ml-12"},sl={class:"color-secondary lighter mb-4"},cl={key:0,class:"flex align-baseline"},ul={key:0,class:"ml-12",style:{color:"#f54a45"}},rl={key:1,class:"flex align-center mr-8"},pl={class:"ml-4"},dl={class:"ml-4"},ml={class:"p-8"},vl={class:"p-8"},_l={key:1},fl={class:"ml-4"},gl={class:"p-8"},hl={key:1},wl={class:"ml-4"},yl=te({__name:"StatisticsCharts",props:{data:{type:Array,default:()=>[]},tokenUsage:{type:Array,default:()=>[]},topQuestions:{type:Array,default:()=>[]}},setup(P){const m=P,S=X(()=>[{id:"customerCharts",name:w("views.applicationOverview.monitor.charts.customerTotal"),icon:"app-user",background:"#EBF1FF",color:"#3370FF",sum:[ye(M(m.data,"customer_num")||0),ye(M(m.data,"customer_added_count")||0)],option:{title:w("views.applicationOverview.monitor.charts.customerTotal"),xData:M(m.data,"day"),yData:[{name:w("views.applicationOverview.monitor.charts.customerTotal"),area:!0,data:M(m.data,"customer_num")},{name:w("views.applicationOverview.monitor.charts.customerNew"),area:!0,data:M(m.data,"customer_added_count")}]}},{id:"chatRecordCharts",name:w("views.applicationOverview.monitor.charts.queryCount"),icon:"app-question",background:"#FFF3E5",color:"#FF8800",sum:[ye(M(m.data,"chat_record_count")||0)],option:{title:w("views.applicationOverview.monitor.charts.queryCount"),xData:M(m.data,"day"),yData:[{data:M(m.data,"chat_record_count")}]}},{id:"tokensCharts",name:w("views.applicationOverview.monitor.charts.tokensTotal"),icon:"app-tokens",background:"#E5FBF8",color:"#00D6B9",sum:[ye(M(m.data,"tokens_num")||0)],option:{title:w("views.applicationOverview.monitor.charts.tokensTotal"),xData:M(m.data,"day"),yData:[{data:M(m.data,"tokens_num")}]}},{id:"starCharts",name:w("views.applicationOverview.monitor.charts.userSatisfaction"),icon:"app-user-stars",background:"#FEEDEC",color:"#F54A45",sum:[ye(M(m.data,"star_num")||0),ye(M(m.data,"trample_num")||0)],option:{title:w("views.applicationOverview.monitor.charts.userSatisfaction"),xData:M(m.data,"day"),yData:[{name:w("views.applicationOverview.monitor.charts.approval"),data:M(m.data,"star_num")},{name:w("views.applicationOverview.monitor.charts.disapproval"),data:M(m.data,"trample_num")}]}}]),$=[{label:"TOP 10",value:10},{label:"TOP 20",value:20},{label:"TOP 50",value:50},{label:"TOP 100",value:100}],x=h(10),U=h(10),b=X(()=>({title:w("views.applicationOverview.monitor.charts.tokenUsage"),xData:M(m.tokenUsage?.slice(0,x.value),"username"),yData:[{data:M(m.tokenUsage?.slice(0,x.value),"token_usage")}],dataZoom:m.tokenUsage.length>20})),V=X(()=>({title:w("views.applicationOverview.monitor.charts.topQuestions"),xData:M(m.topQuestions?.slice(0,U.value),"username"),yData:[{data:M(m.topQuestions?.slice(0,U.value),"chat_record_count")}],dataZoom:m.topQuestions.length>20}));return(v,a)=>{const i=s("appIcon"),O=s("el-avatar"),K=s("AppIcon"),g=s("el-card"),d=s("el-col"),k=s("el-option"),T=s("el-select"),F=s("el-empty"),p=s("el-row");return r(),A(p,{gutter:16},{default:t(()=>[(r(!0),z(ue,null,re(S.value,(u,Q)=>(r(),A(d,{xs:12,sm:12,md:12,lg:6,xl:6,key:Q,class:"mb-16"},{default:t(()=>[e(g,{shadow:"never"},{default:t(()=>[l("div",il,[e(O,{size:40,shape:"square",style:pe({background:u.background})},{default:t(()=>[e(i,{iconName:u.icon,style:pe({fontSize:"24px",color:u.color})},null,8,["iconName","style"])]),_:2},1032,["style"]),l("div",nl,[l("p",sl,c(u.name),1),u.id!=="starCharts"?(r(),z("div",cl,[l("h2",null,c(B(be)(u.sum?.[0])),1),u.sum.length>1?(r(),z("span",ul,"+"+c(B(be)(u.sum?.[1])),1)):j("",!0)])):(r(),z("div",rl,[e(K,{iconName:"app-like-color"}),l("h2",pl,c(u.sum?.[0]),1),e(K,{class:"ml-12",iconName:"app-oppose-color"}),l("h2",dl,c(u.sum?.[1]),1)]))])])]),_:2},1024)]),_:2},1024))),128)),(r(!0),z(ue,null,re(S.value,(u,Q)=>(r(),A(d,{xs:24,sm:24,md:24,lg:12,xl:12,key:Q,class:"mb-16"},{default:t(()=>[e(g,{shadow:"never"},{default:t(()=>[l("div",ml,[e(Ee,{height:"316px",id:u.id,type:"line",option:u.option},null,8,["id","option"])])]),_:2},1024)]),_:2},1024))),128)),e(d,{xs:24,sm:24,md:24,lg:12,xl:12,class:"mb-16"},{default:t(()=>[e(g,{shadow:"never",class:"StatisticsCharts-card"},{default:t(()=>[e(T,{modelValue:x.value,"onUpdate:modelValue":a[0]||(a[0]=u=>x.value=u),class:"top-select"},{default:t(()=>[(r(),z(ue,null,re($,u=>e(k,{key:u.value,label:u.label,value:u.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),l("div",vl,[P.tokenUsage.length>0?(r(),A(Ee,{key:0,height:"316px",id:"tokenUsageCharts",type:"bar",option:b.value},null,8,["option"])):(r(),z("div",_l,[l("h4",fl,c(b.value.title),1),e(F,{description:v.$t("common.noData"),style:{height:"316px"}},null,8,["description"])]))])]),_:1})]),_:1}),e(d,{xs:24,sm:24,md:24,lg:12,xl:12,class:"mb-16"},{default:t(()=>[e(g,{shadow:"never",class:"StatisticsCharts-card"},{default:t(()=>[e(T,{modelValue:U.value,"onUpdate:modelValue":a[1]||(a[1]=u=>U.value=u),class:"top-select"},{default:t(()=>[(r(),z(ue,null,re($,u=>e(k,{key:u.value,label:u.label,value:u.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),l("div",gl,[P.topQuestions.length>0?(r(),A(Ee,{key:0,height:"316px",id:"topQuestionsCharts",type:"bar",option:V.value},null,8,["option"])):(r(),z("div",hl,[l("h4",wl,c(V.value.title),1),e(F,{description:v.$t("common.noData"),style:{height:"316px"}},null,8,["description"])]))])]),_:1})]),_:1})]),_:1})}}}),Al=Ce(yl,[["__scopeId","data-v-faeb479d"]]),bl={class:"p-16"},kl={class:"mb-16 ml-8"},Dl={class:"main-calc-height p-8 pt-0"},$l={class:"title-decoration-1 mb-16"},xl={class:"title flex align-center"},Vl={class:"edit-avatar mr-12"},Cl=["src"],Ol={class:"flex"},Il={class:"mt-4 mb-16 url-height flex align-center",style:{"margin-bottom":"37px"}},Sl={class:"vertical-middle lighter break-all ellipsis-1"},Ul={class:"flex"},El={class:"mt-4 mb-16 url-height"},Ll={class:"flex align-center"},Tl={class:"flex"},Bl={class:"vertical-middle lighter break-all ellipsis-1"},Pl={class:"title-decoration-1 mb-16"},Rl={class:"mb-16"},zl=te({__name:"index",setup(P){const m=ke(),{params:{id:S}}=m,$=X(()=>m.path.includes("resource-management")?"systemManage":"workspace"),x=X(()=>ut.application[$.value]),U=window.location.origin+`${window.MaxKB.chatPrefix}/api-doc/`,b=window.location.origin+`${window.MaxKB.chatPrefix}/api/`,V=h(),v=h(),a=h({}),i=h(null),O=h(!1),K=X(()=>Ue(o.value)?"?"+Ue(o.value):""),g=X(()=>`${window.location.origin}${window.MaxKB.chatPrefix}/`+a.value?.access_token+K.value),d=[{value:7,label:w("views.applicationOverview.monitor.pastDayOptions.past7Days")},{value:30,label:w("views.applicationOverview.monitor.pastDayOptions.past30Days")},{value:90,label:w("views.applicationOverview.monitor.pastDayOptions.past90Days")},{value:183,label:w("views.applicationOverview.monitor.pastDayOptions.past183Days")},{value:"other",label:w("common.custom")}],k=h(7),T=h(""),F=h({start_time:"",end_time:""}),p=h(!1),u=h([]),Q=h([]),n=h([]),o=h([]);function R(_){window.open(_,"_blank")}const D=h(),E=Re(null);function H(){Qe([$e.IS_EE,$e.IS_PE],"OR")?E.value=Me:E.value=la,Ae(()=>{E.value==Me?Y({type:"application",systemType:$.value}).getApplicationSetting(S).then(_=>{D.value?.open(_.data,i.value)}):D.value?.open(a.value,i.value)})}const N=h(),ae=Re(null);function me(){Qe([$e.IS_EE,$e.IS_PE],"OR")?ae.value=ta:ae.value=Xt,Ae(()=>{N.value.open(a.value)})}function ie(_){_!=="other"&&(F.value.start_time=nt(_),F.value.end_time=st,se())}function ne(_){F.value.start_time=_[0],F.value.end_time=_[1],se()}function se(){Y({type:"application",systemType:$.value}).getStatistics(S,F.value,p).then(_=>{u.value=_.data}),Y({type:"application",systemType:$.value}).getTokenUsage(S,F.value,p).then(_=>{Q.value=_.data}),Y({type:"application",systemType:$.value}).topQuestions(S,F.value,p).then(_=>{n.value=_.data})}function G(){Ke(w("views.applicationOverview.appInfo.refreshToken.msgConfirm1"),w("views.applicationOverview.appInfo.refreshToken.msgConfirm2"),{confirmButtonText:w("common.confirm"),cancelButtonText:w("common.cancel")}).then(()=>{const _={access_token_reset:!0},C=w("views.applicationOverview.appInfo.refreshToken.refreshSuccess");L(_,C)}).catch(()=>{})}async function I(_){const C={is_active:!_},J=C.is_active?w("common.status.enableSuccess"):w("common.status.disableSuccess");await L(C,J).then(()=>!0).catch(()=>!1)}async function L(_,C){Y({type:"application",systemType:$.value}).putAccessToken(S,_,O).then(J=>{a.value=J?.data,de(C)})}function W(){V.value.open()}function ve(){v.value.open(a.value?.access_token)}function he(){Y({type:"application",systemType:$.value}).getAccessToken(S,O).then(_=>{a.value=_?.data})}function _e(){Y({type:"application",systemType:$.value}).getApplicationDetail(S,O).then(_=>{i.value=_.data,i.value.work_flow?.nodes?.filter(C=>C.id==="base-node").map(C=>{o.value=C.properties.api_input_field_list?C.properties.api_input_field_list.map(J=>({name:J.variable,value:J.default_value})):C.properties.input_field_list?C.properties.input_field_list.filter(J=>J.assignment_method==="api_input").map(J=>({name:J.variable,value:J.default_value})):[]})})}function ce(){he()}return Te(()=>{_e(),he(),ie(k.value)}),(_,C)=>{const J=s("el-avatar"),we=s("el-text"),Oe=s("el-switch"),le=s("AppIcon"),Z=s("el-button"),De=s("el-tooltip"),f=s("el-col"),q=s("Key"),Xe=s("el-icon"),Je=s("el-row"),Ie=s("el-card"),He=s("el-option"),qe=s("el-select"),Ge=s("el-date-picker"),We=s("el-scrollbar"),Be=ct("loading");return r(),z("div",bl,[l("h2",kl,c(_.$t("views.applicationOverview.title")),1),e(We,null,{default:t(()=>[l("div",Dl,[e(Ie,{style:{"--el-card-padding":"24px"}},{default:t(()=>[l("h4",$l,c(_.$t("common.info")),1),ze((r(),A(Ie,{shadow:"never",class:"overview-card"},{default:t(()=>[l("div",xl,[l("div",Vl,[e(J,{shape:"square",size:32,style:{background:"none"}},{default:t(()=>[l("img",{src:B(Fe)(i.value?.icon,B(Fe)("./favicon.ico")),alt:""},null,8,Cl)]),_:1})]),l("h4",null,c(i.value?.name||"-"),1)]),e(Je,{gutter:12},{default:t(()=>[e(f,{span:12,class:"mt-16"},{default:t(()=>[l("div",Ol,[e(we,{type:"info"},{default:t(()=>[y(c(_.$t("views.applicationOverview.appInfo.publicAccessLink")),1)]),_:1}),e(Oe,{modelValue:a.value.is_active,"onUpdate:modelValue":C[0]||(C[0]=ee=>a.value.is_active=ee),class:"ml-8",size:"small","inline-prompt":"","active-text":_.$t("views.applicationOverview.appInfo.openText"),"inactive-text":_.$t("views.applicationOverview.appInfo.closeText"),"before-change":()=>I(a.value.is_active)},null,8,["modelValue","active-text","inactive-text","before-change"])]),l("div",Il,[l("span",Sl,c(g.value),1),e(De,{effect:"dark",content:_.$t("common.copy"),placement:"top"},{default:t(()=>[e(Z,{type:"primary",text:"",onClick:C[1]||(C[1]=ee=>B(fe)(g.value))},{default:t(()=>[e(le,{iconName:"app-copy"})]),_:1})]),_:1},8,["content"]),e(De,{effect:"dark",content:_.$t("common.refresh"),placement:"top"},{default:t(()=>[e(Z,{onClick:G,type:"primary",text:"",style:{"margin-left":"1px"}},{default:t(()=>[e(le,{iconName:"app-refresh"})]),_:1})]),_:1},8,["content"])]),l("div",null,[a.value?.is_active?(r(),A(Z,{key:0,disabled:!a.value?.is_active,tag:"a",href:g.value,target:"_blank"},{default:t(()=>[e(le,{iconName:"app-create-chat",class:"mr-4"}),y(" "+c(_.$t("views.application.operation.toChat")),1)]),_:1},8,["disabled","href"])):(r(),A(Z,{key:1,disabled:!a.value?.is_active},{default:t(()=>[e(le,{iconName:"app-create-chat",class:"mr-4"}),y(" "+c(_.$t("views.application.operation.toChat")),1)]),_:1},8,["disabled"])),x.value.overview_embed(B(S))?(r(),A(Z,{key:2,disabled:!a.value?.is_active,onClick:ve},{default:t(()=>[e(le,{iconName:"app-export",class:"mr-4"}),y(" "+c(_.$t("views.applicationOverview.appInfo.embedInWebsite")),1)]),_:1},8,["disabled"])):j("",!0),x.value.overview_access(B(S))?(r(),A(Z,{key:3,onClick:me},{default:t(()=>[e(le,{iconName:"app-lock",class:"mr-4"}),y(" "+c(_.$t("views.applicationOverview.appInfo.accessControl")),1)]),_:1})):j("",!0),x.value.overview_display(B(S))?(r(),A(Z,{key:4,onClick:H},{default:t(()=>[e(le,{iconName:"app-setting",class:"mr-4"}),y(" "+c(_.$t("views.applicationOverview.appInfo.displaySetting")),1)]),_:1})):j("",!0)])]),_:1}),e(f,{span:12,class:"mt-16"},{default:t(()=>[l("div",Ul,[e(we,{type:"info"},{default:t(()=>[y(c(_.$t("views.applicationOverview.appInfo.apiAccessCredentials")),1)]),_:1})]),l("div",El,[l("div",null,[e(we,null,{default:t(()=>[y("API "+c(_.$t("common.fileUpload.document"))+":",1)]),_:1}),e(Z,{type:"primary",link:"",onClick:C[2]||(C[2]=ee=>R(U)),class:"vertical-middle lighter break-all"},{default:t(()=>[y(c(U))]),_:1})]),l("div",Ll,[l("span",Tl,[e(we,{style:{width:"80px"}},{default:t(()=>[...C[6]||(C[6]=[y("Base URL:",-1)])]),_:1})]),l("span",Bl,c(b+B(S)),1),e(De,{effect:"dark",content:_.$t("common.copy"),placement:"top"},{default:t(()=>[e(Z,{type:"primary",text:"",onClick:C[3]||(C[3]=ee=>B(fe)(b+B(S)))},{default:t(()=>[e(le,{iconName:"app-copy"})]),_:1})]),_:1},8,["content"])])]),l("div",null,[x.value.overview_api_key(B(S))?(r(),A(Z,{key:0,onClick:W},{default:t(()=>[e(Xe,{class:"mr-4"},{default:t(()=>[e(q)]),_:1}),y(" "+c(_.$t("views.applicationOverview.appInfo.apiKey")),1)]),_:1})):j("",!0)])]),_:1})]),_:1})]),_:1})),[[Be,O.value]])]),_:1}),e(Ie,{style:{"--el-card-padding":"24px"},class:"mt-16"},{default:t(()=>[l("h4",Pl,c(_.$t("views.applicationOverview.monitor.monitoringStatistics")),1),l("div",Rl,[e(qe,{modelValue:k.value,"onUpdate:modelValue":C[4]||(C[4]=ee=>k.value=ee),class:"mr-12 w-180",onChange:ie},{default:t(()=>[(r(),z(ue,null,re(d,ee=>e(He,{key:ee.value,label:ee.label,value:ee.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),k.value==="other"?(r(),A(Ge,{key:0,modelValue:T.value,"onUpdate:modelValue":C[5]||(C[5]=ee=>T.value=ee),type:"daterange","start-placeholder":_.$t("views.applicationOverview.monitor.startDatePlaceholder"),"end-placeholder":_.$t("views.applicationOverview.monitor.endDatePlaceholder"),format:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:ne},null,8,["modelValue","start-placeholder","end-placeholder"])):j("",!0)]),ze((r(),z("div",null,[e(Al,{data:u.value,"token-usage":Q.value,"top-questions":n.value},null,8,["data","token-usage","top-questions"])])),[[Be,p.value]])]),_:1}),C[7]||(C[7]=l("br",null,null,-1))])]),_:1}),e(Et,{ref_key:"EmbedDialogRef",ref:v,data:i.value,"api-input-params":B(Ue)(o.value)},null,8,["data","api-input-params"]),e(jt,{ref_key:"APIKeyDialogRef",ref:V},null,512),(r(),A(Le(ae.value),{ref_key:"LimitDialogRef",ref:N,onRefresh:ce},null,544)),(r(),A(Le(E.value),{ref_key:"DisplaySettingDialogRef",ref:D,onRefresh:ce},null,544))])}}}),Ml=Ce(zl,[["__scopeId","data-v-07055bcf"]]);export{Ml as default};
|