PageSourceSearch

https://mineru-tianshu.vercel.app/assets/SystemConfig-Cf5q1MVP.js

js mineru-tianshu.vercel.app collected 2026-10-03 07:19:26 UTC 42,618 bytes, 16 lines download raw bytes

1import{d as Je,a as Be,r as c,o as qe,c as l,j as f,b as e,F as $,C as S,t as s,f as m,P as I,w as W,v as g,e as _,k as J,T as B,D as w,i as M,E as me,h as pe,K as ge,y as R,a3 as Ge,O as d,a4 as Qe,m as Xe,a5 as Ye,a6 as Ze,a7 as et,a8 as tt,a9 as st,aa as ot,G as at,ab as q,p as n}from"./index-15etAH_8.js";import{a as se,_ as it,W as nt}from"./KeyWebhookDialog.vue_vue_type_script_setup_true_lang-0bWY-s1t.js";import{_ as lt}from"./PageHeader.vue_vue_type_script_setup_true_lang-D4ct1d5X.js";import{S as rt}from"./send-BLsnald2.js";import{c as oe}from"./createLucideIcon-C71KvFu0.js";import{S as dt}from"./settings-DUgLzsDO.js";import{R as ct}from"./rotate-ccw-C7Q0A6eW.js";import"./LoadingSpinner.vue_vue_type_script_setup_true_lang-DOkBcSyY.js";/**
2 * @license lucide-vue-next v0.546.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ut=oe("file-search",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
7 * @license lucide-vue-next v0.546.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const mt=oe("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
12 * @license lucide-vue-next v0.546.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const pt=oe("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
16],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]),gt={class:"w-full"},yt={key:0,class:"flex flex-col lg:flex-row lg:items-start gap-6"},bt={class:"hidden lg:block w-60 shrink-0"},_t={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm p-3 space-y-2 animate-pulse"},ht={class:"flex-1 min-w-0 space-y-6"},ft={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm px-6 sm:px-8 py-6 animate-pulse"},vt={key:1,class:"flex flex-col lg:flex-row lg:items-start gap-6"},xt={class:"w-full lg:w-60 lg:shrink-0 lg:sticky lg:top-6"},wt={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm p-2"},kt={class:"hidden lg:block px-3 pt-2 pb-1 text-xs font-semibold text-gray-400 uppercase tracking-wider"},Ct={class:"flex lg:flex-col gap-1 overflow-x-auto lg:overflow-visible scrollbar-hide"},$t=["onClick"],St={key:0,class:"hidden lg:block absolute left-0 top-1/2 -translate-y-1/2 h-5 w-[3px] rounded-full bg-primary-600"},Lt={class:"flex-1 min-w-0 w-full"},jt={class:"space-y-6"},Vt={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},Ft={class:"px-6 sm:px-8 py-5 border-b border-gray-100"},At={class:"text-lg font-semibold text-gray-900"},Tt={class:"mt-1 text-sm text-gray-500"},Ut={class:"px-6 sm:px-8 divide-y divide-gray-100"},Dt={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},Et={class:"min-w-0"},Kt={for:"system_name",class:"block text-sm font-medium text-gray-900"},Ot={class:"mt-1 text-sm text-gray-500"},Ht=["placeholder"],Nt={class:"py-5"},Pt={for:"system_logo",class:"block text-sm font-medium text-gray-900"},It={class:"mt-1 text-sm text-gray-500"},Mt={class:"mt-4 space-y-3"},Rt={class:"flex flex-wrap items-center gap-3"},zt=["disabled"],Wt={key:0},Jt={key:1},Bt=["disabled"],qt={class:"block text-xs text-gray-500 mb-1"},Gt=["placeholder"],Qt={key:0},Xt={class:"text-sm text-gray-700 mb-2"},Yt=["src"],Zt={class:"flex items-center justify-between gap-8 py-5"},es={class:"min-w-0"},ts={class:"text-sm font-medium text-gray-900"},ss={class:"mt-1 text-sm text-gray-500"},os={class:"flex items-center justify-between gap-8 py-5"},as={class:"min-w-0"},is={class:"text-sm font-medium text-gray-900"},ns={class:"mt-1 text-sm text-gray-500"},ls={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},rs={class:"min-w-0"},ds={for:"registration_invite_code",class:"block text-sm font-medium text-gray-900"},cs={class:"mt-1 text-sm text-gray-500"},us=["placeholder"],ms={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},ps={class:"px-6 sm:px-8 py-5 border-b border-gray-100"},gs={class:"text-lg font-semibold text-gray-900"},ys={class:"px-6 sm:px-8 py-5"},bs={class:"bg-gray-50 rounded-xl p-4 space-y-2"},_s={class:"flex justify-between"},hs={class:"text-sm text-gray-600"},fs={class:"text-sm font-medium text-gray-900"},vs={class:"flex justify-between"},xs={class:"text-sm text-gray-600"},ws={class:"text-sm font-medium text-gray-900"},ks={class:"flex justify-between"},Cs={class:"text-sm text-gray-600"},$s={class:"text-sm font-medium text-gray-900"},Ss={class:"flex justify-between"},Ls={class:"text-sm text-gray-600"},js={class:"text-sm font-medium text-gray-900"},Vs={key:0,class:"sticky bottom-4 z-20 flex items-center justify-between gap-4 rounded-xl bg-white/90 backdrop-blur border border-gray-200 shadow-lg px-4 py-3"},Fs={class:"text-sm text-gray-600 flex items-center gap-2 min-w-0"},As={class:"flex items-center gap-3 shrink-0"},Ts=["disabled"],Us=["disabled"],Ds={key:0},Es={key:1},Ks={class:"space-y-6"},Os={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},Hs={class:"px-6 sm:px-8 py-5 border-b border-gray-100 flex items-start justify-between gap-4"},Ns={class:"min-w-0"},Ps={class:"text-lg font-semibold text-gray-900"},Is={class:"mt-1 text-sm text-gray-500"},Ms={class:"px-6 sm:px-8 divide-y divide-gray-100"},Rs={class:"flex items-center justify-between gap-8 py-5"},zs={class:"min-w-0"},Ws={class:"text-sm font-medium text-gray-900"},Js={class:"mt-1 text-sm text-gray-500"},Bs={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},qs={class:"min-w-0"},Gs={for:"image_caption_api_base",class:"block text-sm font-medium text-gray-900"},Qs={class:"mt-1 text-sm text-gray-500"},Xs=["placeholder"],Ys={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},Zs={class:"min-w-0"},eo={for:"image_caption_api_key",class:"block text-sm font-medium text-gray-900"},to={class:"mt-1 text-sm text-gray-500"},so=["placeholder"],oo={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},ao={class:"min-w-0"},io={for:"image_caption_model",class:"block text-sm font-medium text-gray-900"},no={class:"mt-1 text-sm text-gray-500"},lo=["placeholder"],ro={class:"py-5"},co={for:"image_caption_prompt",class:"block text-sm font-medium text-gray-900"},uo={class:"mt-1 text-sm text-gray-500"},mo=["placeholder"],po={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},go={class:"min-w-0"},yo={for:"image_caption_max_images",class:"block text-sm font-medium text-gray-900"},bo={class:"mt-1 text-sm text-gray-500"},_o={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},ho={class:"min-w-0"},fo={for:"image_caption_concurrency",class:"block text-sm font-medium text-gray-900"},vo={class:"mt-1 text-sm text-gray-500"},xo={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},wo={class:"min-w-0"},ko={for:"image_caption_timeout",class:"block text-sm font-medium text-gray-900"},Co={class:"mt-1 text-sm text-gray-500"},$o={class:"flex items-center justify-between gap-8 py-5"},So={class:"min-w-0"},Lo={class:"text-sm font-medium text-gray-900"},jo={class:"mt-1 text-sm text-gray-500"},Vo=["disabled"],Fo={key:0},Ao={key:1},To={key:0,class:"sticky bottom-4 z-20 flex items-center justify-between gap-4 roun
16ded-xl bg-white/90 backdrop-blur border border-gray-200 shadow-lg px-4 py-3"},Uo={class:"text-sm text-gray-600 flex items-center gap-2 min-w-0"},Do={class:"flex items-center gap-3 shrink-0"},Eo=["disabled"],Ko=["disabled"],Oo={key:0},Ho={key:1},No={class:"space-y-6"},Po={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},Io={class:"px-6 sm:px-8 py-5 border-b border-gray-100"},Mo={class:"text-lg font-semibold text-gray-900"},Ro={class:"mt-1 text-sm text-gray-500"},zo={class:"px-6 sm:px-8 divide-y divide-gray-100"},Wo={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},Jo={class:"min-w-0"},Bo={for:"webhook_timeout",class:"block text-sm font-medium text-gray-900"},qo={class:"mt-1 text-sm text-gray-500"},Go={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},Qo={class:"min-w-0"},Xo={for:"webhook_max_attempts",class:"block text-sm font-medium text-gray-900"},Yo={class:"mt-1 text-sm text-gray-500"},Zo={key:0,class:"sticky bottom-4 z-20 flex items-center justify-between gap-4 rounded-xl bg-white/90 backdrop-blur border border-gray-200 shadow-lg px-4 py-3"},ea={class:"text-sm text-gray-600 flex items-center gap-2 min-w-0"},ta={class:"flex items-center gap-3 shrink-0"},sa=["disabled"],oa=["disabled"],aa={key:0},ia={key:1},na={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},la={class:"px-6 sm:px-8 py-5 border-b border-gray-100 flex items-center justify-between gap-4"},ra={class:"text-sm font-semibold text-gray-900"},da={class:"mt-1 text-xs text-gray-400"},ca={class:"overflow-x-auto"},ua={class:"bg-white"},ma={key:0},pa={colspan:"6",class:"!border-b-0"},ga={class:"py-8 text-center text-sm text-gray-500"},ya={class:"text-sm text-gray-900"},ba={class:"text-sm text-gray-600"},_a={class:"bg-gray-100 px-1.5 py-0.5 rounded font-mono text-xs"},ha={class:"text-sm text-gray-600"},fa={class:"text-sm"},va=["title"],xa={class:"text-sm"},wa=["onClick"],ka={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},Ca={class:"px-6 sm:px-8 py-5 border-b border-gray-100 flex items-center justify-between gap-4"},$a={class:"text-sm font-semibold text-gray-900"},Sa={class:"overflow-x-auto"},La={class:"bg-white"},ja={key:0},Va={colspan:"8",class:"!border-b-0"},Fa={class:"flex flex-col items-center py-10"},Aa={class:"text-sm text-gray-500"},Ta={class:"text-sm text-gray-600 whitespace-nowrap"},Ua={class:"text-sm text-gray-900 whitespace-nowrap"},Da={class:"text-sm whitespace-nowrap"},Ea={class:"text-sm text-gray-600"},Ka=["title"],Oa={class:"text-sm"},Ha={class:"text-sm text-gray-600"},Na=["title"],Pa={class:"space-y-6"},Ia={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},Ma={class:"px-6 sm:px-8 py-5 border-b border-gray-100"},Ra={class:"text-lg font-semibold text-gray-900"},za={class:"mt-1 text-sm text-gray-500"},Wa={class:"px-6 sm:px-8 divide-y divide-gray-100"},Ja={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 sm:gap-8 py-5"},Ba={class:"min-w-0"},qa={for:"task_max_retries",class:"block text-sm font-medium text-gray-900"},Ga={class:"mt-1 text-sm text-gray-500"},Qa=["max"],Xa={key:0,class:"sticky bottom-4 z-20 flex items-center justify-between gap-4 rounded-xl bg-white/90 backdrop-blur border border-gray-200 shadow-lg px-4 py-3"},Ya={class:"text-sm text-gray-600 flex items-center gap-2 min-w-0"},Za={class:"flex items-center gap-3 shrink-0"},ei=["disabled"],ti=["disabled"],si={key:0},oi={key:1},ai={class:"space-y-6"},ii={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm"},ni={class:"px-6 sm:px-8 py-5 border-b border-gray-100"},li={class:"text-lg font-semibold text-gray-900"},ri={class:"mt-1 text-sm text-gray-500"},di={class:"px-6 sm:px-8 py-5"},ci={class:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-4"},ui={class:"block text-sm font-medium text-gray-700 mb-1"},mi={value:""},pi=["value"],gi={class:"block text-sm font-medium text-gray-700 mb-1"},yi={value:""},bi={value:"success"},_i={value:"failure"},hi={value:"denied"},fi={class:"block text-sm font-medium text-gray-700 mb-1"},vi={class:"block text-sm font-medium text-gray-700 mb-1"},xi={class:"flex justify-end gap-3 mb-4"},wi={class:"overflow-x-auto"},ki={class:"bg-white"},Ci={key:0},$i={colspan:"7",class:"!border-b-0"},Si={class:"flex flex-col items-center py-10"},Li={class:"text-sm text-gray-500"},ji={class:"text-sm text-gray-600 whitespace-nowrap"},Vi={class:"text-sm text-gray-900"},Fi={class:"text-sm whitespace-nowrap"},Ai={class:"text-sm text-gray-600"},Ti=["title"],Ui={class:"text-sm"},Di={class:"text-sm text-gray-600"},Ei={class:"flex items-center justify-between mt-4"},Ki={class:"text-sm text-gray-600"},Oi={class:"flex items-center gap-3"},Hi={class:"text-sm text-gray-500"},Ni=["disabled"],Pi=["disabled"],ye=50,Qi=Je({__name:"SystemConfig",setup(Ii){const{t:i,tm:ae}=Be(),G=c(!0),T=c(!1),U=c(!1),v=c("basic"),be=[{key:"basic",icon:dt,labelKey:"systemConfig.nav.basic",descKey:"systemConfig.nav.basicDesc"},{key:"imageCaption",icon:pt,labelKey:"systemConfig.nav.imageCaption",descKey:"systemConfig.nav.imageCaptionDesc"}
16,{key:"webhook",icon:nt,labelKey:"systemConfig.nav.webhook",descKey:"systemConfig.nav.webhookDesc"},{key:"taskConfig",icon:ct,labelKey:"systemConfig.nav.taskConfig",descKey:"systemConfig.nav.taskConfigDesc"},{key:"auditLog",icon:mt,labelKey:"systemConfig.nav.auditLog",descKey:"systemConfig.nav.auditLogDesc"}],y=c({system_name:"MinerU Tianshu",system_logo:"",show_github_star:!0,allow_registration:!0,registration_invite_code:""}),r=c({system_name:"MinerU Tianshu",system_logo:"",show_github_star:!0,allow_registration:!0,registration_invite_code:""}),z=c(null),k=c(""),L=c(!1),D=c(!1),h=c({enabled:!1,api_base:"",api_key:"",model:"",prompt:"",max_images:20,concurrency:4,timeout:60}),u=c({...h.value}),_e=R(()=>JSON.stringify(r.value)!==JSON.stringify(y.value)),he=R(()=>JSON.stringify(u.value)!==JSON.stringify(h.value)),fe=R(()=>JSON.stringify(x.value)!==JSON.stringify(V.value));function ve(){u.value={...h.value}}function xe(){x.value={...V.value}}async function we(){try{const t=await Ge();h.value={...t.config},u.value={...t.config}}catch(t){console.error("Failed to load image caption config:",t),d.error(i("imageCaption.loadError"))}}async function ie(){try{L.value=!0;const t=u.value,a=h.value,o={};if(t.enabled!==a.enabled&&(o.image_caption_enabled=t.enabled),t.api_base!==a.api_base&&(o.image_caption_api_base=t.api_base),t.api_key!==a.api_key&&(o.image_caption_api_key=t.api_key),t.model!==a.model&&(o.image_caption_model=t.model),t.prompt!==a.prompt&&(o.image_caption_prompt=t.prompt),t.max_images!==a.max_images&&(o.image_caption_max_images=t.max_images),t.concurrency!==a.concurrency&&(o.image_caption_concurrency=t.concurrency),t.timeout!==a.timeout&&(o.image_caption_timeout=t.timeout),Object.keys(o).length===0){d.success(i("imageCaption.noChanges"));return}await q(o),h.value={...t},d.success(i("imageCaption.saveSuccess"))}catch(t){console.error("Failed to update image caption config:",t),d.error(t.response?.data?.detail||i("imageCaption.saveError"))}finally{L.value=!1}}async function ke(){try{D.value=!0;const t=await Qe({api_base:u.value.api_base,api_key:u.value.api_key,model:u.value.model,timeout:u.value.timeout});t.success?d.success(t.message||i("imageCaption.testSuccess",{latency:t.latency_ms})):d.error(t.message||i("imageCaption.testFailed"))}catch(t){console.error("Failed to test image caption connection:",t),d.error(t.response?.data?.detail||i("imageCaption.testError"))}finally{D.value=!1}}async function Ce(){try{G.value=!0;const t=await Xe();y.value={...t.config},r.value={...t.config},k.value=t.config.system_logo}catch(t){console.error("Failed to load system config:",t),d.error(i("systemConfig.loadError"))}finally{G.value=!1}}function $e(){z.value?.click()}async function Se(t){const a=t.target,o=a.files?.[0];if(!o)return;if(!["image/png","image/jpeg","image/jpg","image/svg+xml","image/gif","image/webp"].includes(o.type)){d.error(i("systemConfig.invalidFileType"));return}if(o.size>5*1024*1024){d.error(i("systemConfig.fileTooLarge"));return}try{U.value=!0;const b=await Ye(o);r.value.system_logo=b.logo_url,k.value=b.logo_url,d.success(i("systemConfig.uploadSuccess"))}catch(b){console.error("Failed to upload logo:",b),d.error(b.response?.data?.detail||i("systemConfig.uploadError"))}finally{U.value=!1,a&&(a.value="")}}function Le(){r.value.system_logo="",k.value="",z.value&&(z.value.value="")}async function ne(){try{T.value=!0;const t={};if(r.value.system_name!==y.value.system_name&&(t.system_name=r.value.system_name),r.value.system_logo!==y.value.system_logo&&(t.system_logo=r.value.system_logo),r.value.show_github_star!==y.value.show_github_star&&(t.show_github_star=r.value.show_github_star),r.value.allow_registration!==y.value.allow_registration&&(t.allow_registration=r.value.allow_registration),r.value.registration_invite_code!==y.value.registration_invite_code&&r.value.registration_invite_code!=="********"&&(t.registration_invite_code=r.value.registration_invite_code??""),Object.keys(t).length===0){d.success(i("systemConfig.noChanges"));return}const a=await q(t);y.value={...a.config},r.value={...a.config},k.value=a.config.system_logo,d.success(i("systemConfig.saveSuccess")),setTimeout(()=>{window.location.reload()},1500)}catch(t){console.error("Failed to update system config:",t),d.error(t.response?.data?.detail||i("systemConfig.saveError"))}finally{T.value=!1}}function je(){r.value={...y.value},k.value=y.value.system_logo}function Ve(t){const a=t.target;a.style.display="none",d.error(i("systemConfig.logoLoadError"))}const Fe=["auth.login","auth.login_failed","auth.logout","auth.register","auth.change_password","api_key.create","api_key.delete","api_key.webhook_update","config.update","task.delete","task.clear_failed","task.clear_cache","admin.cleanup","admin.reset_stale"],Q=c([]),X=c(0),j=c(1),le=R(()=>Math.max(1,Math.ceil(X.value/ye))),p=c({action:"",result:"",start:"",end:""});async function E(t){try{const a={page:t,page_size:ye};p.value.action&&(a.action=p.value.action),p.value.result&&(a.result=p.value.result),p.value.start&&(a.start=`${p.value.start} 00:00:00`),p.value.end&&(a.end=`${p.value.end} 23:59:59`);const o=await Ze(a);Q.value=o.data.items,X.value=o.data.total,j.value=o.data.page}catch(a){console.error("Failed to load audit logs:",a),d.error(i("auditLog.loadError"))}}function Ae(){p.value={action:"",result:"",start:"",end:""},E(1)}function re(t){return ae("auditLog.actions")[t]||t}function Te(t){const a=t.split(".")[0];return{auth:"bg-blue-100 text-blue-700",api_key:"bg-purple-100 text-purple-700",config:"bg-amber-100 text-amber-700",task:"bg-indigo-100 text-indigo-700",admin:"bg-rose-100 text-rose-700"}[a]||"bg-gray-100 text-gray-600"}function Ue(t){if(!t)return{};try{const a=JSON.parse(t);return a&&typeof a=="object"?a:{}}catch{return{}}}function De(t){const a=Ue(t.detail);if(Object.keys(a).length===0)return"-";const o={};a.file_name&&(o.fileName=String(a.file_name)),a.username&&(o.username=String(a.username)),a.name&&(o.name=String(a.name)),Array.isArray(a.scopes)&&(o.scopes=a.scopes.join(", ")),Array.isArray(a.keys)&&(o.keys=a.keys.join(", ")),a.deleted_count!==void 0&&(o.count=String(a.deleted_count)),a.reset_count!==void 0&&(o.count=String(a.reset_count)),a.days!==void 0&&(o.days=String(a.days)),a.timeout_minutes!==void 0&&(o.minutes=String(a.timeout_minutes)),a.reason==="account_disabled"&&(o.reason=i("auditLog.reasonAccountDisabled")),a.enabled!==void 0&&(o.enabled=a.enabled?i("auditLog.stateEnabled"):i("auditLog.stateDisabled")),a.url!==void 0&&(o.url=String(a.url||"-"));const b=ae("auditLog.details")[t.action];return b?b.replace(/\{(\w+)\}/g,(te,A)=>o[A]??(A==="reason"?"":te)):Object.entries(a).map(([te,A])=>`${te}: ${Array.isArray(A)?A.join(", "):A}`).join(";")}function Ee(t){if(!t.resource_type)return"-";const a=`auditLog.resources.${t.resource_type}`,o=i(a),C=o===a?t.resource_type:o;if(!t.resource_id)return C;const b=t.resource_id;return b.length>12?`${C} ${b.slice(0,8)}…`:`${C} ${b}`}function Ke(t){return t==="success"?i("auditLog.success"):t==="failure"?i("auditLog.failure"):t==="denied"?i("auditLog.denied"):t}function Oe(t){return t==="success"?"bg-green-100 text-green-700":t==="failure"?"bg-red-100 text-red-700":t==="denied"?"bg-orange-100 text-orange-700":"bg-gray-100 text-gray-600"}const K=c(!1),V=c({timeout:10,max_attempts:8}),x=c({...V.value}),Y=c([]);async function He(){try{const t=await et();V.value={...t.config},x.value={...t.config}}catch(t){console.error("Failed to load webhook config:",t),d.error(i("webhook.loadError"))}}async function de(){try{K.value=!0;const t=x.value,a=V.value,o={};if(t.timeout!==a.timeout&&(o.webhook_timeout=t.timeout),t.max_attempts!==a.max_attempts&&(o.webhook_max_attempts=t.max_attempts),Object.keys(o).length===0){d.success(i("webhook.noChanges"));return}await q(o),V.value={...t},d.success(i("webhook.saveSuccess"))}catch(t){console.error("Failed to update webhook config:",t),d.error(t.response?.data?.detail||i("webhook.saveError"))}finally{K.value=!1}}async function ce(){try{const t=await tt({page:1,page_size:20});Y.value=t.data.items}catch(t){console.error("Failed to load webhook deliveries:",t),d.error(i("webhook.deliveriesLoadError"))}}function Ne(t){return{delivered:i("webhook.statusDelivered"),pending:i("webhook.statusPending"),failed:i("webhook.statusFailed"),dead:i("webhook.statusDead")}[t]||t}function Pe(t){return t==="delivered"?"bg-green-100 text-green-700":t==="failed"?"bg-red-100 text-red-700":t==="dead"?"bg-gray-100 text-gray-600":"bg-yellow-100 text-yellow-700"}const O=c(!1),H=c(10),N=c({max_retries:2}),F=c({...N.value}),Ie=R(()=>JSON.stringify(F.value)!==JSON.stringify(N.value));function Me(){F.value={...N.value}}async function Re(){try{const t=await st(),{max_retries:a,max_retries_limit:o}=t.config;H.value=o,N.value={max_retries:a},F.value={max_retries:a}}catch(t){console.error("Failed to load task config:",t),d.error(i("taskConfig.loadError"))}}async function ue(){const t=F.value.max_retries;if(!Number.isInteger(t)||t<0||t>
16H.value){d.error(i("taskConfig.invalid",{max:H.value}));return}try{O.value=!0,await q({task_max_retries:t}),N.value={max_retries:t},d.success(i("taskConfig.saveSuccess"))}catch(a){console.error("Failed to update task config:",a),d.error(a.response?.data?.detail||i("taskConfig.saveError"))}finally{O.value=!1}}const Z=c([]),P=c(null);async function ee(){try{const t=await ot();Z.value=t.api_keys||[]}catch(t){console.error("Failed to load api keys:",t),d.error(i("webhook.endpointsLoadError"))}}function ze(t){return{task:i("webhook.sourceTask"),api_key:i("webhook.sourceApiKey"),global:i("webhook.sourceGlobal")}[t]||t}function We(t){return t==="api_key"?"bg-indigo-100 text-indigo-700":t==="task"?"bg-sky-100 text-sky-700":"bg-gray-100 text-gray-600"}return qe(()=>{Ce(),we(),He(),Re(),ce(),ee(),E(1)}),(t,a)=>(n(),l("div",gt,[f(lt,{title:t.$t("systemConfig.title"),description:t.$t("systemConfig.description")},null,8,["title","description"]),G.value?(n(),l("div",yt,[e("div",bt,[e("div",_t,[(n(),l($,null,S(4,o=>e("div",{key:o,class:"h-10 bg-gray-100 rounded-lg"})),64))])]),e("div",ht,[e("div",ft,[a[25]||(a[25]=e("div",{class:"h-5 w-40 bg-gray-200 rounded mb-2"},null,-1)),a[26]||(a[26]=e("div",{class:"h-4 w-64 bg-gray-100 rounded mb-6"},null,-1)),(n(),l($,null,S(4,o=>e("div",{key:o,class:"flex items-center justify-between py-5 border-t border-gray-100"},[...a[24]||(a[24]=[e("div",{class:"space-y-2"},[e("div",{class:"h-4 w-32 bg-gray-200 rounded"}),e("div",{class:"h-3 w-52 bg-gray-100 rounded"})],-1),e("div",{class:"h-10 w-72 bg-gray-100 rounded-xl"},null,-1)])])),64))])])])):(n(),l("div",vt,[e("aside",xt,[e("nav",wt,[e("p",kt,s(t.$t("systemConfig.navTitle")),1),e("div",Ct,[(n(),l($,null,S(be,o=>e("button",{key:o.key,type:"button",onClick:C=>v.value=o.key,class:w(["relative flex items-center gap-2.5 px-3 py-2.5 rounded-lg text-sm whitespace-nowrap transition-colors duration-200 focus:outline-none",v.value===o.key?"bg-primary-50 text-primary-700 font-semibold":"text-gray-600 hover:bg-gray-50 hover:text-gray-900"])},[v.value===o.key?(n(),l("span",St)):_("",!0),(n(),me(at(o.icon),{class:"w-4 h-4 shrink-0"})),e("span",null,s(t.$t(o.labelKey)),1)],10,$t)),64))])])]),e("div",Lt,[m(e("div",jt,[e("section",Vt,[e("header",Ft,[e("h2",At,s(t.$t("systemConfig.nav.basic")),1),e("p",Tt,s(t.$t("systemConfig.nav.basicDesc")),1)]),e("form",{onSubmit:W(ne,["prevent"])},[e("div",Ut,[e("div",Dt,[e("div",Et,[e("label",Kt,s(t.$t("systemConfig.systemName")),1),e("p",Ot,s(t.$t("systemConfig.systemNameHelp")),1)]),m(e("input",{id:"system_name","onUpdate:modelValue":a[0]||(a[0]=o=>r.value.system_name=o),type:"text",required:"",class:"w-full sm:w-72 shrink-0 px-4 py-2",placeholder:t.$t("systemConfig.systemNamePlaceholder")},null,8,Ht),[[g,r.value.system_name]])]),e("div",Nt,[e("label",Pt,s(t.$t("systemConfig.systemLogo")),1),e("p",It,s(t.$t("systemConfig.systemLogoHelp")),1),e("div",Mt,[e("input",{ref_key:"logoFileInput",ref:z,type:"file",accept:"image/png,image/jpeg,image/jpg,image/svg+xml,image/gif,image/webp",class:"hidden",onChange:Se},null,544),e("div",Rt,[e("button",{type:"button",onClick:$e,disabled:U.value,class:"btn btn-primary disabled:opacity-50 disabled:cursor-not-allowed"},[U.value?(n(),l("span",Wt,s(t.$t("systemConfig.uploading")),1)):(n(),l("span",Jt,s(t.$t("systemConfig.uploadLogo")),1))],8,zt),r.value.system_logo?(n(),l("button",{key:0,type:"button",onClick:Le,disabled:U.value,class:"btn btn-secondary disabled:opacity-50 disabled:cursor-not-allowed"},s(t.$t("systemConfig.clearLogo")),9,Bt)):_("",!0)]),e("div",null,[e("label",qt,s(t.$t("systemConfig.orEnterUrl")),1),m(e("input",{id:"system_logo","onUpdate:modelValue":a[1]||(a[1]=o=>r.value.system_logo=o),type:"url",class:"w-full sm:max-w-md px-4 py-2",placeholder:t.$t("systemConfig.systemLogoPlaceholder")},null,8,Gt),[[g,r.value.system_logo]])]),k.value?(n(),l("div",Qt,[e("p",Xt,s(t.$t("systemConfig.logoPreview")),1),e("img",{src:k.value,alt:"Logo Preview",class:"h-16 object-contain border border-gray-200 rounded-lg p-2",onError:Ve},null,40,Yt)])):_("",!0)])]),e("div",Zt,[e("div",es,[e("p",ts,s(t.$t("systemConfig.showGithubStar")),1),e("p",ss,s(t.$t("systemConfig.showGithubStarHelp")),1)]),f(se,{modelValue:r.value.show_github_star,"onUpdate:modelValue":a[2]||(a[2]=o=>r.value.show_github_star=o)},null,8,["modelValue"])]),e("div",os,[e("div",as,[e("p",is,s(t.$t("systemConfig.allowRegistration")),1),e("p",ns,s(t.$t("systemConfig.allowRegistrationHelp")),1)]),f(se,{modelValue:r.value.allow_registration,"onUpdate:modelValue":a[3]||(a[3]=o=>r.value.allow_registration=o)},null,8,["modelValue"])]),e("div",ls,[e("div",rs,[e("label",ds,s(t.$t("systemConfig.invite
16Code")),1),e("p",cs,s(t.$t("systemConfig.inviteCodeHelp")),1)]),m(e("input",{id:"registration_invite_code","onUpdate:modelValue":a[4]||(a[4]=o=>r.value.registration_invite_code=o),type:"text",class:"w-full sm:w-72 shrink-0 px-4 py-2",placeholder:t.$t("systemConfig.inviteCodePlaceholder")},null,8,us),[[g,r.value.registration_invite_code]])])])],32)]),e("section",ms,[e("header",ps,[e("h2",gs,s(t.$t("systemConfig.currentConfig")),1)]),e("div",ys,[e("div",bs,[e("div",_s,[e("span",hs,s(t.$t("systemConfig.systemName"))+":",1),e("span",fs,s(y.value.system_name),1)]),e("div",vs,[e("span",xs,s(t.$t("systemConfig.systemLogo"))+":",1),e("span",ws,s(y.value.system_logo||t.$t("systemConfig.default")),1)]),e("div",ks,[e("span",Cs,s(t.$t("systemConfig.showGithubStar"))+":",1),e("span",$s,s(y.value.show_github_star?t.$t("common.yes"):t.$t("common.no")),1)]),e("div",Ss,[e("span",Ls,s(t.$t("systemConfig.allowRegistration"))+":",1),e("span",js,s(y.value.allow_registration?t.$t("common.yes"):t.$t("common.no")),1)])])])]),f(B,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-3","leave-active-class":"transition-all duration-150 ease-in","leave-to-class":"opacity-0 translate-y-3"},{default:J(()=>[_e.value?(n(),l("div",Vs,[e("p",Fs,[a[27]||(a[27]=e("span",{class:"w-2 h-2 rounded-full bg-amber-500 shrink-0"},null,-1)),M(" "+s(t.$t("systemConfig.unsavedChanges")),1)]),e("div",As,[e("button",{type:"button",onClick:je,disabled:T.value,class:"btn btn-secondary !px-4 !py-1.5 text-sm"},s(t.$t("systemConfig.reset")),9,Ts),e("button",{type:"button",onClick:ne,disabled:T.value,class:"btn btn-primary !px-4 !py-1.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"},[T.value?(n(),l("span",Ds,s(t.$t("systemConfig.saving")),1)):(n(),l("span",Es,s(t.$t("systemConfig.saveChanges")),1))],8,Us)])])):_("",!0)]),_:1})],512),[[I,v.value==="basic"]]),m(e("div",Ks,[e("section",Os,[e("header",Hs,[e("div",Ns,[e("h2",Ps,s(t.$t("imageCaption.title")),1),e("p",Is,s(t.$t("imageCaption.description")),1)]),e("span",{class:w(["badge shrink-0",h.value.enabled?"bg-green-100 text-green-700":"bg-gray-100 text-gray-500"])},[e("span",{class:w(["w-1.5 h-1.5 rounded-full mr-1.5",h.value.enabled?"bg-green-500":"bg-gray-400"])},null,2),M(" "+s(h.value.enabled?t.$t("common.enabled"):t.$t("common.disabled")),1)],2)]),e("form",{onSubmit:W(ie,["prevent"])},[e("div",Ms,[e("div",Rs,[e("div",zs,[e("p",Ws,s(t.$t("imageCaption.enabled")),1),e("p",Js,s(t.$t("imageCaption.enabledHelp")),1)]),f(se,{modelValue:u.value.enabled,"onUpdate:modelValue":a[5]||(a[5]=o=>u.value.enabled=o)},null,8,["modelValue"])]),e("div",Bs,[e("div",qs,[e("label",Gs,s(t.$t("imageCaption.apiBase")),1),e("p",Qs,s(t.$t("imageCaption.apiBaseHelp")),1)]),m(e("input",{id:"image_caption_api_base","onUpdate:modelValue":a[6]||(a[6]=o=>u.value.api_base=o),type:"text",class:"w-full sm:w-72 shrink-0 px-4 py-2",placeholder:t.$t("imageCaption.apiBasePlaceholder")},null,8,Xs),[[g,u.value.api_base]])]),e("div",Ys,[e("div",Zs,[e("label",eo,s(t.$t("imageCaption.apiKey")),1),e("p",to,s(t.$t("imageCaption.apiKeyHelp")),1)]),m(e("input",{id:"image_caption_api_key","onUpdate:modelValue":a[7]||(a[7]=o=>u.value.api_key=o),type:"password",autocomplete:"new-password",class:"w-full sm:w-72 shrink-0 px-4 py-2",placeholder:h.value.api_key==="********"?t.$t("imageCaption.apiKeyPlaceholder"):t.$t("imageCaption.apiKeyNotSet")},null,8,so),[[g,u.value.api_key]])]),e("div",oo,[e("div",ao,[e("label",io,s(t.$t("imageCaption.model")),1),e("p",no,s(t.$t("imageCaption.modelHelp")),1)]),m(e("input",{id:"image_caption_model","onUpdate:modelValue":a[8]||(a[8]=o=>u.value.model=o),type:"text",class:"w-full sm:w-72 shrink-0 px-4 py-2",placeholder:t.$t("imageCaption.modelPlaceholder")},null,8,lo),[[g,u.value.model]])]),e("div",ro,[e("label",co,s(t.$t("imageCaption.prompt")),1),e("p",uo,s(t.$t("imageCaption.promptHelp")),1),m(e("textarea",{id:"image_caption_prompt","onUpdate:modelValue":a[9]||(a[9]=o=>u.value.prompt=o),rows:"3",class:"mt-3 w-full max-w-3xl px-4 py-2",placeholder:t.$t("imageCaption.promptPlaceholder")},null,8,mo),[[g,u.value.prompt]])]),e("div",po,[e("div",go,[e("label",yo,s(t.$t("imageCaption.maxImages")),1),e("p",bo,s(t.$t("imageCaption.maxImagesHelp")),1)]),m(e("input",{id:"image_caption_max_images","onUpdate:modelValue":a[10]||(a[10]=o=>u.value.max_images=o),type:"number",min:"1",class:"w-full sm:w-28 shrink-0 px-4 py-2"},null,512),[[g,u.value.max_images,void 0,{number:!0}]])]),e("div",_o,[e("div",ho,[e("label",fo,s(t.$t("imageCaption.concurrency")),1),e("p",vo,s(t.$t("imageCaption.concurrencyHelp")),1)]),m(e("input",{id:"image_caption_concurrency","onUpdate:modelValue":a[11]||(a[11]=o=>u.value.concurrency=o),type:"number",min:"1",class:"w-full sm:w-28 shrink-0 px-4 py-2"},null,512),[[g,u.value.concurrency,void 0,{number:!0}
16]])]),e("div",xo,[e("div",wo,[e("label",ko,s(t.$t("imageCaption.timeout")),1),e("p",Co,s(t.$t("imageCaption.timeoutHelp")),1)]),m(e("input",{id:"image_caption_timeout","onUpdate:modelValue":a[12]||(a[12]=o=>u.value.timeout=o),type:"number",min:"1",class:"w-full sm:w-28 shrink-0 px-4 py-2"},null,512),[[g,u.value.timeout,void 0,{number:!0}]])]),e("div",$o,[e("div",So,[e("p",Lo,s(t.$t("imageCaption.testConnection")),1),e("p",jo,s(t.$t("imageCaption.testHelp")),1)]),e("button",{type:"button",onClick:ke,disabled:D.value||L.value,class:"btn btn-secondary !px-4 !py-1.5 text-sm shrink-0 disabled:opacity-50 disabled:cursor-not-allowed"},[D.value?(n(),l("span",Fo,s(t.$t("imageCaption.testing")),1)):(n(),l("span",Ao,s(t.$t("imageCaption.testConnection")),1))],8,Vo)])])],32)]),f(B,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-3","leave-active-class":"transition-all duration-150 ease-in","leave-to-class":"opacity-0 translate-y-3"},{default:J(()=>[he.value?(n(),l("div",To,[e("p",Uo,[a[28]||(a[28]=e("span",{class:"w-2 h-2 rounded-full bg-amber-500 shrink-0"},null,-1)),M(" "+s(t.$t("systemConfig.unsavedChanges")),1)]),e("div",Do,[e("button",{type:"button",onClick:ve,disabled:L.value,class:"btn btn-secondary !px-4 !py-1.5 text-sm"},s(t.$t("systemConfig.reset")),9,Eo),e("button",{type:"button",onClick:ie,disabled:L.value||D.value,class:"btn btn-primary !px-4 !py-1.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"},[L.value?(n(),l("span",Oo,s(t.$t("imageCaption.saving")),1)):(n(),l("span",Ho,s(t.$t("systemConfig.saveChanges")),1))],8,Ko)])])):_("",!0)]),_:1})],512),[[I,v.value==="imageCaption"]]),m(e("div",No,[e("section",Po,[e("header",Io,[e("h2",Mo,s(t.$t("webhook.title")),1),e("p",Ro,s(t.$t("webhook.description")),1)]),e("form",{onSubmit:W(de,["prevent"])},[e("div",zo,[e("div",Wo,[e("div",Jo,[e("label",Bo,s(t.$t("webhook.timeout")),1),e("p",qo,s(t.$t("webhook.timeoutHelp")),1)]),m(e("input",{id:"webhook_timeout","onUpdate:modelValue":a[13]||(a[13]=o=>x.value.timeout=o),type:"number",min:"1",class:"w-full sm:w-28 shrink-0 px-4 py-2"},null,512),[[g,x.value.timeout,void 0,{number:!0}]])]),e("div",Go,[e("div",Qo,[e("label",Xo,s(t.$t("webhook.maxAttempts")),1),e("p",Yo,s(t.$t("webhook.maxAttemptsHelp")),1)]),m(e("input",{id:"webhook_max_attempts","onUpdate:modelValue":a[14]||(a[14]=o=>x.value.max_attempts=o),type:"number",min:"1",class:"w-full sm:w-28 shrink-0 px-4 py-2"},null,512),[[g,x.value.max_attempts,void 0,{number:!0}]])])])],32)]),f(B,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-3","leave-active-class":"transition-all duration-150 ease-in","leave-to-class":"opacity-0 translate-y-3"},{default:J(()=>[fe.value?(n(),l("div",Zo,[e("p",ea,[a[29]||(a[29]=e("span",{class:"w-2 h-2 rounded-full bg-amber-500 shrink-0"},null,-1)),M(" "+s(t.$t("systemConfig.unsavedChanges")),1)]),e("div",ta,[e("button",{type:"button",onClick:xe,disabled:K.value,class:"btn btn-secondary !px-4 !py-1.5 text-sm"},s(t.$t("systemConfig.reset")),9,sa),e("button",{type:"button",onClick:de,disabled:K.value,class:"btn btn-primary !px-4 !py-1.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"},[K.value?(n(),l("span",aa,s(t.$t("webhook.saving")),1)):(n(),l("span",ia,s(t.$t("systemConfig.saveChanges")),1))],8,oa)])])):_("",!0)]),_:1}),e("section",na,[e("header",la,[e("div",null,[e("h3",ra,s(t.$t("webhook.endpointsTitle")),1),e("p",da,s(t.$t("webhook.endpointsDesc")),1
16)]),e("button",{type:"button",onClick:ee,class:"btn btn-secondary !px-3 !py-1.5 text-sm"},s(t.$t("webhook.refresh")),1)]),e("div",ca,[e("table",null,[e("thead",null,[e("tr",null,[e("th",null,s(t.$t("webhook.colKeyName")),1),e("th",null,s(t.$t("webhook.colKeyPrefix")),1),e("th",null,s(t.$t("webhook.colKeyOwner")),1),e("th",null,s(t.$t("webhook.colWebhook")),1),e("th",null,s(t.$t("webhook.colUrl")),1),a[30]||(a[30]=e("th",null,null,-1))])]),e("tbody",ua,[Z.value.length===0?(n(),l("tr",ma,[e("td",pa,[e("p",ga,s(t.$t("webhook.endpointsEmpty")),1)])])):_("",!0),(n(!0),l($,null,S(Z.value,o=>(n(),l("tr",{key:o.key_id},[e("td",ya,s(o.name),1),e("td",ba,[e("code",_a,s(o.prefix)+"...",1)]),e("td",ha,s(o.username),1),e("td",fa,[e("span",{class:w(["badge",o.webhook_enabled?"bg-indigo-100 text-indigo-700":"bg-gray-100 text-gray-500"])},s(o.webhook_enabled?t.$t("webhook.endpointOn"):t.$t("webhook.endpointOff")),3)]),e("td",{class:"text-sm text-gray-600 max-w-xs truncate",title:o.webhook_url||""},s(o.webhook_url||"-"),9,va),e("td",xa,[e("button",{type:"button",onClick:C=>P.value=o,class:"text-primary-600 hover:text-primary-700 font-medium"},s(t.$t("webhook.editEndpoint")),9,wa)])]))),128))])])])]),e("section",ka,[e("header",Ca,[e("h3",$a,s(t.$t("webhook.deliveriesTitle")),1),e("button",{type:"button",onClick:ce,class:"btn btn-secondary !px-3 !py-1.5 text-sm"},s(t.$t("webhook.refresh")),1)]),e("div",Sa,[e("table",null,[e("thead",null,[e("tr",null,[e("th",null,s(t.$t("webhook.colTime")),1),e("th",null,s(t.$t("webhook.colEvent")),1),e("th",null,s(t.$t("webhook.colSource")),1),e("th",null,s(t.$t("webhook.colTask")),1),e("th",null,s(t.$t("webhook.colUrl")),1),e("th",null,s(t.$t("webhook.colStatus")),1),e("th",null,s(t.$t("webhook.colAttempts")),1),e("th",null,s(t.$t("webhook.colError")),1)])]),e("tbody",La,[Y.value.length===0?(n(),l("tr",ja,[e("td",Va,[e("div",Fa,[f(pe(rt),{class:"w-10 h-10 text-gray-300 mb-3"}),e("p",Aa,s(t.$t("webhook.deliveriesEmpty")),1)])])])):_("",!0),(n(!0),l($,null,S(Y.value,o=>(n(),l("tr",{key:o.delivery_id},[e("td",Ta,s(o.created_at),1),e("td",Ua,s(o.event),1),e("td",Da,[e("span",{class:w(["badge",We(o.source)])},s(ze(o.source)),3)]),e("td",Ea,s(o.task_id?o.task_id.slice(0,8):"-"),1),e("td",{class:"text-sm text-gray-600 max-w-xs truncate",title:o.url},s(o.url),9,Ka),e("td",Oa,[e("span",{class:w(["badge",Pe(o.status)])},s(Ne(o.status)),3)]),e("td",Ha,s(o.attempts),1),e("td",{class:"text-sm text-gray-600 max-w-xs truncate",title:o.last_error||""},s(o.last_error||"-"),9,Na)]))),128))])])])]),P.value?(n(),me(it,{key:0,"key-id":P.value.key_id,"key-name":P.value.name,onClose:a[15]||(a[15]=o=>P.value=null),onSaved:ee},null,8,["key-id","key-name"])):_("",!0)],512),[[I,v.value==="webhook"]]),m(e("div",Pa,[e("section",Ia,[e("header",Ma,[e("h2",Ra,s(t.$t("taskConfig.title")),1),e("p",za,s(t.$t("taskConfig.description")),1)]),e("form",{onSubmit:W(ue,["prevent"])},[e("div",Wa,[e("div",Ja,[e("div",Ba,[e("label",qa,s(t.$t("taskConfig.maxRetries")),1),e("p",Ga,s(t.$t("taskConfig.maxRetriesHelp",{max:H.value})),1)]),m(e("input",{id:"task_max_retries","onUpdate:modelValue":a[16]||(a[16]=o=>F.value.max_retries=o),type:"number",min:"0",max:H.value,step:"1",class:"w-full sm:w-28 shrink-0 px-4 py-2"},null,8,Qa),[[g,F.value.max_retries,void 0,{number:!0}]])])])],32)]),f(B,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 translate-y-3","leave-active-class":"transition-all duration-150 ease-in","leave-to-class":"opacity-0 translate-y-3"},{default:J(()=>[Ie.value?(n(),l("div",Xa,[e("p",Ya,[a[31]||(a[31]=e("span",{class:"w-2 h-2 rounded-full bg-amber-500 shrink-0"},null,-1)),M(" "+s(t.$t("systemConfig.unsavedChanges")),1)]),e("div",Za,[e("button",{type:"button",onClick:Me,disabled:O.value,class:"btn btn-secondary !px-4 !py-1.5 text-sm"},s(t.$t("systemConfig.reset")),9,ei),e("button",{type:"button",onClick:ue,disabled:O.value,class:"btn btn-primary !px-4 !py-1.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"},[O.value?(n(),l("span",si,s(t.$t("taskConfig.saving")),1)):(n(),l("span",oi,s(t.$t("systemConfig.saveChanges")),1))],8,ti)])])):_("",!0)]),_:1})],512),[[I,v.value==="taskConfig"]]),m(e("div",ai,[e("section",ii,[e("header",ni,[e("h2",li,s(t.$t("auditLog.title")),1),e("p",ri,s(t.$t("auditLog.description")),1)]),e("div",di,[e("div",ci,[e("div",null,[e("label",ui,s(t.$t("auditLog.filterAction")),1),m(e("select",{"onUpdate:modelValue":a[17]||(a[17]=o=>p.value.action=o),class:"w-full px-3 py-2"},[e("option",mi,s(t.$t("auditLog.all")),1),(n(),l($,null,S(Fe,o=>e("option",{key:o,value:o},s(re(o)),9,pi)),64))],512),[[ge,p.value.action]])]),e("div",null,[e("label",gi,s(t.$t("auditLog.filterResult")),1),m(e("select",{"onUpdate:modelValue":a[18]||(a[18]=o=>
16p.value.result=o),class:"w-full px-3 py-2"},[e("option",yi,s(t.$t("auditLog.all")),1),e("option",bi,s(t.$t("auditLog.success")),1),e("option",_i,s(t.$t("auditLog.failure")),1),e("option",hi,s(t.$t("auditLog.denied")),1)],512),[[ge,p.value.result]])]),e("div",null,[e("label",fi,s(t.$t("auditLog.filterStart")),1),m(e("input",{"onUpdate:modelValue":a[19]||(a[19]=o=>p.value.start=o),type:"date",class:"w-full px-3 py-2"},null,512),[[g,p.value.start]])]),e("div",null,[e("label",vi,s(t.$t("auditLog.filterEnd")),1),m(e("input",{"onUpdate:modelValue":a[20]||(a[20]=o=>p.value.end=o),type:"date",class:"w-full px-3 py-2"},null,512),[[g,p.value.end]])])]),e("div",xi,[e("button",{type:"button",onClick:Ae,class:"btn btn-secondary !px-4 !py-1.5 text-sm"},s(t.$t("auditLog.reset")),1),e("button",{type:"button",onClick:a[21]||(a[21]=o=>E(1)),class:"btn btn-primary !px-4 !py-1.5 text-sm"},s(t.$t("auditLog.search")),1)]),e("div",wi,[e("table",null,[e("thead",null,[e("tr",null,[e("th",null,s(t.$t("auditLog.colTime")),1),e("th",null,s(t.$t("auditLog.colUser")),1),e("th",null,s(t.$t("auditLog.colAction")),1),e("th",null,s(t.$t("auditLog.colDetail")),1),e("th",null,s(t.$t("auditLog.colResource")),1),e("th",null,s(t.$t("auditLog.colResult")),1),e("th",null,s(t.$t("auditLog.colIp")),1)])]),e("tbody",ki,[Q.value.length===0?(n(),l("tr",Ci,[e("td",$i,[e("div",Si,[f(pe(ut),{class:"w-10 h-10 text-gray-300 mb-3"}),e("p",Li,s(t.$t("auditLog.empty")),1)])])])):_("",!0),(n(!0),l($,null,S(Q.value,o=>(n(),l("tr",{key:o.id},[e("td",ji,s(o.created_at),1),e("td",Vi,s(o.username||t.$t("auditLog.anonymous")),1),e("td",Fi,[e("span",{class:w(["badge",Te(o.action)])},s(re(o.action)),3)]),e("td",Ai,s(De(o)),1),e("td",{class:"text-sm text-gray-600",title:o.resource_id||void 0},s(Ee(o)),9,Ti),e("td",Ui,[e("span",{class:w(["badge",Oe(o.result)])},s(Ke(o.result)),3)]),e("td",Di,s(o.ip||"-"),1)]))),128))])])]),e("div",Ei,[e("span",Ki,s(t.$t("auditLog.total",{total:X.value})),1),e("div",Oi,[e("span",Hi,s(t.$t("auditLog.pageInfo",{page:j.value,pages:le.value})),1),e("button",{type:"button",onClick:a[22]||(a[22]=o=>E(j.value-1)),disabled:j.value<=1,class:"btn btn-secondary !px-3 !py-1.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"},s(t.$t("auditLog.prevPage")),9,Ni),e("button",{type:"button",onClick:a[23]||(a[23]=o=>E(j.value+1)),disabled:j.value>=le.value,class:"btn btn-secondary !px-3 !py-1.5 text-sm disabled:opacity-50 disabled:cursor-not-allowed"},s(t.$t("auditLog.nextPage")),9,Pi)])])])])],512),[[I,v.value==="auditLog"]])])]))]))}});export{Qi as default};

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.