astrbot_plugin_imagestudio/web/assets/index-uM7AKRxw.js

51 行
291 KiB
JavaScript

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

var av=Object.defineProperty;var iv=(e,n,a)=>n in e?av(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var tr=(e,n,a)=>iv(e,typeof n!="symbol"?n+"":n,a);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(r){if(r.ep)return;r.ep=!0;const u=a(r);fetch(r.href,u)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Ar(e){const n=Object.create(null);for(const a of e.split(","))n[a]=1;return a=>a in n}const Be={},ho=[],kl=()=>{},Yu=()=>!1,li=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ni=e=>e.startsWith("onUpdate:"),ot=Object.assign,Mr=(e,n)=>{const a=e.indexOf(n);a>-1&&e.splice(a,1)},rv=Object.prototype.hasOwnProperty,xe=(e,n)=>rv.call(e,n),ae=Array.isArray,yo=e=>na(e)==="[object Map]",oi=e=>na(e)==="[object Set]",cu=e=>na(e)==="[object Date]",ce=e=>typeof e=="function",Qe=e=>typeof e=="string",Cl=e=>typeof e=="symbol",Se=e=>e!==null&&typeof e=="object",Xu=e=>(Se(e)||ce(e))&&ce(e.then)&&ce(e.catch),Zu=Object.prototype.toString,na=e=>Zu.call(e),sv=e=>na(e).slice(8,-1),ec=e=>na(e)==="[object Object]",Nr=e=>Qe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Uo=Ar(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ai=e=>{const n=Object.create(null);return(a=>n[a]||(n[a]=e(a)))},uv=/-\w/g,il=ai(e=>e.replace(uv,n=>n.slice(1).toUpperCase())),cv=/\B([A-Z])/g,un=ai(e=>e.replace(cv,"-$1").toLowerCase()),tc=ai(e=>e.charAt(0).toUpperCase()+e.slice(1)),lr=ai(e=>e?`on${tc(e)}`:""),wl=(e,n)=>!Object.is(e,n),Fa=(e,...n)=>{for(let a=0;a<e.length;a++)e[a](...n)},lc=(e,n,a,i=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:i,value:a})},ii=e=>{const n=parseFloat(e);return isNaN(n)?e:n},dv=e=>{const n=Qe(e)?Number(e):NaN;return isNaN(n)?e:n};let du;const ri=()=>du||(du=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function et(e){if(ae(e)){const n={};for(let a=0;a<e.length;a++){const i=e[a],r=Qe(i)?mv(i):et(i);if(r)for(const u in r)n[u]=r[u]}return n}else if(Qe(e)||Se(e))return e}const fv=/;(?![^(]*\))/g,pv=/:([^]+)/,vv=/\/\*[^]*?\*\//g;function mv(e){const n={};return e.replace(vv,"").split(fv).forEach(a=>{if(a){const i=a.split(pv);i.length>1&&(n[i[0].trim()]=i[1].trim())}}),n}function z(e){let n="";if(Qe(e))n=e;else if(ae(e))for(let a=0;a<e.length;a++){const i=z(e[a]);i&&(n+=i+" ")}else if(Se(e))for(const a in e)e[a]&&(n+=a+" ");return n.trim()}const gv="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",hv=Ar(gv);function nc(e){return!!e||e===""}function yv(e,n){if(e.length!==n.length)return!1;let a=!0;for(let i=0;a&&i<e.length;i++)a=oa(e[i],n[i]);return a}function oa(e,n){if(e===n)return!0;let a=cu(e),i=cu(n);if(a||i)return a&&i?e.getTime()===n.getTime():!1;if(a=Cl(e),i=Cl(n),a||i)return e===n;if(a=ae(e),i=ae(n),a||i)return a&&i?yv(e,n):!1;if(a=Se(e),i=Se(n),a||i){if(!a||!i)return!1;const r=Object.keys(e).length,u=Object.keys(n).length;if(r!==u)return!1;for(const d in e){const v=e.hasOwnProperty(d),h=n.hasOwnProperty(d);if(v&&!h||!v&&h||!oa(e[d],n[d]))return!1}}return String(e)===String(n)}function bv(e,n){return e.findIndex(a=>oa(a,n))}const oc=e=>!!(e&&e.__v_isRef===!0),p=e=>Qe(e)?e:e==null?"":ae(e)||Se(e)&&(e.toString===Zu||!ce(e.toString))?oc(e)?p(e.value):JSON.stringify(e,ac,2):String(e),ac=(e,n)=>oc(n)?ac(e,n.value):yo(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((a,[i,r],u)=>(a[nr(i,u)+" =>"]=r,a),{})}:oi(n)?{[`Set(${n.size})`]:[...n.values()].map(a=>nr(a))}:Cl(n)?nr(n):Se(n)&&!ae(n)&&!ec(n)?String(n):n,nr=(e,n="")=>{var a;return Cl(e)?`Symbol(${(a=e.description)!=null?a:n})`:e};/**
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let ft;class _v{constructor(n=!1){this.detached=n,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!n&&ft&&(ft.active?(this.parent=ft,this.index=(ft.scopes||(ft.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let n,a;if(this.scopes)for(n=0,a=this.scopes.length;n<a;n++)this.scopes[n].pause();for(n=0,a=this.effects.length;n<a;n++)this.effects[n].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let n,a;if(this.scopes)for(n=0,a=this.scopes.length;n<a;n++)this.scopes[n].resume();for(n=0,a=this.effects.length;n<a;n++)this.effects[n].resume()}}run(n){if(this._active){const a=ft;try{return ft=this,n()}finally{ft=a}}}on(){++this._on===1&&(this.prevScope=ft,ft=this)}off(){if(this._on>0&&--this._on===0){if(ft===this)ft=this.prevScope;else{let n=ft;for(;n;){if(n.prevScope===this){n.prevScope=this.prevScope;break}n=n.prevScope}}this.prevScope=void 0}}stop(n){if(this._active){this._active=!1;let a,i;for(a=0,i=this.effects.length;a<i;a++)this.effects[a].stop();for(this.effects.length=0,a=0,i=this.cleanups.length;a<i;a++)this.cleanups[a]();if(this.cleanups.length=0,this.scopes){for(a=0,i=this.scopes.length;a<i;a++)this.scopes[a].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!n){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function wv(){return ft}let Oe;const or=new WeakSet;class ic{constructor(n){this.fn=n,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ft&&(ft.active?ft.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,or.has(this)&&(or.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||sc(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,fu(this),uc(this);const n=Oe,a=rl;Oe=this,rl=!0;try{return this.fn()}finally{cc(this),Oe=n,rl=a,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Er(n);this.deps=this.depsTail=void 0,fu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?or.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){hr(this)&&this.run()}get dirty(){return hr(this)}}let rc=0,Ho,Ko;function sc(e,n=!1){if(e.flags|=8,n){e.next=Ko,Ko=e;return}e.next=Ho,Ho=e}function Tr(){rc++}function qr(){if(--rc>0)return;if(Ko){let n=Ko;for(Ko=void 0;n;){const a=n.next;n.next=void 0,n.flags&=-9,n=a}}let e;for(;Ho;){let n=Ho;for(Ho=void 0;n;){const a=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(i){e||(e=i)}n=a}}if(e)throw e}function uc(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function cc(e){let n,a=e.depsTail,i=a;for(;i;){const r=i.prevDep;i.version===-1?(i===a&&(a=r),Er(i),kv(i)):n=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=n,e.depsTail=a}function hr(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(dc(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function dc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Yo)||(e.globalVersion=Yo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!hr(e))))return;e.flags|=2;const n=e.dep,a=Oe,i=rl;Oe=e,rl=!0;try{uc(e);const r=e.fn(e._value);(n.version===0||wl(r,e._value))&&(e.flags|=128,e._value=r,n.version++)}catch(r){throw n.version++,r}finally{Oe=a,rl=i,cc(e),e.flags&=-3}}function Er(e,n=!1){const{dep:a,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),a.subs===e&&(a.subs=i,!i&&a.computed)){a.computed.flags&=-5;for(let u=a.computed.deps;u;u=u.nextDep)Er(u,!0)}!n&&!--a.sc&&a.map&&a.map.delete(a.key)}function kv(e){const{prevDep:n,nextDep:a}=e;n&&(n.nextDep=a,e.prevDep=void 0),a&&(a.prevDep=n,e.nextDep=void 0)}let rl=!0;const fc=[];function Il(){fc.push(rl),rl=!1}function $l(){const e=fc.pop();rl=e===void 0?!0:e}function fu(e){const{cleanup:n}=e;if(e.cleanup=void 0,n){const a=Oe;Oe=void 0;try{n()}finally{Oe=a}}}let Yo=0;class Cv{constructor(n,a){this.sub=n,this.dep=a,this.version=a.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Lr{constructor(n){this.computed=n,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(n){if(!Oe||!rl||Oe===this.computed)return;let a=this.activeLink;if(a===void 0||a.sub!==Oe)a=this.activeLink=new Cv(Oe,this),Oe.deps?(a.prevDep=Oe.depsTail,Oe.depsTail.nextDep=a,Oe.depsTail=a):Oe.deps=Oe.depsTail=a,pc(a);else if(a.version===-1&&(a.version=this.version,a.nextDep)){const i=a.nextDep;i.prevDep=a.prevDep,a.prevDep&&(a.prevDep.nextDep=i),a.prevDep=Oe.depsTail,a.nextDep=void 0,Oe.depsTail.nextDep=a,Oe.depsTail=a,Oe.deps===a&&(Oe.deps=i)}return a}trigger(n){this.version++,Yo++,this.notify(n)}notify(n){Tr();try{for(let a=this.subs;a;a=a.prevSub)a.sub.notify()&&a.sub.dep.notify()}finally{qr()}}}function pc(e){if(e.dep.sc++,e.sub.flags&4){const n=e.dep.computed;if(n&&!e.dep.subs){n.flags|=20;for(let i=n.deps;i;i=i.nextDep)pc(i)}const a=e.dep.subs;a!==e&&(e.prevSub=a,a&&(a.nextSub=e)),e.dep.subs=e}}const yr=new WeakMap,Fn=Symbol(""),br=Symbol(""),Xo=Symbol("");function ht(e,n,a){if(rl&&Oe){let i=yr.get(e);i||yr.set(e,i=new Map);let r=i.get(a);r||(i.set(a,r=new Lr),r.map=i,r.key=a),r.track()}}function Ol(e,n,a,i,r,u){const d=yr.get(e);if(!d){Yo++;return}const v=h=>{h&&h.trigger()};if(Tr(),n==="clear")d.forEach(v);else{const h=ae(e),$=h&&Nr(a);if(h&&a==="length"){const k=Number(i);d.forEach((x,O)=>{(O==="length"||O===Xo||!Cl(O)&&O>=k)&&v(x)})}else switch((a!==void 0||d.has(void 0))&&v(d.get(a)),$&&v(d.get(Xo)),n){case"add":h?$&&v(d.get("length")):(v(d.get(Fn)),yo(e)&&v(d.get(br)));break;case"delete":h||(v(d.get(Fn)),yo(e)&&v(d.get(br)));break;case"set":yo(e)&&v(d.get(Fn));break}}qr()}function vo(e){const n=$e(e);return n===e?n:(ht(n,"iterate",Xo),Yt(e)?n:n.map(sl))}function si(e){return ht(e=$e(e),"iterate",Xo),e}function bl(e,n){return Fl(e)?ko(Wn(e)?sl(n):n):sl(n)}const Iv={__proto__:null,[Symbol.iterator](){return ar(this,Symbol.iterator,e=>bl(this,e))},concat(...e){return vo(this).concat(...e.map(n=>ae(n)?vo(n):n))},entries(){return ar(this,"entries",e=>(e[1]=bl(this,e[1]),e))},every(e,n){return Ll(this,"every",e,n,void 0,arguments)},filter(e,n){return Ll(this,"filter",e,n,a=>a.map(i=>bl(this,i)),arguments)},find(e,n){return Ll(this,"find",e,n,a=>bl(this,a),arguments)},findIndex(e,n){return Ll(this,"findIndex",e,n,void 0,arguments)},findLast(e,n){return Ll(this,"findLast",e,n,a=>bl(this,a),arguments)},findLastIndex(e,n){return Ll(this,"findLastIndex",e,n,void 0,arguments)},forEach(e,n){return Ll(this,"forEach",e,n,void 0,arguments)},includes(...e){return ir(this,"includes",e)},indexOf(...e){return ir(this,"indexOf",e)},join(e){return vo(this).join(e)},lastIndexOf(...e){return ir(this,"lastIndexOf",e)},map(e,n){return Ll(this,"map",e,n,void 0,arguments)},pop(){return Do(this,"pop")},push(...e){return Do(this,"push",e)},reduce(e,...n){return pu(this,"reduce",e,n)},reduceRight(e,...n){return pu(this,"reduceRight",e,n)},shift(){return Do(this,"shift")},some(e,n){return Ll(this,"some",e,n,void 0,arguments)},splice(...e){return Do(this,"splice",e)},toReversed(){return vo(this).toReversed()},toSorted(e){return vo(this).toSorted(e)},toSpliced(...e){return vo(this).toSpliced(...e)},unshift(...e){return Do(this,"unshift",e)},values(){return ar(this,"values",e=>bl(this,e))}};function ar(e,n,a){const i=si(e),r=i[n]();return i!==e&&!Yt(e)&&(r._next=r.next,r.next=()=>{const u=r._next();return u.done||(u.value=a(u.value)),u}),r}const $v=Array.prototype;function Ll(e,n,a,i,r,u){const d=si(e),v=d!==e&&!Yt(e),h=d[n];if(h!==$v[n]){const x=h.apply(e,u);return v?sl(x):x}let $=a;d!==e&&(v?$=function(x,O){return a.call(this,bl(e,x),O,e)}:a.length>2&&($=function(x,O){return a.call(this,x,O,e)}));const k=h.call(d,$,i);return v&&r?r(k):k}function pu(e,n,a,i){const r=si(e),u=r!==e&&!Yt(e);let d=a,v=!1;r!==e&&(u?(v=i.length===0,d=function($,k,x){return v&&(v=!1,$=bl(e,$)),a.call(this,$,bl(e,k),x,e)}):a.length>3&&(d=function($,k,x){return a.call(this,$,k,x,e)}));const h=r[n](d,...i);return v?bl(e,h):h}function ir(e,n,a){const i=$e(e);ht(i,"iterate",Xo);const r=i[n](...a);return(r===-1||r===!1)&&Dr(a[0])?(a[0]=$e(a[0]),i[n](...a)):r}function Do(e,n,a=[]){Il(),Tr();const i=$e(e)[n].apply(e,a);return qr(),$l(),i}const Pv=Ar("__proto__,__v_isRef,__isVue"),vc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Cl));function xv(e){Cl(e)||(e=String(e));const n=$e(this);return ht(n,"has",e),n.hasOwnProperty(e)}class mc{constructor(n=!1,a=!1){this._isReadonly=n,this._isShallow=a}get(n,a,i){if(a==="__v_skip")return n.__v_skip;const r=this._isReadonly,u=this._isShallow;if(a==="__v_isReactive")return!r;if(a==="__v_isReadonly")return r;if(a==="__v_isShallow")return u;if(a==="__v_raw")return i===(r?u?Bv:bc:u?yc:hc).get(n)||Object.getPrototypeOf(n)===Object.getPrototypeOf(i)?n:void 0;const d=ae(n);if(!r){let h;if(d&&(h=Iv[a]))return h;if(a==="hasOwnProperty")return xv}const v=Reflect.get(n,a,yt(n)?n:i);if((Cl(a)?vc.has(a):Pv(a))||(r||ht(n,"get",a),u))return v;if(yt(v)){const h=d&&Nr(a)?v:v.value;return r&&Se(h)?wr(h):h}return Se(v)?r?wr(v):Br(v):v}}class gc extends mc{constructor(n=!1){super(!1,n)}set(n,a,i,r){let u=n[a];const d=ae(n)&&Nr(a);if(!this._isShallow){const $=Fl(u);if(!Yt(i)&&!Fl(i)&&(u=$e(u),i=$e(i)),!d&&yt(u)&&!yt(i))return $||(u.value=i),!0}const v=d?Number(a)<n.length:xe(n,a),h=Reflect.set(n,a,i,yt(n)?n:r);return n===$e(r)&&h&&(v?wl(i,u)&&Ol(n,"set",a,i):Ol(n,"add",a,i)),h}deleteProperty(n,a){const i=xe(n,a);n[a];const r=Reflect.deleteProperty(n,a);return r&&i&&Ol(n,"delete",a,void 0),r}has(n,a){const i=Reflect.has(n,a);return(!Cl(a)||!vc.has(a))&&ht(n,"has",a),i}ownKeys(n){return ht(n,"iterate",ae(n)?"length":Fn),Reflect.ownKeys(n)}}class Sv extends mc{constructor(n=!1){super(!0,n)}set(n,a){return!0}deleteProperty(n,a){return!0}}const Av=new gc,Mv=new Sv,Nv=new gc(!0);const _r=e=>e,La=e=>Reflect.getPrototypeOf(e);function Tv(e,n,a){return function(...i){const r=this.__v_raw,u=$e(r),d=yo(u),v=e==="entries"||e===Symbol.iterator&&d,h=e==="keys"&&d,$=r[e](...i),k=a?_r:n?ko:sl;return!n&&ht(u,"iterate",h?br:Fn),ot(Object.create($),{next(){const{value:x,done:O}=$.next();return O?{value:x,done:O}:{value:v?[k(x[0]),k(x[1])]:k(x),done:O}}})}}function Ra(e){return function(...n){return e==="delete"?!1:e==="clear"?void 0:this}}function qv(e,n){const a={get(r){const u=this.__v_raw,d=$e(u),v=$e(r);e||(wl(r,v)&&ht(d,"get",r),ht(d,"get",v));const{has:h}=La(d),$=n?_r:e?ko:sl;if(h.call(d,r))return $(u.get(r));if(h.call(d,v))return $(u.get(v));u!==d&&u.get(r)},get size(){const r=this.__v_raw;return!e&&ht($e(r),"iterate",Fn),r.size},has(r){const u=this.__v_raw,d=$e(u),v=$e(r);return e||(wl(r,v)&&ht(d,"has",r),ht(d,"has",v)),r===v?u.has(r):u.has(r)||u.has(v)},forEach(r,u){const d=this,v=d.__v_raw,h=$e(v),$=n?_r:e?ko:sl;return!e&&ht(h,"iterate",Fn),v.forEach((k,x)=>r.call(u,$(k),$(x),d))}};return ot(a,e?{add:Ra("add"),set:Ra("set"),delete:Ra("delete"),clear:Ra("clear")}:{add(r){const u=$e(this),d=La(u),v=$e(r),h=!n&&!Yt(r)&&!Fl(r)?v:r;return d.has.call(u,h)||wl(r,h)&&d.has.call(u,r)||wl(v,h)&&d.has.call(u,v)||(u.add(h),Ol(u,"add",h,h)),this},set(r,u){!n&&!Yt(u)&&!Fl(u)&&(u=$e(u));const d=$e(this),{has:v,get:h}=La(d);let $=v.call(d,r);$||(r=$e(r),$=v.call(d,r));const k=h.call(d,r);return d.set(r,u),$?wl(u,k)&&Ol(d,"set",r,u):Ol(d,"add",r,u),this},delete(r){const u=$e(this),{has:d,get:v}=La(u);let h=d.call(u,r);h||(r=$e(r),h=d.call(u,r)),v&&v.call(u,r);const $=u.delete(r);return h&&Ol(u,"delete",r,void 0),$},clear(){const r=$e(this),u=r.size!==0,d=r.clear();return u&&Ol(r,"clear",void 0,void 0),d}}),["keys","values","entries",Symbol.iterator].forEach(r=>{a[r]=Tv(r,e,n)}),a}function Rr(e,n){const a=qv(e,n);return(i,r,u)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(xe(a,r)&&r in i?a:i,r,u)}const Ev={get:Rr(!1,!1)},Lv={get:Rr(!1,!0)},Rv={get:Rr(!0,!1)};const hc=new WeakMap,yc=new WeakMap,bc=new WeakMap,Bv=new WeakMap;function Ov(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Br(e){return Fl(e)?e:Or(e,!1,Av,Ev,hc)}function Dv(e){return Or(e,!1,Nv,Lv,yc)}function wr(e){return Or(e,!0,Mv,Rv,bc)}function Or(e,n,a,i,r){if(!Se(e)||e.__v_raw&&!(n&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const u=r.get(e);if(u)return u;const d=Ov(sv(e));if(d===0)return e;const v=new Proxy(e,d===2?i:a);return r.set(e,v),v}function Wn(e){return Fl(e)?Wn(e.__v_raw):!!(e&&e.__v_isReactive)}function Fl(e){return!!(e&&e.__v_isReadonly)}function Yt(e){return!!(e&&e.__v_isShallow)}function Dr(e){return e?!!e.__v_raw:!1}function $e(e){const n=e&&e.__v_raw;return n?$e(n):e}function Fv(e){return!xe(e,"__v_skip")&&Object.isExtensible(e)&&lc(e,"__v_skip",!0),e}const sl=e=>Se(e)?Br(e):e,ko=e=>Se(e)?wr(e):e;function yt(e){return e?e.__v_isRef===!0:!1}function T(e){return Wv(e,!1)}function Wv(e,n){return yt(e)?e:new Vv(e,n)}class Vv{constructor(n,a){this.dep=new Lr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=a?n:$e(n),this._value=a?n:sl(n),this.__v_isShallow=a}get value(){return this.dep.track(),this._value}set value(n){const a=this._rawValue,i=this.__v_isShallow||Yt(n)||Fl(n);n=i?n:$e(n),wl(n,a)&&(this._rawValue=n,this._value=i?n:sl(n),this.dep.trigger())}}function _c(e){return yt(e)?e.value:e}const jv={get:(e,n,a)=>n==="__v_raw"?e:_c(Reflect.get(e,n,a)),set:(e,n,a,i)=>{const r=e[n];return yt(r)&&!yt(a)?(r.value=a,!0):Reflect.set(e,n,a,i)}};function wc(e){return Wn(e)?e:new Proxy(e,jv)}class Uv{constructor(n,a,i){this.fn=n,this.setter=a,this._value=void 0,this.dep=new Lr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!a,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Oe!==this)return sc(this,!0),!0}get value(){const n=this.dep.track();return dc(this),n&&(n.version=this.dep.version),this._value}set value(n){this.setter&&this.setter(n)}}function Hv(e,n,a=!1){let i,r;return ce(e)?i=e:(i=e.get,r=e.set),new Uv(i,r,a)}const Ba={},Ua=new WeakMap;let Bn;function Kv(e,n=!1,a=Bn){if(a){let i=Ua.get(a);i||Ua.set(a,i=[]),i.push(e)}}function Gv(e,n,a=Be){const{immediate:i,deep:r,once:u,scheduler:d,augmentJob:v,call:h}=a,$=J=>r?J:Yt(J)||r===!1||r===0?Dl(J,1):Dl(J);let k,x,O,H,de=!1,le=!1;if(yt(e)?(x=()=>e.value,de=Yt(e)):Wn(e)?(x=()=>$(e),de=!0):ae(e)?(le=!0,de=e.some(J=>Wn(J)||Yt(J)),x=()=>e.map(J=>{if(yt(J))return J.value;if(Wn(J))return $(J);if(ce(J))return h?h(J,2):J()})):ce(e)?n?x=h?()=>h(e,2):e:x=()=>{if(O){Il();try{O()}finally{$l()}}const J=Bn;Bn=k;try{return h?h(e,3,[H]):e(H)}finally{Bn=J}}:x=kl,n&&r){const J=x,ye=r===!0?1/0:r;x=()=>Dl(J(),ye)}const ne=wv(),fe=()=>{k.stop(),ne&&ne.active&&Mr(ne.effects,k)};if(u&&n){const J=n;n=(...ye)=>{const De=J(...ye);return fe(),De}}let F=le?new Array(e.length).fill(Ba):Ba;const _e=J=>{if(!(!(k.flags&1)||!k.dirty&&!J))if(n){const ye=k.run();if(J||r||de||(le?ye.some((De,Ke)=>wl(De,F[Ke])):wl(ye,F))){O&&O();const De=Bn;Bn=k;try{const Ke=[ye,F===Ba?void 0:le&&F[0]===Ba?[]:F,H];F=ye,h?h(n,3,Ke):n(...Ke)}finally{Bn=De}}}else k.run()};return v&&v(_e),k=new ic(x),k.scheduler=d?()=>d(_e,!1):_e,H=J=>Kv(J,!1,k),O=k.onStop=()=>{const J=Ua.get(k);if(J){if(h)h(J,4);else for(const ye of J)ye();Ua.delete(k)}},n?i?_e(!0):F=k.run():d?d(_e.bind(null,!0),!0):k.run(),fe.pause=k.pause.bind(k),fe.resume=k.resume.bind(k),fe.stop=fe,fe}function Dl(e,n=1/0,a){if(n<=0||!Se(e)||e.__v_skip||(a=a||new Map,(a.get(e)||0)>=n))return e;if(a.set(e,n),n--,yt(e))Dl(e.value,n,a);else if(ae(e))for(let i=0;i<e.length;i++)Dl(e[i],n,a);else if(oi(e)||yo(e))e.forEach(i=>{Dl(i,n,a)});else if(ec(e)){for(const i in e)Dl(e[i],n,a);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Dl(e[i],n,a)}return e}/**
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function aa(e,n,a,i){try{return i?e(...i):e()}catch(r){ui(r,n,a)}}function Xt(e,n,a,i){if(ce(e)){const r=aa(e,n,a,i);return r&&Xu(r)&&r.catch(u=>{ui(u,n,a)}),r}if(ae(e)){const r=[];for(let u=0;u<e.length;u++)r.push(Xt(e[u],n,a,i));return r}}function ui(e,n,a,i=!0){const r=n?n.vnode:null,{errorHandler:u,throwUnhandledErrorInProduction:d}=n&&n.appContext.config||Be;if(n){let v=n.parent;const h=n.proxy,$=`https://vuejs.org/error-reference/#runtime-${a}`;for(;v;){const k=v.ec;if(k){for(let x=0;x<k.length;x++)if(k[x](e,h,$)===!1)return}v=v.parent}if(u){Il(),aa(u,null,10,[e,h,$]),$l();return}}zv(e,a,r,i,d)}function zv(e,n,a,i=!0,r=!1){if(r)throw e;console.error(e)}const At=[];let yl=-1;const bo=[];let an=null,go=0;const kc=Promise.resolve();let Ha=null;function rn(e){const n=Ha||kc;return e?n.then(this?e.bind(this):e):n}function Qv(e){let n=yl+1,a=At.length;for(;n<a;){const i=n+a>>>1,r=At[i],u=Zo(r);u<e||u===e&&r.flags&2?n=i+1:a=i}return n}function Fr(e){if(!(e.flags&1)){const n=Zo(e),a=At[At.length-1];!a||!(e.flags&2)&&n>=Zo(a)?At.push(e):At.splice(Qv(n),0,e),e.flags|=1,Cc()}}function Cc(){Ha||(Ha=kc.then($c))}function Jv(e){ae(e)?bo.push(...e):an&&e.id===-1?an.splice(go+1,0,e):e.flags&1||(bo.push(e),e.flags|=1),Cc()}function vu(e,n,a=yl+1){for(;a<At.length;a++){const i=At[a];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;At.splice(a,1),a--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Ic(e){if(bo.length){const n=[...new Set(bo)].sort((a,i)=>Zo(a)-Zo(i));if(bo.length=0,an){an.push(...n);return}for(an=n,go=0;go<an.length;go++){const a=an[go];a.flags&4&&(a.flags&=-2),a.flags&8||a(),a.flags&=-2}an=null,go=0}}const Zo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function $c(e){try{for(yl=0;yl<At.length;yl++){const n=At[yl];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),aa(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;yl<At.length;yl++){const n=At[yl];n&&(n.flags&=-2)}yl=-1,At.length=0,Ic(),Ha=null,(At.length||bo.length)&&$c()}}let Jt=null,Pc=null;function Ka(e){const n=Jt;return Jt=e,Pc=e&&e.type.__scopeId||null,n}function Ze(e,n=Jt,a){if(!n||e._n)return e;const i=(...r)=>{i._d&&Qa(-1);const u=Ka(n);let d;try{d=e(...r)}finally{Ka(u),i._d&&Qa(1)}return d};return i._n=!0,i._c=!0,i._d=!0,i}function Te(e,n){if(Jt===null)return e;const a=vi(Jt),i=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[u,d,v,h=Be]=n[r];u&&(ce(u)&&(u={mounted:u,updated:u}),u.deep&&Dl(d),i.push({dir:u,instance:a,value:d,oldValue:void 0,arg:v,modifiers:h}))}return e}function qn(e,n,a,i){const r=e.dirs,u=n&&n.dirs;for(let d=0;d<r.length;d++){const v=r[d];u&&(v.oldValue=u[d].value);let h=v.dir[i];h&&(Il(),Xt(h,a,8,[e.el,v,e,n]),$l())}}function Yv(e,n){if(Nt){let a=Nt.provides;const i=Nt.parent&&Nt.parent.provides;i===a&&(a=Nt.provides=Object.create(i)),a[e]=n}}function Wa(e,n,a=!1){const i=Kr();if(i||_o){let r=_o?_o._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return a&&ce(n)?n.call(i&&i.proxy):n}}const Xv=Symbol.for("v-scx"),Zv=()=>Wa(Xv);function St(e,n,a){return xc(e,n,a)}function xc(e,n,a=Be){const{immediate:i,deep:r,flush:u,once:d}=a,v=ot({},a),h=n&&i||!n&&u!=="post";let $;if(la){if(u==="sync"){const H=Zv();$=H.__watcherHandles||(H.__watcherHandles=[])}else if(!h){const H=()=>{};return H.stop=kl,H.resume=kl,H.pause=kl,H}}const k=Nt;v.call=(H,de,le)=>Xt(H,k,de,le);let x=!1;u==="post"?v.scheduler=H=>{Et(H,k&&k.suspense)}:u!=="sync"&&(x=!0,v.scheduler=(H,de)=>{de?H():Fr(H)}),v.augmentJob=H=>{n&&(H.flags|=4),x&&(H.flags|=2,k&&(H.id=k.uid,H.i=k))};const O=Gv(e,n,v);return la&&($?$.push(O):h&&O()),O}function em(e,n,a){const i=this.proxy,r=Qe(e)?e.includes(".")?Sc(i,e):()=>i[e]:e.bind(i,i);let u;ce(n)?u=n:(u=n.handler,a=n);const d=ia(this),v=xc(r,u.bind(i),a);return d(),v}function Sc(e,n){const a=n.split(".");return()=>{let i=e;for(let r=0;r<a.length&&i;r++)i=i[a[r]];return i}}const tm=Symbol("_vte"),Ac=e=>e.__isTeleport,Qt=Symbol("_leaveCb"),Fo=Symbol("_enterCb");function Mc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vr(()=>{e.isMounted=!0}),jr(()=>{e.isUnmounting=!0}),e}const zt=[Function,Array],Nc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:zt,onEnter:zt,onAfterEnter:zt,onEnterCancelled:zt,onBeforeLeave:zt,onLeave:zt,onAfterLeave:zt,onLeaveCancelled:zt,onBeforeAppear:zt,onAppear:zt,onAfterAppear:zt,onAppearCancelled:zt},Tc=e=>{const n=e.subTree;return n.component?Tc(n.component):n},lm={name:"BaseTransition",props:Nc,setup(e,{slots:n}){const a=Kr(),i=Mc();return()=>{const r=n.default&&Wr(n.default(),!0),u=r&&r.length?qc(r):a.subTree?se():void 0;if(!u)return;const d=$e(e),{mode:v}=d;if(i.isLeaving)return rr(u);const h=mu(u);if(!h)return rr(u);let $=ea(h,d,i,a,x=>$=x);h.type!==Mt&&Vn(h,$);let k=a.subTree&&mu(a.subTree);if(k&&k.type!==Mt&&!On(k,h)&&Tc(a).type!==Mt){let x=ea(k,d,i,a);if(Vn(k,x),v==="out-in"&&h.type!==Mt)return i.isLeaving=!0,x.afterLeave=()=>{i.isLeaving=!1,a.job.flags&8||a.update(),delete x.afterLeave,k=void 0},rr(u);v==="in-out"&&h.type!==Mt?x.delayLeave=(O,H,de)=>{const le=Ec(i,k);le[String(k.key)]=k,O[Qt]=()=>{H(),O[Qt]=void 0,delete $.delayedLeave,k=void 0},$.delayedLeave=()=>{de(),delete $.delayedLeave,k=void 0}}:k=void 0}else k&&(k=void 0);return u}}};function qc(e){let n=e[0];if(e.length>1){for(const a of e)if(a.type!==Mt){n=a;break}}return n}const nm=lm;function Ec(e,n){const{leavingVNodes:a}=e;let i=a.get(n.type);return i||(i=Object.create(null),a.set(n.type,i)),i}function ea(e,n,a,i,r){const{appear:u,mode:d,persisted:v=!1,onBeforeEnter:h,onEnter:$,onAfterEnter:k,onEnterCancelled:x,onBeforeLeave:O,onLeave:H,onAfterLeave:de,onLeaveCancelled:le,onBeforeAppear:ne,onAppear:fe,onAfterAppear:F,onAppearCancelled:_e}=n,J=String(e.key),ye=Ec(a,e),De=(re,ue)=>{re&&Xt(re,i,9,ue)},Ke=(re,ue)=>{const Ie=ue[1];De(re,ue),ae(re)?re.every(K=>K.length<=1)&&Ie():re.length<=1&&Ie()},tt={mode:d,persisted:v,beforeEnter(re){let ue=h;if(!a.isMounted)if(u)ue=ne||h;else return;re[Qt]&&re[Qt](!0);const Ie=ye[J];Ie&&On(e,Ie)&&Ie.el[Qt]&&Ie.el[Qt](),De(ue,[re])},enter(re){if(ye[J]===e)return;let ue=$,Ie=k,K=x;if(!a.isMounted)if(u)ue=fe||$,Ie=F||k,K=_e||x;else return;let qe=!1;re[Fo]=bt=>{qe||(qe=!0,bt?De(K,[re]):De(Ie,[re]),tt.delayedLeave&&tt.delayedLeave(),re[Fo]=void 0)};const at=re[Fo].bind(null,!1);ue?Ke(ue,[re,at]):at()},leave(re,ue){const Ie=String(e.key);if(re[Fo]&&re[Fo](!0),a.isUnmounting)return ue();De(O,[re]);let K=!1;re[Qt]=at=>{K||(K=!0,ue(),at?De(le,[re]):De(de,[re]),re[Qt]=void 0,ye[Ie]===e&&delete ye[Ie])};const qe=re[Qt].bind(null,!1);ye[Ie]=e,H?Ke(H,[re,qe]):qe()},clone(re){const ue=ea(re,n,a,i,r);return r&&r(ue),ue}};return tt}function rr(e){if(ci(e))return e=sn(e),e.children=null,e}function mu(e){if(!ci(e))return Ac(e.type)&&e.children?qc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:n,children:a}=e;if(a){if(n&16)return a[0];if(n&32&&ce(a.default))return a.default()}}function Vn(e,n){e.shapeFlag&6&&e.component?(e.transition=n,Vn(e.component.subTree,n)):e.shapeFlag&128?(e.ssContent.transition=n.clone(e.ssContent),e.ssFallback.transition=n.clone(e.ssFallback)):e.transition=n}function Wr(e,n=!1,a){let i=[],r=0;for(let u=0;u<e.length;u++){let d=e[u];const v=a==null?d.key:String(a)+String(d.key!=null?d.key:u);d.type===V?(d.patchFlag&128&&r++,i=i.concat(Wr(d.children,n,v))):(n||d.type!==Mt)&&i.push(v!=null?sn(d,{key:v}):d)}if(r>1)for(let u=0;u<i.length;u++)i[u].patchFlag=-2;return i}function om(e,n){return ce(e)?ot({name:e.name},n,{setup:e}):e}function Lc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function gu(e,n){let a;return!!((a=Object.getOwnPropertyDescriptor(e,n))&&!a.configurable)}const Ga=new WeakMap;function Go(e,n,a,i,r=!1){if(ae(e)){e.forEach((le,ne)=>Go(le,n&&(ae(n)?n[ne]:n),a,i,r));return}if(zo(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Go(e,n,a,i.component.subTree);return}const u=i.shapeFlag&4?vi(i.component):i.el,d=r?null:u,{i:v,r:h}=e,$=n&&n.r,k=v.refs===Be?v.refs={}:v.refs,x=v.setupState,O=$e(x),H=x===Be?Yu:le=>gu(k,le)?!1:xe(O,le),de=(le,ne)=>!(ne&&gu(k,ne));if($!=null&&$!==h){if(hu(n),Qe($))k[$]=null,H($)&&(x[$]=null);else if(yt($)){const le=n;de($,le.k)&&($.value=null),le.k&&(k[le.k]=null)}}if(ce(h)){Il();try{aa(h,v,12,[d,k])}finally{$l()}}else{const le=Qe(h),ne=yt(h);if(le||ne){const fe=()=>{if(e.f){const F=le?H(h)?x[h]:k[h]:de()||!e.k?h.value:k[e.k];if(r)ae(F)&&Mr(F,u);else if(ae(F))F.includes(u)||F.push(u);else if(le)k[h]=[u],H(h)&&(x[h]=k[h]);else{const _e=[u];de(h,e.k)&&(h.value=_e),e.k&&(k[e.k]=_e)}}else le?(k[h]=d,H(h)&&(x[h]=d)):ne&&(de(h,e.k)&&(h.value=d),e.k&&(k[e.k]=d))};if(d){const F=()=>{fe(),Ga.delete(e)};F.id=-1,Ga.set(e,F),Et(F,a)}else hu(e),fe()}}}function hu(e){const n=Ga.get(e);n&&(n.flags|=8,Ga.delete(e))}ri().requestIdleCallback;ri().cancelIdleCallback;const zo=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function am(e,n){Rc(e,"a",n)}function im(e,n){Rc(e,"da",n)}function Rc(e,n,a=Nt){const i=e.__wdc||(e.__wdc=()=>{let r=a;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(di(n,i,a),a){let r=a.parent;for(;r&&r.parent;)ci(r.parent.vnode)&&rm(i,n,a,r),r=r.parent}}function rm(e,n,a,i){const r=di(n,e,i,!0);Oc(()=>{Mr(i[n],r)},a)}function di(e,n,a=Nt,i=!1){if(a){const r=a[e]||(a[e]=[]),u=n.__weh||(n.__weh=(...d)=>{Il();const v=ia(a),h=Xt(n,a,e,d);return v(),$l(),h});return i?r.unshift(u):r.push(u),u}}const Wl=e=>(n,a=Nt)=>{(!la||e==="sp")&&di(e,(...i)=>n(...i),a)},sm=Wl("bm"),Vr=Wl("m"),um=Wl("bu"),Bc=Wl("u"),jr=Wl("bum"),Oc=Wl("um"),cm=Wl("sp"),dm=Wl("rtg"),fm=Wl("rtc");function pm(e,n=Nt){di("ec",e,n)}const vm=Symbol.for("v-ndc");function G(e,n,a,i){let r;const u=a,d=ae(e);if(d||Qe(e)){const v=d&&Wn(e);let h=!1,$=!1;v&&(h=!Yt(e),$=Fl(e),e=si(e)),r=new Array(e.length);for(let k=0,x=e.length;k<x;k++)r[k]=n(h?$?ko(sl(e[k])):sl(e[k]):e[k],k,void 0,u)}else if(typeof e=="number"){r=new Array(e);for(let v=0;v<e;v++)r[v]=n(v+1,v,void 0,u)}else if(Se(e))if(e[Symbol.iterator])r=Array.from(e,(v,h)=>n(v,h,void 0,u));else{const v=Object.keys(e);r=new Array(v.length);for(let h=0,$=v.length;h<$;h++){const k=v[h];r[h]=n(e[k],k,h,u)}}else r=[];return r}const kr=e=>e?ad(e)?vi(e):kr(e.parent):null,Qo=ot(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>kr(e.parent),$root:e=>kr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Fc(e),$forceUpdate:e=>e.f||(e.f=()=>{Fr(e.update)}),$nextTick:e=>e.n||(e.n=rn.bind(e.proxy)),$watch:e=>em.bind(e)}),sr=(e,n)=>e!==Be&&!e.__isScriptSetup&&xe(e,n),mm={get({_:e},n){if(n==="__v_skip")return!0;const{ctx:a,setupState:i,data:r,props:u,accessCache:d,type:v,appContext:h}=e;if(n[0]!=="$"){const O=d[n];if(O!==void 0)switch(O){case 1:return i[n];case 2:return r[n];case 4:return a[n];case 3:return u[n]}else{if(sr(i,n))return d[n]=1,i[n];if(r!==Be&&xe(r,n))return d[n]=2,r[n];if(xe(u,n))return d[n]=3,u[n];if(a!==Be&&xe(a,n))return d[n]=4,a[n];Cr&&(d[n]=0)}}const $=Qo[n];let k,x;if($)return n==="$attrs"&&ht(e.attrs,"get",""),$(e);if((k=v.__cssModules)&&(k=k[n]))return k;if(a!==Be&&xe(a,n))return d[n]=4,a[n];if(x=h.config.globalProperties,xe(x,n))return x[n]},set({_:e},n,a){const{data:i,setupState:r,ctx:u}=e;return sr(r,n)?(r[n]=a,!0):i!==Be&&xe(i,n)?(i[n]=a,!0):xe(e.props,n)||n[0]==="$"&&n.slice(1)in e?!1:(u[n]=a,!0)},has({_:{data:e,setupState:n,accessCache:a,ctx:i,appContext:r,props:u,type:d}},v){let h;return!!(a[v]||e!==Be&&v[0]!=="$"&&xe(e,v)||sr(n,v)||xe(u,v)||xe(i,v)||xe(Qo,v)||xe(r.config.globalProperties,v)||(h=d.__cssModules)&&h[v])},defineProperty(e,n,a){return a.get!=null?e._.accessCache[n]=0:xe(a,"value")&&this.set(e,n,a.value,null),Reflect.defineProperty(e,n,a)}};function yu(e){return ae(e)?e.reduce((n,a)=>(n[a]=null,n),{}):e}let Cr=!0;function gm(e){const n=Fc(e),a=e.proxy,i=e.ctx;Cr=!1,n.beforeCreate&&bu(n.beforeCreate,e,"bc");const{data:r,computed:u,methods:d,watch:v,provide:h,inject:$,created:k,beforeMount:x,mounted:O,beforeUpdate:H,updated:de,activated:le,deactivated:ne,beforeDestroy:fe,beforeUnmount:F,destroyed:_e,unmounted:J,render:ye,renderTracked:De,renderTriggered:Ke,errorCaptured:tt,serverPrefetch:re,expose:ue,inheritAttrs:Ie,components:K,directives:qe,filters:at}=n;if($&&hm($,i,null),d)for(const Ae in d){const Pe=d[Ae];ce(Pe)&&(i[Ae]=Pe.bind(a))}if(r){const Ae=r.call(a,a);Se(Ae)&&(e.data=Br(Ae))}if(Cr=!0,u)for(const Ae in u){const Pe=u[Ae],rt=ce(Pe)?Pe.bind(a,a):ce(Pe.get)?Pe.get.bind(a,a):kl,ul=!ce(Pe)&&ce(Pe.set)?Pe.set.bind(a):kl,_t=S({get:rt,set:ul});Object.defineProperty(i,Ae,{enumerable:!0,configurable:!0,get:()=>_t.value,set:Je=>_t.value=Je})}if(v)for(const Ae in v)Dc(v[Ae],i,a,Ae);if(h){const Ae=ce(h)?h.call(a):h;Reflect.ownKeys(Ae).forEach(Pe=>{Yv(Pe,Ae[Pe])})}k&&bu(k,e,"c");function Fe(Ae,Pe){ae(Pe)?Pe.forEach(rt=>Ae(rt.bind(a))):Pe&&Ae(Pe.bind(a))}if(Fe(sm,x),Fe(Vr,O),Fe(um,H),Fe(Bc,de),Fe(am,le),Fe(im,ne),Fe(pm,tt),Fe(fm,De),Fe(dm,Ke),Fe(jr,F),Fe(Oc,J),Fe(cm,re),ae(ue))if(ue.length){const Ae=e.exposed||(e.exposed={});ue.forEach(Pe=>{Object.defineProperty(Ae,Pe,{get:()=>a[Pe],set:rt=>a[Pe]=rt,enumerable:!0})})}else e.exposed||(e.exposed={});ye&&e.render===kl&&(e.render=ye),Ie!=null&&(e.inheritAttrs=Ie),K&&(e.components=K),qe&&(e.directives=qe),re&&Lc(e)}function hm(e,n,a=kl){ae(e)&&(e=Ir(e));for(const i in e){const r=e[i];let u;Se(r)?"default"in r?u=Wa(r.from||i,r.default,!0):u=Wa(r.from||i):u=Wa(r),yt(u)?Object.defineProperty(n,i,{enumerable:!0,configurable:!0,get:()=>u.value,set:d=>u.value=d}):n[i]=u}}function bu(e,n,a){Xt(ae(e)?e.map(i=>i.bind(n.proxy)):e.bind(n.proxy),n,a)}function Dc(e,n,a,i){let r=i.includes(".")?Sc(a,i):()=>a[i];if(Qe(e)){const u=n[e];ce(u)&&St(r,u)}else if(ce(e))St(r,e.bind(a));else if(Se(e))if(ae(e))e.forEach(u=>Dc(u,n,a,i));else{const u=ce(e.handler)?e.handler.bind(a):n[e.handler];ce(u)&&St(r,u,e)}}function Fc(e){const n=e.type,{mixins:a,extends:i}=n,{mixins:r,optionsCache:u,config:{optionMergeStrategies:d}}=e.appContext,v=u.get(n);let h;return v?h=v:!r.length&&!a&&!i?h=n:(h={},r.length&&r.forEach($=>za(h,$,d,!0)),za(h,n,d)),Se(n)&&u.set(n,h),h}function za(e,n,a,i=!1){const{mixins:r,extends:u}=n;u&&za(e,u,a,!0),r&&r.forEach(d=>za(e,d,a,!0));for(const d in n)if(!(i&&d==="expose")){const v=ym[d]||a&&a[d];e[d]=v?v(e[d],n[d]):n[d]}return e}const ym={data:_u,props:wu,emits:wu,methods:Vo,computed:Vo,beforeCreate:xt,created:xt,beforeMount:xt,mounted:xt,beforeUpdate:xt,updated:xt,beforeDestroy:xt,beforeUnmount:xt,destroyed:xt,unmounted:xt,activated:xt,deactivated:xt,errorCaptured:xt,serverPrefetch:xt,components:Vo,directives:Vo,watch:_m,provide:_u,inject:bm};function _u(e,n){return n?e?function(){return ot(ce(e)?e.call(this,this):e,ce(n)?n.call(this,this):n)}:n:e}function bm(e,n){return Vo(Ir(e),Ir(n))}function Ir(e){if(ae(e)){const n={};for(let a=0;a<e.length;a++)n[e[a]]=e[a];return n}return e}function xt(e,n){return e?[...new Set([].concat(e,n))]:n}function Vo(e,n){return e?ot(Object.create(null),e,n):n}function wu(e,n){return e?ae(e)&&ae(n)?[...new Set([...e,...n])]:ot(Object.create(null),yu(e),yu(n??{})):n}function _m(e,n){if(!e)return n;if(!n)return e;const a=ot(Object.create(null),e);for(const i in n)a[i]=xt(e[i],n[i]);return a}function Wc(){return{app:null,config:{isNativeTag:Yu,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let wm=0;function km(e,n){return function(i,r=null){ce(i)||(i=ot({},i)),r!=null&&!Se(r)&&(r=null);const u=Wc(),d=new WeakSet,v=[];let h=!1;const $=u.app={_uid:wm++,_component:i,_props:r,_container:null,_context:u,_instance:null,version:eg,get config(){return u.config},set config(k){},use(k,...x){return d.has(k)||(k&&ce(k.install)?(d.add(k),k.install($,...x)):ce(k)&&(d.add(k),k($,...x))),$},mixin(k){return u.mixins.includes(k)||u.mixins.push(k),$},component(k,x){return x?(u.components[k]=x,$):u.components[k]},directive(k,x){return x?(u.directives[k]=x,$):u.directives[k]},mount(k,x,O){if(!h){const H=$._ceVNode||Ce(i,r);return H.appContext=u,O===!0?O="svg":O===!1&&(O=void 0),e(H,k,O),h=!0,$._container=k,k.__vue_app__=$,vi(H.component)}},onUnmount(k){v.push(k)},unmount(){h&&(Xt(v,$._instance,16),e(null,$._container),delete $._container.__vue_app__)},provide(k,x){return u.provides[k]=x,$},runWithContext(k){const x=_o;_o=$;try{return k()}finally{_o=x}}};return $}}let _o=null;const Cm=(e,n)=>n==="modelValue"||n==="model-value"?e.modelModifiers:e[`${n}Modifiers`]||e[`${il(n)}Modifiers`]||e[`${un(n)}Modifiers`];function Im(e,n,...a){if(e.isUnmounted)return;const i=e.vnode.props||Be;let r=a;const u=n.startsWith("update:"),d=u&&Cm(i,n.slice(7));d&&(d.trim&&(r=a.map(k=>Qe(k)?k.trim():k)),d.number&&(r=a.map(ii)));let v,h=i[v=lr(n)]||i[v=lr(il(n))];!h&&u&&(h=i[v=lr(un(n))]),h&&Xt(h,e,6,r);const $=i[v+"Once"];if($){if(!e.emitted)e.emitted={};else if(e.emitted[v])return;e.emitted[v]=!0,Xt($,e,6,r)}}const $m=new WeakMap;function Vc(e,n,a=!1){const i=a?$m:n.emitsCache,r=i.get(e);if(r!==void 0)return r;const u=e.emits;let d={},v=!1;if(!ce(e)){const h=$=>{const k=Vc($,n,!0);k&&(v=!0,ot(d,k))};!a&&n.mixins.length&&n.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!u&&!v?(Se(e)&&i.set(e,null),null):(ae(u)?u.forEach(h=>d[h]=null):ot(d,u),Se(e)&&i.set(e,d),d)}function fi(e,n){return!e||!li(n)?!1:(n=n.slice(2),n=n==="Once"?n:n.replace(/Once$/,""),xe(e,n[0].toLowerCase()+n.slice(1))||xe(e,un(n))||xe(e,n))}function ku(e){const{type:n,vnode:a,proxy:i,withProxy:r,propsOptions:[u],slots:d,attrs:v,emit:h,render:$,renderCache:k,props:x,data:O,setupState:H,ctx:de,inheritAttrs:le}=e,ne=Ka(e);let fe,F;try{if(a.shapeFlag&4){const J=r||i,ye=J;fe=_l($.call(ye,J,k,x,H,O,de)),F=v}else{const J=n;fe=_l(J.length>1?J(x,{attrs:v,slots:d,emit:h}):J(x,null)),F=n.props?v:Pm(v)}}catch(J){Jo.length=0,ui(J,e,1),fe=Ce(Mt)}let _e=fe;if(F&&le!==!1){const J=Object.keys(F),{shapeFlag:ye}=_e;J.length&&ye&7&&(u&&J.some(ni)&&(F=xm(F,u)),_e=sn(_e,F,!1,!0))}return a.dirs&&(_e=sn(_e,null,!1,!0),_e.dirs=_e.dirs?_e.dirs.concat(a.dirs):a.dirs),a.transition&&Vn(_e,a.transition),fe=_e,Ka(ne),fe}const Pm=e=>{let n;for(const a in e)(a==="class"||a==="style"||li(a))&&((n||(n={}))[a]=e[a]);return n},xm=(e,n)=>{const a={};for(const i in e)(!ni(i)||!(i.slice(9)in n))&&(a[i]=e[i]);return a};function Sm(e,n,a){const{props:i,children:r,component:u}=e,{props:d,children:v,patchFlag:h}=n,$=u.emitsOptions;if(n.dirs||n.transition)return!0;if(a&&h>=0){if(h&1024)return!0;if(h&16)return i?Cu(i,d,$):!!d;if(h&8){const k=n.dynamicProps;for(let x=0;x<k.length;x++){const O=k[x];if(jc(d,i,O)&&!fi($,O))return!0}}}else return(r||v)&&(!v||!v.$stable)?!0:i===d?!1:i?d?Cu(i,d,$):!0:!!d;return!1}function Cu(e,n,a){const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){const u=i[r];if(jc(n,e,u)&&!fi(a,u))return!0}return!1}function jc(e,n,a){const i=e[a],r=n[a];return a==="style"&&Se(i)&&Se(r)?!oa(i,r):i!==r}function Am({vnode:e,parent:n,suspense:a},i){for(;n;){const r=n.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=i,e=r),r===e)(e=n.vnode).el=i,n=n.parent;else break}a&&a.activeBranch===e&&(a.vnode.el=i)}const Uc={},Hc=()=>Object.create(Uc),Kc=e=>Object.getPrototypeOf(e)===Uc;function Mm(e,n,a,i=!1){const r={},u=Hc();e.propsDefaults=Object.create(null),Gc(e,n,r,u);for(const d in e.propsOptions[0])d in r||(r[d]=void 0);a?e.props=i?r:Dv(r):e.type.props?e.props=r:e.props=u,e.attrs=u}function Nm(e,n,a,i){const{props:r,attrs:u,vnode:{patchFlag:d}}=e,v=$e(r),[h]=e.propsOptions;let $=!1;if((i||d>0)&&!(d&16)){if(d&8){const k=e.vnode.dynamicProps;for(let x=0;x<k.length;x++){let O=k[x];if(fi(e.emitsOptions,O))continue;const H=n[O];if(h)if(xe(u,O))H!==u[O]&&(u[O]=H,$=!0);else{const de=il(O);r[de]=$r(h,v,de,H,e,!1)}else H!==u[O]&&(u[O]=H,$=!0)}}}else{Gc(e,n,r,u)&&($=!0);let k;for(const x in v)(!n||!xe(n,x)&&((k=un(x))===x||!xe(n,k)))&&(h?a&&(a[x]!==void 0||a[k]!==void 0)&&(r[x]=$r(h,v,x,void 0,e,!0)):delete r[x]);if(u!==v)for(const x in u)(!n||!xe(n,x))&&(delete u[x],$=!0)}$&&Ol(e.attrs,"set","")}function Gc(e,n,a,i){const[r,u]=e.propsOptions;let d=!1,v;if(n)for(let h in n){if(Uo(h))continue;const $=n[h];let k;r&&xe(r,k=il(h))?!u||!u.includes(k)?a[k]=$:(v||(v={}))[k]=$:fi(e.emitsOptions,h)||(!(h in i)||$!==i[h])&&(i[h]=$,d=!0)}if(u){const h=$e(a),$=v||Be;for(let k=0;k<u.length;k++){const x=u[k];a[x]=$r(r,h,x,$[x],e,!xe($,x))}}return d}function $r(e,n,a,i,r,u){const d=e[a];if(d!=null){const v=xe(d,"default");if(v&&i===void 0){const h=d.default;if(d.type!==Function&&!d.skipFactory&&ce(h)){const{propsDefaults:$}=r;if(a in $)i=$[a];else{const k=ia(r);i=$[a]=h.call(null,n),k()}}else i=h;r.ce&&r.ce._setProp(a,i)}d[0]&&(u&&!v?i=!1:d[1]&&(i===""||i===un(a))&&(i=!0))}return i}const Tm=new WeakMap;function zc(e,n,a=!1){const i=a?Tm:n.propsCache,r=i.get(e);if(r)return r;const u=e.props,d={},v=[];let h=!1;if(!ce(e)){const k=x=>{h=!0;const[O,H]=zc(x,n,!0);ot(d,O),H&&v.push(...H)};!a&&n.mixins.length&&n.mixins.forEach(k),e.extends&&k(e.extends),e.mixins&&e.mixins.forEach(k)}if(!u&&!h)return Se(e)&&i.set(e,ho),ho;if(ae(u))for(let k=0;k<u.length;k++){const x=il(u[k]);Iu(x)&&(d[x]=Be)}else if(u)for(const k in u){const x=il(k);if(Iu(x)){const O=u[k],H=d[x]=ae(O)||ce(O)?{type:O}:ot({},O),de=H.type;let le=!1,ne=!0;if(ae(de))for(let fe=0;fe<de.length;++fe){const F=de[fe],_e=ce(F)&&F.name;if(_e==="Boolean"){le=!0;break}else _e==="String"&&(ne=!1)}else le=ce(de)&&de.name==="Boolean";H[0]=le,H[1]=ne,(le||xe(H,"default"))&&v.push(x)}}const $=[d,v];return Se(e)&&i.set(e,$),$}function Iu(e){return e[0]!=="$"&&!Uo(e)}const Ur=e=>e==="_"||e==="_ctx"||e==="$stable",Hr=e=>ae(e)?e.map(_l):[_l(e)],qm=(e,n,a)=>{if(n._n)return n;const i=Ze((...r)=>Hr(n(...r)),a);return i._c=!1,i},Qc=(e,n,a)=>{const i=e._ctx;for(const r in e){if(Ur(r))continue;const u=e[r];if(ce(u))n[r]=qm(r,u,i);else if(u!=null){const d=Hr(u);n[r]=()=>d}}},Jc=(e,n)=>{const a=Hr(n);e.slots.default=()=>a},Yc=(e,n,a)=>{for(const i in n)(a||!Ur(i))&&(e[i]=n[i])},Em=(e,n,a)=>{const i=e.slots=Hc();if(e.vnode.shapeFlag&32){const r=n._;r?(Yc(i,n,a),a&&lc(i,"_",r,!0)):Qc(n,i)}else n&&Jc(e,n)},Lm=(e,n,a)=>{const{vnode:i,slots:r}=e;let u=!0,d=Be;if(i.shapeFlag&32){const v=n._;v?a&&v===1?u=!1:Yc(r,n,a):(u=!n.$stable,Qc(n,r)),d=n}else n&&(Jc(e,n),d={default:1});if(u)for(const v in r)!Ur(v)&&d[v]==null&&delete r[v]},Et=Fm;function Rm(e){return Bm(e)}function Bm(e,n){const a=ri();a.__VUE__=!0;const{insert:i,remove:r,patchProp:u,createElement:d,createText:v,createComment:h,setText:$,setElementText:k,parentNode:x,nextSibling:O,setScopeId:H=kl,insertStaticContent:de}=e,le=(w,C,P,R=null,E=null,M=null,D=void 0,B=null,N=!!C.dynamicChildren)=>{if(w===C)return;w&&!On(w,C)&&(R=Tt(w),Je(w,E,M,!0),w=null),C.patchFlag===-2&&(N=!1,C.dynamicChildren=null);const{type:A,ref:ee,shapeFlag:j}=C;switch(A){case pi:ne(w,C,P,R);break;case Mt:fe(w,C,P,R);break;case cr:w==null&&F(C,P,R,D);break;case V:K(w,C,P,R,E,M,D,B,N);break;default:j&1?ye(w,C,P,R,E,M,D,B,N):j&6?qe(w,C,P,R,E,M,D,B,N):(j&64||j&128)&&A.process(w,C,P,R,E,M,D,B,N,kt)}ee!=null&&E?Go(ee,w&&w.ref,M,C||w,!C):ee==null&&w&&w.ref!=null&&Go(w.ref,null,M,w,!0)},ne=(w,C,P,R)=>{if(w==null)i(C.el=v(C.children),P,R);else{const E=C.el=w.el;C.children!==w.children&&$(E,C.children)}},fe=(w,C,P,R)=>{w==null?i(C.el=h(C.children||""),P,R):C.el=w.el},F=(w,C,P,R)=>{[w.el,w.anchor]=de(w.children,C,P,R,w.el,w.anchor)},_e=({el:w,anchor:C},P,R)=>{let E;for(;w&&w!==C;)E=O(w),i(w,P,R),w=E;i(C,P,R)},J=({el:w,anchor:C})=>{let P;for(;w&&w!==C;)P=O(w),r(w),w=P;r(C)},ye=(w,C,P,R,E,M,D,B,N)=>{if(C.type==="svg"?D="svg":C.type==="math"&&(D="mathml"),w==null)De(C,P,R,E,M,D,B,N);else{const A=w.el&&w.el._isVueCE?w.el:null;try{A&&A._beginPatch(),re(w,C,E,M,D,B,N)}finally{A&&A._endPatch()}}},De=(w,C,P,R,E,M,D,B)=>{let N,A;const{props:ee,shapeFlag:j,transition:Y,dirs:oe}=w;if(N=w.el=d(w.type,M,ee&&ee.is,ee),j&8?k(N,w.children):j&16&&tt(w.children,N,null,R,E,ur(w,M),D,B),oe&&qn(w,null,R,"created"),Ke(N,w,w.scopeId,D,R),ee){for(const he in ee)he!=="value"&&!Uo(he)&&u(N,he,null,ee[he],M,R);"value"in ee&&u(N,"value",null,ee.value,M),(A=ee.onVnodeBeforeMount)&&gl(A,R,w)}oe&&qn(w,null,R,"beforeMount");const ge=Om(E,Y);ge&&Y.beforeEnter(N),i(N,C,P),((A=ee&&ee.onVnodeMounted)||ge||oe)&&Et(()=>{try{A&&gl(A,R,w),ge&&Y.enter(N),oe&&qn(w,null,R,"mounted")}finally{}},E)},Ke=(w,C,P,R,E)=>{if(P&&H(w,P),R)for(let M=0;M<R.length;M++)H(w,R[M]);if(E){let M=E.subTree;if(C===M||td(M.type)&&(M.ssContent===C||M.ssFallback===C)){const D=E.vnode;Ke(w,D,D.scopeId,D.slotScopeIds,E.parent)}}},tt=(w,C,P,R,E,M,D,B,N=0)=>{for(let A=N;A<w.length;A++){const ee=w[A]=B?Bl(w[A]):_l(w[A]);le(null,ee,C,P,R,E,M,D,B)}},re=(w,C,P,R,E,M,D)=>{const B=C.el=w.el;let{patchFlag:N,dynamicChildren:A,dirs:ee}=C;N|=w.patchFlag&16;const j=w.props||Be,Y=C.props||Be;let oe;if(P&&En(P,!1),(oe=Y.onVnodeBeforeUpdate)&&gl(oe,P,C,w),ee&&qn(C,w,P,"beforeUpdate"),P&&En(P,!0),A&&(!w.dynamicChildren||w.dynamicChildren.length!==A.length)&&(N=0,D=!1,A=null),(j.innerHTML&&Y.innerHTML==null||j.textContent&&Y.textContent==null)&&k(B,""),A?ue(w.dynamicChildren,A,B,P,R,ur(C,E),M):D||Pe(w,C,B,null,P,R,ur(C,E),M,!1),N>0){if(N&16)Ie(B,j,Y,P,E);else if(N&2&&j.class!==Y.class&&u(B,"class",null,Y.class,E),N&4&&u(B,"style",j.style,Y.style,E),N&8){const ge=C.dynamicProps;for(let he=0;he<ge.length;he++){const we=ge[he],We=j[we],Ye=Y[we];(Ye!==We||we==="value")&&u(B,we,We,Ye,E,P)}}N&1&&w.children!==C.children&&k(B,C.children)}else!D&&A==null&&Ie(B,j,Y,P,E);((oe=Y.onVnodeUpdated)||ee)&&Et(()=>{oe&&gl(oe,P,C,w),ee&&qn(C,w,P,"updated")},R)},ue=(w,C,P,R,E,M,D)=>{for(let B=0;B<C.length;B++){const N=w[B],A=C[B],ee=N.el&&(N.type===V||!On(N,A)||N.shapeFlag&198)?x(N.el):P;le(N,A,ee,null,R,E,M,D,!0)}},Ie=(w,C,P,R,E)=>{if(C!==P){if(C!==Be)for(const M in C)!Uo(M)&&!(M in P)&&u(w,M,C[M],null,E,R);for(const M in P){if(Uo(M))continue;const D=P[M],B=C[M];D!==B&&M!=="value"&&u(w,M,B,D,E,R)}"value"in P&&u(w,"value",C.value,P.value,E)}},K=(w,C,P,R,E,M,D,B,N)=>{const A=C.el=w?w.el:v(""),ee=C.anchor=w?w.anchor:v("");let{patchFlag:j,dynamicChildren:Y,slotScopeIds:oe}=C;oe&&(B=B?B.concat(oe):oe),w==null?(i(A,P,R),i(ee,P,R),tt(C.children||[],P,ee,E,M,D,B,N)):j>0&&j&64&&Y&&w.dynamicChildren&&w.dynamicChildren.length===Y.length?(ue(w.dynamicChildren,Y,P,E,M,D,B),(C.key!=null||E&&C===E.subTree)&&Xc(w,C,!0)):Pe(w,C,P,ee,E,M,D,B,N)},qe=(w,C,P,R,E,M,D,B,N)=>{C.slotScopeIds=B,w==null?C.shapeFlag&512?E.ctx.activate(C,P,R,D,N):at(C,P,R,E,M,D,N):bt(w,C,N)},at=(w,C,P,R,E,M,D)=>{const B=w.component=Gm(w,R,E);if(ci(w)&&(B.ctx.renderer=kt),zm(B,!1,D),B.asyncDep){if(E&&E.registerDep(B,Fe,D),!w.el){const N=B.subTree=Ce(Mt);fe(null,N,C,P),w.placeholder=N.el}}else Fe(B,w,C,P,E,M,D)},bt=(w,C,P)=>{const R=C.component=w.component;if(Sm(w,C,P))if(R.asyncDep&&!R.asyncResolved){Ae(R,C,P);return}else R.next=C,R.update();else C.el=w.el,R.vnode=C},Fe=(w,C,P,R,E,M,D)=>{const B=()=>{if(w.isMounted){let{next:j,bu:Y,u:oe,parent:ge,vnode:he}=w;{const it=Zc(w);if(it){j&&(j.el=he.el,Ae(w,j,D)),it.asyncDep.then(()=>{Et(()=>{w.isUnmounted||A()},E)});return}}let we=j,We;En(w,!1),j?(j.el=he.el,Ae(w,j,D)):j=he,Y&&Fa(Y),(We=j.props&&j.props.onVnodeBeforeUpdate)&&gl(We,ge,j,he),En(w,!0);const Ye=ku(w),Ct=w.subTree;w.subTree=Ye,le(Ct,Ye,x(Ct.el),Tt(Ct),w,E,M),j.el=Ye.el,we===null&&Am(w,Ye.el),oe&&Et(oe,E),(We=j.props&&j.props.onVnodeUpdated)&&Et(()=>gl(We,ge,j,he),E)}else{let j;const{el:Y,props:oe}=C,{bm:ge,m:he,parent:we,root:We,type:Ye}=w,Ct=zo(C);En(w,!1),ge&&Fa(ge),!Ct&&(j=oe&&oe.onVnodeBeforeMount)&&gl(j,we,C),En(w,!0);{We.ce&&We.ce._hasShadowRoot()&&We.ce._injectChildStyle(Ye,w.parent?w.parent.type:void 0);const it=w.subTree=ku(w);le(null,it,P,R,w,E,M),C.el=it.el}if(he&&Et(he,E),!Ct&&(j=oe&&oe.onVnodeMounted)){const it=C;Et(()=>gl(j,we,it),E)}(C.shapeFlag&256||we&&zo(we.vnode)&&we.vnode.shapeFlag&256)&&w.a&&Et(w.a,E),w.isMounted=!0,C=P=R=null}};w.scope.on();const N=w.effect=new ic(B);w.scope.off();const A=w.update=N.run.bind(N),ee=w.job=N.runIfDirty.bind(N);ee.i=w,ee.id=w.uid,N.scheduler=()=>Fr(ee),En(w,!0),A()},Ae=(w,C,P)=>{C.component=w;const R=w.vnode.props;w.vnode=C,w.next=null,Nm(w,C.props,R,P),Lm(w,C.children,P),Il(),vu(w),$l()},Pe=(w,C,P,R,E,M,D,B,N=!1)=>{const A=w&&w.children,ee=w?w.shapeFlag:0,j=C.children,{patchFlag:Y,shapeFlag:oe}=C;if(Y>0){if(Y&128){ul(A,j,P,R,E,M,D,B,N);return}else if(Y&256){rt(A,j,P,R,E,M,D,B,N);return}}oe&8?(ee&16&&st(A,E,M),j!==A&&k(P,j)):ee&16?oe&16?ul(A,j,P,R,E,M,D,B,N):st(A,E,M,!0):(ee&8&&k(P,""),oe&16&&tt(j,P,R,E,M,D,B,N))},rt=(w,C,P,R,E,M,D,B,N)=>{w=w||ho,C=C||ho;const A=w.length,ee=C.length,j=Math.min(A,ee);let Y;for(Y=0;Y<j;Y++){const oe=C[Y]=N?Bl(C[Y]):_l(C[Y]);le(w[Y],oe,P,null,E,M,D,B,N)}A>ee?st(w,E,M,!0,!1,j):tt(C,P,R,E,M,D,B,N,j)},ul=(w,C,P,R,E,M,D,B,N)=>{let A=0;const ee=C.length;let j=w.length-1,Y=ee-1;for(;A<=j&&A<=Y;){const oe=w[A],ge=C[A]=N?Bl(C[A]):_l(C[A]);if(On(oe,ge))le(oe,ge,P,null,E,M,D,B,N);else break;A++}for(;A<=j&&A<=Y;){const oe=w[j],ge=C[Y]=N?Bl(C[Y]):_l(C[Y]);if(On(oe,ge))le(oe,ge,P,null,E,M,D,B,N);else break;j--,Y--}if(A>j){if(A<=Y){const oe=Y+1,ge=oe<ee?C[oe].el:R;for(;A<=Y;)le(null,C[A]=N?Bl(C[A]):_l(C[A]),P,ge,E,M,D,B,N),A++}}else if(A>Y)for(;A<=j;)Je(w[A],E,M,!0),A++;else{const oe=A,ge=A,he=new Map;for(A=ge;A<=Y;A++){const Xe=C[A]=N?Bl(C[A]):_l(C[A]);Xe.key!=null&&he.set(Xe.key,A)}let we,We=0;const Ye=Y-ge+1;let Ct=!1,it=0;const ie=new Array(Ye);for(A=0;A<Ye;A++)ie[A]=0;for(A=oe;A<=j;A++){const Xe=w[A];if(We>=Ye){Je(Xe,E,M,!0);continue}let Lt;if(Xe.key!=null)Lt=he.get(Xe.key);else for(we=ge;we<=Y;we++)if(ie[we-ge]===0&&On(Xe,C[we])){Lt=we;break}Lt===void 0?Je(Xe,E,M,!0):(ie[Lt-ge]=A+1,Lt>=it?it=Lt:Ct=!0,le(Xe,C[Lt],P,null,E,M,D,B,N),We++)}const Un=Ct?Dm(ie):ho;for(we=Un.length-1,A=Ye-1;A>=0;A--){const Xe=ge+A,Lt=C[Xe],jl=C[Xe+1],Ul=Xe+1<ee?jl.el||ed(jl):R;ie[A]===0?le(null,Lt,P,Ul,E,M,D,B,N):Ct&&(we<0||A!==Un[we]?_t(Lt,P,Ul,2):we--)}}},_t=(w,C,P,R,E=null)=>{const{el:M,type:D,transition:B,children:N,shapeFlag:A}=w;if(A&6){_t(w.component.subTree,C,P,R);return}if(A&128){w.suspense.move(C,P,R);return}if(A&64){D.move(w,C,P,kt);return}if(D===V){i(M,C,P);for(let j=0;j<N.length;j++)_t(N[j],C,P,R);i(w.anchor,C,P);return}if(D===cr){_e(w,C,P);return}if(R!==2&&A&1&&B)if(R===0)B.persisted&&!M[Qt]?i(M,C,P):(B.beforeEnter(M),i(M,C,P),Et(()=>B.enter(M),E));else{const{leave:j,delayLeave:Y,afterLeave:oe}=B,ge=()=>{w.ctx.isUnmounted?r(M):i(M,C,P)},he=()=>{const we=M._isLeaving||!!M[Qt];M._isLeaving&&M[Qt](!0),B.persisted&&!we?ge():j(M,()=>{ge(),oe&&oe()})};Y?Y(M,ge,he):he()}else i(M,C,P)},Je=(w,C,P,R=!1,E=!1)=>{const{type:M,props:D,ref:B,children:N,dynamicChildren:A,shapeFlag:ee,patchFlag:j,dirs:Y,cacheIndex:oe,memo:ge}=w;if(j===-2&&(E=!1),B!=null&&(Il(),Go(B,null,P,w,!0),$l()),oe!=null&&(C.renderCache[oe]=void 0),ee&256){C.ctx.deactivate(w);return}const he=ee&1&&Y,we=!zo(w);let We;if(we&&(We=D&&D.onVnodeBeforeUnmount)&&gl(We,C,w),ee&6)wt(w.component,P,R);else{if(ee&128){w.suspense.unmount(P,R);return}he&&qn(w,null,C,"beforeUnmount"),ee&64?w.type.remove(w,C,P,kt,R):A&&!A.hasOnce&&(M!==V||j>0&&j&64)?st(A,C,P,!1,!0):(M===V&&j&384||!E&&ee&16)&&st(N,C,P),R&&jt(w)}const Ye=ge!=null&&oe==null;(we&&(We=D&&D.onVnodeUnmounted)||he||Ye)&&Et(()=>{We&&gl(We,C,w),he&&qn(w,null,C,"unmounted"),Ye&&(w.el=null)},P)},jt=w=>{const{type:C,el:P,anchor:R,transition:E}=w;if(C===V){Vl(P,R);return}if(C===cr){J(w);return}const M=()=>{r(P),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(w.shapeFlag&1&&E&&!E.persisted){const{leave:D,delayLeave:B}=E,N=()=>D(P,M);B?B(w.el,M,N):N()}else M()},Vl=(w,C)=>{let P;for(;w!==C;)P=O(w),r(w),w=P;r(C)},wt=(w,C,P)=>{const{bum:R,scope:E,job:M,subTree:D,um:B,m:N,a:A}=w;$u(N),$u(A),R&&Fa(R),E.stop(),M&&(M.flags|=8,Je(D,w,C,P)),B&&Et(B,C),Et(()=>{w.isUnmounted=!0},C)},st=(w,C,P,R=!1,E=!1,M=0)=>{for(let D=M;D<w.length;D++)Je(w[D],C,P,R,E)},Tt=w=>{if(w.shapeFlag&6)return Tt(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const C=O(w.anchor||w.el),P=C&&C[tm];return P?O(P):C};let cn=!1;const Io=(w,C,P)=>{let R;w==null?C._vnode&&(Je(C._vnode,null,null,!0),R=C._vnode.component):le(C._vnode||null,w,C,null,null,null,P),C._vnode=w,cn||(cn=!0,vu(R),Ic(),cn=!1)},kt={p:le,um:Je,m:_t,r:jt,mt:at,mc:tt,pc:Pe,pbc:ue,n:Tt,o:e};return{render:Io,hydrate:void 0,createApp:km(Io)}}function ur({type:e,props:n},a){return a==="svg"&&e==="foreignObject"||a==="mathml"&&e==="annotation-xml"&&n&&n.encoding&&n.encoding.includes("html")?void 0:a}function En({effect:e,job:n},a){a?(e.flags|=32,n.flags|=4):(e.flags&=-33,n.flags&=-5)}function Om(e,n){return(!e||e&&!e.pendingBranch)&&n&&!n.persisted}function Xc(e,n,a=!1){const i=e.children,r=n.children;if(ae(i)&&ae(r))for(let u=0;u<i.length;u++){const d=i[u];let v=r[u];v.shapeFlag&1&&!v.dynamicChildren&&((v.patchFlag<=0||v.patchFlag===32)&&(v=r[u]=Bl(r[u]),v.el=d.el),!a&&v.patchFlag!==-2&&Xc(d,v)),v.type===pi&&(v.patchFlag===-1&&(v=r[u]=Bl(v)),v.el=d.el),v.type===Mt&&!v.el&&(v.el=d.el)}}function Dm(e){const n=e.slice(),a=[0];let i,r,u,d,v;const h=e.length;for(i=0;i<h;i++){const $=e[i];if($!==0){if(r=a[a.length-1],e[r]<$){n[i]=r,a.push(i);continue}for(u=0,d=a.length-1;u<d;)v=u+d>>1,e[a[v]]<$?u=v+1:d=v;$<e[a[u]]&&(u>0&&(n[i]=a[u-1]),a[u]=i)}}for(u=a.length,d=a[u-1];u-- >0;)a[u]=d,d=n[d];return a}function Zc(e){const n=e.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:Zc(n)}function $u(e){if(e)for(let n=0;n<e.length;n++)e[n].flags|=8}function ed(e){if(e.placeholder)return e.placeholder;const n=e.component;return n?ed(n.subTree):null}const td=e=>e.__isSuspense;function Fm(e,n){n&&n.pendingBranch?ae(e)?n.effects.push(...e):n.effects.push(e):Jv(e)}const V=Symbol.for("v-fgt"),pi=Symbol.for("v-txt"),Mt=Symbol.for("v-cmt"),cr=Symbol.for("v-stc"),Jo=[];let Vt=null;function b(e=!1){Jo.push(Vt=e?null:[])}function Wm(){Jo.pop(),Vt=Jo[Jo.length-1]||null}let ta=1;function Qa(e,n=!1){ta+=e,e<0&&Vt&&n&&(Vt.hasOnce=!0)}function ld(e){return e.dynamicChildren=ta>0?Vt||ho:null,Wm(),ta>0&&Vt&&Vt.push(e),e}function _(e,n,a,i,r,u){return ld(o(e,n,a,i,r,u,!0))}function nd(e,n,a,i,r){return ld(Ce(e,n,a,i,r,!0))}function Ja(e){return e?e.__v_isVNode===!0:!1}function On(e,n){return e.type===n.type&&e.key===n.key}const od=({key:e})=>e??null,Va=({ref:e,ref_key:n,ref_for:a})=>(typeof e=="number"&&(e=""+e),e!=null?Qe(e)||yt(e)||ce(e)?{i:Jt,r:e,k:n,f:!!a}:e:null);function o(e,n=null,a=null,i=0,r=null,u=e===V?0:1,d=!1,v=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:n,key:n&&od(n),ref:n&&Va(n),scopeId:Pc,slotScopeIds:null,children:a,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:u,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Jt};return v?(Ya(h,a),u&128&&e.normalize(h)):a&&(h.shapeFlag|=Qe(a)?8:16),ta>0&&!d&&Vt&&(h.patchFlag>0||u&6)&&h.patchFlag!==32&&Vt.push(h),h}const Ce=Vm;function Vm(e,n=null,a=null,i=0,r=null,u=!1){if((!e||e===vm)&&(e=Mt),Ja(e)){const v=sn(e,n,!0);return a&&Ya(v,a),ta>0&&!u&&Vt&&(v.shapeFlag&6?Vt[Vt.indexOf(e)]=v:Vt.push(v)),v.patchFlag=-2,v}if(Xm(e)&&(e=e.__vccOpts),n){n=jm(n);let{class:v,style:h}=n;v&&!Qe(v)&&(n.class=z(v)),Se(h)&&(Dr(h)&&!ae(h)&&(h=ot({},h)),n.style=et(h))}const d=Qe(e)?1:td(e)?128:Ac(e)?64:Se(e)?4:ce(e)?2:0;return o(e,n,a,i,r,d,u,!0)}function jm(e){return e?Dr(e)||Kc(e)?ot({},e):e:null}function sn(e,n,a=!1,i=!1){const{props:r,ref:u,patchFlag:d,children:v,transition:h}=e,$=n?Um(r||{},n):r,k={__v_isVNode:!0,__v_skip:!0,type:e.type,props:$,key:$&&od($),ref:n&&n.ref?a&&u?ae(u)?u.concat(Va(n)):[u,Va(n)]:Va(n):u,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:v,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:n&&e.type!==V?d===-1?16:d|16:d,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&sn(e.ssContent),ssFallback:e.ssFallback&&sn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return h&&i&&Vn(k,h.clone(k)),k}function ja(e=" ",n=0){return Ce(pi,null,e,n)}function se(e="",n=!1){return n?(b(),nd(Mt,null,e)):Ce(Mt,null,e)}function _l(e){return e==null||typeof e=="boolean"?Ce(Mt):ae(e)?Ce(V,null,e.slice()):Ja(e)?Bl(e):Ce(pi,null,String(e))}function Bl(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:sn(e)}function Ya(e,n){let a=0;const{shapeFlag:i}=e;if(n==null)n=null;else if(ae(n))a=16;else if(typeof n=="object")if(i&65){const r=n.default;r&&(r._c&&(r._d=!1),Ya(e,r()),r._c&&(r._d=!0));return}else{a=32;const r=n._;!r&&!Kc(n)?n._ctx=Jt:r===3&&Jt&&(Jt.slots._===1?n._=1:(n._=2,e.patchFlag|=1024))}else if(ce(n)){if(i&65){Ya(e,{default:n});return}n={default:n,_ctx:Jt},a=32}else n=String(n),i&64?(a=16,n=[ja(n)]):a=8;e.children=n,e.shapeFlag|=a}function Um(...e){const n={};for(let a=0;a<e.length;a++){const i=e[a];for(const r in i)if(r==="class")n.class!==i.class&&(n.class=z([n.class,i.class]));else if(r==="style")n.style=et([n.style,i.style]);else if(li(r)){const u=n[r],d=i[r];d&&u!==d&&!(ae(u)&&u.includes(d))?n[r]=u?[].concat(u,d):d:d==null&&u==null&&!ni(r)&&(n[r]=d)}else r!==""&&(n[r]=i[r])}return n}function gl(e,n,a,i=null){Xt(e,n,7,[a,i])}const Hm=Wc();let Km=0;function Gm(e,n,a){const i=e.type,r=(n?n.appContext:e.appContext)||Hm,u={uid:Km++,vnode:e,type:i,parent:n,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _v(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(r.provides),ids:n?n.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:zc(i,r),emitsOptions:Vc(i,r),emit:null,emitted:null,propsDefaults:Be,inheritAttrs:i.inheritAttrs,ctx:Be,data:Be,props:Be,attrs:Be,slots:Be,refs:Be,setupState:Be,setupContext:null,suspense:a,suspenseId:a?a.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return u.ctx={_:u},u.root=n?n.root:u,u.emit=Im.bind(null,u),e.ce&&e.ce(u),u}let Nt=null;const Kr=()=>Nt||Jt;let Xa,Pr;{const e=ri(),n=(a,i)=>{let r;return(r=e[a])||(r=e[a]=[]),r.push(i),u=>{r.length>1?r.forEach(d=>d(u)):r[0](u)}};Xa=n("__VUE_INSTANCE_SETTERS__",a=>Nt=a),Pr=n("__VUE_SSR_SETTERS__",a=>la=a)}const ia=e=>{const n=Nt;return Xa(e),e.scope.on(),()=>{e.scope.off(),Xa(n)}},Pu=()=>{Nt&&Nt.scope.off(),Xa(null)};function ad(e){return e.vnode.shapeFlag&4}let la=!1;function zm(e,n=!1,a=!1){n&&Pr(n);const{props:i,children:r}=e.vnode,u=ad(e);Mm(e,i,u,n),Em(e,r,a||n);const d=u?Qm(e,n):void 0;return n&&Pr(!1),d}function Qm(e,n){const a=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,mm);const{setup:i}=a;if(i){Il();const r=e.setupContext=i.length>1?Ym(e):null,u=ia(e),d=aa(i,e,0,[e.props,r]),v=Xu(d);if($l(),u(),(v||e.sp)&&!zo(e)&&Lc(e),v){if(d.then(Pu,Pu),n)return d.then(h=>{xu(e,h)}).catch(h=>{ui(h,e,0)});e.asyncDep=d}else xu(e,d)}else id(e)}function xu(e,n,a){ce(n)?e.type.__ssrInlineRender?e.ssrRender=n:e.render=n:Se(n)&&(e.setupState=wc(n)),id(e)}function id(e,n,a){const i=e.type;e.render||(e.render=i.render||kl);{const r=ia(e);Il();try{gm(e)}finally{$l(),r()}}}const Jm={get(e,n){return ht(e,"get",""),e[n]}};function Ym(e){const n=a=>{e.exposed=a||{}};return{attrs:new Proxy(e.attrs,Jm),slots:e.slots,emit:e.emit,expose:n}}function vi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(wc(Fv(e.exposed)),{get(n,a){if(a in n)return n[a];if(a in Qo)return Qo[a](e)},has(n,a){return a in n||a in Qo}})):e.proxy}function Xm(e){return ce(e)&&"__vccOpts"in e}const S=(e,n)=>Hv(e,n,la);function Zm(e,n,a){try{Qa(-1);const i=arguments.length;return i===2?Se(n)&&!ae(n)?Ja(n)?Ce(e,null,[n]):Ce(e,n):Ce(e,null,n):(i>3?a=Array.prototype.slice.call(arguments,2):i===3&&Ja(a)&&(a=[a]),Ce(e,n,a))}finally{Qa(1)}}const eg="3.5.39";/**
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let xr;const Su=typeof window<"u"&&window.trustedTypes;if(Su)try{xr=Su.createPolicy("vue",{createHTML:e=>e})}catch{}const rd=xr?e=>xr.createHTML(e):e=>e,tg="http://www.w3.org/2000/svg",lg="http://www.w3.org/1998/Math/MathML",Rl=typeof document<"u"?document:null,Au=Rl&&Rl.createElement("template"),ng={insert:(e,n,a)=>{n.insertBefore(e,a||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,a,i)=>{const r=n==="svg"?Rl.createElementNS(tg,e):n==="mathml"?Rl.createElementNS(lg,e):a?Rl.createElement(e,{is:a}):Rl.createElement(e);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>Rl.createTextNode(e),createComment:e=>Rl.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Rl.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,a,i,r,u){const d=a?a.previousSibling:n.lastChild;if(r&&(r===u||r.nextSibling))for(;n.insertBefore(r.cloneNode(!0),a),!(r===u||!(r=r.nextSibling)););else{Au.innerHTML=rd(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const v=Au.content;if(i==="svg"||i==="mathml"){const h=v.firstChild;for(;h.firstChild;)v.appendChild(h.firstChild);v.removeChild(h)}n.insertBefore(v,a)}return[d?d.nextSibling:n.firstChild,a?a.previousSibling:n.lastChild]}},nn="transition",Wo="animation",Co=Symbol("_vtc"),sd={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ud=ot({},Nc,sd),og=e=>(e.displayName="Transition",e.props=ud,e),gt=og((e,{slots:n})=>Zm(nm,cd(e),n)),Ln=(e,n=[])=>{ae(e)?e.forEach(a=>a(...n)):e&&e(...n)},Mu=e=>e?ae(e)?e.some(n=>n.length>1):e.length>1:!1;function cd(e){const n={};for(const K in e)K in sd||(n[K]=e[K]);if(e.css===!1)return n;const{name:a="v",type:i,duration:r,enterFromClass:u=`${a}-enter-from`,enterActiveClass:d=`${a}-enter-active`,enterToClass:v=`${a}-enter-to`,appearFromClass:h=u,appearActiveClass:$=d,appearToClass:k=v,leaveFromClass:x=`${a}-leave-from`,leaveActiveClass:O=`${a}-leave-active`,leaveToClass:H=`${a}-leave-to`}=e,de=ag(r),le=de&&de[0],ne=de&&de[1],{onBeforeEnter:fe,onEnter:F,onEnterCancelled:_e,onLeave:J,onLeaveCancelled:ye,onBeforeAppear:De=fe,onAppear:Ke=F,onAppearCancelled:tt=_e}=n,re=(K,qe,at,bt)=>{K._enterCancelled=bt,on(K,qe?k:v),on(K,qe?$:d),at&&at()},ue=(K,qe)=>{K._isLeaving=!1,on(K,x),on(K,H),on(K,O),qe&&qe()},Ie=K=>(qe,at)=>{const bt=K?Ke:F,Fe=()=>re(qe,K,at);Ln(bt,[qe,Fe]),Nu(()=>{on(qe,K?h:u),hl(qe,K?k:v),Mu(bt)||Tu(qe,i,le,Fe)})};return ot(n,{onBeforeEnter(K){Ln(fe,[K]),hl(K,u),hl(K,d)},onBeforeAppear(K){Ln(De,[K]),hl(K,h),hl(K,$)},onEnter:Ie(!1),onAppear:Ie(!0),onLeave(K,qe){K._isLeaving=!0;const at=()=>ue(K,qe);hl(K,x),K._enterCancelled?(hl(K,O),Sr(K)):(Sr(K),hl(K,O)),Nu(()=>{K._isLeaving&&(on(K,x),hl(K,H),Mu(J)||Tu(K,i,ne,at))}),Ln(J,[K,at])},onEnterCancelled(K){re(K,!1,void 0,!0),Ln(_e,[K])},onAppearCancelled(K){re(K,!0,void 0,!0),Ln(tt,[K])},onLeaveCancelled(K){ue(K),Ln(ye,[K])}})}function ag(e){if(e==null)return null;if(Se(e))return[dr(e.enter),dr(e.leave)];{const n=dr(e);return[n,n]}}function dr(e){return dv(e)}function hl(e,n){n.split(/\s+/).forEach(a=>a&&e.classList.add(a)),(e[Co]||(e[Co]=new Set)).add(n)}function on(e,n){n.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const a=e[Co];a&&(a.delete(n),a.size||(e[Co]=void 0))}function Nu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ig=0;function Tu(e,n,a,i){const r=e._endId=++ig,u=()=>{r===e._endId&&i()};if(a!=null)return setTimeout(u,a);const{type:d,timeout:v,propCount:h}=dd(e,n);if(!d)return i();const $=d+"end";let k=0;const x=()=>{e.removeEventListener($,O),u()},O=H=>{H.target===e&&++k>=h&&x()};setTimeout(()=>{k<h&&x()},v+1),e.addEventListener($,O)}function dd(e,n){const a=window.getComputedStyle(e),i=de=>(a[de]||"").split(", "),r=i(`${nn}Delay`),u=i(`${nn}Duration`),d=qu(r,u),v=i(`${Wo}Delay`),h=i(`${Wo}Duration`),$=qu(v,h);let k=null,x=0,O=0;n===nn?d>0&&(k=nn,x=d,O=u.length):n===Wo?$>0&&(k=Wo,x=$,O=h.length):(x=Math.max(d,$),k=x>0?d>$?nn:Wo:null,O=k?k===nn?u.length:h.length:0);const H=k===nn&&/\b(?:transform|all)(?:,|$)/.test(i(`${nn}Property`).toString());return{type:k,timeout:x,propCount:O,hasTransform:H}}function qu(e,n){for(;e.length<n.length;)e=e.concat(e);return Math.max(...n.map((a,i)=>Eu(a)+Eu(e[i])))}function Eu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Sr(e){return(e?e.ownerDocument:document).body.offsetHeight}function rg(e,n,a){const i=e[Co];i&&(n=(n?[n,...i]:[...i]).join(" ")),n==null?e.removeAttribute("class"):a?e.setAttribute("class",n):e.className=n}const Lu=Symbol("_vod"),fd=Symbol("_vsh"),sg=Symbol(""),ug=/(?:^|;)\s*display\s*:/;function cg(e,n,a){const i=e.style,r=Qe(a);let u=!1;if(a&&!r){if(n)if(Qe(n))for(const d of n.split(";")){const v=d.slice(0,d.indexOf(":")).trim();a[v]==null&&jo(i,v,"")}else for(const d in n)a[d]==null&&jo(i,d,"");for(const d in a){d==="display"&&(u=!0);const v=a[d];v!=null?fg(e,d,!Qe(n)&&n?n[d]:void 0,v)||jo(i,d,v):jo(i,d,"")}}else if(r){if(n!==a){const d=i[sg];d&&(a+=";"+d),i.cssText=a,u=ug.test(a)}}else n&&e.removeAttribute("style");Lu in e&&(e[Lu]=u?i.display:"",e[fd]&&(i.display="none"))}const Ru=/\s*!important$/;function jo(e,n,a){if(ae(a))a.forEach(i=>jo(e,n,i));else if(a==null&&(a=""),n.startsWith("--"))e.setProperty(n,a);else{const i=dg(e,n);Ru.test(a)?e.setProperty(un(i),a.replace(Ru,""),"important"):e[i]=a}}const Bu=["Webkit","Moz","ms"],fr={};function dg(e,n){const a=fr[n];if(a)return a;let i=il(n);if(i!=="filter"&&i in e)return fr[n]=i;i=tc(i);for(let r=0;r<Bu.length;r++){const u=Bu[r]+i;if(u in e)return fr[n]=u}return n}function fg(e,n,a,i){return e.tagName==="TEXTAREA"&&(n==="width"||n==="height")&&Qe(i)&&a===i}const Ou="http://www.w3.org/1999/xlink";function Du(e,n,a,i,r,u=hv(n)){i&&n.startsWith("xlink:")?a==null?e.removeAttributeNS(Ou,n.slice(6,n.length)):e.setAttributeNS(Ou,n,a):a==null||u&&!nc(a)?e.removeAttribute(n):e.setAttribute(n,u?"":Cl(a)?String(a):a)}function Fu(e,n,a,i,r){if(n==="innerHTML"||n==="textContent"){a!=null&&(e[n]=n==="innerHTML"?rd(a):a);return}const u=e.tagName;if(n==="value"&&u!=="PROGRESS"&&!u.includes("-")){const v=u==="OPTION"?e.getAttribute("value")||"":e.value,h=a==null?e.type==="checkbox"?"on":"":String(a);(v!==h||!("_value"in e))&&(e.value=h),a==null&&e.removeAttribute(n),e._value=a;return}let d=!1;if(a===""||a==null){const v=typeof e[n];v==="boolean"?a=nc(a):a==null&&v==="string"?(a="",d=!0):v==="number"&&(a=0,d=!0)}try{e[n]=a}catch{}d&&e.removeAttribute(r||n)}function Dn(e,n,a,i){e.addEventListener(n,a,i)}function pg(e,n,a,i){e.removeEventListener(n,a,i)}const Wu=Symbol("_vei");function vg(e,n,a,i,r=null){const u=e[Wu]||(e[Wu]={}),d=u[n];if(i&&d)d.value=i;else{const[v,h]=hg(n);if(i){const $=u[n]=_g(i,r);Dn(e,v,$,h)}else d&&(pg(e,v,d,h),u[n]=void 0)}}const mg=/(Once|Passive|Capture)$/,gg=/^on:?(?:Once|Passive|Capture)$/;function hg(e){let n,a;for(;(a=e.match(mg))&&!gg.test(e);)n||(n={}),e=e.slice(0,e.length-a[1].length),n[a[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):un(e.slice(2)),n]}let pr=0;const yg=Promise.resolve(),bg=()=>pr||(yg.then(()=>pr=0),pr=Date.now());function _g(e,n){const a=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=a.attached)return;const r=a.value;if(ae(r)){const u=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{u.call(i),i._stopped=!0};const d=r.slice(),v=[i];for(let h=0;h<d.length&&!i._stopped;h++){const $=d[h];$&&Xt($,n,5,v)}}else Xt(r,n,5,[i])};return a.value=e,a.attached=bg(),a}const Vu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,wg=(e,n,a,i,r,u)=>{const d=r==="svg";n==="class"?rg(e,i,d):n==="style"?cg(e,a,i):li(n)?ni(n)||vg(e,n,a,i,u):(n[0]==="."?(n=n.slice(1),!0):n[0]==="^"?(n=n.slice(1),!1):kg(e,n,i,d))?(Fu(e,n,i),!e.tagName.includes("-")&&(n==="value"||n==="checked"||n==="selected")&&Du(e,n,i,d,u,n!=="value")):e._isVueCE&&(Cg(e,n)||e._def.__asyncLoader&&(/[A-Z]/.test(n)||!Qe(i)))?Fu(e,il(n),i,u,n):(n==="true-value"?e._trueValue=i:n==="false-value"&&(e._falseValue=i),Du(e,n,i,d))};function kg(e,n,a,i){if(i)return!!(n==="innerHTML"||n==="textContent"||n in e&&Vu(n)&&ce(a));if(n==="spellcheck"||n==="draggable"||n==="translate"||n==="autocorrect"||n==="sandbox"&&e.tagName==="IFRAME"||n==="form"||n==="list"&&e.tagName==="INPUT"||n==="type"&&e.tagName==="TEXTAREA")return!1;if(n==="width"||n==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Vu(n)&&Qe(a)?!1:n in e}function Cg(e,n){const a=e._def.props;if(!a)return!1;const i=il(n);return Array.isArray(a)?a.some(r=>il(r)===i):Object.keys(a).some(r=>il(r)===i)}const pd=new WeakMap,vd=new WeakMap,Za=Symbol("_moveCb"),ju=Symbol("_enterCb"),Ig=e=>(delete e.props.mode,e),$g=Ig({name:"TransitionGroup",props:ot({},ud,{tag:String,moveClass:String}),setup(e,{slots:n}){const a=Kr(),i=Mc();let r,u;return Bc(()=>{if(!r.length)return;const d=e.moveClass||`${e.name||"v"}-move`;if(!Ag(r[0].el,a.vnode.el,d)){r=[];return}r.forEach(Pg),r.forEach(xg);const v=r.filter(Sg);Sr(a.vnode.el),v.forEach(h=>{const $=h.el,k=$.style;hl($,d),k.transform=k.webkitTransform=k.transitionDuration="";const x=$[Za]=O=>{O&&O.target!==$||(!O||O.propertyName.endsWith("transform"))&&($.removeEventListener("transitionend",x),$[Za]=null,on($,d))};$.addEventListener("transitionend",x)}),r=[]}),()=>{const d=$e(e),v=cd(d);let h=d.tag||V;if(r=[],u)for(let $=0;$<u.length;$++){const k=u[$];k.el&&k.el instanceof Element&&!k.el[fd]&&(r.push(k),Vn(k,ea(k,v,i,a)),pd.set(k,md(k.el)))}u=n.default?Wr(n.default()):[];for(let $=0;$<u.length;$++){const k=u[$];k.key!=null&&Vn(k,ea(k,v,i,a))}return Ce(h,null,u)}}}),Oa=$g;function Pg(e){const n=e.el;n[Za]&&n[Za](),n[ju]&&n[ju]()}function xg(e){vd.set(e,md(e.el))}function Sg(e){const n=pd.get(e),a=vd.get(e),i=n.left-a.left,r=n.top-a.top;if(i||r){const u=e.el,d=u.style,v=u.getBoundingClientRect();let h=1,$=1;return u.offsetWidth&&(h=v.width/u.offsetWidth),u.offsetHeight&&($=v.height/u.offsetHeight),(!Number.isFinite(h)||h===0)&&(h=1),(!Number.isFinite($)||$===0)&&($=1),Math.abs(h-1)<.01&&(h=1),Math.abs($-1)<.01&&($=1),d.transform=d.webkitTransform=`translate(${i/h}px,${r/$}px)`,d.transitionDuration="0s",e}}function md(e){const n=e.getBoundingClientRect();return{left:n.left,top:n.top}}function Ag(e,n,a){const i=e.cloneNode(),r=e[Co];r&&r.forEach(v=>{v.split(/\s+/).forEach(h=>h&&i.classList.remove(h))}),a.split(/\s+/).forEach(v=>v&&i.classList.add(v)),i.style.display="none";const u=n.nodeType===1?n:n.parentNode;u.appendChild(i);const{hasTransform:d}=dd(i);return u.removeChild(i),d}const ei=e=>{const n=e.props["onUpdate:modelValue"]||!1;return ae(n)?a=>Fa(n,a):n};function Mg(e){e.target.composing=!0}function Uu(e){const n=e.target;n.composing&&(n.composing=!1,n.dispatchEvent(new Event("input")))}const wo=Symbol("_assign");function Hu(e,n,a){return n&&(e=e.trim()),a&&(e=ii(e)),e}const Re={created(e,{modifiers:{lazy:n,trim:a,number:i}},r){e[wo]=ei(r);const u=i||r.props&&r.props.type==="number";Dn(e,n?"change":"input",d=>{d.target.composing||e[wo](Hu(e.value,a,u))}),(a||u)&&Dn(e,"change",()=>{e.value=Hu(e.value,a,u)}),n||(Dn(e,"compositionstart",Mg),Dn(e,"compositionend",Uu),Dn(e,"change",Uu))},mounted(e,{value:n}){e.value=n??""},beforeUpdate(e,{value:n,oldValue:a,modifiers:{lazy:i,trim:r,number:u}},d){if(e[wo]=ei(d),e.composing)return;const v=(u||e.type==="number")&&!/^0\d/.test(e.value)?ii(e.value):e.value,h=n??"";if(v===h)return;const $=e.getRootNode();($ instanceof Document||$ instanceof ShadowRoot)&&$.activeElement===e&&e.type!=="range"&&(i&&n===a||r&&e.value.trim()===h)||(e.value=h)}},Ku={deep:!0,created(e,{value:n,modifiers:{number:a}},i){const r=oi(n);Dn(e,"change",()=>{const u=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>a?ii(ti(d)):ti(d));e[wo](e.multiple?r?new Set(u):u:u[0]),e._assigning=!0,rn(()=>{e._assigning=!1})}),e[wo]=ei(i)},mounted(e,{value:n}){Gu(e,n)},beforeUpdate(e,n,a){e[wo]=ei(a)},updated(e,{value:n}){e._assigning||Gu(e,n)}};function Gu(e,n){const a=e.multiple,i=ae(n);if(!(a&&!i&&!oi(n))){for(let r=0,u=e.options.length;r<u;r++){const d=e.options[r],v=ti(d);if(a)if(i){const h=typeof v;h==="string"||h==="number"?d.selected=n.some($=>String($)===String(v)):d.selected=bv(n,v)>-1}else d.selected=n.has(v);else if(oa(ti(d),n)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!a&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ti(e){return"_value"in e?e._value:e.value}const Ng=["ctrl","shift","alt","meta"],Tg={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,n)=>Ng.some(a=>e[`${a}Key`]&&!n.includes(a))},Rn=(e,n)=>{if(!e)return e;const a=e._withMods||(e._withMods={}),i=n.join(".");return a[i]||(a[i]=((r,...u)=>{for(let d=0;d<n.length;d++){const v=Tg[n[d]];if(v&&v(r,n))return}return e(r,...u)}))},qg={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Eg=(e,n)=>{const a=e._withKeys||(e._withKeys={}),i=n.join(".");return a[i]||(a[i]=(r=>{if(!("key"in r))return;const u=un(r.key);if(n.some(d=>d===u||qg[d]===u))return e(r)}))},Lg=ot({patchProp:wg},ng);let zu;function Rg(){return zu||(zu=Rm(Lg))}const Bg=((...e)=>{const n=Rg().createApp(...e),{mount:a}=n;return n.mount=i=>{const r=Dg(i);if(!r)return;const u=n._component;!ce(u)&&!u.render&&!u.template&&(u.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const d=a(r,!1,Og(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),d},n});function Og(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Dg(e){return Qe(e)?document.querySelector(e):e}const Fg="/api/v1/plugins/extensions/astrbot_plugin_imagestudio",L={uiBootstrap:"ui/bootstrap",uiActions:"ui/actions",dashboardSummary:"dashboard/summary",profiles:"profiles",profile:e=>`profiles/${e}`,profileArchive:e=>`profiles/${e}/archive`,quickProfileDraft:"profiles/quick-draft",quickProfileDraftSave:"profiles/quick-draft/save",profileWorkflows:e=>`profiles/${e}/workflows`,workflow:e=>`workflows/${e}`,workflowStart:e=>`workflows/${e}/start`,workflowCancel:e=>`workflows/${e}/cancel`,workflowArchive:e=>`workflows/${e}/archive`,workflowExecuteCharacter:e=>`workflows/${e}/execute-character`,workflowNodes:e=>`workflows/${e}/nodes`,workflowBranches:e=>`workflows/${e}/branches`,workflowSwitchBranch:e=>`workflows/${e}/switch-branch`,workflowHistory:e=>`workflows/${e}/history`,node:e=>`nodes/${e}`,nodeGenerate:e=>`nodes/${e}/generate`,nodeRetry:e=>`nodes/${e}/retry`,nodeComplete:e=>`nodes/${e}/complete`,nodeMarkCompleted:e=>`nodes/${e}/mark-completed`,nodeSelectImage:e=>`nodes/${e}/select-image`,nodeAdoptImage:e=>`nodes/${e}/adopt-image`,reviewPolicy:"review/policy",reviewPolicyValidate:"review/policy/validate",reviewPolicySave:"review/policy/save",nodeReview:e=>`nodes/${e}/review`,nodeImages:e=>`nodes/${e}/images`,workflowReview:e=>`workflows/${e}/review`,image:e=>`images/${e}`,imageSelect:e=>`images/${e}/select`,imageUnselect:e=>`images/${e}/unselect`,imageArchive:e=>`images/${e}/archive`,jobs:"jobs",job:e=>`jobs/${e}`,jobCancel:e=>`jobs/${e}/cancel`,jobRetry:e=>`jobs/${e}/retry`,jobDeadLetterRetry:"jobs/dead-letter/retry",jobDeadLetterMoveFailed:"jobs/dead-letter/move-failed",settingsSchema:"settings/schema",settingsCurrent:"settings/current",settingsValidate:"settings/validate",settingsDiff:"settings/diff",settingsSave:"settings/save",settingsReload:"settings/reload",settingsExport:"settings/export",settingsImport:"settings/import",settingsSnapshots:"settings/snapshots",settingsSnapshot:e=>`settings/snapshots/${e}`,settingsRollback:"settings/rollback",storageStatus:"storage/status",storageMigrate:"storage/migrate",mediaSign:"media/sign",materialCategories:"material-categories",materialCategory:e=>`material-categories/${e}`,materials:"materials",materialUpload:"materials/upload",material:e=>`materials/${e}`,materialRecognize:e=>`materials/${e}/recognize`,materialReRecognize:e=>`materials/${e}/re-recognize`,materialConfirm:e=>`materials/${e}/confirm`,assetImportPack:"assets/import-pack",wardrobe:e=>`profiles/${e}/wardrobe`,wardrobeImportMaterial:e=>`profiles/${e}/wardrobe/import-material`,wardrobeItems:e=>`profiles/${e}/wardrobe/items`,wardrobeItem:(e,n)=>`profiles/${e}/wardrobe/items/${n}`,wardrobeLegacyItem:(e,n)=>`profiles/${e}/wardrobe/${n}`,wardrobeMatch:e=>`profiles/${e}/wardrobe/match`,privateCompanionDailyOutfit:"integrations/private-companion/daily-outfit",integrationEventLogs:"integrations/logs",apiDiscoveryDialects:"api-discovery/dialects",apiDiscoveryProbeProvider:"api-discovery/probe-provider",apiDiscoveryProbeModel:"api-discovery/probe-model",apiDiscoveryCapabilities:"api-discovery/capabilities",apiDiscoveryManualOverride:"api-discovery/manual-override",apiDiscoveryValidateRenderPlan:"api-discovery/validate-render-plan",generationLogs:"logs/generation",workflowLogs:"logs/workflows",errorLogs:"logs/errors",integrationLogs:"logs/integrations",auditLogs:"security/audit-logs",eventStream:"events/stream",webManifest:"web/manifest"};class jn extends Error{constructor(a,i,r={}){super(i);tr(this,"code");tr(this,"details");this.name="ApiClientError",this.code=a,this.details=r}}async function Ue(e,n){return Gr(e,{method:"GET",query:n})}async function Ee(e,n){return Gr(e,{method:"POST",body:n})}async function vr(e,n){return Gr(e,{method:"PUT",body:n})}function mr(){const e=typeof window>"u"?void 0:window.AstrBotPluginPage;return e&&(typeof e.apiGet=="function"||typeof e.apiPost=="function")?"plugin-bridge":"direct-fetch"}async function Gr(e,n={}){const a=await Wg(e,n);if(a!==void 0)return Qu(a);const i=Ug(e,n.query);let r;try{r=await fetch(i,{method:n.method??"GET",headers:n.body===void 0?void 0:{"Content-Type":"application/json"},body:n.body===void 0?void 0:JSON.stringify(n.body)})}catch(d){throw new jn("network_unreachable","无法连接 ImageStudio 后端接口",{endpoint:e,transport:"direct-fetch",url:i,reason:d instanceof Error?d.message:String(d)})}const u=await Vg(r,e,i);if(!r.ok&&!gd(u))throw new jn("http_error",`接口请求失败(HTTP ${r.status})`,{endpoint:e,transport:"direct-fetch",url:i,status:r.status,status_text:r.statusText});return Qu(u)}async function Wg(e,n){const a=window.AstrBotPluginPage;if(!a)return;const i=n.method??"GET";if(typeof a.ready=="function"&&await a.ready(),i==="GET"&&typeof a.apiGet=="function")return a.apiGet(e,jg(n.query));if(i==="POST"&&typeof a.apiPost=="function")return a.apiPost(e,n.body);if(i==="PUT"&&typeof a.apiPut=="function")return a.apiPut(e,n.body);if(i==="DELETE"&&typeof a.apiDelete=="function")return a.apiDelete(e)}function Qu(e){if(!gd(e))return e;if(!e.ok)throw new jn(e.error_code,e.message,e.details);return e.data}async function Vg(e,n,a){const i=e.headers.get("content-type")??"";if(!(i.includes("application/json")||i.includes("+json"))){const u=(await e.text()).slice(0,240);throw new jn("invalid_api_response","接口返回了非 JSON 响应",{endpoint:n,transport:"direct-fetch",url:a,status:e.status,status_text:e.statusText,content_type:i,preview:u})}try{return await e.json()}catch(u){throw new jn("invalid_api_response","接口返回格式不正确",{endpoint:n,transport:"direct-fetch",url:a,status:e.status,status_text:e.statusText,content_type:i,reason:u instanceof Error?u.message:String(u)})}}function gd(e){return!!(e&&typeof e=="object"&&"ok"in e)}function jg(e){if(!e)return;const n={};for(const[a,i]of Object.entries(e))i!==void 0&&(n[a]=i);return n}function Ug(e,n){const a=e.replace(/^\/+/,""),i=new URL(`${Fg}/${a}`,window.location.origin);for(const[r,u]of Object.entries(n??{}))u!==void 0&&i.searchParams.set(r,String(u));return`${i.pathname}${i.search}`}const Hg=["data-theme"],Kg={class:"brand"},Gg={class:"icon-nav"},zg={class:"nav-scroll"},Qg=["title","aria-label","onClick"],Jg={class:"nav-glyph","aria-hidden":"true"},Yg={class:"nav-label"},Xg={class:"workbench"},Zg={class:"topbar"},eh={class:"active-heading"},th={class:"search-box","data-overlay-root":"search"},lh={key:0,class:"search-results"},nh=["onMousedown"],oh={key:0},ah={class:"top-actions"},ih=["aria-checked","title"],rh={class:"notification-wrap","data-overlay-root":"notifications"},sh=["aria-expanded"],uh={key:0},ch={class:"notification-popover"},dh={key:0},fh=["aria-expanded"],ph={class:"log-wrap","data-overlay-root":"logs"},vh=["aria-expanded"],mh={key:0,id:"log-popover",class:"log-popover","data-overlay-root":"logs"},gh={key:0,class:"state-card bad"},hh={key:"empty",class:"empty-row"},yh=["title"],bh=["disabled"],_h={key:0,id:"palette-panel",class:"palette-panel","data-overlay-root":"palette"},wh=["onClick"],kh={key:0,id:"notification-panel",class:"notification-panel","data-overlay-root":"notifications"},Ch={class:"filter-tabs"},Ih=["onClick"],$h=["src"],Ph={key:1},xh=["onClick"],Sh={key:"empty",class:"empty-row"},Ah={key:1,class:"generate-page","data-module":"generate"},Mh={class:"generate-hero"},Nh={class:"generate-mode-actions","aria-label":"生成模式入口"},Th=["aria-pressed","onClick"],qh={key:0,class:"image-generation-workspace"},Eh={class:"image-generation-canvas"},Lh={class:"image-preview-panel"},Rh={key:0,class:"image-preview-list"},Bh=["onClick"],Oh={class:"preview-thumb"},Dh=["src","alt"],Fh={key:1},Wh={key:1,class:"image-preview-empty"},Vh={class:"image-display-panel"},jh={class:"image-stage"},Uh=["title"],Hh=["src","alt"],Kh={key:1,class:"image-stage-empty"},Gh={class:"image-info-card"},zh={class:"image-composer"},Qh={class:"image-composer-input"},Jh={key:0,class:"image-composer-hint","aria-hidden":"true"},Yh={class:"image-last-request"},Xh={class:"image-composer-toolbar"},Zh={class:"image-composer-left"},ey={class:"model-select-control",title:"选择生图模型"},ty=["disabled"],ly=["value"],ny={key:0,class:"model-state"},oy={key:1,class:"model-state"},ay={key:2,class:"model-state"},iy={key:3,class:"model-state"},ry={class:"image-composer-right"},sy=["disabled"],uy=["aria-label"],cy={class:"image-viewer-card","data-overlay-root":"imageViewer"},dy={class:"image-viewer-actions"},fy=["src","alt"],py={key:0,class:"image-viewer-backdrop workflow-compare-backdrop",role:"dialog","aria-modal":"true","aria-label":"草稿平铺对比"},vy={class:"workflow-compare-card","data-overlay-root":"imageViewer"},my={class:"image-viewer-actions"},gy=["title","onClick"],hy=["src","alt"],yy={key:1,class:"quick-profile-workspace"},by={class:"quick-profile-layout"},_y={class:"quick-profile-surface quick-profile-library"},wy={class:"quick-profile-section-header"},ky={class:"quick-profile-library-list"},Cy=["data-profile-card-id","onClick"],Iy={class:"quick-profile-library-thumb"},$y=["src","alt"],Py={class:"quick-profile-library-copy"},xy={class:"quick-profile-library-meta"},Sy={class:"quick-profile-surface quick-profile-detail"},Ay={class:"quick-profile-profile-card"},My=["title"],Ny=["src","alt"],Ty={class:"quick-profile-profile-field name"},qy={class:"quick-profile-profile-field identity"},Ey={class:"quick-profile-profile-field style"},Ly={class:"quick-profile-profile-field summary"},Ry={class:"quick-profile-surface quick-profile-image-panel"},By={class:"quick-profile-section-header"},Oy={class:"quick-profile-hero-image"},Dy=["title"],Fy=["src","alt"],Wy={class:"quick-profile-image-types"},Vy=["onClick"],jy=["src","alt"],Uy={class:"quick-profile-surface quick-profile-material-zone"},Hy={class:"quick-profile-section-header"},Ky={class:"quick-profile-material-strip"},Gy=["data-material-category","aria-expanded","onClick"],zy=["src","alt"],Qy={key:1,class:"quick-profile-empty-media-mark"},Jy={class:"quick-profile-material-copy"},Yy={class:"quick-profile-material-picker-header"},Xy={key:0,class:"quick-profile-material-picker-groups","aria-label":"配饰分类"},Zy=["onClick"],eb=["data-material-reference-id","onClick"],tb={class:"quick-profile-material-picker-media"},lb=["src","alt"],nb={class:"quick-profile-material-picker-copy"},ob={key:0},ab={class:"quick-profile-material-picker-copy"},ib={class:"quick-profile-surface quick-profile-command-zone"},rb={class:"quick-profile-section-header"},sb={class:"quick-profile-command-list"},ub={class:"quick-profile-command-top"},cb={class:"feature-badge"},db=["onClick"],fb={key:3,class:"feature-action"},pb={key:0,class:"image-viewer-backdrop quick-profile-detail-backdrop",role:"dialog","aria-modal":"true","aria-label":"角色设定详情"},vb={class:"quick-profile-detail-card","data-overlay-root":"quickProfileDetail"},mb=["src","alt"],gb={class:"quick-profile-detail-card-info"},hb=["aria-label"],yb={class:"quick-profile-viewer-card","data-overlay-root":"imageViewer"},bb=["src","alt"],_b={class:"quick-profile-viewer-info"},wb={key:2,class:"workflow-workspace"},kb=["disabled"],Cb={class:"generate-status-grid workflow-status-grid"},Ib={class:"workflow-layout"},$b={class:"workflow-surface workflow-node-flow"},Pb={class:"workflow-section-header"},xb={class:"workflow-node-list"},Sb=["disabled","onClick"],Ab={class:"workflow-group-index"},Mb={class:"workflow-group-copy"},Nb={class:"workflow-node-progress","aria-hidden":"true"},Tb={class:"workflow-node-meta"},qb={key:0,class:"workflow-subnode-list"},Eb=["onClick"],Lb={class:"workflow-subnode-index"},Rb={class:"workflow-subnode-copy"},Bb={class:"workflow-surface workflow-preview-panel"},Ob={class:"workflow-section-header"},Db={key:0,class:"workflow-preview-tools workflow-preview-tools-split"},Fb={key:1,class:"workflow-preview-tools workflow-preview-tools-import"},Wb={key:2,class:"workflow-preview-tools workflow-preview-tools-import"},Vb={key:3,class:"workflow-preview-tools"},jb={key:4,class:"workflow-preview-tools workflow-preview-tools-import"},Ub={key:0,class:"workflow-profile-import-stage"},Hb={class:"workflow-profile-import-card select"},Kb={class:"workflow-profile-import-list"},Gb=["data-profile-card-id","onClick"],zb={class:"workflow-profile-import-profile-field name"},Qb={class:"workflow-profile-import-profile-field identity"},Jb={class:"workflow-profile-import-profile-field style"},Yb={class:"workflow-profile-import-profile-field summary"},Xb={class:"workflow-profile-import-current"},Zb={key:1,class:"workflow-persona-split-stage"},e1={class:"workflow-persona-split-fields"},t1={key:2,class:"workflow-prompt-plan-stage"},l1={class:"workflow-prompt-plan-list"},n1={class:"workflow-prompt-plan-guard"},o1={key:3,class:"workflow-material-bind-stage"},a1=["data-material-category","aria-expanded","onClick"],i1={class:"workflow-material-bind-copy"},r1={class:"workflow-material-bind-stages"},s1={class:"quick-profile-material-picker-header"},u1={key:0,class:"quick-profile-material-picker-groups","aria-label":"配饰分类"},c1=["onClick"],d1=["data-material-reference-id","onClick"],f1={class:"quick-profile-material-picker-media"},p1=["src","alt"],v1={class:"quick-profile-material-picker-copy"},m1={key:0},g1={class:"quick-profile-material-picker-copy"},h1=["title","onClick"],y1=["src","alt"],b1={class:"workflow-preview-caption"},_1={key:1,class:"image-stage-empty"},w1={key:5,class:"workflow-draft-board"},k1={class:"workflow-draft-grid"},C1=["disabled","onClick"],I1={class:"workflow-draft-thumb"},$1=["src","alt"],P1={key:1},x1={class:"workflow-draft-copy"},S1={class:"workflow-section-header"},A1={key:0,class:"workflow-persona-split-summary detail"},M1={key:1,class:"workflow-node-info"},N1={key:2,class:"workflow-lock-notice"},T1={key:3,class:"workflow-lock-notice"},q1={class:"workflow-actions"},E1={key:0},L1={key:1},R1={key:2},B1={key:3},O1={key:4},D1={class:"workflow-action-grid"},F1={class:"feature-badge"},W1=["disabled","onClick"],V1={key:1,class:"feature-action"},j1={class:"image-chat-intro"},U1={class:"image-composer"},H1={class:"image-composer-input"},K1=["disabled"],G1={key:0,class:"image-composer-hint","aria-hidden":"true"},z1={class:"image-last-request"},Q1={class:"image-composer-toolbar"},J1={class:"image-composer-left"},Y1={class:"model-select-control",title:"选择生图模型"},X1=["disabled"],Z1=["value"],e_={key:0,class:"model-state"},t_={key:1,class:"model-state"},l_={class:"image-composer-right"},n_=["disabled"],o_={id:"workflow-compare-panel",class:"workflow-compare-native-backdrop",role:"dialog","aria-modal":"true","aria-label":"草稿平铺对比"},a_={class:"workflow-compare-card"},i_={class:"image-viewer-actions"},r_=["src","alt"],s_=["aria-label"],u_={class:"image-viewer-card","data-overlay-root":"imageViewer"},c_={class:"image-viewer-actions"},d_=["src","alt"],f_={key:0,class:"image-viewer-backdrop external-profile-import-backdrop",role:"dialog","aria-modal":"true","aria-label":"导入外部角色卡"},p_={class:"external-profile-import-card","data-overlay-root":"externalProfileImport"},v_={class:"external-profile-import-body"},m_={class:"external-profile-import-source"},g_={class:"external-profile-import-preview","aria-live":"polite"},h_=["disabled"],y_={key:0,class:"image-viewer-backdrop persona-questionnaire-backdrop",role:"dialog","aria-modal":"true","aria-label":"创建角色档案问卷"},b_={class:"persona-questionnaire-card","data-overlay-root":"personaQuestionnaire"},__={class:"persona-questionnaire-body"},w_={class:"wide"},k_={class:"persona-questionnaire-footer-actions"},C_={class:"questionnaire-mode-switch",role:"group","aria-label":"问卷复杂度"},I_=["disabled"],$_={key:2,class:"materials-page","data-module":"images"},P_={class:"materials-hero"},x_={class:"materials-hero-actions"},S_=["disabled"],A_={class:"materials-status-grid"},M_=["disabled"],N_={class:"materials-workbench"},T_={class:"materials-main-column"},q_={class:"panel materials-library-panel"},E_={class:"materials-filter-strip","aria-label":"素材分类筛选"},L_=["title","onClick"],R_=["title"],B_={key:0,class:"materials-subfilter-strip","aria-label":"配饰子分类筛选"},O_=["onClick"],D_={key:1,class:"skeleton-list materials-skeleton-list"},F_={key:2,class:"materials-library-grid"},W_=["onClick"],V_={class:"materials-library-thumb"},j_=["src","alt"],U_={class:"materials-library-copy"},H_={class:"materials-library-tags"},K_={key:3,class:"empty-state"},G_={class:"materials-side-column"},z_={class:"panel materials-actions-panel"},Q_={class:"materials-action-grid"},J_=["disabled","onClick"],Y_=["aria-label"],X_={class:"materials-category-create-body"},Z_=["placeholder"],ew={key:0,class:"materials-category-create-error"},tw=["disabled"],lw=["aria-label"],nw={class:"materials-detail-card","data-overlay-root":"materialDetail"},ow={class:"materials-detail-card-preview"},aw=["src","alt"],iw={class:"materials-detail-card-info"},rw={key:3,class:"queue-page"},sw={class:"queue-hero"},uw={class:"queue-hero-actions"},cw=["disabled"],dw={class:"queue-status-grid"},fw={class:"queue-workbench"},pw={class:"panel queue-board-panel"},vw={class:"queue-filter-tabs",role:"tablist","aria-label":"队列筛选"},mw=["onClick"],gw={key:0,class:"skeleton-list queue-skeleton-list"},hw={key:1,class:"queue-task-list"},yw=["onClick"],bw={class:"queue-task-status"},_w={class:"queue-task-main"},ww={class:"progress-track","aria-hidden":"true"},kw={class:"queue-task-meta"},Cw={key:2,class:"empty-state"},Iw={class:"queue-side-column"},$w={class:"panel queue-detail-panel"},Pw={class:"panel queue-actions-panel"},xw={class:"queue-action-grid"},Sw=["disabled","onClick"],Aw={class:"overview-strip","data-module":"overview"},Mw={class:"welcome-copy"},Nw={class:"dashboard-layout"},Tw={class:"main-column"},qw={class:"panel monitor-panel performance-summary-panel","data-module":"monitor"},Ew={key:0,class:"state-card bad"},Lw={class:"summary-metric-grid"},Rw={class:"panel queue-panel","data-module":"queue"},Bw=["disabled"],Ow={key:0,class:"state-card bad"},Dw={key:1,class:"skeleton-list"},Fw={key:2,class:"queue-list"},Ww={class:"queue-main"},Vw={class:"progress-track"},jw={key:3,class:"empty-state"},Uw={class:"panel suggestions-panel","data-module":"suggestions"},Hw={key:0,class:"suggestion-grid"},Kw=["onClick"],Gw={key:1,class:"empty-state calm"},zw={class:"monitor-column","data-module":"images"},Qw={class:"panel images-panel side-images-panel"},Jw={key:0,class:"state-card bad"},Yw={key:1,class:"side-image-list"},Xw={key:2,class:"side-image-list"},Zw={class:"thumb"},ek=["src","alt"],tk={key:1},lk={key:3,class:"empty-state"},nk={key:5,class:"performance-detail-page","data-module":"performance"},ok={class:"detail-hero"},ak=["disabled"],ik={key:0,class:"state-card bad detail-error"},rk={class:"performance-metric-grid"},sk={class:"performance-detail-grid"},uk={class:"panel performance-breakdown"},ck={class:"panel performance-breakdown"},dk={class:"panel performance-breakdown"},He="配饰",mo="全部",fk=12e3,Ju=1600,pk=34,vk=138,gr="ImageStudio Single Image",Da="standalone_single_image",mk="character_gradual",gk=om({__name:"App",setup(e){const n=[{key:"overview",label:"概览",icon:"□",module:"overview"},{key:"generate",label:"生成",icon:"+",module:"generate"},{key:"queue",label:"队列",icon:"≡",module:"queue"},{key:"performance",label:"性能",icon:"%",module:"performance"},{key:"gallery",label:"图库",icon:"▧",module:"images"},{key:"profiles",label:"角色",icon:"◇",module:"suggestions"},{key:"materials",label:"素材",icon:"◫",module:"images"},{key:"settings",label:"设置",icon:"◎",module:"settings"},{key:"logs",label:"日志",icon:"!",module:"logs"}],i=["overview","generate","materials","profiles","gallery","settings","logs"].map(t=>n.find(l=>l.key===t)).filter(t=>!!t),r=[{key:"image",label:"图片生成",detail:"提示词、模型、素材和结果"},{key:"quickProfile",label:"快速角色",detail:"角色草稿、素材和衣橱"},{key:"workflow",label:"角色工作流",detail:"多节点流程、队列和审核"}],u={image:["new-generation","prompt-compose","node-generate","model-route","material-pick","queue-control","review-select","gallery-archive"],quickProfile:["quick-profile","prompt-compose","material-pick","wardrobe-match","daily-outfit","gallery-archive"],workflow:["workflow-create","node-generate","model-route","material-pick","wardrobe-match","queue-control","review-select","gallery-archive"]},v=[{title:"星港夜巡",prompt:"银发少女站在星港甲板,远处是蓝绿色航灯,电影感半身像。",nodeId:"node-portrait-01",workflowId:"wf-starry-port",profileId:"profile-sora",model:"Nova Diffusion XL",size:"1024 x 1365",seed:"410239",duration:"12.4s",status:"已生成",source:"自然语言对话",colors:["#7168f0","#2fbda8","#f5c542"],createdAt:"2026-07-06T09:48:00+08:00"},{title:"雨巷霓光",prompt:"黑色短发角色撑透明伞,雨夜霓虹街头,湿润反光和浅景深。",nodeId:"node-scene-02",workflowId:"wf-neon-rain",profileId:"profile-luna",model:"Aurora RealMix",size:"1344 x 768",seed:"872114",duration:"9.8s",status:"已生成",source:"角色工作流",colors:["#3f7edc","#d65b7f","#20c997"],createdAt:"2026-07-06T10:06:00+08:00"},{title:"晨雾庭院",prompt:"白裙角色坐在古典庭院台阶,晨雾和柔光,清透水彩质感。",nodeId:"node-style-03",workflowId:"wf-garden-mist",profileId:"profile-yuan",model:"Pastel Story v3",size:"960 x 1280",seed:"165403",duration:"14.1s",status:"已精选",source:"快速角色",colors:["#209b8d","#f2a65a","#ffffff"],createdAt:"2026-07-06T10:24:00+08:00"},{title:"机房蓝焰",prompt:"赛博工程师检查发光服务器核心,冷蓝背景和橙色焊光。",nodeId:"node-tech-04",workflowId:"wf-core-lab",profileId:"profile-kai",model:"Mecha Vision Pro",size:"1536 x 864",seed:"339821",duration:"11.7s",status:"待审核",source:"节点重试",colors:["#1d4ed8","#f97316","#0f172a"],createdAt:"2026-07-06T10:41:00+08:00"},{title:"樱雪回廊",prompt:"粉色樱花与细雪同时落下,角色回头微笑,日系插画质感。",nodeId:"node-character-05",workflowId:"wf-sakura-snow",profileId:"profile-mika",model:"Anime Bloom 2.1",size:"1152 x 1536",seed:"520778",duration:"16.3s",status:"已生成",source:"自然语言对话",colors:["#ec4899","#93c5fd","#fef3c7"],createdAt:"2026-07-06T11:03:00+08:00"},{title:"荒原信标",prompt:"披风旅人在荒原信标下停步,沙尘、落日和长焦压缩空间。",nodeId:"node-world-06",workflowId:"wf-desert-beacon",profileId:"profile-ash",model:"Cinematic Render 5",size:"1408 x 896",seed:"704516",duration:"10.2s",status:"已归档",source:"工作流续跑",colors:["#d2a23a","#b45309","#334155"],createdAt:"2026-07-06T11:22:00+08:00"},{title:"海底图书馆",prompt:"透明穹顶下的海底图书馆,漂浮书页、鲸影和青色光束。",nodeId:"node-fantasy-07",workflowId:"wf-ocean-library",profileId:"profile-nami",model:"Dreamscape SDXL",size:"1216 x 912",seed:"918062",duration:"13.6s",status:"已生成",source:"素材引用",colors:["#0f766e","#06b6d4","#8b5cf6"],createdAt:"2026-07-06T11:39:00+08:00"},{title:"月台独白",prompt:"深夜空月台,角色靠着站牌写信,低饱和胶片颗粒和背光。",nodeId:"node-mood-08",workflowId:"wf-empty-platform",profileId:"profile-ren",model:"Film Grain Portrait",size:"1024 x 1024",seed:"246905",duration:"8.9s",status:"已生成",source:"自然语言对话",colors:["#475569","#a78bfa","#f8fafc"],createdAt:"2026-07-06T11:57:00+08:00"},{title:"玻璃温室",prompt:"玻璃温室中被藤蔓围绕的研究员,阳光碎片和绿色散景。",nodeId:"node-light-09",workflowId:"wf-glasshouse",profileId:"profile-ivy",model:"Soft Light Alpha",size:"896 x 1344",seed:"631480",duration:"15.5s",status:"待选图",source:"角色工作流",colors:["#22c55e","#84cc16","#eab308"],createdAt:"2026-07-06T12:15:00+08:00"},{title:"极昼列车",prompt:"极昼雪原上的高速列车,角色站在车窗旁,银白与淡金色调。",nodeId:"node-final-10",workflowId:"wf-polar-train",profileId:"profile-elin",model:"Hyper Detail 4K",size:"1600 x 900",seed:"803177",duration:"18.8s",status:"已精选",source:"最终成片",colors:["#e0f2fe","#38bdf8","#f59e0b"],createdAt:"2026-07-06T12:32:00+08:00"}].map((t,l)=>{const s=tn(l+1,t.title,t.prompt,t.colors,Bp(t.size)),c=`mock-generate-${String(l+1).padStart(2,"0")}`;return{image_id:c,node_id:t.nodeId,workflow_id:t.workflowId,profile_id:t.profileId,image_uri:`mock://generate/${c}`,thumbnail_uri:`mock://generate/${c}/thumbnail`,image_url:s,thumbnail_url:s,created_at:t.createdAt,title:t.title,prompt:t.prompt,model:t.model,size:t.size,seed:t.seed,duration:t.duration,status:t.status,source:t.source}}),h=[{id:"qp-material-style",label:"清透赛博插画",category:"风格",prompt:"clean cyber illustration, soft rim light, high detail, fresh color contrast",colors:["#3f7edc","#d65b7f","#2ec4b6"]},{id:"qp-material-portrait",label:"半身角色参考",category:"构图",prompt:"upper body character reference, clean silhouette, front view",colors:["#7168f0","#2fbda8","#f5c542"]},{id:"qp-material-outfit",label:"轻机能外套",category:"服装",prompt:"short utility jacket, layered black and teal outfit, compact accessories",colors:["#2f7a60","#111827","#d2a23a"]},{id:"qp-material-boots",label:"短靴结构",category:"鞋袜",prompt:"compact short boots, light mechanical sole, practical sci-fi design",colors:["#111827","#64748b","#2fbda8"]},{id:"qp-material-accessory",label:"发光臂章",category:"配饰",group:"臂部",prompt:"glowing armband, slim tactical accessory, small luminous details",colors:["#0f766e","#38bdf8","#f8fafc"]}],$={构图:[{label:"全身站姿参考",prompt:"full body standing reference, balanced silhouette, clean pose guide",colors:["#2f7a60","#d2a23a","#111827"]},{label:"双人互动构图",prompt:"two character interaction composition, clear spacing, narrative pose",colors:["#3f7edc","#2ec4b6","#f5c542"]},{label:"近景表情构图",prompt:"close-up expression framing, eye focus, soft portrait crop",colors:["#7168f0","#d65b7f","#f8fafc"]},{label:"动态奔跑构图",prompt:"dynamic running pose reference, diagonal motion, energetic silhouette",colors:["#0f766e","#38bdf8","#111827"]},{label:"背影回头构图",prompt:"back view looking over shoulder, clean negative space, elegant framing",colors:["#64748b","#a78bfa","#e0f2fe"]}],服装:[{label:"学院制服层次",prompt:"academy uniform layers, ribbon detail, clean tailored silhouette",colors:["#1e3a8a","#f8fafc","#d97706"]},{label:"户外斗篷套装",prompt:"outdoor cloak outfit, travel-ready layers, practical accessories",colors:["#475569","#84cc16","#d2a23a"]},{label:"轻甲战术装",prompt:"light armor tactical outfit, compact plates, flexible fabric",colors:["#111827","#64748b","#38bdf8"]},{label:"礼服披肩",prompt:"formal dress with shoulder cape, refined fabric folds, elegant trim",colors:["#d65b7f","#7168f0","#fef3c7"]},{label:"街头机能穿搭",prompt:"streetwear utility outfit, straps, pockets, relaxed silhouette",colors:["#0f766e","#111827","#f97316"]}],风格:[{label:"柔光厚涂",prompt:"soft light painterly rendering, smooth brush texture, warm highlights",colors:["#f2a65a","#93c5fd","#f8fafc"]},{label:"赛博冷光",prompt:"cyber cool lighting, crisp rim light, high contrast details",colors:["#1d4ed8","#06b6d4","#0f172a"]},{label:"水彩透明感",prompt:"transparent watercolor look, gentle edges, airy color wash",colors:["#2ec4b6","#e0f2fe","#d65b7f"]},{label:"胶片颗粒",prompt:"cinematic film grain, muted tones, soft lens atmosphere",colors:["#475569","#a78bfa","#f8fafc"]},{label:"清线漫画风",prompt:"clean line manga style, readable shapes, precise ink details",colors:["#111827","#f8fafc","#f5c542"]}],配饰:[{label:"透明护目镜",group:"眼部",prompt:"transparent goggles, subtle reflections, compact sci-fi accessory",colors:["#38bdf8","#f8fafc","#64748b"]},{label:"金属耳机",group:"头部",prompt:"metallic headset, small glowing accents, sleek side profile",colors:["#111827","#7168f0","#2ec4b6"]},{label:"发带与缎带",group:"头部",prompt:"hairband and ribbon accessory, soft fabric, expressive silhouette",colors:["#d65b7f","#fef3c7","#7168f0"]},{label:"机械手套",group:"手部",prompt:"mechanical gloves, articulated joints, subtle luminous details",colors:["#64748b","#0f766e","#38bdf8"]},{label:"徽章挂件",group:"胸前",prompt:"badge charm accessory, small emblem, readable decorative detail",colors:["#d2a23a","#f8fafc","#1e3a8a"]},{label:"颈环项链",group:"颈部",prompt:"slim choker necklace, tiny charm, refined neckline accessory",colors:["#111827","#d2a23a","#f8fafc"]},{label:"战术腰包",group:"腰部",prompt:"compact tactical waist pouch, layered straps, practical detail",colors:["#475569","#0f766e","#f5c542"]},{label:"透明雨披扣",group:"胸前",prompt:"transparent cape clasp, soft reflections, clean geometric accessory",colors:["#38bdf8","#e0f2fe","#64748b"]},{label:"发夹星标",group:"头部",prompt:"small star hair clip, subtle metallic shine, cute readable detail",colors:["#f5c542","#d65b7f","#f8fafc"]},{label:"轻薄腕表",group:"手部",prompt:"thin digital wristwatch, luminous face, compact modern accessory",colors:["#1d4ed8","#06b6d4","#0f172a"]},{label:"单肩小包",group:"腰部",prompt:"small crossbody pouch, clean strap, lightweight travel accessory",colors:["#2f7a60","#111827","#d2a23a"]},{label:"半透明面罩",group:"脸部",prompt:"translucent face mask, soft glow edge, sci-fi facial accessory",colors:["#7168f0","#38bdf8","#f8fafc"]},{label:"能量袖扣",group:"臂部",prompt:"energy sleeve cuff, small luminous lines, refined arm accessory",colors:["#0f766e","#38bdf8","#f8fafc"]},{label:"战术护臂",group:"臂部",prompt:"compact tactical forearm guard, layered plates, flexible straps",colors:["#111827","#64748b","#2fbda8"]},{label:"丝带臂环",group:"臂部",prompt:"soft ribbon arm band, flowing fabric, elegant character detail",colors:["#d65b7f","#fef3c7","#7168f0"]},{label:"数据腕环",group:"臂部",prompt:"data bracelet, holographic display, slim sci-fi wrist accessory",colors:["#1d4ed8","#06b6d4","#0f172a"]}],鞋袜:[{label:"长靴扣带",prompt:"tall boots with buckles, structured leather, clean sole design",colors:["#111827","#d2a23a","#64748b"]},{label:"运动短靴",prompt:"sporty ankle boots, lightweight sole, dynamic shape",colors:["#38bdf8","#111827","#f8fafc"]},{label:"礼装皮鞋",prompt:"formal leather shoes, polished finish, elegant heel profile",colors:["#0f172a","#475569","#f5c542"]},{label:"机械外骨骼靴",prompt:"mechanical exoskeleton boots, compact supports, sci-fi sole",colors:["#64748b","#2ec4b6","#111827"]},{label:"轻便凉鞋",prompt:"light sandals, simple straps, clean summer character design",colors:["#f2a65a","#e0f2fe","#2f7a60"]}]},k=[...h,...Object.entries($).flatMap(([t,l])=>l.map((s,c)=>({...s,id:`qp-material-placeholder-${t}-${c+1}`,category:t})))],x=h.map((t,l)=>({category_id:`cat_imagestudio_${t.category}`,name:t.category,parent_id:null,category_type:"material",sort_order:(l+1)*10,metadata:{source:"imagestudio_frontend",prompt:t.prompt,colors:t.colors}})),O=co(k.filter(t=>t.category===He).map(t=>t.group??"其他")).map((t,l)=>({category_id:`cat_imagestudio_accessory_${t}`,name:t,parent_id:`cat_imagestudio_${He}`,category_type:"accessory_group",sort_order:(l+1)*10,metadata:{source:"imagestudio_frontend",parent_category:He}})),H=[{id:"profile-mika",name:"雾岛未花",identity:"边境医疗官",personality:"温和、敏锐、慢热",hairColor:"银灰色",hairstyle:"低马尾,额前碎发",eyeColor:"浅紫色",clothing:"白色医疗夹克、透明护目镜、便携药箱",style:"低饱和科幻医疗插画,柔光,干净背景",negative:"low quality, messy hands, text artifacts",status:"已归档",updatedAt:"12 分钟前",materialId:"qp-material-portrait",colors:["#64748b","#a78bfa","#e0f2fe"]},{id:"profile-ren",name:"白川莲",identity:"资料库管理员",personality:"理性、安静、记忆力强",hairColor:"深蓝色",hairstyle:"齐肩短发,整齐刘海",eyeColor:"琥珀色",clothing:"深色长外套、金属书签、轻便手套",style:"现代幻想设定图,暖色边缘光,细节清晰",negative:"duplicate face, broken fingers, blurry",status:"待补图",updatedAt:"38 分钟前",materialId:"qp-material-style",colors:["#1e3a8a","#d97706","#f8fafc"]},{id:"profile-nagi",name:"朝仓凪",identity:"空港机械师",personality:"爽朗、专注、动手快",hairColor:"棕色",hairstyle:"高马尾,发尾微卷",eyeColor:"蓝绿色",clothing:"短款工装背心、工具腰包、防滑短靴",style:"清爽工业风角色设计,明亮环境光,高可读轮廓",negative:"bad anatomy, low detail, overexposed",status:"可生成",updatedAt:"1 小时前",materialId:"qp-material-boots",colors:["#0f766e","#d97706","#f4f4f5"]}],de=[{title:"生成图片",description:"进入生成流程入口",keywords:["生成","图片","prompt","生图"],nav:"generate",module:"generate"},{title:"查看队列",description:"检查等待、运行和失败任务",keywords:["队列","任务","等待","失败","重试"],nav:"queue",module:"queue"},{title:"最近图片",description:"查看最新生成结果",keywords:["最近","图片","图库","缩略图"],nav:"gallery",module:"images"},{title:"模型设置",description:"检查模型站点和调用配置",keywords:["模型","provider","配置","站点"],nav:"settings",module:"settings"},{title:"数据库设置",description:"检查存储和数据库连接",keywords:["数据库","存储","sqlite","postgres"],nav:"settings",module:"settings"},{title:"日志审计",description:"查看错误、生成和系统事件",keywords:["日志","错误","审计","事件"],nav:"logs",module:"logs"},{title:"今日成本",description:"检查生成调用和成本提醒",keywords:["成本","费用","调用","统计"],nav:"performance",module:"performance"},{title:"性能监控",description:"查看服务、队列、调用和存储详情",keywords:["性能","监控","worker","运行","存储"],nav:"performance",module:"performance"},{title:"素材库",description:"查看素材和衣橱相关入口",keywords:["素材","衣橱","角色","材料"],nav:"materials",module:"images"}],le=[{name:"星图紫青",primary:"#7168f0",accent:"#2fbda8"},{name:"极光蓝青",primary:"#3f7edc",accent:"#2ec4b6"},{name:"松石玫红",primary:"#209b8d",accent:"#d65b7f"},{name:"墨绿金盏",primary:"#2f7a60",accent:"#d2a23a"}],ne=T(null),fe=T(_s()),F=T(null),_e=T(null),J=T([]),ye=T([]),De=T([]),Ke=T([]),tt=T(null),re=T(rf()),ue=T("image"),Ie=T(""),K=T(""),qe=T(""),at=T(""),bt=T([]),Fe=T(!1),Ae=T(""),Pe=T(null),rt=T(""),ul=T("active"),_t=T(""),Je=T(""),jt=T(""),Vl=T(""),wt=T(""),st=T(""),Tt=T(!1),cn=T(!1),Io=T(!1),kt=T("avatar"),Me=T("portrait-03"),w=T(""),C=T(["mock-generate-01","mock-generate-04","mock-generate-07","mock-generate-10"]),P=T(""),R=T(""),E=T(""),M=T({name:"星港绘理",identity:"近未来港区巡查员",personality:"冷静、可靠、行动快",hairColor:"黑色",hairstyle:"短发,带一侧碎发",eyeColor:"青绿色",clothing:"轻机能外套、短靴、发光臂章",style:"清透赛博插画,柔和边缘光,高细节角色设定",negative:"low quality, blurry, bad anatomy, extra fingers"}),D=T(""),B=T({}),N=T(""),A=T(mo),ee=T(null),j=T(!1),Y=T(!1),oe=T(""),ge=T(""),he=T(""),we=T(!1),We=T(!1),Ye=T(!1),Ct=T(""),it=T("simple"),ie=T(pf()),Un=T([]),Xe=T([]),Lt=T(0),jl=T(!1),Ul=T(""),Hn=T(!1),dn=T(""),Kn=T(!1),fn=T(""),$o=T(""),mi=T(!1),Po=T(""),me=T(!1),Z=T(""),pn=T(!1),vn=T(""),It=T({}),lt=T({}),Ut=T({}),hd=[{key:"roleCore",label:"角色核心"},{key:"personality",label:"性格关键词"},{key:"appearance",label:"外观特征"},{key:"outfit",label:"服装与配饰"},{key:"scene",label:"常用场景"},{key:"avoid",label:"避雷内容"}],ra=T("draft"),sa=T(""),gi=T(!1),Gn=T(!1),cl=T("dark"),Hl=T(le[0].primary),Kl=T(le[0].accent),ua=T(!1),ca=T(!1),da=T(!1),Zt=T(!1),mn=T("generation"),dl=T(1),Gl=T({x:0,y:0}),Pl=T(!1),gn=T({pointerId:-1,x:0,y:0,offsetX:0,offsetY:0}),fa=T(!0),pa=T("all"),Ht=T([]),zn=T([]),Qn=T(!1),el=T(!1),hi=T(!1),va=T(!1),xl=T(!1),Rt=T(""),tl=T(""),qt=T(""),zl=T(""),hn=T(""),Jn=T(""),ma=T(""),yi=T(""),fl={theme:"imagestudio.navigation.theme",primary:"imagestudio.navigation.primary",accent:"imagestudio.navigation.accent",readNotifications:"imagestudio.navigation.readNotifications",dismissedNotifications:"imagestudio.navigation.dismissedNotifications"},zr=["search","palette","notifications","logs","imageViewer","materialPicker","materialDetail","materialCategoryCreate","personaQuestionnaire","quickProfileDetail","externalProfileImport"],yd={profile_brief:"persona-split",prompt_plan:"prompt-plan",material_bind:"material-bind",headshot:"portrait-01",half_body:"portrait-02",full_body:"fullbody-01",expression_sheet:"sheet-split",pose_sheet:"detail-hands-01",style_lock:"hires-fix",final_pack:"archive",fast_profile:"persona-split",fast_candidates:"portrait-01",fast_final:"archive"};let Yn,ga;const Qr=S(()=>Qn.value||el.value||hi.value),Jr=S(()=>fe.value.state),bd=S(()=>fe.value.state!=="connected"),Xn=S(()=>Ct.value.trim()),bi=S(()=>vp(Xn.value)),_i=S(()=>hd.map(t=>({...t,value:bi.value[t.key],recognized:bi.value.recognizedKeys.includes(t.key)}))),_d=S(()=>_i.value.filter(t=>t.recognized).length),wd=S(()=>n.find(t=>t.key===re.value)??n[0]),ll=S(()=>{var l;const t=(l=F.value)==null?void 0:l.queue;return t?t.pending+t.running+t.failed+t.dead_letter:0}),pt=S(()=>{var l;return((l=_e.value)!=null&&l.items.length?_e.value.items:kd.value).slice(0,24)}),wi=S(()=>pt.value.slice(0,6)),kd=S(()=>{var t;return((t=F.value)==null?void 0:t.recent_jobs.map(jp).filter(Up))??[]}),Ql=S(()=>{var t;return((t=F.value)==null?void 0:t.recent_images.slice(0,8))??[]}),Jl=S(()=>{const t=[...bt.value,...Ql.value.map(Na)],l=t.length?[...t,...v]:v,s=new Set;return l.filter(c=>s.has(c.image_id)?!1:(s.add(c.image_id),!0)).slice(0,10)}),Ge=S(()=>Jl.value.length?Jl.value.find(t=>t.image_id===Ie.value)??Jl.value[0]:null),Cd=S(()=>{const t=Ge.value;return t?[{label:"状态",value:t.status},{label:"来源",value:t.source},{label:"工作流",value:t.workflow_id||"-"},{label:"节点",value:t.node_id||"-"},{label:"角色",value:t.profile_id||"-"},{label:"模型",value:t.model},{label:"尺寸",value:t.size},{label:"Seed",value:t.seed},{label:"耗时",value:t.duration},{label:"提示词",value:t.prompt},{label:"时间",value:ql(t.created_at)}]:[{label:"来源",value:"等待生成"},{label:"状态",value:"暂无图片"},{label:"提示",value:"左侧生成结果会在这里显示"}]}),ki=S(()=>`translate3d(${Gl.value.x}px, ${Gl.value.y}px, 0) scale(${dl.value})`),Yr=S(()=>`${Math.round(dl.value*100)}%`),Id=S(()=>co(v.map(t=>t.model)).map(t=>({value:t,label:t,provider:"示例",status:"fallback"}))),Xr=S(()=>De.value.filter(Dp).map(t=>({value:`${t.provider_id}/${t.model_id}`,label:t.model_id,provider:t.provider_id,status:t.status}))),yn=S(()=>{const t=Xr.value.length?Xr.value:Id.value,l=new Set;return t.filter(s=>l.has(s.value)?!1:(l.add(s.value),!0))}),Zn=S(()=>yn.value.find(t=>t.value===rt.value)??yn.value[0]),Kt=S(()=>h.reduce((t,l)=>{const s=B.value[l.category],c=k.find(m=>m.id===s&&m.category===l.category);return c&&t.push(c),t},[])),Ci=S(()=>k.find(t=>t.id===D.value)??Kt.value[0]??null),$d=S(()=>{const t=Kt.value.length;return t?`${t} 个已选`:"未使用"}),Pd=S(()=>{const t=Ke.value.map(l=>[l.category_id,l.name]);return new Map(t)}),eo=S(()=>{var l;const t=((l=tt.value)==null?void 0:l.items)??[];return t.length?t.map((s,c)=>Cf(s,c)):k.map((s,c)=>If(s,c))}),Zr=S(()=>{var t;return Je.value||((t=Yl.value[0])==null?void 0:t.id)||""}),bn=S(()=>{var c,m;const t=eo.value,l=((c=Xl.value)==null?void 0:c.categoryIds)??[],s=l.length?t.filter(g=>l.includes(g.categoryId)):[];return((m=Xl.value)==null?void 0:m.label)!==He||!jt.value?s:s.filter(g=>g.subcategory===jt.value)}),Bt=S(()=>bn.value.length?bn.value.find(t=>t.id===Vl.value)??bn.value[0]:null),es=S(()=>Ke.value.filter(t=>!t.parent_id&&t.category_type!=="accessory_group")),xd=S(()=>{const t=es.value.filter(l=>Ns(l.name)===He).map(l=>l.category_id);return t.length?Ke.value.filter(l=>l.parent_id&&t.includes(l.parent_id)):[]}),Yl=S(()=>{const t=eo.value,l=new Map;for(const I of t)l.set(I.categoryId,(l.get(I.categoryId)??0)+1);const s=new Map;for(const I of es.value){const q=Ns(I.name);s.set(q,[...s.get(q)??[],I])}const c=Array.from(s.entries()).map(([I,q])=>{const U=kf(q),X=U.map(te=>te.category_id),y=X.reduce((te,f)=>te+(l.get(f)??0),0);return{id:U[0].category_id,label:I,categoryIds:X,count:y,detail:qs(I),endpoint:U.map(te=>L.materialCategory(te.category_id)).join(" / "),tone:y?"good":"idle",source:"backend"}}),m=co(k.map(I=>I.category)).map(I=>{const q=Ms(I);return{id:q,label:I,categoryIds:[q],count:l.get(q)??k.filter(U=>U.category===I).length,detail:qs(I),endpoint:L.materialCategories,tone:"idle",source:"sample"}});return c.length?c:m}),Xl=S(()=>Yl.value.find(t=>t.id===Je.value)??Yl.value[0]??null),_n=S(()=>Yl.value.find(t=>t.label===He)??null),Ii=S(()=>{var s;if(((s=Xl.value)==null?void 0:s.label)!==He)return[];const t=Xl.value.categoryIds;if(!t.length)return[];if(Xl.value.source==="backend"){const c=new Map;for(const m of eo.value.filter(g=>t.includes(g.categoryId))){const g=m.subcategory||"其他";c.set(g,(c.get(g)??0)+1)}return xd.value.map(m=>({id:m.name,label:m.name,count:c.get(m.name)??0,categoryId:m.category_id,source:"backend"}))}const l=new Map;for(const c of eo.value.filter(m=>t.includes(m.categoryId))){const m=c.subcategory||"其他";l.set(m,(l.get(m)??0)+1)}return Array.from(l.entries()).map(([c,m])=>({id:c,label:c,count:m,source:"sample"}))}),xo=S(()=>{var t;return((t=Xl.value)==null?void 0:t.label)===He}),ts=S(()=>xo.value?"添加配饰子类":"添加素材分类"),Sd=S(()=>{var t;return xo.value?((t=_n.value)==null?void 0:t.source)==="backend"?_n.value.label:"配饰父分类尚未落库":"无,作为主分类创建"}),Ad=S(()=>L.materialCategories),Md=S(()=>{var g;const t=eo.value,l=((g=tt.value)==null?void 0:g.total)??0,s=t.filter(I=>ct(I.status)==="confirmed").length,c=t.filter(I=>!["confirmed","archived"].includes(ct(I.status))).length,m=Kt.value.length;return[{label:"素材总量",value:String(l||t.length),hint:l?"来自后端素材库":"当前为示例素材",state:t.length?"good":"idle"},{label:"分类",value:String(Yl.value.length),hint:"风格、构图、服装、鞋袜、配饰等",state:Yl.value.length?"good":"idle"},{label:"待确认",value:String(Math.max(c-(l?0:t.length),0)),hint:s?`${s} 条已确认`:"上传后需要识别或确认的素材",state:c&&l?"warn":"idle"},{label:"已选参考",value:String(m),hint:m?"会进入角色素材绑定":"默认不使用参考",state:m?"good":"idle"}]}),Nd=S(()=>{const t=Bt.value;return t?[{label:"名称",value:t.label},{label:"分类",value:t.category},{label:"子分类",value:t.subcategory||"-"},{label:"状态",value:t.statusText},{label:"来源",value:t.source==="backend"?"后端素材库":"示例素材"},{label:"标签",value:t.tags.length?t.tags.join("、"):"-"},{label:"正向词",value:t.prompt||"-"},{label:"负向词",value:t.negativePrompt||"-"},{label:"接口",value:t.endpoint},{label:"更新时间",value:t.updatedAt}]:[{label:"状态",value:"暂无素材"},{label:"提示",value:"后端素材或示例素材会在这里显示详情。"}]}),ls=S(()=>{var q,U;const t=(q=ne.value)==null?void 0:q.permissions,l=(U=ne.value)==null?void 0:U.feature_flags,s=!!(t!=null&&t.can_manage_materials),c=!!(l!=null&&l.material_library),m=Bt.value,g=(m==null?void 0:m.source)==="backend"?m:null,I=ke.value;return[{id:"refresh",title:"刷新素材库",detail:"重新读取分类和素材列表。",badge:"GET",endpoint:`${L.materialCategories} / ${L.materials}`,action:xl.value?"同步中":"刷新",tone:"primary",enabled:!xl.value},{id:"upload",title:"上传素材",detail:"后续接文件选择、存储 URI 和分类表单。",badge:"Upload",endpoint:L.materialUpload,action:"预留入口",tone:c&&s?"accent":"neutral",enabled:!1},{id:"create-category",title:"添加分类",detail:"打开添加卡片,提交后写入后端分类表。",badge:"Category",endpoint:L.materialCategories,action:Tt.value?"创建中":"打开",tone:s?"accent":"neutral",enabled:!!(s&&!Tt.value)},{id:"recognize",title:"识别当前素材",detail:"调用素材 VLM 工作流,回填提示词、标签和识别状态。",badge:"VLM",endpoint:g?L.materialRecognize(g.id):L.materialRecognize(":materialId"),action:st.value==="recognize"?"识别中":"识别",tone:g?"accent":"neutral",enabled:!!(c&&s&&g&&!st.value)},{id:"re-recognize",title:"重新识别",detail:"保留素材记录,重新跑一次识别链路。",badge:"Retry",endpoint:g?L.materialReRecognize(g.id):L.materialReRecognize(":materialId"),action:st.value==="re-recognize"?"重跑中":"重识别",tone:g?"warn":"neutral",enabled:!!(c&&s&&g&&!st.value)},{id:"confirm",title:"确认入库",detail:"把当前识别结果确认成可绑定素材。",badge:"Confirm",endpoint:g?L.materialConfirm(g.id):L.materialConfirm(":materialId"),action:st.value==="confirm"?"确认中":"确认",tone:g?"primary":"neutral",enabled:!!(c&&s&&g&&!st.value)},{id:"asset-pack",title:"导入素材包",detail:"接收素材包 URI,支持 dry-run 预检查再执行导入。",badge:"Pack",endpoint:L.assetImportPack,action:"预留入口",tone:c&&s?"accent":"neutral",enabled:!1},{id:"wardrobe",title:"导入角色衣橱",detail:"将确认素材并入当前角色衣橱,用于穿搭匹配。",badge:"Wardrobe",endpoint:I!=null&&I.profileId?L.wardrobeImportMaterial(I.profileId):L.wardrobeImportMaterial(":profileId"),action:"预留入口",tone:l!=null&&l.wardrobe&&(I!=null&&I.profileId)?"accent":"neutral",enabled:!1},{id:"workflow-bind",title:"进入素材绑定",detail:"回到角色工作流的参考素材绑定节点,保存到后端工作流。",badge:"Workflow",endpoint:L.node(":material_bind_node_id"),action:"打开节点",tone:"primary",enabled:!0,nav:"generate",module:"generate"}]}),ha=S(()=>k.filter(t=>t.category===N.value)),ns=S(()=>[mo,...co(k.filter(t=>t.category===He).map(t=>t.group??"其他"))]),$i=S(()=>N.value!==He||A.value===mo?ha.value:ha.value.filter(t=>(t.group??"其他")===A.value)),os=S(()=>{const t=$i.value.length,l=ha.value.length;return N.value===He&&A.value!==mo?`${t} / ${l} 项`:`${l} 项`}),ya=S(()=>N.value===He&&A.value!==mo),as=S(()=>{var t;return((t=ee.value)==null?void 0:t.category)===N.value?`${ee.value.category}添加入口已预留`:"跳转到素材库添加"}),ve=S(()=>{const t=M.value,l=t.name.trim()||"未命名角色",s=t.personality.trim(),c=[l,t.identity.trim(),s?`personality: ${s}`:""].filter(Boolean).join(", "),m=[t.hairColor.trim()?`${t.hairColor.trim()} hair`:"",t.hairstyle.trim(),t.eyeColor.trim()?`${t.eyeColor.trim()} eyes`:"",t.clothing.trim(),...Kt.value.map(g=>g.prompt)].filter(Boolean).join(", ");return{name:l,basePrompt:c,appearancePrompt:m,stylePrompt:t.style.trim(),negativePrompt:t.negative.trim()}}),Td=S(()=>tn(11,ve.value.name,ve.value.appearancePrompt,["#7168f0","#2fbda8","#f5c542"],[1,1])),qd=S(()=>[{label:"基础",value:ve.value.basePrompt},{label:"外观",value:ve.value.appearancePrompt},{label:"风格",value:ve.value.stylePrompt||"-"},{label:"负面",value:ve.value.negativePrompt||"-"}]),So=S(()=>{var t;return[...Tp([{id:"draft",...M.value,status:(t=ne.value)!=null&&t.feature_flags.quick_profile?"编辑中":"草稿",updatedAt:"当前草稿",materialId:D.value,colors:["#7168f0","#2fbda8","#f5c542"]},...Xe.value,...Un.value,...H])]}),ke=S(()=>So.value.find(t=>t.id===ra.value)??So.value[0]),to=S(()=>{var l;const t=(l=ke.value)==null?void 0:l.workflowId;return t?xn(t):[]}),is=S(()=>!0),wn=S(()=>[{id:"avatar",label:"头像",detail:"五官、表情、发型",state:"1:1",imageUrl:Td.value,aspectRatio:[1,1],prompt:`${ve.value.name}, face reference, ${ve.value.basePrompt}, ${ve.value.appearancePrompt}`,createdAt:"2026-07-06T12:41:00+08:00",source:"快速角色 / 头像预览"},{id:"bust",label:"半身像",detail:"上半身服装与姿态",state:"3:4",imageUrl:tn(12,`${ve.value.name} 半身像`,ve.value.appearancePrompt,["#3f7edc","#2ec4b6","#d65b7f"],[3,4]),aspectRatio:[3,4],prompt:`${ve.value.name}, upper body character reference, ${ve.value.appearancePrompt}`,createdAt:"2026-07-06T12:43:00+08:00",source:"快速角色 / 半身像"},{id:"stand",label:"立绘",detail:"全身比例与轮廓",state:"2:3",imageUrl:tn(13,`${ve.value.name} 立绘`,ve.value.basePrompt,["#2f7a60","#111827","#d2a23a"],[2,3]),aspectRatio:[2,3],prompt:`${ve.value.name}, full body character standing pose, ${ve.value.basePrompt}, ${ve.value.stylePrompt}`,createdAt:"2026-07-06T12:45:00+08:00",source:"快速角色 / 立绘"},{id:"sheet",label:"设定图",detail:"多角度与细节拆分",state:"16:9",imageUrl:tn(14,`${ve.value.name} 设定图`,ve.value.stylePrompt,["#475569","#7168f0","#f5c542"],[16,9]),aspectRatio:[16,9],prompt:`${ve.value.name}, character design sheet, multi angle, outfit details, ${ve.value.stylePrompt}`,createdAt:"2026-07-06T12:48:00+08:00",source:"快速角色 / 设定图"}]),dt=S(()=>wn.value.find(t=>t.id===kt.value)??wn.value[0]),lo=S(()=>wn.value.find(t=>t.id==="bust")??dt.value),Ed=S(()=>{var s;const[t,l]=((s=dt.value)==null?void 0:s.aspectRatio)??[4,3];return{"--quick-profile-target-ratio":`${t} / ${l}`}}),Ld=S(()=>{var s;const[t,l]=((s=dt.value)==null?void 0:s.aspectRatio)??[4,3];return t>l?"landscape":"portrait"}),rs=S(()=>{var s;const[t,l]=((s=lo.value)==null?void 0:s.aspectRatio)??[3,4];return{"--quick-profile-target-ratio":`${t} / ${l}`}}),Rd=S(()=>{var l;const t=dt.value;return t?[{label:"类型",value:`${t.label} / ${t.state}`},{label:"说明",value:t.detail},{label:"模型",value:((l=Zn.value)==null?void 0:l.label)??"未选择模型"},{label:"来源",value:t.source},{label:"生成时间",value:ql(t.createdAt)},{label:"提示词",value:t.prompt},{label:"负面提示词",value:ve.value.negativePrompt||"-"}]:[]}),ss=S(()=>{var m,g;const t=(m=ne.value)==null?void 0:m.feature_flags,l=(g=ne.value)==null?void 0:g.permissions,s=!!(l!=null&&l.can_write),c=!!(l!=null&&l.can_manage_materials);return[{id:"persona",title:"生成人设",badge:"Persona",detail:"通过问卷整理身份、性格、外观和风格。",endpoint:L.quickProfileDraft,state:t!=null&&t.quick_profile?"问卷入口":"占位入口",tone:"primary",action:"填写问卷",enabled:!0},{id:"save",title:"保存角色",badge:"Profile",detail:"把当前人设预览归档为可复用角色。",endpoint:L.quickProfileDraftSave,state:s?"可写入":"只读",tone:s?"accent":"neutral",action:"保存档案",enabled:s,nav:"profiles",module:"suggestions"},{id:"material",title:"整理素材集",badge:"Material",detail:"把已选参考整理为角色专属素材包。",endpoint:L.materials,state:t!=null&&t.material_library?"已开启":"未开启",tone:t!=null&&t.material_library?"accent":"neutral",action:"整理素材",enabled:!!(t!=null&&t.material_library&&c),nav:"materials",module:"images"},{id:"wardrobe",title:"衣橱匹配",badge:"Wardrobe",detail:"按当前人设匹配一次性服装与配饰候选。",endpoint:L.wardrobeMatch(":profileId"),state:t!=null&&t.wardrobe?"已开启":"未开启",tone:t!=null&&t.wardrobe?"primary":"neutral",action:"匹配候选",enabled:!!(t!=null&&t.wardrobe&&c),nav:"materials",module:"images"},{id:"daily",title:"每日穿搭",badge:"Outfit",detail:"按日期、场景和状态生成长期穿搭方案。",endpoint:L.privateCompanionDailyOutfit,state:t!=null&&t.private_companion_integration?"已开启":"未开启",tone:t!=null&&t.private_companion_integration?"warn":"neutral",action:"生成方案",enabled:!!(t!=null&&t.private_companion_integration)},{id:"workflow",title:"进入工作流",badge:"Flow",detail:"把当前粗略人设转入工作流继续细化。",endpoint:L.profileWorkflows(":profileId"),state:t!=null&&t.workspace?"已开启":"未开启",tone:t!=null&&t.workspace?"primary":"neutral",action:"细化人设",enabled:!!(t!=null&&t.workspace)}]});function Bd(t){return{Persona:"人设",Profile:"档案",Material:"素材",Wardrobe:"衣橱",Outfit:"穿搭",Flow:"工作流"}[t]??t}function ba(t){return{persona:"建档",save:"保存",material:"整理",wardrobe:"匹配",daily:"生成",workflow:"细化"}[t.id]??t.action}const kn=S(()=>{var I;if(to.value.length)return[Ip(),...to.value.map((q,U)=>$p(q,U))];const t=((I=Zn.value)==null?void 0:I.label)??"未选择模型",l=ve.value.name,s=ve.value.basePrompt,c=ve.value.appearancePrompt,m=ve.value.stylePrompt||"统一角色设定风格",g=ve.value.negativePrompt||"低质量, 结构错误, 多余肢体";return[{id:"brief-import",step:"01",title:"导入粗略人设",detail:"读取快速角色里的姓名、身份、性格、外观和已选参考素材,生成本次测试流程的基础档案。",status:"done",badge:"Profile",model:"本地档案",duration:"00:06",imageId:"mock-generate-03",prompt:`${s}; ${c}; negative: ${g}`,phase:"输入",progress:100,queue:"WF-S130-001",attempt:"1 / 1",eta:"已完成",input:"快速角色草稿、已选素材、最近一次对话指令",result:"基础档案 1 份,参考素材 5 组",dependsOn:"无",outputCount:"1 份档案"},{id:"persona-split",step:"02",title:"LLM 拆解设定",detail:"把粗略人设拆成身份、外观、服装、鞋袜、配饰、禁用项和风格锁定字段。",status:"done",badge:"LLM",model:"Prompt Planner",duration:"00:18",imageId:"mock-generate-04",prompt:`${l}, structured character bible, identity, personality, appearance, outfit, accessories`,phase:"拆解",progress:100,queue:"WF-S130-002",attempt:"1 / 1",eta:"已完成",input:"基础档案",result:"结构化字段 7 类,冲突项 0 个",dependsOn:"01 导入粗略人设",outputCount:"7 类字段"},{id:"prompt-plan",step:"03",title:"提示词规划",detail:"为头像、半身、全身、设定图和细节拆分分别生成正向提示词、负向提示词和权重建议。",status:"done",badge:"Prompt",model:"Prompt Planner",duration:"00:24",imageId:"mock-generate-02",prompt:`${l}, prompt matrix, portrait, bust, full body, design sheet, ${m}`,phase:"规划",progress:100,queue:"WF-S130-003",attempt:"1 / 1",eta:"已完成",input:"结构化字段、素材标签",result:"节点提示词 6 条,负向提示词 1 条",dependsOn:"02 LLM 拆解设定",outputCount:"6 条提示词"},{id:"material-bind",step:"04",title:"参考素材绑定",detail:"把风格、构图、服装、鞋袜、配饰参考写入节点参数,并记录哪些节点必须继承。",status:"done",badge:"Material",model:"素材库映射",duration:"00:11",imageId:"mock-generate-06",prompt:"bind style, composition, clothing, socks, shoes and accessory references to workflow nodes",phase:"素材",progress:100,queue:"WF-S130-004",attempt:"1 / 1",eta:"已完成",input:"参考素材 5 类",result:"绑定规则 12 条,强制继承 4 条",dependsOn:"03 提示词规划",outputCount:"12 条规则"},{id:"portrait-01",step:"05",title:"头像草稿 01",detail:"第一轮并发生成头像与半身候选,用来快速确认角色气质和基础脸型。",status:"done",badge:"Draft x4",model:t,duration:"01:12",imageId:"mock-generate-01",imageIds:["mock-generate-01","mock-generate-02","mock-generate-03","mock-generate-04"],prompt:`${l}, portrait draft round 1, ${c}, ${m}`,phase:"草稿",progress:100,queue:"Q-2048",attempt:"1 / 1",eta:"已完成",input:"头像提示词、半身提示词、风格参考、构图参考",result:"返回 4 张候选图;保留 02 的五官方向和 03 的发色气质,衣领和肩部不采用。",dependsOn:"04 参考素材绑定",outputCount:"4 张 / 锁定 2 项",round:"草稿 01",lockedItems:"五官方向采用草稿 02;发色与冷静气质采用草稿 03;排除夸张机甲衣领。",decision:"不直接采用,进入草稿 02 继续收敛。"},{id:"portrait-02",step:"06",title:"头像草稿 02",detail:"继承第一轮锁定项,重新生成更稳定的半身候选,重点修正服装和表情。",status:"done",badge:"Draft x4",model:t,duration:"01:05",imageId:"mock-generate-05",imageIds:["mock-generate-02","mock-generate-05","mock-generate-06","mock-generate-07"],prompt:`${l}, portrait draft round 2, keep selected face and hair, refine outfit, ${m}`,phase:"草稿",progress:100,queue:"Q-2056",attempt:"1 / 1",eta:"已完成",input:"草稿 01 锁定项、服装参考、负向排除项",result:"返回 4 张候选图;锁定 05 的上衣轮廓和 07 的眼神,继续去掉多余肩饰。",dependsOn:"05 头像草稿 01",outputCount:"4 张 / 追加 2 项",round:"草稿 02",lockedItems:"继承草稿 01 的五官和发色;新增上衣轮廓采用草稿 05;眼神采用草稿 07。",decision:"角色方向基本确定,但需要再跑一轮统一发型和服装边缘。"},{id:"portrait-03",step:"07",title:"头像草稿 03",detail:"第三轮根据前两轮锁定项继续细化,模拟系统自动追加的新草稿节点。",status:"running",badge:"Draft x4",model:t,duration:"00:42",imageId:"mock-generate-01",imageIds:["mock-generate-01","mock-generate-04","mock-generate-07","mock-generate-10"],prompt:`${l}, portrait draft round 3, locked face, locked hair color, locked upper outfit, clean details, ${m}`,phase:"草稿",progress:68,queue:"Q-2071",attempt:"1 / 2",eta:"约 26 秒",input:"草稿 01-02 锁定项、服装修正意见、表情一致性要求",result:"已返回 4 张候选图,等待选择最终头像与半身基准。",dependsOn:"06 头像草稿 02",outputCount:"4 张草稿",round:"草稿 03",lockedItems:"继承五官、发色、眼神、上衣轮廓;继续约束发梢长度和肩部装饰。",decision:"本轮用于确定头像基准;确认后进入全身草稿。"},{id:"fullbody-01",step:"08",title:"全身草稿 01",detail:"根据头像草稿 03 的锁定项生成全身比例、轮廓、鞋袜和主要配饰。",status:"waiting",badge:"Image x4",model:t,duration:"待开始",imageId:"mock-generate-05",imageIds:["mock-generate-05","mock-generate-06","mock-generate-07","mock-generate-08"],prompt:`${l}, full body draft round 1, inherit portrait draft round 3, outfit details, shoes, socks, accessories, ${m}`,phase:"草稿",progress:0,queue:"等待 portrait-03",attempt:"0 / 2",eta:"约 2 分钟",input:"头像草稿 03、全身提示词、服装/鞋袜/配饰素材",result:"未开始,等待头像草稿确认。",dependsOn:"07 头像草稿 03",outputCount:"预计 4 张",round:"全身草稿 01",lockedItems:"继承头像基准、发色、眼神、上衣轮廓。",decision:"确认后进入局部细节补图。"},{id:"detail-hands-01",step:"09",title:"手部细节 01",detail:"对手部姿态和袖口结构单独补图,避免全身图里手部细节丢失。",status:"waiting",badge:"Detail",model:t,duration:"待开始",imageId:"mock-generate-09",imageIds:["mock-generate-09","mock-generate-10"],prompt:`${l}, hand detail reference, sleeve cuff, clean fingers, material callouts`,phase:"细节补图",progress:0,queue:"等待 fullbody-01",attempt:"0 / 1",eta:"约 1 分钟",input:"全身草稿、袖口材质、手部姿态要求",result:"未开始",dependsOn:"08 全身草稿 01",outputCount:"预计 2 张",round:"细节补图 01",lockedItems:"继承袖口结构和手套材质。",decision:"用于设定图局部标注。"},{id:"detail-accessory-01",step:"10",title:"配饰细节 01",detail:"第一轮配饰补图,生成发饰、臂章和随身物件的局部参考。",status:"waiting",badge:"Detail",model:t,duration:"待开始",imageId:"mock-generate-06",imageIds:["mock-generate-06","mock-generate-09"],prompt:`${l}, accessory detail round 1, hair clip, glowing armband, small props`,phase:"细节补图",progress:0,queue:"等待 fullbody-01",attempt:"0 / 1",eta:"约 1 分钟",input:"配饰分类素材、全身草稿、角色风格锁定项",result:"未开始",dependsOn:"08 全身草稿 01",outputCount:"预计 2 张",round:"配饰细节 01",lockedItems:"继承发饰位置、臂章发光色、随身小包尺寸。",decision:"如果配饰数量过多,会自动追加配饰细节 02。"},{id:"detail-accessory-02",step:"11",title:"配饰细节 02",detail:"模拟第一轮配饰不够清晰后,自动追加的第二轮配饰补图节点。",status:"waiting",badge:"Detail",model:t,duration:"待开始",imageId:"mock-generate-10",imageIds:["mock-generate-04","mock-generate-10"],prompt:`${l}, accessory detail round 2, refine selected armband and hair accessory, clean material callouts`,phase:"细节补图",progress:0,queue:"等待 detail-accessory-01",attempt:"0 / 1",eta:"约 1 分钟",input:"配饰细节 01 选择项、需要重跑的配饰类别",result:"未开始",dependsOn:"10 配饰细节 01",outputCount:"预计 2 张",round:"配饰细节 02",lockedItems:"继承已选发饰和臂章,重跑随身物件与材质标注。",decision:"补齐后进入设定图拆分。"},{id:"sheet-split",step:"12",title:"设定图拆分",detail:"组合三视图、表情、服装细节和材质标注,形成可复用的角色设定图草案。",status:"waiting",badge:"Sheet",model:"Design Sheet",duration:"待开始",imageId:"mock-generate-07",imageIds:["mock-generate-07","mock-generate-08","mock-generate-09"],prompt:`${l}, character design sheet, multi angle, expression set, outfit and material callouts`,phase:"设定图",progress:0,queue:"等待 detail-accessory-02",attempt:"0 / 2",eta:"约 3 分钟",input:"全身草稿、细节补图、角色提示词矩阵",result:"未开始",dependsOn:"09-11 细节补图节点",outputCount:"预计 3 张",round:"设定图草案",lockedItems:"继承头像基准、全身草稿、手部细节和配饰细节。",decision:"输出设定图草案后进入高清修复与统一风格。"},{id:"candidate-review",step:"13",title:"候选审核",detail:"检查一致性、违禁项、服装冲突和画面质量,标记保留、重跑或进入高清修复。",status:"review",badge:"Review",model:"人工审核",duration:"等待选择",imageId:"mock-generate-05",imageIds:["mock-generate-01","mock-generate-05","mock-generate-07"],prompt:"compare candidates, score identity consistency, outfit accuracy, style consistency and image defects",phase:"审核",progress:0,queue:"人工待办",attempt:"0 / 1",eta:"等待操作",input:"全部草稿图、节点提示词、负向提示词",result:"等待选择主方案和需要重跑的节点",dependsOn:"05-12 草稿、细节补图与设定图节点",outputCount:"待选 3 组"},{id:"hires-fix",step:"13",title:"高清修复与统一风格",detail:"对选中的主方案做局部修复、高清放大和统一色调,让各张参考保持同一角色。",status:"waiting",badge:"Hires",model:t,duration:"待开始",imageId:"mock-generate-10",imageIds:["mock-generate-03","mock-generate-10"],prompt:`${l}, high resolution fix, consistent face, consistent color palette, clean linework`,phase:"修复",progress:0,queue:"等待 sheet-split",attempt:"0 / 2",eta:"约 2 分钟",input:"选定成品稿、修复遮罩、统一风格参数",result:"未开始",dependsOn:"12 设定图拆分",outputCount:"预计 2 张"},{id:"archive",step:"14",title:"入库",detail:"把修复后的最终角色图、提示词、素材引用和流程日志保存为可复用角色版本。",status:"waiting",badge:"Archive",model:"角色库",duration:"待开始",imageId:"mock-generate-04",imageIds:["mock-generate-03","mock-generate-04","mock-generate-10"],prompt:"archive approved profile images, prompts, material references and workflow run log",phase:"入库",progress:0,queue:"等待 hires-fix",attempt:"0 / 1",eta:"约 20 秒",input:"最终图、提示词矩阵、素材引用、节点日志",result:"未开始",dependsOn:"13 高清修复与统一风格",outputCount:"预计 1 个版本"}].filter(q=>q.id!=="candidate-review")}),Od=[{id:"profile-prep",step:"01",title:"前期人设准备",detail:"导入粗略人设,拆解设定,并完成提示词规划和参考素材绑定。",badge:"Prep",previewNodeId:"material-bind",nodeIds:["brief-import","persona-split","prompt-plan","material-bind"]},{id:"portrait-draft",step:"02",title:"头像草稿",detail:"确认五官、发型、上半身服装和角色气质;确定后主预览显示头像草稿。",badge:"Draft",previewNodeId:"portrait-03",nodeIds:["portrait-01","portrait-02","portrait-03"]},{id:"body-sheet",step:"03",title:"全身与设定图",detail:"补齐全身比例、鞋袜配饰、细节补图和角色设定图。",badge:"Sheet",previewNodeId:"fullbody-01",nodeIds:["fullbody-01","detail-hands-01","detail-accessory-01","detail-accessory-02","sheet-split"]},{id:"review-archive",step:"04",title:"修复入库",detail:"高清修复、统一风格,并保存为可复用角色版本。",badge:"Fix",previewNodeId:"hires-fix",nodeIds:["hires-fix","archive"]}],no=S(()=>{const t=new Map(kn.value.map(l=>[l.id,l]));return Od.map(l=>{const s=l.nodeIds.map(X=>t.get(X)).filter(X=>!!X),c=s.filter(X=>X.status==="done").length,m=s.find(X=>X.status==="running"||X.status==="review"),g=s.find(X=>X.status!=="done"),I=m??g??s[s.length-1],q=Lp(l.id,s,!!to.value.length),U=m??q[q.length-1];return{...l,previewNodeId:(U==null?void 0:U.id)??"",nodes:q,allNodeCount:s.length,visibleNodeCount:q.length,status:qp(s),progress:Ep(s),eta:(I==null?void 0:I.eta)??(I==null?void 0:I.duration)??"已完成",summary:q.length?`${c} / ${s.length} 小节点`:`未展开 / ${s.length} 小节点`,outputCount:(I==null?void 0:I.outputCount)??"等待产物"}})}),Dd=S(()=>no.value.reduce((t,l)=>t+l.visibleNodeCount,0)),_a=S(()=>no.value.find(t=>t.nodeIds.includes(Me.value))??no.value[0]),Fd=S(()=>{var t,l;return((t=_a.value)==null?void 0:t.title)??((l=be.value)==null?void 0:l.title)??"节点预览"}),be=S(()=>kn.value.find(t=>t.id===Me.value)??kn.value[0]),Cn=S(()=>{const t=Me.value;return to.value.find(l=>uo(l)===t)??null}),oo=S(()=>{var l;return ct(((l=Cn.value)==null?void 0:l.status)??"")==="selected"}),ao=S(()=>{var l;const t=ct(((l=Cn.value)==null?void 0:l.status)??"");return t==="completed"||t==="selected"}),wa=S(()=>{var l,s;const t=Cn.value;return t?ct(t.status)==="completed"?`节点「${((l=be.value)==null?void 0:l.title)??t.title}」已完成。可审查并确认采用;如需重新生成或改提示词,请先从当前节点创建分支。`:`节点「${((s=be.value)==null?void 0:s.title)??t.title}」已经确认采用并锁定。要修改这里,请先从当前节点创建分支。`:""}),Pi=S(()=>{var t;return((t=be.value)==null?void 0:t.id)==="brief-import"}),Ao=S(()=>{var t;return((t=be.value)==null?void 0:t.id)==="persona-split"}),xi=S(()=>{var t;return((t=be.value)==null?void 0:t.id)==="prompt-plan"}),Si=S(()=>{var t;return((t=be.value)==null?void 0:t.id)==="material-bind"}),Wd=S(()=>Pi.value||Ao.value||xi.value||Si.value),Mo=S(()=>{const t=ke.value,l=Kt.value.map(c=>c.label).join("、"),s=be.value;return[{id:"identity",title:"身份与性格",detail:"给后续提示词规划提供角色核心和行为约束。",fields:[Wt("name","角色名",t.name,"用于所有节点保持角色一致。"),Wt("identity","身份定位",t.identity,"职业、阵营、处境或世界观身份。"),Wt("personality","性格关键词",t.personality,"外显性格、内在矛盾和行动方式。")]},{id:"appearance",title:"外观锚点",detail:"锁定头像、半身和全身节点必须继承的识别特征。",fields:[Wt("hair_color","发色",t.hairColor,"头发主色,避免后续节点漂移。"),Wt("hairstyle","发型",t.hairstyle,"长度、刘海、轮廓和辨识度。"),Wt("eye_color","眼睛",t.eyeColor,"瞳色、眼神和表情基调。"),Wt("body_feature","身形/记忆点",(s==null?void 0:s.lockedItems)??"","身高、体型、伤疤、义体等复杂问卷字段。")]},{id:"outfit",title:"服装与素材",detail:"拆成服装、配饰、参考素材和风格锁定项。",fields:[Wt("clothing","服装轮廓",t.clothing,"上衣、鞋袜、材质和层次。"),Wt("materials","参考素材",l,"当前已选素材会作为后续节点参考。"),Wt("style","风格锁定",t.style,"画风、镜头、光照、世界观氛围。")]},{id:"guard",title:"约束与负面项",detail:"用于减少跑偏、冲突和不想要的设计方向。",fields:[Wt("negative","禁用项",t.negative,"负面词、避雷内容和结构约束。"),Wt("conflict","冲突检查",(s==null?void 0:s.decision)||"暂无冲突","字段确认后可进入提示词规划。"),Wt("prompt","节点提示词",(s==null?void 0:s.prompt)??"","后端 LLM 拆解后写回的节点 prompt。")]}]}),ka=S(()=>Mo.value.reduce((t,l)=>t+l.fields.length,0)),Ca=S(()=>Mo.value.reduce((t,l)=>t+l.fields.filter(s=>s.status==="ready").length,0)),Vd=S(()=>{const t=be.value;return[{label:"字段",value:`${Ca.value}/${ka.value}`,hint:"已拆解字段"},{label:"节点",value:An((t==null?void 0:t.status)??"waiting"),hint:(t==null?void 0:t.phase)??"persona-split"},{label:"来源",value:ke.value.status,hint:ke.value.updatedAt}]}),us=S(()=>{const t=ke.value,l=t.negative||ve.value.negativePrompt||"low quality, blurry, bad anatomy",s=[t.name,t.identity,t.personality,Bi(t),t.style].filter(Boolean).join(", ");return[{id:"portrait",title:"头像节点",target:"headshot",prompt:`${s}, face reference, clear eyes, recognizable hairstyle`,negative:l,inherits:["角色名","发色","发型","眼睛","五官识别"],weight:"身份 1.25 / 风格 0.85",status:"可写入"},{id:"bust",title:"半身节点",target:"half_body",prompt:`${s}, upper body, outfit silhouette, calm pose`,negative:l,inherits:["五官识别","发型","上身服装","姿态"],weight:"身份 1.2 / 服装 1.05",status:"可写入"},{id:"fullbody",title:"全身节点",target:"full_body",prompt:`${s}, full body standing pose, complete outfit, shoes and accessories`,negative:l,inherits:["身份","身体比例","服装","鞋袜","配饰"],weight:"比例 1.15 / 配饰 0.9",status:"可写入"},{id:"sheet",title:"设定图节点",target:"expression_sheet / pose_sheet",prompt:`${s}, character design sheet, multi angle, expression and pose references`,negative:l,inherits:["身份","服装","风格","表情","姿势"],weight:"一致性 1.3 / 细节 1.05",status:"可写入"}]}),jd=S(()=>[{label:"负面提示词",value:ke.value.negative||ve.value.negativePrompt||"-",status:"ready"},{label:"语言策略",value:"中文输入由后端 LLM 自动翻译并合并为英文提示词,不丢弃专名和禁用项。",status:"ready"},{label:"权重建议",value:"身份特征和发眼锚点优先,服装/配饰中等权重,风格低于身份。",status:"ready"}]),Ud=S(()=>h.map(t=>{const l=vl(t.category);return{category:t.category,selectedLabel:(l==null?void 0:l.label)??"不使用参考",selectedPrompt:(l==null?void 0:l.prompt)??"默认不注入参考素材,只有显式选择后才进入后端素材绑定。",stages:Ks(t.category),strength:l?Gs(t.category):"弱",required:!!(l&&["风格","服装"].includes(t.category)),colors:(l==null?void 0:l.colors)??t.colors}})),Hd=S(()=>{const t=be.value;return`${t.title} / ${t.phase} / 自动识别节点上下文,交由后端 LLM 翻译为英文提示词注入。`}),Ia=S(()=>{const t=Bo(to.value.flatMap(l=>Ut.value[l.node_id]??[]));return t.length?t:Jl.value.slice(0,10)}),Sl=S(()=>{var c,m,g;const t=new Map(Ia.value.map(I=>[I.image_id,I])),s=((m=(c=be.value)==null?void 0:c.imageIds)!=null&&m.length?be.value.imageIds:(g=be.value)!=null&&g.imageId?[be.value.imageId]:[]).map(I=>t.get(I)).filter(I=>!!I);return s.length?s:Ia.value}),In=S(()=>Sl.value.length?Sl.value.find(t=>t.image_id===w.value)??Sl.value[0]:null),Ve=S(()=>{const t=new Map(Sl.value.map(s=>[s.image_id,s])),l=C.value.map(s=>t.get(s)).filter(s=>!!s);return l.length?l:In.value?[In.value]:[]}),cs=S(()=>[In.value,...Ve.value,...Sl.value].filter(l=>!!l).find(l=>Lo(l.image_id))??null),Ai=S(()=>{const t=Ve.value.length;return t>4?"count-many":`count-${Math.max(t,1)}`}),Kd=S(()=>{const t=be.value;return t?[{label:"阶段",value:t.phase??"-"},{label:"进度",value:`${t.progress??0}%`},{label:"队列",value:t.queue??"-"},{label:"尝试",value:t.attempt??"-"},{label:"预计",value:t.eta??"-"},{label:"依赖",value:t.dependsOn??"-"},{label:"轮次",value:t.round??"-"},{label:"锁定项",value:t.lockedItems??"-"},{label:"本轮结论",value:t.decision??"-"},{label:"输入",value:t.input??"-"},{label:"产物",value:t.result??t.outputCount??"-"},{label:"状态",value:An(t.status)},{label:"模型",value:t.model},{label:"耗时",value:t.duration},{label:"说明",value:t.detail},{label:"提示词",value:t.prompt}]:[]}),ds=S(()=>{var Nn,ln,Tn,fo,po,Ea;const t=(Nn=ne.value)==null?void 0:Nn.feature_flags,l=(ln=ne.value)==null?void 0:ln.permissions,s=!!(l!=null&&l.can_write),c=!!(l!=null&&l.can_retry_tasks),m=!!(t!=null&&t.workspace&&s),g=ke.value,I=g==null?void 0:g.workflowId,q=I?It.value[I]:void 0,U=!!((q==null?void 0:q.status)==="completed"||(Tn=q==null?void 0:q.metadata)!=null&&Tn.final_archive_history_id),X=!!(m&&I),y=!!(m&&(g!=null&&g.profileId)),te=ao.value,f=!!(s&&!te),Q=!!(s&&!oo.value),W=be.value,Ne=(fo=_a.value)==null?void 0:fo.id,Le=g?zs(Ot("hires-fix",g)):[],pe=(po=cs.value)==null?void 0:po.image_id,Pt=Kn.value?"保存中":fn.value?"保存失败":$o.value?ql($o.value):I?"可保存":"先生成档案",al={id:"version",title:"保存快照",detail:fn.value||"把当前工作流、节点和选中角色卡摘要写入后端 workflow_history。",badge:"Save",state:Pt,tone:I?"accent":"neutral",action:Kn.value?"保存中":"保存快照",enabled:!!(X&&!Kn.value),actionKey:"workflowSaveVersion"},ml={id:"branch-from-node",title:"从此节点创建分支",detail:vn.value||wa.value||"当前节点已锁定,修改会进入新的工作流分支。",badge:"Branch",state:pn.value?"创建中":(Ea=Cn.value)!=null&&Ea.branch_name?`基于 ${Cn.value.branch_name}`:"等待后端节点",tone:"warn",action:pn.value?"创建中":"创建分支",enabled:!!(X&&Cn.value&&!pn.value),actionKey:"workflowCreateBranchFromNode"},Gt=te?[ml,al]:[al];return oo.value?[ml,al]:Ne==="profile-prep"?(W==null?void 0:W.id)==="brief-import"?[{id:"new-profile",title:"创建角色档案",detail:"打开问卷,新建粗略人设并作为工作流输入。",badge:"Profile",state:"问卷入口",tone:"primary",action:"填写问卷",enabled:!0,actionKey:"personaQuestionnaire"},{id:"external-profile",title:"导入外部角色卡",detail:"粘贴外部人设文本,自动识别并填入角色档案问卷。",badge:"Paste",state:"文本识别",tone:"accent",action:"粘贴导入",enabled:!0,actionKey:"externalProfileImport"},{id:"split-next",title:"进入设定拆解",detail:dn.value||`使用当前选中的 ${g.name} 通过后端工作流进入 LLM 拆解。`,badge:"Next",state:Hn.value?"拆解中":I?"已落库":g.profileId?"可创建工作流":"先生成档案",tone:"primary",action:Hn.value?"拆解中":"拆解",enabled:!!(y&&!Hn.value),actionKey:"workflowPersonaSplit"},al]:(W==null?void 0:W.id)==="persona-split"?[{id:"split-run",title:"重新拆解设定",detail:"用当前角色档案重新生成结构化字段。",badge:"LLM",state:s?"可拆解":"只读",tone:"primary",action:"拆解",enabled:!!(f&&!me.value),actionKey:"workflowNodeGenerate"},{id:"field-review",title:"确认字段",detail:"检查身份、外观、服装、配饰和禁用项。",badge:"Check",state:`${Ca.value}/${ka.value}`,tone:"accent",action:"确认",enabled:!!(f&&!me.value),actionKey:"workflowNodeComplete"},{id:"prompt-next",title:"进入提示词规划",detail:"把结构化字段转入提示词矩阵。",badge:"Next",state:"下一节点",tone:"primary",action:"规划",enabled:!0,actionKey:"workflowPromptPlanNext"},...Gt]:(W==null?void 0:W.id)==="prompt-plan"?[{id:"prompt-build",title:"生成提示词矩阵",detail:"生成头像、半身、全身和设定图提示词。",badge:"Prompt",state:"6 条提示词",tone:"primary",action:"生成",enabled:!!(f&&!me.value),actionKey:"workflowPromptPlanSave"},{id:"negative-check",title:"校验负面词",detail:"检查负面提示词、权重和冲突项。",badge:"Guard",state:"待校验",tone:"warn",action:"校验",enabled:!!(f&&!me.value),actionKey:"workflowPromptPlanSave"},{id:"material-next",title:"进入素材绑定",detail:"把提示词和素材分类绑定到后续节点。",badge:"Next",state:"下一节点",tone:"accent",action:"绑定",enabled:m,actionKey:"workflowMaterialBindSave"},...Gt]:[{id:"material-bind",title:"绑定参考素材",detail:"把风格、构图、服装、鞋袜和配饰写入节点参数。",badge:"Material",state:"5 类参考",tone:"primary",action:"绑定",enabled:!!(f&&!me.value),actionKey:"workflowMaterialBindSave"},{id:"open-materials",title:"打开素材库",detail:"补充或替换当前角色参考素材。",badge:"Library",state:"素材入口",tone:"accent",action:"素材",enabled:!0,nav:"materials",module:"images"},{id:"draft-next",title:"进入头像草稿",detail:"确认素材绑定后进入头像草稿生成。",badge:"Next",state:"下一阶段",tone:"primary",action:"草稿",enabled:m,actionKey:"workflowMaterialBindSave"},...Gt]:Ne==="portrait-draft"?[{id:"portrait-generate",title:"生成头像草稿",detail:"按当前轮次生成头像和半身候选。",badge:"Draft",state:(W==null?void 0:W.round)??"草稿轮次",tone:"primary",action:"生成",enabled:!!(f&&!me.value),actionKey:"workflowNodeGenerate"},{id:"portrait-compare",title:"对比候选",detail:"平铺当前选中的草稿进行大图对比。",badge:"Compare",state:`${Ve.value.length} 已选`,tone:"accent",action:"对比",enabled:Ve.value.length>1,actionKey:"workflowCompare"},{id:"portrait-retry",title:"再跑一轮",detail:"保留锁定元素,创建下一轮头像草稿节点。",badge:"Retry",state:c?"可重试":"无权限",tone:c?"warn":"neutral",action:"重试",enabled:!!(c&&!te&&!me.value),actionKey:"workflowNodeRetry"},{id:"portrait-review",title:"审查当前节点",detail:"读取后端同提示词多模型审查结果,记录候选评分和问题。",badge:"Review",state:Ve.value.length?`${Ve.value.length} 张候选`:"待候选",tone:"accent",action:"审查",enabled:!!(Q&&!me.value),actionKey:"workflowNodeReview"},{id:"portrait-adopt",title:"确认采用",detail:pe?"采用当前选中的头像/半身候选,锁定本节点并交接到下一流程。":"请先生成并选中一张真实后端候选图。",badge:"Adopt",state:pe?"可采用":"待候选",tone:"primary",action:"采用",enabled:!!(Q&&pe&&!me.value),actionKey:"workflowReviewAdopt"},...Gt]:Ne==="body-sheet"?[{id:"body-generate",title:"生成设定图",detail:"生成全身、手部、配饰或拆分设定图。",badge:"Sheet",state:(W==null?void 0:W.title)??"设定图",tone:"primary",action:"生成",enabled:!!(f&&!me.value),actionKey:"workflowNodeGenerate"},{id:"detail-fix",title:"细节补图",detail:"针对手部、鞋袜、配饰等局部继续补图。",badge:"Fix",state:(W==null?void 0:W.outputCount)??"待产物",tone:"accent",action:"补图",enabled:!!(f&&!me.value),actionKey:"workflowNodeGenerate"},{id:"body-retry",title:"重跑当前设定",detail:"保留人设锁定项,重跑当前设定图节点。",badge:"Retry",state:c?"可重试":"无权限",tone:c?"warn":"neutral",action:"重试",enabled:!!(c&&!te&&!me.value),actionKey:"workflowNodeRetry"},{id:"body-review",title:"审查当前节点",detail:"按当前设定图节点拉取后端审查结果,确认可用候选和异常项。",badge:"Review",state:Ve.value.length?`${Ve.value.length} 张候选`:"待候选",tone:"accent",action:"审查",enabled:!!(Q&&!me.value),actionKey:"workflowNodeReview"},{id:"body-adopt",title:"确认采用",detail:pe?"采用当前选中的设定图候选,锁定本节点并放入高清修复桶。":"请先生成并选中一张真实后端候选图。",badge:"Adopt",state:pe?"可采用":"待候选",tone:"primary",action:"采用",enabled:!!(Q&&pe&&!me.value),actionKey:"workflowReviewAdopt"},...Gt]:[{id:"hires",title:"高清修复与统一风格",detail:"对选中结果进行高清修复和统一风格。",badge:"Fix",state:(W==null?void 0:W.title)??"修复节点",tone:"accent",action:"修复",enabled:!!(f&&!me.value),actionKey:"workflowNodeGenerate"},{id:"hires-adopt",title:"确认修复结果",detail:pe?"采用当前修复图,锁定修复节点并交接到入库。":"请先完成高清修复并选中真实后端图片。",badge:"Adopt",state:pe?"可采用":"待成品",tone:"primary",action:"采用",enabled:!!(Q&&Me.value==="hires-fix"&&pe&&!me.value),actionKey:"workflowReviewAdopt"},{id:"archive",title:"入库",detail:"把最终结果保存为可复用角色版本。",badge:"Archive",state:U?"已入库":`${Le.length} 张成品`,tone:"accent",action:"入库",enabled:!!(s&&(g!=null&&g.workflowId)&&Le.length&&!U&&!me.value),actionKey:"workflowArchiveFinal"},...Gt]});function Gd(t){return{Save:"保存",Branch:"分支",Profile:"档案",Paste:"导入",Next:"下一步",LLM:"LLM",Check:"确认",Prompt:"提示词",Guard:"校验",Material:"素材",Library:"素材库",Draft:"草稿",Compare:"对比",Retry:"重跑",Review:"审查",Adopt:"采用",Sheet:"设定图",Fix:"修复",Pick:"选图",Archive:"入库",Gallery:"图库"}[t]??t}function fs(t){return{version:"保存","branch-from-node":"分支","new-profile":"建档","external-profile":"导入","split-next":"拆解","split-run":"拆解","field-review":"确认","prompt-next":"规划","prompt-build":"生成","negative-check":"校验","material-next":"绑定","material-bind":"绑定","open-materials":"素材","draft-next":"草稿","portrait-generate":"生成","portrait-compare":"对比","portrait-retry":"重跑","portrait-review":"审查","portrait-adopt":"采用","body-generate":"生成","detail-fix":"补图","body-retry":"重跑","body-review":"审查","body-adopt":"采用","hires-adopt":"采用",review:"审核",hires:"修复",archive:"入库"}[t.id]??t.action}const Zl=S(()=>pt.value.filter(t=>["failed","dead_letter","cancelled"].includes(ct(t.status)))),Al=S(()=>pt.value.filter(t=>["running","queued","created","pending"].includes(ct(t.status)))),ps=S(()=>pt.value.filter(t=>["completed","succeeded"].includes(ct(t.status)))),zd=S(()=>[{key:"active",label:"运行中",count:Al.value.length},{key:"failed",label:"需处理",count:Zl.value.length},{key:"done",label:"已完成",count:ps.value.length},{key:"all",label:"全部",count:pt.value.length}]),io=S(()=>ul.value==="active"?Al.value:ul.value==="failed"?Zl.value:ul.value==="done"?ps.value:pt.value),Ml=S(()=>pt.value.length?pt.value.find(t=>t.task_id===_t.value)??io.value[0]??pt.value[0]:null),Qd=S(()=>{var t,l,s,c,m,g,I;return[{label:"队列总量",value:String(ll.value),hint:`运行 ${((t=F.value)==null?void 0:t.queue.running)??Al.value.length} / 等待 ${((l=F.value)==null?void 0:l.queue.pending)??0}`,state:ll.value>20?"warn":ll.value>0?"good":"idle"},{label:"正在处理",value:String(Al.value.length||((s=F.value)==null?void 0:s.queue.running)||0),hint:Al.value[0]?Oo(Al.value[0]):"Worker 当前空闲",state:Al.value.length?"good":"idle"},{label:"异常任务",value:String(Zl.value.length||((c=F.value)==null?void 0:c.queue.failed)||0),hint:`死信 ${((m=F.value)==null?void 0:m.queue.dead_letter)??0}`,state:Zl.value.length||(((g=F.value)==null?void 0:g.queue.dead_letter)??0)>0?"bad":"good"},{label:"今日吞吐",value:String(((I=F.value)==null?void 0:I.today_generation_count)??0),hint:"生成请求统计",state:"good"}]}),Jd=S(()=>{const t=Ml.value;return t?[{label:"任务 ID",value:t.task_id},{label:"任务类型",value:t.task_type||"-"},{label:"状态",value:Sn(t.status)},{label:"模型路由",value:t.model_route||"-"},{label:"进度",value:`${Ta(t)}%`},{label:"等待时间",value:Ji(t)},{label:"角色",value:t.profile_id||"-"},{label:"工作流",value:t.workflow_id||"-"},{label:"节点",value:t.node_id||"-"},{label:"创建",value:ql(t.created_at)},{label:"更新",value:ql(t.updated_at)},{label:"错误",value:t.error_message||"-"}]:[{label:"任务",value:"未选中"},{label:"状态",value:"队列空闲"},{label:"提示",value:"新的生成任务会在这里显示详情"}]}),Mi=S(()=>{var g,I,q,U;const t=!!((g=ne.value)!=null&&g.permissions.can_write),l=!!((I=ne.value)!=null&&I.permissions.can_retry_tasks),s=Ml.value,c=s?L.job(s.task_id):L.jobs,m=hn.value;return[{id:"refresh",title:"刷新队列",detail:"重新拉取任务列表、Dashboard 摘要和最新错误。",badge:"GET",endpoint:L.jobs,action:el.value||m==="refresh"?"同步中":"刷新",tone:"good",enabled:!el.value&&!m},{id:"retry",title:"重试选中任务",detail:"失败或死信任务将重新提交到后端任务队列。",badge:"POST",endpoint:s?L.jobRetry(s.task_id):L.jobDeadLetterRetry,action:m==="retry"?"重试中":"重试",tone:"warn",enabled:!!(!m&&s&&t&&l&&Zl.value.some(X=>X.task_id===s.task_id))},{id:"cancel",title:"取消运行任务",detail:"对 running / queued / pending 任务发送取消请求。",badge:"POST",endpoint:s?L.jobCancel(s.task_id):c,action:m==="cancel"?"取消中":"取消",tone:"bad",enabled:!!(!m&&s&&t&&Al.value.some(X=>X.task_id===s.task_id))},{id:"dead-letter-retry",title:"重试死信任务",detail:"批量把死信队列里的任务重新排队。",badge:"DLQ",endpoint:L.jobDeadLetterRetry,action:m==="dead-letter-retry"?"处理中":"重试死信",tone:"warn",enabled:!!(!m&&t&&l&&(((q=F.value)==null?void 0:q.queue.dead_letter)??0)>0)},{id:"failed-to-dead-letter",title:"失败移入死信",detail:"批量把失败任务移入死信队列,避免重复污染普通失败列表。",badge:"DLQ",endpoint:L.jobDeadLetterMoveFailed,action:m==="failed-to-dead-letter"?"移动中":"移入死信",tone:"idle",enabled:!!(!m&&t&&l&&(((U=F.value)==null?void 0:U.queue.failed)??Zl.value.length)>0)}]}),Yd=S(()=>{const t=Hl.value,l=Kl.value,s="#d65b7f",c="#d2a23a",m="#667085";return{"--primary":t,"--accent":l,"--primary-soft":El(t,.15),"--primary-strong":El(t,.32),"--accent-soft":El(l,.15),"--accent-strong":El(l,.34),"--rail-start":Yi(t,"#ffffff",.12),"--rail-mid":Yi(t,l,.16),"--rail-end":Yi(t,"#111827",.18),"--danger":s,"--danger-soft":El(s,.14),"--danger-strong":El(s,.34),"--warn":c,"--warn-soft":El(c,.16),"--warn-strong":El(c,.34),"--neutral":m,"--neutral-soft":El(m,.14)}}),Ni=S(()=>{var l,s,c,m,g,I,q,U;const t=((l=F.value)==null?void 0:l.plugin_status)??"stopped";return[{label:"服务状态",value:Sn(t),hint:Rt.value?"连接异常":"Dashboard summary",state:t==="running"?"good":t==="degraded"?"warn":"bad"},{label:"队列压力",value:String(ll.value),hint:`等待 ${((s=F.value)==null?void 0:s.queue.pending)??0} / 失败 ${((c=F.value)==null?void 0:c.queue.failed)??0}`,state:ll.value>20?"warn":"good"},{label:"运行任务",value:String(((m=F.value)==null?void 0:m.queue.running)??Al.value.length),hint:"当前 Worker 负载",state:(((g=F.value)==null?void 0:g.queue.running)??0)>0?"good":"idle"},{label:"今日调用",value:String(((I=F.value)==null?void 0:I.today_generation_count)??0),hint:"生成请求统计",state:"good"},{label:"今日成本",value:"未接入",hint:"等待成本接口回填",state:"idle"},{label:"存储占用",value:Mn(((q=F.value)==null?void 0:q.storage.total_bytes)??0),hint:`图片 ${Mn(((U=F.value)==null?void 0:U.storage.images_bytes)??0)}`,state:"good"}]}),Xd=S(()=>Ni.value.filter(t=>["服务状态","队列压力","存储占用"].includes(t.label))),vs=S(()=>{const t=sa.value.trim().toLowerCase();return t?de.filter(l=>[l.title,l.description,...l.keywords].join(" ").toLowerCase().includes(t)).slice(0,6):de.slice(0,5)}),Zd=S(()=>Gn.value),No=S(()=>{var l,s,c;const t=[];for(const m of pt.value){const g=ct(m.status);["completed","succeeded"].includes(g)&&t.push({id:`job-completed-${m.task_id}`,type:"completed",title:"生图任务已完成",detail:Oo(m),createdAt:m.updated_at||m.created_at}),["failed","dead_letter","cancelled"].includes(g)&&t.push({id:`job-failed-${m.task_id}`,type:"failed",title:"任务需要处理",detail:m.error_message||Oo(m),createdAt:m.updated_at||m.created_at})}for(const m of J.value){const g=ct(m.status);["completed","succeeded"].includes(g)&&t.push({id:`generation-completed-${m.task_id}`,type:"completed",title:"生成日志已完成",detail:`${m.task_id} / ${m.progress}%`,createdAt:m.updated_at||m.created_at})}for(const m of ye.value.slice(0,6))t.push({id:`error-${m.source}-${m.id}`,type:"failed",title:m.source||"错误日志",detail:m.error_message||m.status,createdAt:m.created_at});return(((l=F.value)==null?void 0:l.queue.dead_letter)??0)>0&&t.push({id:"queue-dead-letter",type:"warning",title:"死信队列有待处理任务",detail:`${((s=F.value)==null?void 0:s.queue.dead_letter)??0} 个任务等待重试或归档`,createdAt:yi.value}),((c=F.value)==null?void 0:c.plugin_status)==="degraded"&&t.push({id:"system-degraded",type:"system",title:"服务处于降级状态",detail:"部分接口可能暂时不可用",createdAt:yi.value}),Hp(t).filter(m=>!zn.value.includes(m.id)).sort((m,g)=>er(g.createdAt)-er(m.createdAt)).slice(0,12)}),ms=S(()=>No.value.filter(t=>pa.value==="all"||t.type===pa.value)),Ti=S(()=>No.value.filter(t=>!Ht.value.includes(t.id)).length),gs=S(()=>No.value.slice(0,3)),qi=S(()=>{var l,s,c,m,g,I;const t=[];return(Zl.value.length||(((l=F.value)==null?void 0:l.queue.failed)??0)>0||(((s=F.value)==null?void 0:s.queue.dead_letter)??0)>0)&&t.push({id:"retry-failed",tone:"retry",title:"处理失败任务",detail:`${Zl.value.length||((c=F.value)==null?void 0:c.queue.failed)||0} 条任务可能需要重试或查看错误原因`,action:"查看队列",nav:"queue",module:"queue"}),ye.value.length&&t.push({id:"read-errors",tone:"confirm",title:"确认最新错误",detail:((m=ye.value[0])==null?void 0:m.error_message)||"错误日志已有新条目",action:"打开日志",nav:"logs",module:"logs"}),(((g=F.value)==null?void 0:g.today_generation_count)??0)>40&&t.push({id:"cost-watch",tone:"cost",title:"今日调用偏高",detail:"建议检查模型路由和批量生成成本",action:"查看监控",nav:"performance",module:"performance"}),(I=ne.value)!=null&&I.feature_flags.api_discovery||t.push({id:"config-discovery",tone:"config",title:"能力探测未开启",detail:"模型能力确认后,生成流程会更稳",action:"检查设置",nav:"settings",module:"settings"}),!pt.value.length&&!Rt.value&&t.push({id:"continue-flow",tone:"flow",title:"队列空闲",detail:"可以开始新的角色图或素材生成",action:"进入生成",nav:"generate",module:"generate"}),t.slice(0,4)}),ef=S(()=>{var g,I;const t=(g=ne.value)==null?void 0:g.permissions,l=(I=ne.value)==null?void 0:I.feature_flags,s=!!(t!=null&&t.can_write),c=!!(t!=null&&t.can_retry_tasks),m=!!(t!=null&&t.can_manage_materials);return[{id:"new-generation",group:"创建入口",title:"新建图片任务",detail:"从提示词、角色或节点继续生成,最终提交到任务队列。",badge:"核心入口",endpoint:L.nodeGenerate(":nodeId"),state:s?"可接入":"只读权限",tone:s?"primary":"neutral",action:"待排布表单",enabled:s},{id:"quick-profile",group:"创建入口",title:"快速角色草稿",detail:"先生成角色基础信息,再进入角色工作流补图。",badge:"角色起步",endpoint:L.quickProfileDraft,state:l!=null&&l.quick_profile?"已开启":"未开启",tone:l!=null&&l.quick_profile?"accent":"neutral",action:"放入角色入口",enabled:!!(l!=null&&l.quick_profile&&s),nav:"profiles",module:"suggestions"},{id:"workflow-create",group:"创建入口",title:"角色工作流",detail:"按角色保存多节点流程,支持启动、取消、归档和续跑。",badge:"流程",endpoint:L.profileWorkflows(":profileId"),state:l!=null&&l.workspace?"已开启":"未开启",tone:l!=null&&l.workspace?"primary":"neutral",action:"整理工作流",enabled:!!(l!=null&&l.workspace&&s),nav:"profiles",module:"suggestions"},{id:"prompt-compose",group:"创作控制",title:"提示词组合",detail:"组合基础、外观、风格、负面词和本次生成描述。",badge:"Prompt",endpoint:"local/prompt-composer",state:"待排布",tone:"primary",action:"做成主输入区",enabled:!0},{id:"node-generate",group:"创作控制",title:"节点生成与重试",detail:"对单个节点发起生成、失败重试、标记完成或补选结果。",badge:"节点",endpoint:`${L.nodeGenerate(":nodeId")} / ${L.nodeRetry(":nodeId")}`,state:c?"可重试":"无重试权限",tone:c?"accent":"neutral",action:"接入队列操作",enabled:c,nav:"queue",module:"queue"},{id:"model-route",group:"创作控制",title:"模型路由与能力探测",detail:"确认 provider、模型能力、渲染计划和手动覆盖规则。",badge:"模型",endpoint:L.apiDiscoveryCapabilities,state:l!=null&&l.api_discovery?"已开启":"未开启",tone:l!=null&&l.api_discovery?"primary":"warn",action:"放入参数侧栏",enabled:!!(l!=null&&l.api_discovery),nav:"settings",module:"settings"},{id:"material-pick",group:"资源资产",title:"素材库引用",detail:"从素材库选择参考图、导入素材包,并触发识别或确认。",badge:"素材",endpoint:L.materials,state:l!=null&&l.material_library?"已开启":"未开启",tone:l!=null&&l.material_library?"accent":"neutral",action:"做成选择器",enabled:!!(l!=null&&l.material_library&&m),nav:"materials",module:"images"},{id:"wardrobe-match",group:"资源资产",title:"衣橱搭配",detail:"把素材导入角色衣橱,匹配服装、配件和组合。",badge:"衣橱",endpoint:L.wardrobeMatch(":profileId"),state:l!=null&&l.wardrobe?"已开启":"未开启",tone:l!=null&&l.wardrobe?"accent":"neutral",action:"并入素材面板",enabled:!!(l!=null&&l.wardrobe&&m),nav:"materials",module:"images"},{id:"daily-outfit",group:"资源资产",title:"私伴每日穿搭",detail:"根据私伴集成生成每日穿搭建议,再转为素材或生成任务。",badge:"集成",endpoint:L.privateCompanionDailyOutfit,state:l!=null&&l.private_companion_integration?"已开启":"未开启",tone:l!=null&&l.private_companion_integration?"primary":"neutral",action:"保留为扩展卡",enabled:!!(l!=null&&l.private_companion_integration)},{id:"queue-control",group:"执行结果",title:"队列调度",detail:"查看等待、运行、失败、死信任务,并支持取消、重试和归档。",badge:"队列",endpoint:L.jobs,state:`${ll.value} 个任务`,tone:ll.value>0?"warn":"accent",action:"查看队列",enabled:!0,nav:"queue",module:"queue"},{id:"review-select",group:"执行结果",title:"结果审核与选图",detail:"对节点结果做审核、选择、取消选择、采用或归档。",badge:"审核",endpoint:L.nodeReview(":nodeId"),state:s?"可接入":"只读权限",tone:s?"primary":"neutral",action:"放到结果区",enabled:s},{id:"gallery-archive",group:"执行结果",title:"图库与历史",detail:"查看最近结果、节点图片、工作流历史和已归档图片。",badge:"图库",endpoint:L.image(":imageId"),state:`${Ql.value.length} 张最近结果`,tone:Ql.value.length?"accent":"neutral",action:"打开图库",enabled:!0,nav:"gallery",module:"images"}]}),hs=S(()=>r.find(t=>t.key===ue.value)??r[0]),ys=S(()=>{const t=new Set(u[ue.value]);return ef.value.filter(l=>t.has(l.id))}),tf=S(()=>{var s,c,m,g,I,q,U,X,y;const t=ys.value.filter(te=>te.enabled).length,l=ys.value.length;return ue.value==="quickProfile"?[{label:"当前页面",value:"快速角色",hint:"草稿、素材和衣橱入口"},{label:"角色草稿",value:(s=ne.value)!=null&&s.feature_flags.quick_profile?"开启":"未开",hint:"用于快速生成角色基础信息"},{label:"素材能力",value:(c=ne.value)!=null&&c.feature_flags.material_library?"开启":"未开",hint:"参考图和素材识别会放在这里"},{label:"可用卡片",value:String(t),hint:`共 ${l} 项功能`}]:ue.value==="workflow"?[{label:"当前页面",value:"角色工作流",hint:"多节点流程和续跑入口"},{label:"工作流",value:(m=ne.value)!=null&&m.feature_flags.workspace?"开启":"未开",hint:"支持启动、取消、归档和续跑"},{label:"当前队列",value:String(ll.value),hint:`运行 ${((g=F.value)==null?void 0:g.queue.running)??0} / 失败 ${((I=F.value)==null?void 0:I.queue.failed)??0}`},{label:"可用卡片",value:String(t),hint:`共 ${l} 项功能`}]:[{label:"当前页面",value:"图片生成",hint:"提示词、模型、素材和结果"},{label:"写入权限",value:(q=ne.value)!=null&&q.permissions.can_write?"可写":"只读",hint:(U=ne.value)!=null&&U.permissions.can_retry_tasks?"可重试任务":"无重试权限"},{label:"当前队列",value:String(ll.value),hint:`运行 ${((X=F.value)==null?void 0:X.queue.running)??0} / 失败 ${((y=F.value)==null?void 0:y.queue.failed)??0}`},{label:"最近结果",value:String(Ql.value.length),hint:"图库与审核区可复用这些结果"}]}),lf=S(()=>{var t,l,s,c;return[{label:"Pending",value:((t=F.value)==null?void 0:t.queue.pending)??0},{label:"Running",value:((l=F.value)==null?void 0:l.queue.running)??0},{label:"Failed",value:((s=F.value)==null?void 0:s.queue.failed)??0},{label:"Dead",value:((c=F.value)==null?void 0:c.queue.dead_letter)??0}]}),nf=S(()=>{var t,l,s,c;return[{label:"总占用",value:Mn(((t=F.value)==null?void 0:t.storage.total_bytes)??0)},{label:"图片",value:Mn(((l=F.value)==null?void 0:l.storage.images_bytes)??0)},{label:"素材",value:Mn(((s=F.value)==null?void 0:s.storage.materials_bytes)??0)},{label:"临时",value:Mn(((c=F.value)==null?void 0:c.storage.temp_bytes)??0)}]}),of=()=>{if(ue.value!=="quickProfile"||Zt.value)return;const t=wn.value;if(t.length<2)return;const l=t.findIndex(c=>c.id===kt.value),s=l>=0?(l+1)%t.length:0;kt.value=t[s].id},bs=()=>{ga!==void 0&&(window.clearInterval(ga),ga=void 0)},af=()=>{bs(),ga=window.setInterval(of,6500)};Vr(()=>{Wp(),document.addEventListener("pointerdown",Zs,!0),document.addEventListener("pointermove",ks,!0),document.addEventListener("keydown",eu),$a(fk),af(),Ei()}),jr(()=>{document.removeEventListener("pointerdown",Zs,!0),document.removeEventListener("pointermove",ks,!0),document.removeEventListener("keydown",eu),Ri(),bs()}),St([cl,Hl,Kl,Ht,zn],Vp,{deep:!0}),St(Jl,t=>{if(!t.length){Ie.value="";return}t.some(l=>l.image_id===Ie.value)||(Ie.value=t[0].image_id)},{immediate:!0}),St(yn,t=>{if(!t.length){rt.value="";return}t.some(l=>l.value===rt.value)||(rt.value=t[0].value)},{immediate:!0}),St(wn,t=>{if(!t.length){kt.value="";return}t.some(l=>l.id===kt.value)||(kt.value=t[0].id)},{immediate:!0}),St(kn,t=>{if(!t.length){Me.value="";return}t.some(l=>l.id===Me.value)||(Me.value=t[0].id)},{immediate:!0}),St(Sl,t=>{if(!t.length){w.value="",C.value=[];return}const l=new Set(t.map(c=>c.image_id)),s=C.value.filter(c=>l.has(c));C.value=s.length?s:t.slice(0,2).map(c=>c.image_id),t.some(c=>c.image_id===w.value)||(w.value=C.value[0]??t[0].image_id)},{immediate:!0}),St([pt,io],()=>{var t;if(!pt.value.length){_t.value="";return}pt.value.some(l=>l.task_id===_t.value)||(_t.value=((t=io.value[0])==null?void 0:t.task_id)??pt.value[0].task_id)},{immediate:!0}),St(Yl,t=>{if(!t.length){Je.value="";return}t.some(l=>l.id===Je.value)||(Je.value=t[0].id)},{immediate:!0}),St(Ii,t=>{if(!t.length){jt.value="";return}t.some(l=>l.id===jt.value)||(jt.value=t[0].id)},{immediate:!0}),St(bn,t=>{if(!t.length){Vl.value="";return}t.some(l=>l.id===Vl.value)||(Vl.value=t[0].id)},{immediate:!0}),St(ke,t=>{t!=null&&t.profileId&&Ds(t)}),St(kt,()=>{rn(()=>{var t;(t=document.querySelector(".quick-profile-image-types button.active"))==null||t.scrollIntoView({block:"nearest",behavior:"smooth"})})});function rf(){const t=new URLSearchParams(window.location.search).get("view");return n.some(l=>l.key===t)?t:"overview"}function _s(){const t=mr();return{state:"checking",label:"连接中",title:"正在检测后端连接",detail:t==="plugin-bridge"?"正在通过 AstrBot 插件桥读取 ui/bootstrap。":"正在通过同源 API 读取 ui/bootstrap。",transport:t,checkedAt:""}}function sf(){fe.value=_s()}function uf(t){const l=mr();fe.value={state:"connected",label:"后端已连接",title:"后端已连接",detail:l==="plugin-bridge"?"已通过 AstrBot 插件桥调用后端,写入动作会进入工作流并落库。":`已通过同源 API ${t.api_base} 调用后端,写入动作会进入工作流并落库。`,transport:l,checkedAt:new Date().toISOString()}}function cf(t){const l=mr(),s=l==="direct-fetch"&&df(t);fe.value={state:s?"preview":"error",label:s?"预览模式":"连接异常",title:s?"当前未连接真实插件后端":"后端连接异常",detail:s?"当前页面只跑在前端预览里,没有拿到 ImageStudio 后端 API;需要在 AstrBot 插件页或真实 API 代理下验收落库。":ws(t),transport:l,checkedAt:new Date().toISOString()}}function df(t){return t instanceof jn?["invalid_api_response","network_unreachable","http_error"].includes(t.code):!0}function ws(t){return t instanceof jn?t.code==="invalid_api_response"?"接口返回了页面内容或非 JSON 数据,不是 ImageStudio API 响应。":t.code==="network_unreachable"?"无法连接 ImageStudio 后端接口。":t.message||"ImageStudio 后端接口请求失败。":t instanceof Error?t.message.includes("Unexpected token")?"接口返回了页面内容或非 JSON 数据,不是 ImageStudio API 响应。":t.message.includes("Failed to fetch")||t.message.includes("NetworkError")?"无法连接 ImageStudio 后端接口。":t.message||"加载失败":"加载失败"}function $t(t){var l;return fe.value.state==="checking"?`${t}需要先完成后端连接检测。`:fe.value.state!=="connected"?`${t}需要连接 ImageStudio 后端后才能落库。${fe.value.detail}`:(l=ne.value)!=null&&l.permissions.can_write?"":`${t}需要后端写入权限。`}async function Ei(){await Promise.all([ff(),pl(),$n(),en(),mf(),gf(),ro()]),yi.value=new Date().toISOString()}async function ff(){sf();try{ne.value=await Ue(L.uiBootstrap),uf(ne.value)}catch(t){ne.value=null,cf(t)}}function pf(){return{roleCore:"近未来港区巡查员,负责夜间巡逻和异常记录。",personality:"冷静、可靠、行动快,外冷内热。",appearance:"黑色短发,青绿色眼睛,轻机能外套。",outfit:"短靴、发光臂章、便携通讯设备。",scene:"星港、雨夜街区、巡查终端、航灯背景。",avoid:"过度复杂、低清晰度、肢体结构错误。",worldview:"",background:"",heightBuild:"",bodyFeatures:"",likes:"",dislikes:"",habits:"",relationships:"",storyHooks:"",generationStyle:"",shotPreference:"",mood:"",extraNotes:""}}function vf(){return{roleCore:"",personality:"",appearance:"",outfit:"",scene:"",avoid:"",worldview:"",background:"",heightBuild:"",bodyFeatures:"",likes:"",dislikes:"",habits:"",relationships:"",storyHooks:"",generationStyle:"",shotPreference:"",mood:"",extraNotes:""}}async function pl(){Qn.value=!0,Rt.value="";try{F.value=await Ue(L.dashboardSummary)}catch(t){Rt.value=ze(t)}finally{Qn.value=!1}}async function $n(){el.value=!0,hn.value||(tl.value="");try{_e.value=await Ue(L.jobs,{page:1,page_size:12})}catch(t){tl.value=ze(t)}finally{el.value=!1}}async function en(){hi.value=!0,Jn.value="";try{const[t,l]=await Promise.all([Ue(L.generationLogs,{limit:12}),Ue(L.errorLogs,{limit:12})]);J.value=t,ye.value=l}catch(t){Jn.value=ze(t)}finally{hi.value=!1}}async function mf(){va.value=!0,ma.value="";try{De.value=await Ue(L.apiDiscoveryCapabilities)}catch(t){De.value=[],ma.value=ze(t)}finally{va.value=!1}}async function ro(){var t;xl.value=!0,qt.value="",st.value||(wt.value="");try{const[l,s]=await Promise.all([Ue(L.materialCategories),Ue(L.materials,{page:1,page_size:60})]);Ke.value=l,tt.value=s,!Io.value&&((t=ne.value)!=null&&t.permissions.can_manage_materials)&&(Io.value=!0,Cp(l))}catch(l){Ke.value=[],tt.value=null,qt.value=ze(l)}finally{xl.value=!1}}async function gf(){try{const l=(await Ue(L.profiles,{page:1,page_size:40})).items.filter(c=>{var m;return((m=c.metadata)==null?void 0:m.system_key)!==Da}),s=await Promise.all(l.map(async(c,m)=>{let g=[];try{g=await Ue(L.profileWorkflows(c.profile_id))}catch{g=[]}const I=g.find(To),q=g.find(U=>U.workflow_type==="quick_profile");return up(c,I,q,m)}));Un.value=s}catch{Un.value=[]}}function nl(t,l=(s=>(s=n.find(c=>c.key===t))==null?void 0:s.module)()??"overview"){re.value=t;const c=new URL(window.location.href);c.searchParams.set("view",t),window.history.replaceState({},"",`${c.pathname}${c.search}`),rn(()=>bf(l))}function hf(t){nl(t.key,t.module)}function Li(){Ri(),fa.value=!0}function ks(t){if(!window.matchMedia("(max-width: 900px)").matches){if(t.clientX<=pk){Li();return}fa.value&&t.clientX>=vk&&Yn===void 0&&$a(Ju)}}function $a(t=Ju){Ri(),Yn=window.setTimeout(()=>{fa.value=!1,Yn=void 0},t)}function Ri(){Yn!==void 0&&(window.clearTimeout(Yn),Yn=void 0)}function yf(t){sa.value=t.title,gi.value=!1,Gn.value=!1,nl(t.nav,t.module)}function bf(t){var l;(l=document.querySelector(`[data-module="${t}"]`))==null||l.scrollIntoView({block:"start",behavior:"smooth"})}function _f(){cl.value=cl.value==="dark"?"light":"dark"}function Bi(t){return`${t.hairColor} hair, ${t.hairstyle}, ${t.eyeColor} eyes, ${t.clothing}`}function wf(t){return`${t.name},${t.identity},personality: ${t.personality}`}function Cs(t){return{"--profile-color-a":t[0],"--profile-color-b":t[1],"--profile-color-c":t[2]}}function vl(t){const l=B.value[t];return l?k.find(s=>s.id===l&&s.category===t)??null:null}function Is(t){return B.value[t.category]===t.id}function Pa(t,l=0){const s=k.findIndex(c=>c.id===t.id);return tn((s>=0?s:l)+21,t.label,t.prompt,t.colors)}function $s(t){return t.group??t.category}function Ps(t){A.value=t}function xs(t){if(N.value===t&&lu("materialPicker")){vt("materialPicker");return}Ft("materialPicker"),N.value=t,t!==He&&(A.value=mo)}function Ss(t){B.value={...B.value,[t.category]:t.id},D.value=t.id,vt("materialPicker")}function As(t){var s;const l=k.find(c=>c.id===D.value);B.value={...B.value,[t]:""},(!l||l.category===t)&&(D.value=((s=Kt.value[0])==null?void 0:s.id)??""),vt("materialPicker")}function Ms(t){return`sample:${t}`}function Ns(t){return{Style:"风格",Composition:"构图",Outfit:"服装",Top:"服装",Bottom:"服装",Dress:"服装",Shoes:"鞋袜",Accessory:"配饰"}[t]??t}function kf(t){return[...t].sort((l,s)=>Ts(l)-Ts(s))}function Ts(t){return t.category_id.startsWith("cat_imagestudio_")?0:t.category_id.startsWith("cat_default_")?1:2}function qs(t){return{风格:"画风、渲染和色彩基准",构图:"头像、半身、全身和动态参考",服装:"衣服结构、层次和材质",鞋袜:"鞋型、袜型和下身比例参考",配饰:"头部、手部、胸前、腰部等局部物件"}[t]??"素材分类"}function Cf(t,l){var m,g,I;const s=t.category_id?Pd.value.get(t.category_id):"",c=Dt((m=t.metadata)==null?void 0:m.subcategory)||Dt((g=t.metadata)==null?void 0:g.group)||Dt((I=t.metadata)==null?void 0:I.accessory_group)||"其他";return{id:t.material_id,label:t.display_name||Tl(t.material_id),category:s||"未分类",categoryId:t.category_id||"uncategorized",subcategory:c,prompt:t.prompt??"",negativePrompt:t.negative_prompt??"",tags:t.tags??[],status:t.recognition_status||"uploaded",statusText:$f(t.recognition_status),endpoint:L.material(t.material_id),imageUrl:t.thumbnail_url||t.image_url||tn(l+41,t.display_name||"素材",t.prompt||"backend material",["#64748b","#2ec4b6","#7168f0"]),source:"backend",colors:["#64748b","#2ec4b6","#7168f0"],updatedAt:ql(t.updated_at||t.created_at)}}function If(t,l){return{id:t.id,label:t.label,category:t.category,categoryId:Ms(t.category),subcategory:t.group??"其他",prompt:t.prompt,negativePrompt:"",tags:[t.category,t.group??"角色参考"].filter(Boolean),status:"sample",statusText:"示例素材",endpoint:L.materials,imageUrl:Pa(t,l),source:"sample",colors:t.colors,updatedAt:"本地示例"}}function $f(t){return{sample:"示例素材",uploaded:"已上传",pending:"待识别",recognizing:"识别中",recognized:"已识别",confirmed:"已确认",failed:"识别失败",archived:"已归档"}[ct(t)]??(t||"待识别")}function Pf(t){const l=ct(t);return["failed"].includes(l)?"is-bad":["pending","uploaded","recognizing","recognized"].includes(l)?"is-warn":["confirmed"].includes(l)?"is-good":"is-idle"}function xf(t){Je.value!==t&&(Je.value=t,jt.value="")}function Sf(t){_n.value&&(Je.value=_n.value.id),jt.value=t}function Es(){var l;if(qt.value="",wt.value="",he.value="",Tt.value)return;const t=$t("添加素材分类");if(t){qt.value=t;return}if(!((l=ne.value)!=null&&l.permissions.can_manage_materials)){qt.value="添加素材分类需要素材管理权限。";return}oe.value="",ge.value="",Ft("materialCategoryCreate"),Y.value=!0,rn(()=>{var s;(s=document.querySelector("[data-material-category-name]"))==null||s.focus()})}async function Af(){var m,g;if(qt.value="",wt.value="",he.value="",Tt.value)return;const t=$t("添加素材分类");if(t){he.value=t;return}if(!((m=ne.value)!=null&&m.permissions.can_manage_materials)){he.value="添加素材分类需要素材管理权限。";return}const l=xo.value,s=oe.value.trim();if(!s)return;const c=l&&((g=_n.value)==null?void 0:g.source)==="backend"?_n.value.id:null;if(l&&!c){he.value="配饰父分类尚未落库,请先刷新素材库。";return}Tt.value=!0;try{const I=await Ee(L.materialCategories,{name:s,parent_id:c,category_type:l?"accessory_group":"material",sort_order:Ke.value.length*10+10,metadata:{source:"imagestudio_frontend",created_from:"materials_page",parent_category:l?He:void 0,note:ge.value.trim()||void 0}});wt.value=l?`配饰子分类「${I.name}」已落库。`:`素材分类「${I.name}」已落库。`,vt("materialCategoryCreate"),await ro(),l?(Je.value=c??Je.value,jt.value=I.name):Je.value=I.category_id}catch(I){he.value=`添加分类失败:${ze(I)}`}finally{Tt.value=!1}}function Ls(){ue.value="workflow",Me.value="material-bind",nl("generate","generate")}function Rs(t){ee.value={category:t,requestedAt:new Date().toISOString()},vt("materialPicker"),nl("materials","images");const l=new URL(window.location.href);l.searchParams.set("materialAction","add"),l.searchParams.set("materialCategory",t),window.history.replaceState({},"",`${l.pathname}${l.search}`)}function Oi(t){ra.value=t.id,dn.value="",fn.value="",Po.value="",Z.value="",M.value={name:t.name,identity:t.identity,personality:t.personality,hairColor:t.hairColor,hairstyle:t.hairstyle,eyeColor:t.eyeColor,clothing:t.clothing,style:t.style,negative:t.negative};const l=k.find(s=>s.id===t.materialId);l&&(B.value={...B.value,[l.category]:l.id},D.value=l.id),t.profileId&&Ds(t)}function Bs(t){wn.value.some(l=>l.id===t)&&(kt.value=t)}function ol(t){var m;const l=kn.value.find(g=>g.id===t);if(!l)return;Me.value=l.id;const c=((m=l.imageIds)!=null&&m.length?l.imageIds:[l.imageId]).filter(g=>Ia.value.some(I=>I.image_id===g));c.length&&(w.value=c[0],C.value=c)}function Mf(t){if(!Sl.value.some(s=>s.image_id===t))return;if(oo.value){Z.value=Pn("更换选图");return}const l=C.value;if(l.includes(t)){l.length>1?(C.value=l.filter(s=>s!==t),w.value=C.value[0]??t):w.value=t;return}C.value=[...l,t],w.value=t,!ao.value&&Nf(t)}async function Nf(t){const l=ke.value;if(!l)return;const s=$t("保存选图");if(s){Z.value=s;return}const c=Ot(Me.value,l);if(!c)return;const m=Pn("保存选图");if(m){Z.value=m;return}const g=Ut.value[c]??[];if(g.some(I=>I.image_id===t))try{const I=await Ee(L.nodeSelectImage(c),{image_id:t});Ut.value={...Ut.value,[c]:g.map(q=>q.image_id===I.image_id?Na(I):q)}}catch(I){Z.value=`选图保存失败:${ze(I)}`}}async function Tf(){var s;const t=K.value.trim();if(!t||Fe.value)return;const l=$t("图片生成");if(l){Ae.value=l;return}Fe.value=!0,Ae.value="",qe.value=t,at.value=((s=Zn.value)==null?void 0:s.label)??rt.value;try{const c=await qf(),m=await Ee(L.nodeGenerate(c.nodeId),{prompt_patch:t,model_route:Di(),count:1,aspect_ratio:"1:1",idempotency_key:`web-single-${Date.now()}-${Math.random().toString(16).slice(2)}`,metadata:{source:"standalone_web",workflow_id:c.workflowId}}),g=await Os(m.images??[]);bt.value=Bo([...g,...bt.value]).slice(0,12),g[0]&&(Ie.value=g[0].image_id),K.value="",await Promise.allSettled([pl(),$n(),en()])}catch(c){Ae.value=`生成失败:${ze(c)}`}finally{Fe.value=!1}}async function qf(){if(Pe.value)return Pe.value;const t=await Ue(L.profiles,{keyword:gr,page:1,page_size:10});let l=t.items.find(I=>{var q;return((q=I.metadata)==null?void 0:q.system_key)===Da})??t.items.find(I=>I.name===gr);l||(l=await Ee(L.profiles,{name:gr,description:"System profile used by the standalone image generation workspace.",default_model_route:Di(),metadata:{source:"standalone_web",system_key:Da}}));let c=(await Ue(L.profileWorkflows(l.profile_id))).find(I=>I.workflow_type==="single_image"),m=[];if(c)m=await Ue(L.workflowNodes(c.workflow_id));else{const I=await Ee(L.profileWorkflows(l.profile_id),{workflow_type:"single_image",display_name:"ImageStudio Single Image Flow",status:"draft",metadata:{source:"standalone_web",system_key:Da}});c=I.workflow,m=I.nodes}const g=m.find(I=>I.node_key==="virtual_single_image")??m[0];if(!g)throw new Error("单图工作流缺少可生成节点");return Pe.value={profileId:l.profile_id,workflowId:c.workflow_id,nodeId:g.node_id},Pe.value}function Di(){const t=Zn.value;if(!t)return"image_low";const l=De.value.find(c=>`${c.provider_id}/${c.model_id}`===t.value),s=mt(l==null?void 0:l.capabilities,"route_name")||mt(l==null?void 0:l.probe_result,"route_name")||mt(l==null?void 0:l.capabilities,"model_route");return s||(t.status==="fallback"?"image_low":t.value)}async function Os(t){return(await Promise.all(t.map(async s=>{try{return await Ue(L.image(s.image_id))}catch{return s}}))).map(Na)}async function Ds(t){var l;if(t.profileId&&!(t.workflowId&&((l=lt.value[t.workflowId])!=null&&l.length))){mi.value=!0,Po.value="";try{await Fi(t)}catch(s){Po.value=`工作流加载失败:${ze(s)}`}finally{mi.value=!1}}}async function Fi(t){if(!t.profileId)throw new Error("角色卡还没有后端 profile_id");const l=await Ue(L.profileWorkflows(t.profileId));let s=l.find(m=>m.workflow_id===t.workflowId&&To(m))??l.find(To),c=[];if(s)c=await Ue(L.workflowNodes(s.workflow_id));else{const m=await Ee(L.profileWorkflows(t.profileId),{workflow_type:mk,display_name:`${t.name} Character Workflow`,status:"draft",metadata:{source:"standalone_web",quick_profile_workflow_id:t.quickProfileWorkflowId}});s=m.workflow,c=m.nodes}return lt.value={...lt.value,[s.workflow_id]:c},It.value={...It.value,[s.workflow_id]:s},await Wi(c),xa(t,s,c),{workflow:s,nodes:c}}async function Wi(t){const l=await Promise.all(t.map(async s=>{try{const c=await Ue(L.nodeImages(s.node_id));if(s.selected_image_id&&!c.some(m=>m.image_id===s.selected_image_id))try{c.unshift(await Ue(L.image(s.selected_image_id)))}catch{}return[s.node_id,Bo(c.map(Na))]}catch{return[s.node_id,[]]}}));Ut.value={...Ut.value,...Object.fromEntries(l)}}function xa(t,l,s){Xe.value=Xe.value.map(c=>c.id!==t.id&&c.profileId!==t.profileId?c:{...c,workflowId:l.workflow_id,workflowNodeIds:s.map(m=>m.node_id),status:l.status==="completed"?"工作流已拆解":"工作流就绪"})}function To(t){return t.workflow_type==="character_gradual"||t.workflow_type==="character_fast"}function Fs(t){const l=be.value,s=ke.value,c=Mo.value.flatMap(I=>I.fields.filter(q=>q.value&&q.value!=="待补充").map(q=>`${I.title}/${q.label}: ${q.value}`)).slice(0,18),m=Kt.value.map(I=>`${I.label}: ${I.prompt}`),g=Ve.value.map(I=>`${je(I)} / ${I.status}`);return["[ImageStudio node-aware workflow injection]","Task: understand the user's source-language instruction, translate it into concise English image-generation prompt language, then merge it into the selected workflow node.","Keep character names, locked identity traits, and explicit user constraints. Do not drop negative constraints.","Target prompt language: English","Source language: auto-detect",`User instruction: ${t}`,`Node: ${l.title}`,`Node phase: ${l.phase}`,`Node status: ${An(l.status)}`,`Node existing prompt: ${l.prompt||"-"}`,`Node locked items: ${l.lockedItems||"-"}`,`Node decision: ${l.decision||"-"}`,`Character: ${s.name}`,`Identity: ${s.identity}`,`Personality: ${s.personality}`,`Appearance: ${Bi(s)}`,`Style: ${s.style||"-"}`,`Negative prompt: ${s.negative||"-"}`,`Structured persona fields: ${c.length?c.join(" | "):"-"}`,`Selected materials: ${m.length?m.join(" | "):"-"}`,`Selected drafts: ${g.length?g.join(" | "):"-"}`].join(`
`)}function Ws(t){const l=be.value,s=ke.value;return{source:"standalone_web_workflow_chat",ui_node_id:Me.value,ui_node_title:l.title,ui_node_phase:l.phase,ui_node_status:l.status,profile_id:s.profileId,profile_name:s.name,workflow_id:s.workflowId,source_language:"auto",target_prompt_language:"en",translation_mode:"backend_llm",user_instruction:t,persona_split_fields_ready:Ca.value,persona_split_fields_total:ka.value,selected_material_ids:Kt.value.map(c=>c.id),selected_draft_image_ids:Ve.value.map(c=>c.image_id)}}async function Ef(){var s;const t=P.value.trim();!t||me.value||!await Hi({promptPatch:Fs(t),metadata:Ws(t)})||(R.value=t,E.value=`${be.value.title} / ${((s=Zn.value)==null?void 0:s.label)??rt.value}`)}function Vs(){!Ge.value||!nt(Ge.value)||(mn.value="generation",Ft("imageViewer"),so(),Zt.value=!0)}function js(t){const l=(t?Ia.value.find(s=>s.image_id===t):null)??In.value;!l||!nt(l)||(Ie.value=l.image_id,Vs())}function Lf(){Ve.value.length&&(mn.value="workflowCompare",Ft("imageViewer"),so(),Zt.value=!0)}function Us(t){var l;t&&Bs(t),(l=dt.value)!=null&&l.imageUrl&&(mn.value="quickProfile",Ft("imageViewer"),so(),Zt.value=!0)}function Sa(){Zt.value=!1,Pl.value=!1}function so(){dl.value=1,Gl.value={x:0,y:0}}function qo(t){dl.value=Fp(Number((dl.value+t).toFixed(2)),.5,4),dl.value<=1&&(Gl.value={x:0,y:0})}function Vi(t){qo(t.deltaY<0?.12:-.12)}function Rf(){if(dl.value>1){so();return}dl.value=2.2,Gl.value={x:0,y:0}}function ji(t){dl.value<=1||(Pl.value=!0,gn.value={pointerId:t.pointerId,x:t.clientX,y:t.clientY,offsetX:Gl.value.x,offsetY:Gl.value.y},t.currentTarget instanceof HTMLElement&&t.currentTarget.setPointerCapture(t.pointerId))}function Ui(t){!Pl.value||t.pointerId!==gn.value.pointerId||(Gl.value={x:gn.value.offsetX+t.clientX-gn.value.x,y:gn.value.offsetY+t.clientY-gn.value.y})}function Nl(t){!Pl.value||t.pointerId!==gn.value.pointerId||(Pl.value=!1,t.currentTarget instanceof HTMLElement&&t.currentTarget.hasPointerCapture(t.pointerId)&&t.currentTarget.releasePointerCapture(t.pointerId))}function Bf(){Ft("search"),gi.value=!0,Gn.value=!0}function Eo(){Ft("personaQuestionnaire"),Ul.value="",we.value=!0}function Of(){Ft("externalProfileImport"),Ye.value=!0,rn(()=>{var t;(t=document.querySelector("[data-profile-import-input]"))==null||t.focus()})}function Df(){Ft("quickProfileDetail"),We.value=!0}function Ff(t){Vl.value=t,Ft("materialDetail"),j.value=!0}async function Wf(t){if(t.enabled){if(t.actionKey==="personaQuestionnaire"){Eo();return}if(t.actionKey==="workflowCompare"){Lf();return}if(t.actionKey==="externalProfileImport"){Of();return}if(t.actionKey==="workflowPersonaSplit"){await Hf();return}if(t.actionKey==="workflowSaveVersion"){await np();return}if(t.actionKey==="workflowCreateBranchFromNode"){await Uf();return}if(t.actionKey==="workflowNodeGenerate"){t.id==="hires"&&Me.value!=="hires-fix"&&(ol("hires-fix"),await rn()),await Hi();return}if(t.actionKey==="workflowNodeRetry"){await Hi({retry:!0});return}if(t.actionKey==="workflowNodeComplete"){await Kf();return}if(t.actionKey==="workflowNodeReview"){await Qf();return}if(t.actionKey==="workflowReviewAdopt"){await ep();return}if(t.actionKey==="workflowPromptPlanSave"){await Gf();return}if(t.actionKey==="workflowPromptPlanNext"){ol("prompt-plan");return}if(t.actionKey==="workflowMaterialBindSave"){await zf();return}if(t.actionKey==="workflowArchiveFinal"){await Vf();return}t.nav&&t.module&&nl(t.nav,t.module)}}async function Vf(){const t=ke.value;if(!t||me.value)return;const l=$t("入库");if(l){Z.value=l;return}if(!t.workflowId){Z.value="请先生成角色档案并创建后端工作流,再执行入库。";return}const s=t.workflowId,c=Ot("archive",t);if(!c){Z.value="当前工作流缺少后端入库节点 final_pack。";return}const m=xn(s).find(q=>q.node_id===c);if(m&&["completed","selected"].includes(ct(m.status))){Z.value="入库节点已经完成。如需修改,请从对应节点创建新分支。";return}const g=Ot("hires-fix",t)??Ot(Me.value,t),I=zs(g);if(!I.length){Z.value="还没有可入库的真实后端图片。请先完成“高清修复与统一风格”并选择成品图。";return}me.value=!0,Z.value="";try{const q=g?xn(s).find(Q=>Q.node_id===g):void 0,U=It.value[s],X=await Ee(L.workflowHistory(s),{action:"final_archive",title:`${t.name} / 入库`,node_id:c,image_id:I[0],prompt:(q==null?void 0:q.prompt)||be.value.prompt,include_nodes:!0,metadata:{source:"standalone_web_final_archive",schema_version:"2026-07-09.final-archive.v1",profile_id:t.profileId,profile_name:t.name,workflow_id:s,branch_name:(U==null?void 0:U.current_branch)??"main",archive_backend_node_id:c,source_backend_node_id:g,archive_ui_node_id:"archive",source_ui_node_id:"hires-fix",final_image_ids:I,selected_material_ids:Kt.value.map(Q=>Q.id),selected_draft_image_ids:Ve.value.map(Q=>Q.image_id).filter(Lo)}}),y=await Ee(L.nodeComplete(c)),te=await vr(L.workflow(s),{status:"completed",current_node_id:c,metadata:{...(U==null?void 0:U.metadata)??{},final_archive_schema_version:"2026-07-09.final-archive.v1",final_archive_history_id:X.history_id,final_archive_image_ids:I,final_archive_node_id:c,final_archive_source_node_id:g,final_archive_completed_at:X.created_at}}),f=await Ue(L.workflowNodes(s));lt.value={...lt.value,[s]:f.map(Q=>Q.node_id===y.node_id?y:Q)},It.value={...It.value,[s]:te},Xe.value=Xe.value.map(Q=>Q.id===t.id||Q.profileId===t.profileId?{...Q,workflowId:s,status:"已入库",updatedAt:"刚刚"}:Q),$o.value=X.created_at,ol("archive"),Z.value=`已入库:保存版本 ${Tl(X.history_id)},成品图 ${I.length} 张。`,await Promise.allSettled([pl(),en()])}catch(q){Z.value=`入库失败:${ze(q)}`}finally{me.value=!1}}function Pn(t){return ao.value?`${t}已被锁定:${wa.value}`:""}function jf(t){return`branch_${(t.node_key||t.node_id).replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,28)}_${Date.now().toString(36)}`}async function Uf(){var g,I;const t=ke.value,l=Cn.value;if(!(t!=null&&t.workflowId)||!l||pn.value)return;const s=$t("创建工作流分支");if(s){vn.value=s,Z.value=s;return}pn.value=!0,vn.value="",Z.value="";const c=t.workflowId,m=((g=be.value)==null?void 0:g.title)??l.title;try{const q=await Ee(L.workflowBranches(c),{branch_name:jf(l),base_branch_name:l.branch_name||((I=It.value[c])==null?void 0:I.current_branch)||"main",base_node_id:l.node_id,copy_nodes:!0,metadata:{source:"standalone_web",ui_node_id:Me.value,ui_node_title:m,reason:"edit_locked_completed_node"}}),U=await Ee(L.workflowSwitchBranch(c),{branch_name:q.branch_name}),X=await Ue(L.workflowNodes(c)),y=X.filter(f=>f.branch_name===U.current_branch);lt.value={...lt.value,[c]:X},It.value={...It.value,[c]:U},await Wi(y.length?y:X),xa(t,U,y.length?y:X);const te=y.find(f=>mt(f.metadata,"copied_from_node_id")===l.node_id)??y.find(f=>uo(f)===Me.value);te&&ol(uo(te)),Z.value=`已从「${m}」创建分支 ${q.branch_name},现在可以在新分支继续修改。`}catch(q){vn.value=`创建分支失败:${ze(q)}`,Z.value=vn.value}finally{pn.value=!1}}async function Hi(t={}){const l=ke.value;if(!l||me.value)return!1;const s=$t(t.retry?"节点重跑":"节点生成");if(s)return Z.value=s,!1;const c=Ot(Me.value,l);if(!c)return Z.value="当前节点还没有绑定后端 node_id",!1;const m=Pn(t.retry?"节点重跑":"节点生成");if(m)return Z.value=m,!1;me.value=!0,Z.value="";try{t.retry&&await Ee(L.nodeRetry(c));const g=be.value,I=P.value.trim(),q=t.promptPatch??(I?Fs(I):(g==null?void 0:g.prompt)||ve.value.basePrompt),U=await Ee(L.nodeGenerate(c),{prompt_patch:q,model_route:Di(),count:Mp(g),aspect_ratio:Np(g),idempotency_key:`web-workflow-${c}-${Date.now()}-${Math.random().toString(16).slice(2)}`,metadata:{source:"standalone_web",ui_node_id:Me.value,...I?Ws(I):{},...t.metadata??{}}}),X=await Os(U.images??[]);if(Ut.value={...Ut.value,[c]:Bo([...X,...Ut.value[c]??[]])},bt.value=Bo([...X,...bt.value]).slice(0,12),X[0]&&(w.value=X[0].image_id,C.value=X.map(y=>y.image_id),Ie.value=X[0].image_id),l.workflowId){const y=await Ue(L.workflowNodes(l.workflowId));lt.value={...lt.value,[l.workflowId]:y}}return P.value="",await Promise.allSettled([pl(),$n(),en()]),!0}catch(g){return Z.value=`节点生成失败:${ze(g)}`,!1}finally{me.value=!1}}async function Hf(){const t=ke.value;if(!t||Hn.value)return;const l=$t("设定拆解");if(l){dn.value=l;return}if(!t.profileId){dn.value="请先通过“生成档案”保存到后端,再进入设定拆解。";return}if(to.value.find(c=>["completed","selected"].includes(ct(c.status)))){dn.value="当前工作流已有完成节点,请先从要修改的位置创建分支。";return}Hn.value=!0,dn.value="";try{const{workflow:c}=await Fi(t),m=await Ee(L.workflowExecuteCharacter(c.workflow_id));lt.value={...lt.value,[c.workflow_id]:m.nodes},It.value={...It.value,[c.workflow_id]:m.workflow},xa(t,m.workflow,m.nodes),ol("persona-split")}catch(c){dn.value=`后端拆解失败:${ze(c)}`}finally{Hn.value=!1}}async function Kf(){const t=ke.value;if(!t||me.value)return;const l=$t("确认字段");if(l){Z.value=l;return}const s=Ot(Me.value,t);if(!s){Z.value="当前节点还没有绑定后端 node_id";return}const c=Pn("确认字段");if(c){Z.value=c;return}me.value=!0,Z.value="";try{const m=await Ee(L.nodeComplete(s));if(t.workflowId){const g=lt.value[t.workflowId]??[];lt.value={...lt.value,[t.workflowId]:g.map(I=>I.node_id===m.node_id?m:I)}}ol("prompt-plan")}catch(m){Z.value=`字段确认失败:${ze(m)}`}finally{me.value=!1}}async function Gf(){var m;const t=ke.value;if(!t||me.value)return;const l=$t("提示词规划");if(l){Z.value=l;return}const s=Ot("prompt-plan",t);if(!s){Z.value="当前工作流缺少后端提示词规划节点 prompt_plan。";return}const c=Pn("提示词规划");if(c){Z.value=c;return}me.value=!0,Z.value="";try{const g=tp(t),I=await vr(L.node(s),{prompt:g.prompt_context,negative_prompt:g.negative_prompt,metadata:{...((m=xn(t.workflowId??"").find(q=>q.node_id===s))==null?void 0:m.metadata)??{},prompt_plan:g,prompt_plan_schema_version:"2026-07-09.prompt-plan-schema.v1",ui_node_id:"prompt-plan",source:"standalone_web_prompt_plan"}});Hs(t.workflowId,I),Z.value="提示词规划已写入后端 prompt_plan 节点。",ol("material-bind")}catch(g){Z.value=`提示词规划失败:${ze(g)}`}finally{me.value=!1}}async function zf(){var m;const t=ke.value;if(!t||me.value)return;const l=$t("素材绑定");if(l){Z.value=l;return}const s=Ot("material-bind",t);if(!s){Z.value="当前工作流缺少后端素材绑定节点 material_bind。";return}const c=Pn("素材绑定");if(c){Z.value=c;return}me.value=!0,Z.value="";try{const g=lp(t),I=await vr(L.node(s),{metadata:{...((m=xn(t.workflowId??"").find(q=>q.node_id===s))==null?void 0:m.metadata)??{},material_bindings:g,material_binding_schema_version:"2026-07-09.material-binding-schema.v1",ui_node_id:"material-bind",source:"standalone_web_material_bind"}});Hs(t.workflowId,I),Z.value=g.selected_material_ids.length?`素材绑定已落库:${g.selected_material_ids.length} 类参考。`:"素材绑定已落库:默认不使用参考。",ol("portrait-01")}catch(g){Z.value=`素材绑定失败:${ze(g)}`}finally{me.value=!1}}async function Qf(){var c,m;const t=ke.value;if(!t||me.value)return;const l=$t("节点审查");if(l){Z.value=l;return}const s=Ot(Me.value,t);if(!s){Z.value="当前节点还没有绑定后端 node_id";return}me.value=!0,Z.value="";try{const g=await Ue(L.nodeReview(s));t.workflowId&&await Ee(L.workflowHistory(t.workflowId),{action:"node_review",title:`${t.name} / ${be.value.title} 审查`,node_id:s,image_id:mt(g.summary,"selected_image_id")||((c=In.value)==null?void 0:c.image_id),include_nodes:!0,metadata:{source:"standalone_web_node_review",ui_node_id:Me.value,review_passed:g.passed,warning_count:g.warnings.length,error_count:g.errors.length,stage_review:g.stage_review}});const I=Array.isArray((m=g.stage_review)==null?void 0:m.candidates)?g.stage_review.candidates.length:0;Z.value=g.passed?`审查通过:${I} 个候选。`:`审查未通过:${g.errors.length} 个错误,${g.warnings.length} 个提醒。`}catch(g){Z.value=`节点审查失败:${ze(g)}`}finally{me.value=!1}}function Jf(t,l,s,c){const m=Yf(l),g=m?Ot(m,c):void 0;if(m&&g)return{uiNodeId:m,backendNodeId:g};const I=xn(t).slice().sort((X,y)=>X.sort_order-y.sort_order),q=I.find(X=>X.node_id===s),U=q?I.find(X=>X.sort_order>q.sort_order):void 0;return U?{uiNodeId:uo(U),backendNodeId:U.node_id}:{uiNodeId:void 0,backendNodeId:void 0}}function Yf(t){var l;if(t==="hires-fix")return"archive";if(((l=_a.value)==null?void 0:l.id)==="body-sheet"||t.startsWith("fullbody-")||t.includes("sheet"))return"hires-fix"}function Xf(t){return t==="hires-fix"?"hires_fix_input":t==="archive"?"archive_input":"next_stage_input"}async function Zf(t,l,s){const[c,m]=await Promise.all([Ue(L.workflow(l)),Ue(L.workflowNodes(l))]),g=m.filter(I=>I.branch_name===c.current_branch);lt.value={...lt.value,[l]:m},It.value={...It.value,[l]:c},await Wi(g.length?g:m),xa(t,c,g.length?g:m),s&&kn.value.some(I=>I.id===s)&&ol(s)}async function ep(){var I;const t=ke.value;if(!t||me.value)return;const l=$t("确认采用");if(l){Z.value=l;return}if(!t.workflowId){Z.value="请先生成角色档案并创建后端工作流,再确认采用。";return}const s=Ot(Me.value,t);if(!s){Z.value="当前节点还没有绑定后端 node_id。";return}if(oo.value){Z.value=Pn("确认采用");return}const c=cs.value;if(!c||!Lo(c.image_id)){Z.value="请选择一张真实后端候选图后再确认采用。";return}if(!(Ut.value[s]??[]).some(q=>q.image_id===c.image_id)){Z.value="当前选中的图片不属于此后端节点,请重新选择节点内候选图。";return}const g=Jf(t.workflowId,Me.value,s,t);me.value=!0,Z.value="";try{const q=await Ee(L.nodeAdoptImage(s),{image_id:c.image_id,title:`${t.name} / ${be.value.title} 确认采用`,metadata:{source:"standalone_web_stage_review_confirm",schema_version:"2026-07-09.stage-review-confirm.v1",profile_id:t.profileId,profile_name:t.name,workflow_id:t.workflowId,branch_name:((I=It.value[t.workflowId])==null?void 0:I.current_branch)??"main",ui_review_node_id:`${Me.value}-review`,source_ui_node_id:Me.value,source_backend_node_id:s,next_ui_node_id:g.uiNodeId,next_backend_node_id:g.backendNodeId,handoff_bucket:g.uiNodeId,handoff_role:Xf(g.uiNodeId),selected_draft_image_ids:Ve.value.map(U=>U.image_id).filter(Lo)}});$o.value=q.created_at,await Zf(t,t.workflowId,g.uiNodeId),Z.value=g.uiNodeId?`已确认采用,当前节点已锁定并交接到「${Pp(g.uiNodeId)}」。`:"已确认采用,当前节点已锁定。",await Promise.allSettled([pl(),en()])}catch(q){Z.value=`确认采用失败:${ze(q)}`}finally{me.value=!1}}function Hs(t,l){if(!t)return;const s=lt.value[t]??[];lt.value={...lt.value,[t]:s.map(c=>c.node_id===l.node_id?l:c)}}function tp(t){const l=Mo.value.flatMap(g=>g.fields.filter(I=>I.value&&I.value!=="待补充").map(I=>`${I.label}: ${I.value}`)),s=[t.name,t.identity,t.personality,Bi(t),t.style,l.slice(0,8).join(", ")].filter(Boolean).join(", "),c=t.negative||ve.value.negativePrompt||"low quality, blurry, bad anatomy",m=[Aa("portrait","头像节点",`${s}, face reference, clear eyes, recognizable hairstyle`,c,["name","hair","eyes","face identity"]),Aa("bust","半身节点",`${s}, upper body, outfit silhouette, calm pose`,c,["face identity","hair","upper outfit"]),Aa("fullbody","全身节点",`${s}, full body standing pose, complete outfit, shoes and accessories`,c,["face identity","body proportion","outfit"]),Aa("sheet","设定图节点",`${s}, character design sheet, multi angle, expression and pose references`,c,["identity","outfit","style"])];return{profile_id:t.profileId,profile_name:t.name,negative_prompt:c,items:m,guard_checks:[{label:"负面词",value:c,status:"ready"},{label:"权重建议",value:"身份特征和发眼锚点优先,服装/配饰作为中等权重继承。",status:"ready"}],prompt_context:m.map(g=>g.prompt).join(`
`)}}function Aa(t,l,s,c,m){return{id:t,title:l,prompt:s,negative:c,weight_suggestions:[{label:"identity",value:1.25,reason:"keep character identity stable"},{label:"style",value:.85,reason:"avoid overfitting style over identity"}],inherits:m,status:"ready"}}function lp(t){const l=Kt.value,s=h.map((c,m)=>{const g=l.find(I=>I.category===c.category);return{id:`rule_${c.category}_${m+1}`,category:c.category,material_id:(g==null?void 0:g.id)??"",material_label:(g==null?void 0:g.label)??"",material_group:(g==null?void 0:g.group)??(g==null?void 0:g.category)??"",material_prompt:(g==null?void 0:g.prompt)??"",material_colors:(g==null?void 0:g.colors)??[],bind_to_stages:Ks(c.category),inheritance_rule:g?`${c.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:g?Gs(c.category):"弱",required:!!(g&&["风格","服装"].includes(c.category)),status:g?"ready":"pending"}});return{profile_id:t.profileId,profile_name:t.name,selected_material_ids:l.map(c=>c.id),rules:s}}function Ks(t){return{风格:[{stage_id:"portrait-draft",stage_title:"头像草稿"},{stage_id:"halfbody-draft",stage_title:"半身草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"},{stage_id:"review-archive",stage_title:"修复入库"}],构图:[{stage_id:"portrait-draft",stage_title:"头像草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"}],服装:[{stage_id:"halfbody-draft",stage_title:"半身草稿"},{stage_id:"body-sheet",stage_title:"全身与设定图"}],鞋袜:[{stage_id:"body-sheet",stage_title:"全身与设定图"}],配饰:[{stage_id:"body-sheet",stage_title:"全身与设定图"},{stage_id:"review-archive",stage_title:"修复入库"}]}[t]??[{stage_id:"body-sheet",stage_title:"全身与设定图"}]}function Gs(t){return t==="风格"||t==="服装"?"强":t==="构图"?"中":"弱"}async function np(){var s;const t=ke.value;if(!t||Kn.value)return;const l=$t("保存快照");if(l){fn.value=l;return}if(!t.workflowId){fn.value="请先生成档案并创建后端工作流,再保存快照。";return}Kn.value=!0,fn.value="";try{const c=await Ee(L.workflowHistory(t.workflowId),{action:"save_version",title:`${t.name} / ${((s=be.value)==null?void 0:s.title)??"工作流快照"}`,node_id:Ot(Me.value,t),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:Me.value,profile_id:t.profileId,profile_name:t.name,profile_status:t.status}});$o.value=c.created_at}catch(c){fn.value=`保存快照失败:${ze(c)}`}finally{Kn.value=!1}}function Ot(t,l){if(!l.workflowId)return;const c=xn(l.workflowId).find(g=>uo(g)===t);if(c)return c.node_id;const m=l.workflowNodeIds??[];if(t!=="brief-import"&&t==="persona-split")return m[0]}function xn(t){var c;const l=lt.value[t]??[],s=(c=It.value[t])==null?void 0:c.current_branch;return s?l.filter(m=>m.branch_name===s):l}function zs(t){var s;const l=[...Ve.value.map(c=>c.image_id),(s=In.value)==null?void 0:s.image_id,...t?(Ut.value[t]??[]).map(c=>c.image_id):[]];return Array.from(new Set(l.filter(c=>!!(c&&Lo(c)))))}function Lo(t){return!t.startsWith("mock-")}async function op(){if(!is.value||jl.value)return;const t=$t("生成档案");if(t){Ul.value=t;return}Lt.value+=1;const l=cp(ie.value,Lt.value);jl.value=!0,Ul.value="";try{const s=await Ee(L.quickProfileDraft,ap(l,ie.value,it.value)),c={...l,name:s.profile_preview.name||l.name,style:s.profile_preview.style_prompt||l.style,negative:s.profile_preview.negative_prompt||l.negative},m=await Ee(L.quickProfileDraftSave,ip(c,ie.value,it.value,s)),g=sp(m,c),I=await Fi(g),q={...g,workflowId:I.workflow.workflow_id,workflowNodeIds:I.nodes.map(U=>U.node_id),status:"工作流就绪"};Xe.value=[q,...Xe.value.filter(U=>U.id!==q.id)],Oi(q),ue.value="workflow",Me.value="brief-import",vt("personaQuestionnaire"),rn(()=>{var U;(U=document.querySelector(`[data-profile-card-id="${q.id}"]`))==null||U.scrollIntoView({block:"nearest",behavior:"smooth"})})}catch(s){Ul.value=`后端生成或保存失败:${ze(s)}`}finally{jl.value=!1}}function ap(t,l,s){return{questionnaire:{...Qs(l,s),name:t.name,identity:t.identity,personality:t.personality.split(/[,,。;;\n]/).map(c=>c.trim()).filter(Boolean),hair_color:t.hairColor,hairstyle:t.hairstyle,eye_color:t.eyeColor,style:t.style,clothing_keywords:t.clothing.split(/[,,。;;\n]/).map(c=>c.trim()).filter(Boolean)},metadata:{source:"standalone_web_questionnaire",questionnaire_mode:s}}}function ip(t,l,s,c){const m=Qs(l,s),g=(c==null?void 0:c.profile_preview)??{name:t.name,base_prompt:[t.name,t.identity,t.personality?`personality: ${t.personality}`:""].filter(Boolean).join(", "),appearance_prompt:[t.hairColor,t.hairstyle,t.eyeColor,t.clothing].filter(Boolean).join(", "),style_prompt:t.style,negative_prompt:t.negative};return{draft_id:c==null?void 0:c.draft_id,draft:c,profile_preview:g,description:`${t.identity}。${t.personality}`,questionnaire:m,metadata:{source:"quick_profile_questionnaire",questionnaire_mode:s,material_id:t.materialId,identity:t.identity,hair_color:t.hairColor,hairstyle:t.hairstyle,eye_color:t.eyeColor,clothing:t.clothing,worldview:m.worldview,height_build:m.height_build,generation_style:m.generation_style},create_workflow:!0,workflow_display_name:`${t.name} 快速角色工作流`,workflow_status:"draft"}}function Qs(t,l){return rp({mode:l,role_core:t.roleCore,personality:t.personality,appearance:t.appearance,outfit:t.outfit,scene:t.scene,avoid:t.avoid,worldview:t.worldview,background:t.background,height_build:t.heightBuild,body_features:t.bodyFeatures,likes:t.likes,dislikes:t.dislikes,habits:t.habits,relationships:t.relationships,story_hooks:t.storyHooks,generation_style:t.generationStyle,shot_preference:t.shotPreference,mood:t.mood,extra_notes:t.extraNotes})}function rp(t){return Object.fromEntries(Object.entries(t).map(([l,s])=>[l,s.trim()]).filter(([,l])=>!!l))}function sp(t,l){var m,g;const s=t.profile,c=s.metadata??{};return{...l,id:s.profile_id,profileId:s.profile_id,workflowId:t.workflow&&To(t.workflow)?t.workflow.workflow_id:void 0,quickProfileWorkflowId:(m=t.workflow)==null?void 0:m.workflow_id,workflowNodeIds:t.workflow&&To(t.workflow)?(g=t.nodes)==null?void 0:g.map(I=>I.node_id):void 0,name:s.name||l.name,identity:Dt(c.identity)||l.identity,personality:Js(s.base_prompt)||l.personality,hairColor:Dt(c.hair_color)||l.hairColor,hairstyle:Dt(c.hairstyle)||l.hairstyle,eyeColor:Dt(c.eye_color)||l.eyeColor,clothing:Dt(c.clothing)||l.clothing,style:s.style_prompt||l.style,negative:s.negative_prompt||l.negative,status:t.workflow?"已落库":"已保存",updatedAt:"刚刚"}}function up(t,l,s,c){const m=t.metadata??{},g=k[c%k.length];return{id:t.profile_id,profileId:t.profile_id,workflowId:l==null?void 0:l.workflow_id,quickProfileWorkflowId:s==null?void 0:s.workflow_id,workflowNodeIds:void 0,name:t.name,identity:Dt(m.identity)||t.description||"后端角色档案",personality:Js(t.base_prompt)||"待细化",hairColor:Dt(m.hair_color)||"待细化",hairstyle:Dt(m.hairstyle)||t.appearance_prompt||"待细化",eyeColor:Dt(m.eye_color)||"待细化",clothing:Dt(m.clothing)||t.appearance_prompt||"待细化",style:t.style_prompt||"待细化",negative:t.negative_prompt||"low quality, blurry, bad anatomy",status:l?l.status==="completed"?"工作流已拆解":"工作流就绪":s?"快速档案已落库":t.status,updatedAt:ql(t.updated_at),materialId:(g==null?void 0:g.id)??D.value,colors:(g==null?void 0:g.colors)??Ys(c+31)}}function Dt(t){return typeof t=="string"?t.trim():""}function Js(t){const l="personality:",s=t??"",c=s.toLowerCase().indexOf(l);return c<0?"":s.slice(c+l.length).trim()}function cp(t,l){const s=dp(t.roleCore,l),c=s.identity==="角色身份待细化"&&[t.background,t.worldview].map(I=>I.trim()).filter(Boolean).join(",")||s.identity,m=[t.appearance,t.heightBuild,t.bodyFeatures].map(I=>I.trim()).filter(Boolean).join(","),g=Ci.value;return{id:`profile-local-${Date.now()}-${l}`,name:s.name,identity:c,personality:[t.personality,t.likes,t.dislikes].map(I=>I.trim()).filter(Boolean).join(";")||"性格待细化",hairColor:Ki(m,["发色","头发","发"],"发色待细化"),hairstyle:Ki(m,["发型","短发","长发","马尾","刘海"],m||"发型待细化"),eyeColor:Ki(m,["瞳色","眼睛","眼"],"瞳色待细化"),clothing:t.outfit.trim()||"服装与配饰待细化",style:fp(t),negative:t.avoid.trim()||"低质量、结构错误、过度复杂",status:"新建档案",updatedAt:"刚刚",materialId:(g==null?void 0:g.id)??"",colors:(g==null?void 0:g.colors)??Ys(l)}}function dp(t,l){const s=t.split(/[,,。;;\n]/).map(I=>Ro(I)).filter(Boolean),c=s[0]??"",m=c&&c.length<=16?c:`新角色 ${String(l).padStart(2,"0")}`,g=(c===m?s.slice(1).join(","):s.join(","))||(c&&c!==m?c:"角色身份待细化");return{name:m,identity:g}}function Ki(t,l,s){const c=t.trim();return c?c.split(/[,,。;;\n]/).map(g=>Ro(g)).filter(Boolean).find(g=>l.some(I=>g.includes(I)))??s:s}function fp(t){const l=[t.worldview,t.scene,t.generationStyle,t.shotPreference,t.mood].map(s=>s.trim()).filter(Boolean);return l.length?`${l.join(",")},角色设定插画,清晰轮廓,高可读设计`:"角色设定插画,清晰轮廓,高可读设计"}function Ys(t){const l=[["#3f7edc","#2ec4b6","#f5c542"],["#2f7a60","#d2a23a","#e0f2fe"],["#d65b7f","#209b8d","#f4f4f5"]];return l[t%l.length]}function pp(){if(!Ct.value.trim())return;const l=bi.value;ie.value={roleCore:l.roleCore,personality:l.personality,appearance:l.appearance,outfit:l.outfit,scene:l.scene,avoid:l.avoid,worldview:l.worldview,background:l.background,heightBuild:l.heightBuild,bodyFeatures:l.bodyFeatures,likes:l.likes,dislikes:l.dislikes,habits:l.habits,relationships:l.relationships,storyHooks:l.storyHooks,generationStyle:l.generationStyle,shotPreference:l.shotPreference,mood:l.mood,extraNotes:l.extraNotes},l.recognizedKeys.some(s=>["worldview","background","heightBuild","bodyFeatures","likes","dislikes","habits","relationships","storyHooks","generationStyle","shotPreference","mood","extraNotes"].includes(s))&&(it.value="advanced"),vt("externalProfileImport"),Eo()}function vp(t){const l=new Set;if(!t)return{...vf(),recognizedKeys:[]};const s=Ma(t,["姓名","名字","角色名","名称","name","character name"]),c=Ma(t,["身份","职业","定位","种族","role","identity","occupation"]),m=Ma(t,["角色核心","人设","简介","设定","介绍","profile","summary","description","brief"]),g=Xs(t,["角色","身份","职业","来自","负责","name","role"]),I=mp([s,c,m]).join(",")||g||t.slice(0,220);I&&l.add("roleCore");const q=ut(t,["性格","人格","个性","personality","trait","traits"],["冷静","开朗","温和","敏锐","可靠","慢热","强势","沉稳","活泼","内向","外向"],"性格关键词待从原文继续整理"),U=ut(t,["外观","外貌","长相","发色","发型","眼睛","瞳色","appearance","look","hair","eyes"],["发","眼","身高","体型","肤色","瞳","长发","短发","刘海"],"外观特征待从原文继续整理"),X=ut(t,["服装","衣着","穿着","配饰","outfit","clothing","accessory","accessories"],["外套","裙","靴","制服","配饰","项链","手套","披风","夹克","耳饰"],"服装与配饰待从原文继续整理"),y=ut(t,["场景","背景","世界观","日常","scene","background","world","setting"],["城市","港区","学院","战场","雨夜","实验室","森林","房间","街区"],"常用场景待补充"),te=ut(t,["避雷","禁用","负面","不要","negative","avoid"],["不要","避免","禁止","低质量","崩坏","血腥","恐怖"],"低质量、结构错误、过度复杂、与角色设定冲突"),f=ut(t,["世界观","时代","地点","setting","world","worldview"],["现代","赛博","奇幻","末世","校园","古风","星际","王国","都市"],""),Q=ut(t,["背景","经历","过去","身世","background","history","backstory"],["曾经","出生","来自","经历","过去","现在","目前"],""),W=ut(t,["身高","身材","体型","height","build","body type"],["cm","厘米","高挑","娇小","纤细","健壮","匀称","丰满"],""),Ne=ut(t,["记忆点","特征","伤疤","纹身","义体","body feature","mark"],["伤疤","痣","纹身","义体","异色瞳","尖耳","机械","尾巴","角"],""),Le=ut(t,["喜好","喜欢","爱好","likes","hobby","hobbies"],["喜欢","擅长","热爱","收藏","常喝","常吃"],""),pe=ut(t,["不喜欢","讨厌","害怕","dislikes","fear","fears"],["不喜欢","讨厌","害怕","排斥","恐惧"],""),Pt=ut(t,["习惯","生活习惯","日常","habit","routine"],["习惯","总是","经常","每天","熬夜","洁癖"],""),al=ut(t,["关系","同伴","亲友","敌人","relationship","relationships"],["朋友","同伴","家人","敌人","导师","搭档","组织"],""),ml=ut(t,["目标","秘密","故事钩子","主线","goal","secret","plot"],["目标","秘密","寻找","保护","复仇","调查","逃亡"],""),Gt=ut(t,["画风","美术风格","style","art style"],["插画","厚涂","赛璐璐","写实","电影感","水彩","像素"],""),Nn=ut(t,["镜头","构图","视角","shot","composition"],["头像","半身","全身","立绘","正面","侧面","俯视","仰视"],""),ln=ut(t,["氛围","情绪","气质","mood","atmosphere"],["明亮","压抑","柔和","危险","神圣","冷峻","温暖","孤独"],""),Tn=ut(t,["补充","备注","其他","note","notes"],["补充","备注","另外","其他"],"");for(const[fo,po]of Object.entries({personality:q,appearance:U,outfit:X,scene:y,avoid:te,worldview:f,background:Q,heightBuild:W,bodyFeatures:Ne,likes:Le,dislikes:pe,habits:Pt,relationships:al,storyHooks:ml,generationStyle:Gt,shotPreference:Nn,mood:ln,extraNotes:Tn}))po.recognized&&l.add(fo);return{roleCore:I,personality:q.value,appearance:U.value,outfit:X.value,scene:y.value,avoid:te.value,worldview:f.value,background:Q.value,heightBuild:W.value,bodyFeatures:Ne.value,likes:Le.value,dislikes:pe.value,habits:Pt.value,relationships:al.value,storyHooks:ml.value,generationStyle:Gt.value,shotPreference:Nn.value,mood:ln.value,extraNotes:Tn.value,recognizedKeys:Array.from(l)}}function ut(t,l,s,c){const m=Ma(t,l);if(m)return{value:m,recognized:!0};const g=Xs(t,s);return g?{value:g,recognized:!0}:{value:c,recognized:!1}}function Ma(t,l){const s=t.split(/\r?\n/).map(g=>g.trim()).filter(Boolean),c=l.map(gp).join("|"),m=new RegExp(`^\\s*(?:[-*•]|\\d+[.)、])?\\s*(?:["'“”\\[【])?(?:${c})(?:["'“”\\]】])?\\s*[::=]\\s*(.+)$`,"i");for(const g of s){const I=g.match(m);if(I!=null&&I[1])return Ro(I[1])}return null}function Xs(t,l){return t.split(/\r?\n/).map(m=>m.trim()).filter(Boolean).filter(m=>l.some(g=>m.toLowerCase().includes(g.toLowerCase()))).map(m=>Ro(m.replace(/^\s*(?:[-*•]|[0-9]+[.)、])\s*/,""))).filter(Boolean).slice(0,3).join(";")}function mp(t){const l=new Set;return t.map(s=>s?Ro(s):"").filter(s=>!s||l.has(s)?!1:(l.add(s),!0))}function Ro(t){return t.replace(/^[\s"'“”`【】[\]]+/,"").replace(/[\s"'“”`,,;;]+$/,"").trim()}function gp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zs(t){var m;const l=t.target instanceof Element?t.target:null,s=(m=l==null?void 0:l.closest("[data-overlay-root]"))==null?void 0:m.dataset.overlayRoot,c=hp(s)?s:null;Ft(c??void 0)}function eu(t){t.key==="Escape"&&Ft()}function Gi(t){const l=!lu(t);Ft(t),tu(t,l)}function Ft(t){for(const l of zr)l!==t&&vt(l)}function vt(t){tu(t,!1)}function tu(t,l){t==="search"&&(gi.value=l,Gn.value=l),t==="palette"&&(ua.value=l),t==="notifications"&&(ca.value=l),t==="logs"&&(da.value=l),t==="imageViewer"&&(Zt.value=l,l||(Pl.value=!1)),t==="materialPicker"&&!l&&(N.value=""),t==="materialDetail"&&(j.value=l),t==="materialCategoryCreate"&&(Y.value=l,!l&&!Tt.value&&(he.value="")),t==="personaQuestionnaire"&&(we.value=l),t==="quickProfileDetail"&&(We.value=l),t==="externalProfileImport"&&(Ye.value=l)}function lu(t){return t==="search"?Gn.value:t==="palette"?ua.value:t==="notifications"?ca.value:t==="imageViewer"?Zt.value:t==="materialPicker"?!!N.value:t==="materialDetail"?j.value:t==="materialCategoryCreate"?Y.value:t==="personaQuestionnaire"?we.value:t==="quickProfileDetail"?We.value:t==="externalProfileImport"?Ye.value:da.value}function hp(t){return zr.includes(t)}function yp(t){Hl.value=t.primary,Kl.value=t.accent}function bp(t){Ht.value.includes(t)||(Ht.value=[...Ht.value,t])}function _p(){Ht.value=co([...Ht.value,...No.value.map(t=>t.id)])}function wp(){const t=No.value.filter(l=>Ht.value.includes(l.id)).map(l=>l.id);zn.value=co([...zn.value,...t])}function kp(t){nl(t.nav,t.module)}async function Cp(t=Ke.value){var s;if(cn.value||!((s=ne.value)!=null&&s.permissions.can_manage_materials))return;cn.value=!0;const l=new Set(t.map(c=>c.category_id));try{const c=[];for(const m of x){if(l.has(m.category_id))continue;const g=await Ee(L.materialCategories,m);c.push(g),l.add(g.category_id)}for(const m of O){if(l.has(m.category_id))continue;const g=m.parent_id;if(g&&!l.has(g))continue;const I=await Ee(L.materialCategories,m);c.push(I),l.add(I.category_id)}c.length&&(wt.value=`默认素材分类已落库:${c.length} 个。`,await ro())}catch(c){qt.value=`默认分类落库失败:${ze(c)}`}finally{cn.value=!1}}async function nu(t){if(st.value||!t.enabled)return;if(qt.value="",wt.value="",t.id==="workflow-bind"){Ls();return}if(t.id==="create-category"){Es();return}if(t.id==="refresh"){st.value=t.id,await ro(),st.value="",wt.value="素材库已刷新。";return}const l=Bt.value;if(!l||l.source!=="backend"){qt.value="需要先选中一条真实后端素材。";return}st.value=t.id;try{let s=null;t.id==="recognize"?(s=await Ee(L.materialRecognize(l.id),{}),wt.value=`素材「${s.display_name}」已提交识别。`):t.id==="re-recognize"?(s=await Ee(L.materialReRecognize(l.id),{}),wt.value=`素材「${s.display_name}」已重新识别。`):t.id==="confirm"?(s=await Ee(L.materialConfirm(l.id),{display_name:l.label,prompt:l.prompt,negative_prompt:l.negativePrompt,tags:l.tags}),wt.value=`素材「${s.display_name}」已确认入库。`):wt.value="这个入口需要表单承接,已在页面框架中预留。",s&&(Vl.value=s.material_id),await ro()}catch(s){qt.value=`${t.title}失败:${ze(s)}`}finally{st.value=""}}async function zi(t){if(hn.value)return;if(tl.value="",zl.value="",t.id==="refresh"){hn.value=t.id,await Promise.allSettled([pl(),$n(),en()]),hn.value="",zl.value="队列已刷新。";return}if(!t.enabled)return;const l=Ml.value;hn.value=t.id;try{if(t.id==="retry"){if(!l)return;const s=await Ee(L.jobRetry(l.task_id),{});_t.value=s.task_id,zl.value=`任务 ${Tl(s.task_id)} 已重新排队。`}else if(t.id==="cancel"){if(!l)return;const s=await Ee(L.jobCancel(l.task_id),{});_t.value=s.task_id,zl.value=`任务 ${Tl(s.task_id)} 已取消。`}else if(t.id==="dead-letter-retry"){const s=await Ee(L.jobDeadLetterRetry,{limit:50});zl.value=ou(s,"死信任务已重新排队")}else if(t.id==="failed-to-dead-letter"){const s=await Ee(L.jobDeadLetterMoveFailed,{limit:50});zl.value=ou(s,"失败任务已移入死信")}await Promise.allSettled([pl(),$n(),en()])}catch(s){tl.value=`${t.title} 失败:${ze(s)}`}finally{hn.value=""}}function ou(t,l){const s=Number(t.total),c=Array.isArray(t.errors)?t.errors.length:0,m=Number.isFinite(s)?s:0;return c?`${l} ${m} 条,${c} 条失败。`:`${l} ${m} 条。`}function Sn(t){return{running:"运行中",degraded:"降级",stopped:"已停止",loading:"加载中",created:"已创建",pending:"等待中",queued:"排队中",completed:"已完成",succeeded:"已成功",failed:"失败",cancelled:"已取消",dead_letter:"死信"}[ct(t)]??t}function au(t){return{all:"全部",completed:"完成",failed:"失败",warning:"警告",system:"系统"}[t]}function An(t){return{done:"已完成",running:"生成中",waiting:"待开始",review:"待审核"}[t]}function Wt(t,l,s,c){const m=s.trim();return{key:t,label:l,value:m||"待补充",hint:c,status:m&&m!=="-"&&m!=="待补充"?"ready":"pending"}}function Ip(){var t,l,s;return{id:"brief-import",step:"01",title:"导入粗略人设",detail:"选择已落库角色卡作为角色工作流输入。",status:"done",badge:"Profile",model:"Backend profile",duration:"已就绪",imageId:"",prompt:ve.value.basePrompt,phase:"输入",progress:100,queue:((t=ke.value)==null?void 0:t.profileId)??"-",attempt:"1 / 1",eta:"已完成",input:((l=ke.value)==null?void 0:l.name)??"-",result:(s=ke.value)!=null&&s.workflowId?"角色工作流已绑定":"等待创建角色工作流",dependsOn:"无",outputCount:"1 张角色卡"}}function $p(t,l){var I,q;const s=Ut.value[t.node_id]??[],m=(t.selected_image_id?s.find(U=>U.image_id===t.selected_image_id):null)??s[0],g=t.metadata??{};return{id:uo(t),step:String(l+2).padStart(2,"0"),title:xp(t),detail:t.description||iu(t),status:ru(t.status),badge:Sp(t),model:t.model_route||((I=Zn.value)==null?void 0:I.label)||"Backend workflow",duration:mt(g,"duration")||(t.status==="completed"?"已完成":"待运行"),imageId:(m==null?void 0:m.image_id)??"",imageIds:s.map(U=>U.image_id),prompt:t.prompt||iu(t),phase:t.step_name||t.node_key,progress:Ap(t.status),queue:mt(g,"last_task_id")||mt(g,"queue")||"-",attempt:mt(g,"attempt")||"-",eta:t.status==="running"||t.status==="queued"?"运行中":t.status==="completed"?"已完成":"待开始",input:mt(g,"input")||((q=ke.value)==null?void 0:q.name)||"-",result:mt(g,"result")||(s.length?`${s.length} 张候选图`:An(ru(t.status))),dependsOn:mt(g,"depends_on")||"-",outputCount:s.length?`${s.length} 张`:"等待产物",round:t.step_name||t.node_key,lockedItems:mt(g,"locked_items")||"-",decision:mt(g,"decision")||"-"}}function uo(t){return yd[t.node_key]??`backend-${t.node_key||t.node_id}`}function Pp(t){const l=kn.value.find(c=>c.id===t);if(l)return l.title;const s=no.value.find(c=>c.id===t);return s?s.title:t}function xp(t){return{profile_brief:"LLM 拆解设定",headshot:"头像草稿",half_body:"半身草稿",full_body:"全身设定",expression_sheet:"表情设定图",pose_sheet:"姿势设定图",style_lock:"高清修复与统一风格",final_pack:"入库",fast_profile:"LLM 拆解设定",fast_candidates:"快速候选图",fast_final:"最终角色图"}[t.node_key]||t.title}function iu(t){return t.description||t.node_key.replace(/_/g," ")}function Sp(t){return t.node_key.includes("profile")||t.node_key.includes("brief")?"LLM":t.node_key.includes("final")||t.node_key.includes("pack")?"Archive":t.node_type==="generation"?"Image":t.node_type}function ru(t){const l=ct(t);return l==="completed"||l==="selected"?"done":l==="running"||l==="queued"?"running":l==="failed"?"review":"waiting"}function Ap(t){const l=ct(t);return l==="completed"||l==="selected"?100:l==="running"?68:l==="queued"?18:0}function Mp(t){return t&&(t.id.includes("portrait")||t.id.includes("body")||t.id.includes("sheet"))?4:1}function Np(t){return t?t.id.includes("fullbody")||t.id.includes("body")?"3:4":t.id.includes("sheet")?"4:3":"1:1":"1:1"}function Bo(t){const l=new Set;return t.filter(s=>l.has(s.image_id)?!1:(l.add(s.image_id),!0))}function Tp(t){const l=new Set;return t.filter(s=>{const c=s.profileId||s.id;return l.has(c)?!1:(l.add(c),!0)})}function qp(t){return t.some(l=>l.status==="running")?"running":t.some(l=>l.status==="review")?"review":t.length&&t.every(l=>l.status==="done")?"done":"waiting"}function Ep(t){if(!t.length)return 0;const l=t.reduce((s,c)=>s+(c.progress??0),0);return Math.round(l/t.length)}function Lp(t,l,s){if(!l.length)return[];if(t==="profile-prep")return l;const c=l.findIndex(q=>q.id===Me.value),m=c>=0&&l.slice(0,c).every(q=>q.status!=="waiting"),g=l.reduce((q,U,X)=>U.status!=="waiting"||m&&X===c?X:q,-1);if(g<0)return[];const I=l.slice(0,g+1);return!s&&["portrait-draft","body-sheet"].includes(t)?I.slice(-1):I}function Oo(t){const l=mt(t.metadata,"title"),s=mt(t.request,"prompt");return l||s||`${t.task_type||"generation"} / ${Tl(t.task_id)}`}function Na(t){const l=Rp(t)?t:null,s=l==null?void 0:l.width,c=l==null?void 0:l.height,m=s&&c?`${s}x${c}`:"-",g=(l==null?void 0:l.model_route)||(l==null?void 0:l.model_used)||"后端返回",I=(l==null?void 0:l.positive_prompt)||"后端最近图片,等待补充原始提示词",q=l!=null&&l.is_archived?"已归档":"已生成";return{...t,title:je(t),prompt:I,model:g,size:m,seed:l!=null&&l.seed?String(l.seed):Tl(t.image_id),duration:"-",status:q,source:l!=null&&l.task_id?`任务 ${Tl(l.task_id)}`:"图库最近图片"}}function Rp(t){return"positive_prompt"in t||"is_archived"in t}function tn(t,l,s,c,m=[4,3]){const[g,I,q]=c,U=String(t).padStart(2,"0"),X=su(l),y=su(s.length>34?`${s.slice(0,34)}...`:s),[te,f]=m,Q=te>0&&f>0?te/f:4/3,W=Q>=1?1200:Math.round(1200*Q),Ne=Q>=1?Math.round(1200/Q):1200,Le=Math.min(W,Ne),pe=Math.round(Le*.08),Pt=Math.round(pe*1.38),al=Math.round(Le*.045),ml=Math.max(42,Math.round(Le*.065)),Gt=Math.round(Ne-pe*1.55),Nn=Math.min(Ne-pe*.75,Gt+Math.round(Le*.07)),ln=Math.round(pe+Le*.075),Tn=Math.max(42,Math.round(Le*.078)),fo=Math.max(20,Math.round(Le*.034)),po=Math.max(22,Math.round(Le*.035)),Ea=Math.max(74,Math.round(Le*.13)),Kp=W-pe*2,Gp=Ne-pe*2,zp=W-Pt*2,Qp=Ne-Pt*2,Jp=Math.round(W*.72),Yp=Math.round(Ne*.22),Xp=Math.round(Le*.46),Zp=Math.round(W*.22),ev=Math.round(Ne*.69),tv=Math.round(Le*.24),lv=Math.round(W-pe*1.4),nv=`${te}:${f}`,ov=`
<svg xmlns="http://www.w3.org/2000/svg" width="${W}" height="${Ne}" viewBox="0 0 ${W} ${Ne}" preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="${g}" />
<stop offset="58%" stop-color="${I}" />
<stop offset="100%" stop-color="#111827" />
</linearGradient>
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
<stop offset="0%" stop-color="${q}" stop-opacity="0.82" />
<stop offset="100%" stop-color="${q}" stop-opacity="0" />
</radialGradient>
<pattern id="grid" width="${ml}" height="${ml}" patternUnits="userSpaceOnUse">
<path d="M${ml} 0H0V${ml}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
</pattern>
</defs>
<rect width="${W}" height="${Ne}" fill="url(#bg)" />
<rect width="${W}" height="${Ne}" fill="url(#grid)" />
<circle cx="${Jp}" cy="${Yp}" r="${Xp}" fill="url(#halo)" />
<circle cx="${Zp}" cy="${ev}" r="${tv}" fill="#ffffff" opacity="0.11" />
<rect x="${pe}" y="${pe}" width="${Kp}" height="${Gp}" rx="${al}" fill="#ffffff" opacity="0.14" />
<rect x="${Pt}" y="${Pt}" width="${zp}" height="${Qp}" rx="${Math.round(al*.72)}" fill="#0f172a" opacity="0.24" />
<text x="${Pt+Math.round(Le*.035)}" y="${ln}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${po}" font-weight="700">IMAGESTUDIO TEST ${U}</text>
<text x="${Pt+Math.round(Le*.035)}" y="${Gt}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Tn}" font-weight="800">${X}</text>
<text x="${Pt+Math.round(Le*.035)}" y="${Nn}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${fo}">${y}</text>
<text x="${lv}" y="${ln+Math.round(Le*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ea}" font-weight="900">${U}</text>
<text x="${W-pe}" y="${Ne-Math.round(pe*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(Le*.027))}" font-weight="800">${nv}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(ov)}`}function Bp(t){const l=t.match(/(\d+)\s*x\s*(\d+)/i);if(!l)return[4,3];const s=Number(l[1]),c=Number(l[2]);if(!Number.isFinite(s)||!Number.isFinite(c)||s<=0||c<=0)return[4,3];const m=Op(s,c);return[Math.round(s/m),Math.round(c/m)]}function Op(t,l){let s=Math.abs(Math.round(t)),c=Math.abs(Math.round(l));for(;c;){const m=s%c;s=c,c=m}return s||1}function su(t){return t.replace(/[&<>"']/g,l=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[l]??l)}function je(t){return"title"in t&&t.title?t.title:t.node_id||t.workflow_id||t.profile_id||Tl(t.image_id)}function nt(t){return t.thumbnail_url||t.image_url||""}function Dp(t){if(t.status==="confirmed_unsupported")return!1;if(t.dialect==="openai_images"||t.dialect==="comfyui")return!0;const l=t.capabilities||{};return!!(l.text_to_image||l.image_generation||l.workflow_graph||Object.keys(l).some(s=>["text_to_image","image_generation","workflow_graph"].includes(s)))}function Tl(t){return t.length>10?`${t.slice(0,6)}...${t.slice(-4)}`:t}function Ta(t){const l=Number(t.progress);return Number.isFinite(l)?Math.max(0,Math.min(100,l)):0}function Fp(t,l,s){return Math.max(l,Math.min(s,t))}function ct(t){return String(t||"").trim().toLowerCase()}function Qi(t){const l=ct(t);return["failed","dead_letter","cancelled"].includes(l)?"is-bad":["running","queued","created","pending"].includes(l)?"is-warn":["completed","succeeded"].includes(l)?"is-good":"is-idle"}function Mn(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/1024/1024).toFixed(1)} MB`:`${(t/1024/1024/1024).toFixed(1)} GB`}function ql(t){if(!t)return"-";const l=new Date(t);return Number.isNaN(l.getTime())?t:new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(l)}function Ji(t){const l=er(t.created_at);if(!l)return"-";const s=Math.max(0,Math.round((Date.now()-l)/6e4));return s<1?"刚刚":s<60?`${s} 分钟`:`${Math.round(s/60)} 小时`}function Wp(){const t=localStorage.getItem(fl.theme);(t==="light"||t==="dark")&&(cl.value=t),Hl.value=localStorage.getItem(fl.primary)||Hl.value,Kl.value=localStorage.getItem(fl.accent)||Kl.value,Ht.value=uu(localStorage.getItem(fl.readNotifications)),zn.value=uu(localStorage.getItem(fl.dismissedNotifications))}function Vp(){localStorage.setItem(fl.theme,cl.value),localStorage.setItem(fl.primary,Hl.value),localStorage.setItem(fl.accent,Kl.value),localStorage.setItem(fl.readNotifications,JSON.stringify(Ht.value)),localStorage.setItem(fl.dismissedNotifications,JSON.stringify(zn.value))}function uu(t){if(!t)return[];try{const l=JSON.parse(t);return Array.isArray(l)?l.filter(s=>typeof s=="string"):[]}catch{return[]}}function El(t,l){const s=Zi(t);return s?`rgba(${s.r}, ${s.g}, ${s.b}, ${l})`:`rgba(118, 104, 232, ${l})`}function Yi(t,l,s){const c=Zi(t),m=Zi(l);if(!c||!m)return t;const g=Math.min(1,Math.max(0,s));return`#${Xi(c.r*(1-g)+m.r*g)}${Xi(c.g*(1-g)+m.g*g)}${Xi(c.b*(1-g)+m.b*g)}`}function Xi(t){return Math.round(t).toString(16).padStart(2,"0")}function Zi(t){const l=t.replace("#","");return/^[0-9a-fA-F]{6}$/.test(l)?{r:Number.parseInt(l.slice(0,2),16),g:Number.parseInt(l.slice(2,4),16),b:Number.parseInt(l.slice(4,6),16)}:null}function mt(t,l){const s=t==null?void 0:t[l];return typeof s=="string"?s:""}function jp(t){return!qa(t)||typeof t.task_id!="string"?null:{task_id:t.task_id,task_type:typeof t.task_type=="string"?t.task_type:"generation",status:typeof t.status=="string"?t.status:"created",progress:typeof t.progress=="number"?t.progress:0,created_at:typeof t.created_at=="string"?t.created_at:"",updated_at:typeof t.updated_at=="string"?t.updated_at:"",profile_id:typeof t.profile_id=="string"?t.profile_id:null,workflow_id:typeof t.workflow_id=="string"?t.workflow_id:null,node_id:typeof t.node_id=="string"?t.node_id:null,model_route:typeof t.model_route=="string"?t.model_route:null,idempotency_key:typeof t.idempotency_key=="string"?t.idempotency_key:null,request:qa(t.request)?t.request:void 0,result:qa(t.result)?t.result:void 0,metadata:qa(t.metadata)?t.metadata:void 0,error_message:typeof t.error_message=="string"?t.error_message:null}}function Up(t){return!!t}function qa(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function Hp(t){const l=new Set;return t.filter(s=>l.has(s.id)?!1:(l.add(s.id),!0))}function co(t){return Array.from(new Set(t))}function er(t){const l=Date.parse(t);return Number.isFinite(l)?l:0}function ze(t){return ws(t)}return(t,l)=>{var s,c,m,g,I,q,U,X;return b(),_("main",{class:z(["navigation-shell",{"rail-collapsed":!fa.value}]),"data-theme":cl.value,style:et(Yd.value)},[o("aside",{class:"rail","aria-label":"ImageStudio navigation",onMouseenter:Li,onMouseleave:l[0]||(l[0]=y=>$a()),onFocusin:Li,onFocusout:l[1]||(l[1]=y=>$a())},[o("div",Kg,[l[64]||(l[64]=o("span",{class:"brand-mark"},"IS",-1)),o("div",null,[l[63]||(l[63]=o("strong",null,"ImageStudio",-1)),o("small",null,p(((s=ne.value)==null?void 0:s.plugin_version)??"v3"),1)])]),o("nav",Gg,[o("div",zg,[(b(!0),_(V,null,G(_c(i),y=>(b(),_("button",{key:y.key,type:"button",class:z({active:re.value===y.key}),title:y.label,"aria-label":y.label,onClick:te=>hf(y)},[o("span",Jg,p(y.icon),1),o("span",Yg,p(y.label),1)],10,Qg))),128))])])],32),o("section",Xg,[o("header",Zg,[o("div",eh,[o("span",null,p(wd.value.label),1),o("h1",null,p(((c=ne.value)==null?void 0:c.display_name)??"ImageStudio 星图导航"),1)]),o("div",th,[l[65]||(l[65]=o("span",{"aria-hidden":"true"},"⌕",-1)),Te(o("input",{"onUpdate:modelValue":l[2]||(l[2]=y=>sa.value=y),type:"search",placeholder:"搜索生成、队列、图库、设置",onFocus:Bf,onInput:l[3]||(l[3]=y=>Gn.value=!0),onKeydown:l[4]||(l[4]=Eg(y=>vt("search"),["escape"]))},null,544),[[Re,sa.value]]),Zd.value?(b(),_("div",lh,[(b(!0),_(V,null,G(vs.value,y=>(b(),_("button",{key:y.title,type:"button",onMousedown:Rn(te=>yf(y),["prevent"])},[o("strong",null,p(y.title),1),o("small",null,p(y.description),1)],40,nh))),128)),vs.value.length?se("",!0):(b(),_("p",oh,"没有匹配结果"))])):se("",!0)]),o("div",ah,[o("button",{type:"button",class:"theme-switch",role:"switch","aria-checked":cl.value==="dark",title:cl.value==="dark"?"切换日间":"切换夜间",onClick:_f},[o("span",{class:z({active:cl.value==="light"}),"aria-label":"日间"},[...l[66]||(l[66]=[o("i",{class:"ui-icon icon-sun","aria-hidden":"true"},null,-1)])],2),o("span",{class:z({active:cl.value==="dark"}),"aria-label":"夜间"},[...l[67]||(l[67]=[o("i",{class:"ui-icon icon-moon","aria-hidden":"true"},null,-1)])],2)],8,ih),o("div",rh,[o("button",{type:"button",class:"icon-button",title:"通知","aria-expanded":ca.value,"aria-controls":"notification-panel",onClick:l[5]||(l[5]=y=>Gi("notifications"))},[l[68]||(l[68]=o("span",{class:"ui-icon icon-bell","aria-hidden":"true"},null,-1)),Ti.value?(b(),_("b",uh,p(Ti.value),1)):se("",!0)],8,sh),o("div",ch,[l[69]||(l[69]=o("strong",null,"通知概览",-1)),o("ul",null,[(b(!0),_(V,null,G(gs.value,(y,te)=>(b(),_("li",{key:y.id,style:et({"--card-index":te})},[o("span",{class:z(["dot",y.type])},null,2),o("span",null,p(y.title),1)],4))),128)),gs.value.length?se("",!0):(b(),_("li",dh,"暂无通知"))])])]),o("button",{type:"button",class:"icon-button",title:"调色盘","data-overlay-root":"palette","aria-expanded":ua.value,"aria-controls":"palette-panel",onClick:l[6]||(l[6]=y=>Gi("palette"))},[...l[70]||(l[70]=[o("span",{class:"ui-icon icon-palette","aria-hidden":"true"},null,-1)])],8,fh),o("div",ph,[o("button",{type:"button",class:"icon-button",title:"日志","aria-expanded":da.value,"aria-controls":"log-popover",onClick:l[7]||(l[7]=y=>Gi("logs"))},[...l[71]||(l[71]=[o("span",{class:"ui-icon icon-file","aria-hidden":"true"},null,-1)])],8,vh),Ce(gt,{name:"overlay-pop"},{default:Ze(()=>[da.value?(b(),_("div",mh,[o("header",null,[o("div",null,[l[72]||(l[72]=o("span",null,"日志",-1)),o("strong",null,p(Jn.value?"需要重试":`${J.value.length+ye.value.length} 条`),1)]),o("button",{type:"button",onClick:en},"刷新")]),Jn.value?(b(),_("div",gh,[l[73]||(l[73]=o("strong",null,"日志加载失败",-1)),o("span",null,p(Jn.value),1)])):(b(),nd(Oa,{key:1,tag:"ul",name:"card-list",class:"log-list"},{default:Ze(()=>[(b(!0),_(V,null,G(ye.value.slice(0,4),(y,te)=>(b(),_("li",{key:`${y.source}-${y.id}`,style:et({"--card-index":te})},[l[74]||(l[74]=o("span",{class:"dot failed"},null,-1)),o("span",null,p(y.error_message||y.source),1)],4))),128)),(b(!0),_(V,null,G(J.value.slice(0,Math.max(0,4-ye.value.length)),(y,te)=>(b(),_("li",{key:y.task_id,style:et({"--card-index":te})},[l[75]||(l[75]=o("span",{class:"dot completed"},null,-1)),o("span",null,p(y.task_id)+" / "+p(Sn(y.status)),1)],4))),128)),!ye.value.length&&!J.value.length?(b(),_("li",hh,"暂无日志")):se("",!0)]),_:1}))])):se("",!0)]),_:1})]),o("div",{class:z(["backend-status-chip",Jr.value]),title:fe.value.detail,"aria-live":"polite"},[l[76]||(l[76]=o("span",{"aria-hidden":"true"},null,-1)),o("strong",null,p(fe.value.label),1)],10,yh),o("button",{type:"button",class:"refresh-button",disabled:Qr.value,onClick:Ei},p(Qr.value?"同步中":"刷新"),9,bh)])]),bd.value?(b(),_("div",{key:0,class:z(["backend-connection-banner",Jr.value]),role:"status"},[o("div",null,[o("strong",null,p(fe.value.title),1),o("span",null,p(fe.value.detail),1)]),o("button",{type:"button",onClick:Ei},"重新检测")],2)):se("",!0),Ce(gt,{name:"panel-drop"},{default:Ze(()=>[ua.value?(b(),_("section",_h,[o("div",null,[(b(),_(V,null,G(le,y=>o("button",{key:y.name,type:"button",onClick:te=>yp(y)},[o("span",{class:"swatch",style:et({background:y.primary})},null,4),o("span",{class:"swatch",style:et({background:y.accent})},null,4),ja(" "+p(y.name),1)],8,wh)),64))]),o("label",null,[l[77]||(l[77]=o("span",null,"主色",-1)),Te(o("input",{"onUpdate:modelValue":l[8]||(l[8]=y=>Hl.value=y),type:"color"},null,512),[[Re,Hl.value]])]),o("label",null,[l[78]||(l[78]=o("span",null,"副色",-1)),Te(o("input",{"onUpdate:modelValue":l[9]||(l[9]=y=>Kl.value=y),type:"color"},null,512),[[Re,Kl.value]])])])):se("",!0)]),_:1}),Ce(gt,{name:"panel-drop"},{default:Ze(()=>[ca.value?(b(),_("section",kh,[o("header",null,[o("div",null,[l[79]||(l[79]=o("span",null,"消息中心",-1)),o("h2",null,p(Ti.value)+" 条未读",1)]),o("div",{class:"inline-actions"},[o("button",{type:"button",onClick:_p},"全部已读"),o("button",{type:"button",onClick:wp},"清空已读")])]),o("div",Ch,[(b(),_(V,null,G(["all","completed","failed","warning","system"],y=>o("button",{key:y,type:"button",class:z({active:pa.value===y}),onClick:te=>pa.value=y},p(au(y)),11,Ih)),64))]),Ce(Oa,{tag:"ul",name:"card-list",class:"notification-list"},{default:Ze(()=>[(b(!0),_(V,null,G(ms.value,(y,te)=>(b(),_("li",{key:y.id,class:z({unread:!Ht.value.includes(y.id)}),style:et({"--card-index":te})},[o("div",{class:z(["notification-thumb",y.type])},[y.thumbnailUrl?(b(),_("img",{key:0,src:y.thumbnailUrl,alt:""},null,8,$h)):(b(),_("span",Ph,p(au(y.type).slice(0,1)),1))],2),o("div",null,[o("strong",null,p(y.title),1),o("small",null,p(y.detail),1),o("time",null,p(ql(y.createdAt)),1)]),o("button",{type:"button",onClick:f=>bp(y.id)},p(Ht.value.includes(y.id)?"已读":"标记"),9,xh)],6))),128)),ms.value.length?se("",!0):(b(),_("li",Sh,"暂无通知"))]),_:1})])):se("",!0)]),_:1}),re.value==="generate"?(b(),_("section",Ah,[o("header",Mh,[o("div",null,[l[80]||(l[80]=o("span",null,"生成工作台",-1)),o("h2",null,p(hs.value.label),1),o("p",null,p(hs.value.detail),1)]),o("div",Nh,[(b(),_(V,null,G(r,y=>o("button",{key:y.key,type:"button",class:z(["generate-mode-button",{active:ue.value===y.key}]),"aria-pressed":ue.value===y.key,onClick:te=>ue.value=y.key},p(y.label),11,Th)),64))])]),Ce(gt,{name:"panel-drop",mode:"out-in"},{default:Ze(()=>{var y,te;return[(b(),_("section",{key:ue.value,class:"generate-mode-page"},[ue.value==="image"?(b(),_("section",qh,[o("section",Eh,[o("aside",Lh,[o("header",null,[o("div",null,[l[81]||(l[81]=o("span",null,"生成预览",-1)),o("h2",null,p(Jl.value.length)+" 张",1)])]),Jl.value.length?(b(),_("div",Rh,[(b(!0),_(V,null,G(Jl.value,f=>{var Q;return b(),_("button",{key:f.image_id,type:"button",class:z(["image-preview-card",{active:((Q=Ge.value)==null?void 0:Q.image_id)===f.image_id}]),onClick:W=>Ie.value=f.image_id},[o("span",Oh,[nt(f)?(b(),_("img",{key:0,src:nt(f),alt:je(f)},null,8,Dh)):(b(),_("span",Fh,"IMG"))]),o("span",null,[o("strong",null,p(je(f)),1),o("small",null,p(f.model)+" / "+p(ql(f.created_at)),1)])],10,Bh)}),128))])):(b(),_("div",Wh,[...l[82]||(l[82]=[o("strong",null,"暂无生成预览",-1),o("span",null,"通过自然语言发起生成后,结果会进入这里。",-1)])]))]),o("section",Vh,[o("div",jh,[Ge.value&&nt(Ge.value)?(b(),_("button",{key:0,type:"button",class:"image-stage-button",title:`打开 ${je(Ge.value)}`,onClick:Vs},[o("img",{src:nt(Ge.value),alt:je(Ge.value)},null,8,Hh)],8,Uh)):(b(),_("div",Kh,[...l[83]||(l[83]=[o("strong",null,"等待图片",-1),o("span",null,"左侧选择的结果会在这里放大显示。",-1)])]))]),o("aside",Gh,[o("header",null,[l[84]||(l[84]=o("span",null,"图片信息",-1)),o("strong",null,p(Ge.value?je(Ge.value):"未选择"),1)]),o("dl",null,[(b(!0),_(V,null,G(Cd.value,f=>(b(),_("div",{key:f.label},[o("dt",null,p(f.label),1),o("dd",null,p(f.value),1)]))),128))])])])]),o("form",{class:"image-chat-panel",onSubmit:Rn(Tf,["prevent"])},[l[90]||(l[90]=o("div",{class:"image-chat-intro"},[o("strong",null,"对话框"),o("small",null,"直接描述你想要的图片,后续会交由 LLM 翻译成生图提示词并调用工作流。")],-1)),o("div",zh,[o("div",Qh,[Te(o("textarea",{"onUpdate:modelValue":l[10]||(l[10]=f=>K.value=f),rows:"3","aria-label":"描述想生成的图片"},null,512),[[Re,K.value]]),K.value.trim()?se("",!0):(b(),_("div",Jh,[l[86]||(l[86]=o("p",null,[o("strong",null,"例如:"),o("span",null,"生成一张雨夜霓虹街头的半身角色图,黑色短发,电影感,高细节。")],-1)),o("p",null,[l[85]||(l[85]=o("strong",null,"最近请求:",-1)),o("span",Yh,p(qe.value?`${qe.value} / ${at.value||"未选择模型"}`:"暂无"),1)])]))]),o("div",Xh,[o("div",Zh,[l[88]||(l[88]=o("button",{type:"button",class:"composer-icon-button",title:"生成设置"},[o("span",{"aria-hidden":"true"},"◌")],-1)),o("label",ey,[l[87]||(l[87]=o("span",{"aria-hidden":"true"},"⚡",-1)),Te(o("select",{"onUpdate:modelValue":l[11]||(l[11]=f=>rt.value=f),disabled:!yn.value.length},[(b(!0),_(V,null,G(yn.value,f=>(b(),_("option",{key:f.value,value:f.value},p(f.provider)+" / "+p(f.label),9,ly))),128))],8,ty),[[Ku,rt.value]])]),va.value?(b(),_("span",ny,"同步中")):Fe.value?(b(),_("span",oy,"生成中")):Ae.value?(b(),_("span",ay,p(Ae.value),1)):ma.value?(b(),_("span",iy,"使用本地模型")):se("",!0)]),o("div",ry,[l[89]||(l[89]=o("button",{type:"button",class:"composer-icon-button",title:"语音输入"},[o("span",{"aria-hidden":"true"},"♩")],-1)),o("button",{type:"submit",class:"composer-send-button",title:"交给 LLM 翻译并生成",disabled:!K.value.trim()||Fe.value},p(Fe.value?"...":"↑"),9,sy)])])])],32),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[Zt.value&&mn.value==="generation"&&Ge.value&&nt(Ge.value)?(b(),_("div",{key:0,class:"image-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":`${je(Ge.value)} 预览`,onWheel:Rn(Vi,["prevent"])},[o("section",cy,[o("header",null,[o("div",null,[l[91]||(l[91]=o("span",null,"图片预览",-1)),o("strong",null,p(je(Ge.value)),1)]),o("div",dy,[o("button",{type:"button",title:"缩小",onClick:l[12]||(l[12]=f=>qo(-.15))},"-"),o("span",null,p(Yr.value),1),o("button",{type:"button",title:"放大",onClick:l[13]||(l[13]=f=>qo(.15))},"+"),o("button",{type:"button",title:"重置",onClick:so},"重置"),o("button",{type:"button",title:"关闭",onClick:Sa},"关闭")])]),o("div",{class:z(["image-viewer-stage",{dragging:Pl.value}]),onPointerdown:ji,onPointermove:Ui,onPointerup:Nl,onPointercancel:Nl,onPointerleave:Nl},[o("img",{src:nt(Ge.value),alt:je(Ge.value),style:et({transform:ki.value}),draggable:"false"},null,12,fy)],34)])],40,uy)):se("",!0)]),_:1}),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[Zt.value&&mn.value==="workflowCompare"&&Ve.value.length?(b(),_("div",py,[o("section",vy,[o("header",null,[o("div",null,[l[92]||(l[92]=o("span",null,"草稿平铺对比",-1)),o("strong",null,p(be.value.title),1)]),o("div",my,[o("span",null,p(Ve.value.length)+" 张",1),o("button",{type:"button",title:"关闭",onClick:Sa},"关闭")])]),o("div",{class:z(["workflow-compare-grid",Ai.value])},[(b(!0),_(V,null,G(Ve.value,(f,Q)=>(b(),_("button",{key:f.image_id,type:"button",title:`打开 ${je(f)}`,onClick:W=>js(f.image_id)},[nt(f)?(b(),_("img",{key:0,src:nt(f),alt:je(f)},null,8,hy)):se("",!0),o("span",null," 草稿 "+p(String(Q+1).padStart(2,"0"))+" / "+p(je(f)),1)],8,gy))),128))],2)])])):se("",!0)]),_:1})])):ue.value==="quickProfile"?(b(),_("section",yy,[o("section",by,[o("aside",_y,[o("header",wy,[l[93]||(l[93]=o("div",null,[o("span",null,"全部角色档案")],-1)),o("em",null,p(ke.value.status),1)]),o("div",ky,[o("button",{type:"button",class:"quick-profile-library-add-card",onClick:Eo},[...l[94]||(l[94]=[o("span",{class:"quick-profile-library-add-icon"},"+",-1),o("span",{class:"quick-profile-library-copy"},[o("strong",null,"添加档案"),o("small",null,"新建角色卡"),o("em",null,"填写问卷后加入档案列表")],-1)])]),(b(!0),_(V,null,G(So.value,(f,Q)=>(b(),_("button",{key:f.id,type:"button","data-profile-card-id":f.id,class:z({active:ra.value===f.id}),onClick:W=>Oi(f)},[o("span",Iy,[o("img",{src:tn(Q+41,f.name,f.identity,f.colors),alt:f.name},null,8,$y)]),o("span",Py,[o("strong",null,p(f.name),1),o("small",null,p(f.identity),1),o("em",null,p(f.personality),1)]),o("span",xy,p(f.updatedAt),1)],10,Cy))),128))])]),o("article",Sy,[l[100]||(l[100]=o("header",{class:"quick-profile-section-header"},[o("div",null,[o("span",null,"角色预览")]),o("em",null,"只读档案")],-1)),o("button",{type:"button",class:"quick-profile-curl-button",title:"打开角色设定详情","aria-label":"打开角色设定详情",onClick:Df},[...l[95]||(l[95]=[o("span",null,"详情",-1)])]),o("section",Ay,[o("figure",{class:"quick-profile-profile-portrait",style:et(rs.value)},[o("button",{type:"button",class:"quick-profile-portrait-button",title:`打开 ${lo.value.label}`,onClick:l[14]||(l[14]=f=>Us(lo.value.id))},[o("img",{src:lo.value.imageUrl,alt:lo.value.label},null,8,Ny)],8,My)],4),o("div",Ty,[l[96]||(l[96]=o("span",null,"姓名",-1)),o("strong",null,p(ve.value.name),1)]),o("div",qy,[l[97]||(l[97]=o("span",null,"身份",-1)),o("p",null,p(M.value.identity),1)]),o("div",Ey,[l[98]||(l[98]=o("span",null,"风格",-1)),o("p",null,p(ve.value.stylePrompt||((y=Ci.value)==null?void 0:y.label)),1)]),o("div",Ly,[l[99]||(l[99]=o("span",null,"设定简介",-1)),o("p",null,p(ve.value.basePrompt),1),o("small",null,p(ve.value.appearancePrompt),1)])])]),o("aside",Ry,[o("header",By,[o("div",null,[o("span",null,p(dt.value.detail),1),o("strong",null,p(dt.value.label),1)]),l[101]||(l[101]=o("em",null,"角色图片",-1))]),o("figure",Oy,[Ce(gt,{name:"quick-profile-image-swap"},{default:Ze(()=>[(b(),_("button",{key:dt.value.id,type:"button",class:"quick-profile-hero-button",title:`打开 ${dt.value.label}`,onClick:l[15]||(l[15]=f=>Us())},[o("img",{src:dt.value.imageUrl,alt:dt.value.label},null,8,Fy)],8,Dy))]),_:1})]),o("div",Wy,[(b(!0),_(V,null,G(wn.value,f=>(b(),_("button",{key:f.id,type:"button",class:z({active:kt.value===f.id}),onClick:Q=>Bs(f.id)},[o("span",null,[o("img",{src:f.imageUrl,alt:f.label},null,8,jy)]),o("strong",null,p(f.label),1),o("small",null,p(f.detail),1),o("em",null,p(f.state),1)],10,Vy))),128))])]),o("section",Uy,[o("header",Hy,[l[102]||(l[102]=o("div",null,[o("span",null,"参考素材")],-1)),o("em",null,p($d.value),1)]),o("div",Ky,[(b(),_(V,null,G(h,(f,Q)=>{var W,Ne,Le;return o("div",{key:f.id,class:"quick-profile-material-slot"},[o("button",{type:"button","data-overlay-root":"materialPicker","data-material-category":f.category,class:z(["quick-profile-material-card",{active:!!vl(f.category),expanded:N.value===f.category}]),"aria-expanded":N.value===f.category,onClick:pe=>xs(f.category)},[o("span",{class:z(["quick-profile-material-media",{empty:!vl(f.category)}])},[vl(f.category)?(b(),_("img",{key:0,src:Pa(vl(f.category),Q),alt:((W=vl(f.category))==null?void 0:W.label)??f.label},null,8,zy)):(b(),_("span",Qy,"无"))],2),o("span",Jy,[o("small",null,p(f.category),1),o("strong",null,p(((Ne=vl(f.category))==null?void 0:Ne.label)??"不使用参考"),1),o("em",null,p(((Le=vl(f.category))==null?void 0:Le.prompt)??"点击选择或添加素材参考"),1)])],10,Gy),Ce(gt,{name:"material-picker-pop"},{default:Ze(()=>[N.value===f.category?(b(),_("aside",{key:0,class:z(["quick-profile-material-picker",{accessory:f.category===He,filtered:ya.value}]),"data-overlay-root":"materialPicker"},[o("header",Yy,[o("div",null,[o("span",null,p(f.category)+"参考",1),l[103]||(l[103]=o("strong",null,"选择素材",-1))]),o("small",null,p(os.value),1)]),f.category===He?(b(),_("div",Xy,[(b(!0),_(V,null,G(ns.value,pe=>(b(),_("button",{key:pe,type:"button",class:z({active:A.value===pe}),onClick:Pt=>Ps(pe)},p(pe),11,Zy))),128))])):se("",!0),Ce(Oa,{tag:"div",name:"material-choice-scale",class:z(["quick-profile-material-picker-list",{accessory:f.category===He,filtered:ya.value}])},{default:Ze(()=>[o("button",{key:"none",type:"button","data-material-action":"none",class:z(["quick-profile-material-picker-choice","none",{active:!vl(N.value)}]),onClick:l[16]||(l[16]=pe=>As(N.value))},[...l[104]||(l[104]=[o("span",{class:"quick-profile-material-none-icon"},"无",-1),o("span",{class:"quick-profile-material-picker-copy"},[o("strong",null,"不使用"),o("em",null,"取消这个素材参考")],-1)])],2),(b(!0),_(V,null,G($i.value,(pe,Pt)=>(b(),_("button",{key:pe.id,type:"button","data-material-reference-id":pe.id,class:z(["quick-profile-material-picker-choice",{active:Is(pe)}]),onClick:al=>Ss(pe)},[o("span",tb,[o("img",{src:Pa(pe,Pt),alt:pe.label},null,8,lb)]),o("span",nb,[N.value===He?(b(),_("small",ob,p($s(pe)),1)):se("",!0),o("strong",null,p(pe.label),1),o("em",null,p(pe.prompt),1)])],10,eb))),128)),o("button",{key:"add",type:"button","data-material-action":"add",class:"quick-profile-material-picker-choice add",onClick:l[17]||(l[17]=pe=>Rs(N.value))},[l[105]||(l[105]=o("span",{class:"quick-profile-material-add-icon"},"+",-1)),o("span",ab,[o("strong",null,"添加"+p(N.value)+"素材",1),o("em",null,p(as.value),1)])])]),_:1},8,["class"])],2)):se("",!0)]),_:2},1024)])}),64))])]),o("section",ib,[o("header",rb,[l[106]||(l[106]=o("div",null,[o("span",null,"功能按钮")],-1)),o("em",null,p(ss.value.length)+" 项",1)]),o("div",sb,[(b(!0),_(V,null,G(ss.value,f=>(b(),_("article",{key:f.id,class:z(["quick-profile-command-card",f.tone,{disabled:!f.enabled}])},[o("div",ub,[o("span",cb,p(Bd(f.badge)),1)]),o("strong",null,p(f.title),1),o("p",null,p(f.detail),1),f.id==="persona"?(b(),_("button",{key:0,type:"button",onClick:Eo},p(ba(f)),1)):f.id==="workflow"?(b(),_("button",{key:1,type:"button",onClick:l[18]||(l[18]=Q=>ue.value="workflow")},p(ba(f)),1)):f.nav&&f.module?(b(),_("button",{key:2,type:"button",onClick:Q=>nl(f.nav,f.module)},p(ba(f)),9,db)):(b(),_("span",fb,p(ba(f)),1))],2))),128))])])]),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[We.value?(b(),_("div",pb,[o("section",vb,[o("figure",{class:"quick-profile-detail-card-portrait",style:et(rs.value)},[o("img",{src:lo.value.imageUrl,alt:ve.value.name},null,8,mb),o("figcaption",null,[l[107]||(l[107]=o("span",null,"角色设定",-1)),o("strong",null,p(ve.value.name),1)])],4),o("aside",gb,[o("header",null,[o("div",null,[o("span",null,p(ke.value.status),1),o("strong",null,p(ve.value.name)+" / 设定详情",1)]),o("button",{type:"button",title:"关闭",onClick:l[19]||(l[19]=f=>vt("quickProfileDetail"))},"×")]),o("dl",null,[(b(!0),_(V,null,G(qd.value,f=>(b(),_("div",{key:f.label},[o("dt",null,p(f.label),1),o("dd",null,p(f.value),1)]))),128))])])])])):se("",!0)]),_:1}),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[Zt.value&&mn.value==="quickProfile"&&dt.value?(b(),_("div",{key:0,class:"image-viewer-backdrop quick-profile-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":`${dt.value.label} 详情`},[o("section",yb,[o("div",{class:z(["quick-profile-viewer-media",{dragging:Pl.value,zoomed:dl.value>1}]),style:et(Ed.value),onWheel:Rn(Vi,["prevent"]),onDblclick:Rf,onPointerdown:ji,onPointermove:Ui,onPointerup:Nl,onPointercancel:Nl,onPointerleave:Nl},[o("div",{class:z(["quick-profile-viewer-frame",Ld.value]),style:et({transform:ki.value})},[o("img",{src:dt.value.imageUrl,alt:dt.value.label,draggable:"false"},null,8,bb)],6)],38),o("aside",_b,[o("header",null,[o("div",null,[o("span",null,p(dt.value.state),1),o("strong",null,p(ve.value.name)+" / "+p(dt.value.label),1)]),o("button",{type:"button",title:"关闭",onClick:Sa},"关闭")]),o("dl",null,[(b(!0),_(V,null,G(Rd.value,f=>(b(),_("div",{key:f.label},[o("dt",null,p(f.label),1),o("dd",null,p(f.value),1)]))),128))])])])],8,hb)):se("",!0)]),_:1})])):(b(),_("section",wb,[o("input",{id:"workflow-compare-toggle",class:"workflow-compare-toggle",type:"checkbox",disabled:Ve.value.length<2},null,8,kb),o("section",Cb,[(b(!0),_(V,null,G(tf.value,f=>(b(),_("article",{key:f.label},[o("span",null,p(f.label),1),o("strong",null,p(f.value),1),o("small",null,p(f.hint),1)]))),128))]),o("section",Ib,[o("aside",$b,[o("header",Pb,[o("div",null,[l[108]||(l[108]=o("span",null,"节点流程",-1)),o("strong",null,p(no.value.length)+" 大 / "+p(Dd.value)+" 小",1)]),o("em",null,p(An(be.value.status)),1)]),o("div",xb,[(b(!0),_(V,null,G(no.value,f=>{var Q;return b(),_("article",{key:f.id,class:z(["workflow-node-group",f.status,{active:((Q=_a.value)==null?void 0:Q.id)===f.id}])},[o("button",{type:"button",class:"workflow-group-card",disabled:!f.previewNodeId,onClick:W=>ol(f.previewNodeId)},[o("span",Ab,p(f.step),1),o("span",Mb,[o("small",null,p(An(f.status))+" / "+p(f.badge),1),o("strong",null,p(f.title),1),o("em",null,p(f.detail),1),o("span",Nb,[o("i",{style:et({width:`${f.progress}%`})},null,4)]),o("span",Tb,[o("b",null,p(f.summary),1),o("b",null,p(f.outputCount),1),o("b",null,p(f.eta),1)])])],8,Sb),f.nodes.length?(b(),_("div",qb,[(b(!0),_(V,null,G(f.nodes,(W,Ne)=>(b(),_("button",{key:W.id,type:"button",class:z(["workflow-subnode-card",W.status,{active:be.value.id===W.id}]),onClick:Le=>ol(W.id)},[o("span",Lb,p(String(Ne+1).padStart(2,"0")),1),o("span",Rb,[o("small",null,"节点 "+p(String(Ne+1).padStart(2,"0"))+" / "+p(An(W.status)),1),o("strong",null,p(W.title),1),o("em",null,p(W.outputCount??W.eta??W.duration),1)])],10,Eb))),128))])):se("",!0)],2)}),128))])]),o("section",Bb,[o("header",Ob,[o("div",null,[l[109]||(l[109]=o("span",null,"主预览",-1)),o("strong",null,p(Fd.value),1)]),Ao.value?(b(),_("div",Db,[o("em",null,p(Ca.value)+" / "+p(ka.value)+" 字段",1)])):xi.value?(b(),_("div",Fb,[o("em",null,p(us.value.length)+" 条提示词",1)])):Si.value?(b(),_("div",Wb,[o("em",null,p(Kt.value.length)+" 类参考",1)])):Pi.value?(b(),_("div",jb,[...l[111]||(l[111]=[o("em",null,"人设导入工作台",-1)])])):(b(),_("div",Vb,[o("em",null,p(Ve.value.length)+" 已选 / "+p(Sl.value.length)+" 候选",1),l[110]||(l[110]=o("label",{for:"workflow-compare-toggle",class:"workflow-compare-trigger",role:"button","aria-controls":"workflow-compare-panel"}," 平铺对比 ",-1))]))]),Pi.value?(b(),_("section",Ub,[o("article",{class:"workflow-profile-import-card create"},[o("button",{type:"button",class:"workflow-profile-import-create-action",title:"打开角色档案问卷","aria-label":"打开角色档案问卷",onClick:Eo}," + "),l[112]||(l[112]=o("div",{class:"workflow-profile-import-copy"},[o("span",null,"新建"),o("strong",null,"新建粗略人设"),o("p",null,"从空白问卷开始,填写角色核心、性格、外观、服装、场景和规避项,然后作为本工作流的基础档案。")],-1))]),o("article",Hb,[o("header",null,[l[113]||(l[113]=o("div",null,[o("span",null,"已有角色卡"),o("strong",null,"选择当前角色卡作为幕布输入")],-1)),o("em",null,p(So.value.length)+" 张",1)]),o("div",Kb,[(b(!0),_(V,null,G(So.value,(f,Q)=>(b(),_("button",{key:f.id,type:"button","data-profile-card-id":f.id,class:z({active:ra.value===f.id}),onClick:W=>Oi(f)},[o("span",{class:"workflow-profile-import-profile-portrait",style:et(Cs(f.colors)),"aria-hidden":"true"},null,4),o("span",zb,[l[114]||(l[114]=o("small",null,"姓名",-1)),o("strong",null,p(f.name),1)]),o("span",Qb,[l[115]||(l[115]=o("small",null,"身份",-1)),o("strong",null,p(f.identity),1)]),o("span",Jb,[l[116]||(l[116]=o("small",null,"风格",-1)),o("strong",null,p(f.style||"未设定"),1)]),o("span",Yb,[l[117]||(l[117]=o("small",null,"设定简介",-1)),o("strong",null,p(wf(f)),1),o("em",null,p(f.status)+" / "+p(f.updatedAt),1)])],10,Gb))),128))])]),o("aside",Xb,[l[121]||(l[121]=o("span",null,"当前导入",-1)),o("strong",null,p(ke.value.name),1),o("p",null,p(ke.value.identity),1),o("dl",null,[o("div",null,[l[118]||(l[118]=o("dt",null,"风格",-1)),o("dd",null,p(ke.value.style||((te=Ci.value)==null?void 0:te.label)),1)]),o("div",null,[l[119]||(l[119]=o("dt",null,"素材",-1)),o("dd",null,p(Kt.value.length)+" 类参考",1)]),o("div",null,[l[120]||(l[120]=o("dt",null,"状态",-1)),o("dd",null,p(ke.value.status),1)])])])])):Ao.value?(b(),_("section",Zb,[(b(!0),_(V,null,G(Mo.value,f=>(b(),_("section",{key:f.id,class:"workflow-persona-split-group"},[o("header",null,[o("div",null,[o("span",null,p(f.title),1),o("strong",null,p(f.detail),1)]),o("em",null,p(f.fields.filter(Q=>Q.status==="ready").length)+" / "+p(f.fields.length),1)]),o("div",e1,[(b(!0),_(V,null,G(f.fields,Q=>(b(),_("article",{key:Q.key,class:z(["workflow-persona-split-field",Q.status])},[o("span",null,p(Q.label),1),o("strong",null,p(Q.value),1),o("small",null,p(Q.hint),1),o("em",null,p(Q.status==="ready"?"已拆解":"待补充"),1)],2))),128))])]))),128)),l[122]||(l[122]=o("aside",{class:"workflow-persona-split-note"},[o("span",null,"后续流向"),o("strong",null,"确认字段后进入提示词规划"),o("p",null,"这些字段会作为头像、半身、全身、设定图和风格锁定节点的共同输入。真实后端返回更细字段后,可以继续映射到这里。")],-1))])):xi.value?(b(),_("section",t1,[o("section",l1,[(b(!0),_(V,null,G(us.value,f=>(b(),_("article",{key:f.id,class:"workflow-prompt-plan-card"},[o("header",null,[o("div",null,[o("span",null,p(f.target),1),o("strong",null,p(f.title),1)]),o("em",null,p(f.status),1)]),o("p",null,p(f.prompt),1),o("dl",null,[o("div",null,[l[123]||(l[123]=o("dt",null,"继承字段",-1)),o("dd",null,[(b(!0),_(V,null,G(f.inherits,Q=>(b(),_("span",{key:Q},p(Q),1))),128))])]),o("div",null,[l[124]||(l[124]=o("dt",null,"权重建议",-1)),o("dd",null,p(f.weight),1)]),o("div",null,[l[125]||(l[125]=o("dt",null,"负面词",-1)),o("dd",null,p(f.negative),1)])])]))),128))]),o("aside",n1,[(b(!0),_(V,null,G(jd.value,f=>(b(),_("article",{key:f.label},[o("span",null,p(f.label),1),o("strong",null,p(f.value),1),o("em",null,p(f.status==="ready"?"已准备":"待处理"),1)]))),128))])])):Si.value?(b(),_("section",o1,[(b(!0),_(V,null,G(Ud.value,(f,Q)=>(b(),_("article",{key:f.category,class:"workflow-material-bind-card","data-overlay-root":"materialPicker"},[o("button",{type:"button",class:"workflow-material-bind-main","data-material-category":f.category,"aria-expanded":N.value===f.category,onClick:W=>xs(f.category)},[o("span",{class:"workflow-material-bind-swatch",style:et(Cs(f.colors)),"aria-hidden":"true"},null,4),o("span",i1,[o("small",null,p(f.category)+" / "+p(f.strength)+"参考",1),o("strong",null,p(f.selectedLabel),1),o("em",null,p(f.selectedPrompt),1)]),o("b",null,p(f.required?"强制继承":"可选"),1)],8,a1),o("div",r1,[(b(!0),_(V,null,G(f.stages,W=>(b(),_("span",{key:W.stage_id},p(W.stage_title),1))),128))]),Ce(gt,{name:"material-picker-pop"},{default:Ze(()=>[N.value===f.category?(b(),_("aside",{key:0,class:z(["quick-profile-material-picker","workflow-material-picker",{accessory:f.category===He,filtered:ya.value}]),"data-overlay-root":"materialPicker"},[o("header",s1,[o("div",null,[o("span",null,p(f.category)+"参考",1),l[126]||(l[126]=o("strong",null,"选择素材",-1))]),o("small",null,p(os.value),1)]),f.category===He?(b(),_("div",u1,[(b(!0),_(V,null,G(ns.value,W=>(b(),_("button",{key:W,type:"button",class:z({active:A.value===W}),onClick:Ne=>Ps(W)},p(W),11,c1))),128))])):se("",!0),Ce(Oa,{tag:"div",name:"material-choice-scale",class:z(["quick-profile-material-picker-list",{accessory:f.category===He,filtered:ya.value}])},{default:Ze(()=>[o("button",{key:"none",type:"button","data-material-action":"none",class:z(["quick-profile-material-picker-choice","none",{active:!vl(N.value)}]),onClick:l[20]||(l[20]=W=>As(N.value))},[...l[127]||(l[127]=[o("span",{class:"quick-profile-material-none-icon"},"无",-1),o("span",{class:"quick-profile-material-picker-copy"},[o("strong",null,"不使用"),o("em",null,"默认不注入这个参考")],-1)])],2),(b(!0),_(V,null,G($i.value,(W,Ne)=>(b(),_("button",{key:W.id,type:"button","data-material-reference-id":W.id,class:z(["quick-profile-material-picker-choice",{active:Is(W)}]),onClick:Le=>Ss(W)},[o("span",f1,[o("img",{src:Pa(W,Ne),alt:W.label},null,8,p1)]),o("span",v1,[N.value===He?(b(),_("small",m1,p($s(W)),1)):se("",!0),o("strong",null,p(W.label),1),o("em",null,p(W.prompt),1)])],10,d1))),128)),o("button",{key:"add",type:"button","data-material-action":"add",class:"quick-profile-material-picker-choice add",onClick:l[21]||(l[21]=W=>Rs(N.value))},[l[128]||(l[128]=o("span",{class:"quick-profile-material-add-icon"},"+",-1)),o("span",g1,[o("strong",null,"添加"+p(N.value)+"素材",1),o("em",null,p(as.value),1)])])]),_:1},8,["class"])],2)):se("",!0)]),_:2},1024)]))),128))])):(b(),_("div",{key:4,class:z(["workflow-preview-stage",{comparing:Ve.value.length>1}])},[Ve.value.length?(b(),_("div",{key:0,class:z(["workflow-preview-selection-grid",Ai.value])},[(b(!0),_(V,null,G(Ve.value,(f,Q)=>(b(),_("button",{key:f.image_id,type:"button",class:"workflow-preview-main",title:`打开 ${je(f)}`,onClick:W=>js(f.image_id)},[nt(f)?(b(),_("img",{key:0,src:nt(f),alt:je(f)},null,8,y1)):se("",!0),o("span",b1," 草稿 "+p(String(Q+1).padStart(2,"0"))+" / "+p(je(f)),1)],8,h1))),128))],2)):(b(),_("div",_1,[...l[129]||(l[129]=[o("strong",null,"等待节点结果",-1),o("span",null,"节点生成完成后,预览会显示在这里。",-1)])]))],2)),Wd.value?se("",!0):(b(),_("section",w1,[l[130]||(l[130]=o("header",null,[o("span",null,"草稿池"),o("em",null,"点击草稿多选,上方会一起显示")],-1)),o("div",k1,[(b(!0),_(V,null,G(Sl.value,(f,Q)=>{var W;return b(),_("button",{key:f.image_id,type:"button",class:z({active:C.value.includes(f.image_id),focused:((W=In.value)==null?void 0:W.image_id)===f.image_id}),disabled:oo.value,onClick:Ne=>Mf(f.image_id)},[o("span",I1,[nt(f)?(b(),_("img",{key:0,src:nt(f),alt:je(f)},null,8,$1)):se("",!0),o("em",null,p(String(Q+1).padStart(2,"0")),1),C.value.includes(f.image_id)?(b(),_("strong",P1," ✓ ")):se("",!0)]),o("span",x1,[o("strong",null,"草稿 "+p(String(Q+1).padStart(2,"0")),1),o("small",null,p(f.model)+" / "+p(f.status),1)])],10,C1)}),128))])]))]),o("aside",{class:z(["workflow-surface workflow-detail-panel",{"persona-split":Ao.value}])},[o("header",S1,[l[131]||(l[131]=o("div",null,[o("span",null,"节点详情"),o("strong",null,"参数与提示词")],-1)),o("em",null,p(be.value.badge),1)]),Ao.value?(b(),_("article",A1,[o("header",null,[o("div",null,[l[132]||(l[132]=o("span",null,"LLM 拆解设定",-1)),o("strong",null,p(ke.value.name),1)]),o("em",null,p(be.value.badge),1)]),o("p",null,p(be.value.detail),1),o("dl",null,[(b(!0),_(V,null,G(Vd.value,f=>(b(),_("div",{key:f.label},[o("dt",null,p(f.label),1),o("dd",null,p(f.value),1),o("small",null,p(f.hint),1)]))),128))])])):(b(),_("dl",M1,[(b(!0),_(V,null,G(Kd.value,f=>(b(),_("div",{key:f.label},[o("dt",null,p(f.label),1),o("dd",null,p(f.value),1)]))),128))])),oo.value?(b(),_("section",N1,[l[133]||(l[133]=o("span",null,"已锁定",-1)),o("strong",null,p(be.value.title),1),o("p",null,p(wa.value),1)])):ao.value?(b(),_("section",T1,[l[134]||(l[134]=o("span",null,"待确认",-1)),o("strong",null,p(be.value.title),1),o("p",null,p(wa.value),1)])):se("",!0),o("section",q1,[o("header",null,[l[135]||(l[135]=o("span",null,"工作流操作",-1)),me.value||pn.value?(b(),_("em",E1,"执行中")):Z.value||vn.value?(b(),_("em",L1,p(Z.value||vn.value),1)):mi.value?(b(),_("em",R1,"加载中")):Po.value?(b(),_("em",B1,p(Po.value),1)):(b(),_("em",O1,p(ds.value.length)+" 项",1))]),o("div",D1,[(b(!0),_(V,null,G(ds.value,f=>(b(),_("article",{key:f.id,class:z(["workflow-action-card",f.tone,{disabled:!f.enabled}])},[o("div",null,[o("span",F1,p(Gd(f.badge)),1)]),o("strong",null,p(f.title),1),o("p",null,p(f.detail),1),f.actionKey||f.nav&&f.module?(b(),_("button",{key:0,type:"button",disabled:!f.enabled,onClick:Q=>Wf(f)},p(fs(f)),9,W1)):(b(),_("span",V1,p(fs(f)),1))],2))),128))])])],2)]),o("form",{class:"image-chat-panel workflow-chat-panel",onSubmit:Rn(Ef,["prevent"])},[o("div",j1,[l[136]||(l[136]=o("strong",null,"对话框",-1)),o("small",null,p(Hd.value),1)]),o("div",U1,[o("div",H1,[Te(o("textarea",{"onUpdate:modelValue":l[22]||(l[22]=f=>P.value=f),rows:"3","aria-label":"描述角色工作流调整",disabled:ao.value},null,8,K1),[[Re,P.value]]),P.value.trim()?se("",!0):(b(),_("div",G1,[o("p",null,[l[137]||(l[137]=o("strong",null,"当前节点:",-1)),o("span",null,p(be.value.title)+" / "+p(be.value.phase)+" / 英文提示词注入",1)]),l[139]||(l[139]=o("p",null,[o("strong",null,"例如:"),o("span",null,"把当前半身节点改得更冷静,外套减少装饰,保留青绿色眼睛。")],-1)),o("p",null,[l[138]||(l[138]=o("strong",null,"最近请求:",-1)),o("span",z1,p(R.value?`${R.value} / ${E.value||"未选择模型"}`:"暂无"),1)])]))]),o("div",Q1,[o("div",J1,[l[141]||(l[141]=o("button",{type:"button",class:"composer-icon-button",title:"工作流设置"},[o("span",{"aria-hidden":"true"},"◌")],-1)),o("label",Y1,[l[140]||(l[140]=o("span",{"aria-hidden":"true"},"⚡",-1)),Te(o("select",{"onUpdate:modelValue":l[23]||(l[23]=f=>rt.value=f),disabled:!yn.value.length},[(b(!0),_(V,null,G(yn.value,f=>(b(),_("option",{key:f.value,value:f.value},p(f.provider)+" / "+p(f.label),9,Z1))),128))],8,X1),[[Ku,rt.value]])]),va.value?(b(),_("span",e_,"同步中")):ma.value?(b(),_("span",t_,"使用本地模型")):se("",!0)]),o("div",l_,[l[142]||(l[142]=o("button",{type:"button",class:"composer-icon-button",title:"附加素材"},[o("span",{"aria-hidden":"true"},"+")],-1)),o("button",{type:"submit",class:"composer-send-button",title:"交给 LLM 拆解节点指令",disabled:!P.value.trim()||ao.value}," ↑ ",8,n_)])])])],32),o("div",o_,[l[145]||(l[145]=o("label",{class:"workflow-compare-backdrop-hit",for:"workflow-compare-toggle","aria-label":"关闭草稿平铺对比"},null,-1)),o("section",a_,[o("header",null,[o("div",null,[l[143]||(l[143]=o("span",null,"草稿平铺对比",-1)),o("strong",null,p(be.value.title),1)]),o("div",i_,[o("span",null,p(Ve.value.length)+" 张",1),l[144]||(l[144]=o("label",{class:"workflow-compare-close",for:"workflow-compare-toggle"},"关闭",-1))])]),o("div",{class:z(["workflow-compare-grid",Ai.value])},[(b(!0),_(V,null,G(Ve.value,(f,Q)=>(b(),_("figure",{key:f.image_id},[nt(f)?(b(),_("img",{key:0,src:nt(f),alt:je(f)},null,8,r_)):se("",!0),o("figcaption",null," 草稿 "+p(String(Q+1).padStart(2,"0"))+" / "+p(je(f)),1)]))),128))],2)])]),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[Zt.value&&mn.value==="generation"&&Ge.value&&nt(Ge.value)?(b(),_("div",{key:0,class:"image-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":`${je(Ge.value)} 预览`,onWheel:Rn(Vi,["prevent"])},[o("section",u_,[o("header",null,[o("div",null,[l[146]||(l[146]=o("span",null,"图片预览",-1)),o("strong",null,p(je(Ge.value)),1)]),o("div",c_,[o("button",{type:"button",title:"缩小",onClick:l[24]||(l[24]=f=>qo(-.15))},"-"),o("span",null,p(Yr.value),1),o("button",{type:"button",title:"放大",onClick:l[25]||(l[25]=f=>qo(.15))},"+"),o("button",{type:"button",title:"重置",onClick:so},"重置"),o("button",{type:"button",title:"关闭",onClick:Sa},"关闭")])]),o("div",{class:z(["image-viewer-stage",{dragging:Pl.value}]),onPointerdown:ji,onPointermove:Ui,onPointerup:Nl,onPointercancel:Nl,onPointerleave:Nl},[o("img",{src:nt(Ge.value),alt:je(Ge.value),style:et({transform:ki.value}),draggable:"false"},null,12,d_)],34)])],40,s_)):se("",!0)]),_:1})])),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[Ye.value?(b(),_("div",f_,[o("section",p_,[o("header",null,[l[147]||(l[147]=o("div",null,[o("span",null,"外部角色卡"),o("strong",null,"粘贴文本并识别为角色档案")],-1)),o("button",{type:"button",title:"关闭",onClick:l[26]||(l[26]=f=>vt("externalProfileImport"))},"×")]),o("div",v_,[o("label",m_,[l[148]||(l[148]=o("span",null,"原始文本",-1)),Te(o("textarea",{"onUpdate:modelValue":l[27]||(l[27]=f=>Ct.value=f),"data-profile-import-input":"",rows:"14",placeholder:`姓名:星港绘理\r
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
避雷:低质量、结构错误`},null,512),[[Re,Ct.value]])]),o("aside",g_,[o("header",null,[o("div",null,[l[149]||(l[149]=o("span",null,"识别预览",-1)),o("strong",null,p(_d.value)+" / "+p(_i.value.length),1)]),o("em",null,p(Xn.value?`${Xn.value.length} 字`:"待粘贴"),1)]),o("dl",null,[(b(!0),_(V,null,G(_i.value,f=>(b(),_("div",{key:f.key,class:z({pending:Xn.value&&!f.recognized})},[o("dt",null,[ja(p(f.label)+" ",1),o("span",null,p(f.recognized?"已识别":"待整理"),1)]),o("dd",null,p(f.value||"粘贴文本后显示"),1)],2))),128))])])]),o("footer",null,[o("span",null,p(Xn.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),o("button",{type:"button",onClick:l[28]||(l[28]=f=>vt("externalProfileImport"))},"取消"),o("button",{type:"button",disabled:!Xn.value,onClick:pp}," 识别并填入问卷 ",8,h_)])])])):se("",!0)]),_:1}),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[we.value?(b(),_("div",y_,[o("section",b_,[o("header",null,[l[150]||(l[150]=o("div",null,[o("span",null,"快速角色"),o("strong",null,"创建角色档案问卷")],-1)),o("button",{type:"button",title:"关闭",onClick:l[29]||(l[29]=f=>vt("personaQuestionnaire"))},"×")]),o("div",__,[o("label",null,[l[151]||(l[151]=o("span",null,"角色核心",-1)),Te(o("textarea",{"onUpdate:modelValue":l[30]||(l[30]=f=>ie.value.roleCore=f),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Re,ie.value.roleCore]])]),o("label",null,[l[152]||(l[152]=o("span",null,"性格关键词",-1)),Te(o("textarea",{"onUpdate:modelValue":l[31]||(l[31]=f=>ie.value.personality=f),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[Re,ie.value.personality]])]),o("label",null,[l[153]||(l[153]=o("span",null,"外观特征",-1)),Te(o("textarea",{"onUpdate:modelValue":l[32]||(l[32]=f=>ie.value.appearance=f),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[Re,ie.value.appearance]])]),o("label",null,[l[154]||(l[154]=o("span",null,"服装与配饰",-1)),Te(o("textarea",{"onUpdate:modelValue":l[33]||(l[33]=f=>ie.value.outfit=f),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[Re,ie.value.outfit]])]),o("label",null,[l[155]||(l[155]=o("span",null,"常用场景",-1)),Te(o("textarea",{"onUpdate:modelValue":l[34]||(l[34]=f=>ie.value.scene=f),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[Re,ie.value.scene]])]),o("label",null,[l[156]||(l[156]=o("span",null,"避雷内容",-1)),Te(o("textarea",{"onUpdate:modelValue":l[35]||(l[35]=f=>ie.value.avoid=f),rows:"3",placeholder:"不想要的设计方向、负面词和禁用元素。"},null,512),[[Re,ie.value.avoid]])]),it.value==="advanced"?(b(),_(V,{key:0},[o("label",null,[l[157]||(l[157]=o("span",null,"世界观",-1)),Te(o("textarea",{"onUpdate:modelValue":l[36]||(l[36]=f=>ie.value.worldview=f),rows:"3",placeholder:"现代、赛博、奇幻、末世、校园、古风、星际等。"},null,512),[[Re,ie.value.worldview]])]),o("label",null,[l[158]||(l[158]=o("span",null,"背景经历",-1)),Te(o("textarea",{"onUpdate:modelValue":l[37]||(l[37]=f=>ie.value.background=f),rows:"3",placeholder:"所属组织、过往经历、当前处境。"},null,512),[[Re,ie.value.background]])]),o("label",null,[l[159]||(l[159]=o("span",null,"身高 / 身材",-1)),Te(o("textarea",{"onUpdate:modelValue":l[38]||(l[38]=f=>ie.value.heightBuild=f),rows:"3",placeholder:"身高范围、体型、姿态气质、肤色。"},null,512),[[Re,ie.value.heightBuild]])]),o("label",null,[l[160]||(l[160]=o("span",null,"身体记忆点",-1)),Te(o("textarea",{"onUpdate:modelValue":l[39]||(l[39]=f=>ie.value.bodyFeatures=f),rows:"3",placeholder:"伤疤、痣、纹身、义体、异色瞳等。"},null,512),[[Re,ie.value.bodyFeatures]])]),o("label",null,[l[161]||(l[161]=o("span",null,"喜好",-1)),Te(o("textarea",{"onUpdate:modelValue":l[40]||(l[40]=f=>ie.value.likes=f),rows:"3",placeholder:"颜色、食物、饮品、兴趣、常去地点。"},null,512),[[Re,ie.value.likes]])]),o("label",null,[l[162]||(l[162]=o("span",null,"排斥 / 害怕",-1)),Te(o("textarea",{"onUpdate:modelValue":l[41]||(l[41]=f=>ie.value.dislikes=f),rows:"3",placeholder:"不喜欢、害怕、排斥或会回避的东西。"},null,512),[[Re,ie.value.dislikes]])]),o("label",null,[l[163]||(l[163]=o("span",null,"生活习惯",-1)),Te(o("textarea",{"onUpdate:modelValue":l[42]||(l[42]=f=>ie.value.habits=f),rows:"3",placeholder:"熬夜、洁癖、收集癖、整理装备等。"},null,512),[[Re,ie.value.habits]])]),o("label",null,[l[164]||(l[164]=o("span",null,"关系",-1)),Te(o("textarea",{"onUpdate:modelValue":l[43]||(l[43]=f=>ie.value.relationships=f),rows:"3",placeholder:"重要关系人、同伴、敌对关系、想保护的人。"},null,512),[[Re,ie.value.relationships]])]),o("label",null,[l[165]||(l[165]=o("span",null,"故事钩子",-1)),Te(o("textarea",{"onUpdate:modelValue":l[44]||(l[44]=f=>ie.value.storyHooks=f),rows:"3",placeholder:"未完成目标、秘密、可延展的事件线索。"},null,512),[[Re,ie.value.storyHooks]])]),o("label",null,[l[166]||(l[166]=o("span",null,"画风方向",-1)),Te(o("textarea",{"onUpdate:modelValue":l[45]||(l[45]=f=>ie.value.generationStyle=f),rows:"3",placeholder:"赛璐璐、厚涂、电影感、设定集、轻小说插画等。"},null,512),[[Re,ie.value.generationStyle]])]),o("label",null,[l[167]||(l[167]=o("span",null,"镜头偏好",-1)),Te(o("textarea",{"onUpdate:modelValue":l[46]||(l[46]=f=>ie.value.shotPreference=f),rows:"3",placeholder:"头像、半身、全身、立绘、设定图、多角度。"},null,512),[[Re,ie.value.shotPreference]])]),o("label",null,[l[168]||(l[168]=o("span",null,"氛围",-1)),Te(o("textarea",{"onUpdate:modelValue":l[47]||(l[47]=f=>ie.value.mood=f),rows:"3",placeholder:"明亮、压抑、柔和、危险、神圣、孤独等。"},null,512),[[Re,ie.value.mood]])]),o("label",w_,[l[169]||(l[169]=o("span",null,"补充备注",-1)),Te(o("textarea",{"onUpdate:modelValue":l[48]||(l[48]=f=>ie.value.extraNotes=f),rows:"3",placeholder:"其他需要保留给后端工作流的补充设定。"},null,512),[[Re,ie.value.extraNotes]])])],64)):se("",!0)]),o("footer",null,[o("span",null,p(Ul.value||"生成后会调用后端保存角色档案、创建 quick_profile 工作流,并自动选中角色卡。"),1),o("div",k_,[o("div",C_,[o("button",{type:"button",class:z({active:it.value==="simple"}),onClick:l[49]||(l[49]=f=>it.value="simple")}," 简单问卷 ",2),o("button",{type:"button",class:z({active:it.value==="advanced"}),onClick:l[50]||(l[50]=f=>it.value="advanced")}," 复杂问卷 ",2)]),o("button",{type:"button",disabled:!is.value||jl.value,onClick:op},p(jl.value?"保存中":"生成档案"),9,I_)])])])])):se("",!0)]),_:1})]))]}),_:1})])):re.value==="materials"?(b(),_("section",$_,[o("header",P_,[l[170]||(l[170]=o("div",null,[o("span",null,"素材库"),o("h2",null,"角色参考素材工作台"),o("p",null,"集中管理参考图、识别结果、分类、素材包导入和角色衣橱绑定,后续角色工作流会从这里读取可确认素材。")],-1)),o("div",x_,[o("button",{type:"button",disabled:xl.value,onClick:l[51]||(l[51]=y=>nu(ls.value[0]))},p(xl.value?"同步中":"刷新素材"),9,S_),o("button",{type:"button",onClick:Ls},"进入素材绑定")])]),o("section",A_,[(b(!0),_(V,null,G(Md.value,y=>(b(),_("article",{key:y.label,class:z(["metric-card",y.state])},[o("span",null,p(y.label),1),o("strong",null,p(y.value),1),o("small",null,p(y.hint),1)],2))),128))]),qt.value||wt.value?(b(),_("div",{key:0,class:z(["state-card",qt.value?"bad":"good","materials-page-message"])},[o("strong",null,p(qt.value?"素材接口提示":"素材操作完成"),1),o("span",null,p(qt.value||wt.value),1),o("button",{type:"button",disabled:xl.value,onClick:ro},"重新加载",8,M_)],2)):se("",!0),o("section",N_,[o("div",T_,[o("section",q_,[o("header",null,[o("div",null,[l[171]||(l[171]=o("span",null,"素材列表",-1)),o("h2",null,p(bn.value.length)+" 条素材",1)]),o("em",null,p(xl.value?"同步中":(m=tt.value)!=null&&m.total?"后端素材":"示例素材"),1)]),o("div",E_,[(b(!0),_(V,null,G(Yl.value,y=>(b(),_("button",{key:y.id,type:"button",class:z(["materials-category-chip",y.tone,{active:Zr.value===y.id}]),title:`${y.label} / ${y.detail} / ${y.endpoint}`,onClick:te=>xf(y.id)},[o("strong",null,p(y.label),1),o("b",null,p(y.count),1)],10,L_))),128)),o("button",{type:"button",class:"materials-category-chip add",title:((g=Xl.value)==null?void 0:g.label)===He?"打开添加配饰子类卡片 / POST material-categories":"打开添加分类卡片 / POST material-categories",onClick:Es},[o("strong",null,p(((I=Xl.value)==null?void 0:I.label)===He?"添加子类":"添加分类"),1),l[172]||(l[172]=o("b",null,"+",-1))],8,R_)]),Ii.value.length?(b(),_("div",B_,[l[173]||(l[173]=o("span",null,"配饰子类",-1)),(b(!0),_(V,null,G(Ii.value,y=>{var te;return b(),_("button",{key:y.id,type:"button",class:z({active:Zr.value===((te=_n.value)==null?void 0:te.id)&&jt.value===y.id}),onClick:f=>Sf(y.id)},[o("strong",null,p(y.label),1),o("b",null,p(y.count),1)],10,O_)}),128))])):se("",!0),xl.value&&!eo.value.length?(b(),_("div",D_,[(b(),_(V,null,G(6,y=>o("span",{key:y})),64))])):bn.value.length?(b(),_("div",F_,[(b(!0),_(V,null,G(bn.value,y=>{var te;return b(),_("button",{key:y.id,type:"button",class:z(["materials-library-card",Pf(y.status),{active:((te=Bt.value)==null?void 0:te.id)===y.id}]),onClick:f=>Ff(y.id)},[o("span",V_,[o("img",{src:y.imageUrl,alt:y.label},null,8,j_)]),o("span",U_,[o("small",null,p(y.category)+" / "+p(y.statusText),1),o("strong",null,p(y.label),1),o("em",null,p(y.prompt||"等待识别后写入提示词"),1)]),o("span",H_,[(b(!0),_(V,null,G(y.tags.slice(0,3),f=>(b(),_("b",{key:f},p(f),1))),128))])],10,W_)}),128))])):(b(),_("div",K_,[...l[174]||(l[174]=[o("strong",null,"暂无素材",-1),o("span",null,"上传或导入素材包后,后端素材记录会显示在这里。",-1)])]))])]),o("aside",G_,[o("section",z_,[l[175]||(l[175]=o("header",null,[o("div",null,[o("span",null,"后端动作"),o("h2",null,"素材接入点")])],-1)),o("div",Q_,[(b(!0),_(V,null,G(ls.value,y=>(b(),_("button",{key:y.id,type:"button",class:z(["materials-action-card",y.tone]),disabled:!y.enabled,onClick:te=>nu(y)},[o("span",null,p(y.badge),1),o("strong",null,p(y.title),1),o("small",null,p(y.detail),1),o("em",null,p(y.action),1),o("i",null,p(y.endpoint),1)],10,J_))),128))])])])]),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[Y.value?(b(),_("div",{key:0,class:"image-viewer-backdrop materials-category-create-backdrop",role:"dialog","aria-modal":"true","aria-label":ts.value},[o("form",{class:"materials-category-create-card","data-overlay-root":"materialCategoryCreate",onSubmit:Rn(Af,["prevent"])},[o("header",null,[o("div",null,[l[176]||(l[176]=o("span",null,"素材分类",-1)),o("strong",null,p(ts.value),1)]),o("button",{type:"button",title:"关闭",onClick:l[52]||(l[52]=y=>vt("materialCategoryCreate"))},"×")]),o("section",X_,[o("label",null,[l[177]||(l[177]=o("span",null,"分类名称",-1)),Te(o("input",{"onUpdate:modelValue":l[53]||(l[53]=y=>oe.value=y),"data-material-category-name":"",type:"text",maxlength:"24",placeholder:xo.value?"例如:头饰、眼镜、武器":"例如:场景、动作、道具"},null,8,Z_),[[Re,oe.value]])]),o("label",null,[l[178]||(l[178]=o("span",null,"备注",-1)),Te(o("textarea",{"onUpdate:modelValue":l[54]||(l[54]=y=>ge.value=y),rows:"4",maxlength:"120",placeholder:"可选,写给后端或团队看的分类说明。"},null,512),[[Re,ge.value]])]),o("dl",null,[o("div",null,[l[179]||(l[179]=o("dt",null,"创建类型",-1)),o("dd",null,p(xo.value?"配饰子类":"素材主分类"),1)]),o("div",null,[l[180]||(l[180]=o("dt",null,"父级分类",-1)),o("dd",null,p(Sd.value),1)]),o("div",null,[l[181]||(l[181]=o("dt",null,"后端接口",-1)),o("dd",null,p(Ad.value),1)])])]),he.value?(b(),_("p",ew,p(he.value),1)):se("",!0),o("footer",null,[o("button",{type:"button",onClick:l[55]||(l[55]=y=>vt("materialCategoryCreate"))},"取消"),o("button",{type:"submit",disabled:!oe.value.trim()||Tt.value},p(Tt.value?"创建中":"确认添加"),9,tw)])],32)],8,Y_)):se("",!0)]),_:1}),Ce(gt,{name:"viewer-fade"},{default:Ze(()=>[j.value&&Bt.value?(b(),_("div",{key:0,class:"image-viewer-backdrop materials-detail-backdrop",role:"dialog","aria-modal":"true","aria-label":`${Bt.value.label} 素材详情`},[o("section",nw,[o("figure",ow,[o("img",{src:Bt.value.imageUrl,alt:Bt.value.label},null,8,aw),o("figcaption",null,[o("span",null,p(Bt.value.category)+" / "+p(Bt.value.subcategory),1),o("strong",null,p(Bt.value.label),1)])]),o("aside",iw,[o("header",null,[o("div",null,[o("span",null,p(Bt.value.source==="backend"?"后端素材库":"示例素材"),1),o("strong",null,p(Bt.value.label)+" / 素材详情",1)]),o("button",{type:"button",title:"关闭",onClick:l[56]||(l[56]=y=>vt("materialDetail"))},"×")]),o("dl",null,[(b(!0),_(V,null,G(Nd.value,y=>(b(),_("div",{key:y.label},[o("dt",null,p(y.label),1),o("dd",null,p(y.value),1)]))),128))])])])],8,lw)):se("",!0)]),_:1})])):re.value==="queue"?(b(),_("section",rw,[o("header",sw,[l[182]||(l[182]=o("div",null,[o("span",null,"任务队列"),o("h2",null,"生成调度工作台"),o("p",null,"集中查看图片生成、快速角色和角色工作流节点的任务状态,失败任务会浮到处理区。")],-1)),o("div",uw,[o("button",{type:"button",disabled:el.value,onClick:l[57]||(l[57]=y=>zi(Mi.value[0]))},p(el.value?"同步中":"刷新队列"),9,cw),o("button",{type:"button",onClick:l[58]||(l[58]=y=>nl("generate","generate"))},"新建生成")])]),o("section",dw,[(b(!0),_(V,null,G(Qd.value,y=>(b(),_("article",{key:y.label,class:z(["metric-card",y.state])},[o("span",null,p(y.label),1),o("strong",null,p(y.value),1),o("small",null,p(y.hint),1)],2))),128))]),tl.value||zl.value?(b(),_("div",{key:0,class:z(["state-card",tl.value?"bad":"good","queue-page-error"])},[o("strong",null,p(tl.value?"队列接口提示":"队列操作完成"),1),o("span",null,p(tl.value||zl.value),1),o("button",{type:"button",onClick:l[59]||(l[59]=y=>zi(Mi.value[0]))},"重新加载")],2)):se("",!0),o("section",fw,[o("article",pw,[o("header",null,[o("div",null,[l[183]||(l[183]=o("span",null,"任务列表",-1)),o("h2",null,p(io.value.length)+" 条任务",1)]),o("div",vw,[(b(!0),_(V,null,G(zd.value,y=>(b(),_("button",{key:y.key,type:"button",class:z({active:ul.value===y.key}),onClick:te=>ul.value=y.key},[o("span",null,p(y.label),1),o("b",null,p(y.count),1)],10,mw))),128))])]),el.value&&!pt.value.length?(b(),_("div",gw,[(b(),_(V,null,G(5,y=>o("span",{key:y})),64))])):io.value.length?(b(),_("div",hw,[(b(!0),_(V,null,G(io.value,y=>{var te;return b(),_("button",{key:y.task_id,type:"button",class:z(["queue-task-card",Qi(y.status),{active:((te=Ml.value)==null?void 0:te.task_id)===y.task_id}]),onClick:f=>_t.value=y.task_id},[o("span",bw,p(Sn(y.status)),1),o("span",_w,[o("strong",null,p(Oo(y)),1),o("small",null,p(y.model_route||"未指定模型")+" / "+p(y.task_type||"generation"),1),o("i",ww,[o("span",{style:et({width:`${Ta(y)}%`})},null,4)])]),o("span",kw,[o("b",null,p(Ta(y))+"%",1),o("small",null,p(Ji(y)),1)])],10,yw)}),128))])):(b(),_("div",Cw,[...l[184]||(l[184]=[o("strong",null,"当前筛选下没有任务",-1),o("span",null,"切换筛选或新建生成任务后,这里会显示后端队列记录。",-1)])]))]),o("aside",Iw,[o("section",$w,[o("header",null,[o("div",null,[l[185]||(l[185]=o("span",null,"任务详情",-1)),o("h2",null,p(Ml.value?Sn(Ml.value.status):"未选中"),1)]),Ml.value?(b(),_("span",{key:0,class:z(["status-pill",Qi(Ml.value.status)])},p(Tl(Ml.value.task_id)),3)):se("",!0)]),o("dl",null,[(b(!0),_(V,null,G(Jd.value,y=>(b(),_("div",{key:y.label},[o("dt",null,p(y.label),1),o("dd",null,p(y.value),1)]))),128))])]),o("section",Pw,[l[186]||(l[186]=o("header",null,[o("div",null,[o("span",null,"处理动作"),o("h2",null,"后端接入点")])],-1)),o("div",xw,[(b(!0),_(V,null,G(Mi.value,y=>(b(),_("button",{key:y.id,type:"button",class:z(["queue-action-card",y.tone]),disabled:!y.enabled,onClick:te=>zi(y)},[o("span",null,p(y.badge),1),o("strong",null,p(y.title),1),o("small",null,p(y.detail),1),o("em",null,p(y.action),1)],10,Sw))),128))])])])])])):re.value!=="performance"?(b(),_(V,{key:4},[o("section",Aw,[o("div",Mw,[o("span",null,p(((q=ne.value)==null?void 0:q.dashboard_user)??"AstrBot"),1),l[187]||(l[187]=o("h2",null,"星图导航工作台",-1)),l[188]||(l[188]=o("p",null,"生成、队列、图库和运行监控都在同一屏聚合。",-1))]),(b(!0),_(V,null,G(Ni.value.slice(0,3),y=>(b(),_("article",{key:y.label,class:z(["signal-card",y.state])},[o("span",null,p(y.label),1),o("strong",null,p(y.value),1),o("small",null,p(y.hint),1)],2))),128)),o("button",{type:"button",class:"quick-create",onClick:l[60]||(l[60]=y=>nl("generate","generate"))},[...l[189]||(l[189]=[o("span",{"aria-hidden":"true"},"+",-1),ja(" 新建生成 ",-1)])])]),o("section",Nw,[o("div",Tw,[o("section",qw,[o("header",null,[o("div",null,[l[190]||(l[190]=o("span",null,"性能监控",-1)),o("h2",null,p(Rt.value?"需要重试":Sn(((U=F.value)==null?void 0:U.plugin_status)??"loading")),1)]),o("button",{type:"button",onClick:l[61]||(l[61]=y=>nl("performance","performance"))},"详情")]),Rt.value?(b(),_("div",Ew,[l[191]||(l[191]=o("strong",null,"监控加载失败",-1)),o("span",null,p(Rt.value),1),o("button",{type:"button",onClick:pl},"重试")])):se("",!0),o("div",Lw,[(b(!0),_(V,null,G(Xd.value,y=>(b(),_("article",{key:y.label,class:z(["metric-card",y.state])},[o("span",null,p(y.label),1),o("strong",null,p(y.value),1),o("small",null,p(y.hint),1)],2))),128))])]),o("section",Rw,[o("header",null,[o("div",null,[l[192]||(l[192]=o("span",null,"当前队列",-1)),o("h2",null,p(ll.value)+" 个任务",1)]),o("button",{type:"button",disabled:el.value,onClick:$n},p(el.value?"加载中":"更新"),9,Bw)]),tl.value?(b(),_("div",Ow,[l[193]||(l[193]=o("strong",null,"队列加载失败",-1)),o("span",null,p(tl.value),1),o("button",{type:"button",onClick:$n},"重试")])):el.value&&!wi.value.length?(b(),_("div",Dw,[(b(),_(V,null,G(3,y=>o("span",{key:y})),64))])):wi.value.length?(b(),_("ul",Fw,[(b(!0),_(V,null,G(wi.value,y=>(b(),_("li",{key:y.task_id},[o("div",Ww,[o("strong",null,p(Oo(y)),1),o("small",null,p(y.model_route||"未指定模型")+" / 等待 "+p(Ji(y)),1),o("div",Vw,[o("span",{style:et({width:`${Ta(y)}%`})},null,4)])]),o("span",{class:z(["status-pill",Qi(y.status)])},p(Sn(y.status)),3),l[194]||(l[194]=o("div",{class:"row-actions","aria-label":"任务操作"},[o("button",{type:"button",title:"查看详情"},"□"),o("button",{type:"button",title:"重试任务"},"↻")],-1))]))),128))])):(b(),_("div",jw,[...l[195]||(l[195]=[o("strong",null,"队列暂时空闲",-1),o("span",null,"新的生成任务会在这里显示进度、模型和等待时间。",-1)])]))]),o("section",Uw,[o("header",null,[o("div",null,[l[196]||(l[196]=o("span",null,"智能工作建议",-1)),o("h2",null,p(qi.value.length?"可继续处理":"当前平稳"),1)])]),qi.value.length?(b(),_("div",Hw,[(b(!0),_(V,null,G(qi.value,y=>(b(),_("button",{key:y.id,type:"button",class:z(["suggestion-card",y.tone]),onClick:te=>kp(y)},[o("span",null,p(y.action),1),o("strong",null,p(y.title),1),o("small",null,p(y.detail),1)],10,Kw))),128))])):(b(),_("div",Gw,[...l[197]||(l[197]=[o("strong",null,"没有需要立即处理的建议",-1),o("span",null,"失败、待确认、成本提醒和可继续流程会自动浮到这里。",-1)])]))])]),o("aside",zw,[o("section",Qw,[o("header",null,[o("div",null,[l[198]||(l[198]=o("span",null,"最近图片",-1)),o("h2",null,p(Ql.value.length)+" 张结果",1)]),o("button",{type:"button",onClick:l[62]||(l[62]=y=>nl("gallery","images"))},"图库")]),Rt.value?(b(),_("div",Jw,[l[199]||(l[199]=o("strong",null,"图片摘要不可用",-1)),o("span",null,p(Rt.value),1)])):Qn.value&&!Ql.value.length?(b(),_("div",Yw,[(b(),_(V,null,G(3,y=>o("span",{key:y,class:"image-skeleton"})),64))])):Ql.value.length?(b(),_("div",Xw,[(b(!0),_(V,null,G(Ql.value,y=>(b(),_("article",{key:y.image_id,class:"side-image-card"},[o("div",Zw,[nt(y)?(b(),_("img",{key:0,src:nt(y),alt:je(y)},null,8,ek)):(b(),_("span",tk,"IMG"))]),o("strong",null,p(je(y)),1)]))),128))])):(b(),_("div",lk,[...l[200]||(l[200]=[o("strong",null,"暂无最近图片",-1),o("span",null,"完成的生成结果会在这里显示缩略图和名称。",-1)])]))])])])],64)):(b(),_("section",nk,[o("header",ok,[l[201]||(l[201]=o("div",null,[o("span",null,"性能详情"),o("h2",null,"运行、队列和存储监控"),o("p",null,"首页侧栏只保留必要指标,完整拆分集中在这里。")],-1)),o("button",{type:"button",disabled:Qn.value,onClick:pl},p(Qn.value?"同步中":"刷新监控"),9,ak)]),Rt.value?(b(),_("div",ik,[l[202]||(l[202]=o("strong",null,"监控详情加载失败",-1)),o("span",null,p(Rt.value),1),o("button",{type:"button",onClick:pl},"重试")])):se("",!0),o("section",rk,[(b(!0),_(V,null,G(Ni.value,y=>(b(),_("article",{key:y.label,class:z(["metric-card","detail-card",y.state])},[o("span",null,p(y.label),1),o("strong",null,p(y.value),1),o("small",null,p(y.hint),1)],2))),128))]),o("section",sk,[o("article",uk,[o("header",null,[o("div",null,[l[203]||(l[203]=o("span",null,"队列拆分",-1)),o("h2",null,p(ll.value)+" 个任务",1)])]),o("dl",null,[(b(!0),_(V,null,G(lf.value,y=>(b(),_("div",{key:y.label},[o("dt",null,p(y.label),1),o("dd",null,p(y.value),1)]))),128))])]),o("article",ck,[o("header",null,[o("div",null,[l[204]||(l[204]=o("span",null,"存储拆分",-1)),o("h2",null,p(Mn(((X=F.value)==null?void 0:X.storage.total_bytes)??0)),1)])]),o("dl",null,[(b(!0),_(V,null,G(nf.value,y=>(b(),_("div",{key:y.label},[o("dt",null,p(y.label),1),o("dd",null,p(y.value),1)]))),128))])]),o("article",dk,[o("header",null,[o("div",null,[l[205]||(l[205]=o("span",null,"接口状态",-1)),o("h2",null,p(Rt.value?"异常":"可读"),1)])]),o("dl",null,[o("div",null,[l[206]||(l[206]=o("dt",null,"Dashboard",-1)),o("dd",null,p(Rt.value?"失败":"正常"),1)]),o("div",null,[l[207]||(l[207]=o("dt",null,"Jobs",-1)),o("dd",null,p(tl.value?"失败":"正常"),1)]),o("div",null,[l[208]||(l[208]=o("dt",null,"Logs",-1)),o("dd",null,p(Jn.value?"失败":"正常"),1)])])])])]))])],14,Hg)}}}),hk=(e,n)=>{const a=e.__vccOpts||e;for(const[i,r]of n)a[i]=r;return a},yk=hk(gk,[["__scopeId","data-v-92ea7bd9"]]);Bg(yk).mount("#app");