1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[48643],{9720:(e,t,n)=>{n.d(t,{A:()=>et});var l=n(95155),i=n(30794),o=n(3795),a=n(12115),r=n(27456),s=n(73751),d=n(51763),u=n(33433),c=n(9926),m=n(51616),g=n.n(m),x=n(79755),f=n(23740),p=n(43825),h=n(77325),v=n(77039),j=n(50493);let y=(0,a.forwardRef)((e,t)=>{let{t:n}=(0,r.Bd)("setting"),[i,o]=(0,a.useState)(!1),[s,d]=(0,u.j)(e=>[e.installCustomPlugin,e.updateNewCustomPlugin]);return(0,l.jsxs)("div",{onClick:e=>{e.stopPropagation()},children:[(0,l.jsx)(j.A,{onOpenChange:o,onSave:async e=>{await s(e)},onValueChange:d,open:i}),(0,l.jsx)(h.Ay,{icon:(0,l.jsx)(p.default,{icon:v.A}),onClick:()=>{o(!0)},ref:t,children:n("plugin.addTooltip")})]})});var b=n(34719),w=n(91651),A=n(93002),k=n(688),C=n(28968),P=n(6874),S=n.n(P),F=n(69270),B=n(50859),I=n(77079),T=n(19696),V=n(381),z=n(81284),M=n(62525),_=n(44020),E=n(19374),L=n(60859),D=n(59178),N=n(20699);let U=(0,a.memo)(e=>{let{identifier:t}=e,{t:n}=(0,r.Bd)("plugin"),[i,o]=(0,a.useState)(!1),[s,d,c]=(0,u.j)(e=>[e.installCustomPlugin,e.updateNewCustomPlugin,e.uninstallCustomPlugin]),m=(0,u.j)(f.w.getCustomPluginById(t),g());return(0,l.jsxs)("div",{onClick:e=>{e.stopPropagation()},children:[(0,l.jsx)(j.A,{mode:"edit",onDelete:()=>{c(t),o(!1)},onOpenChange:o,onSave:async e=>{await s(e),o(!1)},onValueChange:d,open:i,value:m}),(0,l.jsx)(B.default,{icon:N.A,onClick:()=>{o(!0)},title:n("store.actions.manifest")})]})}),O=(0,a.memo)(e=>{let{identifier:t,type:n}=e,i=(0,d.wo)(e=>e.isMobile),[o,c,m,g]=(0,u.j)(e=>[f.w.isPluginInstalled(t)(e),D.f.isPluginInstallLoading(t)(e),e.installPlugin,e.uninstallPlugin]),{t:x}=(0,r.Bd)("plugin"),[v,j]=(0,a.useState)(!1),y=(0,u.j)(f.w.getToolManifestById(t)),{modal:b}=I.A.useApp(),[w,A]=(0,a.useState)("info"),k=L.V.isSettingSchemaNonEmpty(null==y?void 0:y.settings);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.Flexbox,{align:"center",horizontal:!0,children:o?(0,l.jsxs)(l.Fragment,{children:["customPlugin"===n&&(0,l.jsx)(U,{identifier:t}),k&&(0,l.jsx)(B.default,{icon:V.A,onClick:()=>{j(!0),A("settings")},title:x("store.actions.settings")}),(0,l.jsx)(T.A,{menu:{items:[{icon:(0,l.jsx)(p.default,{icon:z.A}),key:"detail",label:x("store.actions.detail"),onClick:()=>{j(!0),A("info")}},{danger:!0,icon:(0,l.jsx)(p.default,{icon:M.A}),key:"uninstall",label:x("store.actions.uninstall"),onClick:()=>{b.confirm({centered:!0,okButtonProps:{danger:!0},onOk:async()=>g(t),title:x("store.actions.confirmUninstall"),type:"error"})}}]},placement:"bottomRight",trigger:["click"],children:(0,l.jsx)(B.default,{icon:_.A,loading:c})})]}):(0,l.jsx)(h.Ay,{loading:c,onClick:()=>{m(t)},size:i?"small":void 0,type:"primary",children:x("store.actions.install")})}),(0,l.jsx)(E.A,{id:t,onClose:()=>{j(!1)},onTabChange:A,open:v,schema:null==y?void 0:y.settings,tab:w})]})});function W(){let e=(0,b._)(["\n margin: 0 !important;\n font-size: 12px;\n line-height: 1;\n color: ",";\n "]);return W=function(){return e},e}function R(){let e=(0,b._)(["\n overflow: hidden;\n color: ",";\n "]);return R=function(){return e},e}function K(){let e=(0,b._)(["\n margin: 0 !important;\n font-size: 14px;\n font-weight: bold;\n line-height: 1;\n "]);return K=function(){return e},e}let{Paragraph:X}=k.A,q=(0,C.rU)(e=>{let{css:t,token:n}=e;return{desc:t(W(),n.colorTextDescription),link:t(R(),n.colorText),title:t(K())}}),H=(0,a.memo)(e=>{let{identifier:t,homepage:n,author:i,type:o,meta:a={}}=e,{styles:r}=q();return(0,l.jsxs)(s.Flexbox,{align:"center",gap:8,horizontal:!0,justify:"space-between",paddingBlock:12,paddingInline:16,style:{position:"relative"},children:[(0,l.jsxs)(s.Flexbox,{align:"center",flex:1,gap:8,horizontal:!0,style:{overflow:"hidden",position:"relative"},children:[(0,l.jsx)(w.default,{avatar:a.avatar,style:{flex:"none",overflow:"hidden"}}),(0,l.jsxs)(s.Flexbox,{flex:1,gap:4,style:{overflow:"hidden",position:"relative"},children:[(0,l.jsxs)(s.Flexbox,{align:"center",gap:8,horizontal:!0,children:[(0,l.jsx)(A.default,{title:t,children:n?(0,l.jsx)(S(),{className:r.link,href:n,target:"_blank",children:(0,l.jsx)(X,{className:r.title,ellipsis:{rows:1},children:a.title})}):(0,l.jsx)(X,{className:r.title,ellipsis:{rows:1},children:a.title})}),(0,l.jsx)(F.A,{author:i,type:o})]}),(0,l.jsx)(X,{className:r.desc,ellipsis:{rows:1},children:a.description})]})]}),(0,l.jsx)(O,{identifier:t,type:o})]})}),Q=(0,a.memo)(()=>{let{t:e}=(0,r.Bd)("plugin"),[t,n]=(0,a.useState)(),i=(0,d.wo)(e=>e.isMobile),o=(0,u.j)(f.w.installedPluginMetaList,g()),m=(0,a.useMemo)(()=>o.filter(e=>{var n,l,i,o;return[null===(n=e.meta)||void 0===n?void 0:n.title,null===(l=e.meta)||void 0===l?void 0:l.description,e.author,...(null===(i=e.meta)||void 0===i?void 0:i.tags)||[]].filter(
1Boolean).join("").toLowerCase().includes(null===(o=t||"")||void 0===o?void 0:o.toLowerCase())}),[o,t]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.Flexbox,{align:"center",gap:8,horizontal:!0,justify:"space-between",children:[(0,l.jsx)(s.Flexbox,{flex:1,children:(0,l.jsx)(c.default,{allowClear:!0,onChange:e=>n(e.target.value),placeholder:e("store.placeholder"),style:{flex:1,width:"100%"},type:i?"block":"ghost",value:t})}),(0,l.jsx)(y,{})]}),(0,l.jsx)(x.aY,{itemContent:e=>{let t=m[e];return(0,l.jsx)(H,{...t},t.identifier)},overscan:400,style:{height:500,marginInline:-16},totalCount:m.length})]})});var Y=n(36768),G=n(79545),Z=n(19186),J=n(70802);let $=(0,a.memo)(()=>(0,l.jsx)(s.Flexbox,{children:(0,l.jsx)(J.A,{paragraph:{rows:8}})})),ee=(0,a.memo)(()=>{let{t:e}=(0,r.Bd)("plugin"),[t,n]=(0,a.useState)(),i=(0,d.wo)(e=>e.isMobile),o=(0,u.j)(e=>[...f.w.installedCustomPluginMetaList(e),...D.f.onlinePluginStore(e)],g()),{isLoading:m,error:h}=(0,u.j)(e=>e.useFetchPluginStore)(),v=0===o.length,j=(0,a.useMemo)(()=>o.filter(e=>{var n,l,i,o;return[null===(n=e.meta)||void 0===n?void 0:n.title,null===(l=e.meta)||void 0===l?void 0:l.description,e.author,...(null===(i=e.meta)||void 0===i?void 0:i.tags)||[]].filter(Boolean).join("").toLowerCase().includes(null===(o=t||"")||void 0===o?void 0:o.toLowerCase())}),[o,t]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.Flexbox,{align:"center",gap:8,horizontal:!0,justify:"space-between",children:[(0,l.jsx)(s.Flexbox,{flex:1,children:(0,l.jsx)(c.default,{allowClear:!0,onChange:e=>n(e.target.value),placeholder:e("store.placeholder"),type:i?"block":"ghost",value:t})}),(0,l.jsx)(y,{})]}),m?(0,l.jsx)($,{}):v?(0,l.jsx)(Z.default,{gap:12,padding:40,children:h?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.default,{icon:G.A,size:{fontSize:80}}),e("store.networkError")]}):(0,l.jsx)(Y.A,{description:e("store.empty"),image:Y.A.PRESENTED_IMAGE_SIMPLE})}):(0,l.jsx)(x.aY,{itemContent:e=>{let t=j[e];return(0,l.jsx)(H,{...t},t.identifier)},overscan:400,style:{height:500,marginInline:-16},totalCount:j.length})]})}),et=(0,a.memo)(e=>{let{setOpen:t,open:n}=e,{t:a}=(0,r.Bd)("plugin"),c=(0,d.wo)(e=>e.isMobile),[m]=(0,u.j)(e=>[e.listType]);return(0,l.jsx)(i.default,{allowFullscreen:!0,footer:null,onCancel:()=>{t(!1)},open:n,styles:{body:{overflow:"hidden"}},title:a("store.title"),width:800,children:(0,l.jsxs)(s.Flexbox,{gap:c?8:16,style:{maxHeight:c?"-webkit-fill-available":"inherit"},width:"100%",children:[(0,l.jsx)(o.A,{block:!0,onChange:e=>{u.j.setState({listType:e})},options:[{label:a("store.tabs.all"),value:"all"},{label:a("store.tabs.installed"),value:"installed"}],style:{flex:1},value:m}),"all"===m?(0,l.jsx)(ee,{}):(0,l.jsx)(Q,{})]})})})},19374:(e,t,n)=>{n.d(t,{A:()=>T});var l=n(95155),i=n(30794),o=n(86980),a=n(94600),r=n(12115),s=n(27456),d=n(19186),u=n(90134),c=n(39276),m=n(60859),g=n(36768),x=n(1098),f=n(51616),p=n.n(f),h=n(73751),v=n(33433),j=n(23740);let y=(0,r.memo)(e=>{let{id:t}=e,{t:n}=(0,s.Bd)("plugin"),i=(0,v.j)(j.w.getToolManifestById(t),p());return(null==i?void 0:i.api)?(0,l.jsx)(h.Flexbox,{paddingBlock:16,width:"100%",children:(0,l.jsx)(x.A,{bordered:!0,columns:[{dataIndex:"name",render:e=>(0,l.jsx)("code",{children:e}),title:n("detailModal.info.name")},{dataIndex:"description",title:n("detailModal.info.description")}],dataSource:i.api,pagination:!1,rowKey:"name",size:"small",tableLayout:"fixed"})}):(0,l.jsx)(g.A,{})});var b=n(34719),w=n(91651),A=n(3580),k=n(28968),C=n(85854);function P(){let e=(0,b._)(["\n flex: none;\n "]);return P=function(){return e},e}function S(){let e=(0,b._)(["\n color: ",";\n text-align: center;\n "]);return S=function(){return e},e}function F(){let e=(0,b._)(["\n font-size: 20px;\n font-weight: 600;\n text-align: center;\n "]);return F=function(){return e},e}let B=(0,k.rU)(e=>{let{css:t,token:n}=e;return{avatar:t(P()),desc:t(S(),n.colorTextDescription),title:t(F())}}),I=(0,r.memo)(e=>{var t;let{id:n}=e,i=(0,v.j)(j.w.getPluginMetaById(n),p()),{styles:o,theme:a}=B();return(0,l.jsxs)(d.default,{gap:16,children:[(0,l.jsx)(w.default,{animation:!0,avatar:m.V.getPluginAvatar(i),background:a.colorFillTertiary,className:o.avatar,size:100}),(0,l.jsx)("div",{className:o.title,children:m.V.getPluginTitle(i)}),(null==i?void 0:null===(t=i.tags)||void 0===t?void 0:t.length)>0&&(0,l.jsx)(d.default,{gap:6,horizontal:!0,style:{flexWrap:"wrap"},children:m.V.getPluginTags(i).map((e,t)=>(0,l.jsx)(A.default,{style:{margin:0},children:(0,C.A)(e).trim()},t))}),(0,l.jsx)("div",{className:o.desc,children:m.V.getPluginDesc(i)})]})}),T=(0,r.memo)(e=>{let{schema:t,onClose:n,id:r,onTabChange:g,open:x,tab:f}=e,[p,h]=(0,u.A)("info",{onChange:g,value:f}),{t:v}=(0,s.Bd)("plugin"),j=m.V.isSettingSchemaNonEmpty(t);return(0,l.jsx)(i.default,{allowFullscreen:!0,onCancel:n,onOk:()=>{n()}
1,open:x,title:v("detailModal.title"),width:650,children:(0,l.jsxs)(d.default,{gap:8,children:[(0,l.jsx)(I,{id:r}),(0,l.jsx)(a.A,{style:{marginBottom:0,marginTop:8}}),(0,l.jsx)(o.default,{activeKey:p,items:[{key:"info",label:v("detailModal.tabs.info")},j&&{key:"settings",label:v("detailModal.tabs.settings")}].filter(Boolean),onChange:h,variant:"compact"}),"settings"===p?j&&(0,l.jsx)(c.A,{id:r,schema:t}):(0,l.jsx)(y,{id:r})]})})})},23301:(e,t,n)=>{n.d(t,{u:()=>i});var l=n(53384);let i=e=>{let t=l.DEFAULT_MODEL_PROVIDER_LIST.find(t=>t.id===e);return(null==t?void 0:t.name)||e}},39276:(e,t,n)=>{n.d(t,{A:()=>A});var l=n(34719),i=n(95155),o=n(3352),a=n(68132),r=n(50059),s=n(28968),d=n(51616),u=n.n(d),c=n(12115),m=n(33433),g=n(23740),x=n(72070),f=n(64053),p=n(71640),h=n(31506),v=n(13324);let j=(0,c.memo)(e=>{let{type:t,defaultValue:n,enum:l,onChange:o,format:a,minimum:r,maximum:s,props:d}=e;switch(t){case"string":if("password"===a)return(0,i.jsx)(x.A.Password,{...d,autoComplete:"new-password",defaultValue:n,onChange:e=>{o(e.target.value)}});if(l)return(0,i.jsx)(f.A,{defaultValue:n,onChange:o,options:l.map(e=>"string"==typeof e?{label:e,value:e}:e)});return(0,i.jsx)(x.A,{...d,defaultValue:n,onChange:e=>{o(e.target.value)}});case"number":if("number"==typeof r||"number"==typeof s)return(0,i.jsx)(p.A,{defaultValue:n,max:s,min:r,...d});return(0,i.jsx)(h.A,{...d,defaultValue:n,onChange:e=>{o(e)}});case"boolean":return(0,i.jsx)(v.A,{...d,defaultValue:n,onChange:e=>{o(e)}})}});function y(){let e=(0,l._)(["\n p {\n color: ",";\n }\n "]);return y=function(){return e},e}let b=e=>(null==e?void 0:e.properties)?Object.entries(e.properties).map(e=>{let[t,n]=e;return{desc:n.description,enum:n.enum,format:n.format,label:n.title||t,maximum:n.maximum,minimum:n.minimum,name:t,tag:t,type:n.type}}):[],w=(0,s.rU)(e=>{let{css:t,token:n}=e;return{markdown:t(y(),n.colorTextDescription)}}),A=(0,c.memo)(e=>{let{schema:t,id:n}=e,{styles:l}=w(),[s]=(0,m.j)(e=>[e.updatePluginSettings]),d=(0,m.j)(g.w.getPluginSettingsById(n),u()),[x]=r.A.useForm();(0,c.useEffect)(()=>{x.setFieldsValue(d)},[]);let f=b(t);return(0,i.jsx)(o.default,{form:x,layout:"vertical",style:{width:"100%"},children:f.map(e=>(0,i.jsx)(o.default.Item,{desc:e.desc&&(0,i.jsx)(a.default,{className:l.markdown,variant:"chat",children:e.desc}),label:e.label,tag:e.tag,children:(0,i.jsx)(j,{defaultValue:d[e.name],enum:e.enum,format:e.format,maximum:e.maximum,minimum:e.minimum,onChange:t=>{s(n,{[e.name]:t})},type:e.type})},e.label))})})},44467:(e,t,n)=>{n.d(t,{S:()=>a});var l=n(29425),i=n(20425),o=n(33433);let a=()=>{let e=(0,l.o)(i.I.isDBInited),[t]=(0,o.j)(e=>[e.useFetchInstalledPlugins]);return t(e)}},50493:(e,t,n)=>{n.d(t,{A:()=>D});var l=n(95155),i=n(30794),o=n(49366),a=n(43825),r=n(93002),s=n(77079),d=n(50059),u=n(27212),c=n(77325),m=n(3795),g=n(68296),x=n(7814),f=n(12115),p=n(27456),h=n(73751),v=n(19026),j=n(91651),y=n(3352),b=n(6124),w=n(69270),A=n(60859);let k=(0,f.memo)(e=>{var t;let{form:n}=e,{t:i}=(0,p.Bd)("plugin"),o=d.A.useWatch([],n),a=null==o?void 0:null===(t=o.manifest)||void 0===t?void 0:t.meta,r={avatar:(0,l.jsx)(j.default,{avatar:A.V.getPluginAvatar(a),style:{flex:"none"}}),desc:A.V.getPluginDesc(a)||"Plugin Description",label:(0,l.jsxs)(h.Flexbox,{align:"center",gap:8,horizontal:!0,children:[A.V.getPluginTitle(a)||"Plugin Title",(0,l.jsx)(w.A,{type:"customPlugin"})]}),minWidth:void 0};return(0,l.jsx)(b.A,{bodyStyle:{padding:"0 16px"},size:"small",title:i("dev.preview.card"),children:(0,l.jsx)(y.default.Item,{...r,colon:!1,style:{alignItems:"center",marginBottom:0}})})});var C=n(88168),P=n(50859),S=n(37439),F=n(21103),B=n(62332),I=n(32568),T=n(75737),V=n(64849),z=n(55584),M=n(33433),_=n(23740);let E=(0,f.memo)(e=>{let{value:t,onChange:n}=e,{t:i}=(0,p.Bd)("plugin");return(0,l.jsxs)(h.Flexbox,{gap:8,horizontal:!0,onClick:()=>{null==n||n(!t)},style:{cursor:"pointer"},children:[(0,l.jsx)(F.A,{checked:t})," ",i("dev.customParams.useProxy.label")]})}),L=(0,f.memo)(e=>{let{form:t,isEditMode:n}=e,{t:i}=(0,p.Bd)("plugin"),[o,a]=(0,f.useState)(),r=["customParams","manifestUrl"],s=["customParams","useProxy"],u=(0,M.j)(_.w.storeAndInstallPluginsIdList);return(0,l.jsxs)(d.A,{form:t,layout:"vertical",children:[(0,l.jsx)(C.default,{extra:(0,l.jsxs)(h.Flexbox,{horizontal:!0,justify:"space-between",style:{marginTop:8},children:[i("dev.meta.manifest.desc",{appName:V.Se}),o&&(0,l.jsx)(T.A,{manifest:o,children:(0,l.jsx)(P.default,{icon:B.A,size:"small",title:i("dev.meta.manifest.preview")})})]}),hasFeedback:!0,label:i("dev.meta.manifest.label"),name:r,required:!0,rules:[{required:!0},{message:i("error.urlError"),pattern:/^https?:\/\/.*/},{validator:async(e,n)=>{if(!n)return!0;try{let e=t.getFieldValue(s),l=await z.Q.getToolManifest(n,e);a(l),t.setFieldsValue({identifier:l.identifier,manifest:l})}catch(e){throw i("error.".concat(e.message),{error:e.cause})}}},n?{}:{message:i("dev.meta.identifier.errorDuplicate"),validator:async()=>{let e=t.getFieldValue("identifier");if(!e)return!0;
1if(u.includes(e))throw Error("Duplicate")}}],style:{marginBottom:0},children:(0,l.jsx)(S.Input,{placeholder:"http://localhost:3400/manifest-dev.json",suffix:(0,l.jsx)(P.default,{icon:I.A,onClick:e=>{e.stopPropagation(),t.validateFields([r,"identifier"])},size:"small",title:i("dev.meta.manifest.refresh")})})}),(0,l.jsx)(C.default,{name:s,noStyle:!0,children:(0,l.jsx)(E,{})}),(0,l.jsx)(C.default,{name:"identifier",noStyle:!0}),(0,l.jsx)(C.default,{name:"manifest",noStyle:!0})]})}),D=(0,f.memo)(e=>{let{open:t,mode:n="create",value:j,onValueChange:y,onSave:b,onOpenChange:w,onDelete:A}=e,C="edit"===n,[P,S]=(0,f.useState)("url"),{t:F}=(0,p.Bd)("plugin"),{message:B}=s.A.useApp(),[I,T]=(0,f.useState)(!1),{mobile:V}=(0,g.Q)(),[z]=d.A.useForm();(0,f.useEffect)(()=>{z.setFieldsValue(j)},[]);let M=V?{flex:1}:{margin:0},_=(0,l.jsxs)(h.Flexbox,{flex:1,gap:12,horizontal:!0,justify:"flex-end",children:[C?(0,l.jsx)(u.A,{arrow:!1,cancelText:F("cancel",{ns:"common"}),okButtonProps:{danger:!0,type:"primary"},okText:F("ok",{ns:"common"}),onConfirm:()=>{null==A||A(),B.success(F("dev.deleteSuccess"))},placement:"topLeft",title:F("dev.confirmDeleteDevPlugin"),children:(0,l.jsx)(c.Ay,{danger:!0,style:M,children:F("delete",{ns:"common"})})}):null,(0,l.jsx)(c.Ay,{onClick:()=>{w(!1)},style:M,children:F("cancel",{ns:"common"})}),(0,l.jsx)(c.Ay,{loading:I,onClick:()=>{z.submit()},style:M,type:"primary",children:F(C?"dev.update":"dev.save")})]});return(0,l.jsx)(d.A.Provider,{onFormChange:()=>{null==y||y(z.getFieldsValue())},onFormFinish:async(e,t)=>{b&&(T(!0),await (null==b?void 0:b(t.values)),T(!1)),B.success(F(C?"dev.updateSuccess":"dev.saveSuccess")),w(!1)},children:(0,l.jsx)(i.default,{allowFullscreen:!0,footer:_,okText:F("dev.save"),onCancel:e=>{e.stopPropagation(),w(!1)},onOk:e=>{e.stopPropagation(),z.submit()},open:t,title:F(C?"dev.title.edit":"dev.title.create"),children:(0,l.jsxs)(h.Flexbox,{gap:16,onClick:e=>{e.stopPropagation()},children:[(0,l.jsx)(o.default,{message:(0,l.jsxs)(p.x6,{i18nKey:"dev.modalDesc",ns:"plugin",children:["æ·»å èªå®ä¹æä»¶åï¼å¯ç¨äºæä»¶å¼åéªè¯ï¼ä¹å¯ç´æ¥å¨ä¼è¯ä¸ä½¿ç¨ãæä»¶å¼åææ¡£è¯·åèï¼",(0,l.jsx)("a",{href:v.WZ,rel:"noreferrer",style:{paddingInline:8},target:"_blank",children:"ææ¡£"}),(0,l.jsx)(a.default,{icon:x.A})]}),showIcon:!0,type:"info"}),(0,l.jsx)(m.A,{block:!0,onChange:e=>{S(e)},options:[{label:F("dev.manifest.mode.url"),value:"url"},{disabled:!0,label:(0,l.jsx)(r.default,{title:F("dev.manifest.mode.local-tooltip"),children:F("dev.manifest.mode.local")}),value:"local"}]}),"url"===P?(0,l.jsx)(L,{form:z,isEditMode:"edit"===n}):null,(0,l.jsx)(k,{form:z})]})})})})},69270:(e,t,n)=>{n.d(t,{A:()=>v});var l=n(34719),i=n(95155),o=n(3580),a=n(43825),r=n(28968),s=n(37108),d=n(61106),u=n(79772),c=n(64038),m=n(12115),g=n(27456);function x(){let e=(0,l._)(["\n color: ",";\n background: ",";\n\n &:hover {\n color: ",";\n }\n "]);return x=function(){return e},e}function f(){let e=(0,l._)(["\n color: ",";\n background: ",";\n\n &:hover {\n color: ",";\n }\n "]);return f=function(){return e},e}function p(){let e=(0,l._)(["\n color: ",";\n background: ",";\n\n &:hover {\n color: ",";\n }\n "]);return p=function(){return e},e}let h=(0,r.rU)(e=>{let{css:t,token:n}=e;return{community:t(x(),(0,c.B3)(n.colorInfo,.75),n.colorInfoBg,n.colorInfo),custom:t(f(),(0,c.B3)(n.colorWarning,.75),n.colorWarningBg,n.colorWarning),official:t(p(),(0,c.B3)(n.colorSuccess,.75),n.colorSuccessBg,n.colorSuccess)}}),v=(0,m.memo)(e=>{let{showIcon:t=!0,author:n,type:l,showText:r=!0}=e,{t:c}=(0,g.Bd)("plugin"),{styles:m,cx:x}=h(),f="customPlugin"===l,p="LobeHub"===n;return(0,i.jsx)(o.default,{className:x(f?m.custom:p?m.official:m.community),icon:t&&(0,i.jsx)(a.default,{icon:f?s.A:p?d.A:u.A}),children:r&&(n||c(f?"store.customPlugin":"store.communityPlugin"))})})},73780:(e,t,n)=>{n.d(t,{F:()=>p});var l=n(96456),i=n(92053),o=n(48270),a=n(51616),r=n.n(a),s=n(85416),d=n(43063),u=n(17520),c=n(13902),m=n(29425),g=n(69126),x=n(46182),f=n(72705);let p=(e,t)=>{let n;let a=(0,x.k)(f.w0.currentTTS,r()),p=(0,u.o)(c.e.currentAgentTTS,r()),h=(0,m.o)(g.c.currentLanguage),v=(0,u.o)(c.e.currentAgentTTSVoice(h)),j={};switch((null==t?void 0:t.server)||p.ttsService){case"openai":n=l.L,j={api:{headers:(0,s.y)(),serviceUrl:d.S.tts},options:{model:a.openAI.ttsModel,voice:(null==t?void 0:t.voice)||v}};break;case"edge":n=i.p,j={api:{},options:{voice:(null==t?void 0:t.voice)||v}};break;case"microsoft":n=o.A,j={api:{serviceUrl:d.S.microsoft},options:{voice:(null==t?void 0:t.voice)||v}}}return n(e,{...t,...j,onFinish:e=>{var n;null==t||null===(n=t.onUpload)||void 0===n||n.call(t,j.voice||"alloy",e)}})}},85416:(e,t,n)=>{n.d(t,{y:()=>s});var l=n(92043),i=n(15084),o=n(17755),a=n(46182),r=n(54140);let s=e=>{var t;let n=a.k.getState(),s={};return s=l.yh?r.t.getVaultByProvider("openai")(a.k.getState()):i.w.providerKeyVaults("openai")(o.d.getState())||{},{...e,"X-lobe-chat-access-code":r.t.password(n),"X-lobe-user-id":(null===(t=n.user)||void 0===t?void 0:t.id)||"","X-openai-api-key":s.apiKey||"","X-openai-end-point":s.baseURL||""}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.