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

55 行
480 KiB
JavaScript

2026-07-13 00:13:37 +08:00
var kb=Object.defineProperty;var wb=(e,n,o)=>n in e?kb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Fs=(e,n,o)=>wb(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)}})();/**
2026-07-12 23:59:14 +08:00
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2026-07-13 00:13:37 +08:00
**/function Iu(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const ut={},vo=[],da=()=>{},bf=()=>!1,xr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ar=e=>e.startsWith("onUpdate:"),Rt=Object.assign,Pu=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},_b=Object.prototype.hasOwnProperty,Xe=(e,n)=>_b.call(e,n),xe=Array.isArray,mo=e=>vi(e)==="[object Map]",_o=e=>vi(e)==="[object Set]",Sc=e=>vi(e)==="[object Date]",Le=e=>typeof e=="function",$t=e=>typeof e=="string",Gl=e=>typeof e=="symbol",Ze=e=>e!==null&&typeof e=="object",yf=e=>(Ze(e)||Le(e))&&Le(e.then)&&Le(e.catch),hf=Object.prototype.toString,vi=e=>hf.call(e),$b=e=>vi(e).slice(8,-1),kf=e=>vi(e)==="[object Object]",Su=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Zo=Iu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mr=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},Cb=/-\w/g,jl=Mr(e=>e.replace(Cb,n=>n.slice(1).toUpperCase())),Ib=/\B([A-Z])/g,cn=Mr(e=>e.replace(Ib,"-$1").toLowerCase()),wf=Mr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ws=Mr(e=>e?`on${wf(e)}`:""),ua=(e,n)=>!Object.is(e,n),fr=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},_f=(e,n,o,i=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:i,value:o})},Er=e=>{const n=parseFloat(e);return isNaN(n)?e:n},Pb=e=>{const n=$t(e)?Number(e):NaN;return isNaN(n)?e:n};let xc;const Nr=()=>xc||(xc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mt(e){if(xe(e)){const n={};for(let o=0;o<e.length;o++){const i=e[o],r=$t(i)?Mb(i):Mt(i);if(r)for(const u in r)n[u]=r[u]}return n}else if($t(e)||Ze(e))return e}const Sb=/;(?![^(]*\))/g,xb=/:([^]+)/,Ab=/\/\*[^]*?\*\//g;function Mb(e){const n={};return e.replace(Ab,"").split(Sb).forEach(o=>{if(o){const i=o.split(xb);i.length>1&&(n[i[0].trim()]=i[1].trim())}}),n}function ie(e){let n="";if($t(e))n=e;else if(xe(e))for(let o=0;o<e.length;o++){const i=ie(e[o]);i&&(n+=i+" ")}else if(Ze(e))for(const o in e)e[o]&&(n+=o+" ");return n.trim()}const Eb="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Nb=Iu(Eb);function $f(e){return!!e||e===""}function Rb(e,n){if(e.length!==n.length)return!1;let o=!0;for(let i=0;o&&i<e.length;i++)o=sn(e[i],n[i]);return o}function sn(e,n){if(e===n)return!0;let o=Sc(e),i=Sc(n);if(o||i)return o&&i?e.getTime()===n.getTime():!1;if(o=Gl(e),i=Gl(n),o||i)return e===n;if(o=xe(e),i=xe(n),o||i)return o&&i?Rb(e,n):!1;if(o=Ze(e),i=Ze(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||!sn(e[f],n[f]))return!1}}return String(e)===String(n)}function xu(e,n){return e.findIndex(o=>sn(o,n))}const Cf=e=>!!(e&&e.__v_isRef===!0),d=e=>$t(e)?e:e==null?"":xe(e)||Ze(e)&&(e.toString===hf||!Le(e.toString))?Cf(e)?d(e.value):JSON.stringify(e,If,2):String(e),If=(e,n)=>Cf(n)?If(e,n.value):mo(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[i,r],u)=>(o[js(i,u)+" =>"]=r,o),{})}:_o(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>js(o))}:Gl(n)?js(n):Ze(n)&&!xe(n)&&!kf(n)?String(n):n,js=(e,n="")=>{var o;return Gl(e)?`Symbol(${(o=e.description)!=null?o:n})`:e};/**
2026-07-12 23:59:14 +08:00
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2026-07-13 00:13:37 +08:00
**/let Qt;class Bb{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&&Qt&&(Qt.active?(this.parent=Qt,this.index=(Qt.scopes||(Qt.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=Qt;try{return Qt=this,n()}finally{Qt=o}}}on(){++this._on===1&&(this.prevScope=Qt,Qt=this)}off(){if(this._on>0&&--this._on===0){if(Qt===this)Qt=this.prevScope;else{let n=Qt;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 Tb(){return Qt}let ft;const Ks=new WeakSet;class Pf{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,Qt&&(Qt.active?Qt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ks.has(this)&&(Ks.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xf(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ac(this),Af(this);const n=ft,o=Kl;ft=this,Kl=!0;try{return this.fn()}finally{Mf(this),ft=n,Kl=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Eu(n);this.deps=this.depsTail=void 0,Ac(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ks.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){uu(this)&&this.run()}get dirty(){return uu(this)}}let Sf=0,ei,ti;function xf(e,n=!1){if(e.flags|=8,n){e.next=ti,ti=e;return}e.next=ei,ei=e}function Au(){Sf++}function Mu(){if(--Sf>0)return;if(ti){let n=ti;for(ti=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;ei;){let n=ei;for(ei=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 Af(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function Mf(e){let n,o=e.depsTail,i=o;for(;i;){const r=i.prevDep;i.version===-1?(i===o&&(o=r),Eu(i),qb(i)):n=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=n,e.depsTail=o}function uu(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(Ef(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function Ef(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ii)||(e.globalVersion=ii,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!uu(e))))return;e.flags|=2;const n=e.dep,o=ft,i=Kl;ft=e,Kl=!0;try{Af(e);const r=e.fn(e._value);(n.version===0||ua(r,e._value))&&(e.flags|=128,e._value=r,n.version++)}catch(r){throw n.version++,r}finally{ft=o,Kl=i,Mf(e),e.flags&=-3}}function Eu(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)Eu(u,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function qb(e){const{prevDep:n,nextDep:o}=e;n&&(n.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=n,e.nextDep=void 0)}let Kl=!0;const Nf=[];function ca(){Nf.push(Kl),Kl=!1}function fa(){const e=Nf.pop();Kl=e===void 0?!0:
2026-07-12 23:59:14 +08:00
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2026-07-13 00:13:37 +08:00
**/function mi(e,n,o,i){try{return i?e(...i):e()}catch(r){Br(r,n,o)}}function Ll(e,n,o,i){if(Le(e)){const r=mi(e,n,o,i);return r&&yf(r)&&r.catch(u=>{Br(u,n,o)}),r}if(xe(e)){const r=[];for(let u=0;u<e.length;u++)r.push(Ll(e[u],n,o,i));return r}}function Br(e,n,o,i=!0){const r=n?n.vnode:null,{errorHandler:u,throwUnhandledErrorInProduction:f}=n&&n.appContext.config||ut;if(n){let m=n.parent;const b=n.proxy,w=`https://vuejs.org/error-reference/#runtime-${o}`;for(;m;){const g=m.ec;if(g){for(let M=0;M<g.length;M++)if(g[M](e,b,w)===!1)return}m=m.parent}if(u){ca(),mi(u,null,10,[e,b,w]),fa();return}}sy(e,o,r,i,f)}function sy(e,n,o,i=!0,r=!1){if(r)throw e;console.error(e)}const il=[];let oa=-1;const go=[];let rn=null,po=0;const Uf=Promise.resolve();let kr=null;function Jt(e){const n=kr||Uf;return e?n.then(this?e.bind(this):e):n}function uy(e){let n=oa+1,o=il.length;for(;n<o;){const i=n+o>>>1,r=il[i],u=si(r);u<e||u===e&&r.flags&2?n=i+1:o=i}return n}function Lu(e){if(!(e.flags&1)){const n=si(e),o=il[il.length-1];!o||!(e.flags&2)&&n>=si(o)?il.push(e):il.splice(uy(n),0,e),e.flags|=1,Ff()}}function Ff(){kr||(kr=Uf.then(jf))}function dy(e){xe(e)?go.push(...e):rn&&e.id===-1?rn.splice(po+1,0,e):e.flags&1||(go.push(e),e.flags|=1),Ff()}function Ec(e,n,o=oa+1){for(;o<il.length;o++){const i=il[o];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;il.splice(o,1),o--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Wf(e){if(go.length){const n=[...new Set(go)].sort((o,i)=>si(o)-si(i));if(go.length=0,rn){rn.push(...n);return}for(rn=n,po=0;po<rn.length;po++){const o=rn[po];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}rn=null,po=0}}const si=e=>e.id==null?e.flags&2?-1:1/0:e.id;function jf(e){try{for(oa=0;oa<il.length;oa++){const n=il[oa];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),mi(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;oa<il.length;oa++){const n=il[oa];n&&(n.flags&=-2)}oa=-1,il.length=0,Wf(),kr=null,(il.length||go.length)&&jf()}}let ll=null,Kf=null;function wr(e){const n=ll;return ll=e,Kf=e&&e.type.__scopeId||null,n}function St(e,n=ll,o){if(!n||e._n)return e;const i=(...r)=>{i._d&&Cr(-1);const u=wr(n);let f;try{f=e(...r)}finally{wr(u),i._d&&Cr(1)}return f};return i._n=!0,i._c=!0,i._d=!0,i}function me(e,n){if(ll===null)return e;const o=Dr(ll),i=e.dirs||(e.dirs=[]);for(let r=0;r<n.length;r++){let[u,f,m,b=ut]=n[r];u&&(Le(u)&&(u={mounted:u,updated:u}),u.deep&&Ta(f),i.push({dir:u,instance:o,value:f,oldValue:void 0,arg:m,modifiers:b}))}return e}function Bn(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&&(ca(),Ll(b,o,8,[e.el,m,e,n]),fa())}}function cy(e,n){if(rl){let o=rl.provides;const i=rl.parent&&rl.parent.provides;i===o&&(o=rl.provides=Object.create(i)),o[e]=n}}function pr(e,n,o=!1){const i=Fu();if(i||yo){let r=yo?yo._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&&Le(n)?n.call(i&&i.proxy):n}}const fy=Symbol.for("v-scx"),py=()=>pr(fy);function He(e,n,o){return Gf(e,n,o)}function Gf(e,n,o=ut){const{immediate:i,deep:r,flush:u,once:f}=o,m=Rt({},o),b=n&&i||!n&&u!=="post";let w;if(fi){if(u==="sync"){const h=py();w=h.__watcherHandles||(h.__watcherHandles=[])}else if(!b){const h=()=>{};return h.stop=da,h.resume=da,h.pause=da,h}}const g=rl;m.call=(h,C,V)=>Ll(h,g,C,V);let M=!1;u==="post"?m.scheduler=h=>{pl(h,g&&g.suspense)}:u!=="sync"&&(M=!0,m.scheduler=(h,C)=>{C?h():Lu(h)}),m.augmentJob=h=>{n&&(h.flags|=4),M&&(h.flags|=2,g&&(h.id=g.uid,h.i=g))};const U=ry(e,n,m);return fi&&(w?w.push(U):b&&U()),U}function vy(e,n,o){const i=this.proxy,r=$t(e)?e.includes(".")?zf(i,e):()=>i[e]:e.bind(i,i);let u;Le(n)?u=n:(u=n.handler,o=n);const f=bi(this),m=Gf(r,u.bind(i),o);return f(),m}function zf(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 my=Symbol("_vte"),Hf=e=>e.__isTeleport,Rl=Symbol("_leaveCb"),Go=Symbol("_enterCb");function Qf(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingV
2026-07-12 23:59:14 +08:00
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
2026-07-13 00:13:37 +08:00
**/let hu;const Gc=typeof window<"u"&&window.trustedTypes;if(Gc)try{hu=Gc.createPolicy("vue",{createHTML:e=>e})}catch{}const Pp=hu?e=>hu.createHTML(e):e=>e,v1="http://www.w3.org/2000/svg",m1="http://www.w3.org/1998/Math/MathML",Na=typeof document<"u"?document:null,zc=Na&&Na.createElement("template"),g1={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"?Na.createElementNS(v1,e):n==="mathml"?Na.createElementNS(m1,e):o?Na.createElement(e,{is:o}):Na.createElement(e);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>Na.createTextNode(e),createComment:e=>Na.createComment(e),setText:(e,n)=>{e.nodeValue=n},setElementText:(e,n)=>{e.textContent=n},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Na.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{zc.innerHTML=Pp(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const m=zc.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]}},tn="transition",zo="animation",ko=Symbol("_vtc"),Sp={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},xp=Rt({},Jf,Sp),b1=e=>(e.displayName="Transition",e.props=xp,e),Zt=b1((e,{slots:n})=>f1(by,Ap(e),n)),qn=(e,n=[])=>{xe(e)?e.forEach(o=>o(...n)):e&&e(...n)},Hc=e=>e?xe(e)?e.some(n=>n.length>1):e.length>1:!1;function Ap(e){const n={};for(const le in e)le in Sp||(n[le]=e[le]);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:w=f,appearToClass:g=m,leaveFromClass:M=`${o}-leave-from`,leaveActiveClass:U=`${o}-leave-active`,leaveToClass:h=`${o}-leave-to`}=e,C=y1(r),V=C&&C[0],Z=C&&C[1],{onBeforeEnter:R,onEnter:N,onEnterCancelled:P,onLeave:F,onLeaveCancelled:fe,onBeforeAppear:ge=R,onAppear:Ae=N,onAppearCancelled:Ie=P}=n,q=(le,we,G,K)=>{le._enterCancelled=K,nn(le,we?g:m),nn(le,we?w:f),G&&G()},D=(le,we)=>{le._isLeaving=!1,nn(le,M),nn(le,h),nn(le,U),we&&we()},B=le=>(we,G)=>{const K=le?Ae:N,Ee=()=>q(we,le,G);qn(K,[we,Ee]),Qc(()=>{nn(we,le?b:u),na(we,le?g:m),Hc(K)||Jc(we,i,V,Ee)})};return Rt(n,{onBeforeEnter(le){qn(R,[le]),na(le,u),na(le,f)},onBeforeAppear(le){qn(ge,[le]),na(le,b),na(le,w)},onEnter:B(!1),onAppear:B(!0),onLeave(le,we){le._isLeaving=!0;const G=()=>D(le,we);na(le,M),le._enterCancelled?(na(le,U),ku(le)):(ku(le),na(le,U)),Qc(()=>{le._isLeaving&&(nn(le,M),na(le,h),Hc(F)||Jc(le,i,Z,G))}),qn(F,[le,G])},onEnterCancelled(le){q(le,!1,void 0,!0),qn(P,[le])},onAppearCancelled(le){q(le,!0,void 0,!0),qn(Ie,[le])},onLeaveCancelled(le){D(le),qn(fe,[le])}})}function y1(e){if(e==null)return null;if(Ze(e))return[Ys(e.enter),Ys(e.leave)];{const n=Ys(e);return[n,n]}}function Ys(e){return Pb(e)}function na(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[ko]||(e[ko]=new Set)).add(n)}function nn(e,n){n.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const o=e[ko];o&&(o.delete(n),o.size||(e[ko]=void 0))}function Qc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let h1=0;function Jc(e,n,o,i){const r=e._endId=++h1,u=()=>{r===e._endId&&i()};if(o!=null)return setTimeout(u,o);const{type:f,timeout:m,propCount:b}=Mp(e,n);if(!f)return i();const w=f+"end";let g=0;const M=()=>{e.removeEventListener(w,U),u()},U=h=>{h.target===e&&++g>=b&&M()};setTimeout(()=>{g<b&&M()},m+1),e.addEventListener(w,U)}function Mp(e,n){const o=window.getComputedStyle(e),i=C=>(o[C]||"").split(", "),r=i(`${tn}
`)}function f(U,h){const C=Array.from(new Set(h.replace(/,/g,",").split(/[\n,]/).map(V=>V.trim()).filter(Boolean)));i("update:modelValue",{...o.modelValue,[U]:C})}function m(U,h){i("update:modelValue",{...o.modelValue,[U]:h})}const b=T(()=>r("group_allowlist").length),w=T(()=>r("user_allowlist").length),g=T(()=>r("adult_group_allowlist").length),M=T(()=>r("adult_user_allowlist").length);return(U,h)=>(c(),p("section",wC,[h[24]||(h[24]=Uu('<div class="intro" data-v-1ac2e616><span data-v-1ac2e616>AstrBot 聊天指令</span><strong data-v-1ac2e616>群聊与用户白名单</strong><p data-v-1ac2e616>每行填写一个平台提供的群聊 ID 或用户 ID,也支持用逗号分隔。白名单为空时不会放行对应条件。</p></div><div class="rules" data-v-1ac2e616><article data-v-1ac2e616><b data-v-1ac2e616>快速角色 / 角色工作流</b><strong data-v-1ac2e616>群聊命中 + 用户命中</strong><p data-v-1ac2e616>两个白名单必须同时命中才允许使用,避免群内未授权成员启动完整工作流。</p></article><article data-v-1ac2e616><b data-v-1ac2e616>单图生成</b><strong data-v-1ac2e616>群聊命中 或 用户命中</strong><p data-v-1ac2e616>任意一个白名单命中即可使用;用户白名单也可以在私聊中放行单图。</p></article></div>',2)),t("div",_C,[t("label",null,[t("span",null,[h[10]||(h[10]=ot("群聊白名单 ",-1)),t("em",null,d(b.value)+" 项",1)]),t("textarea",{value:u("group_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个群聊 ID
例如:123456789`,onInput:h[0]||(h[0]=C=>f("group_allowlist",C.target.value))},null,40,$C),h[11]||(h[11]=t("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),t("label",null,[t("span",null,[h[12]||(h[12]=ot("用户白名单 ",-1)),t("em",null,d(w.value)+" 项",1)]),t("textarea",{value:u("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
例如:987654321`,onInput:h[1]||(h[1]=C=>f("user_allowlist",C.target.value))},null,40,CC),h[13]||(h[13]=t("small",null,"使用 AstrBot 事件返回的平台用户 ID,不使用昵称。",-1))])]),h[25]||(h[25]=t("div",{class:"adult-intro"},[t("div",null,[t("span",null,"成人内容独立授权"),t("strong",null,"必须同时通过内容审核与成人白名单")]),t("p",null,"这些名单不会放宽恐怖主义、高危暴力、现实伤害或其他禁止内容。群聊内要求成人群聊与成人用户同时命中;私聊要求成人用户命中。")],-1)),t("div",IC,[t("label",null,[t("span",null,[h[14]||(h[14]=ot("成人内容群聊白名单 ",-1)),t("em",null,d(g.value)+" 项",1)]),t("textarea",{value:u("adult_group_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的群聊 ID",onInput:h[2]||(h[2]=C=>f("adult_group_allowlist",C.target.value))},null,40,PC),h[15]||(h[15]=t("small",null,"仅影响通过审核的 adult_allowed 内容。",-1))]),t("label",null,[t("span",null,[h[16]||(h[16]=ot("成人内容用户白名单 ",-1)),t("em",null,d(M.value)+" 项",1)]),t("textarea",{value:u("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:h[3]||(h[3]=C=>f("adult_user_allowlist",C.target.value))},null,40,SC),h[17]||(h[17]=t("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),t("div",xC,[t("label",null,[h[18]||(h[18]=t("span",null,"用户并发上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.user_concurrency_limit||2),disabled:e.disabled,onInput:h[4]||(h[4]=C=>m("user_concurrency_limit",Number(C.target.value)))},null,40,AC)]),t("label",null,[h[19]||(h[19]=t("span",null,"群聊并发上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.group_concurrency_limit||5),disabled:e.disabled,onInput:h[5]||(h[5]=C=>m("group_concurrency_limit",Number(C.target.value)))},null,40,MC)]),t("label",null,[h[20]||(h[20]=t("span",null,"用户每日生成上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.daily_user_generation_limit||30),disabled:e.disabled,onInput:h[6]||(h[6]=C=>m("daily_user_generation_limit",Number(C.target.value)))},null,40,EC)]),t("label",null,[h[21]||(h[21]=t("span",null,"群聊每日生成上限",-1)),t("input",{type:"number",min:"1",value:Number(e.modelValue.daily_group_generation_limit||100),disabled:e.disabled,onInput:h[7]||(h[7]=C=>m("daily_group_generation_limit",Number(C.target.value)))},null,40,NC)]),t("label",RC,[t("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:h[8]||(h[8]=C=>m("allow_2k",C.target.checked))},null,40,BC),h[22]||(h[22]=t("span",null,"允许聊天使用 2K",-1))]),t("label",TC,[t("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:h[9]||(h[9]=C=>m("allow_4k",C.target.checked))},null,40,qC),h[23]||(h[23]=t("span",null,"允许聊天使用 4K",-1))])])]))}}),OC=Et(LC,[["__scopeId","data-v-1ac2e616"]]),DC={class:"governance"},VC={class:"preview-card"},UC=["disabled"],FC={class:"preview-choice"},WC={key:1,class:"preview-error"},jC={key:2,class:"preview-result"},KC={class:"card"},GC={class:"switch"},zC=["checked","disabled"],HC={class:"grid"},QC=["value","disabled"],JC=["value"],YC=["value","disabled"],XC={class:"entries"},ZC=["checked","disabled","onChange"],eI={class:"card"},tI={class:"switch"},lI=["checked","disabled"],aI={class:"grid"},nI=["value","disabled"],oI=["value"],iI=["value","disabled"],rI={class:"card routing"},sI={class:"switch"},uI=["checked","disabled"],dI={class:"route-pair"},cI=["value","disabled"],fI=["value"],pI=["value","disabled"],vI=["value"],mI={class:"entries"},gI=["checked","disabled","onChange"],bI={class:"card"},yI={class:"switch"},hI=["checked","disabled"],kI={class:"grid"},wI=["value","disabled"],_I=["value"],$I=["value","disabled"],CI={class:"retention"},II=["value","disabled"],PI=["value","disabled"],SI=["value","disabled"],xI=vt({__name:"PromptGovernancePanel",props:{modelValue:{},adapters:{},disabled:{
`)}function Qd(l){const a=Ge.value,s=Fe.value;return{source:"standalone_web_workflow_chat",ui_node_id:Me.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:l,persona_split_fields_ready:ji.value,persona_split_fields_total:Wi.value,selected_material_ids:Cs(),selected_draft_image_ids:ht.value.filter(hl).map(v=>v.image_id)}}async function Es(){var s;const l=Kt.value.trim();if(!l||je.value)return;if(!Zl.value){$e.value="请先在设置中配置并确认一个生图模型。";return}await Ts({promptPatch:Hd(l),metadata:Qd(l)})&&(jn.value=l,$o.value=`${Ge.value.title} / ${((s=Zl.value)==null?void 0:s.label)??H.value}`)}function Jd(){!Gt.value||!Tt(Gt.value)||(Qn.value="generation",ul("imageViewer"),Zi(),Yl.value=!0)}function Yd(l){const a=(l?Ki.value.find(s=>s.image_id===l):null)??Za.value;!a||!Tt(a)||(Yt.value=a.image_id,Jd())}function jm(){ht.value.length&&(Qn.value="workflowCompare",ul("imageViewer"),Zi(),Yl.value=!0)}function Xd(l){var a;l&&jd(l),(a=zt.value)!=null&&a.imageUrl&&(Qn.value="quickProfile",ul("imageViewer"),Zi(),Yl.value=!0)}function Ns(){Yl.value=!1,kn.value=!1}function Zi(){pa.value=1,Ka.value={x:0,y:0}}function Km(l){pa.value=ab(Number((pa.value+l).toFixed(2)),.5,4),pa.value<=1&&(Ka.value={x:0,y:0})}function Gm(l){Km(l.deltaY<0?.12:-.12)}function zm(){if(pa.value>1){Zi();return}pa.value=2.2,Ka.value={x:0,y:0}}function Hm(l){pa.value<=1||(kn.value=!0,wn.value={pointerId:l.pointerId,x:l.clientX,y:l.clientY,offsetX:Ka.value.x,offsetY:Ka.value.y},l.currentTarget instanceof HTMLElement&&l.currentTarget.setPointerCapture(l.pointerId))}function Qm(l){!kn.value||l.pointerId!==wn.value.pointerId||(Ka.value={x:wn.value.offsetX+l.clientX-wn.value.x,y:wn.value.offsetY+l.clientY-wn.value.y})}function Rs(l){!kn.value||l.pointerId!==wn.value.pointerId||(kn.value=!1,l.currentTarget instanceof HTMLElement&&l.currentTarget.hasPointerCapture(l.pointerId)&&l.currentTarget.releasePointerCapture(l.pointerId))}function Zd(){ul("search"),Wr.value=!0,Hn.value=!0,Pl.value=0}function ec(l){if(!An.value.length)return;const a=An.value.length;Pl.value=(Pl.value+l+a)%a}function Jm(){const l=An.value[Pl.value];l&&Sd(l)}function ro(){ul("personaQuestionnaire"),Io.value="",wi.value=!0}function tc(){ul("externalProfileImport"),$i.value=!0,Jt(()=>{var l;(l=document.querySelector("[data-profile-import-input]"))==null||l.focus()})}function Ym(){ul("quickProfileDetail"),_i.value=!0}function Xm(l){ne.value=l,ul("materialDetail"),We.value=!0}async function Zm(l){if(l.enabled){if(l.actionKey==="personaQuestionnaire"){ro();return}if(l.actionKey==="workflowCompare"){jm();return}if(l.actionKey==="externalProfileImport"){tc();return}if(l.actionKey==="workflowPersonaSplit"){await og();return}if(l.actionKey==="workflowSaveVersion"){await bg();return}if(l.actionKey==="workflowCreateBranchFromNode"){await ng();return}if(l.actionKey==="workflowNodeGenerate"){l.id==="hires"&&Me.value!=="hires-fix"&&(Wl("hires-fix"),await Jt()),await Ts();return}if(l.actionKey==="workflowNodeRetry"){await Ts({retry:!0});return}if(l.actionKey==="workflowNodeComplete"){await ig();return}if(l.actionKey==="workflowNodeReview"){await ug();return}if(l.actionKey==="workflowReviewAdopt"){await vg();return}if(l.actionKey==="workflowPromptPlanSave"){await rg();return}if(l.actionKey==="workflowPromptPlanNext"){Wl("prompt-plan");return}if(l.actionKey==="workflowMaterialBindSave"){await sg();return}if(l.actionKey==="workflowArchiveFinal"){await eg();return}l.nav&&l.module&&_t(l.nav,l.module)}}async function eg(){const l=Fe.value;if(!l||je.value)return;const a=It("入库");if(a){$e.value=a;return}if(!l.workflowId){$e.value="请先生成角色档案并创建后端工作流,再执行入库。";return}const s=l.workflowId,v=yl("archive",l);if(!v){$e.value="当前工作流缺少后端入库节点 final_pack。";return}const y=Nn(s).find(W=>W.node_id===v);if(y&&["completed","selected"].includes(at(y.status
`)}}function er(l,a,s,v,y){return{id:l,title:a,prompt:s,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:y,status:"ready"}}function gg(l){const a=Ul.value,s=u.map((v,y)=>{const _=a.find(I=>I.category===v.category);return{id:`rule_${v.category}_${y+1}`,category:v.category,material_id:$s(_==null?void 0:_.id),material_label:(_==null?void 0:_.label)??"",material_group:(_==null?void 0:_.group)??(_==null?void 0:_.category)??"",material_prompt:(_==null?void 0:_.prompt)??"",material_colors:(_==null?void 0:_.colors)??[],bind_to_stages:ac(v.category),inheritance_rule:_?`${v.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:_?nc(v.category):"弱",required:!!(_&&["风格","服装"].includes(v.category)),status:_?"ready":"pending"}});return{profile_id:l.profileId,profile_name:l.name,selected_material_ids:Cs(),rules:s}}function ac(l){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:"修复入库"}]}[l]??[{stage_id:"body-sheet",stage_title:"全身与设定图"}]}function nc(l){return l==="风格"||l==="服装"?"强":l==="构图"?"中":"弱"}async function bg(){var s;const l=Fe.value;if(!l||zn.value)return;const a=It("保存快照");if(a){bn.value=a;return}if(!l.workflowId){bn.value="请先生成档案并创建后端工作流,再保存快照。";return}zn.value=!0,bn.value="";try{const v=await ke(O.workflowHistory(l.workflowId),{action:"save_version",title:`${l.name} / ${((s=Ge.value)==null?void 0:s.title)??"工作流快照"}`,node_id:yl(Me.value,l),include_nodes:!0,metadata:{source:"standalone_web",ui_node_id:Me.value,profile_id:l.profileId,profile_name:l.name,profile_status:l.status}});Po.value=v.created_at}catch(v){bn.value=`保存快照失败:${Be(v)}`}finally{zn.value=!1}}function yl(l,a){if(!a.workflowId)return;const v=Nn(a.workflowId).find(_=>Pa(_)===l);if(v)return v.node_id;const y=a.workflowNodeIds??[];if(l!=="brief-import"&&l==="persona-split")return y[0]}function Nn(l){var v;const a=Je.value[l]??[],s=(v=ct.value[l])==null?void 0:v.current_branch;return s?a.filter(y=>y.branch_name===s):a}function oc(l){const a=[...ht.value,...Za.value?[Za.value]:[],...l?sl.value[l]??[]:[]];return Array.from(new Set(a.filter(hl).map(s=>s.image_id)))}function hl(l){if(l.image_id.startsWith("mock-")||l.image_uri.startsWith("mock://"))return!1;const a="metadata"in l&&l.metadata&&typeof l.metadata=="object"?l.metadata:{},s=a.mock===!0||a.mock===1||a.mock==="true",v=Object.prototype.hasOwnProperty.call(a,"provider_error")&&a.provider_error!=null,y=a.fallback_used===!0||a.degraded===!0;return!s&&!v&&!y}async function yg(){if(!nd.value||Co.value)return;const l=It("生成档案");if(l){Io.value=l;return}ju.value+=1;const a=Cg(Oe.value,ju.value);Co.value=!0,Io.value="";try{const s=await ke(O.quickProfileDraft,hg(a,Oe.value,Va.value)),v={...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 ke(O.quickProfileDraftSave,kg(v,Oe.value,Va.value,s)),I={..._g(y,v),status:"文本档案已保存"};vn.value=[I,...vn.value.filter(W=>W.id!==I.id)],Ua.value=[y.profile,...Ua.value.filter(W=>W.profile_id!==y.profile.profile_id)],Ot.value={...Ot.value,[y.profile.profile_id]:y.workflow?[y.workflow]:[]},Xi(I),bt.value="quickProfile",Nt("personaQuestionnaire"),Jt(()
2026-07-12 23:59:14 +08:00
<svg xmlns="http://www.w3.org/2000/svg" width="${ze}" height="${qt}" viewBox="0 0 ${ze} ${qt}" preserveAspectRatio="xMidYMid meet">
<defs>
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="${_}" />
<stop offset="58%" stop-color="${I}" />
<stop offset="100%" stop-color="#111827" />
</linearGradient>
<radialGradient id="halo" cx="72%" cy="22%" r="55%">
<stop offset="0%" stop-color="${W}" stop-opacity="0.82" />
<stop offset="100%" stop-color="${W}" stop-opacity="0" />
</radialGradient>
<pattern id="grid" width="${la}" height="${la}" patternUnits="userSpaceOnUse">
<path d="M${la} 0H0V${la}" fill="none" stroke="#ffffff" stroke-opacity="0.13" stroke-width="2" />
</pattern>
</defs>
<rect width="${ze}" height="${qt}" fill="url(#bg)" />
<rect width="${ze}" height="${qt}" fill="url(#grid)" />
2026-07-13 00:13:37 +08:00
<circle cx="${cb}" cy="${fb}" r="${pb}" fill="url(#halo)" />
<circle cx="${vb}" cy="${mb}" r="${gb}" fill="#ffffff" opacity="0.11" />
2026-07-12 23:59:14 +08:00
<rect x="${Ce}" y="${Ce}" width="${ar}" height="${Pc}" rx="${ta}" fill="#ffffff" opacity="0.14" />
2026-07-13 00:13:37 +08:00
<rect x="${At}" y="${At}" width="${ub}" height="${db}" rx="${Math.round(ta*.72)}" fill="#0f172a" opacity="0.24" />
2026-07-12 23:59:14 +08:00
<text x="${At+Math.round(E*.035)}" y="${De}" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${xa}" font-weight="700">IMAGESTUDIO TEST ${oe}</text>
<text x="${At+Math.round(E*.035)}" y="${Ml}" fill="#ffffff" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Re}" font-weight="800">${ve}</text>
<text x="${At+Math.round(E*.035)}" y="${$}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${cl}">${_e}</text>
2026-07-13 00:13:37 +08:00
<text x="${bb}" y="${De+Math.round(E*.02)}" text-anchor="middle" fill="#ffffff" opacity="0.86" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Pt}" font-weight="900">${oe}</text>
<text x="${ze-Ce}" y="${qt-Math.round(Ce*.35)}" text-anchor="end" fill="#ffffff" opacity="0.72" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${Math.max(18,Math.round(E*.027))}" font-weight="800">${yb}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(hb)}`}function eb(l){const a=l.match(/(\d+)\s*x\s*(\d+)/i);if(!a)return[4,3];const s=Number(a[1]),v=Number(a[2]);if(!Number.isFinite(s)||!Number.isFinite(v)||s<=0||v<=0)return[4,3];const y=tb(s,v);return[Math.round(s/y),Math.round(v/y)]}function tb(l,a){let s=Math.abs(Math.round(l)),v=Math.abs(Math.round(a));for(;v;){const y=s%v;s=v,v=y}return s||1}function Cc(l){return l.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[a]??a)}function Bt(l){return"title"in l&&l.title?l.title:l.node_id||l.workflow_id||l.profile_id||fl(l.image_id)}function Tt(l){return l.thumbnail_url||l.image_url||""}function lb(l){if(l.status==="confirmed_unsupported")return!1;if(l.dialect==="openai_images"||l.dialect==="comfyui")return!0;const a=l.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 ab(l,a,s){return Math.max(a,Math.min(s,l))}function nb(){const l=localStorage.getItem(Al.theme);(l==="light"||l==="dark")&&(Jl.value=l),Wa.value=localStorage.getItem(Al.primary)||Wa.value,ja.value=localStorage.getItem(Al.accent)||ja.value;const a=localStorage.getItem(Al.navigationPinned);Dl.value=a===null||a==="true",Jn.value=Dl.value,Sl.value=Ic(localStorage.getItem(Al.readNotifications)),Xn.value=Ic(localStorage.getItem(Al.dismissedNotifications))}function ob(){localStorage.setItem(Al.theme,Jl.value),localStorage.setItem(Al.primary,Wa.value),localStorage.setItem(Al.accent,ja.value),localStorage.setItem(Al.navigationPinned,String(Dl.value)),localStorage.setItem(Al.readNotifications,JSON.stringify(Sl.value)),localStorage.setItem(Al.dismissedNotifications,JSON.stringify(Xn.value))}function Ic(l){if(!l)return[];try{const a=JSON.parse(l);return Array.isArray(a)?a.filter(s=>typeof s=="string"):[]}catch{return[]}}function Sa(l,a){const s=Us(l);return s?`rgba(${s.r}, ${s.g}, ${s.b}, ${a})`:`rgba(118, 104, 232, ${a})`}function Ds(l,a,s){const v=Us(l),y=Us(a);if(!v||!y)return l;const _=Math.min(1,Math.max(0,s));return`#${Vs(v.r*(1-_)+y.r*_)}${Vs(v.g*(1-_)+y.g*_)}${Vs(v.b*(1-_)+y.b*_)}`}function Vs(l){return Math.round(l).toString(16).padStart(2,"0")}function Us(l){const a=l.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 Ht(l,a){const s=l==null?void 0:l[a];return typeof s=="string"?s:""}function ib(l){return!lr(l)||typeof l.task_id!="string"?null:{task_id:l.task_id,task_type:typeof l.task_type=="string"?l.task_type:"generation",status:typeof l.status=="string"?l.status:"created",progress:typeof l.progress=="number"?l.progress:0,created_at:typeof l.created_at=="string"?l.created_at:"",updated_at:typeof l.updated_at=="string"?l.updated_at:"",profile_id:typeof l.profile_id=="string"?l.profile_id:null,workflow_id:typeof l.workflow_id=="string"?l.workflow_id:null,node_id:typeof l.node_id=="string"?l.node_id:null,model_route:typeof l.model_route=="string"?l.model_route:null,idempotency_key:typeof l.idempotency_key=="string"?l.idempotency_key:null,request:lr(l.request)?l.request:void 0,result:lr(l.result)?l.result:void 0,metadata:lr(l.metadata)?l.metadata:void 0,error_message:typeof l.error_message=="string"?l.error_message:null}}function rb(l){return!!l}function lr(l){return!!(l&&typeof l=="object"&&!Array.isArray(l))}function sb(l){return Ea(l,a=>a.id)}function Be(l){return hd(l)}return(l,a)=>{var s,v,y,_,I,W,oe,ve,_e,ye,he,nt,ze,qt;return c(),p("main",{class:ie(["navigation-shell",{"rail-collapsed":!Jn.value}]),"data-theme":Jl.value,style:Mt(Ov.value)},[Ve(fh,{items:qe(e_),"active-key":wt.value,"plugin-version":((s=h.value)==null?void 0:s.plugin_version)??"v3",expanded:Jn.value,pinned:Dl.value,onSelect:pm,onReveal:ws,onScheduleHide:a[0]||(a[0]=E=>Qi()),onTogglePinned:mm},null,8,["items","active-key","plugin-version","expanded","pinned"]),t("section",GP,[t("header",zP,[t("div",HP,[t("span",null,d(Hp.value.label),1),t("h
2026-07-12 23:59:14 +08:00
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
2026-07-13 00:13:37 +08:00
避雷:低质量、结构错误`},null,512),[[Ne,Ci.value]])]),t("aside",rx,[t("header",null,[t("div",null,[a[162]||(a[162]=t("span",null,"识别预览",-1)),t("strong",null,d(zp.value)+" / "+d(ts.value.length),1)]),t("em",null,d(eo.value?`${eo.value.length} 字`:"待粘贴"),1)]),t("dl",null,[(c(!0),p(z,null,J(ts.value,$=>(c(),p("div",{key:$.key,class:ie({pending:eo.value&&!$.recognized})},[t("dt",null,[ot(d($.label)+" ",1),t("span",null,d($.recognized?"已识别":"待整理"),1)]),t("dd",null,d($.value||"粘贴文本后显示"),1)],2))),128))])])]),t("footer",null,[t("span",null,d(eo.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),t("button",{type:"button",onClick:a[33]||(a[33]=$=>Nt("externalProfileImport"))},"取消"),t("button",{type:"button",disabled:!eo.value,onClick:Sg}," 识别并填入问卷 ",8,sx)])])])):X("",!0)]),_:1}),Ve(Zt,{name:"viewer-fade"},{default:St(()=>[wi.value?(c(),p("div",ux,[t("section",dx,[t("header",null,[a[163]||(a[163]=t("div",null,[t("span",null,"快速角色"),t("strong",null,"创建角色档案问卷")],-1)),t("button",{type:"button",title:"关闭",onClick:a[34]||(a[34]=$=>Nt("personaQuestionnaire"))},"×")]),t("div",cx,[t("label",null,[a[164]||(a[164]=t("span",null,"角色核心",-1)),me(t("textarea",{"onUpdate:modelValue":a[35]||(a[35]=$=>Oe.value.roleCore=$),rows:"3",placeholder:"角色名、身份、核心定位,可以只写一句。"},null,512),[[Ne,Oe.value.roleCore]])]),t("label",null,[a[165]||(a[165]=t("span",null,"性格关键词",-1)),me(t("textarea",{"onUpdate:modelValue":a[36]||(a[36]=$=>Oe.value.personality=$),rows:"3",placeholder:"外显性格、内在矛盾、行动方式。"},null,512),[[Ne,Oe.value.personality]])]),t("label",null,[a[166]||(a[166]=t("span",null,"外观特征",-1)),me(t("textarea",{"onUpdate:modelValue":a[37]||(a[37]=$=>Oe.value.appearance=$),rows:"3",placeholder:"发色、发型、眼睛、五官和视觉记忆点。"},null,512),[[Ne,Oe.value.appearance]])]),t("label",null,[a[167]||(a[167]=t("span",null,"服装与配饰",-1)),me(t("textarea",{"onUpdate:modelValue":a[38]||(a[38]=$=>Oe.value.outfit=$),rows:"3",placeholder:"服装风格、配饰、武器或随身物。"},null,512),[[Ne,Oe.value.outfit]])]),t("label",null,[a[168]||(a[168]=t("span",null,"常用场景",-1)),me(t("textarea",{"onUpdate:modelValue":a[39]||(a[39]=$=>Oe.value.scene=$),rows:"3",placeholder:"常驻地点、画面背景、适合出现的环境。"},null,512),[[Ne,Oe.value.scene]])]),t("label",null,[a[169]||(a[169]=t("span",null,"避雷内容",-1)),me(t("textarea",{"onUpdate:modelValue":a[40]||(a[40]=$=>Oe.value.avoid=$),rows:"3",placeholder:"不想要的设计方向、负面词和禁用元素。"},null,512),[[Ne,Oe.value.avoid]])]),Va.value==="advanced"?(c(),p(z,{key:0},[t("label",null,[a[170]||(a[170]=t("span",null,"世界观",-1)),me(t("textarea",{"onUpdate:modelValue":a[41]||(a[41]=$=>Oe.value.worldview=$),rows:"3",placeholder:"现代、赛博、奇幻、末世、校园、古风、星际等。"},null,512),[[Ne,Oe.value.worldview]])]),t("label",null,[a[171]||(a[171]=t("span",null,"背景经历",-1)),me(t("textarea",{"onUpdate:modelValue":a[42]||(a[42]=$=>Oe.value.background=$),rows:"3",placeholder:"所属组织、过往经历、当前处境。"},null,512),[[Ne,Oe.value.background]])]),t("label",null,[a[172]||(a[172]=t("span",null,"身高 / 身材",-1)),me(t("textarea",{"onUpdate:modelValue":a[43]||(a[43]=$=>Oe.value.heightBuild=$),rows:"3",placeholder:"身高范围、体型、姿态气质、肤色。"},null,512),[[Ne,Oe.value.heightBuild]])]),t("label",null,[a[173]||(a[173]=t("span",null,"身体记忆点",-1)),me(t("textarea",{"onUpdate:modelValue":a[44]||(a[44]=$=>Oe.value.bodyFeatures=$),rows:"3",placeholder:"伤疤、痣、纹身、义体、异色瞳等。"},null,512),[[Ne,Oe.value.bodyFeatures]])]),t("label",null,[a[174]||(a[174]=t("span",null,"喜好",-1)),me(t("textarea",{"onUpdate:modelValue":a[45]||(a[45]=$=>Oe.value.likes=$),rows:"3",placeholder:"颜色、食物、饮品、兴趣、常去地点。"},null,51