astrbot_plugin_imagestudio/web/assets/index-BpXvhHrv.js

52 行
431 KiB
JavaScript

var ay=Object.defineProperty;var ny=(e,n,o)=>n in e?ay(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Rs=(e,n,o)=>ny(e,typeof n!="symbol"?n+"":n,o);(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 f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function o(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=o(r);fetch(r.href,u)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function gu(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const ot={},oo=[],ea=()=>{},ef=()=>!1,br=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),hr=e=>e.startsWith("onUpdate:"),St=Object.assign,yu=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},oy=Object.prototype.hasOwnProperty,tt=(e,n)=>oy.call(e,n),Ce=Array.isArray,io=e=>oi(e)==="[object Map]",vo=e=>oi(e)==="[object Set]",cc=e=>oi(e)==="[object Date]",Be=e=>typeof e=="function",gt=e=>typeof e=="string",ql=e=>typeof e=="symbol",lt=e=>e!==null&&typeof e=="object",tf=e=>(lt(e)||Be(e))&&Be(e.then)&&Be(e.catch),lf=Object.prototype.toString,oi=e=>lf.call(e),iy=e=>oi(e).slice(8,-1),af=e=>oi(e)==="[object Object]",bu=e=>gt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,jo=gu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),kr=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},ry=/-\w/g,Rl=kr(e=>e.replace(ry,n=>n.slice(1).toUpperCase())),sy=/\B([A-Z])/g,ln=kr(e=>e.replace(sy,"-$1").toLowerCase()),nf=kr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Bs=kr(e=>e?`on${nf(e)}`:""),Zl=(e,n)=>!Object.is(e,n),lr=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},of=(e,n,o,i=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:i,value:o})},_r=e=>{const n=parseFloat(e);return isNaN(n)?e:n},uy=e=>{const n=gt(e)?Number(e):NaN;return isNaN(n)?e:n};let fc;const wr=()=>fc||(fc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function wt(e){if(Ce(e)){const n={};for(let o=0;o<e.length;o++){const i=e[o],r=gt(i)?py(i):wt(i);if(r)for(const u in r)n[u]=r[u]}return n}else if(gt(e)||lt(e))return e}const dy=/;(?![^(]*\))/g,cy=/:([^]+)/,fy=/\/\*[^]*?\*\//g;function py(e){const n={};return e.replace(fy,"").split(dy).forEach(o=>{if(o){const i=o.split(cy);i.length>1&&(n[i[0].trim()]=i[1].trim())}}),n}function ie(e){let n="";if(gt(e))n=e;else if(Ce(e))for(let o=0;o<e.length;o++){const i=ie(e[o]);i&&(n+=i+" ")}else if(lt(e))for(const o in e)e[o]&&(n+=o+" ");return n.trim()}const vy="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",my=gu(vy);function rf(e){return!!e||e===""}function gy(e,n){if(e.length!==n.length)return!1;let o=!0;for(let i=0;o&&i<e.length;i++)o=mo(e[i],n[i]);return o}function mo(e,n){if(e===n)return!0;let o=cc(e),i=cc(n);if(o||i)return o&&i?e.getTime()===n.getTime():!1;if(o=ql(e),i=ql(n),o||i)return e===n;if(o=Ce(e),i=Ce(n),o||i)return o&&i?gy(e,n):!1;if(o=lt(e),i=lt(n),o||i){if(!o||!i)return!1;const r=Object.keys(e).length,u=Object.keys(n).length;if(r!==u)return!1;for(const f in e){const m=e.hasOwnProperty(f),b=n.hasOwnProperty(f);if(m&&!b||!m&&b||!mo(e[f],n[f]))return!1}}return String(e)===String(n)}function hu(e,n){return e.findIndex(o=>mo(o,n))}const sf=e=>!!(e&&e.__v_isRef===!0),d=e=>gt(e)?e:e==null?"":Ce(e)||lt(e)&&(e.toString===lf||!Be(e.toString))?sf(e)?d(e.value):JSON.stringify(e,uf,2):String(e),uf=(e,n)=>sf(n)?uf(e,n.value):io(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[i,r],u)=>(o[Ts(i,u)+" =>"]=r,o),{})}:vo(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>Ts(o))}:ql(n)?Ts(n):lt(n)&&!Ce(n)&&!af(n)?String(n):n,Ts=(e,n="")=>{var o;return ql(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 Ot;class yy{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&&Ot&&(Ot.active?(this.parent=Ot,this.index=(Ot.scopes||(Ot.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=Ot;try{return Ot=this,n()}finally{Ot=o}}}on(){++this._on===1&&(this.prevScope=Ot,Ot=this)}off(){if(this._on>0&&--this._on===0){if(Ot===this)Ot=this.prevScope;else{let n=Ot;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,i;for(o=0,i=this.effects.length;o<i;o++)this.effects[o].stop();for(this.effects.length=0,o=0,i=this.cleanups.length;o<i;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,i=this.scopes.length;o<i;o++)this.scopes[o].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 by(){return Ot}let st;const qs=new WeakSet;class df{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,Ot&&(Ot.active?Ot.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,qs.has(this)&&(qs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ff(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,pc(this),pf(this);const n=st,o=Bl;st=this,Bl=!0;try{return this.fn()}finally{vf(this),st=n,Bl=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)wu(n);this.deps=this.depsTail=void 0,pc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?qs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){eu(this)&&this.run()}get dirty(){return eu(this)}}let cf=0,Ko,Go;function ff(e,n=!1){if(e.flags|=8,n){e.next=Go,Go=e;return}e.next=Ko,Ko=e}function ku(){cf++}function _u(){if(--cf>0)return;if(Go){let n=Go;for(Go=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;Ko;){let n=Ko;for(Ko=void 0;n;){const o=n.next;if(n.next=void 0,n.flags&=-9,n.flags&1)try{n.trigger()}catch(i){e||(e=i)}n=o}}if(e)throw e}function pf(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function vf(e){let n,o=e.depsTail,i=o;for(;i;){const r=i.prevDep;i.version===-1?(i===o&&(o=r),wu(i),hy(i)):n=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=n,e.depsTail=o}function eu(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(mf(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function mf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Jo)||(e.globalVersion=Jo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!eu(e))))return;e.flags|=2;const n=e.dep,o=st,i=Bl;st=e,Bl=!0;try{pf(e);const r=e.fn(e._value);(n.version===0||Zl(r,e._value))&&(e.flags|=128,e._value=r,n.version++)}catch(r){throw n.version++,r}finally{st=o,Bl=i,vf(e),e.flags&=-3}}function wu(e,n=!1){const{dep:o,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),o.subs===e&&(o.subs=i,!i&&o.computed)){o.computed.flags&=-5;for(let u=o.computed.deps;u;u=u.nextDep)wu(u,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function hy(e){const{prevDep:n,nextDep:o}=e;n&&(n.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=n,e.nextDep=void 0)}let Bl=!0;const gf=[];function ta(){gf.push(Bl),Bl=!1}function la(){const e=gf.pop();Bl=e===void 0?!0:
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function ii(e,n,o,i){try{return i?e(...i):e()}catch(r){Cr(r,n,o)}}function Pl(e,n,o,i){if(Be(e)){const r=ii(e,n,o,i);return r&&tf(r)&&r.catch(u=>{Cr(u,n,o)}),r}if(Ce(e)){const r=[];for(let u=0;u<e.length;u++)r.push(Pl(e[u],n,o,i));return r}}function Cr(e,n,o,i=!0){const r=n?n.vnode:null,{errorHandler:u,throwUnhandledErrorInProduction:f}=n&&n.appContext.config||ot;if(n){let m=n.parent;const b=n.proxy,k=`https://vuejs.org/error-reference/#runtime-${o}`;for(;m;){const g=m.ec;if(g){for(let A=0;A<g.length;A++)if(g[A](e,b,k)===!1)return}m=m.parent}if(u){ta(),ii(u,null,10,[e,b,k]),la();return}}Ky(e,o,r,i,f)}function Ky(e,n,o,i=!0,r=!1){if(r)throw e;console.error(e)}const Yt=[];let Ql=-1;const ro=[];let Za=null,no=0;const If=Promise.resolve();let dr=null;function Dt(e){const n=dr||If;return e?n.then(this?e.bind(this):e):n}function Gy(e){let n=Ql+1,o=Yt.length;for(;n<o;){const i=n+o>>>1,r=Yt[i],u=Xo(r);u<e||u===e&&r.flags&2?n=i+1:o=i}return n}function xu(e){if(!(e.flags&1)){const n=Xo(e),o=Yt[Yt.length-1];!o||!(e.flags&2)&&n>=Xo(o)?Yt.push(e):Yt.splice(Gy(n),0,e),e.flags|=1,Pf()}}function Pf(){dr||(dr=If.then(xf))}function Hy(e){Ce(e)?ro.push(...e):Za&&e.id===-1?Za.splice(no+1,0,e):e.flags&1||(ro.push(e),e.flags|=1),Pf()}function mc(e,n,o=Ql+1){for(;o<Yt.length;o++){const i=Yt[o];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Yt.splice(o,1),o--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Sf(e){if(ro.length){const n=[...new Set(ro)].sort((o,i)=>Xo(o)-Xo(i));if(ro.length=0,Za){Za.push(...n);return}for(Za=n,no=0;no<Za.length;no++){const o=Za[no];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}Za=null,no=0}}const Xo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function xf(e){try{for(Ql=0;Ql<Yt.length;Ql++){const n=Yt[Ql];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),ii(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Ql<Yt.length;Ql++){const n=Yt[Ql];n&&(n.flags&=-2)}Ql=-1,Yt.length=0,Sf(),dr=null,(Yt.length||ro.length)&&xf()}}let Ht=null,Af=null;function cr(e){const n=Ht;return Ht=e,Af=e&&e.type.__scopeId||null,n}function bt(e,n=Ht,o){if(!n||e._n)return e;const i=(...r)=>{i._d&&vr(-1);const u=cr(n);let f;try{f=e(...r)}finally{cr(u),i._d&&vr(1)}return f};return i._n=!0,i._c=!0,i._d=!0,i}function Pe(e,n){if(Ht===null)return e;const o=Ar(Ht),i=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[u,f,m,b=ot]=n[r];u&&(Be(u)&&(u={mounted:u,updated:u}),u.deep&&Pa(f),i.push({dir:u,instance:o,value:f,oldValue:void 0,arg:m,modifiers:b}))}return e}function Sn(e,n,o,i){const r=e.dirs,u=n&&n.dirs;for(let f=0;f<r.length;f++){const m=r[f];u&&(m.oldValue=u[f].value);let b=m.dir[i];b&&(ta(),Pl(b,o,8,[e.el,m,e,n]),la())}}function zy(e,n){if(Xt){let o=Xt.provides;const i=Xt.parent&&Xt.parent.provides;i===o&&(o=Xt.provides=Object.create(i)),o[e]=n}}function ar(e,n,o=!1){const i=Nu();if(i||uo){let r=uo?uo._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 o&&Be(n)?n.call(i&&i.proxy):n}}const Qy=Symbol.for("v-scx"),Jy=()=>ar(Qy);function Ye(e,n,o){return Mf(e,n,o)}function Mf(e,n,o=ot){const{immediate:i,deep:r,flush:u,once:f}=o,m=St({},o),b=n&&i||!n&&u!=="post";let k;if(li){if(u==="sync"){const I=Jy();k=I.__watcherHandles||(I.__watcherHandles=[])}else if(!b){const I=()=>{};return I.stop=ea,I.resume=ea,I.pause=ea,I}}const g=Xt;m.call=(I,x,F)=>Pl(I,g,x,F);let A=!1;u==="post"?m.scheduler=I=>{il(I,g&&g.suspense)}:u!=="sync"&&(A=!0,m.scheduler=(I,x)=>{x?I():xu(I)}),m.augmentJob=I=>{n&&(I.flags|=4),A&&(I.flags|=2,g&&(I.id=g.uid,I.i=g))};const q=jy(e,n,m);return li&&(k?k.push(q):b&&q()),q}function Yy(e,n,o){const i=this.proxy,r=gt(e)?e.includes(".")?Ef(i,e):()=>i[e]:e.bind(i,i);let u;Be(n)?u=n:(u=n.handler,o=n);const f=si(this),m=Mf(r,u.bind(i),o);return f(),m}function Ef(e,n){const o=n.split(".");return()=>{let i=e;for(let r=0;r<o.length&&i;r++)i=i[o[r]];return i}}const Xy=Symbol("_vte"),Nf=e=>e.__isTeleport,$l=Symbol("_leaveCb"),Lo=Symbol("_enterCb");function Rf(){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 du;const Mc=typeof window<"u"&&window.trustedTypes;if(Mc)try{du=Mc.createPolicy("vue",{createHTML:e=>e})}catch{}const dp=du?e=>du.createHTML(e):e=>e,Xb="http://www.w3.org/2000/svg",Zb="http://www.w3.org/1998/Math/MathML",$a=typeof document<"u"?document:null,Ec=$a&&$a.createElement("template"),e1={insert:(e,n,o)=>{n.insertBefore(e,o||null)},remove:e=>{const n=e.parentNode;n&&n.removeChild(e)},createElement:(e,n,o,i)=>{const r=n==="svg"?$a.createElementNS(Xb,e):n==="mathml"?$a.createElementNS(Zb,e):o?$a.createElement(e,{is:o}):$a.createElement(e);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>$a.createTextNode(e),createComment:e=>$a.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>$a.querySelector(e),setScopeId(e,n){e.setAttribute(n,"")},insertStaticContent(e,n,o,i,r,u){const f=o?o.previousSibling:n.lastChild;if(r&&(r===u||r.nextSibling))for(;n.insertBefore(r.cloneNode(!0),o),!(r===u||!(r=r.nextSibling)););else{Ec.innerHTML=dp(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const m=Ec.content;if(i==="svg"||i==="mathml"){const b=m.firstChild;for(;b.firstChild;)m.appendChild(b.firstChild);m.removeChild(b)}n.insertBefore(m,o)}return[f?f.nextSibling:n.firstChild,o?o.previousSibling:n.lastChild]}},za="transition",Oo="animation",fo=Symbol("_vtc"),cp={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},fp=St({},Bf,cp),t1=e=>(e.displayName="Transition",e.props=fp,e),jt=t1((e,{slots:n})=>Jb(eb,pp(e),n)),An=(e,n=[])=>{Ce(e)?e.forEach(o=>o(...n)):e&&e(...n)},Nc=e=>e?Ce(e)?e.some(n=>n.length>1):e.length>1:!1;function pp(e){const n={};for(const G in e)G in cp||(n[G]=e[G]);if(e.css===!1)return n;const{name:o="v",type:i,duration:r,enterFromClass:u=`${o}-enter-from`,enterActiveClass:f=`${o}-enter-active`,enterToClass:m=`${o}-enter-to`,appearFromClass:b=u,appearActiveClass:k=f,appearToClass:g=m,leaveFromClass:A=`${o}-leave-from`,leaveActiveClass:q=`${o}-leave-active`,leaveToClass:I=`${o}-leave-to`}=e,x=l1(r),F=x&&x[0],fe=x&&x[1],{onBeforeEnter:O,onEnter:W,onEnterCancelled:J,onLeave:K,onLeaveCancelled:de,onBeforeAppear:Se=O,onAppear:ze=W,onAppearCancelled:xe=J}=n,ae=(G,$e,ee,L)=>{G._enterCancelled=L,Ya(G,$e?g:m),Ya(G,$e?k:f),ee&&ee()},ne=(G,$e)=>{G._isLeaving=!1,Ya(G,A),Ya(G,I),Ya(G,q),$e&&$e()},V=G=>($e,ee)=>{const L=G?ze:W,Me=()=>ae($e,G,ee);An(L,[$e,Me]),Rc(()=>{Ya($e,G?b:u),zl($e,G?g:m),Nc(L)||Bc($e,i,F,Me)})};return St(n,{onBeforeEnter(G){An(O,[G]),zl(G,u),zl(G,f)},onBeforeAppear(G){An(Se,[G]),zl(G,b),zl(G,k)},onEnter:V(!1),onAppear:V(!0),onLeave(G,$e){G._isLeaving=!0;const ee=()=>ne(G,$e);zl(G,A),G._enterCancelled?(zl(G,q),cu(G)):(cu(G),zl(G,q)),Rc(()=>{G._isLeaving&&(Ya(G,A),zl(G,I),Nc(K)||Bc(G,i,fe,ee))}),An(K,[G,ee])},onEnterCancelled(G){ae(G,!1,void 0,!0),An(J,[G])},onAppearCancelled(G){ae(G,!0,void 0,!0),An(xe,[G])},onLeaveCancelled(G){ne(G),An(de,[G])}})}function l1(e){if(e==null)return null;if(lt(e))return[Us(e.enter),Us(e.leave)];{const n=Us(e);return[n,n]}}function Us(e){return uy(e)}function zl(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[fo]||(e[fo]=new Set)).add(n)}function Ya(e,n){n.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const o=e[fo];o&&(o.delete(n),o.size||(e[fo]=void 0))}function Rc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let a1=0;function Bc(e,n,o,i){const r=e._endId=++a1,u=()=>{r===e._endId&&i()};if(o!=null)return setTimeout(u,o);const{type:f,timeout:m,propCount:b}=vp(e,n);if(!f)return i();const k=f+"end";let g=0;const A=()=>{e.removeEventListener(k,q),u()},q=I=>{I.target===e&&++g>=b&&A()};setTimeout(()=>{g<b&&A()},m+1),e.addEventListener(k,q)}function vp(e,n){const o=window.getComputedStyle(e),i=x=>(o[x]||"").split(", "),r=i(`${za}Delay`),u=i(`${za}Duration`),f=T
`)}function Ld(t){const a=Ge.value,s=Le.value;return{source:"standalone_web_workflow_chat",ui_node_id:Ue.value,ui_node_title:a.title,ui_node_phase:a.phase,ui_node_status:a.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:qi.value,persona_split_fields_total:Ti.value,selected_material_ids:ms(),selected_draft_image_ids:ft.value.filter(cl).map(c=>c.image_id)}}async function ws(){var s;const t=ht.value.trim();if(!t||Ve.value)return;if(!Vl.value){ke.value="请先在设置中配置并确认一个生图模型。";return}await Ps({promptPatch:qd(t),metadata:Ld(t)})&&(el.value=t,go.value=`${Ge.value.title} / ${((s=Vl.value)==null?void 0:s.label)??H.value}`)}function Od(){!Tt.value||!At(Tt.value)||(Un.value="generation",ll("imageViewer"),ji(),Wl.value=!0)}function Dd(t){const a=(t?Li.value.find(s=>s.image_id===t):null)??Ka.value;!a||!At(a)||(Te.value=a.image_id,Od())}function xm(){ft.value.length&&(Un.value="workflowCompare",ll("imageViewer"),ji(),Wl.value=!0)}function Fd(t){var a;t&&Nd(t),(a=qt.value)!=null&&a.imageUrl&&(Un.value="quickProfile",ll("imageViewer"),ji(),Wl.value=!0)}function $s(){Wl.value=!1,pn.value=!1}function ji(){oa.value=1,La.value={x:0,y:0}}function Am(t){oa.value=Fg(Number((oa.value+t).toFixed(2)),.5,4),oa.value<=1&&(La.value={x:0,y:0})}function Mm(t){Am(t.deltaY<0?.12:-.12)}function Em(){if(oa.value>1){ji();return}oa.value=2.2,La.value={x:0,y:0}}function Nm(t){oa.value<=1||(pn.value=!0,vn.value={pointerId:t.pointerId,x:t.clientX,y:t.clientY,offsetX:La.value.x,offsetY:La.value.y},t.currentTarget instanceof HTMLElement&&t.currentTarget.setPointerCapture(t.pointerId))}function Rm(t){!pn.value||t.pointerId!==vn.value.pointerId||(La.value={x:vn.value.offsetX+t.clientX-vn.value.x,y:vn.value.offsetY+t.clientY-vn.value.y})}function Cs(t){!pn.value||t.pointerId!==vn.value.pointerId||(pn.value=!1,t.currentTarget instanceof HTMLElement&&t.currentTarget.hasPointerCapture(t.pointerId)&&t.currentTarget.releasePointerCapture(t.pointerId))}function Wd(){ll("search"),Br.value=!0,Wn.value=!0,gl.value=0}function Ud(t){if(!wn.value.length)return;const a=wn.value.length;gl.value=(gl.value+t+a)%a}function Bm(){const t=wn.value[gl.value];t&&md(t)}function Zn(){ll("personaQuestionnaire"),bo.value="",pi.value=!0}function Vd(){ll("externalProfileImport"),mi.value=!0,Dt(()=>{var t;(t=document.querySelector("[data-profile-import-input]"))==null||t.focus()})}function Tm(){ll("quickProfileDetail"),vi.value=!0}function qm(t){T.value=t,ll("materialDetail"),ui.value=!0}async function Lm(t){if(t.enabled){if(t.actionKey==="personaQuestionnaire"){Zn();return}if(t.actionKey==="workflowCompare"){xm();return}if(t.actionKey==="externalProfileImport"){Vd();return}if(t.actionKey==="workflowPersonaSplit"){await Vm();return}if(t.actionKey==="workflowSaveVersion"){await tg();return}if(t.actionKey==="workflowCreateBranchFromNode"){await Um();return}if(t.actionKey==="workflowNodeGenerate"){t.id==="hires"&&Ue.value!=="hires-fix"&&(Nl("hires-fix"),await Dt()),await Ps();return}if(t.actionKey==="workflowNodeRetry"){await Ps({retry:!0});return}if(t.actionKey==="workflowNodeComplete"){await jm();return}if(t.actionKey==="workflowNodeReview"){await Hm();return}if(t.actionKey==="workflowReviewAdopt"){await Xm();return}if(t.actionKey==="workflowPromptPlanSave"){await Km();return}if(t.actionKey==="workflowPromptPlanNext"){Nl("prompt-plan");return}if(t.actionKey==="workflowMaterialBindSave"){await Gm();return}if(t.actionKey==="workflowArchiveFinal"){await Om();return}t.nav&&t.module&&mt(t.nav,t.module)}}async function Om(){const t=Le.value;if(!t||Ve.value)return;const a=kt("入库");if(a){ke.value=a;return}if(!t.workflowId){ke.value="请先生成角色档案并创建后端工作流,再执行入库。";return}const s=t.workflowId,c=dl("archive",t);if(!c){ke.value="当前工作流缺少后端入库节点 final_pack。";return}const y=In(s).find(B=>B.node_id===c);if(y&&["completed","selected"].includes(at(y.status)
`)}}function Ki(t,a,s,c,y){return{id:t,title:a,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:y,status:"ready"}}function eg(t){const a=Ml.value,s=u.map((c,y)=>{const h=a.find(w=>w.category===c.category);return{id:`rule_${c.category}_${y+1}`,category:c.category,material_id:vs(h==null?void 0:h.id),material_label:(h==null?void 0:h.label)??"",material_group:(h==null?void 0:h.group)??(h==null?void 0:h.category)??"",material_prompt:(h==null?void 0:h.prompt)??"",material_colors:(h==null?void 0:h.colors)??[],bind_to_stages:Kd(c.category),inheritance_rule:h?`${c.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:h?Gd(c.category):"弱",required:!!(h&&["风格","服装"].includes(c.category)),status:h?"ready":"pending"}});return{profile_id:t.profileId,profile_name:t.name,selected_material_ids:ms(),rules:s}}function Kd(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 Gd(t){return t==="风格"||t==="服装"?"强":t==="构图"?"中":"弱"}async function tg(){var s;const t=Le.value;if(!t||Fn.value)return;const a=kt("保存快照");if(a){dn.value=a;return}if(!t.workflowId){dn.value="请先生成档案并创建后端工作流,再保存快照。";return}Fn.value=!0,dn.value="";try{const c=await we(R.workflowHistory(t.workflowId),{action:"save_version",title:`${t.name} / ${((s=Ge.value)==null?void 0:s.title)??"工作流快照"}`,node_id:dl(Ue.value,t),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:Ue.value,profile_id:t.profileId,profile_name:t.name,profile_status:t.status}});ho.value=c.created_at}catch(c){dn.value=`保存快照失败:${Ne(c)}`}finally{Fn.value=!1}}function dl(t,a){if(!a.workflowId)return;const c=In(a.workflowId).find(h=>ya(h)===t);if(c)return c.node_id;const y=a.workflowNodeIds??[];if(t!=="brief-import"&&t==="persona-split")return y[0]}function In(t){var c;const a=Je.value[t]??[],s=(c=rt.value[t])==null?void 0:c.current_branch;return s?a.filter(y=>y.branch_name===s):a}function Hd(t){const a=[...ft.value,...Ka.value?[Ka.value]:[],...t?tl.value[t]??[]:[]];return Array.from(new Set(a.filter(cl).map(s=>s.image_id)))}function cl(t){if(t.image_id.startsWith("mock-")||t.image_uri.startsWith("mock://"))return!1;const a="metadata"in t&&t.metadata&&typeof t.metadata=="object"?t.metadata:{},s=a.mock===!0||a.mock===1||a.mock==="true",c=Object.prototype.hasOwnProperty.call(a,"provider_error")&&a.provider_error!=null,y=a.fallback_used===!0||a.degraded===!0;return!s&&!c&&!y}async function lg(){if(!Hu.value||yo.value)return;const t=kt("生成档案");if(t){bo.value=t;return}Ru.value+=1;const a=sg(qe.value,Ru.value);yo.value=!0,bo.value="";try{const s=await we(R.quickProfileDraft,ag(a,qe.value,Na.value)),c={...a,name:s.profile_preview.name||a.name,style:s.profile_preview.style_prompt||a.style,negative:s.profile_preview.negative_prompt||a.negative},y=await we(R.quickProfileDraftSave,ng(c,qe.value,Na.value,s)),w={...ig(y,c),status:"文本档案已保存"};rn.value=[w,...rn.value.filter(B=>B.id!==w.id)],Ra.value=[y.profile,...Ra.value.filter(B=>B.profile_id!==y.profile.profile_id)],Et.value={...Et.value,[y.profile.profile_id]:y.workflow?[y.workflow]:[]},Vi(w),re.value="quickProfile",Pt("personaQuestionnaire"),Dt(()
<svg xmlns="http://www.w3.org/2000/svg" width="${He}" height="${Mt}" viewBox="0 0 ${He} ${Mt}" preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="${h}" />
<stop offset="58%" stop-color="${w}" />
<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="${Gl}" height="${Gl}" patternUnits="userSpaceOnUse">
<path d="M${Gl} 0H0V${Gl}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
</pattern>
</defs>
<rect width="${He}" height="${Mt}" fill="url(#bg)" />
<rect width="${He}" height="${Mt}" fill="url(#grid)" />
<circle cx="${zg}" cy="${Qg}" r="${Jg}" fill="url(#halo)" />
<circle cx="${Yg}" cy="${Xg}" r="${Zg}" fill="#ffffff" opacity="0.11" />
<rect x="${_e}" y="${_e}" width="${zi}" height="${dc}" rx="${Kl}" fill="#ffffff" opacity="0.14" />
<rect x="${_t}" y="${_t}" width="${Gg}" height="${Hg}" rx="${Math.round(Kl*.72)}" fill="#0f172a" opacity="0.24" />
<text x="${_t+Math.round(P*.035)}" y="${Oe}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${ha}" font-weight="700">IMAGESTUDIO TEST ${te}</text>
<text x="${_t+Math.round(P*.035)}" y="${kl}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Ae}" font-weight="800">${ce}</text>
<text x="${_t+Math.round(P*.035)}" y="${_}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${nl}">${he}</text>
<text x="${ey}" y="${Oe+Math.round(P*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${yt}" font-weight="900">${te}</text>
<text x="${He-_e}" y="${Mt-Math.round(_e*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(P*.027))}" font-weight="800">${ty}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(ly)}`}function Lg(t){const a=t.match(/(\d+)\s*x\s*(\d+)/i);if(!a)return[4,3];const s=Number(a[1]),c=Number(a[2]);if(!Number.isFinite(s)||!Number.isFinite(c)||s<=0||c<=0)return[4,3];const y=Og(s,c);return[Math.round(s/y),Math.round(c/y)]}function Og(t,a){let s=Math.abs(Math.round(t)),c=Math.abs(Math.round(a));for(;c;){const y=s%c;s=c,c=y}return s||1}function sc(t){return t.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[a]??a)}function xt(t){return"title"in t&&t.title?t.title:t.node_id||t.workflow_id||t.profile_id||ol(t.image_id)}function At(t){return t.thumbnail_url||t.image_url||""}function Dg(t){if(t.status==="confirmed_unsupported")return!1;if(t.dialect==="openai_images"||t.dialect==="comfyui")return!0;const a=t.capabilities||{};return!!(a.text_to_image||a.image_generation||a.workflow_graph||Object.keys(a).some(s=>["text_to_image","image_generation","workflow_graph"].includes(s)))}function Fg(t,a,s){return Math.max(a,Math.min(s,t))}function Wg(){const t=localStorage.getItem(hl.theme);(t==="light"||t==="dark")&&(Fl.value=t),Ta.value=localStorage.getItem(hl.primary)||Ta.value,qa.value=localStorage.getItem(hl.accent)||qa.value;const a=localStorage.getItem(hl.navigationPinned);xl.value=a===null||a==="true",Vn.value=xl.value,yl.value=uc(localStorage.getItem(hl.readNotifications)),jn.value=uc(localStorage.getItem(hl.dismissedNotifications))}function Ug(){localStorage.setItem(hl.theme,Fl.value),localStorage.setItem(hl.primary,Ta.value),localStorage.setItem(hl.accent,qa.value),localStorage.setItem(hl.navigationPinned,String(xl.value)),localStorage.setItem(hl.readNotifications,JSON.stringify(yl.value)),localStorage.setItem(hl.dismissedNotifications,JSON.stringify(jn.value))}function uc(t){if(!t)return[];try{const a=JSON.parse(t);return Array.isArray(a)?a.filter(s=>typeof s=="string"):[]}catch{return[]}}function ba(t,a){const s=Ns(t);return s?`rgba(${s.r}, ${s.g}, ${s.b}, ${a})`:`rgba(118, 104, 232, ${a})`}function Ms(t,a,s){const c=Ns(t),y=Ns(a);if(!c||!y)return t;const h=Math.min(1,Math.max(0,s));return`#${Es(c.r*(1-h)+y.r*h)}${Es(c.g*(1-h)+y.g*h)}${Es(c.b*(1-h)+y.b*h)}`}function Es(t){return Math.round(t).toString(16).padStart(2,"0")}function Ns(t){const a=t.replace("#","");return/^[0-9a-fA-F]{6}$/.test(a)?{r:Number.parseInt(a.slice(0,2),16),g:Number.parseInt(a.slice(2,4),16),b:Number.parseInt(a.slice(4,6),16)}:null}function Lt(t,a){const s=t==null?void 0:t[a];return typeof s=="string"?s:""}function Vg(t){return!Hi(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:Hi(t.request)?t.request:void 0,result:Hi(t.result)?t.result:void 0,metadata:Hi(t.metadata)?t.metadata:void 0,error_message:typeof t.error_message=="string"?t.error_message:null}}function jg(t){return!!t}function Hi(t){return!!(t&&typeof t=="object"&&!Array.isArray(t))}function Kg(t){return wa(t,a=>a.id)}function Ne(t){return sd(t)}return(t,a)=>{var s,c,y,h,w,B,te,ce,he,ge,ye,nt,He,Mt;return p(),v("main",{class:ie(["navigation-shell",{"rail-collapsed":!Vn.value}]),"data-theme":Fl.value,style:wt($v.value)},[Fe(Y1,{items:Re(C_),"active-key":U.value,"plugin-version":((s=I.value)==null?void 0:s.plugin_version)??"v3",expanded:Vn.value,pinned:xl.value,onSelect:Yv,onReveal:fs,onScheduleHide:a[0]||(a[0]=P=>Fi()),onTogglePinned:Zv},null,8,["items","active-key","plugin-version","expanded","pinned"]),l("section",bC,[l("header",hC,[l("div",kC,[l("span",null,d(Rp.value.label),1),l("h1
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
避雷:低质量、结构错误`},null,512),[[De,gi.value]])]),l("aside",RS,[l("header",null,[l("div",null,[a[158]||(a[158]=l("span",null,"识别预览",-1)),l("strong",null,d(Np.value)+" / "+d(Kr.value.length),1)]),l("em",null,d(Gn.value?`${Gn.value.length} 字`:"待粘贴"),1)]),l("dl",null,[(p(!0),v(j,null,le(Kr.value,_=>(p(),v("div",{key:_.key,class:ie({pending:Gn.value&&!_.recognized})},[l("dt",null,[Tl(d(_.label)+" ",1),l("span",null,d(_.recognized?"已识别":"待整理"),1)]),l("dd",null,d(_.value||"粘贴文本后显示"),1)],2))),128))])])]),l("footer",null,[l("span",null,d(Gn.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),l("button",{type:"button",onClick:a[33]||(a[33]=_=>Pt("externalProfileImport"))},"取消"),l("button",{type:"button",disabled:!Gn.value,onClick:cg}," 识别并填入问卷 ",8,BS)])])])):Z("",!0)]),_:1}),Fe(jt,{name:"viewer-fade"},{default:bt(()=>[pi.value?(p(),v("div",TS,[l("section",qS,[l("header",null,[a[159]||(a[159]=l("div",null,[l("span",null,"快速角色"),l("strong",null,"创建角色档案问卷")],-1)),l("button",{type:"button",title:"关闭",onClick:a[34]||(a[34]=_=>Pt("personaQuestionnaire"))},"×")]),l("div",LS,[l("label",null,[a[160]||(a[160]=l("span",null,"角色核心",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[35]||(a[35]=_=>qe.value.roleCore=_),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[De,qe.value.roleCore]])]),l("label",null,[a[161]||(a[161]=l("span",null,"性格关键词",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[36]||(a[36]=_=>qe.value.personality=_),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[De,qe.value.personality]])]),l("label",null,[a[162]||(a[162]=l("span",null,"外观特征",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[37]||(a[37]=_=>qe.value.appearance=_),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[De,qe.value.appearance]])]),l("label",null,[a[163]||(a[163]=l("span",null,"服装与配饰",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[38]||(a[38]=_=>qe.value.outfit=_),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[De,qe.value.outfit]])]),l("label",null,[a[164]||(a[164]=l("span",null,"常用场景",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[39]||(a[39]=_=>qe.value.scene=_),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[De,qe.value.scene]])]),l("label",null,[a[165]||(a[165]=l("span",null,"避雷内容",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[40]||(a[40]=_=>qe.value.avoid=_),rows:"3",placeholder:"不想要的设计方向、负面词和禁用元素。"},null,512),[[De,qe.value.avoid]])]),Na.value==="advanced"?(p(),v(j,{key:0},[l("label",null,[a[166]||(a[166]=l("span",null,"世界观",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[41]||(a[41]=_=>qe.value.worldview=_),rows:"3",placeholder:"现代、赛博、奇幻、末世、校园、古风、星际等。"},null,512),[[De,qe.value.worldview]])]),l("label",null,[a[167]||(a[167]=l("span",null,"背景经历",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[42]||(a[42]=_=>qe.value.background=_),rows:"3",placeholder:"所属组织、过往经历、当前处境。"},null,512),[[De,qe.value.background]])]),l("label",null,[a[168]||(a[168]=l("span",null,"身高 / 身材",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[43]||(a[43]=_=>qe.value.heightBuild=_),rows:"3",placeholder:"身高范围、体型、姿态气质、肤色。"},null,512),[[De,qe.value.heightBuild]])]),l("label",null,[a[169]||(a[169]=l("span",null,"身体记忆点",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[44]||(a[44]=_=>qe.value.bodyFeatures=_),rows:"3",placeholder:"伤疤、痣、纹身、义体、异色瞳等。"},null,512),[[De,qe.value.bodyFeatures]])]),l("label",null,[a[170]||(a[170]=l("span",null,"喜好",-1)),Pe(l("textarea",{"onUpdate:modelValue":a[45]||(a[45]=_=>qe.value.likes=_),rows:"3",placeholder:"颜色、食物、饮品、兴趣、常去地点。"},null,5