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

55 行
482 KiB
JavaScript

2026-07-13 01:49:00 +08:00
var Cb=Object.defineProperty;var Ib=(e,n,o)=>n in e?Cb(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Ws=(e,n,o)=>Ib(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 xu(e){const n=Object.create(null);for(const o of e.split(","))n[o]=1;return o=>o in n}const ut={},mo=[],da=()=>{},wf=()=>!1,Er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Nr=e=>e.startsWith("onUpdate:"),Rt=Object.assign,Au=(e,n)=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)},Pb=Object.prototype.hasOwnProperty,Xe=(e,n)=>Pb.call(e,n),xe=Array.isArray,go=e=>gi(e)==="[object Map]",$o=e=>gi(e)==="[object Set]",Mc=e=>gi(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",_f=e=>(Ze(e)||Le(e))&&Le(e.then)&&Le(e.catch),$f=Object.prototype.toString,gi=e=>$f.call(e),Sb=e=>gi(e).slice(8,-1),Cf=e=>gi(e)==="[object Object]",Mu=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ti=xu(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rr=e=>{const n=Object.create(null);return(o=>n[o]||(n[o]=e(o)))},xb=/-\w/g,jl=Rr(e=>e.replace(xb,n=>n.slice(1).toUpperCase())),Ab=/\B([A-Z])/g,cn=Rr(e=>e.replace(Ab,"-$1").toLowerCase()),If=Rr(e=>e.charAt(0).toUpperCase()+e.slice(1)),js=Rr(e=>e?`on${If(e)}`:""),ua=(e,n)=>!Object.is(e,n),mr=(e,...n)=>{for(let o=0;o<e.length;o++)e[o](...n)},Pf=(e,n,o,i=!1)=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,writable:i,value:o})},Tr=e=>{const n=parseFloat(e);return isNaN(n)?e:n},Mb=e=>{const n=$t(e)?Number(e):NaN;return isNaN(n)?e:n};let Ec;const Br=()=>Ec||(Ec=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)?Tb(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 Eb=/;(?![^(]*\))/g,Nb=/:([^]+)/,Rb=/\/\*[^]*?\*\//g;function Tb(e){const n={};return e.replace(Rb,"").split(Eb).forEach(o=>{if(o){const i=o.split(Nb);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 Bb="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qb=xu(Bb);function Sf(e){return!!e||e===""}function Lb(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=Mc(e),i=Mc(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?Lb(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 Eu(e,n){return e.findIndex(o=>sn(o,n))}const xf=e=>!!(e&&e.__v_isRef===!0),d=e=>$t(e)?e:e==null?"":xe(e)||Ze(e)&&(e.toString===$f||!Le(e.toString))?xf(e)?d(e.value):JSON.stringify(e,Af,2):String(e),Af=(e,n)=>xf(n)?Af(e,n.value):go(n)?{[`Map(${n.size})`]:[...n.entries()].reduce((o,[i,r],u)=>(o[Ks(i,u)+" =>"]=r,o),{})}:$o(n)?{[`Set(${n.size})`]:[...n.values()].map(o=>Ks(o))}:Gl(n)?Ks(n):Ze(n)&&!xe(n)&&!Cf(n)?String(n):n,Ks=(e,n="")=>{var o;return Gl(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 Qt;class Ob{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 Db(){return Qt}let ft;const Gs=new WeakSet;class Mf{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,Gs.has(this)&&(Gs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Nf(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Nc(this),Rf(this);const n=ft,o=Kl;ft=this,Kl=!0;try{return this.fn()}finally{Tf(this),ft=n,Kl=o,this.flags&=-3}}stop(){if(this.flags&1){for(let n=this.deps;n;n=n.nextDep)Tu(n);this.deps=this.depsTail=void 0,Nc(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Gs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){fu(this)&&this.run()}get dirty(){return fu(this)}}let Ef=0,li,ai;function Nf(e,n=!1){if(e.flags|=8,n){e.next=ai,ai=e;return}e.next=li,li=e}function Nu(){Ef++}function Ru(){if(--Ef>0)return;if(ai){let n=ai;for(ai=void 0;n;){const o=n.next;n.next=void 0,n.flags&=-9,n=o}}let e;for(;li;){let n=li;for(li=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 Rf(e){for(let n=e.deps;n;n=n.nextDep)n.version=-1,n.prevActiveLink=n.dep.activeLink,n.dep.activeLink=n}function Tf(e){let n,o=e.depsTail,i=o;for(;i;){const r=i.prevDep;i.version===-1?(i===o&&(o=r),Tu(i),Vb(i)):n=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=n,e.depsTail=o}function fu(e){for(let n=e.deps;n;n=n.nextDep)if(n.dep.version!==n.version||n.dep.computed&&(Bf(n.dep.computed)||n.dep.version!==n.version))return!0;return!!e._dirty}function Bf(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===si)||(e.globalVersion=si,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fu(e))))return;e.flags|=2;const n=e.dep,o=ft,i=Kl;ft=e,Kl=!0;try{Rf(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,Tf(e),e.flags&=-3}}function Tu(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)Tu(u,!0)}!n&&!--o.sc&&o.map&&o.map.delete(o.key)}function Vb(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 qf=[];function ca(){qf.push(Kl),Kl=!1}function fa(){const e=qf.pop();Kl=e===void 0?!0:
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function bi(e,n,o,i){try{return i?e(...i):e()}catch(r){Lr(r,n,o)}}function Ll(e,n,o,i){if(Le(e)){const r=bi(e,n,o,i);return r&&_f(r)&&r.catch(u=>{Lr(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 Lr(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,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){ca(),bi(u,null,10,[e,b,k]),fa();return}}fy(e,o,r,i,f)}function fy(e,n,o,i=!0,r=!1){if(r)throw e;console.error(e)}const il=[];let oa=-1;const bo=[];let rn=null,vo=0;const Kf=Promise.resolve();let $r=null;function Jt(e){const n=$r||Kf;return e?n.then(this?e.bind(this):e):n}function py(e){let n=oa+1,o=il.length;for(;n<o;){const i=n+o>>>1,r=il[i],u=di(r);u<e||u===e&&r.flags&2?n=i+1:o=i}return n}function Vu(e){if(!(e.flags&1)){const n=di(e),o=il[il.length-1];!o||!(e.flags&2)&&n>=di(o)?il.push(e):il.splice(py(n),0,e),e.flags|=1,Gf()}}function Gf(){$r||($r=Kf.then(Hf))}function vy(e){xe(e)?bo.push(...e):rn&&e.id===-1?rn.splice(vo+1,0,e):e.flags&1||(bo.push(e),e.flags|=1),Gf()}function Tc(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 zf(e){if(bo.length){const n=[...new Set(bo)].sort((o,i)=>di(o)-di(i));if(bo.length=0,rn){rn.push(...n);return}for(rn=n,vo=0;vo<rn.length;vo++){const o=rn[vo];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}rn=null,vo=0}}const di=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Hf(e){try{for(oa=0;oa<il.length;oa++){const n=il[oa];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),bi(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,zf(),$r=null,(il.length||bo.length)&&Hf()}}let ll=null,Qf=null;function Cr(e){const n=ll;return ll=e,Qf=e&&e.type.__scopeId||null,n}function St(e,n=ll,o){if(!n||e._n)return e;const i=(...r)=>{i._d&&Sr(-1);const u=Cr(n);let f;try{f=e(...r)}finally{Cr(u),i._d&&Sr(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=Fr(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&&Ba(f),i.push({dir:u,instance:o,value:f,oldValue:void 0,arg:m,modifiers:b}))}return e}function Tn(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 my(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 gr(e,n,o=!1){const i=Ku();if(i||ho){let r=ho?ho._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 gy=Symbol.for("v-scx"),by=()=>gr(gy);function He(e,n,o){return Jf(e,n,o)}function Jf(e,n,o=ut){const{immediate:i,deep:r,flush:u,once:f}=o,m=Rt({},o),b=n&&i||!n&&u!=="post";let k;if(vi){if(u==="sync"){const h=by();k=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,$,V)=>Ll(h,g,$,V);let A=!1;u==="post"?m.scheduler=h=>{pl(h,g&&g.suspense)}:u!=="sync"&&(A=!0,m.scheduler=(h,$)=>{$?h():Vu(h)}),m.augmentJob=h=>{n&&(h.flags|=4),A&&(h.flags|=2,g&&(h.id=g.uid,h.i=g))};const U=cy(e,n,m);return vi&&(k?k.push(U):b&&U()),U}function yy(e,n,o){const i=this.proxy,r=$t(e)?e.includes(".")?Yf(i,e):()=>i[e]:e.bind(i,i);let u;Le(n)?u=n:(u=n.handler,o=n);const f=hi(this),m=Jf(r,u.bind(i),o);return f(),m}function Yf(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 hy=Symbol("_vte"),Xf=e=>e.__isTeleport,Rl=Symbol("_leaveCb"),Ho=Symbol("_enterCb");function Zf(){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 _u;const Qc=typeof window<"u"&&window.trustedTypes;if(Qc)try{_u=Qc.createPolicy("vue",{createHTML:e=>e})}catch{}const Mp=_u?e=>_u.createHTML(e):e=>e,y1="http://www.w3.org/2000/svg",h1="http://www.w3.org/1998/Math/MathML",Na=typeof document<"u"?document:null,Jc=Na&&Na.createElement("template"),k1={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(y1,e):n==="mathml"?Na.createElementNS(h1,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{Jc.innerHTML=Mp(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const m=Jc.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",Qo="animation",wo=Symbol("_vtc"),Ep={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},Np=Rt({},ep,Ep),w1=e=>(e.displayName="Transition",e.props=Np,e),Zt=w1((e,{slots:n})=>g1(wy,Rp(e),n)),qn=(e,n=[])=>{xe(e)?e.forEach(o=>o(...n)):e&&e(...n)},Yc=e=>e?xe(e)?e.some(n=>n.length>1):e.length>1:!1;function Rp(e){const n={};for(const ae in e)ae in Ep||(n[ae]=e[ae]);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:U=`${o}-leave-active`,leaveToClass:h=`${o}-leave-to`}=e,$=_1(r),V=$&&$[0],Y=$&&$[1],{onBeforeEnter:R,onEnter:N,onEnterCancelled:P,onLeave:F,onLeaveCancelled:fe,onBeforeAppear:ge=R,onAppear:Ae=N,onAppearCancelled:Ie=P}=n,q=(ae,we,G,K)=>{ae._enterCancelled=K,nn(ae,we?g:m),nn(ae,we?k:f),G&&G()},D=(ae,we)=>{ae._isLeaving=!1,nn(ae,A),nn(ae,h),nn(ae,U),we&&we()},T=ae=>(we,G)=>{const K=ae?Ae:N,Ee=()=>q(we,ae,G);qn(K,[we,Ee]),Xc(()=>{nn(we,ae?b:u),na(we,ae?g:m),Yc(K)||Zc(we,i,V,Ee)})};return Rt(n,{onBeforeEnter(ae){qn(R,[ae]),na(ae,u),na(ae,f)},onBeforeAppear(ae){qn(ge,[ae]),na(ae,b),na(ae,k)},onEnter:T(!1),onAppear:T(!0),onLeave(ae,we){ae._isLeaving=!0;const G=()=>D(ae,we);na(ae,A),ae._enterCancelled?(na(ae,U),$u(ae)):($u(ae),na(ae,U)),Xc(()=>{ae._isLeaving&&(nn(ae,A),na(ae,h),Yc(F)||Zc(ae,i,Y,G))}),qn(F,[ae,G])},onEnterCancelled(ae){q(ae,!1,void 0,!0),qn(P,[ae])},onAppearCancelled(ae){q(ae,!0,void 0,!0),qn(Ie,[ae])},onLeaveCancelled(ae){D(ae),qn(fe,[ae])}})}function _1(e){if(e==null)return null;if(Ze(e))return[Xs(e.enter),Xs(e.leave)];{const n=Xs(e);return[n,n]}}function Xs(e){return Mb(e)}function na(e,n){n.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[wo]||(e[wo]=new Set)).add(n)}function nn(e,n){n.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const o=e[wo];o&&(o.delete(n),o.size||(e[wo]=void 0))}function Xc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let $1=0;function Zc(e,n,o,i){const r=e._endId=++$1,u=()=>{r===e._endId&&i()};if(o!=null)return setTimeout(u,o);const{type:f,timeout:m,propCount:b}=Tp(e,n);if(!f)return i();const k=f+"end";let g=0;const A=()=>{e.removeEventListener(k,U),u()},U=h=>{h.target===e&&++g>=b&&A()};setTimeout(()=>{g<b&&A()},m+1),e.addEventListener(k,U)}function Tp(e,n){const o=window.getComputedStyle(e),i=$=>(o[$]||"").split(", "),r=i(`${tn}
`)}function f(U,h){const $=Array.from(new Set(h.replace(/,/g,",").split(/[\n,]/).map(V=>V.trim()).filter(Boolean)));i("update:modelValue",{...o.modelValue,[U]:$})}function m(U,h){i("update:modelValue",{...o.modelValue,[U]:h})}const b=B(()=>r("group_allowlist").length),k=B(()=>r("user_allowlist").length),g=B(()=>r("adult_group_allowlist").length),A=B(()=>r("adult_user_allowlist").length);return(U,h)=>(c(),p("section",xC,[h[24]||(h[24]=ju('<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",AC,[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]=$=>f("group_allowlist",$.target.value))},null,40,MC),h[11]||(h[11]=t("small",null,"用于判断命令所在群聊是否获得授权。",-1))]),t("label",null,[t("span",null,[h[12]||(h[12]=ot("用户白名单 ",-1)),t("em",null,d(k.value)+" 项",1)]),t("textarea",{value:u("user_allowlist"),disabled:e.disabled,rows:"10",placeholder:`每行一个用户 ID
例如:987654321`,onInput:h[1]||(h[1]=$=>f("user_allowlist",$.target.value))},null,40,EC),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",NC,[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]=$=>f("adult_group_allowlist",$.target.value))},null,40,RC),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(A.value)+" 项",1)]),t("textarea",{value:u("adult_user_allowlist"),disabled:e.disabled,rows:"6",placeholder:"每行一个允许成人路由的用户 ID",onInput:h[3]||(h[3]=$=>f("adult_user_allowlist",$.target.value))},null,40,TC),h[17]||(h[17]=t("small",null,"不会继承普通用户白名单,必须单独授权。",-1))])]),t("div",BC,[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]=$=>m("user_concurrency_limit",Number($.target.value)))},null,40,qC)]),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]=$=>m("group_concurrency_limit",Number($.target.value)))},null,40,LC)]),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]=$=>m("daily_user_generation_limit",Number($.target.value)))},null,40,OC)]),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]=$=>m("daily_group_generation_limit",Number($.target.value)))},null,40,DC)]),t("label",VC,[t("input",{type:"checkbox",checked:e.modelValue.allow_2k!==!1,disabled:e.disabled,onChange:h[8]||(h[8]=$=>m("allow_2k",$.target.checked))},null,40,UC),h[22]||(h[22]=t("span",null,"允许聊天使用 2K",-1))]),t("label",FC,[t("input",{type:"checkbox",checked:e.modelValue.allow_4k===!0,disabled:e.disabled,onChange:h[9]||(h[9]=$=>m("allow_4k",$.target.checked))},null,40,WC),h[23]||(h[23]=t("span",null,"允许聊天使用 4K",-1))])])]))}}),KC=Et(jC,[["__scopeId","data-v-1ac2e616"]]),GC={class:"governance"},zC={class:"preview-card"},HC=["disabled"],QC={class:"preview-choice"},JC={key:1,class:"preview-error"},YC={key:2,class:"preview-result"},XC={class:"card"},ZC={class:"switch"},eI=["checked","disabled"],tI={class:"grid"},lI=["value","disabled"],aI=["value"],nI=["value","disabled"],oI={class:"entries"},iI=["checked","disabled","onChange"],rI={class:"card"},sI={class:"switch"},uI=["checked","disabled"],dI={class:"grid"},cI=["value","disabled"],fI=["value"],pI=["value","disabled"],vI={class:"card routing"},mI={class:"switch"},gI=["checked","disabled"],bI={class:"route-pair"},yI=["value","disabled"],hI=["value"],kI=["value","disabled"],wI=["value"],_I={class:"entries"},$I=["checked","disabled","onChange"],CI={class:"card"},II={class:"switch"},PI=["checked","disabled"],SI={class:"grid"},xI=["value","disabled"],AI=["value"],MI=["value","disabled"],EI={class:"retention"},NI=["value","disabled"],RI=["value","disabled"],TI=["value","disabled"],BI=vt({__name:"PromptGovernancePanel",props:{modelValue:{},adapters:{},disabled:{
`)}function Xd(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:zi.value,persona_split_fields_total:Gi.value,selected_material_ids:Is(),selected_draft_image_ids:ht.value.filter(kl).map(v=>v.image_id)}}async function Ns(){var s;const l=Kt.value.trim();if(!l||je.value)return;if(!Zl.value){$e.value="请先在设置中配置并确认一个生图模型。";return}await qs({promptPatch:Yd(l),metadata:Xd(l)})&&(jn.value=l,Co.value=`${Ge.value.title} / ${((s=Zl.value)==null?void 0:s.label)??H.value}`)}function Zd(){!Gt.value||!Bt(Gt.value)||(Qn.value="generation",ul("imageViewer"),lr(),Yl.value=!0)}function ec(l){const a=(l?Hi.value.find(s=>s.image_id===l):null)??Za.value;!a||!Bt(a)||(Yt.value=a.image_id,Zd())}function Hm(){ht.value.length&&(Qn.value="workflowCompare",ul("imageViewer"),lr(),Yl.value=!0)}function tc(l){var a;l&&zd(l),(a=zt.value)!=null&&a.imageUrl&&(Qn.value="quickProfile",ul("imageViewer"),lr(),Yl.value=!0)}function Rs(){Yl.value=!1,kn.value=!1}function lr(){pa.value=1,Ka.value={x:0,y:0}}function Qm(l){pa.value=rb(Number((pa.value+l).toFixed(2)),.5,4),pa.value<=1&&(Ka.value={x:0,y:0})}function Jm(l){Qm(l.deltaY<0?.12:-.12)}function Ym(){if(pa.value>1){lr();return}pa.value=2.2,Ka.value={x:0,y:0}}function Xm(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 Zm(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 Ts(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 lc(){ul("search"),Gr.value=!0,Hn.value=!0,Pl.value=0}function ac(l){if(!An.value.length)return;const a=An.value.length;Pl.value=(Pl.value+l+a)%a}function eg(){const l=An.value[Pl.value];l&&Md(l)}function so(){ul("personaQuestionnaire"),Po.value="",$i.value=!0}function nc(){ul("externalProfileImport"),Ii.value=!0,Jt(()=>{var l;(l=document.querySelector("[data-profile-import-input]"))==null||l.focus()})}function tg(){ul("quickProfileDetail"),Ci.value=!0}function lg(l){le.value=l,ul("materialDetail"),We.value=!0}async function ag(l){if(l.enabled){if(l.actionKey==="personaQuestionnaire"){so();return}if(l.actionKey==="workflowCompare"){Hm();return}if(l.actionKey==="externalProfileImport"){nc();return}if(l.actionKey==="workflowPersonaSplit"){await ug();return}if(l.actionKey==="workflowSaveVersion"){await wg();return}if(l.actionKey==="workflowCreateBranchFromNode"){await sg();return}if(l.actionKey==="workflowNodeGenerate"){l.id==="hires"&&Me.value!=="hires-fix"&&(Wl("hires-fix"),await Jt()),await qs();return}if(l.actionKey==="workflowNodeRetry"){await qs({retry:!0});return}if(l.actionKey==="workflowNodeComplete"){await dg();return}if(l.actionKey==="workflowNodeReview"){await pg();return}if(l.actionKey==="workflowReviewAdopt"){await yg();return}if(l.actionKey==="workflowPromptPlanSave"){await cg();return}if(l.actionKey==="workflowPromptPlanNext"){Wl("prompt-plan");return}if(l.actionKey==="workflowMaterialBindSave"){await fg();return}if(l.actionKey==="workflowArchiveFinal"){await ng();return}l.nav&&l.module&&_t(l.nav,l.module)}}async function ng(){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=hl("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 ar(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 kg(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:Cs(_==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:ic(v.category),inheritance_rule:_?`${v.category} only affects explicitly bound downstream stages.`:"do not use reference unless user explicitly selects one",reference_strength:_?rc(v.category):"弱",required:!!(_&&["风格","服装"].includes(v.category)),status:_?"ready":"pending"}});return{profile_id:l.profileId,profile_name:l.name,selected_material_ids:Is(),rules:s}}function ic(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 rc(l){return l==="风格"||l==="服装"?"强":l==="构图"?"中":"弱"}async function wg(){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:hl(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}});So.value=v.created_at}catch(v){bn.value=`保存快照失败:${Te(v)}`}finally{zn.value=!1}}function hl(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 sc(l){const a=[...ht.value,...Za.value?[Za.value]:[],...l?sl.value[l]??[]:[]];return Array.from(new Set(a.filter(kl).map(s=>s.image_id)))}function kl(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 _g(){if(!rd.value||Io.value)return;const l=It("生成档案");if(l){Po.value=l;return}zu.value+=1;const a=xg(Oe.value,zu.value);Io.value=!0,Po.value="";try{const s=await ke(O.quickProfileDraft,$g(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,Cg(v,Oe.value,Va.value,s)),I={...Pg(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]:[]},tr(I),bt.value="quickProfile",Nt("personaQuestionnaire"),Jt(()
<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)" />
<circle cx="${mb}" cy="${gb}" r="${bb}" fill="url(#halo)" />
<circle cx="${yb}" cy="${hb}" r="${kb}" fill="#ffffff" opacity="0.11" />
<rect x="${Ce}" y="${Ce}" width="${ir}" height="${Ac}" rx="${ta}" fill="#ffffff" opacity="0.14" />
<rect x="${At}" y="${At}" width="${pb}" height="${vb}" rx="${Math.round(ta*.72)}" fill="#0f172a" opacity="0.24" />
<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="${C}" fill="#ffffff" opacity="0.78" font-family="Inter, Microsoft YaHei, sans-serif" font-size="${cl}">${_e}</text>
<text x="${wb}" 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">${_b}</text>
</svg>`;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent($b)}`}function nb(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=ob(s,v);return[Math.round(s/y),Math.round(v/y)]}function ob(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 Sc(l){return l.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"})[a]??a)}function Tt(l){return"title"in l&&l.title?l.title:l.node_id||l.workflow_id||l.profile_id||fl(l.image_id)}function Bt(l){return l.thumbnail_url||l.image_url||""}function ib(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 rb(l,a,s){return Math.max(a,Math.min(s,l))}function sb(){try{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",Sl.value=xc(localStorage.getItem(Al.readNotifications)),Xn.value=xc(localStorage.getItem(Al.dismissedNotifications))}catch{}Jn.value=Dl.value}function ub(){try{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))}catch{}}function xc(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=Fs(l);return s?`rgba(${s.r}, ${s.g}, ${s.b}, ${a})`:`rgba(118, 104, 232, ${a})`}function Vs(l,a,s){const v=Fs(l),y=Fs(a);if(!v||!y)return l;const _=Math.min(1,Math.max(0,s));return`#${Us(v.r*(1-_)+y.r*_)}${Us(v.g*(1-_)+y.g*_)}${Us(v.b*(1-_)+y.b*_)}`}function Us(l){return Math.round(l).toString(16).padStart(2,"0")}function Fs(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 db(l){return!or(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:or(l.request)?l.request:void 0,result:or(l.result)?l.result:void 0,metadata:or(l.metadata)?l.metadata:void 0,error_message:typeof l.error_message=="string"?l.error_message:null}}function cb(l){return!!l}function or(l){return!!(l&&typeof l=="object"&&!Array.isArray(l))}function fb(l){return Ea(l,a=>a.id)}function Te(l){return _d(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(Fv.value)},[Ve(gh,{items:qe(r_),"active-key":wt.value,"plugin-version":((s=h.value)==null?void 0:s.plugin_version)??"v3",expanded:Jn.value,pinned:Dl.value,onSelect:bm,onReveal:_s,onScheduleHide:a[0]||(a[0]=E=>Xi()),onTogglePinned:hm},null,8,["items","active-key","plugin-version","expanded","pinned"]),t("section",ZP,[t("header",eS,[t("div",tS,[t("span",null,d(
身份:近未来港区巡查员\r
性格:冷静、可靠、行动快\r
外观:黑色短发,青绿色眼睛\r
服装:轻机能外套、短靴、发光臂章\r
避雷:低质量、结构错误`},null,512),[[Ne,Pi.value]])]),t("aside",vx,[t("header",null,[t("div",null,[a[162]||(a[162]=t("span",null,"识别预览",-1)),t("strong",null,d(Yp.value)+" / "+d(as.value.length),1)]),t("em",null,d(eo.value?`${eo.value.length} 字`:"待粘贴"),1)]),t("dl",null,[(c(!0),p(z,null,J(as.value,C=>(c(),p("div",{key:C.key,class:ie({pending:eo.value&&!C.recognized})},[t("dt",null,[ot(d(C.label)+" ",1),t("span",null,d(C.recognized?"已识别":"待整理"),1)]),t("dd",null,d(C.value||"粘贴文本后显示"),1)],2))),128))])])]),t("footer",null,[t("span",null,d(eo.value?"识别结果会先填入问卷,仍可在问卷里继续微调。":"等待外部角色卡文本。"),1),t("button",{type:"button",onClick:a[33]||(a[33]=C=>Nt("externalProfileImport"))},"取消"),t("button",{type:"button",disabled:!eo.value,onClick:Eg}," 识别并填入问卷 ",8,mx)])])])):Z("",!0)]),_:1}),Ve(Zt,{name:"viewer-fade"},{default:St(()=>[$i.value?(c(),p("div",gx,[t("section",bx,[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]=C=>Nt("personaQuestionnaire"))},"×")]),t("div",yx,[t("label",null,[a[164]||(a[164]=t("span",null,"角色核心",-1)),me(t("textarea",{"onUpdate:modelValue":a[35]||(a[35]=C=>Oe.value.roleCore=C),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]=C=>Oe.value.personality=C),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]=C=>Oe.value.appearance=C),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]=C=>Oe.value.outfit=C),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]=C=>Oe.value.scene=C),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]=C=>Oe.value.avoid=C),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]=C=>Oe.value.worldview=C),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]=C=>Oe.value.background=C),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]=C=>Oe.value.heightBuild=C),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]=C=>Oe.value.bodyFeatures=C),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]=C=>Oe.value.likes=C),rows:"3",placeholder:"颜色、食物、饮品、兴趣、常去地点。"},null,51