astrbot_plugin_imagestudio/web/assets/index-B3vcI0Zu.js

59 行
628 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WorkflowCompareDialog-DAZqOZBX.js","assets/WorkflowCompareDialog-BI_xR1pa.css","assets/WorkflowBranchPanel-B8zlTyH5.js","assets/WorkflowBranchPanel-nMe9nW01.css","assets/WorkflowCandidatePool-6nReYbFh.js","assets/WorkflowCandidatePool-CHJiY32s.css","assets/WorkflowComposer-DugsmPLf.js","assets/WorkflowComposer-D0-o7edc.css","assets/WorkflowDependencyContextCard-BFqWiLtC.js","assets/WorkflowDependencyContextCard-WHidWt7d.css","assets/WorkflowGenerationReviewDialog-DL_VDa4I.js","assets/WorkflowGenerationReviewDialog-Dde3QtRN.css","assets/WorkflowMaterialDrawer-BZH6UeeH.js","assets/WorkflowMaterialDrawer-CzNrrMeI.css","assets/WorkflowRoundPanel-BoJ_3QGg.js","assets/WorkflowRoundPanel-DxGu9gjD.css"])))=>i.map(i=>d[i]);
var Zk=Object.defineProperty;var ew=(e,n,o)=>n in e?Zk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Ac=(e,n,o)=>ew(e,typeof n!="symbol"?n+"":n,o);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const m of c.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function o(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=o(s);fetch(s.href,c)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function _v(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const Ht={},Pr=[],eo=()=>{},Dm=()=>!1,nd=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),od=e=>e.startsWith("onUpdate:"),Aa=Object.assign,kv=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},tw=Object.prototype.hasOwnProperty,Tt=(e,n)=>tw.call(e,n),Qe=Array.isArray,xr=e=>Rs(e)==="[object Map]",Or=e=>Rs(e)==="[object Set]",Kp=e=>Rs(e)==="[object Date]",st=e=>typeof e=="function",ca=e=>typeof e=="string",Sn=e=>typeof e=="symbol",Lt=e=>e!==null&&typeof e=="object",Wm=e=>(Lt(e)||st(e))&&st(e.then)&&st(e.catch),Um=Object.prototype.toString,Rs=e=>Um.call(e),aw=e=>Rs(e).slice(8,-1),Fm=e=>Rs(e)==="[object Object]",wv=e=>ca(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=_v(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),id=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},lw=/-\w/g,$n=id(e=>e.replace(lw,n=>n.slice(1).toUpperCase())),nw=/\B([A-Z])/g,gi=id(e=>e.replace(nw,"-$1").toLowerCase()),Vm=id(e=>e.charAt(0).toUpperCase()+e.slice(1)),Mc=id(e=>e?`on${Vm(e)}`:""),Zn=(e,n)=>!Object.is(e,n),Wu=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},jm=(e,n,o,r=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:r,value:o})},rd=e=>{const n=parseFloat(e);return isNaN(n)?e:n},ow=e=>{const n=ca(e)?Number(e):NaN;return isNaN(n)?e:n};let Gp;const sd=()=>Gp||(Gp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ha(e){if(Qe(e)){const n={};for(let o=0;o<e.length;o++){const r=e[o],s=ca(r)?uw(r):ha(r);if(s)for(const c in s)n[c]=s[c]}return n}else if(ca(e)||Lt(e))return e}const iw=/;(?![^(]*\))/g,rw=/:([^]+)/,sw=/\/\*[^]*?\*\//g;function uw(e){const n={};return e.replace(sw,"").split(iw).forEach(o=>{if(o){const r=o.split(rw);r.length>1&&(n[r[0].trim()]=r[1].trim())}}),n}function fe(e){let n="";if(ca(e))n=e;else if(Qe(e))for(let o=0;o<e.length;o++){const r=fe(e[o]);r&&(n+=r+" ")}else if(Lt(e))for(const o in e)e[o]&&(n+=o+" ");return n.trim()}const dw="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",cw=_v(dw);function Km(e){return!!e||e===""}function vw(e,n){if(e.length!==n.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=fi(e[r],n[r]);return o}function fi(e,n){if(e===n)return!0;let o=Kp(e),r=Kp(n);if(o||r)return o&&r?e.getTime()===n.getTime():!1;if(o=Sn(e),r=Sn(n),o||r)return e===n;if(o=Qe(e),r=Qe(n),o||r)return o&&r?vw(e,n):!1;if(o=Lt(e),r=Lt(n),o||r){if(!o||!r)return!1;const s=Object.keys(e).length,c=Object.keys(n).length;if(s!==c)return!1;for(const m in e){const b=e.hasOwnProperty(m),_=n.hasOwnProperty(m);if(b&&!_||!b&&_||!fi(e[m],n[m]))return!1}}return String(e)===String(n)}function hv(e,n){return e.findIndex(o=>fi(o,n))}const Gm=e=>!!(e&&e.__v_isRef===!0),u=e=>ca(e)?e:e==null?"":Qe(e)||Lt(e)&&(e.toString===Um||!st(e.toString))?Gm(e)?u(e.value):JSON.stringify(e,zm,2):String(e),zm=(e,n)=>Gm(n)?zm(e,n.value):xr(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[r,s],c)=>(o[Rc(r,c)+" =>"]=s,o),{})}:Or(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>Rc(o))}:Sn(n)?Rc(n):Lt(n)&&!Qe(n)&&!Fm(n)?String(n):n,Rc=(e,n="")=>{var o;return Sn(e)?`Symbol(${(o=e.description)!=null?o:n})`:e};/**
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ga;class fw{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&&Ga&&(Ga.active?(this.parent=Ga,this.index=(Ga.scopes||(Ga.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let n,o;if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].pause();for(n=0,o=this.effects.length;n<o;n++)this.effects[n].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let n,o;if(this.scopes)for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].resume();for(n=0,o=this.effects.length;n<o;n++)this.effects[n].resume()}}run(n){if(this._active){const o=Ga;try{return Ga=this,n()}finally{Ga=o}}}on(){++this._on===1&&(this.prevScope=Ga,Ga=this)}off(){if(this._on>0&&--this._on===0){if(Ga===this)Ga=this.prevScope;else{let n=Ga;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 o,r;for(o=0,r=this.effects.length;o<r;o++)this.effects[o].stop();for(this.effects.length=0,o=0,r=this.cleanups.length;o<r;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,r=this.scopes.length;o<r;o++)this.scopes[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!n){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function pw(){return Ga}let Xt;const Ec=new WeakSet;class Hm{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,Ga&&(Ga.active?Ga.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ec.has(this)&&(Ec.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Jm(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,zp(this),Ym(this);const n=Xt,o=Cn;Xt=this,Cn=!0;try{return this.fn()}finally{Xm(this),Xt=n,Cn=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Sv(n);this.deps=this.depsTail=void 0,zp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ec.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ev(this)&&this.run()}get dirty(){return ev(this)}}let Qm=0,_s,ks;function Jm(e,n=!1){if(e.flags|=8,n){e.next=ks,ks=e;return}e.next=_s,_s=e}function $v(){Qm++}function Cv(){if(--Qm>0)return;if(ks){let n=ks;for(ks=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;_s;){let n=_s;for(_s=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(r){e||(e=r)}n=o}}if(e)throw e}function Ym(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function Xm(e){let n,o=e.depsTail,r=o;for(;r;){const s=r.prevDep;r.version===-1?(r===o&&(o=s),Sv(r),mw(r)):n=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=n,e.depsTail=o}function ev(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(Zm(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function Zm(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cs)||(e.globalVersion=Cs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ev(e))))return;e.flags|=2;const n=e.dep,o=Xt,r=Cn;Xt=e,Cn=!0;try{Ym(e);const s=e.fn(e._value);(n.version===0||Zn(s,e._value))&&(e.flags|=128,e._value=s,n.version++)}catch(s){throw n.version++,s}finally{Xt=o,Cn=r,Xm(e),e.flags&=-3}}function Sv(e,n=!1){const{dep:o,prevSub:r,nextSub:s}=e;if(r&&(r.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=r,e.nextSub=void 0),o.subs===e&&(o.subs=r,!r&&o.computed)){o.computed.flags&=-5;for(let c=o.computed.deps;c;c=c.nextDep)Sv(c,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function mw(e){const{prevDep:n,nextDep:o}=e;n&&(n.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=n,e.nextDep=void 0)}let Cn=!0;const eg=[];function to(){eg.push(Cn),Cn=!1}function ao(){const e=eg.pop();Cn=e===void 0?!0:
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Es(e,n,o,r){try{return r?e(...r):e()}catch(s){Bs(s,n,o)}}function un(e,n,o,r){if(st(e)){const s=Es(e,n,o,r);return s&&Wm(s)&&s.catch(c=>{Bs(c,n,o)}),s}if(Qe(e)){const s=[];for(let c=0;c<e.length;c++)s.push(un(e[c],n,o,r));return s}}function Bs(e,n,o,r=!0){const s=n?n.vnode:null,{errorHandler:c,throwUnhandledErrorInProduction:m}=n&&n.appContext.config||Ht;if(n){let b=n.parent;const _=n.proxy,I=`https://vuejs.org/error-reference/#runtime-${o}`;for(;b;){const k=b.ec;if(k){for(let R=0;R<k.length;R++)if(k[R](e,_,I)===!1)return}b=b.parent}if(c){to(),Es(c,null,10,[e,_,I]),ao();return}}Uw(e,o,s,r,m)}function Uw(e,n,o,r=!0,s=!1){if(s)throw e;console.error(e)}const fl=[];let Jn=-1;const Ar=[];let vi=null,Ir=0;const ug=Promise.resolve();let Hu=null;function $a(e){const n=Hu||ug;return e?n.then(this?e.bind(this):e):n}function Fw(e){let n=Jn+1,o=fl.length;for(;n<o;){const r=n+o>>>1,s=fl[r],c=Is(s);c<e||c===e&&s.flags&2?n=r+1:o=r}return n}function Rv(e){if(!(e.flags&1)){const n=Is(e),o=fl[fl.length-1];!o||!(e.flags&2)&&n>=Is(o)?fl.push(e):fl.splice(Fw(n),0,e),e.flags|=1,dg()}}function dg(){Hu||(Hu=ug.then(vg))}function Vw(e){Qe(e)?Ar.push(...e):vi&&e.id===-1?vi.splice(Ir+1,0,e):e.flags&1||(Ar.push(e),e.flags|=1),dg()}function Qp(e,n,o=Jn+1){for(;o<fl.length;o++){const r=fl[o];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;fl.splice(o,1),o--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function cg(e){if(Ar.length){const n=[...new Set(Ar)].sort((o,r)=>Is(o)-Is(r));if(Ar.length=0,vi){vi.push(...n);return}for(vi=n,Ir=0;Ir<vi.length;Ir++){const o=vi[Ir];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}vi=null,Ir=0}}const Is=e=>e.id==null?e.flags&2?-1:1/0:e.id;function vg(e){try{for(Jn=0;Jn<fl.length;Jn++){const n=fl[Jn];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Es(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Jn<fl.length;Jn++){const n=fl[Jn];n&&(n.flags&=-2)}Jn=-1,fl.length=0,cg(),Hu=null,(fl.length||Ar.length)&&vg()}}let al=null,fg=null;function Qu(e){const n=al;return al=e,fg=e&&e.type.__scopeId||null,n}function ya(e,n=al,o){if(!n||e._n)return e;const r=(...s)=>{r._d&&Xu(-1);const c=Qu(n);let m;try{m=e(...s)}finally{Qu(c),r._d&&Xu(1)}return m};return r._n=!0,r._c=!0,r._d=!0,r}function Ie(e,n){if(al===null)return e;const o=pd(al),r=e.dirs||(e.dirs=[]);for(let s=0;s<n.length;s++){let[c,m,b,_=Ht]=n[s];c&&(st(c)&&(c={mounted:c,updated:c}),c.deep&&So(m),r.push({dir:c,instance:o,value:m,oldValue:void 0,arg:b,modifiers:_}))}return e}function Oi(e,n,o,r){const s=e.dirs,c=n&&n.dirs;for(let m=0;m<s.length;m++){const b=s[m];c&&(b.oldValue=c[m].value);let _=b.dir[r];_&&(to(),un(_,o,8,[e.el,b,e,n]),ao())}}function jw(e,n){if(tl){let o=tl.provides;const r=tl.parent&&tl.parent.provides;r===o&&(o=tl.provides=Object.create(r)),o[e]=n}}function Uu(e,n,o=!1){const r=fd();if(r||Rr){let s=Rr?Rr._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return o&&st(n)?n.call(r&&r.proxy):n}}const Kw=Symbol.for("v-scx"),Gw=()=>Uu(Kw);function rt(e,n,o){return pg(e,n,o)}function pg(e,n,o=Ht){const{immediate:r,deep:s,flush:c,once:m}=o,b=Aa({},o),_=n&&r||!n&&c!=="post";let I;if(Nr){if(c==="sync"){const N=Gw();I=N.__watcherHandles||(N.__watcherHandles=[])}else if(!_){const N=()=>{};return N.stop=eo,N.resume=eo,N.pause=eo,N}}const k=tl;b.call=(N,B,T)=>un(N,k,B,T);let R=!1;c==="post"?b.scheduler=N=>{Cl(N,k&&k.suspense)}:c!=="sync"&&(R=!0,b.scheduler=(N,B)=>{B?N():Rv(N)}),b.augmentJob=N=>{n&&(N.flags|=4),R&&(N.flags|=2,k&&(N.id=k.uid,N.i=k))};const O=Ww(e,n,b);return Nr&&(I?I.push(O):_&&O()),O}function zw(e,n,o){const r=this.proxy,s=ca(e)?e.includes(".")?mg(r,e):()=>r[e]:e.bind(r,r);let c;st(n)?c=n:(c=n.handler,o=n);const m=Ts(this),b=pg(s,c.bind(r),o);return m(),b}function mg(e,n){const o=n.split(".");return()=>{let r=e;for(let s=0;s<o.length&&r;s++)r=r[o[s]];return r}}const Hw=Symbol("_vte"),gg=e=>e.__isTeleport,nn=Symbol("_leaveCb"),ds=Symbol("_enterCb");function yg(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingV
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let dv;const cm=typeof window<"u"&&window.trustedTypes;if(cm)try{dv=cm.createPolicy("vue",{createHTML:e=>e})}catch{}const Gg=dv?e=>dv.createHTML(e):e=>e,Qh="http://www.w3.org/2000/svg",Jh="http://www.w3.org/1998/Math/MathML",wo=typeof document<"u"?document:null,vm=wo&&wo.createElement("template"),Yh={insert:(e,n,o)=>{n.insertBefore(e,o||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,o,r)=>{const s=n==="svg"?wo.createElementNS(Qh,e):n==="mathml"?wo.createElementNS(Jh,e):o?wo.createElement(e,{is:o}):wo.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>wo.createTextNode(e),createComment:e=>wo.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wo.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,o,r,s,c){const m=o?o.previousSibling:n.lastChild;if(s&&(s===c||s.nextSibling))for(;n.insertBefore(s.cloneNode(!0),o),!(s===c||!(s=s.nextSibling)););else{vm.innerHTML=Gg(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const b=vm.content;if(r==="svg"||r==="mathml"){const _=b.firstChild;for(;_.firstChild;)b.appendChild(_.firstChild);b.removeChild(_)}n.insertBefore(b,o)}return[m?m.nextSibling:n.firstChild,o?o.previousSibling:n.lastChild]}},ri="transition",cs="animation",Tr=Symbol("_vtc"),zg={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},Hg=Aa({},bg,zg),Xh=e=>(e.displayName="Transition",e.props=Hg,e),Ya=Xh((e,{slots:n})=>zh(Jw,Qg(e),n)),Wi=(e,n=[])=>{Qe(e)?e.forEach(o=>o(...n)):e&&e(...n)},fm=e=>e?Qe(e)?e.some(n=>n.length>1):e.length>1:!1;function Qg(e){const n={};for(const F in e)F in zg||(n[F]=e[F]);if(e.css===!1)return n;const{name:o="v",type:r,duration:s,enterFromClass:c=`${o}-enter-from`,enterActiveClass:m=`${o}-enter-active`,enterToClass:b=`${o}-enter-to`,appearFromClass:_=c,appearActiveClass:I=m,appearToClass:k=b,leaveFromClass:R=`${o}-leave-from`,leaveActiveClass:O=`${o}-leave-active`,leaveToClass:N=`${o}-leave-to`}=e,B=Zh(s),T=B&&B[0],z=B&&B[1],{onBeforeEnter:V,onEnter:G,onEnterCancelled:j,onLeave:X,onLeaveCancelled:J,onBeforeAppear:Ce=V,onAppear:de=G,onAppearCancelled:ve=j}=n,K=(F,we,te,ee)=>{F._enterCancelled=ee,di(F,we?k:b),di(F,we?I:m),te&&te()},w=(F,we)=>{F._isLeaving=!1,di(F,R),di(F,N),di(F,O),we&&we()},L=F=>(we,te)=>{const ee=F?de:G,ae=()=>K(we,F,te);Wi(ee,[we,ae]),pm(()=>{di(we,F?_:c),Qn(we,F?k:b),fm(ee)||mm(we,r,T,ae)})};return Aa(n,{onBeforeEnter(F){Wi(V,[F]),Qn(F,c),Qn(F,m)},onBeforeAppear(F){Wi(Ce,[F]),Qn(F,_),Qn(F,I)},onEnter:L(!1),onAppear:L(!0),onLeave(F,we){F._isLeaving=!0;const te=()=>w(F,we);Qn(F,R),F._enterCancelled?(Qn(F,O),cv(F)):(cv(F),Qn(F,O)),pm(()=>{F._isLeaving&&(di(F,R),Qn(F,N),fm(X)||mm(F,r,z,te))}),Wi(X,[F,te])},onEnterCancelled(F){K(F,!1,void 0,!0),Wi(j,[F])},onAppearCancelled(F){K(F,!0,void 0,!0),Wi(ve,[F])},onLeaveCancelled(F){w(F),Wi(J,[F])}})}function Zh(e){if(e==null)return null;if(Lt(e))return[Oc(e.enter),Oc(e.leave)];{const n=Oc(e);return[n,n]}}function Oc(e){return ow(e)}function Qn(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[Tr]||(e[Tr]=new Set)).add(n)}function di(e,n){n.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const o=e[Tr];o&&(o.delete(n),o.size||(e[Tr]=void 0))}function pm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let e0=0;function mm(e,n,o,r){const s=e._endId=++e0,c=()=>{s===e._endId&&r()};if(o!=null)return setTimeout(c,o);const{type:m,timeout:b,propCount:_}=Jg(e,n);if(!m)return r();const I=m+"end";let k=0;const R=()=>{e.removeEventListener(I,O),c()},O=N=>{N.target===e&&++k>=_&&R()};setTimeout(()=>{k<_&&R()},b+1),e.addEventListener(I,O)}function Jg(e,n){const o=window.getComputedStyle(e),r=B=>(o[B]||"").split(", "),s=r(`${ri}Delay`),c=r(`${ri}Duration`),m=gm(s,c)
`)}function m(O,N){const B=Array.from(new Set(N.replace(/,/g,",").split(/[\n,]/).map(T=>T.trim()).filter(Boolean)));r("update:modelValue",{...o.modelValue,[O]:B})}function b(O,N){r("update:modelValue",{...o.modelValue,[O]:N})}const _=M(()=>s("group_allowlist").length),I=M(()=>s("user_allowlist").length),k=M(()=>s("adult_group_allowlist").length),R=M(()=>s("adult_user_allowlist").length);return(O,N)=>(d(),f("section",L8,[N[24]||(N[24]=qv('<div class="intro" data-v-a4139693><span data-v-a4139693>AstrBot 聊天指令</span><strong data-v-a4139693>群聊与用户白名单</strong><p data-v-a4139693>每行填写一个平台提供的群聊 ID 或用户 ID,也支持用逗号分隔。白名单为空时不会放行对应条件。</p></div><div class="rules" data-v-a4139693><article data-v-a4139693><b data-v-a4139693>快速角色 / 角色工作流</b><strong data-v-a4139693>群聊命中 + 用户命中</strong><p data-v-a4139693>两个白名单必须同时命中才允许使用,避免群内未授权成员启动完整工作流。</p></article><article data-v-a4139693><b data-v-a4139693>单图生成</b><strong data-v-a4139693>群聊命中 或 用户命中</strong><p data-v-a4139693>任意一个白名单命中即可使用;用户白名单也可以在私聊中放行单图。</p></article></div>',2)),a("div",q8,[a("label",null,[a("span",null,[N[10]||(N[10]=dt("群聊白名单 ",-1)),a("em",null,u(_.value)+" 项",1)]),a("textarea",{value:c("group_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个群聊 ID
例如:123456789`,onInput:N[0]||(N[0]=B=>m("group_allowlist",B.target.value))},null,40,O8),N[11]||(N[11]=a("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),a("label",null,[a("span",null,[N[12]||(N[12]=dt("用户白名单 ",-1)),a("em",null,u(I.value)+" 项",1)]),a("textarea",{value:c("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
例如:987654321`,onInput:N[1]||(N[1]=B=>m("user_allowlist",B.target.value))},null,40,D8),N[13]||(N[13]=a("small",null,"使用 AstrBot 事件返回的平台用户 ID,不使用昵称。",-1))])]),N[25]||(N[25]=a("div",{class:"adult-intro"},[a("div",null,[a("span",null,"成人内容独立授权"),a("strong",null,"必须同时通过内容审核与成人白名单")]),a("p",null,"这些名单不会放宽恐怖主义、高危暴力、现实伤害或其他禁止内容。群聊内要求成人群聊与成人用户同时命中;私聊要求成人用户命中。")],-1)),a("div",W8,[a("label",null,[a("span",null,[N[14]||(N[14]=dt("成人内容群聊白名单 ",-1)),a("em",null,u(k.value)+" 项",1)]),a("textarea",{value:c("adult_group_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的群聊 ID",onInput:N[2]||(N[2]=B=>m("adult_group_allowlist",B.target.value))},null,40,U8),N[15]||(N[15]=a("small",null,"仅影响通过审核的 adult_allowed 内容。",-1))]),a("label",null,[a("span",null,[N[16]||(N[16]=dt("成人内容用户白名单 ",-1)),a("em",null,u(R.value)+" 项",1)]),a("textarea",{value:c("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:N[3]||(N[3]=B=>m("adult_user_allowlist",B.target.value))},null,40,F8),N[17]||(N[17]=a("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),a("div",V8,[a("label",null,[N[18]||(N[18]=a("span",null,"用户并发上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.user_concurrency_limit||2),disabled:e.disabled,onInput:N[4]||(N[4]=B=>b("user_concurrency_limit",Number(B.target.value)))},null,40,j8)]),a("label",null,[N[19]||(N[19]=a("span",null,"群聊并发上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.group_concurrency_limit||5),disabled:e.disabled,onInput:N[5]||(N[5]=B=>b("group_concurrency_limit",Number(B.target.value)))},null,40,K8)]),a("label",null,[N[20]||(N[20]=a("span",null,"用户每日生成上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.daily_user_generation_limit||30),disabled:e.disabled,onInput:N[6]||(N[6]=B=>b("daily_user_generation_limit",Number(B.target.value)))},null,40,G8)]),a("label",null,[N[21]||(N[21]=a("span",null,"群聊每日生成上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.daily_group_generation_limit||100),disabled:e.disabled,onInput:N[7]||(N[7]=B=>b("daily_group_generation_limit",Number(B.target.value)))},null,40,z8)]),a("label",H8,[a("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:N[8]||(N[8]=B=>b("allow_2k",B.target.checked))},null,40,Q8),N[22]||(N[22]=a("span",null,"允许聊天使用 2K",-1))]),a("label",J8,[a("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:N[9]||(N[9]=B=>b("allow_4k",B.target.checked))},null,40,Y8),N[23]||(N[23]=a("span",null,"允许聊天使用 4K",-1))])])]))}}),Z8=va(X8,[["__scopeId","data-v-a4139693"]]),eM={class:"governance"},tM={class:"preview-card"},aM=["disabled"],lM={class:"preview-choice"},nM={key:1,class:"preview-error"},oM={key:2,class:"preview-result"},iM={class:"card"},rM={class:"switch"},sM=["checked","disabled"],uM={class:"route-pair source-pair"},dM=["value","disabled"],cM=["value"],vM=["value"],fM=["value","disabled"],pM=["value"],mM=["value"],gM={class:"grid"},yM=["value","disabled"],bM={class:"entries"},_M=["checked","disabled","onChange"],kM={class:"card"},wM={class:"switch"},hM=["checked","disabled"],$M={class:"route-pair source-pair"},CM=["value","disabled"],SM=["value"],IM=["value"],PM=["value","disabled"],xM=["value"],AM=["value"],MM={class:"grid"},RM=["value","disabled"],EM={class:"card routing"},BM={class:"switch"},NM=["checked","disabled"],TM={class:"route-pair"},LM=["value","disabled"],qM=["value"],OM=["value","disabled"],DM=["value"],WM={class:"entries"},UM=["checked","disabled","onChange"],FM={class:"card"},VM={class:"switch"},jM=["checked","disabled"],KM={class:"route-pair source-pair"},GM=["value","disabled
`)}function yc(t){const l=pt.value,i=Ge.value;return{source:"standalone_web_workflow_chat",ui_node_id:ft.value,ui_node_title:l.title,ui_node_phase:l.phase,ui_node_status:l.status,profile_id:i.profileId,profile_name:i.name,workflow_id:i.workflowId,source_language:"auto",target_prompt_language:"en",translation_mode:"backend_llm",user_instruction:t,persona_split_fields_ready:su.value,persona_split_fields_total:ru.value,selected_material_ids:nc(),selected_draft_image_ids:Bl.value.filter(Tl).map(v=>v.image_id),candidate_feedback:Ra.value}}function v1(t){var p;const l=t.interpretation;if(!l)return"候选反馈已保存。";const i=[],v=[["喜欢",l.liked],["拒绝",l.rejected],["严格拒绝",l.strict_rejected]];for(const[y,h]of v)h.length&&i.push(`${y} ${h.map(E=>E.display_code).join("、")}`);return(p=l.final)!=null&&p.display_code&&i.push(`待定稿 ${l.final.display_code}`),l.positive_patch&&i.push("已生成正向调整"),l.negative_patch&&i.push("已生成负向约束"),l.material_intent&&i.push(`素材意图:${l.material_intent}`),i.length?i.join(";"):"下一轮调整要求已保存。"}async function np(t){var i,v,p;const l=_t.value;if(!Pa.value||!l||l.legacy||!l.candidates.length)return"not_applicable";if(ou.value)return lt.value="该轮次已经确认;如需继续修改,请先从当前节点创建分支。","blocked";He.value=!0,lt.value="",pn.value="";try{const y=await xe(W.roundFeedback(l.round.round_id),{feedback_text:t,idempotency_key:`web-round-feedback-text-${l.round.round_id}-${Date.now()}`});ei(l.round.node_id,y);const h=v1(y);return pn.value=`${h} 点击“开始新一轮”后会使用这些反馈。`,qe.value=h,Ye.value=t,Xi.value=(v=(i=y.interpretation)==null?void 0:i.metadata)!=null&&v.model_route?`候选反馈 / ${String(y.interpretation.metadata.model_route)}`:`候选反馈 / ${((p=y.interpretation)==null?void 0:p.source)||"确定性解释"}`,Mt.value="","saved"}catch(y){return lt.value=`候选反馈理解失败:${De(y)}`,qe.value=lt.value,"failed"}finally{He.value=!1}}async function f1(){const t=Mt.value.trim();if(!t||He.value||await np(t)!=="not_applicable")return;if(Pa.value&&!Ho.value.route){qe.value="当前节点和后端默认均未提供生图路由,请先显式覆盖或前往设置配置。";return}await Pu({promptPatch:gc(t),metadata:yc(t)})&&(Ye.value=t,Xi.value=`${pt.value.title} / ${qd.value||"后端自动"}`)}function op(){!Fa.value||!Oa(Fa.value)||(Ks.value="generation",Ll("imageViewer"),_c(),Lo.value=!0)}function Su(t){const l=(t?Kd.value.find(i=>i.image_id===t):null)??Wn.value;!l||!Oa(l)||(se.value=!1,oe.value=l.image_id,op())}function ip(){Bl.value.length<2||(se.value=!0)}function p1(t){return{configure_distinct_generation_cross_review_routes:"请在设置页配置至少一个与主候选不同的生图模型",configure_image_generation_route:"请先配置并启用可用的生图模型路由",regenerate_primary_candidate_with_configured_route:"主候选缺少可复用的模型路由,请先重新生成主候选",retry_or_remove_failed_review_candidate:"当前审查轮次存在失败候选,请重试失败项后再继续",select_review_candidates:"请至少勾选一个需要重新生成的审查候选",open_active_cross_review:"该节点已有进行中的交叉审查,请打开当前审查轮次",create_branch:"当前节点已锁定或工作流已封存,请先创建可编辑分支"}[t]||t.replace(/_/g," ")}function Iu(t,l){const i=De(t),v=t instanceof Za?Te(t.details,"required_action"):"";return v?`${i};建议操作:${p1(v)}。`:`${l}:${i}`}async function m1(){var i;const t=_t.value;if(!t||t.legacy||!Pa.value)return;const l=t.round.round_id;rl.value=!0,Nn.value="";try{const v=await Me(W.round(l));if(((i=_t.value)==null?void 0:i.round.round_id)!==l)return;ei(v.round.node_id,v,{select:!0}),mn.value=v,wi.value=!0}catch(v){lt.value=Iu(v,"交叉审查轮次加载失败")}finally{rl.value=!1}}function g1(){rl.value||(wi.value=!1,Nn.value="")}function y1(t){var i;const l=(i=t.image)==null?void 0:i.image_id;l&&Su(l)}function bc(t){ei(t.round.node_id,t,{select:!0}),mn.val
${p.trim()}`).join(`
`)}function R1(t){const l=Li(t),i=(...y)=>{for(const h of y){const E=l.find(ne=>ci(ne.node_key)===h);if(E!=null&&E.selected_image_id)return E.selected_image_id}return""},v={avatar:i("headshot"),persona_image:i("design_sheet","turnaround"),standing:i("full_body"),pv:i("style_lock")},p=Object.entries(v).filter(([,y])=>!y).map(([y])=>y);if(p.length){const y={avatar:"头像(头像草稿)",persona_image:"人设图(设定图或三视图)",standing:"立绘(全身设定)",pv:"PV 图(高清修复与统一风格)"};return qe.value=`档案卡还缺少已明确采用的资产:${p.map(h=>y[h]).join("、")}。请回到对应节点确认一张候选图。`,null}return v}function E1(t){if(!(t instanceof Za))return`档案卡封存失败:${De(t)}`;const l=[],i=t.details.incomplete_node_keys;Array.isArray(i)&&i.length&&l.push(`未完成节点:${i.map(String).join("、")}`);const v=Te(t.details,"asset_role");v&&l.push(`资产角色:${v}`);const p=Te(t.details,"active_branch")||Te(t.details,"branch_name");p&&l.push(`当前分支:${p}`);const y=Te(t.details,"status");y&&l.push(`工作流状态:${y}`);const h=l.length?`(${l.join(";")})`:"";return`档案卡封存失败:${t.message}${h}`}async function B1(){const t=Ge.value;if(!t||He.value)return;const l=aa("建立档案卡");if(l){qe.value=l;return}if(!t.workflowId||!t.profileId){qe.value="请先保存角色并创建详细角色工作流,再建立档案卡。";return}const i=t.workflowId,v=St.value[i],p=(v==null?void 0:v.current_branch)||"main",y=R1(i);if(!y)return;const h=M1(t);if(!h){qe.value="档案卡缺少人设文档,请先完成角色设定拆解。";return}const E={idempotency_key:`web-profile-card-${i}-${gu(p)}`,persona_document:h,assets:y,metadata:{source:"standalone_web_profile_card",schema_version:"character_profile_card_v1",profile_id:t.profileId,profile_name:t.name,workflow_id:i,branch_name:p,selected_material_ids:nc()}};He.value=!0,qe.value="";try{const ne=await xe(W.workflowFinalizeCard(i),E);Vr.value={...Vr.value,[t.profileId]:[ne,...(Vr.value[t.profileId]??[]).filter(Pe=>Pe.card_id!==ne.card_id)]},_i.value=ne.created_at,await xu(t,i,"archive");const[ce]=await Promise.allSettled([Me(W.profileCards(t.profileId)),Yd(),sl(),_l()]);ce.status==="fulfilled"&&(Vr.value={...Vr.value,[t.profileId]:ce.value}),Fn("archive"),qe.value=`档案卡已原子封存:${hl(ne.card_id)} / ${ne.branch_name},4 类必填资产均已入库。`}catch(ne){qe.value=E1(ne)}finally{He.value=!1}}async function wc(t){const l=Ge.value,i=l==null?void 0:l.workflowId;if(!i||Qa.value)return;const v=t==="start"?"启动":t==="cancel"?"取消":"归档";if(t==="start"&&!lu.value){En.value="请先在第一个节点导入粗略人设;导入成功后工作流会自动启动。";return}if(!(t!=="start"&&!window.confirm(`确定${v}当前工作流吗?`))){Qa.value=!0,En.value="";try{const p=t==="start"?W.workflowStart(i):t==="cancel"?W.workflowCancel(i):W.workflowArchive(i),y=await xe(p);St.value={...St.value,[i]:y},En.value=`工作流已${v}`}catch(p){En.value=De(p)}finally{Qa.value=!1}}}async function N1(){var l;const t=(l=Ge.value)==null?void 0:l.workflowId;if(t){Qa.value=!0;try{er.value=await Me(W.workflowReview(t)),En.value="整体审查已完成"}catch(i){En.value=De(i)}finally{Qa.value=!1}}}async function fp(){var i;const t=(i=tt.value)==null?void 0:i.node_id;if(!t)return;Qa.value=!0;const l=await vc(t,!0);En.value=l?"依赖上下文已刷新":$e.value,Qa.value=!1}function rs(t){return bl.value?`${t}暂不可用:${vo.value}`:Dn.value?`${t}已被锁定:${Jo.value}`:""}function T1(t){return`branch_${(t.node_key||t.node_id).replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,28)}_${Date.now().toString(36)}`}async function pp(t,l,i,v={}){const p=await xe(W.workflowSwitchBranch(l),{branch_name:i}),y=await Me(W.workflowNodes(l)),h=y.filter(ce=>ce.branch_name===p.current_branch);$t.value={...$t.value,[l]:y},St.value={...St.value,[l]:p},Ti(t,p,h.length?h:y);const E=(v.copiedFromNodeId?h.find(ce=>Te(ce.metadata,"copied_from_node_id")===v.copiedFromNodeId):void 0)??(v.preferredUiNodeId?h
`)}}function Au(t,l,i,v,p){return{id:t,title:l,prompt:i,negative:v,weight_suggestions:[{label:"identity",value:1.25,reason:"keep character identity stable"},{label:"style",value:.85,reason:"avoid overfitting style over identity"}],inherits:p,status:"ready"}}function Q1(t){const l=El.value,i=N.map((v,p)=>{const y=l.find(h=>h.category===v.category);return{id:`rule_${v.category}_${p+1}`,category:v.category,material_id:lc(y==null?void 0:y.id),material_label:(y==null?void 0:y.label)??"",material_group:(y==null?void 0:y.group)??(y==null?void 0:y.category)??"",material_prompt:(y==null?void 0:y.prompt)??"",material_colors:(y==null?void 0:y.colors)??[],bind_to_stages:yp(v.category),inheritance_rule:y?`${v.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:y?bp(v.category):"弱",required:!!(y&&["风格","服装"].includes(v.category)),status:y?"ready":"pending"}});return{profile_id:t.profileId,profile_name:t.name,selected_material_ids:nc(),rules:i}}function yp(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 bp(t){return t==="风格"||t==="服装"?"强":t==="构图"?"中":"弱"}async function J1(){var i;const t=Ge.value;if(!t||Eo.value)return;const l=aa("保存快照");if(l){io.value=l;return}if(!t.workflowId){io.value="请先生成档案并创建后端工作流,再保存快照。";return}Eo.value=!0,io.value="";try{const v=await xe(W.workflowHistory(t.workflowId),{action:"save_version",title:`${t.name} / ${((i=pt.value)==null?void 0:i.title)??"工作流快照"}`,node_id:ti(ft.value,t),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:ft.value,profile_id:t.profileId,profile_name:t.name,profile_status:t.status}});_i.value=v.created_at}catch(v){io.value=`保存快照失败:${De(v)}`}finally{Eo.value=!1}}function ti(t,l){if(!l.workflowId)return;const v=Li(l.workflowId).find(y=>wn(y)===t);if(v)return v.node_id;const p=l.workflowNodeIds??[];if(t!=="brief-import"&&t==="persona-split")return p[0]}function Li(t){var v;const l=$t.value[t]??[],i=(v=St.value[t])==null?void 0:v.current_branch;return i?l.filter(p=>p.branch_name===i):l}function Y1(t){const l=uu.value;if(l&&(!t||l.node_id===t))return[l.image_id];if(!t)return[];const i=(la.value[t]??[]).find(v=>{var p;return v.image_id===((p=On.value.find(y=>y.node_id===t))==null?void 0:p.selected_image_id)});return i&&Tl(i)?[i.image_id]:[]}function Tl(t){const l="metadata"in t&&t.metadata&&typeof t.metadata=="object"?t.metadata:{},i=l.mock===!0||l.mock===1||l.mock==="true",v=Object.prototype.hasOwnProperty.call(l,"provider_error")&&l.provider_error!=null,p=l.fallback_used===!0||l.degraded===!0;return!i&&!v&&!p}async function X1(){if(!ef.value||bi.value)return;const t=aa("生成档案");if(t){Ro.value=t;return}Ls.value+=1;const l=lk(Ke.value,Ls.value);bi.value=!0,Ro.value="";try{const i=await xe(W.quickProfileDraft,Z1(l,Ke.value,ml.value)),v={...l,name:i.profile_preview.name||l.name,style:i.profile_preview.style_prompt||l.style,negative:i.profile_preview.negative_prompt||l.negative},p=await xe(W.quickProfileDraftSave,ek(v,Ke.value,ml.value,i)),h={...tk(p,v),status:"文本档案已保存"};gl.value=[h,...gl.value.filter(E=>E.id!==h.id)],ba.value=[p.profile,...ba.value.filter(E=>E.profile_id!==p.profile.profile_id)],fa.value={...fa.value,[p.profile.profile_id]:p.workflow?[p.workflow]:[]},bu(h),P.value="quickProfile",
<svg xmlns="http://www.w3.org/2000/svg" width="${mt}" height="${Le}" viewBox="0 0 ${mt} ${Le}" preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="${y}" />
<stop offset="58%" stop-color="${h}" />
<stop offset="100%" stop-color="#111827" />
</linearGradient>
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
<stop offset="0%" stop-color="${E}" stop-opacity="0.82" />
<stop offset="100%" stop-color="${E}" stop-opacity="0" />
</radialGradient>
<pattern id="grid" width="${Nt}" height="${Nt}" patternUnits="userSpaceOnUse">
<path d="M${Nt} 0H0V${Nt}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
</pattern>
</defs>
<rect width="${mt}" height="${Le}" fill="url(#bg)" />
<rect width="${mt}" height="${Le}" fill="url(#grid)" />
<circle cx="${jn}" cy="${ni}" r="${Kn}" fill="url(#halo)" />
<circle cx="${oi}" cy="${Gn}" r="${A}" fill="#ffffff" opacity="0.11" />
<rect x="${Jt}" y="${Jt}" width="${Xl}" height="${Ka}" rx="${dl}" fill="#ffffff" opacity="0.14" />
<rect x="${ka}" y="${ka}" width="${kl}" height="${Zl}" rx="${Math.round(dl*.72)}" fill="#0f172a" opacity="0.24" />
<text x="${ka+Math.round(gt*.035)}" y="${xa}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${wa}" font-weight="700">IMAGESTUDIO · 未生成 ${ne}</text>
<text x="${ka+Math.round(gt*.035)}" y="${cl}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${D}" font-weight="800">${ce}</text>
<text x="${ka+Math.round(gt*.035)}" y="${Va}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${nt}">${Pe}</text>
<text x="${Ee}" y="${xa+Math.round(gt*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${ja}" font-weight="900">${ne}</text>
<text x="${mt-Jt}" y="${Le-Math.round(Jt*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(gt*.027))}" font-weight="800">${Re}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(Rt)}`}function Fp(t){return t.replace(/[&<>"']/g,l=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[l]??l)}function ul(t){return"title"in t&&t.title?t.title:t.node_id||t.workflow_id||t.profile_id||hl(t.image_id)}function Oa(t){return Yl(t.thumbnail_url)||Yl(t.image_url)}function Yl(t){const l=String(t||"").trim();if(!l)return"";const i=jk(l);if(!i)return l;const v=Be.value[l];if(v)return v;if(!Fe.has(l)){const p=Kk(l,i).finally(()=>{Fe.delete(l)});Fe.set(l,p)}return Du()==="plugin-bridge"?"":l}function jk(t){var l;try{const i=new URL(t,window.location.origin);return i.pathname.endsWith("/media/fetch")&&((l=i.searchParams.get("token"))==null?void 0:l.trim())||""}catch{return""}}async function Kk(t,l){try{const i=await Me(W.mediaPayload,{token:l}),v=String(i.body_base64||"");if(!v)return;const p=v.replace(/-/g,"+").replace(/_/g,"/"),y=p.padEnd(Math.ceil(p.length/4)*4,"="),h=window.atob(y),E=new Uint8Array(h.length);for(let ce=0;ce<h.length;ce+=1)E[ce]=h.charCodeAt(ce);const ne=URL.createObjectURL(new Blob([E],{type:i.content_type||"application/octet-stream"}));at.add(ne),Be.value={...Be.value,[t]:ne}}catch(i){console.warn("ImageStudio media bridge failed",i)}}function Gk(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(i=>["text_to_image","image_generation","workflow_graph"].includes(i)))}function zk(t,l,i){return Math.max(l,Math.min(i,t))}function Hk(){try{const t=localStorage.getItem(Ql.theme);(t==="light"||t==="dark")&&(Tn.value=t),No.value=localStorage.getItem(Ql.primary)||No.value,To.value=localStorage.getItem(Ql.accent)||To.value;const l=localStorage.getItem(Ql.navigationPinned);yn.value=l===null||l==="true",Gl.value=Vp(localStorage.getItem(Ql.readNotifications)),or.value=Vp(localStorage.getItem(Ql.dismissedNotifications))}catch{}lr.value=yn.value}function Qk(){try{localStorage.setItem(Ql.theme,Tn.value),localStorage.setItem(Ql.primary,No.value),localStorage.setItem(Ql.accent,To.value),localStorage.setItem(Ql.navigationPinned,String(yn.value)),localStorage.setItem(Ql.readNotifications,JSON.stringify(Gl.value)),localStorage.setItem(Ql.dismissedNotifications,JSON.stringify(or.value))}catch{}}function Vp(t){if(!t)return[];try{const l=JSON.parse(t);return Array.isArray(l)?l.filter(i=>typeof i=="string"):[]}catch{return[]}}function bo(t,l){const i=xc(t);return i?`rgba(${i.r}, ${i.g}, ${i.b}, ${l})`:`rgba(118, 104, 232, ${l})`}function Ic(t,l,i){const v=xc(t),p=xc(l);if(!v||!p)return t;const y=Math.min(1,Math.max(0,i));return`#${Pc(v.r*(1-y)+p.r*y)}${Pc(v.g*(1-y)+p.g*y)}${Pc(v.b*(1-y)+p.b*y)}`}function Pc(t){return Math.round(t).toString(16).padStart(2,"0")}function xc(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 Te(t,l){const i=t==null?void 0:t[l];return typeof i=="string"?i:""}function Jk(t){return!ga(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:ga(t.request)?t.request:void 0,result:ga(t.result)?t.result:void 0,metadata:ga(t.metadata)?t.metadata:void 0,error_message:typeof t.error_message=="string"?t.error_message:null}}function Yk(t){return!!t}function ga(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function Xk(t){return $l(t,
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
避雷:低质量、结构错误`},null,512),[[Ve,Wl.value]])]),a("aside",iT,[a("header",null,[a("div",null,[l[166]||(l[166]=a("span",null,"识别预览",-1)),a("strong",null,u(py.value)+" / "+u(Id.value.length),1)]),a("em",null,u(sr.value?`${sr.value.length} 字`:"待粘贴"),1)]),a("dl",null,[(d(!0),f(Y,null,ie(Id.value,A=>(d(),f("div",{key:A.key,class:fe({pending:sr.value&&!A.recognized})},[a("dt",null,[dt(u(A.label)+" ",1),a("span",null,u(A.recognized?"已识别":"待整理"),1)]),a("dd",null,u(A.value||"粘贴文本后显示"),1)],2))),128))])])]),a("footer",null,[a("span",null,u(sr.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),a("button",{type:"button",onClick:l[36]||(l[36]=A=>ma("externalProfileImport"))},"取消"),a("button",{type:"button",disabled:!sr.value,onClick:rk}," 识别并填入问卷 ",8,rT)])])])):H("",!0)]),_:1}),Xe(Ya,{name:"viewer-fade"},{default:ya(()=>[Mn.value?(d(),f("div",sT,[a("section",uT,[a("header",null,[l[167]||(l[167]=a("div",null,[a("span",null,"快速角色"),a("strong",null,"创建角色档案问卷")],-1)),a("button",{type:"button",title:"关闭",onClick:l[37]||(l[37]=A=>ma("personaQuestionnaire"))},"×")]),a("div",dT,[a("label",null,[l[168]||(l[168]=a("span",null,"角色核心",-1)),Ie(a("textarea",{"onUpdate:modelValue":l[38]||(l[38]=A=>Ke.value.roleCore=A),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Ve,Ke.value.roleCore]])]),a("label",cT,[l[170]||(l[170]=a("span",null,"性别表现",-1)),Ie(a("select",{"onUpdate:modelValue":l[39]||(l[39]=A=>Ke.value.genderPresentation=A)},[...l[169]||(l[169]=[a("option",{value:""},"未指定",-1),a("option",{value:"female"},"女性 / Female",-1),a("option",{value:"male"},"男性 / Male",-1),a("option",{value:"androgynous"},"中性 / Androgynous",-1),a("option",{value:"nonbinary"},"非二元 / Nonbinary",-1)])],512),[[Ba,Ke.value.genderPresentation]])]),a("label",vT,[l[171]||(l[171]=a("span",null,"年龄阶段",-1)),Ie(a("input",{"onUpdate:modelValue":l[40]||(l[40]=A=>Ke.value.ageStage=A),type:"text",placeholder:"例如 adult、young adult、middle-aged"},null,512),[[Ve,Ke.value.ageStage]])]),a("label",fT,[l[172]||(l[172]=a("span",null,"物种 / 种族",-1)),Ie(a("input",{"onUpdate:modelValue":l[41]||(l[41]=A=>Ke.value.species=A),type:"text",placeholder:"例如 human、elf、android"},null,512),[[Ve,Ke.value.species]])]),a("label",pT,[l[173]||(l[173]=a("span",null,"体型",-1)),Ie(a("input",{"onUpdate:modelValue":l[42]||(l[42]=A=>Ke.value.bodyType=A),type:"text",placeholder:"例如 slim、athletic、muscular"},null,512),[[Ve,Ke.value.bodyType]])]),a("label",null,[l[174]||(l[174]=a("span",null,"显著特征",-1)),Ie(a("textarea",{"onUpdate:modelValue":l[43]||(l[43]=A=>Ke.value.distinctiveFeatures=A),rows:"3",placeholder:"伤疤、异色瞳、义体、角、纹身或固定视觉记忆点。"},null,512),[[Ve,Ke.value.distinctiveFeatures]])]),a("label",null,[l[175]||(l[175]=a("span",null,"性格关键词",-1)),Ie(a("textarea",{"onUpdate:modelValue":l[44]||(l[44]=A=>Ke.value.personality=A),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[Ve,Ke.value.personality]])]),a("label",null,[l[176]||(l[176]=a("span",null,"外观特征",-1)),Ie(a("textarea",{"onUpdate:modelValue":l[45]||(l[45]=A=>Ke.value.appearance=A),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[Ve,Ke.value.appearance]])]),a("label",null,[l[177]||(l[177]=a("span",null,"服装与配饰",-1)),Ie(a("textarea",{"onUpdate:modelValue":l[46]||(l[46]=A=>Ke.value.outfit=A),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[Ve,Ke.value.outfit]])]),a("label",null,[l[178]||(l[178]=a("span",null,"常用场景",-1)),Ie(a("textarea",{"onUpdate:modelValue":l[47]||(l[47]=A=>Ke.value.scene=A),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[Ve,Ke.value.scene]])]),a("label",null,[l[179]||(l[179]=a("span",null,"避雷内容",-1)),Ie(a("textarea",{"onUpd