astrbot_plugin_imagestudio/pages/imagestudio/assets/index-Dp4kkpJ0.js

59 行
630 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./WorkflowCompareDialog-V0r2jDOt.js","./WorkflowCompareDialog-C2cuJwjO.css","./WorkflowBranchPanel-DetPUS1s.js","./WorkflowBranchPanel-BG7oVHdw.css","./WorkflowCandidatePool-B3Yzor0_.js","./WorkflowCandidatePool-CX-xeKt7.css","./WorkflowComposer-CS6dlKai.js","./WorkflowComposer-CqjheHet.css","./WorkflowDependencyContextCard-Da-Ez1_X.js","./WorkflowDependencyContextCard-phUQBDon.css","./WorkflowGenerationReviewDialog-C8qGU8Kb.js","./WorkflowGenerationReviewDialog-DFAKFtpF.css","./WorkflowMaterialDrawer-I9etxtpw.js","./WorkflowMaterialDrawer-CrkvaAQI.css","./WorkflowRoundPanel-DulXGVhd.js","./WorkflowRoundPanel-DlXcIPll.css"])))=>i.map(i=>d[i]);
var tk=Object.defineProperty;var ak=(e,n,o)=>n in e?tk(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Mc=(e,n,o)=>ak(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 kv(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const Ht={},Pr=[],eo=()=>{},Wm=()=>!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,hv=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},lk=Object.prototype.hasOwnProperty,Tt=(e,n)=>lk.call(e,n),Qe=Array.isArray,xr=e=>Rs(e)==="[object Map]",qr=e=>Rs(e)==="[object Set]",Gp=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",Um=e=>(Lt(e)||st(e))&&st(e.then)&&st(e.catch),Fm=Object.prototype.toString,Rs=e=>Fm.call(e),nk=e=>Rs(e).slice(8,-1),Vm=e=>Rs(e)==="[object Object]",$v=e=>ca(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ys=kv(",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)))},ok=/-\w/g,$n=id(e=>e.replace(ok,n=>n.slice(1).toUpperCase())),ik=/\B([A-Z])/g,gi=id(e=>e.replace(ik,"-$1").toLowerCase()),jm=id(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rc=id(e=>e?`on${jm(e)}`:""),Zn=(e,n)=>!Object.is(e,n),Wu=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},Km=(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},rk=e=>{const n=ca(e)?Number(e):NaN;return isNaN(n)?e:n};let zp;const sd=()=>zp||(zp=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)?ck(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 sk=/;(?![^(]*\))/g,uk=/:([^]+)/,dk=/\/\*[^]*?\*\//g;function ck(e){const n={};return e.replace(dk,"").split(sk).forEach(o=>{if(o){const r=o.split(uk);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 vk="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",fk=kv(vk);function Gm(e){return!!e||e===""}function pk(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=Gp(e),r=Gp(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?pk(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 Cv(e,n){return e.findIndex(o=>fi(o,n))}const zm=e=>!!(e&&e.__v_isRef===!0),u=e=>ca(e)?e:e==null?"":Qe(e)||Lt(e)&&(e.toString===Fm||!st(e.toString))?zm(e)?u(e.value):JSON.stringify(e,Hm,2):String(e),Hm=(e,n)=>zm(n)?Hm(e,n.value):xr(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[r,s],c)=>(o[Ec(r,c)+" =>"]=s,o),{})}:qr(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>Ec(o))}:Sn(n)?Ec(n):Lt(n)&&!Qe(n)&&!Vm(n)?String(n):n,Ec=(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 mk{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 gk(){return Ga}let Xt;const Bc=new WeakSet;class Qm{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,Bc.has(this)&&(Bc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ym(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hp(this),Xm(this);const n=Xt,o=Cn;Xt=this,Cn=!0;try{return this.fn()}finally{Zm(this),Xt=n,Cn=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Pv(n);this.deps=this.depsTail=void 0,Hp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Bc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){av(this)&&this.run()}get dirty(){return av(this)}}let Jm=0,bs,_s;function Ym(e,n=!1){if(e.flags|=8,n){e.next=_s,_s=e;return}e.next=bs,bs=e}function Sv(){Jm++}function Iv(){if(--Jm>0)return;if(_s){let n=_s;for(_s=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;bs;){let n=bs;for(bs=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 Xm(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function Zm(e){let n,o=e.depsTail,r=o;for(;r;){const s=r.prevDep;r.version===-1?(r===o&&(o=s),Pv(r),yk(r)):n=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}e.deps=n,e.depsTail=o}function av(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(eg(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function eg(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===$s)||(e.globalVersion=$s,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!av(e))))return;e.flags|=2;const n=e.dep,o=Xt,r=Cn;Xt=e,Cn=!0;try{Xm(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,Zm(e),e.flags&=-3}}function Pv(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)Pv(c,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function yk(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 tg=[];function to(){tg.push(Cn),Cn=!1}function ao(){const e=tg.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&&Um(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 w=b.ec;if(w){for(let R=0;R<w.length;R++)if(w[R](e,_,I)===!1)return}b=b.parent}if(c){to(),Es(c,null,10,[e,_,I]),ao();return}}Vk(e,o,s,r,m)}function Vk(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 dg=Promise.resolve();let Hu=null;function $a(e){const n=Hu||dg;return e?n.then(this?e.bind(this):e):n}function jk(e){let n=Jn+1,o=fl.length;for(;n<o;){const r=n+o>>>1,s=fl[r],c=Ss(s);c<e||c===e&&s.flags&2?n=r+1:o=r}return n}function Bv(e){if(!(e.flags&1)){const n=Ss(e),o=fl[fl.length-1];!o||!(e.flags&2)&&n>=Ss(o)?fl.push(e):fl.splice(jk(n),0,e),e.flags|=1,cg()}}function cg(){Hu||(Hu=dg.then(fg))}function Kk(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),cg()}function Jp(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 vg(e){if(Ar.length){const n=[...new Set(Ar)].sort((o,r)=>Ss(o)-Ss(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 Ss=e=>e.id==null?e.flags&2?-1:1/0:e.id;function fg(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,vg(),Hu=null,(fl.length||Ar.length)&&fg()}}let al=null,pg=null;function Qu(e){const n=al;return al=e,pg=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 Pe(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 Gk(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 zk=Symbol.for("v-scx"),Hk=()=>Uu(zk);function rt(e,n,o){return mg(e,n,o)}function mg(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(Br){if(c==="sync"){const T=Hk();I=T.__watcherHandles||(T.__watcherHandles=[])}else if(!_){const T=()=>{};return T.stop=eo,T.resume=eo,T.pause=eo,T}}const w=tl;b.call=(T,E,N)=>un(T,w,E,N);let R=!1;c==="post"?b.scheduler=T=>{Cl(T,w&&w.suspense)}:c!=="sync"&&(R=!0,b.scheduler=(T,E)=>{E?T():Bv(T)}),b.augmentJob=T=>{n&&(T.flags|=4),R&&(T.flags|=2,w&&(T.id=w.uid,T.i=w))};const q=Fk(e,n,b);return Br&&(I?I.push(q):_&&q()),q}function Qk(e,n,o){const r=this.proxy,s=ca(e)?e.includes(".")?gg(r,e):()=>r[e]:e.bind(r,r);let c;st(n)?c=n:(c=n.handler,o=n);const m=Ts(this),b=mg(s,c.bind(r),o);return m(),b}function gg(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 Jk=Symbol("_vte"),yg=e=>e.__isTeleport,nn=Symbol("_leaveCb"),us=Symbol("_enterCb");function bg(){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 vv;const vm=typeof window<"u"&&window.trustedTypes;if(vm)try{vv=vm.createPolicy("vue",{createHTML:e=>e})}catch{}const zg=vv?e=>vv.createHTML(e):e=>e,Yh="http://www.w3.org/2000/svg",Xh="http://www.w3.org/1998/Math/MathML",ko=typeof document<"u"?document:null,fm=ko&&ko.createElement("template"),Zh={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"?ko.createElementNS(Yh,e):n==="mathml"?ko.createElementNS(Xh,e):o?ko.createElement(e,{is:o}):ko.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>ko.createTextNode(e),createComment:e=>ko.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ko.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{fm.innerHTML=zg(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const b=fm.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",ds="animation",Nr=Symbol("_vtc"),Hg={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},Qg=Aa({},_g,Hg),e0=e=>(e.displayName="Transition",e.props=Qg,e),Ya=e0((e,{slots:n})=>Qh(Xk,Jg(e),n)),Wi=(e,n=[])=>{Qe(e)?e.forEach(o=>o(...n)):e&&e(...n)},pm=e=>e?Qe(e)?e.some(n=>n.length>1):e.length>1:!1;function Jg(e){const n={};for(const F in e)F in Hg||(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:w=b,leaveFromClass:R=`${o}-leave-from`,leaveActiveClass:q=`${o}-leave-active`,leaveToClass:T=`${o}-leave-to`}=e,E=t0(s),N=E&&E[0],z=E&&E[1],{onBeforeEnter:V,onEnter:G,onEnterCancelled:j,onLeave:X,onLeaveCancelled:J,onBeforeAppear:Ce=V,onAppear:de=G,onAppearCancelled:ve=j}=n,K=(F,ke,te,ee)=>{F._enterCancelled=ee,di(F,ke?w:b),di(F,ke?I:m),te&&te()},k=(F,ke)=>{F._isLeaving=!1,di(F,R),di(F,T),di(F,q),ke&&ke()},L=F=>(ke,te)=>{const ee=F?de:G,ae=()=>K(ke,F,te);Wi(ee,[ke,ae]),mm(()=>{di(ke,F?_:c),Qn(ke,F?w:b),pm(ee)||gm(ke,r,N,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,ke){F._isLeaving=!0;const te=()=>k(F,ke);Qn(F,R),F._enterCancelled?(Qn(F,q),fv(F)):(fv(F),Qn(F,q)),mm(()=>{F._isLeaving&&(di(F,R),Qn(F,T),pm(X)||gm(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){k(F),Wi(J,[F])}})}function t0(e){if(e==null)return null;if(Lt(e))return[Dc(e.enter),Dc(e.leave)];{const n=Dc(e);return[n,n]}}function Dc(e){return rk(e)}function Qn(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[Nr]||(e[Nr]=new Set)).add(n)}function di(e,n){n.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const o=e[Nr];o&&(o.delete(n),o.size||(e[Nr]=void 0))}function mm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let a0=0;function gm(e,n,o,r){const s=e._endId=++a0,c=()=>{s===e._endId&&r()};if(o!=null)return setTimeout(c,o);const{type:m,timeout:b,propCount:_}=Yg(e,n);if(!m)return r();const I=m+"end";let w=0;const R=()=>{e.removeEventListener(I,q),c()},q=T=>{T.target===e&&++w>=_&&R()};setTimeout(()=>{w<_&&R()},b+1),e.addEventListener(I,q)}function Yg(e,n){const o=window.getComputedStyle(e),r=E=>(o[E]||"").split(", "),s=r(`${ri}Delay`),c=r(`${ri}Duration`),m=ym(s,c)
`)}function m(q,T){const E=Array.from(new Set(T.replace(/,/g,",").split(/[\n,]/).map(N=>N.trim()).filter(Boolean)));r("update:modelValue",{...o.modelValue,[q]:E})}function b(q,T){r("update:modelValue",{...o.modelValue,[q]:T})}const _=M(()=>s("group_allowlist").length),I=M(()=>s("user_allowlist").length),w=M(()=>s("adult_group_allowlist").length),R=M(()=>s("adult_user_allowlist").length);return(q,T)=>(d(),f("section",q8,[T[24]||(T[24]=Dv('<div class="intro" data-v-61943f81><span data-v-61943f81>AstrBot 聊天指令</span><strong data-v-61943f81>群聊与用户白名单</strong><p data-v-61943f81>每行填写一个平台提供的群聊 ID 或用户 ID,也支持用逗号分隔。白名单为空时不会放行对应条件。</p></div><div class="rules" data-v-61943f81><article data-v-61943f81><b data-v-61943f81>快速角色 / 角色工作流</b><strong data-v-61943f81>群聊命中 + 用户命中</strong><p data-v-61943f81>两个白名单必须同时命中才允许使用,避免群内未授权成员启动完整工作流。</p></article><article data-v-61943f81><b data-v-61943f81>单图生成</b><strong data-v-61943f81>群聊命中 或 用户命中</strong><p data-v-61943f81>任意一个白名单命中即可使用;用户白名单也可以在私聊中放行单图。</p></article></div>',2)),a("div",O8,[a("label",null,[a("span",null,[T[10]||(T[10]=ut("群聊白名单 ",-1)),a("em",null,u(_.value)+" 项",1)]),a("textarea",{value:c("group_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个群聊 ID
例如:123456789`,onInput:T[0]||(T[0]=E=>m("group_allowlist",E.target.value))},null,40,D8),T[11]||(T[11]=a("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),a("label",null,[a("span",null,[T[12]||(T[12]=ut("用户白名单 ",-1)),a("em",null,u(I.value)+" 项",1)]),a("textarea",{value:c("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
例如:987654321`,onInput:T[1]||(T[1]=E=>m("user_allowlist",E.target.value))},null,40,W8),T[13]||(T[13]=a("small",null,"使用 AstrBot 事件返回的平台用户 ID,不使用昵称。",-1))])]),T[25]||(T[25]=a("div",{class:"adult-intro"},[a("div",null,[a("span",null,"成人内容独立授权"),a("strong",null,"必须同时通过内容审核与成人白名单")]),a("p",null,"这些名单不会放宽恐怖主义、高危暴力、现实伤害或其他禁止内容。群聊内要求成人群聊与成人用户同时命中;私聊要求成人用户命中。")],-1)),a("div",U8,[a("label",null,[a("span",null,[T[14]||(T[14]=ut("成人内容群聊白名单 ",-1)),a("em",null,u(w.value)+" 项",1)]),a("textarea",{value:c("adult_group_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的群聊 ID",onInput:T[2]||(T[2]=E=>m("adult_group_allowlist",E.target.value))},null,40,F8),T[15]||(T[15]=a("small",null,"仅影响通过审核的 adult_allowed 内容。",-1))]),a("label",null,[a("span",null,[T[16]||(T[16]=ut("成人内容用户白名单 ",-1)),a("em",null,u(R.value)+" 项",1)]),a("textarea",{value:c("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:T[3]||(T[3]=E=>m("adult_user_allowlist",E.target.value))},null,40,V8),T[17]||(T[17]=a("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),a("div",j8,[a("label",null,[T[18]||(T[18]=a("span",null,"用户并发上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.user_concurrency_limit||2),disabled:e.disabled,onInput:T[4]||(T[4]=E=>b("user_concurrency_limit",Number(E.target.value)))},null,40,K8)]),a("label",null,[T[19]||(T[19]=a("span",null,"群聊并发上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.group_concurrency_limit||5),disabled:e.disabled,onInput:T[5]||(T[5]=E=>b("group_concurrency_limit",Number(E.target.value)))},null,40,G8)]),a("label",null,[T[20]||(T[20]=a("span",null,"用户每日生成上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.daily_user_generation_limit||30),disabled:e.disabled,onInput:T[6]||(T[6]=E=>b("daily_user_generation_limit",Number(E.target.value)))},null,40,z8)]),a("label",null,[T[21]||(T[21]=a("span",null,"群聊每日生成上限",-1)),a("input",{type:"number",min:"1",value:Number(e.modelValue.daily_group_generation_limit||100),disabled:e.disabled,onInput:T[7]||(T[7]=E=>b("daily_group_generation_limit",Number(E.target.value)))},null,40,H8)]),a("label",Q8,[a("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:T[8]||(T[8]=E=>b("allow_2k",E.target.checked))},null,40,J8),T[22]||(T[22]=a("span",null,"允许聊天使用 2K",-1))]),a("label",Y8,[a("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:T[9]||(T[9]=E=>b("allow_4k",E.target.checked))},null,40,X8),T[23]||(T[23]=a("span",null,"允许聊天使用 4K",-1))])])]))}}),eM=va(Z8,[["__scopeId","data-v-61943f81"]]),tM={class:"governance"},aM={class:"preview-card"},lM=["disabled"],nM={class:"preview-choice"},oM={key:1,class:"preview-error"},iM={key:2,class:"preview-result"},rM={class:"card"},sM={class:"switch"},uM=["checked","disabled"],dM={class:"route-pair source-pair"},cM=["value","disabled"],vM=["value"],fM=["value"],pM=["value","disabled"],mM=["value"],gM=["value"],yM={class:"grid"},bM=["value","disabled"],_M={class:"entries"},wM=["checked","disabled","onChange"],kM={class:"card"},hM={class:"switch"},$M=["checked","disabled"],CM={class:"route-pair source-pair"},SM=["value","disabled"],IM=["value"],PM=["value"],xM=["value","disabled"],AM=["value"],MM=["value"],RM={class:"grid"},EM=["value","disabled"],BM={class:"card routing"},NM={class:"switch"},TM=["checked","disabled"],LM={class:"route-pair"},qM=["value","disabled"],OM=["value"],DM=["value","disabled"],WM=["value"],UM={class:"entries"},FM=["checked","disabled","onChange"],VM={class:"card"},jM={class:"switch"},KM=["checked","disabled"],GM={class:"route-pair source-pair"},zM=["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 p1(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(B=>B.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 ip(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 Ie(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=p1(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 m1(){const t=Mt.value.trim();if(!t||He.value||await ip(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 rp(){!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,rp())}function sp(){Bl.value.length<2||(se.value=!0)}function g1(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};建议操作:${g1(v)}。`:`${l}:${i}`}async function y1(){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,ki.value=!0}catch(v){lt.value=Iu(v,"交叉审查轮次加载失败")}finally{rl.value=!1}}function b1(){rl.value||(ki.value=!1,Nn.value="")}function _1(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 B1(t){const l=Li(t),i=(...y)=>{for(const h of y){const B=l.find(ne=>ci(ne.node_key)===h);if(B!=null&&B.selected_image_id)return B.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 N1(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 T1(){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=B1(i);if(!y)return;const h=E1(t);if(!h){qe.value="档案卡缺少人设文档,请先完成角色设定拆解。";return}const B={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 Ie(W.workflowFinalizeCard(i),B);Fr.value={...Fr.value,[t.profileId]:[ne,...(Fr.value[t.profileId]??[]).filter(xe=>xe.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"&&(Fr.value={...Fr.value,[t.profileId]:ce.value}),Fn("archive"),qe.value=`档案卡已原子封存:${hl(ne.card_id)} / ${ne.branch_name},4 类必填资产均已入库。`}catch(ne){qe.value=N1(ne)}finally{He.value=!1}}async function hc(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 Ie(p);St.value={...St.value,[i]:y},En.value=`工作流已${v}`}catch(p){En.value=De(p)}finally{Qa.value=!1}}}async function L1(){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 pp(){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 is(t){return bl.value?`${t}暂不可用:${vo.value}`:Dn.value?`${t}已被锁定:${Jo.value}`:""}function q1(t){return`branch_${(t.node_key||t.node_id).replace(/[^a-zA-Z0-9_-]+/g,"_").slice(0,28)}_${Date.now().toString(36)}`}async function mp(t,l,i,v={}){const p=await Ie(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 B=(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 Y1(t){const l=El.value,i=T.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:bp(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?_p(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 bp(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 _p(t){return t==="风格"||t==="服装"?"强":t==="构图"?"中":"弱"}async function X1(){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 Ie(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=>kn(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 Z1(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 ew(){if(!af.value||bi.value)return;const t=aa("生成档案");if(t){Ro.value=t;return}Ls.value+=1;const l=ow(Ke.value,Ls.value);bi.value=!0,Ro.value="";try{const i=await Ie(W.quickProfileDraft,tw(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 Ie(W.quickProfileDraftSave,aw(v,Ke.value,ml.value,i)),h={...lw(p,v),status:"文本档案已保存"};gl.value=[h,...gl.value.filter(B=>B.id!==h.id)],ba.value=[p.profile,...ba.value.filter(B=>B.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="${B}" stop-opacity="0.82" />
<stop offset="100%" stop-color="${B}" 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="${wa}" y="${wa}" width="${wl}" height="${Zl}" rx="${Math.round(dl*.72)}" fill="#0f172a" opacity="0.24" />
<text x="${wa+Math.round(gt*.035)}" y="${xa}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${ka}" font-weight="700">IMAGESTUDIO · 未生成 ${ne}</text>
<text x="${wa+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="${wa+Math.round(gt*.035)}" y="${Va}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${nt}">${xe}</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 Vp(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=Gw(l);if(!i)return l;const v=Be.value[l];if(v)return v;if(!Fe.has(l)){const p=zw(l,i).finally(()=>{Fe.delete(l)});Fe.set(l,p)}return Du()==="plugin-bridge"?"":l}function Gw(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 zw(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),B=new Uint8Array(h.length);for(let ce=0;ce<h.length;ce+=1)B[ce]=h.charCodeAt(ce);const ne=URL.createObjectURL(new Blob([B],{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 Hw(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 Qw(t,l,i){return Math.max(l,Math.min(i,t))}function Jw(){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=jp(localStorage.getItem(Ql.readNotifications)),or.value=jp(localStorage.getItem(Ql.dismissedNotifications))}catch{}lr.value=yn.value}function Yw(){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 jp(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=Ac(t);return i?`rgba(${i.r}, ${i.g}, ${i.b}, ${l})`:`rgba(118, 104, 232, ${l})`}function Pc(t,l,i){const v=Ac(t),p=Ac(l);if(!v||!p)return t;const y=Math.min(1,Math.max(0,i));return`#${xc(v.r*(1-y)+p.r*y)}${xc(v.g*(1-y)+p.g*y)}${xc(v.b*(1-y)+p.b*y)}`}function xc(t){return Math.round(t).toString(16).padStart(2,"0")}function Ac(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 Xw(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 Zw(t){return!!t}function ga(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function ek(t){return $l(t,
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
避雷:低质量、结构错误`},null,512),[[Ve,Wl.value]])]),a("aside",rT,[a("header",null,[a("div",null,[l[166]||(l[166]=a("span",null,"识别预览",-1)),a("strong",null,u(gy.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,[ut(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:uw}," 识别并填入问卷 ",8,sT)])])])):H("",!0)]),_:1}),Xe(Ya,{name:"viewer-fade"},{default:ya(()=>[Mn.value?(d(),f("div",uT,[a("section",dT,[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"))},"×"),l[168]||(l[168]=ut("\\n ",-1))]),a("div",cT,[a("label",null,[l[169]||(l[169]=a("span",null,"角色核心",-1)),Pe(a("textarea",{"onUpdate:modelValue":l[38]||(l[38]=A=>Ke.value.roleCore=A),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Ve,Ke.value.roleCore]])]),a("label",vT,[l[171]||(l[171]=a("span",null,"性别表现",-1)),Pe(a("select",{"onUpdate:modelValue":l[39]||(l[39]=A=>Ke.value.genderPresentation=A)},[...l[170]||(l[170]=[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",fT,[l[172]||(l[172]=a("span",null,"年龄阶段",-1)),Pe(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",pT,[l[173]||(l[173]=a("span",null,"物种 / 种族",-1)),Pe(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",mT,[l[174]||(l[174]=a("span",null,"体型",-1)),Pe(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[175]||(l[175]=a("span",null,"显著特征",-1)),Pe(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[176]||(l[176]=a("span",null,"性格关键词",-1)),Pe(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[177]||(l[177]=a("span",null,"外观特征",-1)),Pe(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[178]||(l[178]=a("span",null,"服装与配饰",-1)),Pe(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[179]||(l[179]=a("span",null,"常用场景",-1)),Pe(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[180]||(l[180]=a("span",null,"避雷内<E99BB7><E58685>